swarm-engine 1.1.1 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +1 -1
- package/README.md +145 -30
- package/commands/diff-review.md +27 -15
- package/commands/discover.md +102 -0
- package/commands/dynamic.md +136 -0
- package/commands/fix-pr.md +30 -24
- package/commands/postmortem.md +106 -0
- package/commands/red-team.md +41 -26
- package/commands/research.md +22 -1
- package/commands/review-cycle.md +38 -20
- package/commands/spike.md +108 -0
- package/commands/swarm.md +68 -60
- package/commands/tdd.md +44 -24
- package/dist/cli/commands/acp.d.ts.map +1 -1
- package/dist/cli/commands/acp.js +12 -2
- package/dist/cli/commands/acp.js.map +1 -1
- package/dist/cli/commands/agents.d.ts.map +1 -1
- package/dist/cli/commands/agents.js +16 -13
- package/dist/cli/commands/agents.js.map +1 -1
- package/dist/cli/commands/completions.d.ts.map +1 -1
- package/dist/cli/commands/completions.js +21 -9
- package/dist/cli/commands/completions.js.map +1 -1
- package/dist/cli/commands/compound.d.ts.map +1 -1
- package/dist/cli/commands/compound.js +1 -2
- package/dist/cli/commands/compound.js.map +1 -1
- package/dist/cli/commands/configure.d.ts.map +1 -1
- package/dist/cli/commands/configure.js +24 -8
- package/dist/cli/commands/configure.js.map +1 -1
- package/dist/cli/commands/convert.d.ts +1 -1
- package/dist/cli/commands/convert.d.ts.map +1 -1
- package/dist/cli/commands/convert.js +22 -48
- package/dist/cli/commands/convert.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +1 -3
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +17 -7
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +1 -1
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/learn.js +6 -6
- package/dist/cli/commands/learn.js.map +1 -1
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js +1 -2
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/memory.d.ts.map +1 -1
- package/dist/cli/commands/memory.js +118 -2
- package/dist/cli/commands/memory.js.map +1 -1
- package/dist/cli/commands/orchestrate.d.ts.map +1 -1
- package/dist/cli/commands/orchestrate.js +20 -7
- package/dist/cli/commands/orchestrate.js.map +1 -1
- package/dist/cli/commands/plan.d.ts.map +1 -1
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/plugin.d.ts.map +1 -1
- package/dist/cli/commands/plugin.js +8 -5
- package/dist/cli/commands/plugin.js.map +1 -1
- package/dist/cli/commands/resume.js +1 -1
- package/dist/cli/commands/resume.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +20 -6
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/share.d.ts.map +1 -1
- package/dist/cli/commands/share.js +6 -1
- package/dist/cli/commands/share.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +15 -7
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/template.d.ts.map +1 -1
- package/dist/cli/commands/template.js +14 -6
- package/dist/cli/commands/template.js.map +1 -1
- package/dist/cli/commands/vault.d.ts.map +1 -1
- package/dist/cli/commands/vault.js +14 -9
- package/dist/cli/commands/vault.js.map +1 -1
- package/dist/cli/commands/verify.d.ts.map +1 -1
- package/dist/cli/commands/verify.js +2 -2
- package/dist/cli/commands/verify.js.map +1 -1
- package/dist/cli/commands/watch.js +1 -1
- package/dist/cli/commands/watch.js.map +1 -1
- package/dist/cli/index.js +14 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/core/checkpoint.js +1 -1
- package/dist/core/checkpoint.js.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js +9 -3
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/lifecycle.js.map +1 -1
- package/dist/core/patterns.d.ts.map +1 -1
- package/dist/core/patterns.js +31 -8
- package/dist/core/patterns.js.map +1 -1
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +21 -10
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/registry.d.ts.map +1 -1
- package/dist/core/registry.js +10 -6
- package/dist/core/registry.js.map +1 -1
- package/dist/core/snapshots.d.ts.map +1 -1
- package/dist/core/snapshots.js +17 -5
- package/dist/core/snapshots.js.map +1 -1
- package/dist/core/types.d.ts +33 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.d.ts +114 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +92 -4
- package/dist/index.js.map +1 -1
- package/dist/memory/index.d.ts +38 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +136 -24
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/schema.d.ts +1 -0
- package/dist/memory/schema.d.ts.map +1 -1
- package/dist/memory/schema.js +20 -19
- package/dist/memory/schema.js.map +1 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js.map +1 -1
- package/dist/runtime/acp.d.ts.map +1 -1
- package/dist/runtime/acp.js +71 -41
- package/dist/runtime/acp.js.map +1 -1
- package/dist/runtime/adaptive.d.ts.map +1 -1
- package/dist/runtime/adaptive.js +30 -31
- package/dist/runtime/adaptive.js.map +1 -1
- package/dist/runtime/agent-runner.d.ts +62 -0
- package/dist/runtime/agent-runner.d.ts.map +1 -0
- package/dist/runtime/agent-runner.js +224 -0
- package/dist/runtime/agent-runner.js.map +1 -0
- package/dist/runtime/autonomy.d.ts +1 -0
- package/dist/runtime/autonomy.d.ts.map +1 -1
- package/dist/runtime/autonomy.js +37 -19
- package/dist/runtime/autonomy.js.map +1 -1
- package/dist/runtime/backends/claude.d.ts.map +1 -1
- package/dist/runtime/backends/claude.js +2 -2
- package/dist/runtime/backends/claude.js.map +1 -1
- package/dist/runtime/backends/codex.d.ts.map +1 -1
- package/dist/runtime/backends/codex.js +8 -11
- package/dist/runtime/backends/codex.js.map +1 -1
- package/dist/runtime/backends/gemini.d.ts.map +1 -1
- package/dist/runtime/backends/gemini.js +11 -7
- package/dist/runtime/backends/gemini.js.map +1 -1
- package/dist/runtime/backends/index.js +1 -1
- package/dist/runtime/backends/index.js.map +1 -1
- package/dist/runtime/backends/mock.d.ts.map +1 -1
- package/dist/runtime/backends/mock.js +1 -1
- package/dist/runtime/backends/mock.js.map +1 -1
- package/dist/runtime/backends/vercel-ai.d.ts.map +1 -1
- package/dist/runtime/backends/vercel-ai.js +41 -9
- package/dist/runtime/backends/vercel-ai.js.map +1 -1
- package/dist/runtime/cache-optimizer.d.ts.map +1 -1
- package/dist/runtime/cache-optimizer.js +3 -9
- package/dist/runtime/cache-optimizer.js.map +1 -1
- package/dist/runtime/cascade.d.ts.map +1 -1
- package/dist/runtime/cascade.js +34 -7
- package/dist/runtime/cascade.js.map +1 -1
- package/dist/runtime/chunker.d.ts.map +1 -1
- package/dist/runtime/chunker.js +12 -6
- package/dist/runtime/chunker.js.map +1 -1
- package/dist/runtime/compounder.d.ts +1 -1
- package/dist/runtime/compounder.d.ts.map +1 -1
- package/dist/runtime/compounder.js +30 -11
- package/dist/runtime/compounder.js.map +1 -1
- package/dist/runtime/cost-model.d.ts.map +1 -1
- package/dist/runtime/cost-model.js +1 -1
- package/dist/runtime/cost-model.js.map +1 -1
- package/dist/runtime/database.d.ts +16 -0
- package/dist/runtime/database.d.ts.map +1 -0
- package/dist/runtime/database.js +39 -0
- package/dist/runtime/database.js.map +1 -0
- package/dist/runtime/distiller.d.ts.map +1 -1
- package/dist/runtime/distiller.js +6 -3
- package/dist/runtime/distiller.js.map +1 -1
- package/dist/runtime/engine.d.ts +25 -9
- package/dist/runtime/engine.d.ts.map +1 -1
- package/dist/runtime/engine.js +417 -378
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/execution-graph.d.ts +86 -0
- package/dist/runtime/execution-graph.d.ts.map +1 -0
- package/dist/runtime/execution-graph.js +441 -0
- package/dist/runtime/execution-graph.js.map +1 -0
- package/dist/runtime/executor.d.ts +1 -2
- package/dist/runtime/executor.d.ts.map +1 -1
- package/dist/runtime/executor.js +45 -14
- package/dist/runtime/executor.js.map +1 -1
- package/dist/runtime/graph-adversarial.d.ts +88 -0
- package/dist/runtime/graph-adversarial.d.ts.map +1 -0
- package/dist/runtime/graph-adversarial.js +378 -0
- package/dist/runtime/graph-adversarial.js.map +1 -0
- package/dist/runtime/graph-analyzer.d.ts +106 -0
- package/dist/runtime/graph-analyzer.d.ts.map +1 -0
- package/dist/runtime/graph-analyzer.js +321 -0
- package/dist/runtime/graph-analyzer.js.map +1 -0
- package/dist/runtime/graph-causal.d.ts +91 -0
- package/dist/runtime/graph-causal.d.ts.map +1 -0
- package/dist/runtime/graph-causal.js +292 -0
- package/dist/runtime/graph-causal.js.map +1 -0
- package/dist/runtime/graph-context-router.d.ts +73 -0
- package/dist/runtime/graph-context-router.d.ts.map +1 -0
- package/dist/runtime/graph-context-router.js +162 -0
- package/dist/runtime/graph-context-router.js.map +1 -0
- package/dist/runtime/graph-discovery.d.ts +71 -0
- package/dist/runtime/graph-discovery.d.ts.map +1 -0
- package/dist/runtime/graph-discovery.js +367 -0
- package/dist/runtime/graph-discovery.js.map +1 -0
- package/dist/runtime/graph-dropout.d.ts +59 -0
- package/dist/runtime/graph-dropout.d.ts.map +1 -0
- package/dist/runtime/graph-dropout.js +196 -0
- package/dist/runtime/graph-dropout.js.map +1 -0
- package/dist/runtime/graph-embeddings.d.ts +58 -0
- package/dist/runtime/graph-embeddings.d.ts.map +1 -0
- package/dist/runtime/graph-embeddings.js +301 -0
- package/dist/runtime/graph-embeddings.js.map +1 -0
- package/dist/runtime/graph-feedback.d.ts +30 -0
- package/dist/runtime/graph-feedback.d.ts.map +1 -0
- package/dist/runtime/graph-feedback.js +82 -0
- package/dist/runtime/graph-feedback.js.map +1 -0
- package/dist/runtime/graph-gnn.d.ts +120 -0
- package/dist/runtime/graph-gnn.d.ts.map +1 -0
- package/dist/runtime/graph-gnn.js +524 -0
- package/dist/runtime/graph-gnn.js.map +1 -0
- package/dist/runtime/graph-learner.d.ts +70 -0
- package/dist/runtime/graph-learner.d.ts.map +1 -0
- package/dist/runtime/graph-learner.js +265 -0
- package/dist/runtime/graph-learner.js.map +1 -0
- package/dist/runtime/graph-meta-adversarial.d.ts +113 -0
- package/dist/runtime/graph-meta-adversarial.d.ts.map +1 -0
- package/dist/runtime/graph-meta-adversarial.js +366 -0
- package/dist/runtime/graph-meta-adversarial.js.map +1 -0
- package/dist/runtime/graph-meta.d.ts +115 -0
- package/dist/runtime/graph-meta.d.ts.map +1 -0
- package/dist/runtime/graph-meta.js +437 -0
- package/dist/runtime/graph-meta.js.map +1 -0
- package/dist/runtime/graph-self-evolve.d.ts +92 -0
- package/dist/runtime/graph-self-evolve.d.ts.map +1 -0
- package/dist/runtime/graph-self-evolve.js +422 -0
- package/dist/runtime/graph-self-evolve.js.map +1 -0
- package/dist/runtime/graph-synthesis.d.ts +47 -0
- package/dist/runtime/graph-synthesis.d.ts.map +1 -0
- package/dist/runtime/graph-synthesis.js +232 -0
- package/dist/runtime/graph-synthesis.js.map +1 -0
- package/dist/runtime/graph-trajectory.d.ts +88 -0
- package/dist/runtime/graph-trajectory.d.ts.map +1 -0
- package/dist/runtime/graph-trajectory.js +339 -0
- package/dist/runtime/graph-trajectory.js.map +1 -0
- package/dist/runtime/heuristics.d.ts +1 -0
- package/dist/runtime/heuristics.d.ts.map +1 -1
- package/dist/runtime/heuristics.js +44 -22
- package/dist/runtime/heuristics.js.map +1 -1
- package/dist/runtime/learning-engine.d.ts +63 -0
- package/dist/runtime/learning-engine.d.ts.map +1 -0
- package/dist/runtime/learning-engine.js +273 -0
- package/dist/runtime/learning-engine.js.map +1 -0
- package/dist/runtime/living-spec.js +3 -3
- package/dist/runtime/living-spec.js.map +1 -1
- package/dist/runtime/lsp.d.ts.map +1 -1
- package/dist/runtime/lsp.js +41 -14
- package/dist/runtime/lsp.js.map +1 -1
- package/dist/runtime/mcp.d.ts.map +1 -1
- package/dist/runtime/mcp.js +56 -19
- package/dist/runtime/mcp.js.map +1 -1
- package/dist/runtime/model-router.d.ts +1 -0
- package/dist/runtime/model-router.d.ts.map +1 -1
- package/dist/runtime/model-router.js +37 -21
- package/dist/runtime/model-router.js.map +1 -1
- package/dist/runtime/panes.d.ts.map +1 -1
- package/dist/runtime/panes.js +50 -49
- package/dist/runtime/panes.js.map +1 -1
- package/dist/runtime/plan-search.js +2 -2
- package/dist/runtime/plan-search.js.map +1 -1
- package/dist/runtime/plugins.d.ts +1 -1
- package/dist/runtime/plugins.d.ts.map +1 -1
- package/dist/runtime/plugins.js +63 -47
- package/dist/runtime/plugins.js.map +1 -1
- package/dist/runtime/reflexion.d.ts.map +1 -1
- package/dist/runtime/reflexion.js +4 -8
- package/dist/runtime/reflexion.js.map +1 -1
- package/dist/runtime/review-schema.d.ts.map +1 -1
- package/dist/runtime/review-schema.js +12 -12
- package/dist/runtime/review-schema.js.map +1 -1
- package/dist/runtime/rewriter.d.ts.map +1 -1
- package/dist/runtime/rewriter.js +29 -9
- package/dist/runtime/rewriter.js.map +1 -1
- package/dist/runtime/sharing.d.ts +1 -1
- package/dist/runtime/sharing.d.ts.map +1 -1
- package/dist/runtime/sharing.js +55 -27
- package/dist/runtime/sharing.js.map +1 -1
- package/dist/runtime/stats.d.ts +1 -0
- package/dist/runtime/stats.d.ts.map +1 -1
- package/dist/runtime/stats.js +40 -24
- package/dist/runtime/stats.js.map +1 -1
- package/dist/runtime/templates.d.ts.map +1 -1
- package/dist/runtime/templates.js +2 -2
- package/dist/runtime/templates.js.map +1 -1
- package/dist/runtime/traces.d.ts +1 -0
- package/dist/runtime/traces.d.ts.map +1 -1
- package/dist/runtime/traces.js +50 -28
- package/dist/runtime/traces.js.map +1 -1
- package/dist/runtime/verifier.d.ts.map +1 -1
- package/dist/runtime/verifier.js +12 -6
- package/dist/runtime/verifier.js.map +1 -1
- package/dist/runtime/worktree.d.ts.map +1 -1
- package/dist/runtime/worktree.js +35 -18
- package/dist/runtime/worktree.js.map +1 -1
- package/dist/tui/dashboard.d.ts.map +1 -1
- package/dist/tui/dashboard.js +20 -16
- package/dist/tui/dashboard.js.map +1 -1
- package/dist/tui/progress.d.ts +2 -0
- package/dist/tui/progress.d.ts.map +1 -1
- package/dist/tui/progress.js +105 -33
- package/dist/tui/progress.js.map +1 -1
- package/dist/tui/renderer.d.ts.map +1 -1
- package/dist/tui/renderer.js.map +1 -1
- package/dist/utils/compact-format.js +1 -1
- package/dist/utils/compact-format.js.map +1 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +19 -5
- package/dist/utils/env.js.map +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +3 -7
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +6 -2
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/project-config.d.ts +18 -0
- package/dist/utils/project-config.d.ts.map +1 -1
- package/dist/utils/project-config.js +14 -6
- package/dist/utils/project-config.js.map +1 -1
- package/dist/utils/schemas.d.ts.map +1 -1
- package/dist/utils/schemas.js +12 -12
- package/dist/utils/schemas.js.map +1 -1
- package/dist/utils/terminal.d.ts.map +1 -1
- package/dist/utils/terminal.js +18 -7
- package/dist/utils/terminal.js.map +1 -1
- package/dist/utils/tiers.d.ts.map +1 -1
- package/dist/utils/tiers.js +14 -6
- package/dist/utils/tiers.js.map +1 -1
- package/package.json +15 -4
- package/skills/swarm-output-style/SKILL.md +154 -48
|
@@ -9,77 +9,183 @@ description: |
|
|
|
9
9
|
|
|
10
10
|
# Swarm Output Style Guide
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
All orchestration output follows this guide. The goal: the user should always know what's happening, what it costs, and what to do next.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## 1. Pre-flight Plan (MANDATORY before any agent spawns)
|
|
15
15
|
|
|
16
|
+
Show this BEFORE creating any team or spawning any agent. The user must approve before tokens are spent.
|
|
17
|
+
|
|
18
|
+
Use `swarm-box.py` for the header, then markdown tables for the detail:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
python3 ~/.claude/scripts/swarm-box.py <<'BOX'
|
|
22
|
+
title: SWARM ORCHESTRATION — [Task Name]
|
|
23
|
+
title: Pattern: [name] │ Repo: [repo]
|
|
24
|
+
title: [scope summary]
|
|
25
|
+
BOX
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then show phase details as markdown tables:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
### Phase 1: [Name] -- [parallel/sequential] (~[time])
|
|
32
|
+
| Agent | Model | Focus |
|
|
33
|
+
|-------|-------|-------|
|
|
34
|
+
| `agent-name` | [model] | [what this agent will do] |
|
|
35
|
+
|
|
36
|
+
Proceed?
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Cost estimates use these rough defaults per agent type:
|
|
40
|
+
- Researcher (mid tier): ~5K tokens, ~$0.04
|
|
41
|
+
- Implementer (expensive tier): ~15K tokens, ~$0.19
|
|
42
|
+
- Reviewer (expensive tier): ~8K tokens, ~$0.10
|
|
43
|
+
- Tester (expensive tier): ~10K tokens, ~$0.13
|
|
44
|
+
- Debugger (expensive tier): ~12K tokens, ~$0.15
|
|
45
|
+
|
|
46
|
+
## 2. Phase Transition Banners
|
|
47
|
+
|
|
48
|
+
**MANDATORY**: Use `python3 ~/.claude/scripts/swarm-box.py` via Bash tool for ALL box-drawing output. NEVER hand-draw boxes.
|
|
49
|
+
|
|
50
|
+
Phase start banner:
|
|
51
|
+
```bash
|
|
52
|
+
python3 ~/.claude/scripts/swarm-box.py <<'BOX'
|
|
53
|
+
title: PHASE 1 · Research | ⏱ 0:00
|
|
54
|
+
3 agents · sonnet · read-only
|
|
55
|
+
BOX
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Phase completion summary:
|
|
59
|
+
```bash
|
|
60
|
+
python3 ~/.claude/scripts/swarm-box.py <<'BOX'
|
|
61
|
+
title: PHASE 2 · Implement · COMPLETE | ⏱ ~10 min
|
|
62
|
+
---
|
|
63
|
+
✓ implementer-core — 40 new tests, graph modules done
|
|
64
|
+
✓ implementer-wiring — engine/runner/learner wired
|
|
65
|
+
✓ implementer-docs — docs.html + llms-full.txt updated
|
|
66
|
+
BOX
|
|
16
67
|
```
|
|
17
|
-
## Orchestration Plan
|
|
18
68
|
|
|
19
|
-
|
|
20
|
-
**Pattern**: [pattern name]
|
|
21
|
-
**Agents**: [count] | **Phases**: [count] | **Est. cost**: ~$[amount]
|
|
69
|
+
## 3. Agent Completion Lines
|
|
22
70
|
|
|
23
|
-
|
|
24
|
-
| Agent | Role | Model | Focus |
|
|
25
|
-
|-------|------|-------|-------|
|
|
26
|
-
| `name` | type | model | what they do |
|
|
71
|
+
As each agent finishes, append a single line:
|
|
27
72
|
|
|
28
|
-
|
|
29
|
-
|
|
|
30
|
-
|-------|------|-------|-------|
|
|
31
|
-
| `name` | type | model | what they do |
|
|
73
|
+
```
|
|
74
|
+
`agent-name` [done] [duration] | ~[tokens] tokens | [1-line summary of what they found/did]
|
|
32
75
|
```
|
|
33
76
|
|
|
34
|
-
|
|
77
|
+
If an agent errors:
|
|
35
78
|
|
|
36
|
-
Keep compact. One line per agent with status:
|
|
37
79
|
```
|
|
38
|
-
agent-name [
|
|
39
|
-
agent-name [done] completed in 12s
|
|
40
|
-
agent-name [idle] waiting for Phase 2
|
|
80
|
+
`agent-name` [error] [duration] | [1-line error description]
|
|
41
81
|
```
|
|
42
82
|
|
|
43
|
-
Do NOT dump raw agent output
|
|
83
|
+
Do NOT dump raw agent output. Summarize the key finding in one line.
|
|
44
84
|
|
|
45
|
-
##
|
|
85
|
+
## 4. Phase Summary (between phases)
|
|
46
86
|
|
|
47
|
-
|
|
48
|
-
- Lead with the overall result (pass/fail/concerns)
|
|
49
|
-
- Group findings by severity (critical > important > suggestion)
|
|
50
|
-
- Include file:line references
|
|
51
|
-
- Keep it scannable — bullet points, not paragraphs
|
|
87
|
+
After all agents in a phase complete, summarize before moving on:
|
|
52
88
|
|
|
53
|
-
|
|
89
|
+
```
|
|
90
|
+
**Phase [N] complete** -- [duration] | ~[tokens] tokens | ~$[cost]
|
|
54
91
|
|
|
92
|
+
Key findings:
|
|
93
|
+
- [finding 1 with file:line reference if applicable]
|
|
94
|
+
- [finding 2]
|
|
95
|
+
|
|
96
|
+
Proceeding to Phase [N+1] -- [name]
|
|
55
97
|
```
|
|
56
|
-
## Summary
|
|
57
98
|
|
|
58
|
-
|
|
99
|
+
Only ask for explicit approval at the Research-to-Implement transition (where cost jumps). Other transitions proceed automatically.
|
|
59
100
|
|
|
60
|
-
|
|
61
|
-
- [bullet points]
|
|
101
|
+
## 5. Error Recovery (when agents fail or return low confidence)
|
|
62
102
|
|
|
63
|
-
|
|
64
|
-
- [bullet points]
|
|
103
|
+
Surface structured options, don't just stop:
|
|
65
104
|
|
|
66
|
-
### Metrics
|
|
67
|
-
Agents: [N] | Phases: [N] | Duration: [time] | Est. cost: ~$[amount]
|
|
68
105
|
```
|
|
106
|
+
**Agent issue**: `agent-name` -- [description of problem]
|
|
107
|
+
|
|
108
|
+
Options:
|
|
109
|
+
1. **Retry** with [adjusted parameters]
|
|
110
|
+
2. **Skip** and proceed to next phase
|
|
111
|
+
3. **Abort** orchestration
|
|
112
|
+
|
|
113
|
+
Choice (1-3) or describe a different approach >
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
For low-confidence results:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
**Low confidence**: `agent-name` flagged uncertainty about [specific thing]
|
|
120
|
+
|
|
121
|
+
Options:
|
|
122
|
+
1. **Accept** and note as a risk
|
|
123
|
+
2. **Spawn** a targeted agent to investigate further
|
|
124
|
+
3. **Flag** for manual review in the summary
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## 6. Post-Completion Summary (MANDATORY)
|
|
128
|
+
|
|
129
|
+
**MANDATORY**: Use `python3 ~/.claude/scripts/swarm-box.py` via the Bash tool. NEVER hand-draw boxes — they will always be misaligned.
|
|
130
|
+
|
|
131
|
+
### How to use swarm-box.py
|
|
132
|
+
|
|
133
|
+
Call via Bash tool with a heredoc. The script auto-pads all lines to identical display width.
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
python3 ~/.claude/scripts/swarm-box.py <<'BOX'
|
|
137
|
+
title: ORCHESTRATION COMPLETE | STATUS: PASS
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
Phases: 4 │ Agents: 8 │ Duration: ~14 min
|
|
141
|
+
|
|
142
|
+
[What Changed]
|
|
143
|
+
20 files changed, +3,838 lines
|
|
144
|
+
|
|
145
|
+
Tests: 53 new (987 → 1041), 64 files, all green
|
|
146
|
+
Memory: purge, prune, get, delete CLI commands
|
|
147
|
+
Docs: Knowledge Graph section on swarmengine.dev
|
|
148
|
+
Version: 1.3.0 → 1.31.0
|
|
149
|
+
Branch: feat/execution-knowledge-graph → main
|
|
150
|
+
[/]
|
|
151
|
+
|
|
152
|
+
[Review Gate]
|
|
153
|
+
reviewer-correctness PASS (2 important → fixed)
|
|
154
|
+
reviewer-convention PASS (1 important → fixed)
|
|
155
|
+
fixer 6/6 findings resolved
|
|
156
|
+
[/]
|
|
157
|
+
|
|
158
|
+
Next: npm publish (run npm publish when ready)
|
|
159
|
+
|
|
160
|
+
BOX
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Input format
|
|
164
|
+
|
|
165
|
+
| Line type | Syntax | Renders as |
|
|
166
|
+
|-----------|--------|------------|
|
|
167
|
+
| Header | `title: TEXT` | `║ TEXT ║` (top of box) |
|
|
168
|
+
| Separator | `---` | `╠═══════╣` |
|
|
169
|
+
| Sub-box start | `[Label]` | `║ ┌─ Label ──┐ ║` |
|
|
170
|
+
| Sub-box end | `[/]` | `║ └──────────┘ ║` |
|
|
171
|
+
| Content (inside sub-box) | plain text | `║ │ text │ ║` |
|
|
172
|
+
| Content (outside sub-box) | plain text | `║ text ║` |
|
|
173
|
+
| Blank line | empty line | `║ ║` |
|
|
174
|
+
|
|
175
|
+
### Rules
|
|
176
|
+
|
|
177
|
+
- **EVERY box in swarm output MUST be generated by `swarm-box.py`** — phase banners, completion summaries, pre-flight plan headers, error recovery boxes. No exceptions.
|
|
178
|
+
- The script guarantees all lines have identical display width (verified internally).
|
|
179
|
+
- Copy-paste the script output directly into your response.
|
|
180
|
+
- If the script is unavailable, fall back to markdown tables — never hand-draw box characters.
|
|
69
181
|
|
|
70
182
|
## Anti-Patterns (DO NOT)
|
|
71
183
|
|
|
184
|
+
- Do NOT spawn agents before showing the pre-flight plan
|
|
72
185
|
- Do NOT dump raw agent transcripts into the summary
|
|
73
|
-
- Do NOT use emoji in structured output
|
|
74
|
-
- Do NOT repeat the
|
|
75
|
-
- Do NOT show agent Meta blocks to the user
|
|
76
|
-
- Do NOT use vague language ("various improvements")
|
|
77
|
-
- Do NOT include timestamps
|
|
78
|
-
|
|
79
|
-
## Color Conventions (for terminal output)
|
|
80
|
-
|
|
81
|
-
When outputting to terminal:
|
|
82
|
-
- **Bold** for section headers
|
|
83
|
-
- Agent names in their role color (blue=researcher, green=implementer, yellow=reviewer)
|
|
84
|
-
- Status badges: `[working]` `[done]` `[idle]` `[error]`
|
|
85
|
-
- Keep lines under 80 characters for terminal compatibility
|
|
186
|
+
- Do NOT use emoji in structured output
|
|
187
|
+
- Do NOT repeat the full task description in every status update
|
|
188
|
+
- Do NOT show agent Meta blocks to the user -- synthesize them
|
|
189
|
+
- Do NOT use vague language ("various improvements") -- be specific
|
|
190
|
+
- Do NOT include timestamps on every line -- only in phase banners
|
|
191
|
+
- Do NOT ask "proceed?" after every phase -- only at Research-to-Implement transition
|