Skip to content

v0.99.0 — research before design, coder tiers, lettered decision requests, required instruction review

Choose a tag to compare

@dsifry dsifry released this 01 Dec 14:18
a375744

Highlights: research before design (a codebase-researcher, one or two deep-researcher arms, then a citation check and a context check on every report before the findings reach a design); coder tiers (mechanical-coder, coder, supercoder) with a fresh coder for every fix round; one lettered format for every decision request (reply 1 A 2 C); and a required instruction review in every /self-reflect, before the PR.

Why 0.99: this is the last release planned before 1.0. 1.0 waits for host-native per-role models on Codex, Gemini, OpenCode and Cursor (#56) and per-role reasoning effort (#121).

Update: claude plugin marketplace update metaswarm-marketplace && claude plugin update metaswarm@metaswarm-marketplace, then restart Claude Code. Then see Upgrading below: regenerate the phase agents with /update, and rename roles.researcher to roles.codebase-researcher.

Added

  • The instruction review is a required step of every /self-reflect run. commands/self-reflect.md gains numbered Step 7 (Instruction Review, REQUIRED, never skipped; the report is now Step 8, the commit Step 9, and Phase C config reflection is no longer optional). It (a) proposes an "Instruction changes proposed" list covering the project's CLAUDE.md, agent and skill prompts, and metaswarm itself (an issue or PR on dsifry/metaswarm is offered, never filed automatically; the list may say "none, because ..."), (b) asks the user as one decision request (items 1, 2, 3, options A, B, C, with a default), and (c) commits the approved project-instruction edits with the knowledge-base updates so they land in the same PR, recording rejected items as rejected. Orchestrated execution's pre-PR capture (section 8.5 and its checklist), guides/workflow-enforcement.md ("Instruction review (required)"), the CLAUDE, GEMINI and -append templates, /start-task, the /pr-shepherd fallback note, the README and USAGE all say the step is required. tests/commands/test-instruction-review.sh checks the step, its order and every place that describes it.

  • Three coder tiers with one selection rubric in guides/coder-selection.md. mechanical-coder (haiku) is for small, fully specified, behaviour-preserving edits and stops with "needs coder" when the brief needs a design decision or a production behaviour change. coder (sonnet) stays the default. supercoder (opus) is for particularly hard work units: security boundaries, concurrency or locking, crypto or auth, cross-component protocols, fix-induced (C3) or twice-repeated review blockers, repeated VALIDATE failures, or a coder that reported BLOCKED. When unsure, use coder; never step down within a round. The agent count is now 27.

  • roles.mechanical-coder and roles.supercoder in .metaswarm/models.yaml (and the shipped template), with Claude, Codex and Gemini models. The setup scripts and metaswarm-agents.sh generate and resolve both roles.

  • debugger agent (fable) for root-cause investigation of tricky bugs: recurring defects (C4), flaky or racy failures, integrated-only failures, cross-component failures, and a coder stuck on "can't find why". It is read-only on the repo, writes only to a scratch directory, and returns the root cause with evidence, the bug class, a structural test and a complete fix design for a coder. It never implements the fix. Fable costs 2x Opus per token, so each run gets one narrow question. The selection rubric has a debugger section.

  • Type E to have the agent explain what is waiting on you. Agents end turns with a WAITING-ON: line, human items first and prefixed YOU: (guides/waiting-on.md). A new UserPromptSubmit hook (hooks/explain-waiting.sh) recognises a prompt of exactly E or e and tells the agent to explain the next YOU: item (what, why, numbered choices or the exact command, what happens if you do nothing), one per press. Any other prompt is untouched.

  • Process changes from the soak (2026-11-21). (1) Coder hand-back checklist: the brief lists the exact gate commands for the files in scope, including registration gates (lint allow-lists, service inventories, CI gate tables); coders run all of them and paste the raw last lines; "passes" without pasted output is not a hand-back (coder, supercoder, mechanical-coder and the spawn template). (2) The adversarial rubric and reviewer template require two checks: sibling paths (replay or recovery after restart, resume, retry, rollback, restore) and production wiring (tests use production constants, not a hand-built config). (3) Blocker graph before any date: the orchestrator walks the transitive open dependencies, lists unwired placeholders and sums estimates before giving a milestone date. (4) guides/coder-selection.md gains a fixed spawn log (ts, wu, round, role, model, tokens, outcome, claim_matched) and the head-to-head method for comparing models.

  • security-coder tier (fable) for security-critical work units: trust boundaries, keys and signatures, tokens and secrets, auth and permissions, isolation, and security fixes. It takes precedence over supercoder, has a roles.security-coder entry in .metaswarm/models.yaml, and escalation of a security-critical work unit goes to it. If Fable is unavailable the orchestrator uses supercoder and logs the substitution.

  • Security implementation rubric (rubrics/security-implementation-rubric.md, sections S1-S8): the reviewer brief for a security-critical work unit names it, and the review appends the S1-S8 verdict block. The adversarial rubric points to it.

  • Research roles: codebase-researcher, deep-researcher and citation-checker. researcher is renamed codebase-researcher (sonnet; a brief may ask for haiku for a narrow lookup): read-only code facts with file:line citations. The new deep-researcher (fable, read-only, web search and fetch) researches designs of user-facing features, new major capabilities and other high-stakes work, using rubrics/deep-research-rubric.md: Product, Design and Capability lenses chosen by the brief, and five mandatory parts for every brief (a session-history search of past transcripts, memory, BEADS, the knowledge base and specs, with a python3 -I recipe; web research with dated links; numbered assumptions and open questions with suggested defaults; a size estimate anchored to past work; "challenge the brief" with an attribution self-check), plus a scoring checklist. The new citation-checker (haiku, read-only) opens every citation in a research report and returns MATCH, NEAR, WRONG, COUNT or UNREACHABLE; the orchestrator runs it after any research report whose findings feed a design, plan or decision, and applies the corrections first. It cannot catch a contextually wrong attribution, which stays in the deep-research self-check. guides/research-selection.md says which role to use, with the 2026-11-23 evidence (Opus vs Fable on design research, Sonnet vs Haiku on codebase research, the citation checker against a blind judge). Brainstorming a user-facing feature or new major capability, and the issue orchestrator's research phase for one, now spawn a deep-researcher alongside a codebase-researcher before options are presented. .metaswarm/models.yaml gains roles.codebase-researcher, roles.deep-researcher, roles.deep-researcher-second and roles.citation-checker. The agent count is now 31 (including the deprecated alias), and there are 12 rubrics.

  • Dual-arm deep research by default. For designs that matter, two deep researchers run the same brief in parallel, deep-researcher (fable) and the new deep-researcher-second (opus, its own role type so its model is set in models.yaml like every other role), and the orchestrator merges them. The founder's rationale: getting the facts right in design research is critical, and the two arms were complementary in a blind test. A single arm (fable) remains the option for small or low-stakes designs.

  • Context check of research reports. After the citation check, the orchestrator runs a codebase-researcher in its new context check mode: for each MATCH or NEAR citation it reads the surrounding section and flags SCOPE, ACTOR, TENSE or STRENGTH errors, load-bearing claims first. For a plan or spec line that describes code, it must find and follow the actual code path (entry point, then each fallback) before accepting it. Pipeline: researcher(s) → citation check → context check → apply corrections → design. It is a mode, not a role, because it needs the same model, tools and skill as codebase-researcher. The guide records the live test (47 claims, all 3 judge-found context errors caught, about 20 more found, one TENSE miss as the worked example).

  • Open-ended requirements get a pass bar before the first review (guides/delivery-scope.md): what the artifact claims to cover, a failing case inside the claim blocks, a case outside it is a follow-up. guides/testing-patterns.md adds: build credential-shaped fixture strings at run time, because a literal in a live-key shape is rejected by the host's secret scanner on push.

  • Research pipeline fixes from the second PR #119 review. The context check now covers COUNT rows and the UNREACHABLE rows the orchestrator resolved itself, so those rows no longer reach a plan with only the citation check. Counts are recounted in the unit the claim uses (call sites, not matching lines). The legacy roles.researcher key is read for the codex and gemini values too. The rosters in agents/issue-orchestrator.md, guides/agent-coordination.md and guides/workflow-enforcement.md use the guide's full selection rule (a design that matters, both arms, one arm for a small design). guides/research-selection.md is bundled into the plan-review-gate skill. The architect is told that corrected findings come only from the orchestrator's prompt. The researcher's examples and the spawn example in skills/start/SKILL.md use no pipes and show both arms with every report checked. A corrected WRONG citation is context-checked too. A point sent back to the researcher goes through both checks again. The pass-bar rule for open-ended requirements states that it does not excuse a regression.

  • Research pipeline changes from the first live run (2026-11-24) and the PR #119 review. (1) citation-checker gains an UNREACHABLE verdict: a source it could not read (a directory outside the session's readable ones, a private URL, a refused command) is no longer reported as WRONG. The orchestrator grants access and re-runs those rows, or checks them itself; the brief names every directory the report cites outside the repo (--add-dir in a headless run). In the live run 4 of 35 citations were marked WRONG only because their logs were unreadable, and all four held. (2) The checker and the context check use one plain command per Bash call: compound commands are refused in an unattended session (13 of 44 and 5 of 73 tool calls in the live run). (3) The session-history recipe in rubrics/deep-research-rubric.md masks before it prints, as best effort and not as a guarantee (the rubric lists known gaps and forbids repeating anything credential-like that still shows): key and token shapes, authorization headers (the scheme and the one value after it), the user part of a URL, the value after any name that contains secret, password, token, credential, key, auth, cookie or session anywhere in it (STRIPE_SECRET_KEY=, accessToken, PGPASSWORD) or that has pass, pw, sig or dsn as a whole part (SMTP_PASS=), -p<value> after a mysql or mariadb command (elsewhere only when the value has a digit or a capital letter), .netrc login … password … entries, and any long unbroken string mixing upper case, lower case and digits. Its patterns are length-bounded, so the time grows linearly with the line (measured: megabyte-sized prose, base64 and stack-trace lines take seconds; an unbroken megabyte made only of secret words takes about a minute). It keeps the name, skips the output of the user's shell commands and the compaction summaries the model wrote, prints the text around the match instead of the first 600 characters, and uses no pipe or shell variable. (4) In Team Mode, research reports go to the orchestrator, which runs both checks and sends only the corrected findings to the architect; the old direct researcher-to-architect handoff is removed from agents/issue-orchestrator.md and guides/agent-coordination.md. (5) guides/research-selection.md is now also bundled into the orchestrated-execution, design-review-gate and pr-shepherd skills, whose guides link to it, and a test checks every relative link in every guide copy. (6) Root-cause work is routed to debugger, and a root-cause report that feeds a decision gets the same citation and context checks. (7) The orchestrator's citation-check and context-check briefs name the UNREACHABLE verdict and the readable directories, and codebase-researcher hands its report to the orchestrator, never to the architect. (8) guides/research-selection.md gains an "Other hosts" section: that roles run on the host's default model outside Claude Code and what the codex and gemini values are for, that dual-arm research needs two different models, what a model router changes, and that the transcript recipe is Claude Code only. The Task Mode spawn example in skills/start/SKILL.md now runs both checks and gives the planner the corrected findings.

Deprecated

  • researcher: Deprecated alias for codebase-researcher, for one release. agents/researcher.md is a thin pointer with the same model and tools, role type resolution maps researcher to codebase-researcher, metaswarm-agents.sh still generates it, and roles.researcher in .metaswarm/models.yaml is still read (it sets the codebase-researcher model when roles.codebase-researcher is not set). Spawn sites now name codebase-researcher. An agent spawned under the old name starts its report with a DEPRECATED: line naming the two renames (the spawn and the roles.researcher key), so remaining uses are seen before the alias is removed in the release after this one.

Changed

  • One decision-request format for every ask to the user. guides/delivery-scope.md gains a "Decision requests" section, the only definition. The questions or items are numbered 1, 2, 3 and the options inside each are lettered A, B, C, so the user replies 1 A 2 C instead of "1. 1 2 1 3 3" (the founder's rule, 11-27). Each option is its own block, lettered everywhere (the Option X headings, the reply instruction, and options relayed from reviewers or coders; never numbers for options): one line on what it does, Pros, Cons, and Why recommended on the recommended option only, which is listed first as Option A (tied to the user's goals or constraints). Each request ends with "Reply with a letter" (or "1 A 2 C" for several questions) and an "If there's no answer" default. The Clarification report (one Question N per ask) and the escalation reports (guide, plan and design gates, orchestrated execution, the VALIDATE escalation) use these option blocks, and the finding contract's optional options field is numbered. The execution-method menu is three option blocks with pros and cons and a Why recommended on one, and the user still chooses; the /pr-shepherd templates follow the same shape. The issue orchestrator, /start-task, /pr-shepherd, /review-design, the gate, setup, migrate, create-issue and PR-comment skills, the specialist agents' escalations, and the templates/ CLAUDE, AGENTS and GEMINI files (and -append variants, which reach user projects) point at the definition instead of restating it. Fact-only questions (a repo URL, a name, the language) are exempt. tests/agents/test-decision-requests.sh checks that the definition exists once with the option-block shape and the numbering rule, that every decision-ask site references it (a scan fails on any unlisted file), that the templates match the shape, that no numbered-option or old Choices/Recommended/Rationale layout remains, and, with negative fixtures, that a missing Why recommended, Pros, Cons, reply line or no-answer default, numbered options, or a Why recommended on a non-recommended option fails.
  • At C4, the recommended answer is to close the whole class. When one theme recurs across three rounds, guides/delivery-scope.md now offers "close the whole class" as the recommended option in the Clarification report (unless the theme rests on a requirement choice, which asks C1's question first). The next fix brief names the class, lists every instance seen so far, requires a structural test that fails for any member of the class (with a negative test), and requires the coder to hunt for further members and report every source it checked. Two recurrences alone do not trigger this. skills/orchestrated-execution/SKILL.md adds this to the fix-brief checklist. Evidence: in one work unit, rounds 3, 4 and 5 each failed on a different instance of "the tool depends on a command that does not exist as written"; at C4 the user chose to close the whole class in one round.
  • Reviews ask the user as soon as a blocker rests on a requirement choice, instead of waiting for C4 to see the theme three times. guides/delivery-scope.md defines a requirement choice once (a fix that needs a choice between acceptable behaviours, levels or trade-offs that the requirement, DoD, design and Confirmed answers do not settle) and every needs_user definition copy now points at it. The orchestrator classifies each blocker against the definition before it runs the helper, sets needs_user: yes, origin: requirement and classifiedBy: orchestrator even when the reviewer said no, and C1 fires that same round. lib/review-rule.js accepts and validates classifiedBy. The Clarification report's questions now give each option with pros and cons and a recommended option with a reason. Planners and coders STOP and report an unsettled requirement choice as options with pros/cons and a recommendation instead of picking silently. Questions still never block independent work. Evidence: in one plan gate a "how much proof" blocker was tagged needs_user: no, recurred in rounds 3 to 5, and cost about 3 extra rounds before C4 asked the user, who answered in one line.
  • Coder escalation re-spawns supercoder instead of coder with a per-call model override, so there is one definition of the Opus coder. escalation.coder.after_failures is unchanged. escalation.coder.claude still works: it is the supercoder Claude model when roles.supercoder.claude is not set (roles.supercoder.claude wins when both are set).
  • Each review-fix round spawns a fresh coder of the chosen tier with a complete fix brief (work-unit contract as file pointers, start SHA, blocker findings verbatim with the fix design, minors, validation commands). A coder is never resumed for a new round, except to message an old agent to resend a lost report. This replaces the Team Mode note that a coder may be a persistent teammate.
  • Fix handoffs always go to a fresh coder. Team Mode no longer treats the coder as persistent, and pr-shepherd and handling-pr-comments spawn a fresh coder of the right tier with a fix brief (comment verbatim with file:line, PR head SHA, contract pointers, validation commands) instead of asking the PR's original coder. A new test rejects any doc that says a coder retains context.

Upgrading

  • Regenerate the phase agents. Projects that generated them (.claude/agents/metaswarm-*.md, from /setup or metaswarm-agents.sh generate) must run /update to get the new roles (in Claude Code the plugin's bin/ is on PATH, so metaswarm-agents.sh generate does the same): codebase-researcher, deep-researcher, deep-researcher-second, citation-checker and the coder tiers. Role type resolution uses the local copies first; a role with no local copy falls back to the plugin default.
  • Rename roles.researcher to roles.codebase-researcher in .metaswarm/models.yaml, and rename any spawn of researcher in your own prompts. The old name works in this release and is removed in the next one (#124).
  • Update the instruction file by hand. /setup skips instruction files (CLAUDE.md, AGENTS.md, GEMINI.md) that already have a metaswarm section, and /update does not rewrite them. Copy these from the new templates (templates/CLAUDE.md, templates/AGENTS.md and templates/GEMINI.md in the metaswarm plugin):
    1. CLAUDE.md only: "Execution Method Choice", where the menu is now a decision request with lettered options.
    2. "Delivery Scope & Review Iteration": the new "Asking the user" bullet.
    3. "Before Finishing a Development Branch" and "Pre-PR Knowledge Capture": the instruction review in /self-reflect is required. AGENTS.md gains both sections.
    4. The workflow paragraph that describes research before a design (deep researcher, codebase researcher, citation check).