ALCHEMY — your self-orchestrating software engineering team
Give /alchemy (Claude Code) or $alchemy (Codex) an objective. It still decides which engineering questions the change must answer. It now also decides who answers them: one agent, or a team it composes and launches itself. You never assemble a team, and you keep the merge.
Routing
- A second decision after dispatch:
Execution: single-agent | multi-agent.SKIP,DIRECT,ADAPTIVEandFULLmean what they meant.SKIPandDIRECTalways stay single-agent and never load orchestration.
- When it goes multi-agent: only when the work has independent parts with disjoint files, or a high-risk change needs a reviewer who did not write it. The number of gates or skills on the route is never a reason.
- Opting out:
execution.multi_agent: offinalchemy-workspace.jsonkeeps every run single-agent. A runtime that cannot launch agents falls back to single-agent and says so.
New skill: alchemy-orchestrate
- Agents are composed from capabilities, not a fixed roster. Capabilities (architecture, engineering, verification, security, optimization, scientific validation) come from the route's skills via
skill-contracts.json. Each agent loads only the skills its package needs. - Plans are checked before anything runs. Owned work packages are scheduled in dependency waves, and
check_orchestration.py planrejects:- write conflicts;
- consumers that don't wait for their contract;
- self-review;
- nested delegation;
- caps above the profile;
- merge or deploy permissions;
- auto-merge.
- Hand-offs are claims, not facts.
check_orchestration.py handoffrejects:- summaries contradicted by the hand-off's own evidence or by workspace digests;
- changes outside the write set;
- stale context;
- credentials;
- embedded instructions such as "skip the review".
- The gate needs evidence.
check_orchestration.py gaterequires every criterion verified by its assigned check at the clean committed head, or deferred by the human. It also requires:- no open blocking finding;
- disputes settled on evidence, never by vote;
- evidence on both sides goes to the human;
- bounded rework.
- The checker is tested: 49 check codes, each exercised by one of 99 adversarial cases.
Runtime adapters
init_workspace.py --runtime claude-code|codex|unstoppable|all renders every runtime from one profile and never overwrites your files.
- Claude Code:
alchemy-implementer(own git worktree) andalchemy-analyst(read-only) agents; delegation depth 1; concurrency cap; bounded background wait; ask and deny rules for push, PR, merge and force-push. - Codex: the same two custom agents and the concurrency cap. Read-only and depth limits are enforced by instruction plus the hand-off check.
- Unstoppable:
- an
alchemy-multi-agentpipeline: plan, plan check, human approval, native sub-agents, cross-provider review, gate, human approval, PR; - two project actions;
- an independent review track for the bundled Code Review pipeline.
- an
Documentation
ALCHEMY-MULTI-AGENT.md: the normative specification. Each rule names the check that enforces it, or is marked judgment.- README retitled, with a new section on how the team is formed, setup, what you approve, how to inspect a run, runtime support and measured runs.
Verified by real runs (.pilot/results/)
| Behavior | Claude Code | Codex |
|---|---|---|
| Trivial task stays single-agent | 0 agents, $0.34 | — |
| Chooses multi-agent unprompted | yes | yes |
| Launches real agents that load their skills | yes | yes, depth-1 sub-agent in saved sessions |
| Parallel implementers, then a dependent verifier | yes | — |
| Independent review drives a bounded correction | 2 major findings, 2 rework cycles, gate PASS | defect found, fixed, re-verified |
| Agent crash recovered by one retry | yes | — |
| Gate refuses unresolved findings | FAIL, escalated to the human | — |
Audit pilot, same objective, one run per arm:
| Arm | Seeded defects fixed | Cost |
|---|---|---|
| Single-agent baseline | 9/10 | $5.42 |
| Multi-agent | 10/10 | $10.46 |
That is one fixture and one run per arm. Treat it as a behavior check, not a benchmark, and keep multi-agent where your own baseline shows it pays.
Not yet verified
- Unstoppable: no pipeline run has completed review, gate and PR. Runs planned, passed the plan check and launched agents. When they could not finish, they stopped with
BLOCKEDorESCALATErather than claiming success. - Codex: parallel implementers and agent-failure recovery have not been run.
- Not exercised: cross-repository work.
Issues #18, #19 and #20 stay open for these.
Upgrade
Re-run your installer, then:
python .agents/skills/alchemy-orchestrate/scripts/init_workspace.py --runtime claude-code # or codex, unstoppable, allExisting single-agent use needs no change.