{"slug": "bean-a-portable-convergence-gate-for-agent-work", "title": "Bean – a portable convergence gate for agent work", "summary": "Bean, a portable convergence gate for AI agents, ensures tasks are not marked complete until claims are verified, conflicts resolved, and open questions named as residuals. It replaces phase-based workflows with a loop that compiles evidence and blocks agent termination until convergence is scored. The tool ships as small static binaries with a native Stop hook for Claude Code and Codex.", "body_md": "**A portable convergence gate for agent work — for Claude Code and Codex.**\n\nbean keeps an agent from declaring a task **\"done\"** until its claims are verified, its conflicts are resolved, or its open questions are named as honest residuals. It records what the agent learns as a typed claim ledger, runs a compiler that scores whether the work has actually converged, and — installed as a runtime — blocks the agent from stopping until it has.\n\nbean replaces \"do these N phases\" with \"keep going until there's nothing decisive left to learn.\" Each round the agent:\n\n**Investigates the most decisive open question** the compiler flags — an unresolved conflict, a weakly-evidenced claim, a coverage gap.**Records what it learns** as typed claims at honest evidence tiers (`stated`\n\n→`web`\n\n→`documented`\n\n→`tested`\n\n→`production`\n\n), in a ledger that persists across rounds.**Compiles**— a check that can*fail*for the whole task: conflicts, gaps, weak evidence, undischarged risks.**Revises beliefs**— when new evidence overturns a claim, it supersedes it instead of leaving the contradiction standing.\n\nThe loop ends only when there are no unresolved conflicts, every load-bearing claim meets its evidence bar, and a full round turns up nothing new — or an open question is named as a genuine residual. bean stops on **scored evidence**, not on the agent's say-so.\n\n| Step | What happens |\n|---|---|\nFrame (once) |\nState the goal; seed the ledger with known constraints. Does it earn the loop? |\n1. Survey |\nRe-assess what's available this round — tools, sub-agents, data sources. |\n2. Investigate |\nAttack the most decisive open question the compiler flagged. |\n3. Record |\nWrite findings as typed claims at honest evidence tiers into the ledger. |\n4. Compile |\nScore convergence; optionally gate load-bearing claims on a real verifier. |\n5. Revise beliefs |\nSupersede claims new evidence overturns; resolve conflicts. |\n6. Converged? |\nNo conflicts + evidence bar met + a dry round → deliver. Otherwise, loop again. |\n\n**Plugin-only (advisory).** The`/bean`\n\nskill gives the agent the convergence loop as guidance.**Installed runtime (enforced).**`./install.sh`\n\nbuilds the binaries and registers a native Stop hook, so`bean-check`\n\nbecomes a hard gate: the agent cannot finish a bean-tracked task until the ledger converges or names its residuals.\n\nbean ships as small static binaries (no runtime dependencies) plus the `/bean`\n\nskill and the native hook.\n\n**From source** (needs [Rust](https://rustup.rs)):\n\n```\ngit clone https://github.com/grainulation/bean.git\ncd bean && ./install.sh\n```\n\nThis builds the runtime, installs the `/bean`\n\nskill, and registers the Stop hook for Claude Code and Codex.\n\n**Prebuilt binaries** (no Rust): download the tarball for your platform from the [latest release](https://github.com/grainulation/bean/releases) and put the binaries on your `PATH`\n\n.\n\n```\n/bean <your task>\n/bean quiet <your task>   # terse — failures still surfaced\n```\n\nbean engages when a task is worth the loop — \"do this thoroughly,\" or work that spans multiple files, sources, or sessions — and stays out of the way for a trivial one-pass task. See [ EXAMPLE.md](/grainulation/bean/blob/main/EXAMPLE.md) for a worked before/after.\n\nFive self-contained binaries, no install dependency:\n\n— the compiler and gate. Reads`bean-check`\n\n`.bean/claims.json`\n\n(and optional`.bean/run.json`\n\n) and exits nonzero until the loop converges: conflicts, undischarged risks, below-bar load-bearing claims, a dry round, the round budget, and the optional verifier gate. Emits a deterministic certificate.— runs a declared verifier (a command, with the claim on stdin) and records a scrubbed verdict for`bean-verify`\n\n`bean-check`\n\nto adjudicate.— the driver: injects the compiler's signal into the agent each round, records what it emits, enforces forward progress, and writes a per-run trace to`bean-run`\n\n`.bean/runs/<run_id>.json`\n\n. Works with any agent command.— the native Stop hook for Claude Code and Codex; blocks the agent from finishing until the loop converges, and is inert when a project has no`bean-hook`\n\n`.bean/`\n\nledger.— a read-only trace analyzer: reads`bean-lessons`\n\n`.bean/runs/*.json`\n\nand writes a ranked report of recurring failure patterns to`.bean/lessons.json`\n\n. Deterministic; it proposes, never applies.\n\nA load-bearing claim can require an external verifier — your test suite, a type check, a state assertion — instead of trusting a self-asserted evidence tier. Set the mode in `.bean/run.json`\n\n→ `verification.mode`\n\n:\n\n`compat`\n\n(default) — no verifier required.`advisory`\n\n— warn on an unverified load-bearing claim.`strict`\n\n— require a passing verifier or a named residual.\n\nSee [ skills/bean/references/oracle-gate.md](/grainulation/bean/blob/main/skills/bean/references/oracle-gate.md).\n\nThe gate is a self-contained binary, so the same core runs in more than one place:\n\n**Claude Code and Codex**— as a native Stop hook (the`/bean`\n\nskill plus`bean-hook`\n\n).**Any agent loop or CI pipeline**— call`bean-check`\n\n/`bean-verify`\n\nas a verification step that blocks \"done\" until the ledger converges.\n\nbean works standalone with local files and binaries — no network, no service, no account.\n\n**Not an agent framework.** It rides*inside*an agent loop as the verification layer; it complements an agent framework, it doesn't replace one.**Not an accuracy booster.** It doesn't make a model smarter. It reduces*silent false completion*— turning \"confidently wrong and done\" into verified, fixed, or honestly blocked.\n\n**Lean.** Static binaries, zero runtime dependencies, no network by default, no telemetry.**A real gate.**`bean-check`\n\nmakes convergence falsifiable; the verifier gate makes it*external*— auditable verification, not a self-graded checkmark.**Coupled, not advisory.** With the runtime installed, the native hook means the discipline can't be silently skipped.**Discipline, not a transplant.** bean shapes the procedure an agent follows; it doesn't raise the model's ceiling. A weak model with bean converges on its answer more honestly, not more brilliantly.\n\nSee [ CONTRIBUTING.md](/grainulation/bean/blob/main/CONTRIBUTING.md). Run\n\n`npm test`\n\nand `node test/conformance.mjs`\n\nbefore a PR.[MIT](/grainulation/bean/blob/main/LICENSE) © grainulation contributors.", "url": "https://wpnews.pro/news/bean-a-portable-convergence-gate-for-agent-work", "canonical_source": "https://github.com/grainulation/bean/", "published_at": "2026-06-21 23:49:21+00:00", "updated_at": "2026-06-21 23:55:38.011774+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-safety"], "entities": ["Bean", "Claude Code", "Codex", "grainulation", "Rust"], "alternates": {"html": "https://wpnews.pro/news/bean-a-portable-convergence-gate-for-agent-work", "markdown": "https://wpnews.pro/news/bean-a-portable-convergence-gate-for-agent-work.md", "text": "https://wpnews.pro/news/bean-a-portable-convergence-gate-for-agent-work.txt", "jsonld": "https://wpnews.pro/news/bean-a-portable-convergence-gate-for-agent-work.jsonld"}}