aether-colony 3.1.4 → 3.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/ant/archaeology.md +12 -0
- package/.claude/commands/ant/build.md +382 -319
- package/.claude/commands/ant/chaos.md +23 -1
- package/.claude/commands/ant/colonize.md +147 -87
- package/.claude/commands/ant/continue.md +213 -23
- package/.claude/commands/ant/council.md +22 -0
- package/.claude/commands/ant/dream.md +18 -0
- package/.claude/commands/ant/entomb.md +178 -6
- package/.claude/commands/ant/init.md +87 -13
- package/.claude/commands/ant/lay-eggs.md +45 -5
- package/.claude/commands/ant/oracle.md +82 -9
- package/.claude/commands/ant/organize.md +2 -2
- package/.claude/commands/ant/pause-colony.md +86 -28
- package/.claude/commands/ant/phase.md +26 -0
- package/.claude/commands/ant/plan.md +204 -111
- package/.claude/commands/ant/resume-colony.md +23 -1
- package/.claude/commands/ant/resume.md +159 -0
- package/.claude/commands/ant/seal.md +177 -3
- package/.claude/commands/ant/swarm.md +78 -97
- package/.claude/commands/ant/verify-castes.md +7 -7
- package/.claude/commands/ant/watch.md +17 -0
- package/.opencode/agents/aether-ambassador.md +97 -0
- package/.opencode/agents/aether-archaeologist.md +91 -0
- package/.opencode/agents/aether-architect.md +66 -0
- package/.opencode/agents/aether-auditor.md +111 -0
- package/.opencode/agents/aether-builder.md +28 -10
- package/.opencode/agents/aether-chaos.md +98 -0
- package/.opencode/agents/aether-chronicler.md +80 -0
- package/.opencode/agents/aether-gatekeeper.md +107 -0
- package/.opencode/agents/aether-guardian.md +107 -0
- package/.opencode/agents/aether-includer.md +108 -0
- package/.opencode/agents/aether-keeper.md +106 -0
- package/.opencode/agents/aether-measurer.md +119 -0
- package/.opencode/agents/aether-probe.md +91 -0
- package/.opencode/agents/aether-queen.md +72 -19
- package/.opencode/agents/aether-route-setter.md +85 -0
- package/.opencode/agents/aether-sage.md +98 -0
- package/.opencode/agents/aether-scout.md +33 -15
- package/.opencode/agents/aether-surveyor-disciplines.md +334 -0
- package/.opencode/agents/aether-surveyor-nest.md +272 -0
- package/.opencode/agents/aether-surveyor-pathogens.md +209 -0
- package/.opencode/agents/aether-surveyor-provisions.md +277 -0
- package/.opencode/agents/aether-tracker.md +91 -0
- package/.opencode/agents/aether-watcher.md +30 -12
- package/.opencode/agents/aether-weaver.md +87 -0
- package/.opencode/agents/workers.md +1034 -0
- package/.opencode/commands/ant/archaeology.md +44 -26
- package/.opencode/commands/ant/build.md +327 -295
- package/.opencode/commands/ant/chaos.md +32 -4
- package/.opencode/commands/ant/colonize.md +119 -93
- package/.opencode/commands/ant/continue.md +98 -10
- package/.opencode/commands/ant/council.md +28 -0
- package/.opencode/commands/ant/dream.md +24 -0
- package/.opencode/commands/ant/entomb.md +73 -1
- package/.opencode/commands/ant/feedback.md +8 -2
- package/.opencode/commands/ant/flag.md +9 -3
- package/.opencode/commands/ant/flags.md +8 -2
- package/.opencode/commands/ant/focus.md +8 -2
- package/.opencode/commands/ant/help.md +12 -0
- package/.opencode/commands/ant/init.md +49 -4
- package/.opencode/commands/ant/lay-eggs.md +30 -2
- package/.opencode/commands/ant/oracle.md +39 -7
- package/.opencode/commands/ant/organize.md +9 -3
- package/.opencode/commands/ant/pause-colony.md +54 -1
- package/.opencode/commands/ant/phase.md +36 -4
- package/.opencode/commands/ant/plan.md +225 -117
- package/.opencode/commands/ant/redirect.md +8 -2
- package/.opencode/commands/ant/resume-colony.md +51 -26
- package/.opencode/commands/ant/seal.md +76 -0
- package/.opencode/commands/ant/status.md +50 -20
- package/.opencode/commands/ant/swarm.md +108 -104
- package/.opencode/commands/ant/tunnels.md +107 -2
- package/CHANGELOG.md +21 -0
- package/README.md +199 -86
- package/bin/cli.js +142 -25
- package/bin/generate-commands.sh +100 -16
- package/bin/lib/caste-colors.js +5 -5
- package/bin/lib/errors.js +16 -0
- package/bin/lib/file-lock.js +279 -44
- package/bin/lib/state-sync.js +206 -23
- package/bin/lib/update-transaction.js +206 -24
- package/bin/sync-to-runtime.sh +129 -0
- package/package.json +2 -2
- package/runtime/CONTEXT.md +160 -0
- package/runtime/aether-utils.sh +1421 -55
- package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +1343 -0
- package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +2642 -0
- package/runtime/docs/PHEROMONE-INJECTION.md +240 -0
- package/runtime/docs/PHEROMONE-INTEGRATION.md +192 -0
- package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +426 -0
- package/runtime/docs/README.md +94 -0
- package/runtime/docs/VISUAL-OUTPUT-SPEC.md +219 -0
- package/runtime/docs/biological-reference.md +272 -0
- package/runtime/docs/codebase-review.md +399 -0
- package/runtime/docs/command-sync.md +164 -0
- package/runtime/docs/implementation-learnings.md +89 -0
- package/runtime/docs/known-issues.md +217 -0
- package/runtime/docs/namespace.md +148 -0
- package/runtime/docs/planning-discipline.md +159 -0
- package/runtime/lib/queen-utils.sh +729 -0
- package/runtime/model-profiles.yaml +100 -0
- package/runtime/recover.sh +136 -0
- package/runtime/templates/QUEEN.md.template +79 -0
- package/runtime/utils/atomic-write.sh +5 -5
- package/runtime/utils/chamber-utils.sh +6 -3
- package/runtime/utils/error-handler.sh +200 -0
- package/runtime/utils/queen-to-md.xsl +395 -0
- package/runtime/utils/spawn-tree.sh +428 -0
- package/runtime/utils/spawn-with-model.sh +56 -0
- package/runtime/utils/state-loader.sh +215 -0
- package/runtime/utils/swarm-display.sh +5 -5
- package/runtime/utils/watch-spawn-tree.sh +90 -22
- package/runtime/utils/xml-compose.sh +247 -0
- package/runtime/utils/xml-core.sh +186 -0
- package/runtime/utils/xml-utils.sh +2161 -0
- package/runtime/verification-loop.md +1 -1
- package/runtime/workers-new-castes.md +516 -0
- package/runtime/workers.md +20 -8
- package/.aether/visualizations/anthill-stages/brood-stable.txt +0 -26
- package/.aether/visualizations/anthill-stages/crowned-anthill.txt +0 -30
- package/.aether/visualizations/anthill-stages/first-mound.txt +0 -18
- package/.aether/visualizations/anthill-stages/open-chambers.txt +0 -24
- package/.aether/visualizations/anthill-stages/sealed-chambers.txt +0 -28
- package/.aether/visualizations/anthill-stages/ventilated-nest.txt +0 -27
|
@@ -53,22 +53,24 @@ After displaying context, run: `bash .aether/aether-utils.sh unload-state` to re
|
|
|
53
53
|
1. Extract the phase number (first argument)
|
|
54
54
|
2. Check remaining arguments for flags:
|
|
55
55
|
- If contains `--verbose` or `-v`: set `verbose_mode = true`
|
|
56
|
+
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
56
57
|
- If contains `--model <name>` or `-m <name>`: set `cli_model_override = <name>`
|
|
57
|
-
- Otherwise: set
|
|
58
|
+
- Otherwise: set `visual_mode = true` (visual is default)
|
|
58
59
|
|
|
59
60
|
If the phase number is empty or not a number:
|
|
60
61
|
|
|
61
62
|
```
|
|
62
|
-
Usage: /ant:build <phase_number> [--verbose|-v] [--model <model>|-m <model>]
|
|
63
|
+
Usage: /ant:build <phase_number> [--verbose|-v] [--no-visual] [--model <model>|-m <model>]
|
|
63
64
|
|
|
64
65
|
Options:
|
|
65
66
|
--verbose, -v Show full completion details (spawn tree, TDD, patterns)
|
|
67
|
+
--no-visual Disable real-time visual display (visual is on by default)
|
|
66
68
|
--model, -m <name> Override model for this build (one-time)
|
|
67
69
|
|
|
68
70
|
Examples:
|
|
69
|
-
/ant:build 1 Build Phase 1 (
|
|
70
|
-
/ant:build 1 --verbose Build Phase 1 (full details)
|
|
71
|
-
/ant:build
|
|
71
|
+
/ant:build 1 Build Phase 1 (with visual display)
|
|
72
|
+
/ant:build 1 --verbose Build Phase 1 (full details + visual)
|
|
73
|
+
/ant:build 1 --no-visual Build Phase 1 without visual display
|
|
72
74
|
/ant:build 1 --model glm-5 Build Phase 1 with glm-5 for all workers
|
|
73
75
|
```
|
|
74
76
|
|
|
@@ -83,8 +85,6 @@ If `cli_model_override` is set:
|
|
|
83
85
|
- Stop here
|
|
84
86
|
3. If valid: Display `Using override model: {model}`
|
|
85
87
|
|
|
86
|
-
Read `.aether/data/COLONY_STATE.json`.
|
|
87
|
-
|
|
88
88
|
**Auto-upgrade old state:**
|
|
89
89
|
If `version` field is missing, "1.0", or "2.0":
|
|
90
90
|
1. Preserve: `goal`, `state`, `current_phase`, `plan.phases`
|
|
@@ -99,18 +99,10 @@ Extract:
|
|
|
99
99
|
- `memory` for decisions/learnings
|
|
100
100
|
|
|
101
101
|
**Validate:**
|
|
102
|
-
- If `goal: null` -> output `No colony initialized. Run /ant:init first.` and stop.
|
|
103
102
|
- If `plan.phases` is empty -> output `No project plan. Run /ant:plan first.` and stop.
|
|
104
103
|
- Find the phase matching the requested ID. If not found -> output `Phase {id} not found.` and stop.
|
|
105
104
|
- If the phase status is `"completed"` -> output `Phase {id} already completed.` and stop.
|
|
106
105
|
|
|
107
|
-
**Auto-Recovery Header (Session Start):**
|
|
108
|
-
If `goal` exists and state is valid, output a brief context line:
|
|
109
|
-
```
|
|
110
|
-
🔄 Resuming: Phase {current_phase} - {phase_name}
|
|
111
|
-
```
|
|
112
|
-
This helps recover context after session clears. Continue immediately (non-blocking).
|
|
113
|
-
|
|
114
106
|
### Step 1.5: Blocker Advisory (Non-blocking)
|
|
115
107
|
|
|
116
108
|
Check for unresolved blocker flags on the requested phase:
|
|
@@ -160,8 +152,9 @@ git rev-parse --git-dir 2>/dev/null
|
|
|
160
152
|
```
|
|
161
153
|
|
|
162
154
|
- **If succeeds** (is a git repo):
|
|
163
|
-
1. Check for changes:
|
|
164
|
-
2. **If changes exist**: `git stash push
|
|
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`
|
|
157
|
+
- IMPORTANT: Never use `--include-untracked` — it stashes ALL files including user work!
|
|
165
158
|
- Verify: `git stash list | head -1 | grep "aether-checkpoint"` — warn if empty
|
|
166
159
|
- Store checkpoint as `{type: "stash", ref: "aether-checkpoint: pre-phase-$PHASE_NUMBER"}`
|
|
167
160
|
3. **If clean working tree**: Record `HEAD` hash via `git rev-parse HEAD`
|
|
@@ -198,7 +191,90 @@ If file doesn't exist or is empty:
|
|
|
198
191
|
CONSTRAINTS: (none)
|
|
199
192
|
```
|
|
200
193
|
|
|
201
|
-
### Step 4.
|
|
194
|
+
### Step 4.0: Load Territory Survey
|
|
195
|
+
|
|
196
|
+
Check if territory survey exists and load relevant documents:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
bash .aether/aether-utils.sh survey-load "{phase_name}" 2>/dev/null
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Parse the JSON response:**
|
|
203
|
+
- If `.ok` is false: Set `survey_docs = null` and skip survey loading
|
|
204
|
+
- If successful: Extract `.docs` (comma-separated list) and `.dir`
|
|
205
|
+
|
|
206
|
+
**Determine phase type from phase name:**
|
|
207
|
+
| Phase Contains | Documents to Load |
|
|
208
|
+
|----------------|-------------------|
|
|
209
|
+
| UI, frontend, component, button, page | DISCIPLINES.md, CHAMBERS.md |
|
|
210
|
+
| API, endpoint, backend, route | BLUEPRINT.md, DISCIPLINES.md |
|
|
211
|
+
| database, schema, model, migration | BLUEPRINT.md, PROVISIONS.md |
|
|
212
|
+
| test, spec, coverage | SENTINEL-PROTOCOLS.md, DISCIPLINES.md |
|
|
213
|
+
| integration, external, client | TRAILS.md, PROVISIONS.md |
|
|
214
|
+
| refactor, cleanup, debt | PATHOGENS.md, BLUEPRINT.md |
|
|
215
|
+
| setup, config, initialize | PROVISIONS.md, CHAMBERS.md |
|
|
216
|
+
| *default* | PROVISIONS.md, BLUEPRINT.md |
|
|
217
|
+
|
|
218
|
+
**Read the relevant survey documents** from `.aether/data/survey/`:
|
|
219
|
+
- Extract key patterns to follow
|
|
220
|
+
- Note file locations for new code
|
|
221
|
+
- Identify known concerns to avoid
|
|
222
|
+
|
|
223
|
+
**Display summary:**
|
|
224
|
+
```
|
|
225
|
+
🗺️ SURVEY LOADED
|
|
226
|
+
================
|
|
227
|
+
{for each doc loaded}
|
|
228
|
+
{emoji} {filename} — {brief description}
|
|
229
|
+
{/for}
|
|
230
|
+
|
|
231
|
+
{if no survey}
|
|
232
|
+
(No territory survey — run /ant:colonize for deeper context)
|
|
233
|
+
{/if}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Store for builder injection:**
|
|
237
|
+
- `survey_patterns` — patterns to follow
|
|
238
|
+
- `survey_locations` — where to place files
|
|
239
|
+
- `survey_concerns` — concerns to avoid
|
|
240
|
+
|
|
241
|
+
### Step 4.1: Load QUEEN.md Wisdom
|
|
242
|
+
|
|
243
|
+
Call `queen-read` to extract eternal wisdom for worker priming:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
bash .aether/aether-utils.sh queen-read 2>/dev/null
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Parse the JSON response:**
|
|
250
|
+
- If `.ok` is false or command fails: Set `queen_wisdom = null` and skip wisdom injection
|
|
251
|
+
- If successful: Extract wisdom sections from `.result.wisdom`
|
|
252
|
+
|
|
253
|
+
**Store wisdom variables:**
|
|
254
|
+
```
|
|
255
|
+
queen_philosophies = .result.wisdom.philosophies (if .result.priming.has_philosophies)
|
|
256
|
+
queen_patterns = .result.wisdom.patterns (if .result.priming.has_patterns)
|
|
257
|
+
queen_redirects = .result.wisdom.redirects (if .result.priming.has_redirects)
|
|
258
|
+
queen_stack_wisdom = .result.wisdom.stack_wisdom (if .result.priming.has_stack_wisdom)
|
|
259
|
+
queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Display summary (if any wisdom exists):**
|
|
263
|
+
```
|
|
264
|
+
📜 QUEEN WISDOM LOADED
|
|
265
|
+
=====================
|
|
266
|
+
{if queen_philosophies:} 📜 Philosophies: yes{/if}
|
|
267
|
+
{if queen_patterns:} 🧭 Patterns: yes{/if}
|
|
268
|
+
{if queen_redirects:} ⚠️ Redirects: yes{/if}
|
|
269
|
+
{if queen_stack_wisdom:} 🔧 Stack Wisdom: yes{/if}
|
|
270
|
+
{if queen_decrees:} 🏛️ Decrees: yes{/if}
|
|
271
|
+
|
|
272
|
+
{if none exist:} (no eternal wisdom recorded yet){/if}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**Graceful handling:** If QUEEN.md doesn't exist or `queen-read` fails, continue without wisdom injection. Workers will receive standard prompts.
|
|
276
|
+
|
|
277
|
+
### Step 4.2: Archaeologist Pre-Build Scan
|
|
202
278
|
|
|
203
279
|
**Conditional step — only fires when the phase modifies existing files.**
|
|
204
280
|
|
|
@@ -223,39 +299,35 @@ CONSTRAINTS: (none)
|
|
|
223
299
|
|
|
224
300
|
Display:
|
|
225
301
|
```
|
|
226
|
-
🏺
|
|
227
|
-
|
|
302
|
+
🏺 Archaeologist {archaeologist_name} spawning
|
|
303
|
+
Scanning history of files to be modified...
|
|
228
304
|
```
|
|
229
305
|
|
|
230
|
-
Spawn a Scout (using Task tool with `subagent_type="general"`) with this prompt:
|
|
306
|
+
Spawn a Scout (using Task tool with `subagent_type="general-purpose"`) with this prompt:
|
|
307
|
+
# NOTE: Claude Code uses aether-archaeologist; OpenCode uses general-purpose with role injection
|
|
231
308
|
|
|
232
309
|
```
|
|
233
|
-
You are {Archaeologist-Name}, a 🏺 Archaeologist Ant
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
- Areas of caution (high churn, reverted changes, emergency fixes)
|
|
255
|
-
- Sections that are stable bedrock vs volatile sand
|
|
256
|
-
|
|
257
|
-
Keep the report concise and actionable — builders need quick context, not a thesis.
|
|
258
|
-
Format as plain text with file headers. No JSON output needed.
|
|
310
|
+
You are {Archaeologist-Name}, a 🏺 Archaeologist Ant.
|
|
311
|
+
|
|
312
|
+
Mission: Pre-build archaeology scan
|
|
313
|
+
|
|
314
|
+
Files: {list of existing files that will be modified}
|
|
315
|
+
|
|
316
|
+
Work:
|
|
317
|
+
1. Read each file to understand current state
|
|
318
|
+
2. Run: git log --oneline -15 -- "{file_path}" for history
|
|
319
|
+
3. Run: git log --all --grep="fix\|bug\|workaround\|hack\|revert" --oneline -- "{file_path}" for incident history
|
|
320
|
+
4. Run: git blame "{file_path}" | head -40 for authorship
|
|
321
|
+
5. Note TODO/FIXME/HACK markers
|
|
322
|
+
|
|
323
|
+
Log activity: bash .aether/aether-utils.sh activity-log "READ" "{Ant-Name}" "description"
|
|
324
|
+
|
|
325
|
+
Report (plain text):
|
|
326
|
+
- WHY key code sections exist (from commits)
|
|
327
|
+
- Known workarounds/hacks to preserve
|
|
328
|
+
- Key architectural decisions
|
|
329
|
+
- Areas of caution (high churn, reverts, emergencies)
|
|
330
|
+
- Stable bedrock vs volatile sand sections
|
|
259
331
|
```
|
|
260
332
|
|
|
261
333
|
**Wait for results** (blocking — use TaskOutput with `block: true`).
|
|
@@ -302,16 +374,18 @@ bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "
|
|
|
302
374
|
|
|
303
375
|
**Show real-time display header:**
|
|
304
376
|
```
|
|
305
|
-
|
|
377
|
+
🔨 COLONY BUILD INITIATED
|
|
306
378
|
═══════════════════════════════════════════════════
|
|
307
379
|
Phase {id}: {name}
|
|
308
380
|
Build ID: {build_id}
|
|
309
381
|
|
|
310
|
-
Launching swarm display...
|
|
382
|
+
Launching swarm display...
|
|
311
383
|
```
|
|
312
384
|
|
|
313
385
|
Analyze the phase tasks:
|
|
314
386
|
|
|
387
|
+
Analyze the phase tasks:
|
|
388
|
+
|
|
315
389
|
1. **Group tasks by dependencies:**
|
|
316
390
|
- **Wave 1:** Tasks with `depends_on: "none"` or `depends_on: []` (can run in parallel)
|
|
317
391
|
- **Wave 2:** Tasks depending on Wave 1 tasks
|
|
@@ -330,29 +404,39 @@ bash .aether/aether-utils.sh generate-ant-name "watcher"
|
|
|
330
404
|
bash .aether/aether-utils.sh generate-ant-name "chaos"
|
|
331
405
|
```
|
|
332
406
|
|
|
333
|
-
Display spawn plan:
|
|
407
|
+
Display spawn plan with caste emojis:
|
|
334
408
|
```
|
|
335
|
-
🐜
|
|
336
|
-
=============
|
|
337
|
-
Wave 1 (parallel):
|
|
338
|
-
🔨{Builder-Name}: Task {id} - {description}
|
|
339
|
-
🔨{Builder-Name}: Task {id} - {description}
|
|
409
|
+
🐜 SPAWN PLAN
|
|
340
410
|
|
|
341
|
-
Wave
|
|
342
|
-
🔨{Builder-Name}
|
|
411
|
+
Wave 1 — Parallel
|
|
412
|
+
🔨 {Builder-Name} Task {id} {description}
|
|
413
|
+
🔨 {Builder-Name} Task {id} {description}
|
|
343
414
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
415
|
+
Wave 2 — After Wave 1
|
|
416
|
+
🔨 {Builder-Name} Task {id} {description}
|
|
417
|
+
|
|
418
|
+
Verification
|
|
419
|
+
👁️ {Watcher-Name} Verify all work independently
|
|
420
|
+
🎲 {Chaos-Name} Resilience testing (after Watcher)
|
|
347
421
|
|
|
348
422
|
Total: {N} Builders + 1 Watcher + 1 Chaos = {N+2} spawns
|
|
349
423
|
```
|
|
350
424
|
|
|
425
|
+
**Caste Emoji Legend:**
|
|
426
|
+
- 🔨 Builder (cyan if color enabled)
|
|
427
|
+
- 👁️ Watcher (green if color enabled)
|
|
428
|
+
- 🎲 Chaos (red if color enabled)
|
|
429
|
+
- 🔍 Scout (yellow if color enabled)
|
|
430
|
+
- 🏺 Archaeologist (magenta if color enabled)
|
|
431
|
+
- 🥚 Queen/Prime
|
|
432
|
+
|
|
433
|
+
**Every spawn must show its caste emoji.**
|
|
434
|
+
|
|
351
435
|
### Step 5.1: Spawn Wave 1 Workers (Parallel)
|
|
352
436
|
|
|
353
437
|
**CRITICAL: Spawn ALL Wave 1 workers in a SINGLE message using multiple Task tool calls.**
|
|
354
438
|
|
|
355
|
-
For each Wave 1 task, use Task tool with `subagent_type="general"` and
|
|
439
|
+
For each Wave 1 task, use Task tool with `subagent_type="general-purpose"` (DO NOT use run_in_background - multiple Task calls in a single message run in parallel and block until complete):
|
|
356
440
|
|
|
357
441
|
Log each spawn and update swarm display:
|
|
358
442
|
```bash
|
|
@@ -360,118 +444,55 @@ bash .aether/aether-utils.sh spawn-log "Queen" "builder" "{ant_name}" "{task_des
|
|
|
360
444
|
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
|
|
361
445
|
```
|
|
362
446
|
|
|
363
|
-
**Builder Worker Prompt
|
|
447
|
+
**Builder Worker Prompt (CLEAN OUTPUT):**
|
|
364
448
|
```
|
|
365
|
-
You are {Ant-Name}, a 🔨 Builder Ant
|
|
449
|
+
You are {Ant-Name}, a 🔨 Builder Ant.
|
|
366
450
|
|
|
367
|
-
--- YOUR TASK ---
|
|
368
451
|
Task {id}: {description}
|
|
369
452
|
|
|
370
|
-
--- CONTEXT ---
|
|
371
453
|
Goal: "{colony_goal}"
|
|
372
|
-
Phase: {phase_name}
|
|
373
|
-
|
|
374
|
-
--- CONSTRAINTS ---
|
|
375
|
-
{constraints from Step 4}
|
|
376
|
-
|
|
377
|
-
--- COLONY KNOWLEDGE ---
|
|
378
|
-
{Include this section ONLY if memory.instincts or memory.phase_learnings exist in COLONY_STATE.json.}
|
|
379
|
-
|
|
380
|
-
Top Instincts (proven patterns — follow these):
|
|
381
|
-
{For each instinct in memory.instincts where confidence >= 0.5, sorted by confidence descending, max 5:}
|
|
382
|
-
[{confidence}] {trigger} → {action}
|
|
383
|
-
{If none qualify: omit this sub-section}
|
|
384
454
|
|
|
385
|
-
|
|
386
|
-
{For each learning in memory.phase_learnings (last 3 phases only) where status == "validated":}
|
|
387
|
-
- {claim}
|
|
388
|
-
{If none qualify: omit this sub-section}
|
|
455
|
+
{ archaeology_context if exists }
|
|
389
456
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
457
|
+
Work:
|
|
458
|
+
1. Read .aether/workers.md for Builder discipline
|
|
459
|
+
2. Implement task, write tests
|
|
460
|
+
3. Log activity: bash .aether/aether-utils.sh activity-log "ACTION" "{Ant-Name}" "description"
|
|
461
|
+
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
|
|
394
462
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
{
|
|
399
|
-
|
|
463
|
+
Spawn sub-workers ONLY if 3x complexity:
|
|
464
|
+
- Check: bash .aether/aether-utils.sh spawn-can-spawn {depth}
|
|
465
|
+
- Generate name: bash .aether/aether-utils.sh generate-ant-name "builder"
|
|
466
|
+
- Announce: "🐜 Spawning {child_name} for {reason}"
|
|
467
|
+
- Log: bash .aether/aether-utils.sh spawn-log "{Ant-Name}" "builder" "{child_name}" "{task}"
|
|
400
468
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
2. Implement the task completely
|
|
404
|
-
3. Write actual test files (not just claims)
|
|
405
|
-
4. Log your work: bash .aether/aether-utils.sh activity-log "CREATED" "{ant_name} (Builder)" "{file_path}"
|
|
406
|
-
5. Before modifying any file, check for grave markers:
|
|
407
|
-
bash .aether/aether-utils.sh grave-check "{file_path}"
|
|
408
|
-
If caution_level is "high": read the failure_summary, add extra test coverage for that area, mention the graveyard in your summary
|
|
409
|
-
If caution_level is "low": note it and proceed carefully
|
|
410
|
-
If caution_level is "none": proceed normally
|
|
411
|
-
|
|
412
|
-
--- SPAWN CAPABILITY ---
|
|
413
|
-
You are at depth {depth}. You MAY spawn sub-workers if you encounter genuine surprise (3x expected complexity).
|
|
414
|
-
|
|
415
|
-
Spawn limits by depth:
|
|
416
|
-
- Depth 1: max 4 spawns
|
|
417
|
-
- Depth 2: max 2 spawns
|
|
418
|
-
- Depth 3: NO spawns (complete inline)
|
|
419
|
-
|
|
420
|
-
When to spawn:
|
|
421
|
-
- Task is 3x larger than expected
|
|
422
|
-
- Discovered sub-domain requiring different expertise
|
|
423
|
-
- Found blocking dependency needing parallel investigation
|
|
424
|
-
|
|
425
|
-
DO NOT spawn for work you can complete in < 10 tool calls.
|
|
426
|
-
|
|
427
|
-
Before spawning:
|
|
428
|
-
1. Check: bash .aether/aether-utils.sh spawn-can-spawn {depth}
|
|
429
|
-
2. Generate name: bash .aether/aether-utils.sh generate-ant-name "{caste}"
|
|
430
|
-
3. Log spawn: bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
|
|
431
|
-
4. Update swarm display: bash .aether/aether-utils.sh swarm-display-update "{child_name}" "{caste}" "excavating" "{task}" "{your_name}" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 10
|
|
432
|
-
5. Use Task tool with subagent_type="general"
|
|
433
|
-
6. After completion:
|
|
434
|
-
- Log completion: bash .aether/aether-utils.sh spawn-complete "{child_name}" "{status}" "{summary}"
|
|
435
|
-
- Update swarm display: bash .aether/aether-utils.sh swarm-display-update "{child_name}" "{caste}" "completed" "{task}" "{your_name}" '{"read":5,"grep":3,"edit":2,"bash":1}' 100 "fungus_garden" 100
|
|
436
|
-
|
|
437
|
-
Full spawn format: .aether/workers.md section "Spawning Sub-Workers"
|
|
438
|
-
|
|
439
|
-
--- OUTPUT ---
|
|
440
|
-
Return JSON:
|
|
441
|
-
{
|
|
442
|
-
"ant_name": "{your name}",
|
|
443
|
-
"task_id": "{task_id}",
|
|
444
|
-
"status": "completed" | "failed" | "blocked",
|
|
445
|
-
"summary": "What you accomplished",
|
|
446
|
-
"files_created": [],
|
|
447
|
-
"files_modified": [],
|
|
448
|
-
"tests_written": [],
|
|
449
|
-
"blockers": [],
|
|
450
|
-
"spawns": []
|
|
451
|
-
}
|
|
469
|
+
Return ONLY this JSON (no other text):
|
|
470
|
+
{"ant_name": "{Ant-Name}", "task_id": "{id}", "status": "completed|failed|blocked", "summary": "What you did", "files_created": [], "files_modified": [], "tests_written": [], "blockers": []}
|
|
452
471
|
```
|
|
453
472
|
|
|
454
|
-
### Step 5.2:
|
|
473
|
+
### Step 5.2: Process Wave 1 Results
|
|
455
474
|
|
|
456
|
-
**
|
|
475
|
+
**Task calls return results directly (no TaskOutput needed).**
|
|
457
476
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
Store all results for synthesis in Step 5.6.
|
|
477
|
+
**As each worker result arrives, immediately display:**
|
|
478
|
+
```
|
|
479
|
+
✅ 🔨 {Builder-Name} completed Task {id}
|
|
480
|
+
📖{read_count} 🔍{grep_count} ✏️{edit_count} ⚡{bash_count} {elapsed_time}
|
|
481
|
+
```
|
|
464
482
|
|
|
465
|
-
|
|
483
|
+
Log and update swarm display:
|
|
466
484
|
```bash
|
|
467
485
|
bash .aether/aether-utils.sh spawn-complete "{ant_name}" "completed" "{summary}"
|
|
468
486
|
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
|
|
469
487
|
```
|
|
470
488
|
|
|
471
|
-
**
|
|
472
|
-
As workers complete, accumulate their actual tool usage (Read, Grep, Edit, Bash counts from their activity logs) and update the swarm display to show live progress.
|
|
489
|
+
**Parse each worker's JSON output to collect:** status, files_created, files_modified, blockers
|
|
473
490
|
|
|
474
|
-
**
|
|
491
|
+
**Visual Mode: Render live display (if enabled):**
|
|
492
|
+
If `visual_mode` is true, render the swarm display after all workers complete:
|
|
493
|
+
```bash
|
|
494
|
+
bash .aether/aether-utils.sh swarm-display-render "$build_id"
|
|
495
|
+
```
|
|
475
496
|
|
|
476
497
|
### Step 5.3: Spawn Wave 2+ Workers (Sequential Waves)
|
|
477
498
|
|
|
@@ -481,118 +502,51 @@ Repeat Step 5.1-5.2 for each subsequent wave, waiting for previous wave to compl
|
|
|
481
502
|
|
|
482
503
|
**MANDATORY: Always spawn a Watcher — testing must be independent.**
|
|
483
504
|
|
|
505
|
+
Spawn the Watcher using Task tool with `subagent_type="general-purpose"` (DO NOT use run_in_background - task blocks until complete):
|
|
506
|
+
|
|
484
507
|
```bash
|
|
485
508
|
bash .aether/aether-utils.sh spawn-log "Queen" "watcher" "{watcher_name}" "Independent verification"
|
|
486
509
|
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
|
|
487
510
|
```
|
|
488
511
|
|
|
489
|
-
**Watcher Worker Prompt:**
|
|
512
|
+
**Watcher Worker Prompt (CLEAN OUTPUT):**
|
|
490
513
|
```
|
|
491
|
-
You are {Watcher-Name}, a 👁️ Watcher Ant
|
|
492
|
-
|
|
493
|
-
--- YOUR MISSION ---
|
|
494
|
-
Independently verify all work done by Builders in Phase {id}.
|
|
495
|
-
|
|
496
|
-
--- WHAT TO VERIFY ---
|
|
497
|
-
Files created: {list from builder results}
|
|
498
|
-
Files modified: {list from builder results}
|
|
499
|
-
|
|
500
|
-
--- COMMAND RESOLUTION ---
|
|
501
|
-
Resolve build, test, type-check, and lint commands using this priority chain (stop at first match per command):
|
|
502
|
-
1. **CLAUDE.md** — Check project CLAUDE.md (in your system context) for explicit commands
|
|
503
|
-
2. **CODEBASE.md** — Read `.planning/CODEBASE.md` `## Commands` section
|
|
504
|
-
3. **Fallback** — Use language-specific examples below (Execution Verification section)
|
|
505
|
-
|
|
506
|
-
Use resolved commands for all verification steps below.
|
|
507
|
-
|
|
508
|
-
--- VERIFICATION CHECKLIST ---
|
|
509
|
-
1. Do the files exist? (Read each one)
|
|
510
|
-
2. Does the code compile/parse? (Run build command)
|
|
511
|
-
3. Do tests exist AND pass? (Run test command)
|
|
512
|
-
4. Are success criteria met? {list success_criteria}
|
|
513
|
-
|
|
514
|
-
--- EXECUTION VERIFICATION (MANDATORY) ---
|
|
515
|
-
Before assigning a quality score, you MUST attempt to execute the code:
|
|
514
|
+
You are {Watcher-Name}, a 👁️ Watcher Ant.
|
|
516
515
|
|
|
517
|
-
|
|
518
|
-
- Python: `python3 -m py_compile {file}`
|
|
519
|
-
- Swift: `swiftc -parse {file}`
|
|
520
|
-
- TypeScript: `npx tsc --noEmit`
|
|
516
|
+
Verify all work done by Builders in Phase {id}.
|
|
521
517
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
518
|
+
Files to verify:
|
|
519
|
+
- Created: {list from builder results}
|
|
520
|
+
- Modified: {list from builder results}
|
|
525
521
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
4. Test suite: If tests exist, run them
|
|
533
|
-
- Record pass/fail counts
|
|
534
|
-
|
|
535
|
-
CRITICAL: If ANY execution check fails, quality_score CANNOT exceed 6/10.
|
|
536
|
-
|
|
537
|
-
--- SPAWN CAPABILITY ---
|
|
538
|
-
You are at depth {depth}. You MAY spawn sub-workers for:
|
|
539
|
-
- Deep investigation of suspicious code patterns
|
|
540
|
-
- Parallel verification of independent components
|
|
541
|
-
- Debugging assistance for complex failures
|
|
542
|
-
|
|
543
|
-
Spawn limits: Depth 1→4, Depth 2→2, Depth 3→0
|
|
544
|
-
|
|
545
|
-
Before spawning:
|
|
546
|
-
1. Log spawn: bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
|
|
547
|
-
2. Update swarm display: bash .aether/aether-utils.sh swarm-display-update "{child_name}" "{caste}" "observing" "{task}" "{your_name}" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "nursery" 50
|
|
548
|
-
3. After completion: bash .aether/aether-utils.sh swarm-display-update "{child_name}" "{caste}" "completed" "{task}" "{your_name}" '{"read":3,"grep":2,"edit":0,"bash":0}' 100 "nursery" 100
|
|
522
|
+
Verification:
|
|
523
|
+
1. Check files exist (Read each)
|
|
524
|
+
2. Run build/type-check
|
|
525
|
+
3. Run tests if they exist
|
|
526
|
+
4. Check success criteria: {list}
|
|
549
527
|
|
|
550
|
-
|
|
551
|
-
-
|
|
552
|
-
-
|
|
553
|
-
- Be skeptical — Builders may have cut corners
|
|
528
|
+
Spawn sub-workers if needed:
|
|
529
|
+
- Log: bash .aether/aether-utils.sh spawn-log "{Watcher-Name}" "watcher" "{child}" "{task}"
|
|
530
|
+
- Announce: "🐜 Spawning {child} to investigate {issue}"
|
|
554
531
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
{
|
|
558
|
-
"ant_name": "{your name}",
|
|
559
|
-
"verification_passed": true | false,
|
|
560
|
-
"files_verified": [],
|
|
561
|
-
"execution_verification": {
|
|
562
|
-
"syntax_check": {"command": "...", "passed": true|false},
|
|
563
|
-
"import_check": {"command": "...", "passed": true|false},
|
|
564
|
-
"launch_test": {"command": "...", "passed": true|false, "error": null},
|
|
565
|
-
"test_suite": {"command": "...", "passed": N, "failed": N}
|
|
566
|
-
},
|
|
567
|
-
"build_result": {"command": "...", "passed": true|false},
|
|
568
|
-
"test_result": {"command": "...", "passed": N, "failed": N},
|
|
569
|
-
"success_criteria_results": [
|
|
570
|
-
{"criterion": "...", "passed": true|false, "evidence": "..."}
|
|
571
|
-
],
|
|
572
|
-
"issues_found": [],
|
|
573
|
-
"quality_score": N,
|
|
574
|
-
"recommendation": "proceed" | "fix_required",
|
|
575
|
-
"spawns": []
|
|
576
|
-
}
|
|
532
|
+
Return ONLY this JSON:
|
|
533
|
+
{"ant_name": "{Watcher-Name}", "verification_passed": true|false, "files_verified": [], "issues_found": [], "quality_score": N, "recommendation": "proceed|fix_required"}
|
|
577
534
|
```
|
|
578
535
|
|
|
579
|
-
### Step 5.
|
|
536
|
+
### Step 5.5: Process Watcher Results
|
|
580
537
|
|
|
581
|
-
**
|
|
538
|
+
**Task call returns results directly (no TaskOutput needed).**
|
|
582
539
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
- Store results for synthesis in Step 5.6
|
|
540
|
+
**Parse the Watcher's JSON response:** verification_passed, issues_found, quality_score, recommendation
|
|
541
|
+
|
|
542
|
+
**Store results for synthesis in Step 5.7**
|
|
587
543
|
|
|
588
544
|
**Update swarm display when Watcher completes:**
|
|
589
545
|
```bash
|
|
590
546
|
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
|
|
591
547
|
```
|
|
592
548
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
### Step 5.4.2: Spawn Chaos Ant for Resilience Testing
|
|
549
|
+
### Step 5.6: Spawn Chaos Ant for Resilience Testing
|
|
596
550
|
|
|
597
551
|
**After the Watcher completes, spawn a Chaos Ant to probe the phase work for edge cases and boundary conditions.**
|
|
598
552
|
|
|
@@ -609,58 +563,36 @@ bash .aether/aether-utils.sh flag-list --phase {phase_number}
|
|
|
609
563
|
```
|
|
610
564
|
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".
|
|
611
565
|
|
|
612
|
-
Spawn the Chaos Ant using Task tool with `subagent_type="general"
|
|
566
|
+
Spawn the Chaos Ant using Task tool with `subagent_type="general-purpose"` (DO NOT use run_in_background - task blocks until complete):
|
|
567
|
+
# NOTE: Claude Code uses aether-chaos; OpenCode uses general-purpose with role injection
|
|
613
568
|
|
|
614
|
-
**Chaos Ant Prompt:**
|
|
569
|
+
**Chaos Ant Prompt (CLEAN OUTPUT):**
|
|
615
570
|
```
|
|
616
|
-
You are {Chaos-Name}, a 🎲 Chaos Ant
|
|
571
|
+
You are {Chaos-Name}, a 🎲 Chaos Ant.
|
|
617
572
|
|
|
618
|
-
|
|
619
|
-
Probe the work done by Builders in Phase {id} for edge cases, boundary conditions, and unexpected inputs.
|
|
573
|
+
Test Phase {id} work for edge cases and boundary conditions.
|
|
620
574
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
Files modified: {list from builder results}
|
|
575
|
+
Files to test:
|
|
576
|
+
- {list from builder results}
|
|
624
577
|
|
|
625
|
-
|
|
626
|
-
{existing_flag_titles}
|
|
627
|
-
These issues have already been flagged. Do NOT report findings that duplicate or overlap with the above titles. Focus your 5 scenarios on NEW, undiscovered issues only.
|
|
578
|
+
Skip these known issues: {existing_flag_titles}
|
|
628
579
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
4. Focus on: edge cases, boundary conditions, error handling gaps, state corruption risks, unexpected inputs
|
|
634
|
-
5. Do NOT re-report issues listed in EXISTING FLAGS above — skip any finding that substantially overlaps with a known flag
|
|
580
|
+
Rules:
|
|
581
|
+
- Max 5 scenarios
|
|
582
|
+
- Read-only (don't modify code)
|
|
583
|
+
- Focus: edge cases, boundaries, error handling
|
|
635
584
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
{
|
|
639
|
-
"ant_name": "{your name}",
|
|
640
|
-
"scenarios_tested": 5,
|
|
641
|
-
"findings": [
|
|
642
|
-
{
|
|
643
|
-
"id": 1,
|
|
644
|
-
"category": "edge_case|boundary|error_handling|state|unexpected_input",
|
|
645
|
-
"severity": "critical|high|medium|low|info",
|
|
646
|
-
"title": "...",
|
|
647
|
-
"description": "...",
|
|
648
|
-
"reproduction_steps": ["..."],
|
|
649
|
-
"affected_files": ["..."],
|
|
650
|
-
"recommendation": "..."
|
|
651
|
-
}
|
|
652
|
-
],
|
|
653
|
-
"overall_resilience": "strong|moderate|weak",
|
|
654
|
-
"summary": "..."
|
|
655
|
-
}
|
|
585
|
+
Return ONLY this JSON:
|
|
586
|
+
{"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": "..."}
|
|
656
587
|
```
|
|
657
588
|
|
|
658
|
-
|
|
589
|
+
### Step 5.7: Process Chaos Ant Results
|
|
590
|
+
|
|
591
|
+
**Task call returns results directly (no TaskOutput needed).**
|
|
592
|
+
|
|
593
|
+
**Parse the Chaos Ant's JSON response:** findings, overall_resilience, summary
|
|
659
594
|
|
|
660
|
-
|
|
661
|
-
- Wait for the Chaos Ant's JSON response
|
|
662
|
-
- Parse: findings, overall_resilience, summary
|
|
663
|
-
- Store results for synthesis in Step 5.6
|
|
595
|
+
**Store results for synthesis in Step 5.9**
|
|
664
596
|
|
|
665
597
|
**Flag critical/high findings:**
|
|
666
598
|
|
|
@@ -675,18 +607,13 @@ Log the flag:
|
|
|
675
607
|
bash .aether/aether-utils.sh activity-log "FLAG" "Chaos" "Created blocker: {finding.title}"
|
|
676
608
|
```
|
|
677
609
|
|
|
678
|
-
Log the flag:
|
|
679
|
-
```bash
|
|
680
|
-
bash .aether/aether-utils.sh activity-log "FLAG" "Chaos" "Created blocker: {finding.title}"
|
|
681
|
-
```
|
|
682
|
-
|
|
683
610
|
Log chaos ant completion and update swarm display:
|
|
684
611
|
```bash
|
|
685
612
|
bash .aether/aether-utils.sh spawn-complete "{chaos_name}" "completed" "{summary}"
|
|
686
613
|
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
|
|
687
614
|
```
|
|
688
615
|
|
|
689
|
-
### Step 5.
|
|
616
|
+
### Step 5.8: Create Flags for Verification Failures
|
|
690
617
|
|
|
691
618
|
If the Watcher reported `verification_passed: false` or `recommendation: "fix_required"`:
|
|
692
619
|
|
|
@@ -701,11 +628,11 @@ Log the flag creation:
|
|
|
701
628
|
bash .aether/aether-utils.sh activity-log "FLAG" "Watcher" "Created blocker: {issue_title}"
|
|
702
629
|
```
|
|
703
630
|
|
|
704
|
-
This ensures verification failures are persisted as blockers that survive context resets. Chaos Ant findings are flagged in Step 5.
|
|
631
|
+
This ensures verification failures are persisted as blockers that survive context resets. Chaos Ant findings are flagged in Step 5.7.
|
|
705
632
|
|
|
706
|
-
### Step 5.
|
|
633
|
+
### Step 5.9: Synthesize Results
|
|
707
634
|
|
|
708
|
-
**This step runs
|
|
635
|
+
**This step runs after all worker tasks have completed (Builders, Watcher, Chaos).**
|
|
709
636
|
|
|
710
637
|
Collect all worker outputs and create phase summary:
|
|
711
638
|
|
|
@@ -749,6 +676,39 @@ bash .aether/aether-utils.sh grave-add "{file}" "{ant_name}" "{task_id}" {phase}
|
|
|
749
676
|
bash .aether/aether-utils.sh activity-log "GRAVE" "Queen" "Grave marker placed at {file} — {ant_name} failed: {summary}"
|
|
750
677
|
```
|
|
751
678
|
|
|
679
|
+
**Error Handoff Update:**
|
|
680
|
+
If workers failed, update handoff with error context for recovery:
|
|
681
|
+
```bash
|
|
682
|
+
cat > .aether/HANDOFF.md << 'HANDOFF_EOF'
|
|
683
|
+
# Colony Session — Build Errors
|
|
684
|
+
|
|
685
|
+
## ⚠️ Build Status: ISSUES DETECTED
|
|
686
|
+
**Phase:** {phase_number} — {phase_name}
|
|
687
|
+
**Status:** Build completed with failures
|
|
688
|
+
**Updated:** $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
689
|
+
|
|
690
|
+
## Failed Workers
|
|
691
|
+
{for each failed worker:}
|
|
692
|
+
- {ant_name}: {failure_summary}
|
|
693
|
+
{end for}
|
|
694
|
+
|
|
695
|
+
## Grave Markers Placed
|
|
696
|
+
{for each grave:}
|
|
697
|
+
- {file}: {caution_level} caution
|
|
698
|
+
{end for}
|
|
699
|
+
|
|
700
|
+
## Recovery Options
|
|
701
|
+
1. Review failures: Check `.aether/data/activity.log`
|
|
702
|
+
2. Fix and retry: `/ant:build {phase_number}`
|
|
703
|
+
3. Swarm fix: `/ant:swarm` for auto-repair
|
|
704
|
+
4. Manual fix: Address issues, then `/ant:continue`
|
|
705
|
+
|
|
706
|
+
## Session Note
|
|
707
|
+
Build completed but workers failed. Grave markers placed.
|
|
708
|
+
Review failures before advancing.
|
|
709
|
+
HANDOFF_EOF
|
|
710
|
+
```
|
|
711
|
+
|
|
752
712
|
Only fires when workers fail. Zero impact on successful builds.
|
|
753
713
|
|
|
754
714
|
--- SPAWN TRACKING ---
|
|
@@ -843,6 +803,72 @@ Use AskUserQuestion to get approval. Record in events:
|
|
|
843
803
|
- If approved: `"<timestamp>|visual_approved|build|Phase {id} UI approved"`
|
|
844
804
|
- If rejected: `"<timestamp>|visual_rejected|build|Phase {id} UI rejected: {reason}"`
|
|
845
805
|
|
|
806
|
+
### Step 6.5: Update Handoff Document
|
|
807
|
+
|
|
808
|
+
After synthesis is complete, update the handoff document with current state for session recovery:
|
|
809
|
+
|
|
810
|
+
```bash
|
|
811
|
+
# Update handoff with build results
|
|
812
|
+
jq -n \
|
|
813
|
+
--arg timestamp "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
|
814
|
+
--arg goal "$(jq -r '.goal' .aether/data/COLONY_STATE.json)" \
|
|
815
|
+
--arg phase "$(jq -r '.current_phase' .aether/data/COLONY_STATE.json)" \
|
|
816
|
+
--arg phase_name "{phase_name}" \
|
|
817
|
+
--arg status "{synthesis.status}" \
|
|
818
|
+
--arg summary "{synthesis.summary}" \
|
|
819
|
+
--argjson tasks_completed '{synthesis.tasks_completed | length}' \
|
|
820
|
+
--argjson tasks_failed '{synthesis.tasks_failed | length}' \
|
|
821
|
+
--arg next_action "{if synthesis.status == "completed" then "/ant:continue" else "/ant:flags" end}" \
|
|
822
|
+
'{
|
|
823
|
+
"last_updated": $timestamp,
|
|
824
|
+
"goal": $goal,
|
|
825
|
+
"current_phase": $phase,
|
|
826
|
+
"phase_name": $phase_name,
|
|
827
|
+
"build_status": $status,
|
|
828
|
+
"summary": $summary,
|
|
829
|
+
"tasks_completed": $tasks_completed,
|
|
830
|
+
"tasks_failed": $tasks_failed,
|
|
831
|
+
"next_recommended_action": $next_action,
|
|
832
|
+
"can_resume": true,
|
|
833
|
+
"note": "Phase build completed. Run /ant:continue to advance if verification passed."
|
|
834
|
+
}' > .aether/data/last-build-result.json
|
|
835
|
+
|
|
836
|
+
# Write handoff markdown
|
|
837
|
+
cat > .aether/HANDOFF.md << 'HANDOFF_EOF'
|
|
838
|
+
# Colony Session — Build Complete
|
|
839
|
+
|
|
840
|
+
## Quick Resume
|
|
841
|
+
Run `/ant:continue` to advance phase, or `/ant:resume-colony` to restore full context.
|
|
842
|
+
|
|
843
|
+
## State at Build Completion
|
|
844
|
+
- Goal: "$(jq -r '.goal' .aether/data/COLONY_STATE.json)"
|
|
845
|
+
- Phase: {phase_number} — {phase_name}
|
|
846
|
+
- Build Status: {synthesis.status}
|
|
847
|
+
- Updated: $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
848
|
+
|
|
849
|
+
## Build Summary
|
|
850
|
+
{summary}
|
|
851
|
+
|
|
852
|
+
## Tasks
|
|
853
|
+
- Completed: {synthesis.tasks_completed | length}
|
|
854
|
+
- Failed: {synthesis.tasks_failed | length}
|
|
855
|
+
|
|
856
|
+
## Files Changed
|
|
857
|
+
- Created: {synthesis.files_created | length} files
|
|
858
|
+
- Modified: {synthesis.files_modified | length} files
|
|
859
|
+
|
|
860
|
+
## Next Steps
|
|
861
|
+
- If verification passed: `/ant:continue` to advance to next phase
|
|
862
|
+
- If issues found: `/ant:flags` to review blockers
|
|
863
|
+
- To pause: `/ant:pause-colony`
|
|
864
|
+
|
|
865
|
+
## Session Note
|
|
866
|
+
$(if synthesis.status == "completed" then "Build succeeded — ready to advance." else "Build completed with issues — review before continuing." end)
|
|
867
|
+
HANDOFF_EOF
|
|
868
|
+
```
|
|
869
|
+
|
|
870
|
+
This ensures the handoff always reflects the latest build state, even if the session crashes before explicit pause.
|
|
871
|
+
|
|
846
872
|
### Step 7: Display Results
|
|
847
873
|
|
|
848
874
|
**This step runs ONLY after synthesis is complete. All values come from actual worker results.**
|
|
@@ -935,6 +961,12 @@ The swarm display will show:
|
|
|
935
961
|
🔧 Debugging: {debugging.issues_resolved}/{debugging.issues_encountered} resolved
|
|
936
962
|
{end if}
|
|
937
963
|
|
|
964
|
+
🤖 Model Routing:
|
|
965
|
+
{for each spawn in spawn_tree where model_context exists:}
|
|
966
|
+
{caste_emoji}{ant_name}: {model_context.assigned} {if model_context.assigned matches caste expectation:}✓{else}⚠️{end if}
|
|
967
|
+
{end for}
|
|
968
|
+
Proxy: {if proxy_healthy:}✓ Healthy @ http://localhost:4000{else}✗ Not running (using default model){end if}
|
|
969
|
+
|
|
938
970
|
🐜 Next Steps:
|
|
939
971
|
{if synthesis.status == "completed" AND verification.recommendation == "proceed":}
|
|
940
972
|
/ant:continue ➡️ Advance to next phase
|