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
|
|
|
@@ -189,7 +191,90 @@ If file doesn't exist or is empty:
|
|
|
189
191
|
CONSTRAINTS: (none)
|
|
190
192
|
```
|
|
191
193
|
|
|
192
|
-
### 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
|
|
193
278
|
|
|
194
279
|
**Conditional step — only fires when the phase modifies existing files.**
|
|
195
280
|
|
|
@@ -214,46 +299,35 @@ CONSTRAINTS: (none)
|
|
|
214
299
|
|
|
215
300
|
Display:
|
|
216
301
|
```
|
|
217
|
-
|
|
218
|
-
|
|
302
|
+
🏺🐜 Archaeologist {archaeologist_name} spawning
|
|
303
|
+
Scanning history of files to be modified...
|
|
219
304
|
```
|
|
220
305
|
|
|
221
|
-
Spawn a Scout (using Task tool with `subagent_type="
|
|
306
|
+
Spawn a Scout (using Task tool with `subagent_type="aether-archaeologist"`) with this prompt:
|
|
307
|
+
# FALLBACK: If "Agent type not found", use general-purpose and inject role: "You are an Archaeologist Ant - git historian that excavates why code exists."
|
|
222
308
|
|
|
223
309
|
```
|
|
224
|
-
You are {Archaeologist-Name}, a
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
For each file, report:
|
|
246
|
-
- WHY key code sections exist (from commit messages)
|
|
247
|
-
- Known workarounds or hacks that must not be broken
|
|
248
|
-
- Key architectural decisions visible in history
|
|
249
|
-
- Areas of caution (high churn, reverted changes, emergency fixes)
|
|
250
|
-
- Sections that are stable bedrock vs volatile sand
|
|
251
|
-
|
|
252
|
-
Include in your header:
|
|
253
|
-
Model: {model} | Caste: archaeologist | Ant: {Ant-Name}
|
|
254
|
-
|
|
255
|
-
Keep the report concise and actionable — builders need quick context, not a thesis.
|
|
256
|
-
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
|
|
257
331
|
```
|
|
258
332
|
|
|
259
333
|
**Wait for results** (blocking — use TaskOutput with `block: true`).
|
|
@@ -279,6 +353,8 @@ CONSTRAINTS: (none)
|
|
|
279
353
|
The `archaeology_context` will be injected into builder prompts in Step 5.1 (see below).
|
|
280
354
|
If this step was skipped (no existing files modified), the archaeology section is omitted from builder prompts.
|
|
281
355
|
|
|
356
|
+
---
|
|
357
|
+
|
|
282
358
|
### Step 5: Initialize Swarm Display and Analyze Tasks
|
|
283
359
|
|
|
284
360
|
**YOU (the Queen) will spawn workers directly. Do NOT delegate to a single Prime Worker.**
|
|
@@ -300,12 +376,12 @@ bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "
|
|
|
300
376
|
|
|
301
377
|
**Show real-time display header:**
|
|
302
378
|
```
|
|
303
|
-
|
|
379
|
+
🔨 COLONY BUILD INITIATED
|
|
304
380
|
═══════════════════════════════════════════════════
|
|
305
381
|
Phase {id}: {name}
|
|
306
382
|
Build ID: {build_id}
|
|
307
383
|
|
|
308
|
-
Launching swarm display...
|
|
384
|
+
Launching swarm display...
|
|
309
385
|
```
|
|
310
386
|
|
|
311
387
|
Analyze the phase tasks:
|
|
@@ -318,10 +394,10 @@ Analyze the phase tasks:
|
|
|
318
394
|
- **Wave 3+:** Continue until all tasks assigned
|
|
319
395
|
|
|
320
396
|
2. **Assign castes:**
|
|
321
|
-
- Implementation tasks →
|
|
322
|
-
- Research/docs tasks →
|
|
323
|
-
- Testing/validation →
|
|
324
|
-
- Resilience testing →
|
|
397
|
+
- Implementation tasks → 🔨🐜 Builder
|
|
398
|
+
- Research/docs tasks → 🔍🐜 Scout
|
|
399
|
+
- Testing/validation → 👁️🐜 Watcher (ALWAYS spawn at least one)
|
|
400
|
+
- Resilience testing → 🎲🐜 Chaos (ALWAYS spawn one after Watcher)
|
|
325
401
|
|
|
326
402
|
3. **Generate ant names for each worker:**
|
|
327
403
|
```bash
|
|
@@ -330,154 +406,130 @@ bash .aether/aether-utils.sh generate-ant-name "watcher"
|
|
|
330
406
|
bash .aether/aether-utils.sh generate-ant-name "chaos"
|
|
331
407
|
```
|
|
332
408
|
|
|
333
|
-
Display spawn plan:
|
|
409
|
+
Display spawn plan with caste emojis:
|
|
334
410
|
```
|
|
335
|
-
🐜
|
|
336
|
-
=============
|
|
337
|
-
Wave 1 (parallel):
|
|
338
|
-
🔨{Builder-Name}: Task {id} - {description}
|
|
339
|
-
🔨{Builder-Name}: Task {id} - {description}
|
|
411
|
+
🐜 SPAWN PLAN
|
|
340
412
|
|
|
341
|
-
Wave
|
|
342
|
-
|
|
413
|
+
Wave 1 — Parallel
|
|
414
|
+
🔨🐜 {Builder-Name} Task {id} {description}
|
|
415
|
+
🔨🐜 {Builder-Name} Task {id} {description}
|
|
343
416
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
417
|
+
Wave 2 — After Wave 1
|
|
418
|
+
🔨🐜 {Builder-Name} Task {id} {description}
|
|
419
|
+
|
|
420
|
+
Verification
|
|
421
|
+
👁️🐜 {Watcher-Name} Verify all work independently
|
|
422
|
+
🎲🐜 {Chaos-Name} Resilience testing (after Watcher)
|
|
347
423
|
|
|
348
424
|
Total: {N} Builders + 1 Watcher + 1 Chaos = {N+2} spawns
|
|
349
425
|
```
|
|
350
426
|
|
|
427
|
+
**Caste Emoji Legend:**
|
|
428
|
+
- 🔨🐜 Builder (cyan if color enabled)
|
|
429
|
+
- 👁️🐜 Watcher (green if color enabled)
|
|
430
|
+
- 🎲🐜 Chaos (red if color enabled)
|
|
431
|
+
- 🔍🐜 Scout (yellow if color enabled)
|
|
432
|
+
- 🏺🐜 Archaeologist (magenta if color enabled)
|
|
433
|
+
- 🥚 Queen/Prime
|
|
434
|
+
|
|
435
|
+
**Every spawn must show its caste emoji.**
|
|
436
|
+
|
|
351
437
|
### Step 5.1: Spawn Wave 1 Workers (Parallel)
|
|
352
438
|
|
|
353
439
|
**CRITICAL: Spawn ALL Wave 1 workers in a SINGLE message using multiple Task tool calls.**
|
|
354
440
|
|
|
355
|
-
|
|
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}
|
|
444
|
+
```
|
|
445
|
+
|
|
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):
|
|
356
447
|
|
|
357
448
|
Log each spawn and update swarm display:
|
|
358
449
|
```bash
|
|
359
450
|
bash .aether/aether-utils.sh spawn-log "Queen" "builder" "{ant_name}" "{task_description}"
|
|
360
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}"
|
|
361
453
|
```
|
|
362
454
|
|
|
363
|
-
**Builder Worker Prompt
|
|
455
|
+
**Builder Worker Prompt (CLEAN OUTPUT):**
|
|
364
456
|
```
|
|
365
|
-
You are {Ant-Name}, a
|
|
457
|
+
You are {Ant-Name}, a 🔨🐜 Builder Ant.
|
|
366
458
|
|
|
367
|
-
--- YOUR TASK ---
|
|
368
459
|
Task {id}: {description}
|
|
369
460
|
|
|
370
|
-
--- CONTEXT ---
|
|
371
461
|
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
462
|
|
|
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}
|
|
463
|
+
{ archaeology_context if exists }
|
|
389
464
|
|
|
390
|
-
|
|
391
|
-
{For each pattern in errors.flagged_patterns:}
|
|
392
|
-
⚠️ {description}
|
|
393
|
-
{If none: omit this sub-section}
|
|
465
|
+
{ queen_wisdom_section if any wisdom exists }
|
|
394
466
|
|
|
395
|
-
|
|
396
|
-
--- ARCHAEOLOGY CONTEXT ---
|
|
397
|
-
The following historical insights were discovered about files you will modify:
|
|
398
|
-
{archaeology_context findings}
|
|
399
|
-
{End if — omit this entire section if Step 4.5 was skipped}
|
|
400
|
-
|
|
401
|
-
--- INSTRUCTIONS ---
|
|
467
|
+
Work:
|
|
402
468
|
1. Read .aether/workers.md for Builder discipline
|
|
403
|
-
2. Implement
|
|
404
|
-
3.
|
|
405
|
-
4.
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
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
|
-
"model_context": {
|
|
452
|
-
"assigned": "{model}",
|
|
453
|
-
"caste": "builder",
|
|
454
|
-
"source": "caste-default",
|
|
455
|
-
"reported_at": "ISO-8601 timestamp"
|
|
456
|
-
}
|
|
457
|
-
}
|
|
469
|
+
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
|
|
472
|
+
|
|
473
|
+
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"
|
|
476
|
+
- Announce: "🐜 Spawning {child_name} for {reason}"
|
|
477
|
+
- Log: bash .aether/aether-utils.sh spawn-log "{Ant-Name}" "builder" "{child_name}" "{task}"
|
|
478
|
+
|
|
479
|
+
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": []}
|
|
458
481
|
```
|
|
459
482
|
|
|
460
|
-
|
|
483
|
+
**Queen Wisdom Section Template (injected only if wisdom exists):**
|
|
484
|
+
```
|
|
485
|
+
--- QUEEN WISDOM (Eternal Guidance) ---
|
|
486
|
+
{ if queen_philosophies: }
|
|
487
|
+
📜 Philosophies:
|
|
488
|
+
{queen_philosophies}
|
|
489
|
+
{ endif }
|
|
490
|
+
{ if queen_patterns: }
|
|
491
|
+
🧭 Patterns:
|
|
492
|
+
{queen_patterns}
|
|
493
|
+
{ endif }
|
|
494
|
+
{ if queen_redirects: }
|
|
495
|
+
⚠️ Redirects (AVOID these):
|
|
496
|
+
{queen_redirects}
|
|
497
|
+
{ endif }
|
|
498
|
+
{ if queen_stack_wisdom: }
|
|
499
|
+
🔧 Stack Wisdom:
|
|
500
|
+
{queen_stack_wisdom}
|
|
501
|
+
{ endif }
|
|
502
|
+
{ if queen_decrees: }
|
|
503
|
+
🏛️ Decrees:
|
|
504
|
+
{queen_decrees}
|
|
505
|
+
{ endif }
|
|
506
|
+
--- END QUEEN WISDOM ---
|
|
507
|
+
```
|
|
461
508
|
|
|
462
|
-
|
|
509
|
+
### Step 5.2: Process Wave 1 Results
|
|
463
510
|
|
|
464
|
-
|
|
465
|
-
- Use the task_id from each Task tool response
|
|
466
|
-
- Do NOT proceed to Step 5.3 until ALL workers have returned results
|
|
467
|
-
- Parse each worker's JSON output to collect: status, files_created, files_modified, blockers
|
|
511
|
+
**Task calls return results directly (no TaskOutput needed).**
|
|
468
512
|
|
|
469
|
-
|
|
513
|
+
**As each worker result arrives, immediately display:**
|
|
514
|
+
```
|
|
515
|
+
✅ 🔨🐜 {Builder-Name} completed Task {id}
|
|
516
|
+
📖{read_count} 🔍{grep_count} ✏️{edit_count} ⚡{bash_count} {elapsed_time}
|
|
517
|
+
```
|
|
470
518
|
|
|
471
|
-
|
|
519
|
+
Log and update swarm display:
|
|
472
520
|
```bash
|
|
473
521
|
bash .aether/aether-utils.sh spawn-complete "{ant_name}" "completed" "{summary}"
|
|
474
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"
|
|
475
524
|
```
|
|
476
525
|
|
|
477
|
-
**
|
|
478
|
-
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.
|
|
526
|
+
**Parse each worker's JSON output to collect:** status, files_created, files_modified, blockers
|
|
479
527
|
|
|
480
|
-
**
|
|
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-render "$build_id"
|
|
532
|
+
```
|
|
481
533
|
|
|
482
534
|
### Step 5.3: Spawn Wave 2+ Workers (Sequential Waves)
|
|
483
535
|
|
|
@@ -487,129 +539,51 @@ Repeat Step 5.1-5.2 for each subsequent wave, waiting for previous wave to compl
|
|
|
487
539
|
|
|
488
540
|
**MANDATORY: Always spawn a Watcher — testing must be independent.**
|
|
489
541
|
|
|
542
|
+
Spawn the Watcher using Task tool with `subagent_type="aether-watcher"` (DO NOT use run_in_background - task blocks until complete):
|
|
543
|
+
|
|
490
544
|
```bash
|
|
491
545
|
bash .aether/aether-utils.sh spawn-log "Queen" "watcher" "{watcher_name}" "Independent verification"
|
|
492
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
|
|
493
547
|
```
|
|
494
548
|
|
|
495
|
-
**Watcher Worker Prompt:**
|
|
549
|
+
**Watcher Worker Prompt (CLEAN OUTPUT):**
|
|
496
550
|
```
|
|
497
|
-
You are {Watcher-Name}, a
|
|
498
|
-
|
|
499
|
-
--- YOUR MISSION ---
|
|
500
|
-
Independently verify all work done by Builders in Phase {id}.
|
|
501
|
-
|
|
502
|
-
--- MODEL CONTEXT ---
|
|
503
|
-
Optimal model for verification: {model} (from caste: watcher)
|
|
504
|
-
Model characteristics: Efficient validation and testing model
|
|
505
|
-
Verification focus: Quick, thorough checks with fast turnaround
|
|
506
|
-
|
|
507
|
-
--- WHAT TO VERIFY ---
|
|
508
|
-
Files created: {list from builder results}
|
|
509
|
-
Files modified: {list from builder results}
|
|
551
|
+
You are {Watcher-Name}, a 👁️🐜 Watcher Ant.
|
|
510
552
|
|
|
511
|
-
|
|
512
|
-
Resolve build, test, type-check, and lint commands using this priority chain (stop at first match per command):
|
|
513
|
-
1. **CLAUDE.md** — Check project CLAUDE.md (in your system context) for explicit commands
|
|
514
|
-
2. **CODEBASE.md** — Read `.planning/CODEBASE.md` `## Commands` section
|
|
515
|
-
3. **Fallback** — Use language-specific examples below (Execution Verification section)
|
|
553
|
+
Verify all work done by Builders in Phase {id}.
|
|
516
554
|
|
|
517
|
-
|
|
555
|
+
Files to verify:
|
|
556
|
+
- Created: {list from builder results}
|
|
557
|
+
- Modified: {list from builder results}
|
|
518
558
|
|
|
519
|
-
|
|
520
|
-
1.
|
|
521
|
-
2.
|
|
522
|
-
3.
|
|
523
|
-
4.
|
|
524
|
-
|
|
525
|
-
--- EXECUTION VERIFICATION (MANDATORY) ---
|
|
526
|
-
Before assigning a quality score, you MUST attempt to execute the code:
|
|
527
|
-
|
|
528
|
-
1. Syntax check: Run the language's syntax checker
|
|
529
|
-
- Python: `python3 -m py_compile {file}`
|
|
530
|
-
- Swift: `swiftc -parse {file}`
|
|
531
|
-
- TypeScript: `npx tsc --noEmit`
|
|
532
|
-
|
|
533
|
-
2. Import check: Verify main entry point can be imported
|
|
534
|
-
- Python: `python3 -c "import {module}"`
|
|
535
|
-
- Node: `node -e "require('{entry}')"`
|
|
536
|
-
|
|
537
|
-
3. Launch test: Attempt to start the application briefly
|
|
538
|
-
- Run main entry point with timeout
|
|
539
|
-
- If GUI, try headless mode if possible
|
|
540
|
-
- If launches successfully = pass
|
|
541
|
-
- If crashes = CRITICAL severity
|
|
542
|
-
|
|
543
|
-
4. Test suite: If tests exist, run them
|
|
544
|
-
- Record pass/fail counts
|
|
545
|
-
|
|
546
|
-
CRITICAL: If ANY execution check fails, quality_score CANNOT exceed 6/10.
|
|
547
|
-
|
|
548
|
-
--- SPAWN CAPABILITY ---
|
|
549
|
-
You are at depth {depth}. You MAY spawn sub-workers for:
|
|
550
|
-
- Deep investigation of suspicious code patterns
|
|
551
|
-
- Parallel verification of independent components
|
|
552
|
-
- Debugging assistance for complex failures
|
|
553
|
-
|
|
554
|
-
Spawn limits: Depth 1→4, Depth 2→2, Depth 3→0
|
|
555
|
-
|
|
556
|
-
Before spawning:
|
|
557
|
-
1. Log spawn: bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
|
|
558
|
-
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
|
|
559
|
-
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
|
|
559
|
+
Verification:
|
|
560
|
+
1. Check files exist (Read each)
|
|
561
|
+
2. Run build/type-check
|
|
562
|
+
3. Run tests if they exist
|
|
563
|
+
4. Check success criteria: {list}
|
|
560
564
|
|
|
561
|
-
|
|
562
|
-
-
|
|
563
|
-
-
|
|
564
|
-
- Be skeptical — Builders may have cut corners
|
|
565
|
+
Spawn sub-workers if needed:
|
|
566
|
+
- Log: bash .aether/aether-utils.sh spawn-log "{Watcher-Name}" "watcher" "{child}" "{task}"
|
|
567
|
+
- Announce: "🐜 Spawning {child} to investigate {issue}"
|
|
565
568
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
{
|
|
569
|
-
"ant_name": "{your name}",
|
|
570
|
-
"verification_passed": true | false,
|
|
571
|
-
"files_verified": [],
|
|
572
|
-
"execution_verification": {
|
|
573
|
-
"syntax_check": {"command": "...", "passed": true|false},
|
|
574
|
-
"import_check": {"command": "...", "passed": true|false},
|
|
575
|
-
"launch_test": {"command": "...", "passed": true|false, "error": null},
|
|
576
|
-
"test_suite": {"command": "...", "passed": N, "failed": N}
|
|
577
|
-
},
|
|
578
|
-
"build_result": {"command": "...", "passed": true|false},
|
|
579
|
-
"test_result": {"command": "...", "passed": N, "failed": N},
|
|
580
|
-
"success_criteria_results": [
|
|
581
|
-
{"criterion": "...", "passed": true|false, "evidence": "..."}
|
|
582
|
-
],
|
|
583
|
-
"issues_found": [],
|
|
584
|
-
"quality_score": N,
|
|
585
|
-
"recommendation": "proceed" | "fix_required",
|
|
586
|
-
"spawns": [],
|
|
587
|
-
"model_context": {
|
|
588
|
-
"assigned": "{model}",
|
|
589
|
-
"caste": "watcher",
|
|
590
|
-
"source": "caste-default",
|
|
591
|
-
"reported_at": "ISO-8601 timestamp"
|
|
592
|
-
}
|
|
593
|
-
}
|
|
569
|
+
Return ONLY this JSON:
|
|
570
|
+
{"ant_name": "{Watcher-Name}", "verification_passed": true|false, "files_verified": [], "issues_found": [], "quality_score": N, "recommendation": "proceed|fix_required"}
|
|
594
571
|
```
|
|
595
572
|
|
|
596
|
-
### Step 5.
|
|
573
|
+
### Step 5.5: Process Watcher Results
|
|
597
574
|
|
|
598
|
-
**
|
|
575
|
+
**Task call returns results directly (no TaskOutput needed).**
|
|
599
576
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
- Store results for synthesis in Step 5.6
|
|
577
|
+
**Parse the Watcher's JSON response:** verification_passed, issues_found, quality_score, recommendation
|
|
578
|
+
|
|
579
|
+
**Store results for synthesis in Step 5.7**
|
|
604
580
|
|
|
605
581
|
**Update swarm display when Watcher completes:**
|
|
606
582
|
```bash
|
|
607
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
|
|
608
584
|
```
|
|
609
585
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
### Step 5.4.2: Spawn Chaos Ant for Resilience Testing
|
|
586
|
+
### Step 5.6: Spawn Chaos Ant for Resilience Testing
|
|
613
587
|
|
|
614
588
|
**After the Watcher completes, spawn a Chaos Ant to probe the phase work for edge cases and boundary conditions.**
|
|
615
589
|
|
|
@@ -626,69 +600,36 @@ bash .aether/aether-utils.sh flag-list --phase {phase_number}
|
|
|
626
600
|
```
|
|
627
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".
|
|
628
602
|
|
|
629
|
-
Spawn the Chaos Ant using Task tool with `subagent_type="
|
|
603
|
+
Spawn the Chaos Ant using Task tool with `subagent_type="aether-chaos"` (DO NOT use run_in_background - task blocks until complete):
|
|
604
|
+
# 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."
|
|
630
605
|
|
|
631
|
-
**Chaos Ant Prompt:**
|
|
606
|
+
**Chaos Ant Prompt (CLEAN OUTPUT):**
|
|
632
607
|
```
|
|
633
|
-
You are {Chaos-Name}, a
|
|
608
|
+
You are {Chaos-Name}, a 🎲🐜 Chaos Ant.
|
|
634
609
|
|
|
635
|
-
|
|
636
|
-
Probe the work done by Builders in Phase {id} for edge cases, boundary conditions, and unexpected inputs.
|
|
610
|
+
Test Phase {id} work for edge cases and boundary conditions.
|
|
637
611
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
Model characteristics: Efficient edge case exploration
|
|
641
|
-
Testing focus: Rapid probing of boundaries and edge cases
|
|
612
|
+
Files to test:
|
|
613
|
+
- {list from builder results}
|
|
642
614
|
|
|
643
|
-
|
|
644
|
-
Files created: {list from builder results}
|
|
645
|
-
Files modified: {list from builder results}
|
|
615
|
+
Skip these known issues: {existing_flag_titles}
|
|
646
616
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
617
|
+
Rules:
|
|
618
|
+
- Max 5 scenarios
|
|
619
|
+
- Read-only (don't modify code)
|
|
620
|
+
- Focus: edge cases, boundaries, error handling
|
|
650
621
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
2. You are a TESTER, not an attacker — use investigating/probing language
|
|
654
|
-
3. Do NOT modify any code — read-only analysis
|
|
655
|
-
4. Focus on: edge cases, boundary conditions, error handling gaps, state corruption risks, unexpected inputs
|
|
656
|
-
5. Do NOT re-report issues listed in EXISTING FLAGS above — skip any finding that substantially overlaps with a known flag
|
|
657
|
-
|
|
658
|
-
--- OUTPUT ---
|
|
659
|
-
Return JSON:
|
|
660
|
-
{
|
|
661
|
-
"ant_name": "{your name}",
|
|
662
|
-
"scenarios_tested": 5,
|
|
663
|
-
"findings": [
|
|
664
|
-
{
|
|
665
|
-
"id": 1,
|
|
666
|
-
"category": "edge_case|boundary|error_handling|state|unexpected_input",
|
|
667
|
-
"severity": "critical|high|medium|low|info",
|
|
668
|
-
"title": "...",
|
|
669
|
-
"description": "...",
|
|
670
|
-
"reproduction_steps": ["..."],
|
|
671
|
-
"affected_files": ["..."],
|
|
672
|
-
"recommendation": "..."
|
|
673
|
-
}
|
|
674
|
-
],
|
|
675
|
-
"overall_resilience": "strong|moderate|weak",
|
|
676
|
-
"summary": "...",
|
|
677
|
-
"model_context": {
|
|
678
|
-
"assigned": "{model}",
|
|
679
|
-
"caste": "chaos",
|
|
680
|
-
"source": "caste-default",
|
|
681
|
-
"reported_at": "ISO-8601 timestamp"
|
|
682
|
-
}
|
|
683
|
-
}
|
|
622
|
+
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": "..."}
|
|
684
624
|
```
|
|
685
625
|
|
|
686
|
-
|
|
626
|
+
### Step 5.7: Process Chaos Ant Results
|
|
687
627
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
628
|
+
**Task call returns results directly (no TaskOutput needed).**
|
|
629
|
+
|
|
630
|
+
**Parse the Chaos Ant's JSON response:** findings, overall_resilience, summary
|
|
631
|
+
|
|
632
|
+
**Store results for synthesis in Step 5.9**
|
|
692
633
|
|
|
693
634
|
**Flag critical/high findings:**
|
|
694
635
|
|
|
@@ -709,9 +650,7 @@ bash .aether/aether-utils.sh spawn-complete "{chaos_name}" "completed" "{summary
|
|
|
709
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
|
|
710
651
|
```
|
|
711
652
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
### Step 5.5: Create Flags for Verification Failures
|
|
653
|
+
### Step 5.8: Create Flags for Verification Failures
|
|
715
654
|
|
|
716
655
|
If the Watcher reported `verification_passed: false` or `recommendation: "fix_required"`:
|
|
717
656
|
|
|
@@ -726,11 +665,11 @@ Log the flag creation:
|
|
|
726
665
|
bash .aether/aether-utils.sh activity-log "FLAG" "Watcher" "Created blocker: {issue_title}"
|
|
727
666
|
```
|
|
728
667
|
|
|
729
|
-
This ensures verification failures are persisted as blockers that survive context resets. Chaos Ant findings are flagged in Step 5.
|
|
668
|
+
This ensures verification failures are persisted as blockers that survive context resets. Chaos Ant findings are flagged in Step 5.7.
|
|
730
669
|
|
|
731
|
-
### Step 5.
|
|
670
|
+
### Step 5.9: Synthesize Results
|
|
732
671
|
|
|
733
|
-
**This step runs
|
|
672
|
+
**This step runs after all worker tasks have completed (Builders, Watcher, Chaos).**
|
|
734
673
|
|
|
735
674
|
Collect all worker outputs and create phase summary:
|
|
736
675
|
|
|
@@ -774,6 +713,39 @@ bash .aether/aether-utils.sh grave-add "{file}" "{ant_name}" "{task_id}" {phase}
|
|
|
774
713
|
bash .aether/aether-utils.sh activity-log "GRAVE" "Queen" "Grave marker placed at {file} — {ant_name} failed: {summary}"
|
|
775
714
|
```
|
|
776
715
|
|
|
716
|
+
**Error Handoff Update:**
|
|
717
|
+
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
|
+
|
|
727
|
+
## Failed Workers
|
|
728
|
+
{for each failed worker:}
|
|
729
|
+
- {ant_name}: {failure_summary}
|
|
730
|
+
{end for}
|
|
731
|
+
|
|
732
|
+
## Grave Markers Placed
|
|
733
|
+
{for each grave:}
|
|
734
|
+
- {file}: {caution_level} caution
|
|
735
|
+
{end for}
|
|
736
|
+
|
|
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`
|
|
742
|
+
|
|
743
|
+
## Session Note
|
|
744
|
+
Build completed but workers failed. Grave markers placed.
|
|
745
|
+
Review failures before advancing.
|
|
746
|
+
HANDOFF_EOF
|
|
747
|
+
```
|
|
748
|
+
|
|
777
749
|
Only fires when workers fail. Zero impact on successful builds.
|
|
778
750
|
|
|
779
751
|
--- SPAWN TRACKING ---
|
|
@@ -868,6 +840,89 @@ Use AskUserQuestion to get approval. Record in events:
|
|
|
868
840
|
- If approved: `"<timestamp>|visual_approved|build|Phase {id} UI approved"`
|
|
869
841
|
- If rejected: `"<timestamp>|visual_rejected|build|Phase {id} UI rejected: {reason}"`
|
|
870
842
|
|
|
843
|
+
### Step 6.5: Update Handoff Document
|
|
844
|
+
|
|
845
|
+
After synthesis is complete, update the handoff document with current state for session recovery:
|
|
846
|
+
|
|
847
|
+
```bash
|
|
848
|
+
# Update handoff with build results
|
|
849
|
+
jq -n \
|
|
850
|
+
--arg timestamp "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
|
851
|
+
--arg goal "$(jq -r '.goal' .aether/data/COLONY_STATE.json)" \
|
|
852
|
+
--arg phase "$(jq -r '.current_phase' .aether/data/COLONY_STATE.json)" \
|
|
853
|
+
--arg phase_name "{phase_name}" \
|
|
854
|
+
--arg status "{synthesis.status}" \
|
|
855
|
+
--arg summary "{synthesis.summary}" \
|
|
856
|
+
--argjson tasks_completed '{synthesis.tasks_completed | length}' \
|
|
857
|
+
--argjson tasks_failed '{synthesis.tasks_failed | length}' \
|
|
858
|
+
--arg next_action "{if synthesis.status == "completed" then "/ant:continue" else "/ant:flags" end}" \
|
|
859
|
+
'{
|
|
860
|
+
"last_updated": $timestamp,
|
|
861
|
+
"goal": $goal,
|
|
862
|
+
"current_phase": $phase,
|
|
863
|
+
"phase_name": $phase_name,
|
|
864
|
+
"build_status": $status,
|
|
865
|
+
"summary": $summary,
|
|
866
|
+
"tasks_completed": $tasks_completed,
|
|
867
|
+
"tasks_failed": $tasks_failed,
|
|
868
|
+
"next_recommended_action": $next_action,
|
|
869
|
+
"can_resume": true,
|
|
870
|
+
"note": "Phase build completed. Run /ant:continue to advance if verification passed."
|
|
871
|
+
}' > .aether/data/last-build-result.json
|
|
872
|
+
|
|
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}
|
|
892
|
+
|
|
893
|
+
## Files Changed
|
|
894
|
+
- Created: {synthesis.files_created | length} files
|
|
895
|
+
- Modified: {synthesis.files_modified | length} files
|
|
896
|
+
|
|
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`
|
|
901
|
+
|
|
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
|
+
```
|
|
906
|
+
|
|
907
|
+
This ensures the handoff always reflects the latest build state, even if the session crashes before explicit pause.
|
|
908
|
+
|
|
909
|
+
### Step 6.5: Update Context Document
|
|
910
|
+
|
|
911
|
+
Log this build activity to `.aether/CONTEXT.md`:
|
|
912
|
+
|
|
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
|
+
```
|
|
921
|
+
|
|
922
|
+
Also update safe-to-clear status:
|
|
923
|
+
- If build completed successfully: `context-update safe-to-clear "YES" "Build complete, ready to continue"`
|
|
924
|
+
- If build failed: `context-update safe-to-clear "NO" "Build failed — run /ant:swarm or /ant:flags"`
|
|
925
|
+
|
|
871
926
|
### Step 7: Display Results
|
|
872
927
|
|
|
873
928
|
**This step runs ONLY after synthesis is complete. All values come from actual worker results.**
|
|
@@ -882,7 +937,7 @@ bash .aether/aether-utils.sh swarm-display-render "$build_id"
|
|
|
882
937
|
```
|
|
883
938
|
|
|
884
939
|
The swarm display will show:
|
|
885
|
-
- 🐜 All workers with their caste emojis (
|
|
940
|
+
- 🐜 All workers with their caste emojis (🔨🐜 Builder, 👁️🐜 Watcher, 🎲🐜 Chaos)
|
|
886
941
|
- 📖 Tool usage stats (Read, Grep, Edit, Bash counts)
|
|
887
942
|
- 🏠 Chamber activity map (Fungus Garden, Nursery, Refuse Pile)
|
|
888
943
|
- ✅ Progress bars at 100% for completed work
|
|
@@ -985,3 +1040,11 @@ The swarm display will show:
|
|
|
985
1040
|
- Mark tasks as completed
|
|
986
1041
|
- Extract learnings
|
|
987
1042
|
- Advance to next phase
|
|
1043
|
+
|
|
1044
|
+
### Step 8: Update Session
|
|
1045
|
+
|
|
1046
|
+
Update the session tracking file to enable `/ant:resume` after context clear:
|
|
1047
|
+
|
|
1048
|
+
```bash
|
|
1049
|
+
bash .aether/aether-utils.sh session-update "/ant:build {phase_id}" "/ant:continue" "Phase {phase_id} build completed: {synthesis.status}"
|
|
1050
|
+
```
|