Repository navigation
Five Phase Swarm Workflow
ignis-swarm structures complex feature delivery into 5 deterministic phases so parallel agents never collide on files, drift on interfaces, or degrade as context grows.
flowchart TD
P0["Phase 0: /plan (ignis-plan)\nDiscovery · YAGNI Gate · Frozen Contracts · Atomic Waves"]
H1["Handoff Step 1: /compact Preserve: ..."]
H2["Handoff Step 2: /swarm Execute the approved plan..."]
W0["Wave 0: Deletions & Shared Contracts"]
WN["Wave 1..N: Parallel Nuclear Workers\n(5-Field Brief · Exclusive Files · BDD+TDD)"]
V["Per-Task @verifier\n(Scope · Red->Green · Anti-Mock · Coverage)"]
CW{"Context Pressure?\n(compaction-watch.mjs)"}
P3["Phase 3: @doc-auditor\n(1-File ADRs/BDRs + INDEX.md + Opt-In Tracker Sync)"]
P4["Phase 4: 3-Lens Final Audit\n(blind-edge-hunter + @acceptance-auditor)"]
P5["Phase 5: Closure\n(Fix HIGH/MEDIUM · Summary · Post-Slice /compact)"]
P0 --> H1 --> H2 --> W0 --> WN --> V --> CW
CW -->|"Next wave"| WN
CW -->|"All waves PASS"| P3 --> P4 --> P5
Run on a High-Reasoning Planning model tier before spawning any workers.
-
Deterministic Discovery:
- Map callers, callees, and blast radius via targeted symbol search (and connected code-intelligence MCPs if available).
- If
onboarding.jsonhasmemtrace.enabled === true, query Memtrace for prior slice context/gotchas. - If
onboarding.jsonhastracker.kind !== "none", inspect the target epic/issues. - Read
docs/adr/INDEX.mdanddocs/bdr/INDEX.md(if present); open only individual decision files touching this slice.
-
Mandatory YAGNI & Subtract-Before-You-Add Gate:
- Subtract first: Dead code, redundant adapters, duplicate validators, or unused flags to delete/simplify before adding new code.
- Explicitly out of scope: Speculative abstractions and premature generalizations cut from the slice.
-
Freeze Interface Contracts:
- When 2+ parallel workers interact across modules, lock exact types, signatures, error variants, and payloads in the plan.
- Schedule a Wave 0 task to commit shared contracts/deletions first so parallel workers cannot drift.
-
Decompose into Non-Colliding Waves of Nuclear Tasks:
Each nuclear task covers 1 cohesive responsibility (1–3 files, 0 interface ambiguity) with:
-
Task / Issue ID (
T0.1,T1.1, or tracker ID) - Exclusive Files (no two workers in the same wave share a file)
- Model Tier (Standard Coding default, or Mechanical allowlist only)
-
BDD Criteria (1–3 observable
Given / When / Thenscenarios + edge cases) -
Audit Flags (
[ADR],[BDR], or[PLAYBOOK])
-
Task / Issue ID (
-
Mandatory 2-Step Post-
/planHandoff: Because Antigravity plugins cannot auto-trigger native slash commands, Phase 0 always ends with:-
Step 1: A complete, pre-filled
/compact Preserve: ...command populated with the real live slice state (never<placeholder>text). -
Step 2:
/swarm Execute the approved plan starting at Wave 0/1 using ignis-swarm.
-
Step 1: A complete, pre-filled
The /swarm Coordinator does not write production code itself — it dispatches waves, enforces contracts, tracks state, manages compaction checkpoints, and judges verification reports.
Every coding or mechanical worker brief posted to the /swarm board must contain:
- Task & Goal — Issue/Task ID + 1–2 crisp sentences defining the exact nuclear responsibility.
- Exclusive File Ownership & Frozen Contracts — Exact writable files, read-only frozen contract files/signatures, and explicit out-of-scope boundary.
-
Requirements (BDD + TDD) — Follow
ignis-tdd-bdd, targeted discovery,Given / When / Thencriteria, edge cases, Red → Green → Refactor, boundary-only mocking. -
Code & Documentation Constraints — Zero narrative inline comments;
[ADR]/[BDR]notes reported back for@doc-auditor. -
Done Gate & Board Report Format — Exact verification command + Board Report Contract:
-
Status:
PASS|ISSUES|BLOCKED - Evidence: exact commands + real outputs (including Red → Green proof)
- Observed coverage: factual % (if tests ran)
-
Issues / Decisions for
@doc-auditor:file:line+ minimal repro or bullet list
-
Status:
Shared builds: When 2+ workers in the same wave might compile/test concurrently or touch shared build artifacts, dispatch them with
workspace: "share"so each gets an isolated working copy sharing the underlying repo directory.
| Role | Capability Tier | Notes |
|---|---|---|
/plan (Phase 0) |
High-Reasoning Planning (pro) |
Single high-leverage pass to freeze contracts and enforce YAGNI |
/swarm Coordinator |
High-Reasoning Coordination | Wave orchestration, conflict resolution, escalation |
| Coding Workers (default) | Standard Coding Tier | All domain logic, BDD/TDD tests, error handling, refactors, concurrency, security |
| Mechanical Workers (strict allowlist) | Lightweight / Mechanical Tier |
Only zero-logic tasks: caller/import listing, mechanical renames specified in plan, pure DTO/fixture scaffolding, INDEX.md formatting, repetitive test runs |
Per-Task @verifier & @doc-auditor
|
Balanced Verification Tier | Fast, clean-context verification and ADR/BDR drafting |
@blind-edge-hunter & @acceptance-auditor
|
Independent Pro / High-Reasoning Tier | Unbiased final slice audit |
-
Mechanical worker gets logic
ISSUESfrom@verifier: Immediately re-run the task on the Standard Coding Tier. -
Coding worker fails the same verification gate 2x: Stop patching and trigger
attack-the-premise— write down the shared assumption, inspect at Coordinator tier, and fix the plan/contract before attempt #3.
Keeping Coordinator context lean preserves attention and prevents drift across long multi-wave slices.
Key Antigravity behavior:
/compactnever removesAGENTS.md/GEMINI.mdrules, skills, built-in tools, MCP servers, artifacts, or live subagents. Only preserve dynamic workflow state (issue IDs, completed SHAs, remaining tasks, frozen contracts, rejected approaches, pending ADR/BDR notes).
-
Post-
/plan(2-step handoff before/swarm) -
Pre-Phase 4 (after all coding waves +
@doc-auditor, before final 3-lens audit) -
Post-Slice / Post-PR Merge (before starting the next
/plan)
-
hooks/compaction-watch.mjs(PostInvocation) automatically measures active transcript bytes since the last compaction boundary. - Default threshold:
550 KB(configurable viacompaction.transcriptThresholdKbin~/.ignis-broker/onboarding.json), with a150 KBcooldown that resets automatically after a compaction boundary. - When alerted, the Coordinator pauses cleanly at a wave boundary (never mid-task) and emits a complete, pre-filled
/compact Preserve: ...command.
-
Phase 3 (
@doc-auditor): Writes 1 file per flagged[ADR]/[BDR], updatesINDEX.md(enforced bystop-gate.mjs), and mirrors/comments in your opt-in issue tracker if enabled. See TDD-BDD-and-Audit-Documentation. -
Phase 4 (3-Lens Final Audit): Runs
@blind-edge-hunter(strictly diff-only) and@acceptance-auditor(full plan/tracker/ADR access). See Blind-Review-and-Final-Audit. -
Phase 5 (Closure): Fixes proven
HIGH/MEDIUMfindings, re-verifies, presents a concise Audit Summary (waves, issues, ADRs/BDRs, observed coverage, verdict), and emits a pre-filled post-slice/compact Preserve: ...command.
ignis-swarm v1.0.0 · Repository · ADRs · Issues · MIT License
Getting Started
Engineering Workflow
Broker & Guardrails
Reference