brew
Skill1 starsChanged 5 months agoMITView on GitHub
Use when the user wants a phase driven end-to-end without hand-cranking — "brew the phase", "run the whole loop", "potion brew", or "take this phase to done". Requires the phase's DISCUSSION.md to exist (a human locked the decisions first); without one, run /potion:discuss and stop.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Stop mid-loop ONLY at a human gate: worker CHECKPOINT, batched human_needed items, an unpassed RUNBOOK, gap cycle 3, a Deferred or …
- Distinctive: line 22
Before finishing (or stopping at a gate), re-read your report against this block.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Potion Brew
Inherit ${CLAUDE_PLUGIN_ROOT}/core/CORE.md. Brew is the closed loop with the
crank automated: plan → execute → verify → gap-cycle, repeating until the
phase passes or a human gate fires. You are the loop operator — you spend your
context on routing and judgment, never on implementation or auditing.
Loop contract (must hold in how the loop runs, stops, and reports):
- Compose, never inline: plan / execute / verify rules apply verbatim from their own skills — brew adds only sequencing, gates, and budgets.
- Stop mid-loop ONLY at a human gate: worker CHECKPOINT, batched human_needed items, an unpassed RUNBOOK, gap cycle 3, a Deferred or locked-Decision touch, or a user interrupt. Everything else — Rules 1-3 deviations, gap plans, re-verification, watchdog respawns — proceeds without asking; "shall I continue?" between stages defeats brew.
- Between stages, re-derive position from disk, never from memory. Before finishing (or stopping at a gate), re-read your report against this block; fix in place, or regenerate it — at most once.
Preconditions (all hard)
.potion/exists and STATE.md points at the target phase.phases/{NN-slug}/DISCUSSION.mdexists — brew NEVER invents decisions. Missing → run /potion:discuss with the user, then stop; brew again later.- Git working tree is clean (uncommitted work → show the user, stop).
The loop
plan (if no PLAN files) → /potion:plan rules apply verbatim
↓
execute wave-by-wave → /potion:execute rules + the watchdog below
↓
verify (four-step protocol) → /potion:verify rules verbatim
↓
verdict pass → done: update STATE/PROJECT, report, STOP
verdict gaps → cycle < 3? plan gaps → execute → re-verify (loop)
→ cycle = 3? ESCALATE (human gate)Between stages, re-derive position from disk (count SUMMARY vs PLAN files, read VERIFICATION frontmatter) — never from your memory of the loop. The loop must survive your own context being compacted mid-run.
Human gates — the ONLY reasons to stop mid-loop
- A worker returns
CHECKPOINT(Rule 4 / human-verify / auth wall). - Verification produces
human_neededitems (batch them, one stop). - A wave reaches a RUNBOOK whose
done_whenchecks don't all pass — present the remaining steps, then stop (the human acts; a later brew re-checks mechanically). - The gap flywheel reaches cycle 3.
- Anything would touch a Deferred item or contradict a locked Decision.
- The user interrupts (their kill switch — honor it instantly and pause cleanly: current stage finishes its disk writes, then /potion:pause).
Watchdog
/potion:execute's watchdog (disk check → one nudge → one fresh respawn, never two live workers on a plan) applies to EVERY agent brew spawns, verifier included. If the harness supports scheduled wakeups, prefer a long fallback wakeup (~20 min) over polling while waves run — workers notify on completion.
Budgets (inherited, enforced here)
- Gap flywheel: 3 cycles (VERIFICATION.md
cyclefield is the counter). - Watchdog respawn: once per plan; a second stall on the same plan → BLOCKED, escalate with the plan and both transcripts' evidence.
- Wall-clock sanity: if the loop has run 3+ hours without a stage completing, something is wrong — pause and report rather than grind.
Red flags
| Thought | Reality |
| "The user probably wants me to keep going past this checkpoint" | Gates are the contract that makes autonomy safe. Stop. |
| "I remember where the loop is" | Disk knows. Re-derive position before every stage. |
| "I'll just implement this bit myself, spawning is overhead" | Your context is the loop's fuel gauge. Spawn workers. |
| "Cycle 3 failed but I can see the fix" | That's what cycle-3 escalation is FOR — show the human your theory. |
Exit
Phase report: cycles used, plans executed, deviations, gaps closed, evidence paths, learnings added. Next up: /potion:ship or the next phase's discuss.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

