Mission (Droid) + Workflow (Claude) + Swarm (Kimi) — mechanics extracted, UIs not copied — unified in alembic.plan.ts under Loop Engineering.
Blind planning Phase 1 requires three independent REs (RE-A Missions, RE-B Workflows, RE-C AgentSwarm). Phase 2 fuses them into Alembic verbs — not Frankenstein UIs.
Mission chord (Factory Droid): validation-contract before run; programmatic runner; one fresh session per unit; milestone validators; handoff JSON.
Workflow chord (Claude Code): deterministic alembic.plan.ts with phase(), agent(), parallel(); resume cache; no Date.now() in script body.
Swarm chord (Kimi CLI): prompt_template + items[]; ramp 5+700ms; exclusive-deny per turn; wire.jsonl per subagent.
Think of it like… three cover bands whose sheet music you transcribe — not their stage lighting. Alembic writes a new score (alembic.plan.ts) that can call all three movements in one performance.
RE-A → outputs/.../reverse/droid/ ≥500 lines · RE-B ≥800 lines · RE-C ≥700 lines. Each behavioral claim: binary string + disk path or brightdata scrape line.
| Primitive | Missions | Workflows | Swarm | Alembic |
|---|---|---|---|---|
| Atomic unit | Feature | agent() | items[] | Unit / task |
| Parallelism | Milestone validation | parallel() cap 16 | ramp 5+700ms | configurable |
| State | ~/.factory/missions/ | script + cache | wire.jsonl | ~/.alembic/runs/ |
| Sequence | ordered features | script defines | sequential swarms | slices + deps |
export const meta = { name: '...', phases: ['discover','build','prove'] } as const;
export async function run(h: AlembicHooks) {
await h.phase('discover', () => h.swarm({
promptTemplate: 'Audit {{item}} read-only',
items: ['api','ui','tests']
}));
if (await h.council({ board: 'tech-council', question: '...' }) === 'NO_GO') return;
await h.phase('build', () => h.mission({
units: [{ id: 'schema', proof: ['pnpm test'] }]
}));
await h.phase('prove', () => h.parallel([
() => h.agent({ profile: 'validator', prompt: '...' })
]));
}
Fusion rules R1–R10 (03-three-chords-spec.md)
R1 validation-contract before runner (Missions) R2 deterministic script body (Workflows) R3 swarm exclusive per turn (Kimi) R4 Council NO_GO → zero workers (Alembic core) R5 Validator ≠ builder (Loop Engineering)
~/.factory/missions/<uuid>/export const meta · phase(name, fn) · resumeFromRunId cache · cap 16 parallel · no Date.now() in body