A recursive convergence loop for large tasks.
A skill for Claude Code and Codex that runs a task the way the Fable model worked: investigate, record what you learn as evidence, let a compiler tell you what's still weak or contradictory, revise the beliefs that don't hold, and loop until the answer converges β then deliver.
bean replaces "do these N phases" with "keep going until there's nothing decisive left to learn." It runs on a runtime β a claim ledger plus a compiler that scores convergence β and uses that signal to decide its own next move.
Investigate the most decisive open frontβ the compiler's signal (unresolved conflict, weakest-evidence claim, coverage gap) picks the target, not a fixed plan.** Record evidence in a ledger**β typed claims at honest evidence tiers (stated
βproduction
). The ledger is bean's memory across rounds β its "own notes."Compileβ a check that can fail at the whole-task level: conflicts, gaps, single-source topics, weak evidence, and undischarged risks.Revise beliefsβ when new evidence overturns an earlier claim, supersede it ("kill the incorrect belief") rather than letting the contradiction stand.Loop until convergedβ stop when there are no unresolved conflicts, the evidence bar is met, and a full round adds nothing new. High-stakes work gets an independent cross-modelCodex blindspot check before declaring done.Continuous orchestrationβ every round re-surveys the available skills/connectors and spins up subagents for whatever the compiler flagged next.** Verbose by default**β each round surfaces the ledger, the compiler signal, the next move, and any belief it revised, so you can watch the answer converge.
Step 1 β Add the marketplace (one-time):
claude plugin marketplace add https://github.com/grainulation/bean.git
Step 2 β Install:
claude plugin install bean
Inside Claude Code, use
/plugin
instead ofclaude plugin
.
Requirements: Claude Code with Node.js >= 20.
Pinning & updates.bean installs into your agent's context, so treat it like any third-party plugin: prefer a tagged release over a moving branch (pin a--ref
, e.g.--ref v1.1.2
) and re-review on update. bean runs locally with no network surface by default; the only optional outbound path is the grainulator/wheat remote dashboard, which stays off unless you wire it in.
Codex
codex plugin marketplace add grainulation/bean --ref main
codex plugin add bean@bean
On the Codex side bean is invoked explicitly as /bean
(allow_implicit_invocation: false
).
Alternative: clone directly
git clone https://github.com/grainulation/bean.git
cd bean && ./install.sh
/bean <your task>
/bean quiet <your task> # run every step, report tersely (failures still surfaced)
bean also triggers on phrases like "do this thoroughly", "be systematic", or "deep work mode", and when a task objectively spans multiple files, sources, or sessions. For a trivial one-pass task it stays out of the way. See EXAMPLE.md for a worked before/after.
Frame once, then iterate until the compiler signal goes green:
| Step | What happens |
|---|---|
| Frame (once) | |
| State the goal; seed the ledger with known constraints. Does the task earn the loop? |
- Survey | Re-assess available skills/subagents/connectors this round; read real data. |
- Investigate | Attack the most decisive open front the compiler flagged; fan out subagents. |
- Record | Write findings as typed claims at honest evidence tiers into the ledger. |
- Compile | Score convergence: conflicts, gaps, single-source, weak evidence, undischarged risks. |
- Revise beliefs | Supersede claims that new evidence overturns; resolve conflicts. |
- Converged? | No unresolved conflicts + evidence bar met + a dry round β deliver. Else loop to 1. |
bean runs on a claim ledger + a compiler. It ships its own compiler β bean-check β a zero-dependency Node CLI built from the
Brancore that scores convergence and
exits nonzero until it is reached(conflicts, undischarged risks, load-bearing claims below the evidence bar, dry-round, budget). That is the default control plane and runs anywhere Node does.
is an optional richer backend; where neither can run, bean falls back to a hand-checked
grainulator/wheatbean-stalk.md
ledger. With grainulator connected, bean also taps the wider stack,
degrading gracefully when a piece is absent:β the ledger + compiler; record claims and gate convergence onwheatwheat compile
.grainulatorβ dispatch autoresearch subagents for investigation rounds.** deepwiki**β corroborate external claims against real repositories.** silo + connectors**β the canonical read surface for grounding claims in real data.** farmer**β route the Codex blindspot review through the dashboard.
Details: skills/bean/references/grainulation.md.
Lean. Markdown, JSON, and one zero-dependency CLI (bean-check
). No servers, no network, no telemetry, no runtime dependencies (TypeScript is a CI-only devDependency).A real gate.bean-check
makes convergence falsifiable β it exits nonzero until the loop honestly converges; grainulator/wheat is an optional richer backend.Verbose by default. Show the ledger, the compiler signal, and the belief revisions β watch the answer converge.
See CONTRIBUTING.md. Run
npm run format
and npm test
before a PR.MIT Β© grainulation contributors.