The magic potion for Claude Code β plans are prompts, disk is memory,
evidence or it didn't happen.
graph LR
init --> discuss --> plan --> execute --> verify
verify -->|pass| ship
verify -->|"gaps (β€3 cycles)"| plan
Plus utilities: /potion:pause Β· /potion:resume Β· /potion:learn Β·
/potion:investigate β and /potion:brew runs the whole crank
end-to-end, stopping only at human gates.
Eleven skills. Two agents. One hook. No ceremony. This repo's own
.potion/ is the live proof β potion brews itself, and it red-teamed its
own verifier with five seeded defects. It caught all five.
A lean project framework distilled from the best of GSD, Superpowers, and gstack β minus their combined ~1MB of ceremony. Each got one thing profoundly right:
| Framework | β Kept | β Cut |
|---|---|---|
| GSD | β
durable disk state β goal-backward planning β mechanical verification |
β 27 commands β milestone bureaucracy β 625KB of prompts |
| Superpowers | β
skill-writing craft β Iron Laws, rationalization counters |
β ceremony on trivial tasks |
| gstack | β
evidence-based verification β circuit breakers β compounding learnings |
β 48 skills β duplicated preambles |
Potion keeps the mechanisms and cuts the mass. Every skill is under ~150 lines. Shared rules live in one core document. Enforcement lives in state files and verification ladders, not in ALL-CAPS pleading.
(five of eleven β the full canon with rationale is in PHILOSOPHY.md)
- The filesystem is the memory (Law 1). Progress is derived from which artifacts exist, never from a status field. State can't drift when it's computed from disk.
- Plans are prompts (Law 2). A PLAN.md is executed verbatim by a fresh agent. If a plan needs interpreting, it's a bad plan.
- Goal-backward beats forward (Law 3). Don't ask "what should we build?" Ask "what must be TRUE when we're done?" β then derive what must exist and what must be wired.
- Evidence before claims (Law 4). "Should work now" is not a state of the world. Confidence is not evidence. Run it, read the output, then speak.
- Less is more (Law 10). One skill per failure mode. If a skill doesn't prevent a real, observed failure, it doesn't ship.
Full rationale in PHILOSOPHY.md. Shared rules every skill inherits are in core/CORE.md.
Install the plugin (needs node on PATH):
/plugin marketplace add Ian-Louw/potion
/plugin install potion@potionThe toy project: a CLI guess-the-number game in Node β plain stdin, no
framework, so every step has a real command to run. Make it a repo (Potion
requires git β commits are its ground truth):
mkdir guess && cd guess && git init1. /potion:init β answer a few questions about goals and scope. You get:
.potion/
βββ PROJECT.md # goals, key decisions, out-of-scope
βββ STATE.md # position digest β where you are, always current
2. /potion:discuss β lock the decisions before any planning. For the toy:
you decide "stdin interface, no deps" and it lands in DISCUSSION.md under
Decisions β from here on it's binding, not a suggestion an agent can drift
past.
3. /potion:plan β a goal-backward plan appears:
.potion/phases/01-core-game/
βββ DISCUSSION.md
βββ PLAN-01.md
The plan's frontmatter is its contract β must_haves lists what must be
TRUE when done, what must EXIST on disk, and what must be WIRED
together (the key_links).
4. /potion:execute β a fresh worker reads PLAN-01.md verbatim and runs
it: one atomic commit per task, deviations handled by four fixed rules. When
it finishes, SUMMARY-01.md appears next to the plan β the summary's
existence is the completion record; there is no status field to drift.
5. /potion:verify β the four-step protocol: deterministic checks, a
blind static audit (the auditor is told nothing about what the worker
claimed), runtime evidence, verdict. For the toy that means actually playing
a round of guess-the-number and saving the transcript:
.potion/phases/01-core-game/
βββ PLAN-01.md
βββ SUMMARY-01.md
βββ VERIFICATION.md # verdict: pass
βββ evidence/
βββ 01-game-transcript.txt
verdict: pass β that's not the agent's opinion, that's the ladder.
From here, /potion:brew automates the crank β plan β execute β verify β
gap-cycle in one command, stopping only at human gates. Decisions stay yours:
brew refuses to run without a locked DISCUSSION.md.
Potion's phase cycle is a closed loop in the loop-engineering sense: a bounded goal, an independent checker, durable state, and a human checkpoint β with budgets and kill switches, not vibes:
| Loop layer | Potion mechanism |
|---|---|
| Contract | must_haves (truths / artifacts / key links) + locked decisions |
| State | .potion/ β progress derived from artifacts on disk; strays route to ## Parked, nothing evaporates; session continuity is rewritten whenever Position moves |
| Checker | blind verifier: deterministic checks first, then exists β substantive β wired; runtime proof lands in evidence/ and VERIFICATION.md cites it by path; evidence only counts against a fresh build serving HEAD |
| Budgets | 3-strike fix breaker, 3-cycle gap-flywheel cap (counter on disk), quick-task ratchet |
| Human checkpoint | Rule 4 deviations, human_needed flags, ship gate |
| Ratchet | pitfalls promote to permanent check entries the verifier runs on every pass β each a POSIX-sh command with an exact expect, mechanically MATCH / MISMATCH / BROKEN; learnings travel forward too, delivered as keys in every worker's spawn digest |
And this is how the actors sit β the "plans are prompts" story, drawn:
graph TB
P["π PLAN-01.md<br/>(a prompt, not a doc)"]
O["π― Orchestrator<br/>routes, never implements"]
W["π¨ Fresh worker<br/>executes the plan verbatim"]
V["π΅οΈ Blind verifier<br/>told nothing of what workers claimed"]
D[("π§ͺ .potion/ on disk<br/>the only memory")]
O -->|"spawns with a pointer"| W
P -->|"read first, executed verbatim"| W
W -->|"atomic commits + SUMMARY"| D
O -->|"spawns blind"| V
V -->|"exists β substantive β wired"| D
D -->|"progress = artifacts, never a status field"| O
Built with itself: this repo's
.potion/is a real Potion project β the loop above brewed every release. Then the mischief audit (.potion/phases/09-mischief/) red-teamed the verifier itself: five classed defects seeded behind a sealed answer key β stub, wired-but-wrong, phantom commit, orphaned artifact, missing artifact. Caught 5/5, and it flagged the fabricated "verified live" claims unprompted.
The Operator Test governs everything: if the agent cannot prove it is done, you are not engineering a loop β you are automating drift.
Every pass verdict harvests what the phase taught into an append-only journal β and the knowledge keeps working after it's written:
- Journal β
.potion/learnings.jsonl: append-only, newest-wins by key, never hand-edited. Ground truth. - Cross-repo promotion β entries that clear the bar (confidence β₯ 8,
generalizable, born inside the verified loop) promote to
~/.claude/potion/knowledge.jsonl. What one repo learns, every repo knows. External text never crosses the boundary β only loop-born entries do. - Distillation pages β journals distill into readable pages
(
.potion/knowledge/), each claim citing the journal entry it came from. Pages are a regenerable cache: when page and journal disagree, the journal wins and the page gets rebuilt. - Lint β four hunts (contradictions, stale claims, orphans, coverage gaps) keep journal and pages honest. The safety line: cache fixes are automatic, truth changes are human-gated. Always.
Planners grep both journals into plans; workers get matching entry keys in
their spawn digest. Pitfalls with teeth promote to permanent check entries
the verifier runs on every pass.
Repo layout β what ships in the plugin
potion/
βββ core/CORE.md # shared contract: voice, questions, evidence, statuses
βββ skills/ # init, discuss, plan, execute, verify, ship, brew,
β # pause, resume, learn, investigate
βββ agents/ # potion-worker (executor), potion-verifier (auditor)
βββ hooks/ # session-start: restores position + surfaces learnings
βββ templates/ # PROJECT.md, STATE.md, PLAN.md, SUMMARY.md,
β # VERIFICATION.md, continue-here.md
βββ PHILOSOPHY.md
State lives in your repo at .potion/:
The .potion/ state tree β every file, one line each
.potion/
βββ PROJECT.md # goals, locked decisions, out-of-scope (with why)
βββ STATE.md # <60-line digest: position, recent decisions, resume point
βββ learnings.jsonl # append-only insights, newest-wins
βββ knowledge/ # distilled pages β regenerable cache over the journal
βββ continue-here.md # transient pause file (deleted on resume)
βββ phases/NN-slug/
βββ DISCUSSION.md # Decisions / Claude's Discretion / Deferred
βββ PLAN-NN.md # the prompt an executor runs verbatim
βββ SUMMARY-NN.md # existence of this file = plan complete
βββ VERIFICATION.md # ladder results + structured gaps
βββ evidence/ # runtime proof artifacts, referenced by path from VERIFICATION.md
# from GitHub (Claude Code)
/plugin marketplace add Ian-Louw/potion
/plugin install potion@potionAlternative: clone the repo and run claude --plugin-dir path/to/potion for a
zero-setup trial. Either way, install the whole plugin β do NOT copy skills/
alone into a skills directory: the shared contract in core/, the templates/,
hooks/, and agents/ are load-bearing and only load through the plugin system.
Only runtime dependency: node on PATH (for the session-start hook).
Standing on the shoulders of GSD, Superpowers, and gstack. Potion is a distillation, not a replacement β if you want more machinery, those projects have it.
MIT licensed. Brewed with Claude Code.