aether-colony 3.1.17 → 5.0.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.
Files changed (183) hide show
  1. package/{runtime → .aether}/CONTEXT.md +1 -1
  2. package/{runtime → .aether}/aether-utils.sh +1772 -98
  3. package/.aether/docs/QUEEN-SYSTEM.md +211 -0
  4. package/.aether/docs/QUEEN.md +84 -0
  5. package/.aether/docs/README.md +68 -0
  6. package/.aether/docs/caste-system.md +48 -0
  7. package/{runtime → .aether/docs/disciplines}/DISCIPLINES.md +8 -8
  8. package/.aether/docs/error-codes.md +268 -0
  9. package/{runtime → .aether}/docs/known-issues.md +42 -26
  10. package/.aether/docs/queen-commands.md +97 -0
  11. package/.aether/exchange/colony-registry.xml +11 -0
  12. package/{runtime → .aether}/exchange/pheromone-xml.sh +2 -1
  13. package/.aether/exchange/pheromones.xml +87 -0
  14. package/.aether/exchange/queen-wisdom.xml +14 -0
  15. package/{runtime → .aether}/exchange/registry-xml.sh +7 -3
  16. package/{runtime → .aether}/exchange/wisdom-xml.sh +11 -4
  17. package/.aether/rules/aether-colony.md +134 -0
  18. package/.aether/schemas/example-prompt-builder.xml +234 -0
  19. package/.aether/templates/colony-state-reset.jq.template +22 -0
  20. package/.aether/templates/colony-state.template.json +35 -0
  21. package/.aether/templates/constraints.template.json +9 -0
  22. package/.aether/templates/crowned-anthill.template.md +36 -0
  23. package/.aether/templates/handoff-build-error.template.md +30 -0
  24. package/.aether/templates/handoff-build-success.template.md +39 -0
  25. package/.aether/templates/handoff.template.md +40 -0
  26. package/{runtime → .aether}/utils/atomic-write.sh +5 -5
  27. package/{runtime → .aether}/utils/chamber-compare.sh +23 -10
  28. package/{runtime → .aether}/utils/chamber-utils.sh +32 -20
  29. package/{runtime → .aether}/utils/error-handler.sh +13 -1
  30. package/{runtime → .aether}/utils/file-lock.sh +49 -13
  31. package/.aether/utils/semantic-cli.sh +413 -0
  32. package/{runtime → .aether}/utils/xml-compose.sh +7 -1
  33. package/.aether/utils/xml-convert.sh +273 -0
  34. package/.aether/utils/xml-query.sh +201 -0
  35. package/.aether/utils/xml-utils.sh +110 -0
  36. package/{runtime → .aether}/workers.md +14 -17
  37. package/.claude/agents/ant/aether-ambassador.md +264 -0
  38. package/.claude/agents/ant/aether-archaeologist.md +322 -0
  39. package/.claude/agents/ant/aether-auditor.md +266 -0
  40. package/.claude/agents/ant/aether-builder.md +187 -0
  41. package/.claude/agents/ant/aether-chaos.md +268 -0
  42. package/.claude/agents/ant/aether-chronicler.md +304 -0
  43. package/.claude/agents/ant/aether-gatekeeper.md +325 -0
  44. package/.claude/agents/ant/aether-includer.md +373 -0
  45. package/.claude/agents/ant/aether-keeper.md +271 -0
  46. package/.claude/agents/ant/aether-measurer.md +317 -0
  47. package/.claude/agents/ant/aether-probe.md +210 -0
  48. package/.claude/agents/ant/aether-queen.md +325 -0
  49. package/.claude/agents/ant/aether-route-setter.md +173 -0
  50. package/.claude/agents/ant/aether-sage.md +353 -0
  51. package/.claude/agents/ant/aether-scout.md +142 -0
  52. package/.claude/agents/ant/aether-surveyor-disciplines.md +416 -0
  53. package/.claude/agents/ant/aether-surveyor-nest.md +354 -0
  54. package/.claude/agents/ant/aether-surveyor-pathogens.md +288 -0
  55. package/.claude/agents/ant/aether-surveyor-provisions.md +359 -0
  56. package/.claude/agents/ant/aether-tracker.md +265 -0
  57. package/.claude/agents/ant/aether-watcher.md +244 -0
  58. package/.claude/agents/ant/aether-weaver.md +247 -0
  59. package/.claude/commands/ant/archaeology.md +16 -7
  60. package/.claude/commands/ant/build.md +415 -284
  61. package/.claude/commands/ant/chaos.md +19 -10
  62. package/.claude/commands/ant/colonize.md +58 -24
  63. package/.claude/commands/ant/continue.md +155 -145
  64. package/.claude/commands/ant/council.md +15 -5
  65. package/.claude/commands/ant/dream.md +16 -7
  66. package/.claude/commands/ant/entomb.md +274 -157
  67. package/.claude/commands/ant/feedback.md +33 -29
  68. package/.claude/commands/ant/flag.md +18 -10
  69. package/.claude/commands/ant/flags.md +14 -6
  70. package/.claude/commands/ant/focus.md +29 -21
  71. package/.claude/commands/ant/help.md +11 -1
  72. package/.claude/commands/ant/history.md +10 -0
  73. package/.claude/commands/ant/init.md +91 -65
  74. package/.claude/commands/ant/interpret.md +15 -4
  75. package/.claude/commands/ant/lay-eggs.md +55 -7
  76. package/.claude/commands/ant/maturity.md +11 -1
  77. package/.claude/commands/ant/migrate-state.md +14 -2
  78. package/.claude/commands/ant/oracle.md +23 -15
  79. package/.claude/commands/ant/organize.md +29 -20
  80. package/.claude/commands/ant/pause-colony.md +17 -7
  81. package/.claude/commands/ant/phase.md +17 -8
  82. package/.claude/commands/ant/plan.md +20 -9
  83. package/.claude/commands/ant/redirect.md +29 -32
  84. package/.claude/commands/ant/resume-colony.md +19 -9
  85. package/.claude/commands/ant/resume.md +272 -96
  86. package/.claude/commands/ant/seal.md +201 -191
  87. package/.claude/commands/ant/status.md +71 -32
  88. package/.claude/commands/ant/swarm.md +26 -44
  89. package/.claude/commands/ant/tunnels.md +279 -105
  90. package/.claude/commands/ant/update.md +81 -20
  91. package/.claude/commands/ant/verify-castes.md +14 -4
  92. package/.claude/commands/ant/watch.md +13 -12
  93. package/.opencode/agents/aether-ambassador.md +63 -20
  94. package/.opencode/agents/aether-archaeologist.md +29 -12
  95. package/.opencode/agents/aether-auditor.md +51 -18
  96. package/.opencode/agents/aether-builder.md +69 -19
  97. package/.opencode/agents/aether-chaos.md +29 -12
  98. package/.opencode/agents/aether-chronicler.md +60 -18
  99. package/.opencode/agents/aether-gatekeeper.md +27 -18
  100. package/.opencode/agents/aether-includer.md +27 -18
  101. package/.opencode/agents/aether-keeper.md +89 -18
  102. package/.opencode/agents/aether-measurer.md +27 -18
  103. package/.opencode/agents/aether-probe.md +60 -18
  104. package/.opencode/agents/aether-queen.md +172 -24
  105. package/.opencode/agents/aether-route-setter.md +57 -12
  106. package/.opencode/agents/aether-sage.md +26 -18
  107. package/.opencode/agents/aether-scout.md +27 -19
  108. package/.opencode/agents/aether-surveyor-disciplines.md +53 -1
  109. package/.opencode/agents/aether-surveyor-nest.md +53 -1
  110. package/.opencode/agents/aether-surveyor-pathogens.md +51 -1
  111. package/.opencode/agents/aether-surveyor-provisions.md +53 -1
  112. package/.opencode/agents/aether-tracker.md +64 -18
  113. package/.opencode/agents/aether-watcher.md +66 -19
  114. package/.opencode/agents/aether-weaver.md +61 -18
  115. package/.opencode/commands/ant/build.md +406 -192
  116. package/.opencode/commands/ant/continue.md +66 -76
  117. package/.opencode/commands/ant/entomb.md +106 -45
  118. package/.opencode/commands/ant/init.md +46 -48
  119. package/.opencode/commands/ant/organize.md +5 -5
  120. package/.opencode/commands/ant/resume.md +334 -0
  121. package/.opencode/commands/ant/seal.md +33 -24
  122. package/.opencode/commands/ant/status.md +11 -0
  123. package/.opencode/commands/ant/tunnels.md +149 -0
  124. package/.opencode/commands/ant/update.md +59 -16
  125. package/CHANGELOG.md +79 -0
  126. package/README.md +135 -353
  127. package/bin/cli.js +243 -122
  128. package/bin/generate-commands.sh +2 -2
  129. package/bin/lib/init.js +13 -3
  130. package/bin/lib/update-transaction.js +119 -117
  131. package/bin/sync-to-runtime.sh +5 -137
  132. package/bin/validate-package.sh +84 -0
  133. package/package.json +9 -6
  134. package/.opencode/agents/aether-architect.md +0 -66
  135. package/.opencode/agents/aether-guardian.md +0 -107
  136. package/.opencode/agents/workers.md +0 -1034
  137. package/runtime/QUEEN_ANT_ARCHITECTURE.md +0 -402
  138. package/runtime/data/signatures.json +0 -41
  139. package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +0 -1343
  140. package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +0 -2642
  141. package/runtime/docs/PHEROMONE-INJECTION.md +0 -240
  142. package/runtime/docs/PHEROMONE-INTEGRATION.md +0 -192
  143. package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +0 -426
  144. package/runtime/docs/README.md +0 -94
  145. package/runtime/docs/VISUAL-OUTPUT-SPEC.md +0 -219
  146. package/runtime/docs/biological-reference.md +0 -272
  147. package/runtime/docs/codebase-review.md +0 -399
  148. package/runtime/docs/command-sync.md +0 -164
  149. package/runtime/docs/constraints.md +0 -116
  150. package/runtime/docs/implementation-learnings.md +0 -89
  151. package/runtime/docs/namespace.md +0 -148
  152. package/runtime/docs/pathogen-schema-example.json +0 -36
  153. package/runtime/docs/pathogen-schema.md +0 -111
  154. package/runtime/docs/planning-discipline.md +0 -159
  155. package/runtime/docs/progressive-disclosure.md +0 -184
  156. package/runtime/lib/queen-utils.sh +0 -729
  157. package/runtime/planning.md +0 -159
  158. package/runtime/recover.sh +0 -136
  159. package/runtime/utils/xml-utils.sh +0 -2196
  160. package/runtime/workers-new-castes.md +0 -516
  161. /package/{runtime → .aether/docs/disciplines}/coding-standards.md +0 -0
  162. /package/{runtime → .aether/docs/disciplines}/debugging.md +0 -0
  163. /package/{runtime → .aether/docs/disciplines}/learning.md +0 -0
  164. /package/{runtime → .aether/docs/disciplines}/tdd.md +0 -0
  165. /package/{runtime → .aether/docs/disciplines}/verification-loop.md +0 -0
  166. /package/{runtime → .aether/docs/disciplines}/verification.md +0 -0
  167. /package/{runtime → .aether}/docs/pheromones.md +0 -0
  168. /package/{runtime → .aether}/model-profiles.yaml +0 -0
  169. /package/{runtime → .aether}/schemas/aether-types.xsd +0 -0
  170. /package/{runtime → .aether}/schemas/colony-registry.xsd +0 -0
  171. /package/{runtime → .aether}/schemas/pheromone.xsd +0 -0
  172. /package/{runtime → .aether}/schemas/prompt.xsd +0 -0
  173. /package/{runtime → .aether}/schemas/queen-wisdom.xsd +0 -0
  174. /package/{runtime → .aether}/schemas/worker-priming.xsd +0 -0
  175. /package/{runtime → .aether}/templates/QUEEN.md.template +0 -0
  176. /package/{runtime → .aether}/utils/colorize-log.sh +0 -0
  177. /package/{runtime → .aether}/utils/queen-to-md.xsl +0 -0
  178. /package/{runtime → .aether}/utils/spawn-tree.sh +0 -0
  179. /package/{runtime → .aether}/utils/spawn-with-model.sh +0 -0
  180. /package/{runtime → .aether}/utils/state-loader.sh +0 -0
  181. /package/{runtime → .aether}/utils/swarm-display.sh +0 -0
  182. /package/{runtime → .aether}/utils/watch-spawn-tree.sh +0 -0
  183. /package/{runtime → .aether}/utils/xml-core.sh +0 -0
@@ -9,9 +9,46 @@ The phase to build is: `$ARGUMENTS`
9
9
 
10
10
  ## Instructions
11
11
 
12
+ <failure_modes>
13
+ ### Wave Failure Mid-Build
14
+ If a worker fails during a build wave:
15
+ - Do NOT continue to next wave (failed dependencies will cascade)
16
+ - Report which worker failed, what task it was on, and what was attempted
17
+ - Options: (1) Retry the failed task, (2) Skip and continue with remaining tasks, (3) Abort build
18
+
19
+ ### Partial File Writes
20
+ If a builder crashes mid-write:
21
+ - Check git status for uncommitted partial changes
22
+ - If partial changes exist, offer: (1) Review and keep, (2) Revert with git checkout, (3) Stash for later
23
+
24
+ ### State Corruption
25
+ If COLONY_STATE.json becomes invalid during build:
26
+ - STOP all workers immediately
27
+ - Do not attempt to fix state automatically
28
+ - Report the issue and offer to restore from last known good state
29
+ </failure_modes>
30
+
31
+ <success_criteria>
32
+ Command is complete when:
33
+ - All waves executed in order with no skipped dependencies
34
+ - Each worker's task output is verified (files exist, tests pass)
35
+ - COLONY_STATE.json reflects completed phase progress
36
+ - Build summary reports all workers' outcomes
37
+ </success_criteria>
38
+
39
+ <read_only>
40
+ Do not touch during build:
41
+ - .aether/dreams/ (user notes)
42
+ - .aether/chambers/ (archived colonies)
43
+ - .env* files
44
+ - .claude/settings.json
45
+ - .github/workflows/
46
+ - Other agents' config files (only modify files assigned to the current build task)
47
+ </read_only>
48
+
12
49
  ### Step 0: Version Check (Non-blocking)
13
50
 
14
- Run using the Bash tool: `bash .aether/aether-utils.sh version-check 2>/dev/null || true`
51
+ Run using the Bash tool with description "Checking colony version...": `bash .aether/aether-utils.sh version-check-cached 2>/dev/null || true`
15
52
 
16
53
  If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
17
54
 
@@ -19,6 +56,7 @@ If the command succeeds and the JSON result contains a non-empty string, display
19
56
 
20
57
  Check that the LiteLLM proxy is running for model routing:
21
58
 
59
+ Run using the Bash tool with description "Checking model proxy...":
22
60
  ```bash
23
61
  curl -s http://localhost:4000/health | grep -q "healthy" && echo "Proxy healthy" || echo "Proxy not running - workers will use default model"
24
62
  ```
@@ -27,7 +65,7 @@ If proxy is not healthy, log a warning but continue (workers will fall back to d
27
65
 
28
66
  ### Step 0.5: Load Colony State
29
67
 
30
- Run using Bash tool: `bash .aether/aether-utils.sh load-state`
68
+ Run using the Bash tool with description "Loading colony state...": `bash .aether/aether-utils.sh load-state`
31
69
 
32
70
  If the command fails (non-zero exit or JSON has ok: false):
33
71
  1. Parse error JSON
@@ -45,7 +83,7 @@ If successful:
45
83
  ```
46
84
  (If HANDOFF.md exists, this provides orientation before the build proceeds)
47
85
 
48
- After displaying context, run: `bash .aether/aether-utils.sh unload-state` to release the lock.
86
+ After displaying context, run using the Bash tool with description "Releasing colony lock...": `bash .aether/aether-utils.sh unload-state` to release the lock.
49
87
 
50
88
  ### Step 1: Validate + Read State
51
89
 
@@ -78,7 +116,7 @@ Stop here.
78
116
 
79
117
  **Validate CLI model override (if provided):**
80
118
  If `cli_model_override` is set:
81
- 1. Validate the model: `bash .aether/aether-utils.sh model-profile validate "$cli_model_override"`
119
+ 1. Run using the Bash tool with description "Validating model override...": `bash .aether/aether-utils.sh model-profile validate "$cli_model_override"`
82
120
  2. Parse JSON result - if `.result.valid` is false:
83
121
  - Display: `Error: Invalid model "$cli_model_override"`
84
122
  - Display: `Valid models: {list from .result.models}`
@@ -107,6 +145,7 @@ Extract:
107
145
 
108
146
  Check for unresolved blocker flags on the requested phase:
109
147
 
148
+ Run using the Bash tool with description "Checking for blockers...":
110
149
  ```bash
111
150
  bash .aether/aether-utils.sh flag-check-blockers {phase_number}
112
151
  ```
@@ -115,6 +154,7 @@ Parse the JSON result (`.result.blockers`):
115
154
 
116
155
  - **If blockers == 0:** Display nothing (or optionally a brief `No active blockers for Phase {id}.` line). Proceed to Step 2.
117
156
  - **If blockers > 0:** Retrieve blocker details:
157
+ Run using the Bash tool with description "Loading blocker details...":
118
158
  ```bash
119
159
  bash .aether/aether-utils.sh flag-list --type blocker --phase {phase_number}
120
160
  ```
@@ -143,21 +183,28 @@ If `events` exceeds 100 entries, keep only the last 100.
143
183
 
144
184
  Write COLONY_STATE.json.
145
185
 
186
+ Validate the state file:
187
+ Run using the Bash tool with description "Validating colony state...":
188
+ ```bash
189
+ bash .aether/aether-utils.sh validate-state colony
190
+ ```
191
+
146
192
  ### Step 3: Git Checkpoint
147
193
 
148
194
  Create a git checkpoint for rollback capability.
149
195
 
196
+ Run using the Bash tool with description "Checking git repository...":
150
197
  ```bash
151
198
  git rev-parse --git-dir 2>/dev/null
152
199
  ```
153
200
 
154
201
  - **If succeeds** (is a git repo):
155
- 1. Check for changes in Aether-managed directories only: `.aether .claude/commands/ant .claude/commands/st .opencode runtime bin`
156
- 2. **If changes exist**: `git stash push -m "aether-checkpoint: pre-phase-$PHASE_NUMBER" -- .aether .claude/commands/ant .claude/commands/st .opencode runtime bin`
202
+ 1. Check for changes in Aether-managed directories only: `.aether .claude/commands/ant .claude/commands/st .opencode bin`
203
+ 2. **If changes exist**: Run using the Bash tool with description "Creating git checkpoint...": `git stash push -m "aether-checkpoint: pre-phase-$PHASE_NUMBER" -- .aether .claude/commands/ant .claude/commands/st .opencode bin`
157
204
  - IMPORTANT: Never use `--include-untracked` — it stashes ALL files including user work!
158
- - Verify: `git stash list | head -1 | grep "aether-checkpoint"` — warn if empty
205
+ - Run using the Bash tool with description "Verifying checkpoint...": `git stash list | head -1 | grep "aether-checkpoint"` — warn if empty
159
206
  - Store checkpoint as `{type: "stash", ref: "aether-checkpoint: pre-phase-$PHASE_NUMBER"}`
160
- 3. **If clean working tree**: Record `HEAD` hash via `git rev-parse HEAD`
207
+ 3. **If clean working tree**: Run using the Bash tool with description "Recording HEAD position...": `git rev-parse HEAD`
161
208
  - Store checkpoint as `{type: "commit", ref: "$HEAD_HASH"}`
162
209
  - **If fails** (not a git repo): Set checkpoint to `{type: "none", ref: "(not a git repo)"}`.
163
210
 
@@ -166,13 +213,12 @@ Rollback procedure: `git stash pop` (if type is "stash") or `git reset --hard $r
166
213
  Output header:
167
214
 
168
215
  ```
169
- 🔨🐜🏗️🐜🔨 ═══════════════════════════════════════════════════
216
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
170
217
  B U I L D I N G P H A S E {id}
171
- ═══════════════════════════════════════════════════ 🔨🐜🏗️🐜🔨
218
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
172
219
 
173
220
  📍 Phase {id}: {name}
174
- 💾 Git Checkpoint: {checkpoint_type} → {checkpoint_ref}
175
- 🔄 Rollback: `git stash pop` (stash) or `git reset --hard {ref}` (commit)
221
+ 💾 Git checkpoint saved
176
222
  ```
177
223
 
178
224
  ### Step 4: Load Constraints
@@ -191,10 +237,31 @@ If file doesn't exist or is empty:
191
237
  CONSTRAINTS: (none)
192
238
  ```
193
239
 
240
+ **Load pheromone context for worker injection:**
241
+
242
+ Run using the Bash tool with description "Loading pheromone signals...":
243
+ ```bash
244
+ prime_result=$(bash .aether/aether-utils.sh pheromone-prime 2>/dev/null)
245
+ ```
246
+
247
+ Parse the JSON result from `.result`:
248
+ - Extract `signal_count` (number of active signals)
249
+ - Extract `instinct_count` (number of filtered instincts)
250
+ - Extract `prompt_section` as `pheromone_section` variable — the formatted markdown to inject into worker prompts
251
+ - Extract `log_line` for display
252
+
253
+ Display after constraints:
254
+ ```
255
+ {log_line from pheromone-prime}
256
+ ```
257
+
258
+ If `pheromone-prime` fails, returns an error, or is unavailable: set `pheromone_section` to empty string and continue. **Builds MUST NEVER fail because pheromones are unavailable.**
259
+
194
260
  ### Step 4.0: Load Territory Survey
195
261
 
196
262
  Check if territory survey exists and load relevant documents:
197
263
 
264
+ Run using the Bash tool with description "Loading territory survey...":
198
265
  ```bash
199
266
  bash .aether/aether-utils.sh survey-load "{phase_name}" 2>/dev/null
200
267
  ```
@@ -222,8 +289,7 @@ bash .aether/aether-utils.sh survey-load "{phase_name}" 2>/dev/null
222
289
 
223
290
  **Display summary:**
224
291
  ```
225
- 🗺️ SURVEY LOADED
226
- ================
292
+ ━━━ 🗺️🐜 S U R V E Y L O A D E D ━━━
227
293
  {for each doc loaded}
228
294
  {emoji} {filename} — {brief description}
229
295
  {/for}
@@ -242,6 +308,7 @@ bash .aether/aether-utils.sh survey-load "{phase_name}" 2>/dev/null
242
308
 
243
309
  Call `queen-read` to extract eternal wisdom for worker priming:
244
310
 
311
+ Run using the Bash tool with description "Loading queen wisdom...":
245
312
  ```bash
246
313
  bash .aether/aether-utils.sh queen-read 2>/dev/null
247
314
  ```
@@ -261,8 +328,7 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
261
328
 
262
329
  **Display summary (if any wisdom exists):**
263
330
  ```
264
- 📜 QUEEN WISDOM LOADED
265
- =====================
331
+ ━━━ 📜🐜 Q U E E N W I S D O M ━━━
266
332
  {if queen_philosophies:} 📜 Philosophies: yes{/if}
267
333
  {if queen_patterns:} 🧭 Patterns: yes{/if}
268
334
  {if queen_redirects:} ⚠️ Redirects: yes{/if}
@@ -274,6 +340,29 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
274
340
 
275
341
  **Graceful handling:** If QUEEN.md doesn't exist or `queen-read` fails, continue without wisdom injection. Workers will receive standard prompts.
276
342
 
343
+ ### Step 4.1.6: Load Active Pheromones (Signal Consumption)
344
+
345
+ **This injects current FOCUS and REDIRECT signals into worker context.**
346
+
347
+ Call `pheromone-read` to get active signals:
348
+
349
+ ```bash
350
+ bash .aether/aether-utils.sh pheromone-read 2>/dev/null
351
+ ```
352
+
353
+ **Parse the JSON response:**
354
+ - If `.ok` is false or command fails: Set `pheromone_section = null` and skip
355
+ - If successful: Extract `.result.priorities` and `.result.avoid`
356
+
357
+ **Display summary:**
358
+ ```
359
+ ━━━ 🎯🐜 A C T I V E S I G N A L S ━━━
360
+ Priorities (FOCUS): {N}
361
+ Constraints (REDIRECT): {M}
362
+ ```
363
+
364
+ **Store for worker injection:** The `pheromone_section` markdown will be included in builder prompts (see Step 5.1 Active Signals Section).
365
+
277
366
  ### Step 4.2: Archaeologist Pre-Build Scan
278
367
 
279
368
  **Conditional step — only fires when the phase modifies existing files.**
@@ -290,12 +379,9 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
290
379
 
291
380
  2. **If existing code modification detected — spawn Archaeologist Scout:**
292
381
 
293
- Generate archaeologist name and log:
294
- ```bash
295
- bash .aether/aether-utils.sh generate-ant-name "archaeologist"
296
- bash .aether/aether-utils.sh spawn-log "Queen" "scout" "{archaeologist_name}" "Pre-build archaeology scan"
297
- bash .aether/aether-utils.sh swarm-display-update "{archaeologist_name}" "scout" "excavating" "Pre-build archaeology scan" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 15
298
- ```
382
+ Generate archaeologist name and dispatch:
383
+ Run using the Bash tool with description "Naming archaeologist...": `bash .aether/aether-utils.sh generate-ant-name "archaeologist"` (store as `{archaeologist_name}`)
384
+ Run using the Bash tool with description "Dispatching archaeologist...": `bash .aether/aether-utils.sh spawn-log "Queen" "scout" "{archaeologist_name}" "Pre-build archaeology scan" && bash .aether/aether-utils.sh swarm-display-update "{archaeologist_name}" "scout" "excavating" "Pre-build archaeology scan" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 15`
299
385
 
300
386
  Display:
301
387
  ```
@@ -303,7 +389,7 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
303
389
  Scanning history of files to be modified...
304
390
  ```
305
391
 
306
- Spawn a Scout (using Task tool with `subagent_type="aether-archaeologist"`) with this prompt:
392
+ Spawn a Scout (using Task tool with `subagent_type="aether-archaeologist"`, include `description: "🏺 Archaeologist {archaeologist_name}: Pre-build history scan"`) with this prompt:
307
393
  # FALLBACK: If "Agent type not found", use general-purpose and inject role: "You are an Archaeologist Ant - git historian that excavates why code exists."
308
394
 
309
395
  ```
@@ -333,10 +419,7 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
333
419
  **Wait for results** (blocking — use TaskOutput with `block: true`).
334
420
 
335
421
  Log completion and update swarm display:
336
- ```bash
337
- bash .aether/aether-utils.sh spawn-complete "{archaeologist_name}" "completed" "Pre-build archaeology scan"
338
- bash .aether/aether-utils.sh swarm-display-update "{archaeologist_name}" "scout" "completed" "Pre-build archaeology scan" "Queen" '{"read":8,"grep":5,"edit":0,"bash":2}' 100 "fungus_garden" 100
339
- ```
422
+ Run using the Bash tool with description "Recording archaeologist findings...": `bash .aether/aether-utils.sh spawn-complete "{archaeologist_name}" "completed" "Pre-build archaeology scan" && bash .aether/aether-utils.sh swarm-display-update "{archaeologist_name}" "scout" "completed" "Pre-build archaeology scan" "Queen" '{"read":8,"grep":5,"edit":0,"bash":2}' 100 "fungus_garden" 100`
340
423
 
341
424
  3. **Store and display findings:**
342
425
 
@@ -344,8 +427,7 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
344
427
 
345
428
  Display summary:
346
429
  ```
347
- 🏺 ARCHAEOLOGY CONTEXT
348
- =====================
430
+ ━━━ 🏺🐜 A R C H A E O L O G Y ━━━
349
431
  {summary of findings from archaeologist}
350
432
  ```
351
433
 
@@ -360,6 +442,7 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
360
442
  **YOU (the Queen) will spawn workers directly. Do NOT delegate to a single Prime Worker.**
361
443
 
362
444
  **Initialize visual swarm tracking:**
445
+ Run using the Bash tool with description "Initializing build display...":
363
446
  ```bash
364
447
  # Generate unique build ID
365
448
  build_id="build-$(date +%s)"
@@ -376,14 +459,15 @@ bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "
376
459
 
377
460
  **Show real-time display header:**
378
461
  ```
379
- 🔨 COLONY BUILD INITIATED
380
- ═══════════════════════════════════════════════════
381
- Phase {id}: {name}
382
- Build ID: {build_id}
383
-
384
- Launching swarm display...
462
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
463
+ Phase {id}: {name} — {N} waves, {M} tasks
464
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
385
465
  ```
386
466
 
467
+ Where N = number of builder waves (excluding watcher/chaos) and M = total builder tasks.
468
+
469
+ Record `build_started_at_epoch=$(date +%s)` — this epoch integer is used by the BUILD SUMMARY block in Step 7 to calculate elapsed time.
470
+
387
471
  Analyze the phase tasks:
388
472
 
389
473
  Analyze the phase tasks:
@@ -400,15 +484,14 @@ Analyze the phase tasks:
400
484
  - Resilience testing → 🎲🐜 Chaos (ALWAYS spawn one after Watcher)
401
485
 
402
486
  3. **Generate ant names for each worker:**
403
- ```bash
404
- bash .aether/aether-utils.sh generate-ant-name "builder"
405
- bash .aether/aether-utils.sh generate-ant-name "watcher"
406
- bash .aether/aether-utils.sh generate-ant-name "chaos"
407
- ```
487
+
488
+ Run using the Bash tool with description "Naming builder ant...": `bash .aether/aether-utils.sh generate-ant-name "builder"`
489
+ Run using the Bash tool with description "Naming watcher ant...": `bash .aether/aether-utils.sh generate-ant-name "watcher"`
490
+ Run using the Bash tool with description "Naming chaos ant...": `bash .aether/aether-utils.sh generate-ant-name "chaos"`
408
491
 
409
492
  Display spawn plan with caste emojis:
410
493
  ```
411
- 🐜 SPAWN PLAN
494
+ ━━━ 🐜 S P A W N P L A N ━━━
412
495
 
413
496
  Wave 1 — Parallel
414
497
  🔨🐜 {Builder-Name} Task {id} {description}
@@ -434,24 +517,57 @@ Total: {N} Builders + 1 Watcher + 1 Chaos = {N+2} spawns
434
517
 
435
518
  **Every spawn must show its caste emoji.**
436
519
 
520
+ ### Step 5.0.5: Select and Announce Workflow Pattern
521
+
522
+ Examine the phase name and task descriptions. Select the first matching pattern:
523
+
524
+ | Phase contains | Pattern |
525
+ |----------------|---------|
526
+ | "bug", "fix", "error", "broken", "failing" | Investigate-Fix |
527
+ | "research", "oracle", "explore", "investigate" | Deep Research |
528
+ | "refactor", "restructure", "clean", "reorganize" | Refactor |
529
+ | "security", "audit", "compliance", "accessibility", "license" | Compliance |
530
+ | "docs", "documentation", "readme", "guide" | Documentation Sprint |
531
+ | (default) | SPBV |
532
+
533
+ Display the selected pattern:
534
+ ```
535
+ ━━ Pattern: {pattern_name} ━━
536
+ {announce_line from Queen's Workflow Patterns definition}
537
+ ```
538
+
539
+ Store `selected_pattern` for inclusion in the BUILD SUMMARY (Step 7).
540
+
437
541
  ### Step 5.1: Spawn Wave 1 Workers (Parallel)
438
542
 
439
543
  **CRITICAL: Spawn ALL Wave 1 workers in a SINGLE message using multiple Task tool calls.**
440
544
 
441
- **First, mark build start in context:**
442
- ```bash
443
- bash .aether/aether-utils.sh context-update build-start {phase_id} {wave_1_worker_count} {wave_1_task_count}
545
+ **Announce the wave before spawning:**
546
+
547
+ Display the spawn announcement immediately before firing Task calls:
548
+
549
+ For single-caste waves (typical — all builders):
550
+ ```
551
+ ──── 🔨🐜 Spawning {N} Builders in parallel ────
444
552
  ```
445
553
 
446
- For each Wave 1 task, use Task tool with `subagent_type="aether-builder"` (DO NOT use run_in_background - multiple Task calls in a single message run in parallel and block until complete):
554
+ For mixed-caste waves (uncommon):
555
+ ```
556
+ ──── 🐜 Spawning {N} workers ({X} 🔨 Builder, {Y} 🔍 Scout) ────
557
+ ```
447
558
 
448
- Log each spawn and update swarm display:
449
- ```bash
450
- bash .aether/aether-utils.sh spawn-log "Queen" "builder" "{ant_name}" "{task_description}"
451
- bash .aether/aether-utils.sh swarm-display-update "{ant_name}" "builder" "excavating" "{task_description}" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 10
452
- bash .aether/aether-utils.sh context-update worker-spawn "{ant_name}" "builder" "{task_description}"
559
+ For a single worker:
560
+ ```
561
+ ──── 🔨🐜 Spawning {ant_name} {task_summary} ────
453
562
  ```
454
563
 
564
+ **First, mark build start in context:**
565
+ Run using the Bash tool with description "Marking build start...": `bash .aether/aether-utils.sh context-update build-start {phase_id} {wave_1_worker_count} {wave_1_task_count}`
566
+
567
+ For each Wave 1 task, use Task tool with `subagent_type="aether-builder"`, include `description: "🔨 Builder {Ant-Name}: {task_description}"` (DO NOT use run_in_background - multiple Task calls in a single message run in parallel and block until complete):
568
+
569
+ **PER WORKER:** Run using the Bash tool with description "Preparing worker {name}...": `bash .aether/aether-utils.sh spawn-log "Queen" "builder" "{ant_name}" "{task_description}" && bash .aether/aether-utils.sh swarm-display-update "{ant_name}" "builder" "excavating" "{task_description}" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 10 && bash .aether/aether-utils.sh context-update worker-spawn "{ant_name}" "builder" "{task_description}"`
570
+
455
571
  **Builder Worker Prompt (CLEAN OUTPUT):**
456
572
  ```
457
573
  You are {Ant-Name}, a 🔨🐜 Builder Ant.
@@ -464,20 +580,39 @@ Goal: "{colony_goal}"
464
580
 
465
581
  { queen_wisdom_section if any wisdom exists }
466
582
 
583
+ { pheromone_section if pheromone_section is not empty }
584
+
585
+ { if pheromone_section is not empty: }
586
+ IMPORTANT: REDIRECT signals above are HARD CONSTRAINTS. You MUST follow them. FOCUS and FEEDBACK are flexible guidance — use your judgment on relevance.
587
+ { end if }
588
+
589
+ **IMPORTANT:** When using the Bash tool for activity calls, always include a description parameter:
590
+ - activity-log calls → "Logging {action}..."
591
+ - swarm-display-update calls → "Updating build display..."
592
+ - pheromone-read calls → "Checking colony signals..."
593
+ - spawn-can-spawn calls → "Checking spawn budget..."
594
+ - generate-ant-name calls → "Naming sub-worker..."
595
+ - spawn-log calls → "Dispatching sub-worker..."
596
+
597
+ Use colony-flavored language, 4-8 words, trailing ellipsis.
598
+
467
599
  Work:
468
600
  1. Read .aether/workers.md for Builder discipline
469
601
  2. Implement task, write tests
470
- 3. Log activity: bash .aether/aether-utils.sh activity-log "ACTION" "{Ant-Name}" "description"
471
- 4. Update display: bash .aether/aether-utils.sh swarm-display-update "{Ant-Name}" "builder" "excavating" "current task" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' {progress} "fungus_garden" 50
602
+ 3. Log activity using Bash tool with description
603
+ 4. Update display using Bash tool with description
604
+ 5. At natural breakpoints (between tasks, after errors): Check for new signals using Bash tool with description
472
605
 
473
606
  Spawn sub-workers ONLY if 3x complexity:
474
- - Check: bash .aether/aether-utils.sh spawn-can-spawn {depth}
475
- - Generate name: bash .aether/aether-utils.sh generate-ant-name "builder"
607
+ - Check spawn budget using Bash tool with description
608
+ - Generate name using Bash tool with description
476
609
  - Announce: "🐜 Spawning {child_name} for {reason}"
477
- - Log: bash .aether/aether-utils.sh spawn-log "{Ant-Name}" "builder" "{child_name}" "{task}"
610
+ - Log spawn using Bash tool with description
611
+
612
+ Count your total tool calls (Read + Grep + Edit + Bash + Write) and report as tool_count.
478
613
 
479
614
  Return ONLY this JSON (no other text):
480
- {"ant_name": "{Ant-Name}", "task_id": "{id}", "status": "completed|failed|blocked", "summary": "What you did", "files_created": [], "files_modified": [], "tests_written": [], "blockers": []}
615
+ {"ant_name": "{Ant-Name}", "task_id": "{id}", "status": "completed|failed|blocked", "summary": "What you did", "tool_count": 0, "files_created": [], "files_modified": [], "tests_written": [], "blockers": []}
481
616
  ```
482
617
 
483
618
  **Queen Wisdom Section Template (injected only if wisdom exists):**
@@ -506,45 +641,130 @@ Return ONLY this JSON (no other text):
506
641
  --- END QUEEN WISDOM ---
507
642
  ```
508
643
 
644
+ **Active Signals Section (injected if pheromones exist):**
645
+ ```
646
+ --- ACTIVE SIGNALS (From User) ---
647
+
648
+ 🎯 PRIORITIES (FOCUS):
649
+ {for each priority}
650
+ - {priority}
651
+ {endfor}
652
+
653
+ ⚠️ CONSTRAINTS (REDIRECT - AVOID):
654
+ {for each constraint}
655
+ - {constraint.content}
656
+ {endfor}
657
+
658
+ --- END ACTIVE SIGNALS ---
659
+ ```
660
+
509
661
  ### Step 5.2: Process Wave 1 Results
510
662
 
511
663
  **Task calls return results directly (no TaskOutput needed).**
512
664
 
513
- **As each worker result arrives, immediately display:**
665
+ **As each worker result arrives, IMMEDIATELY display a single completion line — do not wait for other workers:**
666
+
667
+ For successful workers:
514
668
  ```
515
- 🔨🐜 {Builder-Name} completed Task {id}
516
- 📖{read_count} 🔍{grep_count} ✏️{edit_count} ⚡{bash_count} {elapsed_time}
669
+ 🔨 {Ant-Name}: {task_description} ({tool_count} tools) ✓
517
670
  ```
518
671
 
519
- Log and update swarm display:
520
- ```bash
521
- bash .aether/aether-utils.sh spawn-complete "{ant_name}" "completed" "{summary}"
522
- bash .aether/aether-utils.sh swarm-display-update "{ant_name}" "builder" "completed" "{task_description}" "Queen" '{"read":5,"grep":3,"edit":2,"bash":1}' 100 "fungus_garden" 100
523
- bash .aether/aether-utils.sh context-update worker-complete "{ant_name}" "completed"
672
+ For failed workers:
673
+ ```
674
+ 🔨 {Ant-Name}: {task_description} ✗ ({failure_reason} after {tool_count} tools)
524
675
  ```
525
676
 
526
- **Parse each worker's JSON output to collect:** status, files_created, files_modified, blockers
677
+ Where `tool_count` comes from the worker's returned JSON `tool_count` field, and `failure_reason` is extracted from the first item in the worker's `blockers` array or "unknown error" if empty.
527
678
 
528
- **Visual Mode: Render live display (if enabled):**
529
- If `visual_mode` is true, render the swarm display after all workers complete:
530
- ```bash
531
- bash .aether/aether-utils.sh swarm-display-inline "$build_id"
679
+ **PER WORKER:** Run using the Bash tool with description "Recording {name} completion...": `bash .aether/aether-utils.sh spawn-complete "{ant_name}" "completed" "{summary}" && bash .aether/aether-utils.sh swarm-display-update "{ant_name}" "builder" "completed" "{task_description}" "Queen" '{"read":5,"grep":3,"edit":2,"bash":1}' 100 "fungus_garden" 100 && bash .aether/aether-utils.sh context-update worker-complete "{ant_name}" "completed"`
680
+
681
+ **Check for total wave failure:**
682
+
683
+ After processing all worker results in this wave, check if EVERY worker returned `status: "failed"`. If ALL workers in the wave failed:
684
+
685
+ Display a prominent halt alert:
686
+ ```
687
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
688
+ ⚠ WAVE FAILURE — BUILD HALTED
689
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
690
+
691
+ All {N} workers in Wave {X} failed. Something is fundamentally wrong.
692
+
693
+ Failed workers:
694
+ {for each failed worker in this wave:}
695
+ {caste_emoji} {Ant-Name}: {task_description} ✗ ({failure_reason} after {tool_count} tools)
696
+ {end for}
697
+
698
+ Next steps:
699
+ /ant:flags Review blockers
700
+ /ant:swarm Auto-repair mode
532
701
  ```
533
702
 
703
+ Then STOP — do not proceed to subsequent waves, Watcher, or Chaos. Skip directly to Step 5.9 synthesis with `status: "failed"`.
704
+
705
+ **Partial wave failure — escalation path:**
706
+
707
+ If SOME (but not all) workers in the wave failed:
708
+ 1. For each failed worker, attempt Tier 3 escalation: Queen spawns a different caste for the same task
709
+ 2. If Tier 3 succeeds: continue to next wave
710
+ 3. If Tier 3 fails: display the Tier 4 ESCALATION banner (from Queen agent definition):
711
+
712
+ ```
713
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
714
+ ⚠ ESCALATION — QUEEN NEEDS YOU
715
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
716
+
717
+ Task: {failed task description}
718
+ Phase: {phase number} — {phase name}
719
+
720
+ Tried:
721
+ • Worker retry (2 attempts) — {what failed}
722
+ • Parent tried alternate approach — {what failed}
723
+ • Queen reassigned to {other caste} — {what failed}
724
+
725
+ Options:
726
+ A) {recommended option} — RECOMMENDED
727
+ B) {alternate option}
728
+ C) Skip and continue — this task will be marked blocked
729
+
730
+ Awaiting your choice.
731
+ ```
732
+
733
+ Log escalation as flag:
734
+ Run using the Bash tool with description "Logging escalation...": `bash .aether/aether-utils.sh flag-add "blocker" "{task title}" "{failure summary}" "escalation" {phase_number}`
735
+
736
+ If at least one worker succeeded, continue normally to the next wave.
737
+
738
+ **Parse each worker's JSON output to collect:** status, files_created, files_modified, blockers
739
+
740
+ **Visual Mode: Render live display (tmux only):**
741
+ If `visual_mode` is true AND the build is running inside a tmux session (`$TMUX` environment variable is set), run using the Bash tool with description "Rendering build progress...": `bash .aether/aether-utils.sh swarm-display-text "$build_id"`
742
+
743
+ If `$TMUX` is not set, skip this call entirely — do not attempt it. Chat users see the structured completion lines above instead.
744
+
534
745
  ### Step 5.3: Spawn Wave 2+ Workers (Sequential Waves)
535
746
 
747
+ **Before each subsequent wave, display a wave separator:**
748
+ ```
749
+ ━━━ 🐜 Wave {X} of {N} ━━━
750
+ ```
751
+ Then display the spawn announcement (same format as Step 5.1).
752
+
536
753
  Repeat Step 5.1-5.2 for each subsequent wave, waiting for previous wave to complete.
537
754
 
538
755
  ### Step 5.4: Spawn Watcher for Verification
539
756
 
540
757
  **MANDATORY: Always spawn a Watcher — testing must be independent.**
541
758
 
542
- Spawn the Watcher using Task tool with `subagent_type="aether-watcher"` (DO NOT use run_in_background - task blocks until complete):
543
-
544
- ```bash
545
- bash .aether/aether-utils.sh spawn-log "Queen" "watcher" "{watcher_name}" "Independent verification"
546
- bash .aether/aether-utils.sh swarm-display-update "{watcher_name}" "watcher" "observing" "Verification in progress" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "nursery" 50
759
+ **Announce the verification wave:**
547
760
  ```
761
+ ━━━ 👁️🐜 V E R I F I C A T I O N ━━━
762
+ ──── 👁️🐜 Spawning {watcher_name} ────
763
+ ```
764
+
765
+ Spawn the Watcher using Task tool with `subagent_type="aether-watcher"`, include `description: "👁️ Watcher {Watcher-Name}: Independent verification"` (DO NOT use run_in_background - task blocks until complete):
766
+
767
+ Run using the Bash tool with description "Dispatching watcher...": `bash .aether/aether-utils.sh spawn-log "Queen" "watcher" "{watcher_name}" "Independent verification" && bash .aether/aether-utils.sh swarm-display-update "{watcher_name}" "watcher" "observing" "Verification in progress" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "nursery" 50`
548
768
 
549
769
  **Watcher Worker Prompt (CLEAN OUTPUT):**
550
770
  ```
@@ -556,6 +776,16 @@ Files to verify:
556
776
  - Created: {list from builder results}
557
777
  - Modified: {list from builder results}
558
778
 
779
+ { pheromone_section if pheromone_section is not empty }
780
+
781
+ **IMPORTANT:** When using the Bash tool for activity calls, always include a description parameter:
782
+ - activity-log calls → "Logging {action}..."
783
+ - swarm-display-update calls → "Updating build display..."
784
+ - pheromone-read calls → "Checking colony signals..."
785
+ - spawn-log calls → "Dispatching sub-worker..."
786
+
787
+ Use colony-flavored language, 4-8 words, trailing ellipsis.
788
+
559
789
  Verification:
560
790
  1. Check files exist (Read each)
561
791
  2. Run build/type-check
@@ -563,11 +793,13 @@ Verification:
563
793
  4. Check success criteria: {list}
564
794
 
565
795
  Spawn sub-workers if needed:
566
- - Log: bash .aether/aether-utils.sh spawn-log "{Watcher-Name}" "watcher" "{child}" "{task}"
796
+ - Log spawn using Bash tool with description
567
797
  - Announce: "🐜 Spawning {child} to investigate {issue}"
568
798
 
799
+ Count your total tool calls (Read + Grep + Edit + Bash + Write) and report as tool_count.
800
+
569
801
  Return ONLY this JSON:
570
- {"ant_name": "{Watcher-Name}", "verification_passed": true|false, "files_verified": [], "issues_found": [], "quality_score": N, "recommendation": "proceed|fix_required"}
802
+ {"ant_name": "{Watcher-Name}", "verification_passed": true|false, "files_verified": [], "issues_found": [], "quality_score": N, "tool_count": 0, "recommendation": "proceed|fix_required"}
571
803
  ```
572
804
 
573
805
  ### Step 5.5: Process Watcher Results
@@ -576,31 +808,39 @@ Return ONLY this JSON:
576
808
 
577
809
  **Parse the Watcher's JSON response:** verification_passed, issues_found, quality_score, recommendation
578
810
 
811
+ **Display Watcher completion line:**
812
+
813
+ For successful verification:
814
+ ```
815
+ 👁️ {Watcher-Name}: Independent verification ({tool_count} tools) ✓
816
+ ```
817
+
818
+ For failed verification:
819
+ ```
820
+ 👁️ {Watcher-Name}: Independent verification ✗ ({issues_found count} issues after {tool_count} tools)
821
+ ```
822
+
579
823
  **Store results for synthesis in Step 5.7**
580
824
 
581
825
  **Update swarm display when Watcher completes:**
582
- ```bash
583
- bash .aether/aether-utils.sh swarm-display-update "{watcher_name}" "watcher" "completed" "Verification complete" "Queen" '{"read":3,"grep":2,"edit":0,"bash":1}' 100 "nursery" 100
584
- ```
826
+ Run using the Bash tool with description "Recording watcher completion...": `bash .aether/aether-utils.sh swarm-display-update "{watcher_name}" "watcher" "completed" "Verification complete" "Queen" '{"read":3,"grep":2,"edit":0,"bash":1}' 100 "nursery" 100`
585
827
 
586
828
  ### Step 5.6: Spawn Chaos Ant for Resilience Testing
587
829
 
588
830
  **After the Watcher completes, spawn a Chaos Ant to probe the phase work for edge cases and boundary conditions.**
589
831
 
590
- Generate a chaos ant name and log the spawn:
591
- ```bash
592
- bash .aether/aether-utils.sh generate-ant-name "chaos"
593
- bash .aether/aether-utils.sh spawn-log "Queen" "chaos" "{chaos_name}" "Resilience testing of Phase {id} work"
594
- bash .aether/aether-utils.sh swarm-display-update "{chaos_name}" "chaos" "probing" "Resilience testing" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "refuse_pile" 75
595
- ```
832
+ Generate a chaos ant name and dispatch:
833
+ Run using the Bash tool with description "Naming chaos ant...": `bash .aether/aether-utils.sh generate-ant-name "chaos"` (store as `{chaos_name}`)
834
+ Run using the Bash tool with description "Loading existing flags...": `bash .aether/aether-utils.sh flag-list --phase {phase_number}`
835
+ Parse the result and extract unresolved flag titles into a list: `{existing_flag_titles}` (comma-separated titles from `.result.flags[].title`). If no flags exist, set `{existing_flag_titles}` to "None".
836
+ Run using the Bash tool with description "Dispatching chaos ant...": `bash .aether/aether-utils.sh spawn-log "Queen" "chaos" "{chaos_name}" "Resilience testing of Phase {id} work" && bash .aether/aether-utils.sh swarm-display-update "{chaos_name}" "chaos" "probing" "Resilience testing" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "refuse_pile" 75`
596
837
 
597
- **Retrieve existing flags for this phase** (to avoid duplicate findings):
598
- ```bash
599
- bash .aether/aether-utils.sh flag-list --phase {phase_number}
838
+ **Announce the resilience testing wave:**
839
+ ```
840
+ ──── 🎲🐜 Spawning {chaos_name} — resilience testing ────
600
841
  ```
601
- Parse the result and extract unresolved flag titles into a list: `{existing_flag_titles}` (comma-separated titles from `.result.flags[].title`). If no flags exist, set `{existing_flag_titles}` to "None".
602
842
 
603
- Spawn the Chaos Ant using Task tool with `subagent_type="aether-chaos"` (DO NOT use run_in_background - task blocks until complete):
843
+ Spawn the Chaos Ant using Task tool with `subagent_type="aether-chaos"`, include `description: "🎲 Chaos {Chaos-Name}: Resilience testing"` (DO NOT use run_in_background - task blocks until complete):
604
844
  # FALLBACK: If "Agent type not found", use general-purpose and inject role: "You are a Chaos Ant - resilience tester that probes edge cases and boundary conditions."
605
845
 
606
846
  **Chaos Ant Prompt (CLEAN OUTPUT):**
@@ -614,13 +854,22 @@ Files to test:
614
854
 
615
855
  Skip these known issues: {existing_flag_titles}
616
856
 
857
+ **IMPORTANT:** When using the Bash tool for activity calls, always include a description parameter:
858
+ - activity-log calls → "Logging {action}..."
859
+ - swarm-display-update calls → "Updating build display..."
860
+ - pheromone-read calls → "Checking colony signals..."
861
+
862
+ Use colony-flavored language, 4-8 words, trailing ellipsis.
863
+
617
864
  Rules:
618
865
  - Max 5 scenarios
619
866
  - Read-only (don't modify code)
620
867
  - Focus: edge cases, boundaries, error handling
621
868
 
869
+ Count your total tool calls (Read + Grep + Edit + Bash + Write) and report as tool_count.
870
+
622
871
  Return ONLY this JSON:
623
- {"ant_name": "{Chaos-Name}", "scenarios_tested": 5, "findings": [{"id": 1, "category": "edge_case|boundary|error_handling", "severity": "critical|high|medium|low", "title": "...", "description": "..."}], "overall_resilience": "strong|moderate|weak", "summary": "..."}
872
+ {"ant_name": "{Chaos-Name}", "scenarios_tested": 5, "findings": [{"id": 1, "category": "edge_case|boundary|error_handling", "severity": "critical|high|medium|low", "title": "...", "description": "..."}], "overall_resilience": "strong|moderate|weak", "tool_count": 0, "summary": "..."}
624
873
  ```
625
874
 
626
875
  ### Step 5.7: Process Chaos Ant Results
@@ -629,41 +878,27 @@ Return ONLY this JSON:
629
878
 
630
879
  **Parse the Chaos Ant's JSON response:** findings, overall_resilience, summary
631
880
 
881
+ **Display Chaos completion line:**
882
+ ```
883
+ 🎲 {Chaos-Name}: Resilience testing ({tool_count} tools) ✓
884
+ ```
885
+
632
886
  **Store results for synthesis in Step 5.9**
633
887
 
634
888
  **Flag critical/high findings:**
635
889
 
636
890
  If any findings have severity `"critical"` or `"high"`:
637
- ```bash
638
- # Create a blocker flag for each critical/high chaos finding
639
- bash .aether/aether-utils.sh flag-add "blocker" "{finding.title}" "{finding.description}" "chaos-testing" {phase_number}
640
- ```
641
-
642
- Log the flag:
643
- ```bash
644
- bash .aether/aether-utils.sh activity-log "FLAG" "Chaos" "Created blocker: {finding.title}"
645
- ```
891
+ Run using the Bash tool with description "Flagging {finding.title}...": `bash .aether/aether-utils.sh flag-add "blocker" "{finding.title}" "{finding.description}" "chaos-testing" {phase_number} && bash .aether/aether-utils.sh activity-log "FLAG" "Chaos" "Created blocker: {finding.title}"`
646
892
 
647
893
  Log chaos ant completion and update swarm display:
648
- ```bash
649
- bash .aether/aether-utils.sh spawn-complete "{chaos_name}" "completed" "{summary}"
650
- bash .aether/aether-utils.sh swarm-display-update "{chaos_name}" "chaos" "completed" "Resilience testing done" "Queen" '{"read":2,"grep":1,"edit":0,"bash":0}' 100 "refuse_pile" 100
651
- ```
894
+ Run using the Bash tool with description "Recording chaos completion...": `bash .aether/aether-utils.sh spawn-complete "{chaos_name}" "completed" "{summary}" && bash .aether/aether-utils.sh swarm-display-update "{chaos_name}" "chaos" "completed" "Resilience testing done" "Queen" '{"read":2,"grep":1,"edit":0,"bash":0}' 100 "refuse_pile" 100`
652
895
 
653
896
  ### Step 5.8: Create Flags for Verification Failures
654
897
 
655
898
  If the Watcher reported `verification_passed: false` or `recommendation: "fix_required"`:
656
899
 
657
900
  For each issue in `issues_found`:
658
- ```bash
659
- # Create a blocker flag for each verification failure
660
- bash .aether/aether-utils.sh flag-add "blocker" "{issue_title}" "{issue_description}" "verification" {phase_number}
661
- ```
662
-
663
- Log the flag creation:
664
- ```bash
665
- bash .aether/aether-utils.sh activity-log "FLAG" "Watcher" "Created blocker: {issue_title}"
666
- ```
901
+ Run using the Bash tool with description "Flagging {issue_title}...": `bash .aether/aether-utils.sh flag-add "blocker" "{issue_title}" "{issue_description}" "verification" {phase_number} && bash .aether/aether-utils.sh activity-log "FLAG" "Watcher" "Created blocker: {issue_title}"`
667
902
 
668
903
  This ensures verification failures are persisted as blockers that survive context resets. Chaos Ant findings are flagged in Step 5.7.
669
904
 
@@ -705,46 +940,26 @@ Collect all worker outputs and create phase summary:
705
940
  **Graveyard Recording:**
706
941
  For each worker that returned `status: "failed"`:
707
942
  For each file in that worker's `files_modified` or `files_created`:
708
- ```bash
709
- bash .aether/aether-utils.sh grave-add "{file}" "{ant_name}" "{task_id}" {phase} "{first blocker or summary}"
710
- ```
711
- Log the grave marker:
712
- ```bash
713
- bash .aether/aether-utils.sh activity-log "GRAVE" "Queen" "Grave marker placed at {file} — {ant_name} failed: {summary}"
714
- ```
943
+ Run using the Bash tool with description "Recording failure grave...": `bash .aether/aether-utils.sh grave-add "{file}" "{ant_name}" "{task_id}" {phase} "{first blocker or summary}" && bash .aether/aether-utils.sh activity-log "GRAVE" "Queen" "Grave marker placed at {file} — {ant_name} failed: {summary}"`
715
944
 
716
945
  **Error Handoff Update:**
717
946
  If workers failed, update handoff with error context for recovery:
718
- ```bash
719
- cat > .aether/HANDOFF.md << 'HANDOFF_EOF'
720
- # Colony Session — Build Errors
721
-
722
- ## ⚠️ Build Status: ISSUES DETECTED
723
- **Phase:** {phase_number} — {phase_name}
724
- **Status:** Build completed with failures
725
- **Updated:** $(date -u +%Y-%m-%dT%H:%M:%SZ)
726
947
 
727
- ## Failed Workers
728
- {for each failed worker:}
729
- - {ant_name}: {failure_summary}
730
- {end for}
948
+ Resolve the build error handoff template path:
949
+ Check ~/.aether/system/templates/handoff-build-error.template.md first,
950
+ then .aether/templates/handoff-build-error.template.md.
731
951
 
732
- ## Grave Markers Placed
733
- {for each grave:}
734
- - {file}: {caution_level} caution
735
- {end for}
952
+ If no template found: output "Template missing: handoff-build-error.template.md. Run aether update to fix." and stop.
736
953
 
737
- ## Recovery Options
738
- 1. Review failures: Check `.aether/data/activity.log`
739
- 2. Fix and retry: `/ant:build {phase_number}`
740
- 3. Swarm fix: `/ant:swarm` for auto-repair
741
- 4. Manual fix: Address issues, then `/ant:continue`
954
+ Read the template file. Fill all {{PLACEHOLDER}} values:
955
+ - {{PHASE_NUMBER}} current phase number
956
+ - {{PHASE_NAME}} current phase name
957
+ - {{BUILD_TIMESTAMP}} current ISO-8601 UTC timestamp
958
+ - {{FAILED_WORKERS}} formatted list of failed workers (one "- {ant_name}: {failure_summary}" per line)
959
+ - {{GRAVE_MARKERS}} → formatted list of grave markers (one "- {file}: {caution_level} caution" per line)
742
960
 
743
- ## Session Note
744
- Build completed but workers failed. Grave markers placed.
745
- Review failures before advancing.
746
- HANDOFF_EOF
747
- ```
961
+ Remove the HTML comment lines at the top of the template.
962
+ Write the result to .aether/HANDOFF.md using the Write tool.
748
963
 
749
964
  Only fires when workers fail. Zero impact on successful builds.
750
965
 
@@ -822,8 +1037,7 @@ Return JSON:
822
1037
  Parse synthesis result. If `ui_touched` is true:
823
1038
 
824
1039
  ```
825
- Visual Checkpoint
826
- =================
1040
+ ━━━ 🖼️🐜 V I S U A L C H E C K P O I N T ━━━
827
1041
 
828
1042
  UI changes detected. Verify appearance before continuing.
829
1043
 
@@ -869,40 +1083,29 @@ jq -n \
869
1083
  "can_resume": true,
870
1084
  "note": "Phase build completed. Run /ant:continue to advance if verification passed."
871
1085
  }' > .aether/data/last-build-result.json
1086
+ ```
872
1087
 
873
- # Write handoff markdown
874
- cat > .aether/HANDOFF.md << 'HANDOFF_EOF'
875
- # Colony Session — Build Complete
876
-
877
- ## Quick Resume
878
- Run `/ant:continue` to advance phase, or `/ant:resume-colony` to restore full context.
879
-
880
- ## State at Build Completion
881
- - Goal: "$(jq -r '.goal' .aether/data/COLONY_STATE.json)"
882
- - Phase: {phase_number} — {phase_name}
883
- - Build Status: {synthesis.status}
884
- - Updated: $(date -u +%Y-%m-%dT%H:%M:%SZ)
885
-
886
- ## Build Summary
887
- {summary}
888
-
889
- ## Tasks
890
- - Completed: {synthesis.tasks_completed | length}
891
- - Failed: {synthesis.tasks_failed | length}
1088
+ Resolve the build success handoff template path:
1089
+ Check ~/.aether/system/templates/handoff-build-success.template.md first,
1090
+ then .aether/templates/handoff-build-success.template.md.
892
1091
 
893
- ## Files Changed
894
- - Created: {synthesis.files_created | length} files
895
- - Modified: {synthesis.files_modified | length} files
1092
+ If no template found: output "Template missing: handoff-build-success.template.md. Run aether update to fix." and stop.
896
1093
 
897
- ## Next Steps
898
- - If verification passed: `/ant:continue` to advance to next phase
899
- - If issues found: `/ant:flags` to review blockers
900
- - To pause: `/ant:pause-colony`
1094
+ Read the template file. Fill all {{PLACEHOLDER}} values:
1095
+ - {{GOAL}} colony goal (from COLONY_STATE.json)
1096
+ - {{PHASE_NUMBER}} current phase number
1097
+ - {{PHASE_NAME}} current phase name
1098
+ - {{BUILD_STATUS}} → synthesis.status
1099
+ - {{BUILD_TIMESTAMP}} → current ISO-8601 UTC timestamp
1100
+ - {{BUILD_SUMMARY}} → synthesis summary
1101
+ - {{TASKS_COMPLETED}} → count of completed tasks
1102
+ - {{TASKS_FAILED}} → count of failed tasks
1103
+ - {{FILES_CREATED}} → count of created files
1104
+ - {{FILES_MODIFIED}} → count of modified files
1105
+ - {{SESSION_NOTE}} → "Build succeeded — ready to advance." if status is completed, else "Build completed with issues — review before continuing."
901
1106
 
902
- ## Session Note
903
- $(if synthesis.status == "completed" then "Build succeeded — ready to advance." else "Build completed with issues — review before continuing." end)
904
- HANDOFF_EOF
905
- ```
1107
+ Remove the HTML comment lines at the top of the template.
1108
+ Write the result to .aether/HANDOFF.md using the Write tool.
906
1109
 
907
1110
  This ensures the handoff always reflects the latest build state, even if the session crashes before explicit pause.
908
1111
 
@@ -910,14 +1113,7 @@ This ensures the handoff always reflects the latest build state, even if the ses
910
1113
 
911
1114
  Log this build activity to `.aether/CONTEXT.md`:
912
1115
 
913
- ```bash
914
- bash .aether/aether-utils.sh context-update activity "build {phase_id}" "{synthesis.status}" "{files_created_count + files_modified_count}"
915
- ```
916
-
917
- Mark build as complete in context:
918
- ```bash
919
- bash .aether/aether-utils.sh context-update build-complete "{synthesis.status}" "{synthesis.status == 'completed' ? 'success' : 'failed'}"
920
- ```
1116
+ Run using the Bash tool with description "Updating build context...": `bash .aether/aether-utils.sh context-update activity "build {phase_id}" "{synthesis.status}" "{files_created_count + files_modified_count}" && bash .aether/aether-utils.sh context-update build-complete "{synthesis.status}" "{synthesis.status == 'completed' ? 'success' : 'failed'}"`
921
1117
 
922
1118
  Also update safe-to-clear status:
923
1119
  - If build completed successfully: `context-update safe-to-clear "YES" "Build complete, ready to continue"`
@@ -927,114 +1123,51 @@ Also update safe-to-clear status:
927
1123
 
928
1124
  **This step runs ONLY after synthesis is complete. All values come from actual worker results.**
929
1125
 
930
- **First, render the final swarm display showing all completed workers:**
931
- ```bash
932
- # Final swarm display update - mark Queen as completed
933
- bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Phase {id} complete" "Colony" '{"read":10,"grep":5,"edit":5,"bash":2}' 100 "fungus_garden" 100
1126
+ **Update swarm display state (always) and render (tmux only):**
1127
+ Run using the Bash tool with description "Recording build completion...": `bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Phase {id} complete" "Colony" '{"read":10,"grep":5,"edit":5,"bash":2}' 100 "fungus_garden" 100`
934
1128
 
935
- # Render the final swarm display
936
- bash .aether/aether-utils.sh swarm-display-inline "$build_id"
937
- ```
1129
+ If `$TMUX` is set, also run using the Bash tool with description "Rendering final swarm display...": `bash .aether/aether-utils.sh swarm-display-text "$build_id"`
938
1130
 
939
- The swarm display will show:
940
- - 🐜 All workers with their caste emojis (🔨🐜 Builder, 👁️🐜 Watcher, 🎲🐜 Chaos)
941
- - 📖 Tool usage stats (Read, Grep, Edit, Bash counts)
942
- - 🏠 Chamber activity map (Fungus Garden, Nursery, Refuse Pile)
943
- - ✅ Progress bars at 100% for completed work
944
- - 🌈 Color-coded by caste
1131
+ **Display BUILD SUMMARY (always shown, replaces compact/verbose split):**
945
1132
 
946
- **Then display build summary based on synthesis results AND `verbose_mode` from Step 1:**
1133
+ Calculate `total_tools` by summing `tool_count` from all worker return JSONs (builders + watcher + chaos).
1134
+ Calculate `elapsed` using `build_started_at_epoch` (epoch integer captured at Step 5 start by Plan 01): `$(( $(date +%s) - build_started_at_epoch ))` formatted as Xm Ys.
947
1135
 
948
- **If verbose_mode = false (compact output, ~12 lines):**
949
-
950
- ```
951
- 🔨 PHASE {id} {status_icon}
952
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
953
- 📍 {name}
954
- 📊 {status} | 📁 {files_created count} created, {files_modified count} modified
955
- 🐜 {spawn_count} workers | 🧪 {tests_total} tests {if all_passing}passing{else}{passed}/{total}{end if}
956
- {if learning.patterns_observed.length > 0:}🧠 +{patterns_observed.length} patterns{end if}
957
-
958
- {if synthesis.status == "failed" OR verification.recommendation == "fix_required":}
959
- ⚠️ BLOCKERS: {first 2 issues, comma-separated}
960
- {end if}
961
-
962
- ➡️ Next: {primary_command}
963
- --verbose for spawn tree, TDD details, patterns
964
1136
  ```
1137
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1138
+ B U I L D S U M M A R Y
1139
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1140
+ Phase {id}: {name}
1141
+ Pattern: {selected_pattern}
965
1142
 
966
- **Status icon logic:** completed+proceed = checkmark, blockers = warning, failed = X
967
-
968
- **Primary command logic:**
969
- - completed + proceed: `/ant:continue`
970
- - has blockers: `/ant:flags`
971
- - failed: `/ant:swarm`
972
-
973
- **If verbose_mode = true (full output):**
974
-
975
- ```
976
- 🔨🐜🏗️🐜🔨 ═══════════════════════════════════════════════════
977
- P H A S E {id} C O M P L E T E
978
- ═══════════════════════════════════════════════════ 🔨🐜🏗️🐜🔨
979
-
980
- 📍 Phase {id}: {name}
981
- 📊 Status: {status}
982
- 💾 Git Checkpoint: {commit_hash}
983
-
984
- 📝 Summary:
985
- {summary from synthesis}
986
-
987
- 🐜 Colony Work Tree:
988
- 👑Queen
989
- {for each spawn in spawn_tree:}
990
- ├── {caste_emoji}{ant_name}: {task} [{status}]
991
- {end for}
992
-
993
- ✅ Tasks Completed:
994
- {for each task in tasks_completed:}
995
- 🐜 {task_id}: done
996
- {end for}
997
- {for each task in tasks_failed:}
998
- ❌ {task_id}: failed
999
- {end for}
1000
-
1001
- 📁 Files: {files_created count} created, {files_modified count} modified
1002
-
1003
- {if tdd.tests_added > 0:}
1004
- 🧪 TDD: {tdd.cycles_completed} cycles | {tdd.tests_added} tests | {tdd.coverage_percent}% coverage
1005
- {end if}
1143
+ Workers: {pass_count} passed {fail_count} failed ({total} total)
1144
+ Tools: {total_tools} calls across all workers
1145
+ Duration: {elapsed}
1006
1146
 
1007
- {if learning.patterns_observed not empty:}
1008
- 🧠 Patterns Learned:
1009
- {for each pattern in learning.patterns_observed:}
1010
- 🐜 {pattern.trigger} {pattern.action}
1011
- {end for}
1012
- {end if}
1147
+ {if fail_count > 0:}
1148
+ Failed:
1149
+ {for each failed worker:}
1150
+ {caste_emoji} {Ant-Name}: {task_description} ✗ ({failure_reason} after {tool_count} tools)
1151
+ {end for}
1013
1152
 
1014
- {if debugging.issues_encountered > 0:}
1015
- 🔧 Debugging: {debugging.issues_resolved}/{debugging.issues_encountered} resolved
1153
+ Retry: /ant:swarm to auto-repair failed tasks, or /ant:flags to review blockers
1016
1154
  {end if}
1155
+ ```
1017
1156
 
1018
- 🤖 Model Routing:
1019
- {for each spawn in spawn_tree where model_context exists:}
1020
- {caste_emoji}{ant_name}: {model_context.assigned} {if model_context.assigned matches caste expectation:}✓{else}⚠️{end if}
1021
- {end for}
1022
- Proxy: {if proxy_healthy:}✓ Healthy @ http://localhost:4000{else}✗ Not running (using default model){end if}
1023
-
1024
- 🐜 Next Steps:
1025
- {if synthesis.status == "completed" AND verification.recommendation == "proceed":}
1026
- /ant:continue ➡️ Advance to next phase
1027
- /ant:feedback 💬 Give feedback first
1028
- {else if synthesis.status == "failed" OR verification.recommendation == "fix_required":}
1029
- ⚠️ BLOCKERS DETECTED - Cannot proceed until resolved
1030
- /ant:flags 🚩 View blockers
1031
- /ant:swarm 🔥 Auto-fix issues
1032
- {end if}
1157
+ **If verbose_mode is true**, additionally show the spawn tree and TDD details after the BUILD SUMMARY block (keep the existing verbose-only sections: Colony Work Tree, Tasks Completed, TDD, Patterns Learned, Debugging, Model Routing). Prepend with:
1158
+ ```
1159
+ ━━ Details (--verbose) ━━
1160
+ ```
1033
1161
 
1034
- 💾 State persisted safe to /clear, then run /ant:continue
1162
+ After displaying the BUILD SUMMARY (and optional verbose details), call the Next Up helper by running using the Bash tool with description "Displaying next steps...":
1163
+ ```bash
1164
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json 2>/dev/null || echo "IDLE")
1165
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json 2>/dev/null || echo "0")
1166
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json 2>/dev/null || echo "0")
1167
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
1035
1168
  ```
1036
1169
 
1037
- **Conditional Next Steps:** The suggestions above are based on actual worker results. If verification failed or blockers exist, `/ant:continue` is NOT suggested.
1170
+ **Routing Note:** The state-based Next Up block above routes based on colony state. If verification failed or blockers exist, review `/ant:flags` before continuing.
1038
1171
 
1039
1172
  **IMPORTANT:** Build does NOT update task statuses or advance state. Run `/ant:continue` to:
1040
1173
  - Mark tasks as completed
@@ -1045,6 +1178,4 @@ The swarm display will show:
1045
1178
 
1046
1179
  Update the session tracking file to enable `/ant:resume` after context clear:
1047
1180
 
1048
- ```bash
1049
- bash .aether/aether-utils.sh session-update "/ant:build {phase_id}" "/ant:continue" "Phase {phase_id} build completed: {synthesis.status}"
1050
- ```
1181
+ Run using the Bash tool with description "Saving build session...": `bash .aether/aether-utils.sh session-update "/ant:build {phase_id}" "/ant:continue" "Phase {phase_id} build completed: {synthesis.status}"`