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,7 +9,7 @@ You are the **Queen**. Show colony status.
9
9
 
10
10
  ### Step 0: Version Check (Non-blocking)
11
11
 
12
- Run using the Bash tool: `bash .aether/aether-utils.sh version-check 2>/dev/null || true`
12
+ Run using the Bash tool with description "Checking colony version...": `bash .aether/aether-utils.sh version-check-cached 2>/dev/null || true`
13
13
 
14
14
  If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
15
15
 
@@ -51,7 +51,7 @@ If `version` field is missing, "1.0", or "2.0":
51
51
 
52
52
  ### Step 1.5: Load State and Show Resumption Context
53
53
 
54
- Run using Bash tool: `bash .aether/aether-utils.sh load-state`
54
+ Run using the Bash tool with description "Loading colony state...": `bash .aether/aether-utils.sh load-state`
55
55
 
56
56
  If successful and goal is not null:
57
57
  1. Extract current_phase from state
@@ -69,7 +69,7 @@ If successful and goal is not null:
69
69
  - Read .aether/HANDOFF.md content for additional context
70
70
  - Remove .aether/HANDOFF.md after displaying (cleanup)
71
71
 
72
- Run: `bash .aether/aether-utils.sh unload-state` to release lock.
72
+ Run using the Bash tool with description "Releasing colony lock...": `bash .aether/aether-utils.sh unload-state` to release lock.
73
73
 
74
74
  ### Step 2: Compute Summary
75
75
 
@@ -77,13 +77,13 @@ From state, extract:
77
77
 
78
78
  ### Step 2.5: Gather Dream Information
79
79
 
80
- Run using Bash tool: `ls -1 .aether/dreams/*.md 2>/dev/null | wc -l`
80
+ Run using the Bash tool with description "Counting dream entries...": `ls -1 .aether/dreams/*.md 2>/dev/null | wc -l`
81
81
 
82
82
  Capture:
83
83
  - Dream count: number of .md files in .aether/dreams/
84
84
  - Latest dream: most recent file by name (files are timestamped: YYYY-MM-DD-HHMM.md)
85
85
 
86
- To get latest dream timestamp:
86
+ To get latest dream timestamp, run using the Bash tool with description "Finding latest dream...":
87
87
  ```bash
88
88
  ls -1 .aether/dreams/*.md 2>/dev/null | sort | tail -1 | sed 's/.*\/\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\)-\([0-9]\{4\}\).*/\1 \2/'
89
89
  ```
@@ -108,12 +108,21 @@ Read `.aether/data/constraints.json` if exists:
108
108
  - Constraints count: `constraints.length`
109
109
 
110
110
  **Flags:**
111
- Run: `bash .aether/aether-utils.sh flag-check-blockers`
111
+ Run using the Bash tool with description "Checking for blockers...": `bash .aether/aether-utils.sh flag-check-blockers`
112
112
  Extract:
113
113
  - Blockers count (critical, block advancement)
114
114
  - Issues count (high, warnings)
115
115
  - Notes count (low, informational)
116
116
 
117
+ **Escalation state:**
118
+ Count escalated flags by checking for blocker flags with source "escalation":
119
+
120
+ Run using the Bash tool with description "Checking escalation state...":
121
+ ```bash
122
+ escalated_count=$(bash .aether/aether-utils.sh flag-list --type blocker 2>/dev/null | jq '[.result.flags[] | select(.source == "escalation")] | length' 2>/dev/null || echo "0")
123
+ echo "escalated_count=$escalated_count"
124
+ ```
125
+
117
126
  **Instincts:**
118
127
  From `memory.instincts`:
119
128
  - Total count: `instincts.length`
@@ -129,7 +138,7 @@ From `memory.instincts`:
129
138
 
130
139
  ### Step 2.6: Detect Milestone
131
140
 
132
- Run using Bash tool: `bash .aether/aether-utils.sh milestone-detect`
141
+ Run using the Bash tool with description "Detecting colony milestone...": `bash .aether/aether-utils.sh milestone-detect`
133
142
 
134
143
  Extract from JSON result:
135
144
  - `milestone`: Current milestone name
@@ -137,6 +146,38 @@ Extract from JSON result:
137
146
  - `phases_completed`: Number of completed phases
138
147
  - `total_phases`: Total phases in plan
139
148
 
149
+ ### Step 2.7: Generate Progress Bars
150
+
151
+ Calculate progress metrics and generate visual bars.
152
+
153
+ Run using the Bash tool with description "Computing phase progress...":
154
+ ```bash
155
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
156
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
157
+
158
+ # Calculate task progress in current phase
159
+ if [[ "$current_phase" -gt 0 && "$current_phase" -le "$total_phases" ]]; then
160
+ phase_idx=$((current_phase - 1))
161
+ tasks_completed=$(jq -r ".plan.phases[$phase_idx].tasks // [] | map(select(.status == \"completed\")) | length" .aether/data/COLONY_STATE.json)
162
+ tasks_total=$(jq -r ".plan.phases[$phase_idx].tasks // [] | length" .aether/data/COLONY_STATE.json)
163
+ phase_name=$(jq -r ".plan.phases[$phase_idx].name // \"Unnamed\"" .aether/data/COLONY_STATE.json)
164
+ else
165
+ tasks_completed=0
166
+ tasks_total=0
167
+ phase_name="No plan created"
168
+ fi
169
+
170
+ # Generate progress bars
171
+ phase_bar=$(bash .aether/aether-utils.sh generate-progress-bar "$current_phase" "$total_phases" 20)
172
+ task_bar=$(bash .aether/aether-utils.sh generate-progress-bar "$tasks_completed" "$tasks_total" 20)
173
+
174
+ echo "phase_bar=$phase_bar"
175
+ echo "task_bar=$task_bar"
176
+ echo "phase_name=$phase_name"
177
+ ```
178
+
179
+ Store `phase_bar`, `task_bar`, and `phase_name` values for display in Step 3.
180
+
140
181
  ### Step 3: Display
141
182
 
142
183
  Output format:
@@ -146,30 +187,27 @@ Output format:
146
187
  (o o) AETHER COLONY
147
188
  | O | Status Report
148
189
  `-`
149
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
190
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
150
191
 
151
192
  👑 Goal: <goal (truncated to 60 chars)>
152
193
 
153
- 📍 Phase <N>/<M>: <phase name>
154
- Tasks: <completed>/<total> complete
194
+ 📍 Progress
195
+ Phase: [████████░░░░░░░░░░░░] <N>/<M> phases
196
+ Tasks: [████████████████░░░░] <completed>/<total> tasks in Phase <N>
155
197
 
156
198
  🎯 Focus: <focus_count> areas | 🚫 Avoid: <constraints_count> patterns
157
199
  🧠 Instincts: <total> learned (<high_confidence> strong)
158
200
  🚩 Flags: <blockers> blockers | <issues> issues | <notes> notes
201
+ {if escalated_count > 0:}
202
+ ⚠️ Escalated: {escalated_count} task(s) awaiting your decision
203
+ {end if}
159
204
  🏆 Milestone: <milestone> (<version>)
160
205
  💭 Dreams: <dream_count> recorded (latest: <latest_dream>)
161
206
 
162
207
  State: <state>
163
- Next: <suggested_command> <phase_context>
164
208
  ```
165
209
 
166
- **Phase context for Next line:** Include the phase name inline with the suggestion:
167
- - READY → `Next: /ant:build 3 Phase 3: Add Authentication`
168
- - EXECUTING → `Next: /ant:continue Phase 3: Add Authentication`
169
- - PLANNING → `Next: /ant:plan`
170
- - IDLE → `Next: /ant:init`
171
-
172
- Look up the phase name from `plan.phases[current_phase].name` and append it.
210
+ Use the `phase_bar` and `task_bar` values computed in Step 2.7 for the actual bar characters and counts.
173
211
 
174
212
  **If instincts exist, also show top 3:**
175
213
  ```
@@ -179,23 +217,24 @@ Look up the phase name from `plan.phases[current_phase].name` and append it.
179
217
  [0.7] 🐜 debugging: Trace to root cause first
180
218
  ```
181
219
 
182
- **Suggested command logic (use actual values, not templates):**
183
-
184
- Calculate `next_phase = current_phase + 1` from state.
185
-
186
- Generate the suggested command based on colony state:
187
- - IDLE -> `/ant:init`
188
- - READY -> `/ant:build {next_phase}` (e.g., if current_phase is 2, output `/ant:build 3`)
189
- - EXECUTING -> `/ant:continue`
190
- - PLANNING -> `/ant:plan`
191
-
192
- The output must be a copy-pasteable command with real numbers, not placeholders.
193
-
194
220
  **Dream display:**
195
221
  - If no dreams exist: `💭 Dreams: None recorded`
196
222
  - If dreams exist: `💭 Dreams: <count> recorded (latest: YYYY-MM-DD HH:MM)`
197
223
 
198
224
  **Edge cases:**
199
- - No phases yet: "Phase 0/0: No plan created"
200
- - No tasks in phase: "Tasks: 0/0 complete"
225
+ - No phases yet: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 phases`
226
+ - No tasks in phase: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 tasks in Phase 0`
201
227
  - No constraints file: "Constraints: 0 focus, 0 avoid"
228
+
229
+ **At the end of the output, generate the Next Up block:**
230
+
231
+ Run using the Bash tool with description "Generating next steps...":
232
+ ```bash
233
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
234
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
235
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
236
+
237
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
238
+ ```
239
+
240
+ This auto-generates state-based recommendations (IDLE → init, READY → build, EXECUTING → continue, PLANNING → plan).
@@ -96,9 +96,9 @@ fi
96
96
 
97
97
  Display header:
98
98
  ```
99
- 🔥🐜🗡️🐜🔥 ═══════════════════════════════════════════════
100
- S W A R M D E P L O Y E D
101
- ═══════════════════════════════════════════════ 🔥🐜🗡️🐜🔥
99
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
100
+ 🔥🐜🗡️🐜🔥 S W A R M D E P L O Y E D
101
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
102
102
 
103
103
  🎯 Target: "{problem description}"
104
104
  📍 Swarm ID: {swarm_id}
@@ -108,7 +108,7 @@ Display header:
108
108
 
109
109
  #### Step 3: Create Git Checkpoint
110
110
 
111
- Before any investigation that might lead to fixes:
111
+ Before any investigation that might lead to fixes, run using the Bash tool:
112
112
  ```bash
113
113
  bash .aether/aether-utils.sh autofix-checkpoint "pre-swarm-$SWARM_ID"
114
114
  ```
@@ -142,12 +142,9 @@ git log --oneline -20 2>/dev/null || echo "(no git history)"
142
142
 
143
143
  Use the **Task** tool to spawn 4 scouts **in a single message** (parallel execution):
144
144
 
145
- Log each scout to swarm display before spawning:
145
+ Log each scout to swarm display before spawning (consolidated):
146
146
  ```bash
147
- bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-Archaeologist" "scout" "excavating" "Git history investigation" "Queen" '{"read":0,"grep":0,"edit":0,"bash":3}' 0
148
- bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-PatternHunter" "scout" "excavating" "Pattern search for similar code" "Queen" '{"read":5,"grep":10,"edit":0,"bash":0}' 0
149
- bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-ErrorAnalyst" "scout" "excavating" "Error chain analysis" "Queen" '{"read":3,"grep":5,"edit":0,"bash":2}' 0
150
- bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-WebResearcher" "scout" "excavating" "External source research" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0
147
+ bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-Archaeologist" "scout" "excavating" "Git history investigation" "Queen" '{"read":0,"grep":0,"edit":0,"bash":3}' 0 && bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-PatternHunter" "scout" "excavating" "Pattern search for similar code" "Queen" '{"read":5,"grep":10,"edit":0,"bash":0}' 0 && bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-ErrorAnalyst" "scout" "excavating" "Error chain analysis" "Queen" '{"read":3,"grep":5,"edit":0,"bash":2}' 0 && bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-WebResearcher" "scout" "excavating" "External source research" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0
151
148
  ```
152
149
 
153
150
  **Scout 1: 🏛️ Git Archaeologist** (use Task tool with `subagent_type="aether-archaeologist"`)
@@ -219,14 +216,9 @@ Wait for all 4 scouts to complete.
219
216
 
220
217
  #### Step 6: Collect and Cross-Compare Findings
221
218
 
222
- As each scout returns, add their findings:
219
+ As each scout returns, add their findings and update display (consolidated):
223
220
  ```bash
224
- bash .aether/aether-utils.sh swarm-findings-add "{swarm_id}" "{scout_type}" "{confidence}" '{finding_json}'
225
- ```
226
-
227
- Update scout status in swarm display to "completed":
228
- ```bash
229
- bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-Archaeologist" "scout" "completed" "Git history investigation" "Queen" '{"read":3,"grep":0,"edit":0,"bash":5}' 150
221
+ bash .aether/aether-utils.sh swarm-findings-add "{swarm_id}" "{scout_type}" "{confidence}" '{finding_json}' && bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-Archaeologist" "scout" "completed" "Git history investigation" "Queen" '{"read":3,"grep":0,"edit":0,"bash":5}' 150
230
222
  ```
231
223
 
232
224
  Display each scout's report as they complete:
@@ -244,6 +236,11 @@ Display each scout's report as they complete:
244
236
  {summary of finding}
245
237
  ```
246
238
 
239
+ Display colony activity summary:
240
+ ```bash
241
+ bash .aether/aether-utils.sh swarm-display-text "$SWARM_ID"
242
+ ```
243
+
247
244
  #### Step 7: Synthesize Solution
248
245
 
249
246
  Cross-compare all findings:
@@ -254,9 +251,9 @@ Cross-compare all findings:
254
251
 
255
252
  Rank fix options:
256
253
  ```
257
- ═══════════════════════════════════════════════
254
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
258
255
  S O L U T I O N R A N K I N G
259
- ═══════════════════════════════════════════════
256
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
260
257
 
261
258
  #1 [0.85 confidence] {best solution}
262
259
  Evidence: {supporting scouts}
@@ -309,14 +306,9 @@ Inject learnings:
309
306
  - Add FOCUS for the pattern that worked (to constraints.json)
310
307
  - Add REDIRECT for the anti-pattern that caused the bug (to constraints.json)
311
308
 
312
- Set solution in swarm findings:
309
+ Set solution in swarm findings and log success (consolidated):
313
310
  ```bash
314
- bash .aether/aether-utils.sh swarm-solution-set "{swarm_id}" '{solution_json}'
315
- ```
316
-
317
- Log success:
318
- ```bash
319
- bash .aether/aether-utils.sh activity-log "SWARM_SUCCESS" "Queen" "Swarm {swarm_id} fixed: {brief description}"
311
+ bash .aether/aether-utils.sh swarm-solution-set "{swarm_id}" '{solution_json}' && bash .aether/aether-utils.sh activity-log "SWARM_SUCCESS" "Queen" "Swarm {swarm_id} fixed: {brief description}"
320
312
  ```
321
313
 
322
314
  **If verification fails:**
@@ -329,14 +321,9 @@ Tests: {status}
329
321
  Attempting rollback...
330
322
  ```
331
323
 
332
- Rollback:
333
- ```bash
334
- bash .aether/aether-utils.sh autofix-rollback "{checkpoint_type}" "{checkpoint_ref}"
335
- ```
336
-
337
- Log failure:
324
+ Rollback and log failure (consolidated):
338
325
  ```bash
339
- bash .aether/aether-utils.sh activity-log "SWARM_FAILED" "Queen" "Swarm {swarm_id} fix failed verification"
326
+ bash .aether/aether-utils.sh autofix-rollback "{checkpoint_type}" "{checkpoint_ref}" ; bash .aether/aether-utils.sh activity-log "SWARM_FAILED" "Queen" "Swarm {swarm_id} fix failed verification"
340
327
  ```
341
328
 
342
329
  Track attempt count. If this is the 3rd failure on the same issue:
@@ -360,20 +347,15 @@ Swarm will not attempt further fixes on this issue.
360
347
 
361
348
  #### Step 10: Cleanup
362
349
 
363
- Clear swarm display:
350
+ Clear swarm display and archive findings (consolidated):
364
351
  ```bash
365
- bash .aether/aether-utils.sh swarm-display-init "complete-{swarm_id}"
352
+ bash .aether/aether-utils.sh swarm-display-init "complete-{swarm_id}" && bash .aether/aether-utils.sh swarm-cleanup "{swarm_id}" --archive
366
353
  ```
367
354
 
368
- Archive swarm findings:
355
+ Generate the state-based Next Up block:
369
356
  ```bash
370
- bash .aether/aether-utils.sh swarm-cleanup "{swarm_id}" --archive
371
- ```
372
-
373
- Display next steps:
374
- ```
375
- 🐜 Next steps:
376
- /ant:continue ⏭️ Verify and advance phase
377
- /ant:status 📊 View colony status
378
- /ant:flags 🚩 Check remaining blockers
357
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
358
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
359
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
360
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
379
361
  ```