Three prompts give your agents one folder of notes to read, a note on every session, and a
lead, evaluator and shipper on each project, with a worker for each ticket.
For Claude Code · Plain Markdown · Prompt 01 takes about 30 minutes
Each prompt interviews you before it builds
Prompt 01 needs nothing else. Each one after it builds on the ones before, and stops to show you
what it made before you paste the next.
01
Prompt 01: Set up the second brain
A folder of plain Markdown your agents read before they start, so they already know your projects, decisions and preferences.
inbox/
projects/
output/
wiki/
Needs: nothing
02
Prompt 02: Automatic session notes and habits
Each session is logged as it ends and summarized overnight. Each morning you approve what becomes permanent.
Hook
Recap
Nightly digest
Needs: prompt 01
03
Prompt 03: The studio pipeline
A lead plans each app with you, a worker builds each ticket, an evaluator checks it and a shipper puts it live.
Lead
Worker
Evaluator
Shipper
Needs: prompts 01 and 02
The evaluator never sees how the code was written
The lead, evaluator and shipper stay up for the life of a project, and each hands off to a fresh
session when it runs low. The lead starts a worker for each ticket.
Ticket
PANTRY-4 · Shopping list by aisle
Showing the end of the run.Bug planted: the evaluator sends PANTRY-4 back to the worker.No bug: PANTRY-4 passes and ships.
Lead plans
PANTRY-4Planned
Shopping list by aisle
3 testable criteria
Worker builds
PANTRY-4Built
Shopping list by aisle
Branch pantry-4 · test added
Evaluator checks
PANTRY-4Round 1 / 3
Shopping list by aisle
✓Pass: Groups by aisle
✓Pass: Checks survive reload
✕Fail: No console errors
✓Pass: No console errors
TypeError on /list · plantedPhone and desktop checkedSent backPass
Shipper ships
Waiting for a pass
PANTRY-4Live
Shopping list by aisle
Checked live · note written
← PANTRY-4 back to the worker · round 1 of 3
Every ticket gets 2–5 testable acceptance criteria before a worker starts.
A ticket that fails goes back to its worker, up to 3 rounds, then to the lead and you.
Only a commit with a PASS reaches main.
Ghosted, October 2026
70 production releases in four days
That was Ghosted's first four days of early testing, run through this pipeline.
Lighthouse accessibility (this page, phone and desktop)
100
of page script (this page)
2.9 kB
send-backs before ship, 1 of them planted (this page)
2
Story 1 of 2
Ghosted's process got written down on day four, after it worked
October 8, 2026
Ghosted, my AI resume editor, opens for early testing. From day one, testers set the order of work.
Days one to three
Every bigger feature goes through research, then a grilling one question at a time, then a decision written down before any code. Each ticket carries acceptance criteria, and anything visible passes a design-system gate first. The feedback flow gets six prototypes, and I pick “B + 2”. One shipping session does all the merging, after review and my go.
Day four
I ask for the process to be written down so the next feature can follow it. It comes out as nine steps, each naming the feature it came from.
Story 2 of 2
The evaluator sent this page back twice. I'd planted one of them.
The second Copy button on this page once copied the first prompt. I had the lead put that bug there, on a throwaway branch, before trusting the evaluator with anything real. The evaluator sees only a ticket's acceptance criteria and a running preview, never the worker's reasoning. It sent the ticket back for exactly that button and passed everything else.
The second send-back was real. On the redesign, the evaluator returned the copy: two double negatives, a stat that contradicted the hero, and a privacy answer in the FAQ that promised more than the prompts do. Round two passed.
The page shipped after that and my go.
Read the whole prompt before you paste it
Each prompt checks with you before it changes your computer: prompt 01 asks its questions
first, and 02 and 03 show you each file before installing it. Prompt 03 also stops for your OK
after every phase and reads each tool's README first.
Prompt 01 of 03Start here
Set up the second brain
Creates the folders, the rules your agents follow, and a few commands.
I want you to set up a "second brain" for me: a folder of plain Markdown notes that you and any other AI agent I use can read and write, so you remember my projects, decisions and preferences between sessions.
Before you create anything, ask me these questions (all at once, short answers are fine):
1. Where should the folder live? (Suggest a sensible default for my OS.)
2. Do I use Obsidian, or another notes app? (The brain must work without one either way.)
3. Should it be a Git repo? (Recommended: yes, local only to start.)
4. Where do my tasks and to-dos live today (an app, a notes file, nowhere)?
5. Which AI tools will use it (Claude Code, Claude desktop, Codex, others)?
6. What are 3–5 projects I'm working on right now?
7. Is anything off-limits (folders or topics never to import or store)?
Then build it with this design.
## Core idea: knowledge moves through stages, not topics
Don't file by topic. A note moves forward only when real work earns it:
inbox/ → projects/ → output/ → wiki/
capture working shipped lasting lessons
- inbox/: zero-friction capture. Raw ideas, clips, research, transcripts, pasted context. No organizing at write time. Names like YYYY-MM-DD-short-description.md.
- projects/: one file per active or planned project. Frontmatter: type: project, status: active|planned|on-hold|parked|completed|canceled, project: slug. Sections: Goal, Active work, Source pointers, Output links, Decisions.
- output/: things that actually shipped: decisions, posts, handoffs, architecture notes, finished project records. Frontmatter: type: output, status: shipped|archived|superseded, output_type, source_project. Names like YYYY-MM-DD-artifact-name.md.
- wiki/: evergreen lessons. HARD RULE: a wiki page is only ever "harvested" from a finished project and its outputs, never written straight from an inbox note, an article or a chat answer. Frontmatter: type: wiki, wiki_topic, harvested_from, source_outputs, created, updated. It's meant to grow slowly; that's the point.
## Supporting pieces
- registry/: a routing directory of my AI setup (skills, slash commands, MCP servers/connectors, scripts, memory locations) with what each is for and where its real source lives. It points to things; it doesn't copy them.
- Each stage folder gets an _index.md map. Files use lowercase-hyphen-slugs.md. Use [[wiki-links]] between notes. Every output links back to its project; every wiki page links to the project and outputs it came from.
- A top-level AGENT.md with the conventions above (stages, frontmatter, naming, the harvest rule, privacy rules, and a "how to query" protocol: read AGENT.md → the registry → the relevant indexes → search, and cite file paths in answers). Add a CLAUDE.md / AGENTS.md that just says "Read AGENT.md before working here," so every agent picks it up.
- A short README.md explaining the brain to a human.
## Boundaries
- The brain holds durable knowledge. My live tasks, due dates and day plans stay in my task tool (answer 4). Project notes point to it rather than copying volatile status. Code stays in its repos; project notes link to them.
- Privacy: never store passwords, API keys, tokens or anything I mark off-limits. Add a .gitignore for a private/ folder holding agent memory and session recaps, and never commit those.
- Non-destructive: if you import from existing notes, copy and don't move them, and write a migration note in output/ listing what was imported and skipped.
## Workflows (as slash commands in .claude/commands/ if I use Claude Code, otherwise documented in AGENT.md)
- /capture <text>: append a raw note to inbox/.
- /brain-query <question>: search the brain and answer, citing files.
- /harvest projects/<project>.md: only for a completed project (otherwise ask me first): read its outputs, distill ONE reusable lesson into one wiki page, add backlinks, update wiki/_index.md, and log it in output/harvest-log.md.
- /brain-lint: check frontmatter, naming, broken links, and that no wiki page lacks a harvested_from.
## Finish by
1. Creating project notes for the projects I listed.
2. Filling registry/_index.md with the AI tools and skills you can see I have.
3. Showing me the folder tree and walking me through using it in my first week: capture freely, keep project notes current, record shipped work in output/, harvest when something's done.
Keep everything plain Markdown so it outlives any single app or AI.
Prompt 02 of 03
Automatic session notes and habits
Logs every session, writes a nightly digest, and adds morning, weekly and monthly routines.
Read AGENT.md first. My second brain is set up. Now automate documenting what I do with you, and add skills that keep my agents consistent.
## Ground rules
- At the end, show me what you built and what you tested, then stop.
- Show me each file before installing it. Ask before anything that costs money, sends data off my machine, or changes global settings.
- Never store passwords, keys or tokens in the brain or in Git.
## Step 0: survey
Check my OS, where Claude Code keeps its session transcripts on this machine (and in WSL, if I use it), and which scheduler I have (Task Scheduler, cron, launchd, or the Claude desktop app's scheduled tasks). Ask me what times suit a nightly and a weekly job.
Note: only Claude Code / desktop Code sessions are saved on this machine. Regular claude.ai chats aren't, so for those I'll use `capture` by hand.
## Step 1: automatic chat documentation
Three layers, each one simple:
1. **Log every session (hook, no AI).** A Claude Code `SessionEnd` hook, plus a `PreCompact` hook so long sessions get logged before compression. It appends one line to `private/recap-queue.jsonl`: timestamp, working folder, session id, and `transcript_path` from the hook input. Instant, never fails a session.
2. **`recap` skill.** Reads a transcript and writes `private/session-recaps/YYYY-MM-DD/<project>-<time>.md` with only these sections: What we did · Decisions (and why) · Verified vs not verified · Open threads · Memory candidates · Project it belongs to. Short and factual, no transcript dumps. I can run it by hand; the nightly job covers the rest.
3. **Nightly digest (local scheduler).** Recaps anything still queued, then writes one `private/nightly/YYYY-MM-DD.md` grouped by project: decisions, open threads, memory candidates, and proposed updates to project notes and agent memory. It only proposes; I approve in the morning. Use `claude -p`. Run it locally, not as a cloud agent: the transcripts only exist on this machine.
Rules: `private/` is Git-ignored; redact keys, tokens, passwords and emails before writing; never copy raw transcripts into the brain; nothing goes into `wiki/` from a recap (the harvest rule still applies); idempotent (mark queue entries done, never recap a session twice); if the computer was asleep, the next run catches up.
## Step 2: consistency skills
Create these as user-level Claude Code skills, each with a clear description of when it triggers. Each one reads AGENT.md before writing, writes only where AGENT.md allows, and ends by saying what it changed and what's waiting for my approval.
| Skill | What it does | When |
|---|---|---|
| `brain-context` | Read AGENT.md, the matching project note and recent recaps before starting work, so every agent starts with the same context | Auto, start of work |
| `capture` | Drop a raw thought, link or pasted chat into `inbox/` | On demand |
| `recap` | Session recap (Step 1) | End of session + nightly |
| `handoff` | Update the project note, then give me a paste-ready prompt to continue in a fresh session | On demand / long sessions |
| `decision-log` | Record real decisions in the project note with the date and reason | Auto, when deciding |
| `harvest` | Turn a finished project into one wiki lesson (rules in AGENT.md) | On demand |
| `morning-brief` | Last night's digest, pending approvals, open threads, 1–3 suggestions for today | Daily |
| `brain-lint` | Frontmatter, naming, broken links, stale statuses, inbox notes older than 30 days | Weekly |
| `weekly-review` | Week per project, flag projects idle 2+ weeks (park or continue?), inbox notes to promote or delete, finished projects worth harvesting | Weekly |
| `consolidate-memory` | Merge duplicate memories, fix stale facts, prune the index | Monthly |
## Step 3: schedule and verify
- Schedule the nightly, daily, weekly and monthly jobs at the times I chose.
- Write `registry/automations.md` listing every hook, skill and scheduled job: what it does, when it runs, where it writes, and how to turn it off. Link it from `registry/_index.md`.
- Test end to end: run a short dummy session, confirm the hook logged it, run `recap` and the nightly digest by hand, and show me the files. Tell me plainly anything you couldn't test.
Prompt 03 of 03
The studio pipeline
Sets up the tools, the four roles, self-testing, hosting and local AI, then builds a first app end to end.
Read AGENT.md first. My second brain and session recaps are set up. Now I want a small software studio (lead / worker / evaluator / shipper) for building apps for myself and the people around me: reminders, meal planning, small tools.
## Ground rules
- Work in the phases below. At the end of each phase, show me what you built and what you tested, then stop and wait for my OK.
- Show me each file before installing it. Ask before anything that costs money, sends data off my machines, or changes global settings.
- For any third-party tool: read its README/SKILL.md first (don't trust memory for install steps or flags), show me what it'll install, and record it in `registry/` with what it's for and when to use it.
- Never change firewall, router, DNS, VPN, reverse-proxy or power settings yourself: give me the exact changes and I'll apply them.
- Never store passwords, keys or tokens in the brain or in Git.
## Phase 0: survey and questions
Check and report: OS, CPU, RAM, GPU and VRAM, free disk, and what's installed (git, Node and its version, Python, Docker, Ollama; on Windows, whether WSL2 is set up).
Then ask me, all at once:
1. Who uses the apps (just me, or family/friends on their phones)? iPhone, Android or both? One first app idea to run the pipeline on.
2. Where should apps run: only on this computer, a home server I have, or a small rented server? Should they work away from home?
3. If I have a server or network setup: what it runs, my reverse proxy, domain, how I do certificates and remote access.
4. Budget appetite: free/local only, or a few paid tools if they clearly save time?
5. Board: a plain `docs/board.md` in each repo, or GitHub issues?
Then propose a folder layout (on Windows: app repos and dev servers inside WSL2, the brain on the Windows side) and write it into AGENT.md.
## Phase 1: toolbox
**Matt Pocock's skills** (github.com/mattpocock/skills). Install with the `skills` CLI as the README says, user-level. Browse the whole repo and recommend any I'm missing, but at least:
| Skill | Where it fits |
|---|---|
| `grill-me` / `grilling` | The lead grills me on every new app idea *before* writing the plan: who it's for, edge cases, what "done" means. |
| `grill-with-docs` / `domain-modeling` | When an app has real data: pin down the terms and record decisions as ADRs in the repo. |
| `research` | The lead's research step: primary sources into a repo .md, not from memory. |
| `prototype` | A throwaway prototype to test an idea on my phone before the real build. |
| `improve-codebase-architecture` | Monthly scheduled pass per app, producing a report of what to simplify. I choose what becomes tickets. |
| `triage` | Only if I chose GitHub issues as the board. |
| `writing-great-skills` | Read before writing any of my own skills. |
| `teach` | For me, when I want to learn part of my stack, not just have it built. Only I start it. |
**REA, Reverse Engineer Anything** (rea.tools, github.com/morluto/rea). Investigates how a *shipped* app works (JavaScript/Electron/web apps; native apps need an extra engine), so my apps can learn from ones I like. Check which Node versions it supports and use a pinned Node rather than changing my system Node. Don't approve optional install scripts without asking me. Only apps I use or own, for learning concepts; never copy proprietary code, assets or branding.
**Playwright:** Playwright MCP (Microsoft) so you can drive a real browser at phone and desktop sizes, click through flows and take screenshots; and Playwright Test in every app repo, a small smoke test of the main flows that is part of the check command.
**Chrome DevTools MCP** (github.com/ChromeDevTools/chrome-devtools-mcp): Playwright drives, DevTools inspects. Console errors, failed or slow network requests, a performance trace at a throttled mobile connection, and audits (performance, accessibility, best practices, PWA installability; use the Lighthouse CLI if the MCP lacks audits). If I have Android, also show me how to connect a real phone over USB debugging.
**Also:** Context7 (or a similar docs MCP) so workers code against current library docs, and Anthropic's built-in skill-creator.
**Test:** show each tool working once.
## Phase 2: the pipeline
**Roles**
- **Lead** (one persistent session per project, the one I talk to): `grill-me` me → `research` (optionally a `reference-study`: REA on one app + feature I like → observed behavior, evidence, 2–3 concepts, a recommendation; I pick) → optional `prototype` → plan in `projects/<app>.md` (goal, who it's for, screens, data, decisions) → small tickets, each with 2–5 testable acceptance criteria. Makes product calls with me. Never writes big code itself.
- **Workers** (the lead creates one per ticket, as a subagent or a separate session): build in their own git branch/worktree, add or update a Playwright test, run the checks, and hand back: branch + commit, what changed, checks run, screenshots, anything unfinished. Never merge, deploy or write their own evals.
- **Evaluator** (one persistent session per project, separate from the workers): gets ONLY the acceptance criteria, the standing criteria and the running app, never the worker's chat. Walks each criterion with Playwright MCP at phone and desktop size, checks console, network, performance and audits with DevTools MCP, and writes `docs/evals/<ticket>.md`: pass/fail per criterion with evidence, measured results separate from its opinion. Verdict: PASS, or FAIL with specific fixes. On FAIL the worker fixes and it goes back, max 3 rounds, then it escalates to the lead and me. Never edits code.
- **Shipper** (one persistent session per project; while only one worker runs, the lead can run it through a background subagent): accepts only a PASS eval on that exact commit, merges to main, deploys, re-runs a quick eval on the live URL, writes a one-paragraph release note to `output/` in the brain, and tells me what shipped.
**Long-running roles:** the lead, evaluator and shipper stay up for the life of the project. When one runs low on context or usage, it summarizes its state into the project note and hands off to a fresh session of the same role (the `handoff` skill from prompt 2). Workers are short-lived: one ticket, then done.
**Standing criteria** for every app (in its `docs/ship-profile.md`): no console errors, no failed requests, accessibility ≥ 90, installs as a PWA, works at phone width, usable within ~3s on a throttled mobile connection.
Rules: nothing reaches main without a PASS; I give the go for anything other people will see; one heavy job at a time (builds, local models, image generation) so the computer stays usable.
**Default stack:** PWAs (they install to phone home screens and send push notifications; on iPhone that needs iOS 16.4+ and adding to the home screen). A simple full-stack framework with SQLite, one repo per app, packaged as a Docker image, Playwright Test from the start. A shared tiny UI kit once there are 2+ apps.
## Phase 3: hosting and local AI
**Hosting.** Use my Phase 0 answers; don't pick for me. Write a deploy plan for my approval covering:
- **Real HTTPS** (PWA install, offline mode and push need it): prefer a domain + Let's Encrypt (DNS challenge works for internal-only apps) over self-signed certs.
- **Remote access** only the way I choose (my VPN, Tailscale, or public with login), nothing inbound opened unless I say so. Web push needs outbound access to the browser's push service.
- **Least-privilege deploy access:** a dedicated deploy user/key, never my admin credentials, never committed.
- **Per app:** container, data volume, backups with a tested restore, health check, rollback. Exact steps go in `docs/ship-profile.md`, so the shipper deploys the same way every time.
**Local AI.** Pick what fits my hardware and tell me what you chose and why (say plainly if my GPU will be slow or unsupported):
- **Ollama** with a current open model sized to my memory, for cheap private jobs: nightly recap summaries, tagging inbox notes, AI features inside my apps. Not the main coding agent; that stays with you.
- **faster-whisper** (or whisper.cpp) for voice notes → brain inbox.
- **ComfyUI** for app icons, illustrations and placeholder art, with a saved reusable workflow.
## Phase 4: skills and schedules
Read `writing-great-skills` first. Create user-level skills that call Matt's skills instead of duplicating them: `new-app` (scaffold repo + brain note + board + ship profile + Playwright), `lead` / `worker` / `evaluator` / `shipper` role briefs, `reference-study`, `walkthrough`, `evaluate`, `ship`, and `app-health` (weekly: every live app up, cert expiry, last backup + restore test, disk, standing criteria vs last week). Schedule `app-health` weekly and `improve-codebase-architecture` monthly. Add everything to `registry/automations.md`.
## Phase 5: prove it end to end
1. Run the pipeline on my first app idea: the lead grills me, researches and plans; two workers build two tickets in parallel; the evaluator checks each, including one deliberate FAIL (e.g. a planted console error) so I can see it caught and fixed; the shipper deploys; I open it on my phone over HTTPS.
2. Confirm that session got recapped and appears in the next nightly digest.
3. Tell me plainly anything you couldn't get working or couldn't test.
Claude is the one bill you need. Most of the rest runs on your computer.
What to pay for, run locally or skip
Item
Pay for
Run locally
Skip
Claude plan Parallel workers use a lot of it, so a higher tier keeps the pipeline from stalling.
Yes
–No
–No
Local models Good for private chores: summaries, transcription and AI features inside your apps. Claude stays the coder.
–No
Yes
–No
Images ComfyUI runs free on a decent GPU. A ChatGPT plan helps with text in images and adds Codex as a second coder.
Optional
Yes
–No
Firecrawl, Mobbin Skip them at first. Built-in web search and screenshots of apps you like are enough for personal projects.
–No
–No
Yes
Hosting Your own computer or home server costs nothing. Rent a small server only when apps must run while yours is off.
Later
Yes
–No
App stores Skip them. Web apps install to phone home screens.
–No
–No
Yes
Lessons
Where agents slip, and the check for each
01
Let the agent grill you first
Before this page had a layout, the agent asked me five questions, one at a time: the name and web address, the navigation, which stories, the downloads and the hands-on moment. Each answer went into the plan before a single ticket existed.
02
A hook logs every session
If logging depends on the agent remembering, sessions get missed. A hook fires every time a session ends, and the AI does only the part a script can't: writing the recap.
03
You decide each morning what the brain keeps
Recaps and the nightly digest land in a private folder that Git ignores. Nothing joins the brain until you approve it the next morning, so half-right summaries stay out.
04
Only the shipper touches main
Workers build on their own branches, and the lead merges them into a plan branch. The shipper moves main to the exact commit that was previewed, after a pass and my go.
05
Trust the evaluator after it catches a bug you planted
Break one thing on purpose, on a throwaway branch, and wait for the evaluator to send it back. The second story above is mine.
06
Start with prompt 01 and a week of notes
Run prompt 01 and use it for a week before adding anything. Prompts 02 and 03 build on that folder, and the studio is for when you have an app to build.
07
The agent reads each tool's README first
Tool names and install steps change, so prompt 03 tells your agent to read each tool's README instead of trusting what it remembers.
FAQ
Which AI does it need?
Claude Code. The prompts set up Claude Code hooks, skills and slash commands. The notes are plain Markdown, so other agents you use, such as Codex, can read and write them too.
Do I need Obsidian?
No. The notes are plain Markdown files in a folder. Prompt 01 asks whether you use Obsidian or another notes app, and the folder works either way.
Where are my notes stored, and what stays private?
In a folder on your computer. Prompt 01 asks where it should live, suggests a default for your OS and recommends a local Git repo.
Passwords, API keys and tokens are never stored. Agent memory, session recaps and nightly digests live in a private/ folder that Git ignores, and recaps and digests have keys, tokens, passwords and emails redacted before they're written. The nightly digest runs on your computer, because that's where the transcripts are.
Can I stop after prompt 01?
Yes. The first two prompts make a useful setup on their own. Add the studio when you have an app to build.
Does it work on Windows and Mac?
Yes. Prompt 02 starts by checking your OS, where Claude Code keeps session transcripts (in WSL too, if you use it) and which scheduler you have: Task Scheduler, cron, launchd or the Claude desktop app's scheduled tasks. On Windows, prompt 03 puts app repos and dev servers inside WSL2.
Will the agent change things without asking?
Prompt 01 asks its questions before it creates anything. Prompts 02 and 03 show you each file before installing it and ask before anything that costs money, sends data off your computer or changes global settings. Prompt 03 stops after each phase to show what it built and tested, and waits for your OK.
Prompt 03 leaves firewall, router, DNS, VPN, reverse-proxy and power settings to you: it gives you the exact changes to make.