aether-colony 3.1.1 → 3.1.3

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.
@@ -277,14 +277,36 @@ CONSTRAINTS: (none)
277
277
  The `archaeology_context` will be injected into builder prompts in Step 5.1 (see below).
278
278
  If this step was skipped (no existing files modified), the archaeology section is omitted from builder prompts.
279
279
 
280
- ### Step 5: Analyze Tasks and Plan Spawns
280
+ ### Step 5: Initialize Swarm Display and Analyze Tasks
281
281
 
282
282
  **YOU (the Queen) will spawn workers directly. Do NOT delegate to a single Prime Worker.**
283
283
 
284
- Log phase start:
284
+ **Initialize visual swarm tracking:**
285
285
  ```bash
286
+ # Generate unique build ID
287
+ build_id="build-$(date +%s)"
288
+
289
+ # Initialize swarm display for this build
290
+ bash .aether/aether-utils.sh swarm-display-init "$build_id"
291
+
292
+ # Log phase start
286
293
  bash .aether/aether-utils.sh activity-log "EXECUTING" "Queen" "Phase {id}: {name} - Queen dispatching workers"
294
+
295
+ # Display animated header
296
+ bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Phase {id}: {name}" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 10 "fungus_garden" 0
297
+ ```
298
+
299
+ **Show real-time display header:**
287
300
  ```
301
+ 🔨🐜 COLONY BUILD INITIATED 🐜🔨
302
+ ═══════════════════════════════════════════════════
303
+ Phase {id}: {name}
304
+ Build ID: {build_id}
305
+
306
+ Launching swarm display... (visual tracking enabled)
307
+ ```
308
+
309
+ Analyze the phase tasks:
288
310
 
289
311
  Analyze the phase tasks:
290
312
 
@@ -330,9 +352,10 @@ Total: {N} Builders + 1 Watcher + 1 Chaos = {N+2} spawns
330
352
 
331
353
  For each Wave 1 task, use Task tool with `subagent_type="general"` and `run_in_background: true`:
332
354
 
333
- Log each spawn:
355
+ Log each spawn and update swarm display:
334
356
  ```bash
335
357
  bash .aether/aether-utils.sh spawn-log "Queen" "builder" "{ant_name}" "{task_description}"
358
+ 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
336
359
  ```
337
360
 
338
361
  **Builder Worker Prompt Template:**
@@ -402,9 +425,12 @@ DO NOT spawn for work you can complete in < 10 tool calls.
402
425
  Before spawning:
403
426
  1. Check: bash .aether/aether-utils.sh spawn-can-spawn {depth}
404
427
  2. Generate name: bash .aether/aether-utils.sh generate-ant-name "{caste}"
405
- 3. Log: bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
406
- 4. Use Task tool with subagent_type="general"
407
- 5. After completion: bash .aether/aether-utils.sh spawn-complete "{child_name}" "{status}" "{summary}"
428
+ 3. Log spawn: bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
429
+ 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
430
+ 5. Use Task tool with subagent_type="general"
431
+ 6. After completion:
432
+ - Log completion: bash .aether/aether-utils.sh spawn-complete "{child_name}" "{status}" "{summary}"
433
+ - 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
408
434
 
409
435
  Full spawn format: .aether/workers.md section "Spawning Sub-Workers"
410
436
 
@@ -440,11 +466,15 @@ For each spawned worker, call TaskOutput with `block: true` to wait for completi
440
466
 
441
467
  Store all results for synthesis in Step 5.6.
442
468
 
443
- For each completed worker, log:
469
+ For each completed worker, log and update swarm display:
444
470
  ```bash
445
471
  bash .aether/aether-utils.sh spawn-complete "{ant_name}" "completed" "{summary}"
472
+ 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
446
473
  ```
447
474
 
475
+ **Update swarm display with accumulated tool usage:**
476
+ 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.
477
+
448
478
  **Only proceed to Step 5.3 after ALL Wave 1 TaskOutput calls have returned.**
449
479
 
450
480
  ### Step 5.3: Spawn Wave 2+ Workers (Sequential Waves)
@@ -457,6 +487,7 @@ Repeat Step 5.1-5.2 for each subsequent wave, waiting for previous wave to compl
457
487
 
458
488
  ```bash
459
489
  bash .aether/aether-utils.sh spawn-log "Queen" "watcher" "{watcher_name}" "Independent verification"
490
+ 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
460
491
  ```
461
492
 
462
493
  **Watcher Worker Prompt:**
@@ -521,7 +552,9 @@ You are at depth {depth}. You MAY spawn sub-workers for:
521
552
  Spawn limits: Depth 1→4, Depth 2→2, Depth 3→0
522
553
 
523
554
  Before spawning:
524
- bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
555
+ 1. Log spawn: bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
556
+ 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
557
+ 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
525
558
 
526
559
  --- CRITICAL ---
527
560
  - You did NOT build this code — verify it objectively
@@ -567,6 +600,11 @@ Call TaskOutput with `block: true` using the Watcher's task_id:
567
600
  - Parse: verification_passed, issues_found, quality_score, recommendation
568
601
  - Store results for synthesis in Step 5.6
569
602
 
603
+ **Update swarm display when Watcher completes:**
604
+ ```bash
605
+ 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
606
+ ```
607
+
570
608
  **Only proceed to Step 5.4.2 after Watcher TaskOutput has returned.**
571
609
 
572
610
  ### Step 5.4.2: Spawn Chaos Ant for Resilience Testing
@@ -577,6 +615,7 @@ Generate a chaos ant name and log the spawn:
577
615
  ```bash
578
616
  bash .aether/aether-utils.sh generate-ant-name "chaos"
579
617
  bash .aether/aether-utils.sh spawn-log "Queen" "chaos" "{chaos_name}" "Resilience testing of Phase {id} work"
618
+ bash .aether/aether-utils.sh swarm-display-update "{chaos_name}" "chaos" "probing" "Resilience testing" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "refuse_pile" 75
580
619
  ```
581
620
 
582
621
  **Retrieve existing flags for this phase** (to avoid duplicate findings):
@@ -662,9 +701,10 @@ Log the flag:
662
701
  bash .aether/aether-utils.sh activity-log "FLAG" "Chaos" "Created blocker: {finding.title}"
663
702
  ```
664
703
 
665
- Log chaos ant completion:
704
+ Log chaos ant completion and update swarm display:
666
705
  ```bash
667
706
  bash .aether/aether-utils.sh spawn-complete "{chaos_name}" "completed" "{summary}"
707
+ 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
668
708
  ```
669
709
 
670
710
  **Only proceed to Step 5.5 after Chaos Ant TaskOutput has returned.**
@@ -830,7 +870,23 @@ Use AskUserQuestion to get approval. Record in events:
830
870
 
831
871
  **This step runs ONLY after synthesis is complete. All values come from actual worker results.**
832
872
 
833
- Display build summary based on synthesis results AND `verbose_mode` from Step 1:
873
+ **First, render the final swarm display showing all completed workers:**
874
+ ```bash
875
+ # Final swarm display update - mark Queen as completed
876
+ bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Phase {id} complete" "Colony" '{"read":10,"grep":5,"edit":5,"bash":2}' 100 "fungus_garden" 100
877
+
878
+ # Render the final swarm display
879
+ bash .aether/aether-utils.sh swarm-display-render "$build_id"
880
+ ```
881
+
882
+ The swarm display will show:
883
+ - 🐜 All workers with their caste emojis (🔨 Builder, 👁️ Watcher, 🎲 Chaos)
884
+ - 📖 Tool usage stats (Read, Grep, Edit, Bash counts)
885
+ - 🏠 Chamber activity map (Fungus Garden, Nursery, Refuse Pile)
886
+ - ✅ Progress bars at 100% for completed work
887
+ - 🌈 Color-coded by caste
888
+
889
+ **Then display build summary based on synthesis results AND `verbose_mode` from Step 1:**
834
890
 
835
891
  **If verbose_mode = false (compact output, ~12 lines):**
836
892
 
@@ -736,6 +736,48 @@ Set `last_commit_suggestion_phase` to `{phase_id}` in COLONY_STATE.json (add the
736
736
 
737
737
  **Error handling:** If any git command fails (not a repo, merge conflict, pre-commit hook rejection), display the error output and continue to the next step. The commit suggestion is advisory only -- it never blocks the flow.
738
738
 
739
+ Continue to Step 2.7 (Context Clear Suggestion), then to Step 2.5 (Project Completion) or Step 3 (Display Result).
740
+
741
+ ### Step 2.7: Context Clear Suggestion (Optional)
742
+
743
+ **This step is non-blocking. Skipping does not affect phase advancement.**
744
+
745
+ After committing (or skipping commit), suggest clearing context to refresh before the next phase.
746
+
747
+ 1. **Display the suggestion:**
748
+ ```
749
+ ──────────────────────────────────────────────────
750
+ Context Refresh
751
+ ──────────────────────────────────────────────────
752
+
753
+ State is fully persisted and committed.
754
+ Phase {next_id} is ready to build.
755
+
756
+ ──────────────────────────────────────────────────
757
+ ```
758
+
759
+ 2. **Use AskUserQuestion:**
760
+ ```
761
+ Clear context now?
762
+
763
+ 1. Yes, clear context then run /ant:build {next_id}
764
+ 2. No, continue in current context
765
+ ```
766
+
767
+ 3. **If option 1 ("Yes, clear context"):**
768
+
769
+ **IMPORTANT:** Claude Code does not support programmatic /clear. Display instructions:
770
+ ```
771
+ Please type: /clear
772
+
773
+ Then run: /ant:build {next_id}
774
+ ```
775
+
776
+ Record the suggestion: Set `context_clear_suggested` to `true` in COLONY_STATE.json.
777
+
778
+ 4. **If option 2 ("No, continue in current context"):**
779
+ Display: `Continuing in current context. State is saved.`
780
+
739
781
  Continue to Step 2.5 (Project Completion) or Step 3 (Display Result).
740
782
 
741
783
  ### Step 2.5: Project Completion
@@ -798,7 +840,7 @@ Output:
798
840
  /ant:phase {next_id} 📋 Review phase details first
799
841
  /ant:focus "<area>" 🎯 Guide colony attention
800
842
 
801
- 💾 State persisted — safe to /clear, then run /ant:build {next_id}
843
+ 💾 State persisted — context clear suggested above
802
844
  ```
803
845
 
804
846
  **IMPORTANT:** In the "Next Steps" section above, substitute the actual phase number for `{next_id}` (calculated in Step 2 as `current_phase + 1`). For example, if advancing to phase 4, output `/ant:build 4` not `/ant:build {next_id}`.
@@ -15,30 +15,74 @@ Run using the Bash tool: `bash .aether/aether-utils.sh version-check 2>/dev/null
15
15
 
16
16
  If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
17
17
 
18
+ ### Step 0.6: Verify LiteLLM Proxy
19
+
20
+ Check that the LiteLLM proxy is running for model routing:
21
+
22
+ ```bash
23
+ curl -s http://localhost:4000/health | grep -q "healthy" && echo "Proxy healthy" || echo "Proxy not running - workers will use default model"
24
+ ```
25
+
26
+ If proxy is not healthy, log a warning but continue (workers will fall back to default routing).
27
+
28
+ ### Step 0.5: Load Colony State
29
+
30
+ Run using Bash tool: `bash .aether/aether-utils.sh load-state`
31
+
32
+ If the command fails (non-zero exit or JSON has ok: false):
33
+ 1. Parse error JSON
34
+ 2. If error code is E_FILE_NOT_FOUND: "No colony initialized. Run /ant:init first." and stop
35
+ 3. If validation error: Display error details with recovery suggestion and stop
36
+ 4. For other errors: Display generic error and suggest /ant:status for diagnostics
37
+
38
+ If successful:
39
+ 1. Parse the state JSON from result field
40
+ 2. Check if goal is null - if so: "No colony initialized. Run /ant:init first." and stop
41
+ 3. Extract current_phase and phase name from plan.phases[current_phase - 1].name
42
+ 4. Display brief resumption context:
43
+ ```
44
+ 🔄 Resuming: Phase X - Name
45
+ ```
46
+ (If HANDOFF.md exists, this provides orientation before the build proceeds)
47
+
48
+ After displaying context, run: `bash .aether/aether-utils.sh unload-state` to release the lock.
49
+
18
50
  ### Step 1: Validate + Read State
19
51
 
20
52
  **Parse $ARGUMENTS:**
21
53
  1. Extract the phase number (first argument)
22
54
  2. Check remaining arguments for flags:
23
55
  - If contains `--verbose` or `-v`: set `verbose_mode = true`
24
- - Otherwise: set `verbose_mode = false`
56
+ - If contains `--model <name>` or `-m <name>`: set `cli_model_override = <name>`
57
+ - Otherwise: set defaults
25
58
 
26
59
  If the phase number is empty or not a number:
27
60
 
28
61
  ```
29
- Usage: /ant:build <phase_number> [--verbose|-v]
62
+ Usage: /ant:build <phase_number> [--verbose|-v] [--model <model>|-m <model>]
30
63
 
31
64
  Options:
32
- --verbose, -v Show full completion details (spawn tree, TDD, patterns)
65
+ --verbose, -v Show full completion details (spawn tree, TDD, patterns)
66
+ --model, -m <name> Override model for this build (one-time)
33
67
 
34
68
  Examples:
35
69
  /ant:build 1 Build Phase 1 (compact output)
36
70
  /ant:build 1 --verbose Build Phase 1 (full details)
37
71
  /ant:build 3 -v Build Phase 3 (full details)
72
+ /ant:build 1 --model glm-5 Build Phase 1 with glm-5 for all workers
38
73
  ```
39
74
 
40
75
  Stop here.
41
76
 
77
+ **Validate CLI model override (if provided):**
78
+ If `cli_model_override` is set:
79
+ 1. Validate the model: `bash .aether/aether-utils.sh model-profile validate "$cli_model_override"`
80
+ 2. Parse JSON result - if `.result.valid` is false:
81
+ - Display: `Error: Invalid model "$cli_model_override"`
82
+ - Display: `Valid models: {list from .result.models}`
83
+ - Stop here
84
+ 3. If valid: Display `Using override model: {model}`
85
+
42
86
  Read `.aether/data/COLONY_STATE.json`.
43
87
 
44
88
  **Auto-upgrade old state:**
@@ -235,13 +279,33 @@ CONSTRAINTS: (none)
235
279
  The `archaeology_context` will be injected into builder prompts in Step 5.1 (see below).
236
280
  If this step was skipped (no existing files modified), the archaeology section is omitted from builder prompts.
237
281
 
238
- ### Step 5: Analyze Tasks and Plan Spawns
282
+ ### Step 5: Initialize Swarm Display and Analyze Tasks
239
283
 
240
284
  **YOU (the Queen) will spawn workers directly. Do NOT delegate to a single Prime Worker.**
241
285
 
242
- Log phase start:
286
+ **Initialize visual swarm tracking:**
243
287
  ```bash
288
+ # Generate unique build ID
289
+ build_id="build-$(date +%s)"
290
+
291
+ # Initialize swarm display for this build
292
+ bash .aether/aether-utils.sh swarm-display-init "$build_id"
293
+
294
+ # Log phase start
244
295
  bash .aether/aether-utils.sh activity-log "EXECUTING" "Queen" "Phase {id}: {name} - Queen dispatching workers"
296
+
297
+ # Display animated header
298
+ bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Phase {id}: {name}" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 10 "fungus_garden" 0
299
+ ```
300
+
301
+ **Show real-time display header:**
302
+ ```
303
+ 🔨🐜 COLONY BUILD INITIATED 🐜🔨
304
+ ═══════════════════════════════════════════════════
305
+ Phase {id}: {name}
306
+ Build ID: {build_id}
307
+
308
+ Launching swarm display... (visual tracking enabled)
245
309
  ```
246
310
 
247
311
  Analyze the phase tasks:
@@ -288,9 +352,10 @@ Total: {N} Builders + 1 Watcher + 1 Chaos = {N+2} spawns
288
352
 
289
353
  For each Wave 1 task, use Task tool with `subagent_type="general"` and `run_in_background: true`:
290
354
 
291
- Log each spawn:
355
+ Log each spawn and update swarm display:
292
356
  ```bash
293
357
  bash .aether/aether-utils.sh spawn-log "Queen" "builder" "{ant_name}" "{task_description}"
358
+ 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
294
359
  ```
295
360
 
296
361
  **Builder Worker Prompt Template:**
@@ -360,9 +425,12 @@ DO NOT spawn for work you can complete in < 10 tool calls.
360
425
  Before spawning:
361
426
  1. Check: bash .aether/aether-utils.sh spawn-can-spawn {depth}
362
427
  2. Generate name: bash .aether/aether-utils.sh generate-ant-name "{caste}"
363
- 3. Log: bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
364
- 4. Use Task tool with subagent_type="general"
365
- 5. After completion: bash .aether/aether-utils.sh spawn-complete "{child_name}" "{status}" "{summary}"
428
+ 3. Log spawn: bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
429
+ 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
430
+ 5. Use Task tool with subagent_type="general"
431
+ 6. After completion:
432
+ - Log completion: bash .aether/aether-utils.sh spawn-complete "{child_name}" "{status}" "{summary}"
433
+ - 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
366
434
 
367
435
  Full spawn format: .aether/workers.md section "Spawning Sub-Workers"
368
436
 
@@ -392,11 +460,15 @@ For each spawned worker, call TaskOutput with `block: true` to wait for completi
392
460
 
393
461
  Store all results for synthesis in Step 5.6.
394
462
 
395
- For each completed worker, log:
463
+ For each completed worker, log and update swarm display:
396
464
  ```bash
397
465
  bash .aether/aether-utils.sh spawn-complete "{ant_name}" "completed" "{summary}"
466
+ 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
398
467
  ```
399
468
 
469
+ **Update swarm display with accumulated tool usage:**
470
+ 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.
471
+
400
472
  **Only proceed to Step 5.3 after ALL Wave 1 TaskOutput calls have returned.**
401
473
 
402
474
  ### Step 5.3: Spawn Wave 2+ Workers (Sequential Waves)
@@ -409,6 +481,7 @@ Repeat Step 5.1-5.2 for each subsequent wave, waiting for previous wave to compl
409
481
 
410
482
  ```bash
411
483
  bash .aether/aether-utils.sh spawn-log "Queen" "watcher" "{watcher_name}" "Independent verification"
484
+ 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
412
485
  ```
413
486
 
414
487
  **Watcher Worker Prompt:**
@@ -468,7 +541,9 @@ You are at depth {depth}. You MAY spawn sub-workers for:
468
541
  Spawn limits: Depth 1→4, Depth 2→2, Depth 3→0
469
542
 
470
543
  Before spawning:
471
- bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
544
+ 1. Log spawn: bash .aether/aether-utils.sh spawn-log "{your_name}" "{caste}" "{child_name}" "{task}"
545
+ 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
546
+ 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
472
547
 
473
548
  --- CRITICAL ---
474
549
  - You did NOT build this code — verify it objectively
@@ -508,6 +583,11 @@ Call TaskOutput with `block: true` using the Watcher's task_id:
508
583
  - Parse: verification_passed, issues_found, quality_score, recommendation
509
584
  - Store results for synthesis in Step 5.6
510
585
 
586
+ **Update swarm display when Watcher completes:**
587
+ ```bash
588
+ 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
589
+ ```
590
+
511
591
  **Only proceed to Step 5.4.2 after Watcher TaskOutput has returned.**
512
592
 
513
593
  ### Step 5.4.2: Spawn Chaos Ant for Resilience Testing
@@ -518,6 +598,7 @@ Generate a chaos ant name and log the spawn:
518
598
  ```bash
519
599
  bash .aether/aether-utils.sh generate-ant-name "chaos"
520
600
  bash .aether/aether-utils.sh spawn-log "Queen" "chaos" "{chaos_name}" "Resilience testing of Phase {id} work"
601
+ bash .aether/aether-utils.sh swarm-display-update "{chaos_name}" "chaos" "probing" "Resilience testing" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "refuse_pile" 75
521
602
  ```
522
603
 
523
604
  **Retrieve existing flags for this phase** (to avoid duplicate findings):
@@ -592,12 +673,16 @@ Log the flag:
592
673
  bash .aether/aether-utils.sh activity-log "FLAG" "Chaos" "Created blocker: {finding.title}"
593
674
  ```
594
675
 
595
- Log chaos ant completion:
676
+ Log the flag:
596
677
  ```bash
597
- bash .aether/aether-utils.sh spawn-complete "{chaos_name}" "completed" "{summary}"
678
+ bash .aether/aether-utils.sh activity-log "FLAG" "Chaos" "Created blocker: {finding.title}"
598
679
  ```
599
680
 
600
- **Only proceed to Step 5.5 after Chaos Ant TaskOutput has returned.**
681
+ Log chaos ant completion and update swarm display:
682
+ ```bash
683
+ bash .aether/aether-utils.sh spawn-complete "{chaos_name}" "completed" "{summary}"
684
+ 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
685
+ ```
601
686
 
602
687
  ### Step 5.5: Create Flags for Verification Failures
603
688
 
@@ -760,7 +845,23 @@ Use AskUserQuestion to get approval. Record in events:
760
845
 
761
846
  **This step runs ONLY after synthesis is complete. All values come from actual worker results.**
762
847
 
763
- Display build summary based on synthesis results AND `verbose_mode` from Step 1:
848
+ **First, render the final swarm display showing all completed workers:**
849
+ ```bash
850
+ # Final swarm display update - mark Queen as completed
851
+ bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Phase {id} complete" "Colony" '{"read":10,"grep":5,"edit":5,"bash":2}' 100 "fungus_garden" 100
852
+
853
+ # Render the final swarm display
854
+ bash .aether/aether-utils.sh swarm-display-render "$build_id"
855
+ ```
856
+
857
+ The swarm display will show:
858
+ - 🐜 All workers with their caste emojis (🔨 Builder, 👁️ Watcher, 🎲 Chaos)
859
+ - 📖 Tool usage stats (Read, Grep, Edit, Bash counts)
860
+ - 🏠 Chamber activity map (Fungus Garden, Nursery, Refuse Pile)
861
+ - ✅ Progress bars at 100% for completed work
862
+ - 🌈 Color-coded by caste
863
+
864
+ **Then display build summary based on synthesis results AND `verbose_mode` from Step 1:**
764
865
 
765
866
  **If verbose_mode = false (compact output, ~12 lines):**
766
867
 
@@ -719,6 +719,48 @@ Set `last_commit_suggestion_phase` to `{phase_id}` in COLONY_STATE.json (add the
719
719
 
720
720
  **Error handling:** If any git command fails (not a repo, merge conflict, pre-commit hook rejection), display the error output and continue to the next step. The commit suggestion is advisory only -- it never blocks the flow.
721
721
 
722
+ Continue to Step 2.7 (Context Clear Suggestion), then to Step 2.5 (Project Completion) or Step 3 (Display Result).
723
+
724
+ ### Step 2.7: Context Clear Suggestion (Optional)
725
+
726
+ **This step is non-blocking. Skipping does not affect phase advancement.**
727
+
728
+ After committing (or skipping commit), suggest clearing context to refresh before the next phase.
729
+
730
+ 1. **Display the suggestion:**
731
+ ```
732
+ ──────────────────────────────────────────────────
733
+ Context Refresh
734
+ ──────────────────────────────────────────────────
735
+
736
+ State is fully persisted and committed.
737
+ Phase {next_id} is ready to build.
738
+
739
+ ──────────────────────────────────────────────────
740
+ ```
741
+
742
+ 2. **Use AskUserQuestion:**
743
+ ```
744
+ Clear context now?
745
+
746
+ 1. Yes, clear context then run /ant:build {next_id}
747
+ 2. No, continue in current context
748
+ ```
749
+
750
+ 3. **If option 1 ("Yes, clear context"):**
751
+
752
+ **IMPORTANT:** OpenCode does not support programmatic /clear. Display instructions:
753
+ ```
754
+ Please type: /clear
755
+
756
+ Then run: /ant:build {next_id}
757
+ ```
758
+
759
+ Record the suggestion: Set `context_clear_suggested` to `true` in COLONY_STATE.json.
760
+
761
+ 4. **If option 2 ("No, continue in current context"):**
762
+ Display: `Continuing in current context. State is saved.`
763
+
722
764
  Continue to Step 2.5 (Project Completion) or Step 3 (Display Result).
723
765
 
724
766
  ### Step 2.5: Project Completion
@@ -781,7 +823,7 @@ Output:
781
823
  /ant:phase {next_id} 📋 Review phase details first
782
824
  /ant:focus "<area>" 🎯 Guide colony attention
783
825
 
784
- 💾 State persisted — safe to /clear, then run /ant:build {next_id}
826
+ 💾 State persisted — context clear suggested above
785
827
  ```
786
828
 
787
829
  **IMPORTANT:** In the "Next Steps" section above, substitute the actual phase number for `{next_id}` (calculated in Step 2 as `current_phase + 1`). For example, if advancing to phase 4, output `/ant:build 4` not `/ant:build {next_id}`.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: ant:maturity
3
+ description: "👑🐜🏛️🐜👑 View colony maturity journey with ASCII art anthill"
4
+ ---
5
+
6
+ You are the **Queen**. Display the colony's maturity journey.
7
+
8
+ ## Instructions
9
+
10
+ ### Step 1: Detect Current Milestone
11
+
12
+ Run: `bash .aether/aether-utils.sh milestone-detect`
13
+
14
+ Parse JSON result to get:
15
+ - `milestone`: Current milestone name (First Mound, Open Chambers, Brood Stable, Ventilated Nest, Sealed Chambers, Crowned Anthill)
16
+ - `version`: Computed version string
17
+ - `phases_completed`: Number of completed phases
18
+ - `total_phases`: Total phases in plan
19
+
20
+ ### Step 2: Read Colony State
21
+
22
+ Read `.aether/data/COLONY_STATE.json` to get:
23
+ - `goal`: Colony goal
24
+ - `initialized_at`: When colony was started
25
+
26
+ Calculate colony age from initialized_at to now (in days).
27
+
28
+ ### Step 3: Display Maturity Journey
29
+
30
+ Display header:
31
+ ```
32
+ .-.
33
+ (o o) AETHER COLONY
34
+ | O | Maturity Journey
35
+ `-`
36
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
37
+
38
+ 👑 Goal: {goal (truncated to 50 chars)}
39
+ 🏆 Current: {milestone} ({version})
40
+ 📍 Progress: {phases_completed} of {total_phases} phases
41
+ 📅 Colony Age: {N} days
42
+ ```
43
+
44
+ ### Step 4: Show ASCII Art Anthill
45
+
46
+ Read the ASCII art file for the current milestone:
47
+ - First Mound → `.aether/visualizations/anthill-stages/first-mound.txt`
48
+ - Open Chambers → `.aether/visualizations/anthill-stages/open-chambers.txt`
49
+ - Brood Stable → `.aether/visualizations/anthill-stages/brood-stable.txt`
50
+ - Ventilated Nest → `.aether/visualizations/anthill-stages/ventilated-nest.txt`
51
+ - Sealed Chambers → `.aether/visualizations/anthill-stages/sealed-chambers.txt`
52
+ - Crowned Anthill → `.aether/visualizations/anthill-stages/crowned-anthill.txt`
53
+
54
+ Display the ASCII art with current milestone highlighted (bold/bright).
55
+
56
+ ### Step 5: Show Journey Progress Bar
57
+
58
+ Display progress through all milestones:
59
+
60
+ ```
61
+ Journey Progress:
62
+
63
+ [█░░░░░] First Mound (0 phases) - Complete
64
+ [██░░░░] Open Chambers (1-3 phases) - Complete
65
+ [███░░░] Brood Stable (4-6 phases) - Complete
66
+ [████░░] Ventilated Nest (7-10 phases) - Current
67
+ [█████░] Sealed Chambers (11-14 phases)
68
+ [██████] Crowned Anthill (15+ phases)
69
+
70
+ Next: Ventilated Nest → Sealed Chambers
71
+ Complete {N} more phases to advance
72
+ ```
73
+
74
+ Calculate which milestones are complete vs current vs upcoming based on phases_completed.
75
+
76
+ ### Step 6: Show Colony Statistics
77
+
78
+ Display summary stats:
79
+ ```
80
+ Colony Statistics:
81
+ 🐜 Phases Completed: {phases_completed}
82
+ 📋 Total Phases: {total_phases}
83
+ 📅 Days Active: {colony_age_days}
84
+ 🏆 Current Milestone: {milestone}
85
+ 🎯 Completion: {percent}%
86
+ ```
87
+
88
+ ### Edge Cases
89
+
90
+ - If milestone file doesn't exist: Show error "Milestone visualization not found"
91
+ - If COLONY_STATE.json missing: "No colony initialized. Run /ant:init first."
92
+ - If phases_completed is 0: All milestones show as upcoming except First Mound