Skip to content

Architecture Troubleshooting and FAQ

magalz edited this page Nov 26, 2026 · 1 revision

Architecture, Troubleshooting and FAQ


1. The 8 Core Engineering Principles (rules/AGENTS.md)

ignis-swarm enforces 8 concrete engineering principles (cited only when a principle changes a real decision):

  1. subtract-before-you-add — Remove dead weight and redundant layers before adding new code.
  2. laziness-protocol (YAGNI) — Build the smallest change satisfying the requirement; no speculative abstractions.
  3. prove-it-works — Verify the real artifact (tests, runtime output, diff), never "it compiles".
  4. fix-root-causes — Reproduce and trace to the origin before editing.
  5. test-behavior-not-implementation — Assert observable behavior; mock only external boundaries (network, clock, I/O).
  6. boundary-discipline — Validate at boundaries; trust internal types and keep core logic pure.
  7. attack-the-premise — After 2 failed attempts on the same gate, test the shared premise directly before fix #3.
  8. encode-lessons-in-structure — Turn repeated corrections into a lint, test, script, or hook — not prose.

2. Architecture Decision Records (ADRs)

All foundational decisions live in docs/adr/INDEX.md:

ID Decision Link
ADR-001 Zero-Dependency Node.js ESM Dual-Interface Broker Daemon ADR-001
ADR-002 Local-First Config Resolution with Automatic Global Fallback ADR-002
ADR-003 Per-Workspace Process Pooling and Cross-Platform Tree Cleanup ADR-003
ADR-004 Opt-In Onboarding and Deterministic Compaction Checkpoints ADR-004
ADR-005 Cross-Platform Headless Blind Review Runners ADR-005

3. Troubleshooting Playbook

Broker MCP bridge timed out or feels stale after updating the plugin

  • Cause: Antigravity kept an older mcp-bridge process in memory from before the plugin update.
  • Fix: Restart the ignis-swarm_broker MCP server (or reload Antigravity). You can also recycle the daemon cleanly from a terminal:
    node <plugin-root>/scripts/ignis-broker.mjs stop
    node <plugin-root>/scripts/ignis-broker.mjs status

Windows ENOENT when calling a stdio MCP server (e.g., npm-installed CLI)

  • Cause: The command isn't on PATH or wasn't resolvable via PATHEXT.
  • Fix: ignis-broker automatically resolves PATHEXT (.cmd/.bat/.exe) and unwraps Node/npm .cmd shims directly to process.execPath. Verify the binary is reachable in your shell (where <cmd> on Windows or which <cmd> on macOS/Linux), or specify its absolute path in ~/.ignis-broker/servers.json.

[ignis-broker Alert] Local config error detected ... Global fallback config is active

  • Cause: Your repository's .agents/ignis-broker.json has invalid JSON syntax.
  • Fix: Validate .agents/ignis-broker.json with a JSON linter. The broker automatically falls back to ~/.ignis-broker/servers.json so your workflow isn't blocked while you fix it.

Stop hook blocks turn exit with Unindexed decision file or detected ...

  • Cause: Either a new docs/adr/ADR-NNN-*.md / docs/bdr/BDR-NNN-*.md file was not added to INDEX.md, or your staged/unstaged git diff introduced a banned shortcut (.only(, .skip(, #[ignore], t.Skip, @ts-ignore, eslint-disable, bare // nolint, or TODO/FIXME).
  • Fix: Add the missing row to INDEX.md or remove the shortcut from your diff; the hook clears automatically on the next turn.

PreToolUse blocked a git command

  • Cause: hooks/pre-tool-use.mjs blocks --no-verify, force-push to main/master, git reset --hard, and destructive root deletions.
  • Fix: Run the underlying hook/check instead of bypassing it, use a reversible operation (e.g., git stash / git checkout -- <file>), or perform intentional branch history rewrites on feature branches (where --force-with-lease prompts for confirmation instead of hard-blocking).

Headless blind review (claude or codex) failed or hit quota

  • Behavior: scripts/run-blind-review.mjs returns { "useNative": true, "fallbackToNative": true, "reason": "..." } so the Coordinator can fall back cleanly to the bundled blind-edge-hunter subagent.
  • Verify auth independently:
    node <plugin-root>/scripts/run-blind-review.mjs --smoke-test --backend claude
    node <plugin-root>/scripts/run-blind-review.mjs --smoke-test --backend codex

Want to re-run /ignis-onboarding from scratch

  • Run /ignis-onboarding directly in chat, or reset the state file via CLI:
    node <plugin-root>/scripts/ignis-broker.mjs onboarding --reset

4. Frequently Asked Questions (FAQ)

Q: Why do all 10 ignis-* skills appear in the / menu even when some are workflow stages?
Antigravity exposes every skills/*/SKILL.md in the / autocomplete menu (with progressive disclosure so they don't bloat context until activated). Nine of the ten skills work directly when invoked standalone — the only exception is /ignis-swarm, where you should always invoke Antigravity's native /swarm so the native Swarm runtime and message board start.

Q: Will first-run onboarding interrupt my subagents or /swarm workers?
No. hooks/session-start.mjs checks isInteractiveUserSession(payload) and suppresses onboarding notices on all subagents and /swarm workers.

Q: Does ignis-swarm modify my ~/.gemini/config/mcp_config.json?
Never. discover-mcp, register-mcp, and import-mcp only read ~/.gemini/config/mcp_config.json and write broker-managed definitions to ~/.ignis-broker/servers.json.

Q: Does ignis-swarm require npm install or external packages?
No. The entire plugin (hooks, MCP broker, onboarding CLI, blind review runner, and test suite) is 100% zero-dependency Node.js ESM (>= 20).

Q: How do I run the plugin's own test suite and strict validation?

agy plugin validate --strict .
node --test tests/*.test.mjs

Clone this wiki locally