aether-colony 5.1.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/.aether/aether-utils.sh +157 -42
  2. package/.aether/agents/aether-ambassador.md +140 -0
  3. package/.aether/agents/aether-archaeologist.md +108 -0
  4. package/.aether/agents/aether-architect.md +133 -0
  5. package/.aether/agents/aether-auditor.md +144 -0
  6. package/.aether/agents/aether-builder.md +184 -0
  7. package/.aether/agents/aether-chaos.md +115 -0
  8. package/.aether/agents/aether-chronicler.md +122 -0
  9. package/.aether/agents/aether-gatekeeper.md +116 -0
  10. package/.aether/agents/aether-includer.md +117 -0
  11. package/.aether/agents/aether-keeper.md +177 -0
  12. package/.aether/agents/aether-measurer.md +128 -0
  13. package/.aether/agents/aether-oracle.md +137 -0
  14. package/.aether/agents/aether-probe.md +133 -0
  15. package/.aether/agents/aether-queen.md +286 -0
  16. package/.aether/agents/aether-route-setter.md +130 -0
  17. package/.aether/agents/aether-sage.md +106 -0
  18. package/.aether/agents/aether-scout.md +101 -0
  19. package/.aether/agents/aether-surveyor-disciplines.md +391 -0
  20. package/.aether/agents/aether-surveyor-nest.md +329 -0
  21. package/.aether/agents/aether-surveyor-pathogens.md +264 -0
  22. package/.aether/agents/aether-surveyor-provisions.md +334 -0
  23. package/.aether/agents/aether-tracker.md +137 -0
  24. package/.aether/agents/aether-watcher.md +174 -0
  25. package/.aether/agents/aether-weaver.md +130 -0
  26. package/.aether/commands/claude/archaeology.md +334 -0
  27. package/.aether/commands/claude/build.md +65 -0
  28. package/.aether/commands/claude/chaos.md +336 -0
  29. package/.aether/commands/claude/colonize.md +259 -0
  30. package/.aether/commands/claude/continue.md +60 -0
  31. package/.aether/commands/claude/council.md +507 -0
  32. package/.aether/commands/claude/data-clean.md +81 -0
  33. package/.aether/commands/claude/dream.md +268 -0
  34. package/.aether/commands/claude/entomb.md +498 -0
  35. package/.aether/commands/claude/export-signals.md +57 -0
  36. package/.aether/commands/claude/feedback.md +96 -0
  37. package/.aether/commands/claude/flag.md +151 -0
  38. package/.aether/commands/claude/flags.md +169 -0
  39. package/.aether/commands/claude/focus.md +76 -0
  40. package/.aether/commands/claude/help.md +154 -0
  41. package/.aether/commands/claude/history.md +140 -0
  42. package/.aether/commands/claude/import-signals.md +71 -0
  43. package/.aether/commands/claude/init.md +505 -0
  44. package/.aether/commands/claude/insert-phase.md +105 -0
  45. package/.aether/commands/claude/interpret.md +278 -0
  46. package/.aether/commands/claude/lay-eggs.md +210 -0
  47. package/.aether/commands/claude/maturity.md +113 -0
  48. package/.aether/commands/claude/memory-details.md +77 -0
  49. package/.aether/commands/claude/migrate-state.md +171 -0
  50. package/.aether/commands/claude/oracle.md +642 -0
  51. package/.aether/commands/claude/organize.md +232 -0
  52. package/.aether/commands/claude/patrol.md +620 -0
  53. package/.aether/commands/claude/pause-colony.md +233 -0
  54. package/.aether/commands/claude/phase.md +115 -0
  55. package/.aether/commands/claude/pheromones.md +156 -0
  56. package/.aether/commands/claude/plan.md +693 -0
  57. package/.aether/commands/claude/preferences.md +65 -0
  58. package/.aether/commands/claude/quick.md +100 -0
  59. package/.aether/commands/claude/redirect.md +76 -0
  60. package/.aether/commands/claude/resume-colony.md +197 -0
  61. package/.aether/commands/claude/resume.md +388 -0
  62. package/.aether/commands/claude/run.md +231 -0
  63. package/.aether/commands/claude/seal.md +774 -0
  64. package/.aether/commands/claude/skill-create.md +286 -0
  65. package/.aether/commands/claude/status.md +410 -0
  66. package/.aether/commands/claude/swarm.md +349 -0
  67. package/.aether/commands/claude/tunnels.md +426 -0
  68. package/.aether/commands/claude/update.md +132 -0
  69. package/.aether/commands/claude/verify-castes.md +143 -0
  70. package/.aether/commands/claude/watch.md +239 -0
  71. package/.aether/commands/colonize.yaml +4 -0
  72. package/.aether/commands/council.yaml +205 -0
  73. package/.aether/commands/init.yaml +46 -13
  74. package/.aether/commands/insert-phase.yaml +4 -0
  75. package/.aether/commands/opencode/archaeology.md +331 -0
  76. package/.aether/commands/opencode/build.md +1168 -0
  77. package/.aether/commands/opencode/chaos.md +329 -0
  78. package/.aether/commands/opencode/colonize.md +195 -0
  79. package/.aether/commands/opencode/continue.md +1436 -0
  80. package/.aether/commands/opencode/council.md +437 -0
  81. package/.aether/commands/opencode/data-clean.md +77 -0
  82. package/.aether/commands/opencode/dream.md +260 -0
  83. package/.aether/commands/opencode/entomb.md +377 -0
  84. package/.aether/commands/opencode/export-signals.md +54 -0
  85. package/.aether/commands/opencode/feedback.md +99 -0
  86. package/.aether/commands/opencode/flag.md +149 -0
  87. package/.aether/commands/opencode/flags.md +167 -0
  88. package/.aether/commands/opencode/focus.md +73 -0
  89. package/.aether/commands/opencode/help.md +157 -0
  90. package/.aether/commands/opencode/history.md +136 -0
  91. package/.aether/commands/opencode/import-signals.md +68 -0
  92. package/.aether/commands/opencode/init.md +518 -0
  93. package/.aether/commands/opencode/insert-phase.md +111 -0
  94. package/.aether/commands/opencode/interpret.md +272 -0
  95. package/.aether/commands/opencode/lay-eggs.md +213 -0
  96. package/.aether/commands/opencode/maturity.md +108 -0
  97. package/.aether/commands/opencode/memory-details.md +83 -0
  98. package/.aether/commands/opencode/migrate-state.md +165 -0
  99. package/.aether/commands/opencode/oracle.md +593 -0
  100. package/.aether/commands/opencode/organize.md +226 -0
  101. package/.aether/commands/opencode/patrol.md +626 -0
  102. package/.aether/commands/opencode/pause-colony.md +203 -0
  103. package/.aether/commands/opencode/phase.md +113 -0
  104. package/.aether/commands/opencode/pheromones.md +162 -0
  105. package/.aether/commands/opencode/plan.md +684 -0
  106. package/.aether/commands/opencode/preferences.md +71 -0
  107. package/.aether/commands/opencode/quick.md +91 -0
  108. package/.aether/commands/opencode/redirect.md +84 -0
  109. package/.aether/commands/opencode/resume-colony.md +190 -0
  110. package/.aether/commands/opencode/resume.md +394 -0
  111. package/.aether/commands/opencode/run.md +237 -0
  112. package/.aether/commands/opencode/seal.md +452 -0
  113. package/.aether/commands/opencode/skill-create.md +63 -0
  114. package/.aether/commands/opencode/status.md +307 -0
  115. package/.aether/commands/opencode/swarm.md +15 -0
  116. package/.aether/commands/opencode/tunnels.md +400 -0
  117. package/.aether/commands/opencode/update.md +127 -0
  118. package/.aether/commands/opencode/verify-castes.md +139 -0
  119. package/.aether/commands/opencode/watch.md +227 -0
  120. package/.aether/commands/plan.yaml +53 -2
  121. package/.aether/commands/quick.yaml +104 -0
  122. package/.aether/commands/resume-colony.yaml +6 -4
  123. package/.aether/commands/resume.yaml +9 -0
  124. package/.aether/commands/run.yaml +37 -1
  125. package/.aether/commands/seal.yaml +9 -0
  126. package/.aether/commands/status.yaml +45 -1
  127. package/.aether/docs/command-playbooks/build-full.md +3 -2
  128. package/.aether/docs/command-playbooks/build-prep.md +12 -4
  129. package/.aether/docs/command-playbooks/build-verify.md +51 -0
  130. package/.aether/docs/command-playbooks/continue-advance.md +115 -6
  131. package/.aether/docs/command-playbooks/continue-full.md +1 -0
  132. package/.aether/docs/command-playbooks/continue-verify.md +33 -0
  133. package/.aether/utils/clash-detect.sh +239 -0
  134. package/.aether/utils/council.sh +425 -0
  135. package/.aether/utils/error-handler.sh +3 -3
  136. package/.aether/utils/flag.sh +23 -12
  137. package/.aether/utils/hive.sh +2 -2
  138. package/.aether/utils/hooks/clash-pre-tool-use.js +99 -0
  139. package/.aether/utils/immune.sh +508 -0
  140. package/.aether/utils/learning.sh +2 -2
  141. package/.aether/utils/merge-driver-lockfile.sh +35 -0
  142. package/.aether/utils/midden.sh +712 -0
  143. package/.aether/utils/pheromone.sh +1376 -108
  144. package/.aether/utils/queen.sh +31 -21
  145. package/.aether/utils/session.sh +264 -0
  146. package/.aether/utils/spawn-tree.sh +7 -7
  147. package/.aether/utils/spawn.sh +2 -2
  148. package/.aether/utils/state-api.sh +216 -5
  149. package/.aether/utils/swarm.sh +1 -1
  150. package/.aether/utils/worktree.sh +189 -0
  151. package/.claude/commands/ant/colonize.md +2 -0
  152. package/.claude/commands/ant/council.md +205 -0
  153. package/.claude/commands/ant/init.md +53 -14
  154. package/.claude/commands/ant/insert-phase.md +4 -0
  155. package/.claude/commands/ant/plan.md +27 -1
  156. package/.claude/commands/ant/quick.md +100 -0
  157. package/.claude/commands/ant/resume-colony.md +3 -2
  158. package/.claude/commands/ant/resume.md +9 -0
  159. package/.claude/commands/ant/run.md +37 -1
  160. package/.claude/commands/ant/seal.md +9 -0
  161. package/.claude/commands/ant/status.md +45 -1
  162. package/.opencode/commands/ant/colonize.md +2 -0
  163. package/.opencode/commands/ant/council.md +143 -0
  164. package/.opencode/commands/ant/init.md +53 -13
  165. package/.opencode/commands/ant/insert-phase.md +4 -0
  166. package/.opencode/commands/ant/plan.md +26 -1
  167. package/.opencode/commands/ant/quick.md +91 -0
  168. package/.opencode/commands/ant/resume-colony.md +3 -2
  169. package/.opencode/commands/ant/resume.md +9 -0
  170. package/.opencode/commands/ant/run.md +37 -1
  171. package/.opencode/commands/ant/status.md +2 -0
  172. package/CHANGELOG.md +116 -0
  173. package/README.md +34 -8
  174. package/bin/cli.js +103 -61
  175. package/bin/lib/banner.js +14 -0
  176. package/bin/lib/init.js +8 -7
  177. package/bin/lib/interactive-setup.js +251 -0
  178. package/bin/npx-entry.js +21 -0
  179. package/bin/npx-install.js +9 -167
  180. package/bin/validate-package.sh +23 -0
  181. package/package.json +11 -3
  182. package/.aether/docs/plans/pheromone-display-plan.md +0 -257
  183. package/.aether/schemas/example-prompt-builder.xml +0 -234
  184. package/.aether/scripts/incident-test-add.sh +0 -47
  185. package/.aether/scripts/weekly-audit.sh +0 -79
@@ -144,8 +144,14 @@ If `scan_result` is empty or `jq` fails, set all fields to fallback values (empt
144
144
 
145
145
  Use Read tool to check `.aether/data/COLONY_STATE.json`.
146
146
 
147
- - If file exists AND has a non-null `goal` field: set `reinit_mode = true`, store `existing_goal`
148
- - Otherwise: set `reinit_mode = false`
147
+ - If file exists AND has a non-null `goal` field:
148
+ - Check the `milestone` field. If `milestone == "Crowned Anthill"`:
149
+ - This is a **sealed colony**. Treat as **fresh init**, NOT re-init.
150
+ - Set `reinit_mode = false`
151
+ - Display: `Previous colony was sealed. Starting fresh colony.`
152
+ - The old COLONY_STATE.json will be overwritten in Step 7 (fresh init path).
153
+ - Otherwise (colony exists but is NOT sealed): set `reinit_mode = true`, store `existing_goal`
154
+ - If file does not exist or `goal` is null: set `reinit_mode = false`
149
155
 
150
156
  If re-init mode, read existing charter entries from `.aether/QUEEN.md`:
151
157
  ```bash
@@ -285,14 +291,29 @@ bash .aether/aether-utils.sh charter-write --intent "{approved_intent}" --vision
285
291
 
286
292
  2. Auto-apply approved pheromone suggestions (see pheromone auto-apply below).
287
293
 
288
- 3. Optionally update the goal field in COLONY_STATE.json in-place:
294
+ 3. Update the goal field in COLONY_STATE.json in-place using the state API:
289
295
  ```bash
290
- jq --arg new_goal "{approved_intent}" '.goal = $new_goal' .aether/data/COLONY_STATE.json > .aether/data/COLONY_STATE.json.tmp && mv .aether/data/COLONY_STATE.json.tmp .aether/data/COLONY_STATE.json
296
+ bash .aether/aether-utils.sh state-write "$(jq --arg new_goal "{approved_intent}" '.goal = $new_goal' .aether/data/COLONY_STATE.json)"
291
297
  ```
292
298
 
293
- 4. Run `bash .aether/aether-utils.sh session-init "$(jq -r '.session_id' .aether/data/COLONY_STATE.json)" "{approved_intent}"`
299
+ 4. **Verify the write** read back and confirm goal is set:
300
+ ```bash
301
+ verify_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json)
302
+ if [[ "$verify_goal" == "null" || -z "$verify_goal" ]]; then
303
+ echo "ERROR: Colony state write failed — goal is still null after write. Re-run /ant:init."
304
+ # Attempt recovery: write goal directly
305
+ jq --arg g "{approved_intent}" '.goal = $g' .aether/data/COLONY_STATE.json > .aether/data/COLONY_STATE.json.tmp && mv .aether/data/COLONY_STATE.json.tmp .aether/data/COLONY_STATE.json
306
+ verify_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json)
307
+ if [[ "$verify_goal" == "null" || -z "$verify_goal" ]]; then
308
+ echo "FATAL: Recovery write also failed. Colony state may be corrupted."
309
+ stop
310
+ fi
311
+ fi
312
+ ```
313
+
314
+ 5. Run `bash .aether/aether-utils.sh session-init "$(jq -r '.session_id' .aether/data/COLONY_STATE.json)" "{approved_intent}"`
294
315
 
295
- 5. Skip to Step 8 (display result). Do NOT write COLONY_STATE.json from template, do NOT write constraints.json, do NOT write pheromones.json.
316
+ 6. Skip to Step 8 (display result). Do NOT write COLONY_STATE.json from template, do NOT write constraints.json, do NOT write pheromones.json.
296
317
 
297
318
  **If fresh init:**
298
319
 
@@ -308,12 +329,24 @@ jq --arg new_goal "{approved_intent}" '.goal = $new_goal' .aether/data/COLONY_ST
308
329
  - Remove ALL keys starting with underscore
309
330
  - Write the resulting JSON to `.aether/data/COLONY_STATE.json` using the Write tool
310
331
 
311
- 5. Write constraints.json from template:
332
+ 5. **Verify the write** — read back and confirm COLONY_STATE.json is valid and goal is set:
333
+ ```bash
334
+ verify_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json 2>/dev/null)
335
+ verify_valid=$(jq -e . .aether/data/COLONY_STATE.json >/dev/null 2>&1 && echo "valid" || echo "invalid")
336
+ if [[ "$verify_valid" != "valid" || "$verify_goal" == "null" || -z "$verify_goal" ]]; then
337
+ echo "ERROR: Colony state write verification failed (valid=$verify_valid, goal=$verify_goal)"
338
+ echo "The colony file may be corrupted. Remove .aether/data/COLONY_STATE.json and re-run /ant:init."
339
+ stop
340
+ fi
341
+ echo "Colony state verified: goal=\"$verify_goal\""
342
+ ```
343
+
344
+ 6. Write constraints.json from template:
312
345
  - Resolve template: check `~/.aether/system/templates/constraints.template.json` first, then `.aether/templates/constraints.template.json`
313
346
  - If no template found: output "Template missing: constraints.template.json. Run aether update to fix." and stop
314
347
  - Read template, follow `_instructions`, remove `_` prefixed keys, write to `.aether/data/constraints.json`
315
348
 
316
- 6. Initialize runtime files from templates (non-blocking):
349
+ 7. Initialize runtime files from templates (non-blocking):
317
350
  ```bash
318
351
  for template in pheromones midden learning-observations; do
319
352
  if [[ "$template" == "midden" ]]; then
@@ -336,15 +369,22 @@ for template in pheromones midden learning-observations; do
336
369
  done
337
370
  ```
338
371
 
339
- 7. Run `bash .aether/aether-utils.sh context-update init "{approved_intent}"`
340
- 8. Run `bash .aether/aether-utils.sh validate-state colony`
341
- 9. Register repo (silent on failure):
372
+ 8. Run `bash .aether/aether-utils.sh context-update init "{approved_intent}"`
373
+ 9. Run `bash .aether/aether-utils.sh validate-state colony`
374
+ 10. Register repo (silent on failure):
342
375
  ```bash
343
376
  domain_tags=$(bash .aether/aether-utils.sh domain-detect 2>/dev/null | jq -r '.result.tags // ""' || echo "")
344
377
  bash .aether/aether-utils.sh registry-add "$(pwd)" "$(jq -r '.version // "unknown"' ~/.aether/version.json 2>/dev/null || echo 'unknown')" --goal "{approved_intent}" --active true --tags "$domain_tags" 2>/dev/null || true
345
378
  cp ~/.aether/version.json .aether/version.json 2>/dev/null || true
346
379
  ```
347
- 10. Seed QUEEN.md from hive (non-blocking):
380
+ 11. Install clash detection hook and merge driver (non-blocking):
381
+ ```bash
382
+ # Install PreToolUse hook to detect file conflicts across worktrees
383
+ bash .aether/aether-utils.sh clash-setup --install 2>/dev/null || true
384
+ # Register lockfile merge driver (keeps "ours" on package-lock.json conflicts)
385
+ git config merge.lockfile.driver "bash .aether/utils/merge-driver-lockfile.sh %O %A %B" 2>/dev/null || true
386
+ ```
387
+ 12. Seed QUEEN.md from hive (non-blocking):
348
388
  ```bash
349
389
  domain_tags=$(jq -r --arg repo "$(pwd)" \
350
390
  '[.repos[] | select(.path == $repo) | .domain_tags // []] | .[0] // [] | join(",")' \
@@ -354,7 +394,7 @@ seed_args="queen-seed-from-hive --limit 5"
354
394
  seed_result=$(bash .aether/aether-utils.sh $seed_args 2>/dev/null || echo '{}')
355
395
  seeded_count=$(echo "$seed_result" | jq -r '.result.seeded // 0' 2>/dev/null || echo "0")
356
396
  ```
357
- 11. Run `bash .aether/aether-utils.sh session-init "{session_id}" "{approved_intent}"`
397
+ 13. Run `bash .aether/aether-utils.sh session-init "{session_id}" "{approved_intent}"`
358
398
 
359
399
  **Pheromone auto-apply (referenced by both re-init and fresh init paths above):**
360
400
 
@@ -22,6 +22,10 @@ If `goal` is null:
22
22
  `No colony initialized. Run /ant:init first.`
23
23
  Stop.
24
24
 
25
+ If `milestone` == `"Crowned Anthill"`:
26
+ `This colony has been sealed. Start a new colony with /ant:init "new goal".`
27
+ Stop.
28
+
25
29
  If `plan.phases` is empty:
26
30
  `No project plan. Run /ant:plan first.`
27
31
  Stop.
@@ -30,7 +30,7 @@ If `version` field is missing, "1.0", or "2.0":
30
30
  3. Output: `State auto-upgraded to v3.0`
31
31
  4. Continue with command.
32
32
 
33
- Extract: `goal`, `plan.phases`
33
+ Extract: `goal`, `milestone`, `plan.phases`
34
34
 
35
35
  **Validate:** If `goal: null`:
36
36
  ```
@@ -38,6 +38,12 @@ No colony initialized. Run /ant:init "<goal>" first.
38
38
  ```
39
39
  Stop here.
40
40
 
41
+ If `milestone` == `"Crowned Anthill"`:
42
+ ```
43
+ This colony has been sealed. Start a new colony with /ant:init "new goal".
44
+ ```
45
+ Stop here.
46
+
41
47
  ### Step 1.5: Load State and Show Resumption Context
42
48
 
43
49
  Run using Bash tool: `bash .aether/aether-utils.sh load-state`
@@ -567,6 +573,25 @@ Read current COLONY_STATE.json, then update:
567
573
 
568
574
  Write COLONY_STATE.json.
569
575
 
576
+ **Verify the write** — read back and confirm the plan persisted:
577
+ ```bash
578
+ verify_phases=$(jq '.plan.phases | length' .aether/data/COLONY_STATE.json)
579
+ verify_timestamp=$(jq -r '.plan.generated_at' .aether/data/COLONY_STATE.json)
580
+ verify_state=$(jq -r '.state' .aether/data/COLONY_STATE.json)
581
+ if [[ "$verify_phases" -lt 1 || "$verify_timestamp" == "null" || "$verify_state" != "READY" ]]; then
582
+ echo "ERROR: Plan write verification failed (phases=$verify_phases, generated_at=$verify_timestamp, state=$verify_state)"
583
+ echo "Attempting retry write..."
584
+ bash .aether/aether-utils.sh state-write "$(jq --argjson phases "$(echo '$PLAN_JSON' | jq '.plan.phases')" --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" '.plan.phases = $phases | .plan.generated_at = $ts | .state = "READY"' .aether/data/COLONY_STATE.json)"
585
+ verify_phases=$(jq '.plan.phases | length' .aether/data/COLONY_STATE.json)
586
+ if [[ "$verify_phases" -lt 1 ]]; then
587
+ echo "FATAL: Retry write also failed. Plan was not persisted."
588
+ echo "Re-run /ant:plan to regenerate."
589
+ stop
590
+ fi
591
+ fi
592
+ echo "Plan verified: $verify_phases phases, generated_at=$verify_timestamp, state=$verify_state"
593
+ ```
594
+
570
595
  Log plan completion: `bash .aether/aether-utils.sh activity-log "PLAN_COMPLETE" "queen" "Plan finalized with {confidence}% confidence"`
571
596
 
572
597
  Update watch-status.txt:
@@ -0,0 +1,91 @@
1
+ <!-- Generated from .aether/commands/quick.yaml - DO NOT EDIT DIRECTLY -->
2
+ ---
3
+ name: ant:quick
4
+ description: "🔍🐜⚡🐜🔍 Quick scout query — fast answers without build ceremony"
5
+ ---
6
+
7
+ ### Step -1: Normalize Arguments
8
+
9
+ Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
10
+
11
+ This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
12
+
13
+ You are the **Queen**. Execute `/ant:quick` — a lightweight scout mission.
14
+
15
+ The query is: `$normalized_args`
16
+
17
+ ## Purpose
18
+
19
+ Quick, focused answers to questions about the codebase, patterns, or implementation
20
+ details. No build ceremony, no state changes, no verification waves.
21
+
22
+ ## Instructions
23
+
24
+ ### Step 1: Validate Arguments
25
+
26
+ If `$normalized_args` is empty:
27
+ ```
28
+ Usage: /ant:quick "<question>"
29
+
30
+ Examples:
31
+ /ant:quick "how does the pheromone system work?"
32
+ /ant:quick "find all uses of acquire_lock"
33
+ /ant:quick "what tests cover midden-write?"
34
+ /ant:quick "show me the colony-prime token budget logic"
35
+ ```
36
+ Stop here.
37
+
38
+ ### Step 2: Generate Scout Name
39
+
40
+ Run:
41
+ ```bash
42
+ bash .aether/aether-utils.sh generate-ant-name "scout"
43
+ ```
44
+
45
+ Capture the output as `scout_name`.
46
+
47
+ ### Step 3: Spawn Scout
48
+
49
+ Display:
50
+ ```
51
+ ━━━ Quick Scout ━━━
52
+ Spawning {scout_name} — {query truncated to 50 chars}
53
+ ```
54
+
55
+ Run:
56
+ ```bash
57
+ bash .aether/aether-utils.sh spawn-log "Queen" "scout" "{scout_name}" "Quick query: {query}"
58
+ ```
59
+
60
+
61
+
62
+ Investigate the query directly using available tools (Grep, Glob, Read).
63
+ Search the codebase and provide a clear, focused answer with file paths and line numbers for key findings.
64
+ Keep your answer concise and actionable.
65
+
66
+
67
+ ### Step 4: Display Results
68
+
69
+
70
+
71
+ Display your findings directly to the user.
72
+
73
+
74
+ Run:
75
+ ```bash
76
+ bash .aether/aether-utils.sh spawn-complete "{scout_name}" "completed" "Quick query answered"
77
+ ```
78
+
79
+ ### Step 5: Update Session (lightweight)
80
+
81
+ Run:
82
+ ```bash
83
+ bash .aether/aether-utils.sh session-update "/ant:quick" "" "Quick query: {query truncated to 60 chars}" 2>/dev/null || true
84
+ ```
85
+
86
+ **NOTE:** This command does NOT:
87
+ - Modify COLONY_STATE.json
88
+ - Advance phases
89
+ - Create checkpoints
90
+ - Spawn watchers or chaos ants
91
+ - Run verification
@@ -31,8 +31,9 @@ Run using Bash tool: `bash .aether/aether-utils.sh load-state`
31
31
  If successful:
32
32
  1. Parse state from result
33
33
  2. If goal is null: Show "No colony state found..." message and stop
34
- 3. Check if paused flag is true - if not, note "Colony was not paused, but resuming anyway"
35
- 4. Extract all state fields for display
34
+ 3. If `milestone` == `"Crowned Anthill"`: Show "This colony has been sealed. Start a new colony with `/ant:init \"new goal\"`." and stop
35
+ 4. Check if paused flag is true - if not, note "Colony was not paused, but resuming anyway"
36
+ 5. Extract all state fields for display
36
37
 
37
38
  Keep state loaded (don't unload yet) - we'll need it for the full display.
38
39
 
@@ -68,6 +68,7 @@ Use the Read tool to read `.aether/data/COLONY_STATE.json`.
68
68
 
69
69
  COLONY_STATE.json is the authoritative source for goal and state (session.json may be stale). Extract:
70
70
  - `goal` (use this as authoritative, overriding session.json colony_goal)
71
+ - `milestone` (check for sealed colony)
71
72
  - `state` (READY, PLANNING, EXECUTING, PAUSED)
72
73
  - `current_phase`
73
74
  - `plan.phases` (array with id, name, status for each phase)
@@ -75,6 +76,14 @@ COLONY_STATE.json is the authoritative source for goal and state (session.json m
75
76
  - `memory.decisions` (flat list — do NOT distinguish user vs Claude origin)
76
77
  - `events` (last 5 for recent activity context)
77
78
 
79
+ **If `milestone` == `"Crowned Anthill"`:** This colony has been sealed. Display:
80
+ ```
81
+ This colony has been sealed (Crowned Anthill).
82
+
83
+ Start a new colony with /ant:init "new goal"
84
+ ```
85
+ Stop here — do NOT display stale phase data from the sealed colony.
86
+
78
87
  If the file is missing or the JSON cannot be parsed, **stop immediately** and display:
79
88
 
80
89
  ```
@@ -36,6 +36,7 @@ Parse `$normalized_args` for:
36
36
  - `--replan-interval N` — Pause for replan suggestion every N phases (default: 2)
37
37
  - `--continue` — Resume after a replan pause without replanning
38
38
  - `--dry-run` — Preview plan without executing
39
+ - `--headless` — Run without interactive prompts; queue decisions for later review
39
40
  - `--verbose` / `-v`, `--no-visual`, `--no-suggest` — Pass through to playbooks
40
41
 
41
42
  ```
@@ -44,6 +45,7 @@ Parse `$normalized_args` for:
44
45
  /ant:run --replan-interval 3 Suggest replan every 3 phases instead of 2
45
46
  /ant:run --continue Resume after replan pause without replanning
46
47
  /ant:run --dry-run Preview the autopilot plan
48
+ /ant:run --headless Run all phases without interactive prompts
47
49
  /ant:run --max-phases 3 -v Run 3 phases with verbose output
48
50
  ```
49
51
 
@@ -69,10 +71,14 @@ replan suggestion (every {replan_interval} phases)
69
71
  ### Step 0: Initialize
70
72
 
71
73
  1. Read `.aether/data/COLONY_STATE.json`; validate goal + plan.phases exist
74
+ - If `milestone` == `"Crowned Anthill"`: output "This colony has been sealed. Start a new colony with `/ant:init \"new goal\"`." and stop
72
75
  2. Determine remaining incomplete phases; apply `--max-phases` cap
73
76
  3. Set `phases_completed = 0`, `autopilot_start = $(date +%s)`
74
77
  4. Record pre-build blocker count: `bash .aether/aether-utils.sh flag-check-blockers {phase}`
75
- 5. Display: `AUTOPILOT ENGAGED | Goal: {goal} | Phase {N} | Max: {max or "all"}`
78
+ 5. If `--headless` flag is present:
79
+ - Run: `bash .aether/aether-utils.sh autopilot-set-headless true`
80
+ - Display: `Headless mode: ON — interactive prompts will be queued as pending decisions`
81
+ 6. Display: `AUTOPILOT ENGAGED | Goal: {goal} | Phase {N} | Max: {max or "all"}`
76
82
 
77
83
  ### Step 1: Build Phase
78
84
 
@@ -103,6 +109,19 @@ On pause, display the AUTOPILOT PAUSED banner with reason, affected phase,
103
109
  specific issues, and instruction: "Fix issues, then run /ant:run to resume."
104
110
  Log: `"<timestamp>|autopilot_paused|run|Paused at Phase {id}: {reason}"`
105
111
 
112
+ **Headless override for visual checkpoints:** If headless mode is active and a
113
+ visual checkpoint prompt would normally be shown to the user, instead queue it as
114
+ a pending decision:
115
+ ```bash
116
+ bash .aether/aether-utils.sh pending-decision-add \
117
+ --title "Visual checkpoint: Phase {id}" \
118
+ --type "checkpoint" \
119
+ --description "{checkpoint_description}" \
120
+ --phase "{id}" \
121
+ --source "build-pause-check"
122
+ ```
123
+ Then continue without pausing.
124
+
106
125
  **If no pause:** proceed to Step 3.
107
126
 
108
127
  ### Step 3: Continue (Verify + Advance)
@@ -120,6 +139,18 @@ Execute continue playbooks in order, carrying cross-stage state
120
139
  Skip the AskUserQuestion prompt. Instead, auto-PAUSE with reason
121
140
  "Runtime verification required" so the user can test manually before resuming.
122
141
 
142
+ **Headless override for runtime verification:** If headless mode is active and
143
+ runtime verification would normally pause, queue as a pending decision instead:
144
+ ```bash
145
+ bash .aether/aether-utils.sh pending-decision-add \
146
+ --title "Runtime verification needed: Phase {id}" \
147
+ --type "runtime-verification" \
148
+ --description "Manual testing required before advancing past Phase {id}" \
149
+ --phase "{id}" \
150
+ --source "continue-gates"
151
+ ```
152
+ Then continue without pausing.
153
+
123
154
  ### Step 4: Continue Pause Check
124
155
 
125
156
  **PAUSE if ANY of these are true:**
@@ -189,6 +220,11 @@ Phases completed: {N} | Elapsed: {Xm Ys} | Now at: Phase {current}
189
220
  {paused} -> Fix {reason}, then /ant:run to resume
190
221
  ```
191
222
 
223
+ If headless mode was active and pending decisions were queued, display:
224
+ ```
225
+ Pending decisions: {N} — run `pending-decision-list` to review
226
+ ```
227
+
192
228
  Update session:
193
229
  `bash .aether/aether-utils.sh session-update "/ant:run" "/ant:run" "Autopilot: {N} phases, now Phase {current}"`
194
230
 
@@ -286,6 +286,8 @@ Use the `phase_bar` and `task_bar` values computed in Step 2.7 for the actual ba
286
286
 
287
287
 
288
288
 
289
+
290
+
289
291
  **Edge cases:**
290
292
  - No phases yet: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 phases`
291
293
  - No tasks in phase: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 tasks in Phase 0`
package/CHANGELOG.md CHANGED
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [5.3.0] - 2026-03-31
11
+
12
+ Aether v2.7 — PR Workflow + Stability. Six phases (39-44) adding multi-branch safety, clash detection, and release hardening.
13
+
14
+ ### Added
15
+ - **Pheromone propagation** — Signals flow across git branches via `pheromone-snapshot-inject` and `pheromone-merge-back`; worktree creation auto-copies active pheromones
16
+ - **Midden collection** — Failure records from merged branches collected into main via `midden-collect` with idempotent dedup; cross-PR pattern detection via `midden-cross-pr-analysis`; revert-aware tagging via `midden-handle-revert`
17
+ - **Clash detection** — PreToolUse hook (`clash-pre-tool-use.js`) blocks edits to files modified in other active worktrees; `.aether/data/` files allowlisted (branch-local state)
18
+ - **Worktree utilities** — `_worktree_create` auto-copies colony context (COLONY_STATE.json, pheromones.json) and runs pheromone-snapshot-inject
19
+ - **Merge driver** — `.gitattributes` merge driver resolves package-lock.json conflicts by keeping "ours" via `merge-driver-lockfile.sh`
20
+ - **Midden wiring** — `midden-collect` and `midden-cross-pr-analysis` wired into `/ant:continue` playbooks (non-blocking, follows pheromone merge-back pattern)
21
+ - **Interactive installer** — `npx aether-colony` now shows a 3-option menu (Full setup / Global only / Repo only) with environment detection and context-sensitive defaults; supports `--global`, `--repo`, `--yes` flags for scripting
22
+ - **`aether setup` command** — CLI equivalent of `/ant:lay-eggs` for setting up Aether in a repo without Claude Code open
23
+
24
+ ### Changed
25
+ - **Package validation** — `validate-package.sh` expanded from 15 to 38+ required file entries (100% coverage of packaged utils)
26
+ - **NPX installer** — Replaced `npx-install.js` with interactive `npx-entry.js`; old installer kept as deprecation redirect
27
+ - **Package cleanliness** — 8 dev-only files excluded from npm tarball (scripts/, design docs, example schemas)
28
+ - **CLAUDE.md** — Full accuracy audit: version bumped to v2.7.0, all counts verified (5,500 lines, 35 utils, 45 commands, 509 tests)
29
+ - **README.md** — Architecture counts updated (35 utils, 45 commands, ~5,500 lines)
30
+ - **YAML commands** — 6 stale command files regenerated from YAML sources (init, plan, seal for Claude and OpenCode)
31
+
32
+ ### Fixed
33
+ - **Clash detection dispatcher** — `clash-detect.sh` and `worktree.sh` wired into `aether-utils.sh` dispatcher (source lines, dispatch cases, help JSON)
34
+ - **Init command** — Clash detection hook verification and read-only worktree list integrated into `/ant:init` Step 7.6
35
+
10
36
  ## [2.1.0] - 2026-03-24
11
37
 
12
38
  Six phases of production hardening (Phases 9-14) targeting reliability, maintainability, and developer experience.
@@ -574,3 +600,93 @@ The following entries are automatically generated by the colony during work phas
574
600
 
575
601
  - **Files:** `.aether/data/AUDIT-REPORT.md`
576
602
  - **Decisions:** audit-report-corrected
603
+
604
+ ### Phase 0 — Plan 00
605
+
606
+ - **Files:** `COLONY_STATE.json`, `QUEEN.md`, `learning.sh`
607
+ - **Decisions:** Colony sealed at Crowned Anthill; Comprehensive audit colony
608
+ - **What Worked:** 6 phases completed; Colony wisdom promoted to QUEEN.md
609
+
610
+ ## 2026-03-30
611
+
612
+ ### Phase 0 — Plan 00
613
+
614
+ - **Files:** `aether-utils.sh`, `utils/immune.sh`, `utils/council.sh`, `utils/midden.sh`, `utils/session.sh`, `utils/state-api.sh`
615
+ - **Decisions:** Colony sealed at Crowned Anthill; Implement next-gen Aether features: immune response, headless autopilot, vital signs, quick scout, council expansion, midden library
616
+ - **What Worked:** 6 phases completed; Colony wisdom promoted to QUEEN.md
617
+
618
+ ### Phase 1 — Plan 01
619
+
620
+ - **Files:** `.aether/utils/spawn-tree.sh`, `tests/unit/spawn-tree.test.js`
621
+ - **Decisions:** gsub order is load-bearing for JSON escaping
622
+ - **What Worked:** awk gsub escaping with correct order; TDD with 4 new tests
623
+ - **Requirements:** spawn-tree.sh, spawn-tree.test.js addressed
624
+
625
+ ### Phase 2 — Plan 01
626
+
627
+ - **Files:** `.aether/utils/queen.sh`, `tests/bash/test-queen-module.sh`
628
+ - **Decisions:** use ENVIRON[] not awk -v for user content
629
+ - **What Worked:** ENVIRON-based awk approach; head/tail for multi-line replacement; orphan cleanup
630
+ - **Requirements:** .aether/utils/queen.sh addressed
631
+
632
+ ### Phase 3 — Plan 01
633
+
634
+ - **Files:** `.aether/utils/error-handler.sh`, `.aether/utils/spawn.sh`, `.aether/aether-utils.sh`
635
+ - **Decisions:** guard central subcommand plus individual sites
636
+ - **What Worked:** AETHER_TESTING env guard
637
+ - **Requirements:** error-handler.sh, spawn.sh, aether-utils.sh addressed
638
+
639
+ ### Phase 4 — Plan 01
640
+
641
+ - **Files:** `package.json`, `package-lock.json`
642
+ - **Decisions:** npm overrides for transitive deps
643
+ - **What Worked:** minimatch; path-to-regexp; picomatch; tar; brace-expansion; diff
644
+ - **Requirements:** package.json addressed
645
+
646
+ ### Phase 5 — Plan 01
647
+
648
+ - **Decisions:** final verification sweep confirms all fixes
649
+ - **What Worked:** midden acknowledgment; full test suite verification
650
+
651
+ ### Phase 0 — Plan 00
652
+
653
+ - **Files:** `.aether/utils/spawn-tree.sh`, `.aether/utils/queen.sh`, `.aether/utils/error-handler.sh`, `.aether/utils/spawn.sh`, `.aether/aether-utils.sh`, `package.json`
654
+ - **Decisions:** Colony sealed at Crowned Anthill; Fix critical midden entries and harden infrastructure
655
+ - **What Worked:** 5 phases completed; Colony wisdom promoted to QUEEN.md
656
+
657
+ ### Phase 1 — Plan 01
658
+
659
+ - **Files:** `.aether/aether-utils.sh`
660
+ - **Decisions:** context-update now fully jq-safe
661
+ - **What Worked:** 1 remaining raw json_ok fixed
662
+ - **Requirements:** .aether/aether-utils.sh addressed
663
+
664
+ ### Phase 03 — Plan 01
665
+
666
+ - **Files:** `.aether/aether-utils.sh`
667
+ - **Decisions:** Use jq -nc --arg for all json_ok calls; parallel builder verification catches fabricated completions
668
+
669
+ ### Phase 2 — Plan 01
670
+
671
+ - **Files:** `aether-utils.sh`, `package.json`
672
+ - **Decisions:** Use jq --arg for all json_ok sites with user strings
673
+ - **What Worked:** jq --arg escaping; empty-file guard in validate-state
674
+ - **Requirements:** json_ok safe escaping addressed
675
+
676
+ ### Phase 3 — Plan 01
677
+
678
+ - **Files:** `.aether/aether-utils.sh`, `.aether/utils/flag.sh`, `tests/bash/test-flag-module.sh`, `tests/bash/test-state-checkpoint.sh`
679
+ - **Decisions:** Fixed view-state jq filter injection; Fixed fallback json_err escaping; Converted 14+ json_ok sites to jq --arg
680
+ - **What Worked:** All 509 tests pass; Auditor score 73/100; No critical security issues
681
+
682
+ ### Phase 05 — Plan 01
683
+
684
+ - **Files:** `.aether/utils/hive.sh`, `tests/bash/test-hive-read.sh`, `tests/bash/test-learning-recovery.sh`
685
+ - **Decisions:** Compose null fallback with tonumber to preserve prior type coercion fix
686
+ - **What Worked:** Archaeology pre-build scan prevented regression; Stale grep targets identified by root cause analysis
687
+
688
+ ### Phase 0 — Plan 00
689
+
690
+ - **Files:** `aether-utils.sh`, `utils/hive.sh`, `utils/learning.sh`, `tests/`
691
+ - **Decisions:** Colony sealed at Crowned Anthill; hardened ~40 json_ok sites + checkpointing + hive null safety
692
+ - **What Worked:** 5 phases completed; 9 instincts created; 4 hive-eligible
package/README.md CHANGED
@@ -8,14 +8,17 @@
8
8
  [![npm downloads](https://img.shields.io/npm/dw/aether-colony.svg?style=flat-square)](https://www.npmjs.com/package/aether-colony)
9
9
  [![License: MIT](https://img.shields.io/github/license/calcosmic/Aether.svg?style=flat-square)](LICENSE)
10
10
  [![GitHub stars](https://img.shields.io/github/stars/calcosmic/Aether.svg?style=flat-square)](https://github.com/calcosmic/Aether/stargazers)
11
+ [![Sponsor](https://img.shields.io/badge/Sponsor-GitHub-%23ea4aaa.svg?style=flat-square&logo=github)](https://github.com/sponsors/calcosmic)
11
12
 
12
13
  Spawn a colony of 24 AI specialists that self-organize around your goal using pheromone signals.
13
14
  1,000+ weekly installs.
14
15
 
16
+ *Artificial Ecology For Thought and Emergent Reasoning*
17
+
15
18
  *The whole is greater than the sum of its ants.*
16
19
 
17
20
  ```bash
18
- npm install -g aether-colony
21
+ npx aether-colony
19
22
  ```
20
23
 
21
24
  </div>
@@ -69,7 +72,10 @@ The colony **remembers**. Wisdom, learnings, and instincts persist across sessio
69
72
  ## 🚀 Quick Start
70
73
 
71
74
  ```bash
72
- # Install globally
75
+ # Interactive setup (recommended)
76
+ npx aether-colony
77
+
78
+ # Or install globally
73
79
  npm install -g aether-colony
74
80
 
75
81
  # In your project repo:
@@ -85,7 +91,7 @@ That's it. Five commands from zero to shipped.
85
91
  ## ✨ Key Features
86
92
 
87
93
  - 🐜 **24 Specialized Agents** — Real subagents spawned via Task tool, from builders to archaeologists
88
- - ⚡ **44 Slash Commands** — Full lifecycle management across Claude Code and OpenCode
94
+ - ⚡ **45 Slash Commands** — Full lifecycle management across Claude Code and OpenCode
89
95
  - 🎯 **Pheromone System** — Guide the colony with FOCUS, REDIRECT, FEEDBACK signals
90
96
  - 🧠 **Colony Memory** — Learnings persist across sessions via QUEEN.md wisdom
91
97
  - 🌐 **Hive Brain** — Cross-colony wisdom sharing with domain-scoped retrieval
@@ -209,10 +215,10 @@ That's it. Five commands from zero to shipped.
209
215
 
210
216
  ```
211
217
  .aether/ # 🐜 Colony files (repo-local)
212
- ├── aether-utils.sh # ⚡ Dispatcher (~5,200 lines, ~150 subcommands)
213
- ├── utils/ # 🔧 ~29 modular scripts
218
+ ├── aether-utils.sh # ⚡ Dispatcher (~5,500 lines, ~130+ subcommands)
219
+ ├── utils/ # 🔧 35 modular scripts
214
220
  ├── skills/ # 📚 28 skills (10 colony + 18 domain)
215
- ├── commands/ # 📖 44 YAML command sources
221
+ ├── commands/ # 📖 45 YAML command sources
216
222
  ├── exchange/ # 📤 XML exchange modules
217
223
  ├── docs/ # 📝 Documentation
218
224
  ├── templates/ # 📋 12 templates
@@ -226,8 +232,28 @@ That's it. Five commands from zero to shipped.
226
232
 
227
233
  ## 🔌 Works With
228
234
 
229
- - **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** — 44 slash commands + 24 agent definitions
230
- - **[OpenCode](https://github.com/opencode-ai/opencode)** — 44 slash commands + agent definitions
235
+ - **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** — 45 slash commands + 24 agent definitions
236
+ - **[OpenCode](https://github.com/opencode-ai/opencode)** — 45 slash commands + agent definitions
237
+
238
+ ## ❤️ Support Aether
239
+
240
+ If Aether has been useful to you, here's how you can keep the colony alive:
241
+
242
+ **[Sponsor on GitHub](https://github.com/sponsors/calcosmic)** (preferred)
243
+
244
+ <details>
245
+ <summary>💡 Crypto — no middlemen, no fees</summary>
246
+
247
+ | Network | Address |
248
+ |---------|---------|
249
+ | **ETH** (MetaMask) | `0xE7F8C9BE190c207D49DF01b82747cf7B6Bd1c809` |
250
+ | **SOL** (Phantom) | `6DVTdoZvvi9siUpgmRJZxk5Kqho8TZiN2ZzyVUVC9gX8` |
251
+
252
+ </details>
253
+
254
+ [PayPal](https://www.paypal.com/ncp/payment/RENG7ZMW5F59L) · [Buy Me a Coffee](https://buymeacoffee.com/music5y)
255
+
256
+ *Your support funds servers, new features, docs, and keeps Aether free & open source (MIT).*
231
257
 
232
258
  ## 📄 License
233
259