aether-colony 3.1.17 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/{runtime → .aether}/CONTEXT.md +1 -1
  2. package/{runtime → .aether}/aether-utils.sh +1772 -98
  3. package/.aether/docs/QUEEN-SYSTEM.md +211 -0
  4. package/.aether/docs/QUEEN.md +84 -0
  5. package/.aether/docs/README.md +68 -0
  6. package/.aether/docs/caste-system.md +48 -0
  7. package/{runtime → .aether/docs/disciplines}/DISCIPLINES.md +8 -8
  8. package/.aether/docs/error-codes.md +268 -0
  9. package/{runtime → .aether}/docs/known-issues.md +42 -26
  10. package/.aether/docs/queen-commands.md +97 -0
  11. package/.aether/exchange/colony-registry.xml +11 -0
  12. package/{runtime → .aether}/exchange/pheromone-xml.sh +2 -1
  13. package/.aether/exchange/pheromones.xml +87 -0
  14. package/.aether/exchange/queen-wisdom.xml +14 -0
  15. package/{runtime → .aether}/exchange/registry-xml.sh +7 -3
  16. package/{runtime → .aether}/exchange/wisdom-xml.sh +11 -4
  17. package/.aether/rules/aether-colony.md +134 -0
  18. package/.aether/schemas/example-prompt-builder.xml +234 -0
  19. package/.aether/templates/colony-state-reset.jq.template +22 -0
  20. package/.aether/templates/colony-state.template.json +35 -0
  21. package/.aether/templates/constraints.template.json +9 -0
  22. package/.aether/templates/crowned-anthill.template.md +36 -0
  23. package/.aether/templates/handoff-build-error.template.md +30 -0
  24. package/.aether/templates/handoff-build-success.template.md +39 -0
  25. package/.aether/templates/handoff.template.md +40 -0
  26. package/{runtime → .aether}/utils/atomic-write.sh +5 -5
  27. package/{runtime → .aether}/utils/chamber-compare.sh +23 -10
  28. package/{runtime → .aether}/utils/chamber-utils.sh +32 -20
  29. package/{runtime → .aether}/utils/error-handler.sh +13 -1
  30. package/{runtime → .aether}/utils/file-lock.sh +49 -13
  31. package/.aether/utils/semantic-cli.sh +413 -0
  32. package/{runtime → .aether}/utils/xml-compose.sh +7 -1
  33. package/.aether/utils/xml-convert.sh +273 -0
  34. package/.aether/utils/xml-query.sh +201 -0
  35. package/.aether/utils/xml-utils.sh +110 -0
  36. package/{runtime → .aether}/workers.md +14 -17
  37. package/.claude/agents/ant/aether-ambassador.md +264 -0
  38. package/.claude/agents/ant/aether-archaeologist.md +322 -0
  39. package/.claude/agents/ant/aether-auditor.md +266 -0
  40. package/.claude/agents/ant/aether-builder.md +187 -0
  41. package/.claude/agents/ant/aether-chaos.md +268 -0
  42. package/.claude/agents/ant/aether-chronicler.md +304 -0
  43. package/.claude/agents/ant/aether-gatekeeper.md +325 -0
  44. package/.claude/agents/ant/aether-includer.md +373 -0
  45. package/.claude/agents/ant/aether-keeper.md +271 -0
  46. package/.claude/agents/ant/aether-measurer.md +317 -0
  47. package/.claude/agents/ant/aether-probe.md +210 -0
  48. package/.claude/agents/ant/aether-queen.md +325 -0
  49. package/.claude/agents/ant/aether-route-setter.md +173 -0
  50. package/.claude/agents/ant/aether-sage.md +353 -0
  51. package/.claude/agents/ant/aether-scout.md +142 -0
  52. package/.claude/agents/ant/aether-surveyor-disciplines.md +416 -0
  53. package/.claude/agents/ant/aether-surveyor-nest.md +354 -0
  54. package/.claude/agents/ant/aether-surveyor-pathogens.md +288 -0
  55. package/.claude/agents/ant/aether-surveyor-provisions.md +359 -0
  56. package/.claude/agents/ant/aether-tracker.md +265 -0
  57. package/.claude/agents/ant/aether-watcher.md +244 -0
  58. package/.claude/agents/ant/aether-weaver.md +247 -0
  59. package/.claude/commands/ant/archaeology.md +16 -7
  60. package/.claude/commands/ant/build.md +415 -284
  61. package/.claude/commands/ant/chaos.md +19 -10
  62. package/.claude/commands/ant/colonize.md +58 -24
  63. package/.claude/commands/ant/continue.md +155 -145
  64. package/.claude/commands/ant/council.md +15 -5
  65. package/.claude/commands/ant/dream.md +16 -7
  66. package/.claude/commands/ant/entomb.md +274 -157
  67. package/.claude/commands/ant/feedback.md +33 -29
  68. package/.claude/commands/ant/flag.md +18 -10
  69. package/.claude/commands/ant/flags.md +14 -6
  70. package/.claude/commands/ant/focus.md +29 -21
  71. package/.claude/commands/ant/help.md +11 -1
  72. package/.claude/commands/ant/history.md +10 -0
  73. package/.claude/commands/ant/init.md +91 -65
  74. package/.claude/commands/ant/interpret.md +15 -4
  75. package/.claude/commands/ant/lay-eggs.md +55 -7
  76. package/.claude/commands/ant/maturity.md +11 -1
  77. package/.claude/commands/ant/migrate-state.md +14 -2
  78. package/.claude/commands/ant/oracle.md +23 -15
  79. package/.claude/commands/ant/organize.md +29 -20
  80. package/.claude/commands/ant/pause-colony.md +17 -7
  81. package/.claude/commands/ant/phase.md +17 -8
  82. package/.claude/commands/ant/plan.md +20 -9
  83. package/.claude/commands/ant/redirect.md +29 -32
  84. package/.claude/commands/ant/resume-colony.md +19 -9
  85. package/.claude/commands/ant/resume.md +272 -96
  86. package/.claude/commands/ant/seal.md +201 -191
  87. package/.claude/commands/ant/status.md +71 -32
  88. package/.claude/commands/ant/swarm.md +26 -44
  89. package/.claude/commands/ant/tunnels.md +279 -105
  90. package/.claude/commands/ant/update.md +81 -20
  91. package/.claude/commands/ant/verify-castes.md +14 -4
  92. package/.claude/commands/ant/watch.md +13 -12
  93. package/.opencode/agents/aether-ambassador.md +63 -20
  94. package/.opencode/agents/aether-archaeologist.md +29 -12
  95. package/.opencode/agents/aether-auditor.md +51 -18
  96. package/.opencode/agents/aether-builder.md +69 -19
  97. package/.opencode/agents/aether-chaos.md +29 -12
  98. package/.opencode/agents/aether-chronicler.md +60 -18
  99. package/.opencode/agents/aether-gatekeeper.md +27 -18
  100. package/.opencode/agents/aether-includer.md +27 -18
  101. package/.opencode/agents/aether-keeper.md +89 -18
  102. package/.opencode/agents/aether-measurer.md +27 -18
  103. package/.opencode/agents/aether-probe.md +60 -18
  104. package/.opencode/agents/aether-queen.md +172 -24
  105. package/.opencode/agents/aether-route-setter.md +57 -12
  106. package/.opencode/agents/aether-sage.md +26 -18
  107. package/.opencode/agents/aether-scout.md +27 -19
  108. package/.opencode/agents/aether-surveyor-disciplines.md +53 -1
  109. package/.opencode/agents/aether-surveyor-nest.md +53 -1
  110. package/.opencode/agents/aether-surveyor-pathogens.md +51 -1
  111. package/.opencode/agents/aether-surveyor-provisions.md +53 -1
  112. package/.opencode/agents/aether-tracker.md +64 -18
  113. package/.opencode/agents/aether-watcher.md +66 -19
  114. package/.opencode/agents/aether-weaver.md +61 -18
  115. package/.opencode/commands/ant/build.md +406 -192
  116. package/.opencode/commands/ant/continue.md +66 -76
  117. package/.opencode/commands/ant/entomb.md +106 -45
  118. package/.opencode/commands/ant/init.md +46 -48
  119. package/.opencode/commands/ant/organize.md +5 -5
  120. package/.opencode/commands/ant/resume.md +334 -0
  121. package/.opencode/commands/ant/seal.md +33 -24
  122. package/.opencode/commands/ant/status.md +11 -0
  123. package/.opencode/commands/ant/tunnels.md +149 -0
  124. package/.opencode/commands/ant/update.md +59 -16
  125. package/CHANGELOG.md +79 -0
  126. package/README.md +135 -353
  127. package/bin/cli.js +243 -122
  128. package/bin/generate-commands.sh +2 -2
  129. package/bin/lib/init.js +13 -3
  130. package/bin/lib/update-transaction.js +119 -117
  131. package/bin/sync-to-runtime.sh +5 -137
  132. package/bin/validate-package.sh +84 -0
  133. package/package.json +9 -6
  134. package/.opencode/agents/aether-architect.md +0 -66
  135. package/.opencode/agents/aether-guardian.md +0 -107
  136. package/.opencode/agents/workers.md +0 -1034
  137. package/runtime/QUEEN_ANT_ARCHITECTURE.md +0 -402
  138. package/runtime/data/signatures.json +0 -41
  139. package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +0 -1343
  140. package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +0 -2642
  141. package/runtime/docs/PHEROMONE-INJECTION.md +0 -240
  142. package/runtime/docs/PHEROMONE-INTEGRATION.md +0 -192
  143. package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +0 -426
  144. package/runtime/docs/README.md +0 -94
  145. package/runtime/docs/VISUAL-OUTPUT-SPEC.md +0 -219
  146. package/runtime/docs/biological-reference.md +0 -272
  147. package/runtime/docs/codebase-review.md +0 -399
  148. package/runtime/docs/command-sync.md +0 -164
  149. package/runtime/docs/constraints.md +0 -116
  150. package/runtime/docs/implementation-learnings.md +0 -89
  151. package/runtime/docs/namespace.md +0 -148
  152. package/runtime/docs/pathogen-schema-example.json +0 -36
  153. package/runtime/docs/pathogen-schema.md +0 -111
  154. package/runtime/docs/planning-discipline.md +0 -159
  155. package/runtime/docs/progressive-disclosure.md +0 -184
  156. package/runtime/lib/queen-utils.sh +0 -729
  157. package/runtime/planning.md +0 -159
  158. package/runtime/recover.sh +0 -136
  159. package/runtime/utils/xml-utils.sh +0 -2196
  160. package/runtime/workers-new-castes.md +0 -516
  161. /package/{runtime → .aether/docs/disciplines}/coding-standards.md +0 -0
  162. /package/{runtime → .aether/docs/disciplines}/debugging.md +0 -0
  163. /package/{runtime → .aether/docs/disciplines}/learning.md +0 -0
  164. /package/{runtime → .aether/docs/disciplines}/tdd.md +0 -0
  165. /package/{runtime → .aether/docs/disciplines}/verification-loop.md +0 -0
  166. /package/{runtime → .aether/docs/disciplines}/verification.md +0 -0
  167. /package/{runtime → .aether}/docs/pheromones.md +0 -0
  168. /package/{runtime → .aether}/model-profiles.yaml +0 -0
  169. /package/{runtime → .aether}/schemas/aether-types.xsd +0 -0
  170. /package/{runtime → .aether}/schemas/colony-registry.xsd +0 -0
  171. /package/{runtime → .aether}/schemas/pheromone.xsd +0 -0
  172. /package/{runtime → .aether}/schemas/prompt.xsd +0 -0
  173. /package/{runtime → .aether}/schemas/queen-wisdom.xsd +0 -0
  174. /package/{runtime → .aether}/schemas/worker-priming.xsd +0 -0
  175. /package/{runtime → .aether}/templates/QUEEN.md.template +0 -0
  176. /package/{runtime → .aether}/utils/colorize-log.sh +0 -0
  177. /package/{runtime → .aether}/utils/queen-to-md.xsl +0 -0
  178. /package/{runtime → .aether}/utils/spawn-tree.sh +0 -0
  179. /package/{runtime → .aether}/utils/spawn-with-model.sh +0 -0
  180. /package/{runtime → .aether}/utils/state-loader.sh +0 -0
  181. /package/{runtime → .aether}/utils/swarm-display.sh +0 -0
  182. /package/{runtime → .aether}/utils/watch-spawn-tree.sh +0 -0
  183. /package/{runtime → .aether}/utils/xml-core.sh +0 -0
@@ -1,39 +1,35 @@
1
1
  ---
2
2
  name: ant:feedback
3
- description: "💬🐜🧠🐜💬 Emit FEEDBACK signal to provide guidance to colony"
3
+ description: "Emit FEEDBACK signal to provide guidance to colony"
4
4
  ---
5
5
 
6
- You are the **Queen**. Emit a FEEDBACK signal.
6
+ You are the **Queen**. Emit a FEEDBACK pheromone signal.
7
7
 
8
8
  ## Instructions
9
9
 
10
10
  The feedback message is: `$ARGUMENTS`
11
11
 
12
12
  ### Step 1: Validate
13
+
13
14
  If `$ARGUMENTS` empty -> show usage: `/ant:feedback <message>`, stop.
14
15
  If content > 500 chars -> "Signal content too long (max 500 chars)", stop.
15
16
 
16
- ### Step 2: Read + Update State
17
+ Parse optional flags from `$ARGUMENTS`:
18
+ - `--ttl <value>`: signal lifetime (e.g., `2h`, `1d`, `7d`). Default: `phase_end`.
19
+ - Strip flags from content before using it as the feedback message.
20
+
21
+ ### Step 2: Write Signal and Create Instinct
22
+
17
23
  Read `.aether/data/COLONY_STATE.json`.
18
24
  If `goal: null` -> "No colony initialized.", stop.
19
25
 
20
- Generate ISO-8601 timestamp.
21
-
22
- **Add signal:**
23
- Append to `signals` array:
24
- ```json
25
- {
26
- "id": "feedback_<timestamp_ms>",
27
- "type": "FEEDBACK",
28
- "content": "<feedback message>",
29
- "priority": "low",
30
- "created_at": "<ISO-8601>",
31
- "expires_at": "phase_end"
32
- }
26
+ Run using the Bash tool with description "Recording colony feedback...":
27
+ ```bash
28
+ bash .aether/aether-utils.sh pheromone-write FEEDBACK "<content>" --strength 0.7 --reason "User feedback guidance" --ttl <ttl>
33
29
  ```
34
30
 
35
31
  **Create instinct from feedback:**
36
- User feedback is high-value learning. Append to `memory.instincts`:
32
+ User feedback is high-value learning. Generate ISO-8601 timestamp and append to `memory.instincts` in COLONY_STATE.json:
37
33
  ```json
38
34
  {
39
35
  "id": "instinct_<timestamp>",
@@ -52,23 +48,31 @@ User feedback is high-value learning. Append to `memory.instincts`:
52
48
 
53
49
  Write COLONY_STATE.json.
54
50
 
55
- ### Step 3: Confirm
56
-
57
- Output header:
51
+ ### Step 3: Get Active Counts
58
52
 
53
+ Run using the Bash tool with description "Counting active signals...":
54
+ ```bash
55
+ bash .aether/aether-utils.sh pheromone-count
59
56
  ```
60
- 💬🐜🧠🐜💬 ═══════════════════════════════════════════════════
61
- F E E D B A C K S I G N A L
62
- ═══════════════════════════════════════════════════ 💬🐜🧠🐜💬
63
- ```
64
57
 
65
- Then output:
58
+ ### Step 4: Confirm
59
+
60
+ Output (4 lines, no banners):
66
61
  ```
67
- 💬 FEEDBACK signal emitted
62
+ FEEDBACK signal emitted
63
+ Note: "<content truncated to 60 chars>"
64
+ Strength: 0.7 | Expires: <phase end or ttl value>
65
+ Active signals: <focus_count> FOCUS, <redirect_count> REDIRECT, <feedback_count> FEEDBACK
68
66
 
69
- "{content preview}"
67
+ Instinct created: [0.7] <domain>: <action summary>
68
+ ```
70
69
 
71
- 🧠 Instinct created: [0.7] <domain>: <action summary>
70
+ ### Step 5: Next Up
72
71
 
73
- 🐜 The colony will remember this guidance.
72
+ Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
73
+ ```bash
74
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
75
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
76
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
77
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
74
78
  ```
@@ -48,7 +48,7 @@ Stop here.
48
48
 
49
49
  ### Step 3: Create Flag
50
50
 
51
- Run:
51
+ Run using the Bash tool with description "Raising colony flag...":
52
52
  ```bash
53
53
  bash .aether/aether-utils.sh flag-add "{type}" "{title}" "{description}" "manual" {phase_or_null}
54
54
  ```
@@ -61,23 +61,23 @@ Output header based on flag type:
61
61
 
62
62
  **For blocker:**
63
63
  ```
64
- 🚩🐜📋🐜🚩 ═══════════════════════════════════════════════════
65
- B L O C K E R F L A G C R E A T E D
66
- ═══════════════════════════════════════════════════ 🚩🐜📋🐜🚩
64
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
65
+ 🚩🐜📋🐜🚩 B L O C K E R F L A G C R E A T E D
66
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
67
67
  ```
68
68
 
69
69
  **For issue:**
70
70
  ```
71
- 🚩🐜📋🐜🚩 ═══════════════════════════════════════════════════
72
- I S S U E F L A G C R E A T E D
73
- ═══════════════════════════════════════════════════ 🚩🐜📋🐜🚩
71
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
72
+ 🚩🐜📋🐜🚩 I S S U E F L A G C R E A T E D
73
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
74
74
  ```
75
75
 
76
76
  **For note:**
77
77
  ```
78
- 🚩🐜📋🐜🚩 ═══════════════════════════════════════════════════
79
- N O T E F L A G C R E A T E D
80
- ═══════════════════════════════════════════════════ 🚩🐜📋🐜🚩
78
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
79
+ 🚩🐜📋🐜🚩 N O T E F L A G C R E A T E D
80
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
81
81
  ```
82
82
 
83
83
  Then output based on flag type:
@@ -119,6 +119,14 @@ Then output based on flag type:
119
119
  Use /ant:flags to view all flags.
120
120
  ```
121
121
 
122
+ Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
123
+ ```bash
124
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
125
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
126
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
127
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
128
+ ```
129
+
122
130
  ---
123
131
 
124
132
  ## Flag Lifecycle
@@ -27,7 +27,7 @@ Examples:
27
27
 
28
28
  ### Step 2: Handle Resolution/Acknowledgment
29
29
 
30
- If `--resolve` was provided:
30
+ If `--resolve` was provided, run using the Bash tool with description "Resolving colony flag...":
31
31
  ```bash
32
32
  bash .aether/aether-utils.sh flag-resolve "{flag_id}" "{resolution_message}"
33
33
  ```
@@ -39,7 +39,7 @@ Output:
39
39
  ```
40
40
  Stop here.
41
41
 
42
- If `--ack` was provided:
42
+ If `--ack` was provided, run using the Bash tool with description "Acknowledging colony flag...":
43
43
  ```bash
44
44
  bash .aether/aether-utils.sh flag-acknowledge "{flag_id}"
45
45
  ```
@@ -53,7 +53,7 @@ Stop here.
53
53
 
54
54
  ### Step 3: List Flags
55
55
 
56
- Run:
56
+ Run using the Bash tool with description "Loading colony flags...":
57
57
  ```bash
58
58
  bash .aether/aether-utils.sh flag-list {options}
59
59
  ```
@@ -65,9 +65,9 @@ Parse result for flags array.
65
65
  Output header:
66
66
 
67
67
  ```
68
- 📋🐜🚩🐜📋 ═══════════════════════════════════════════════════
69
- P R O J E C T F L A G S
70
- ═══════════════════════════════════════════════════ 📋🐜🚩🐜📋
68
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
69
+ 📋🐜🚩🐜📋 P R O J E C T F L A G S
70
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
71
71
  ```
72
72
 
73
73
  If no flags:
@@ -127,6 +127,14 @@ Commands:
127
127
  /ant:flag "description" Create new flag
128
128
  ```
129
129
 
130
+ Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
131
+ ```bash
132
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
133
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
134
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
135
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
136
+ ```
137
+
130
138
  ---
131
139
 
132
140
  ## Quick Actions
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: ant:focus
3
- description: "🔦🐜🔍🐜🔦 Emit FOCUS signal to guide colony attention"
3
+ description: "Emit FOCUS signal to guide colony attention"
4
4
  ---
5
5
 
6
- You are the **Queen**. Add a FOCUS constraint.
6
+ You are the **Queen**. Emit a FOCUS pheromone signal.
7
7
 
8
8
  ## Instructions
9
9
 
@@ -14,37 +14,45 @@ The focus area is: `$ARGUMENTS`
14
14
  If `$ARGUMENTS` empty -> show usage: `/ant:focus <area>`, stop.
15
15
  If content > 500 chars -> "Focus content too long (max 500 chars)", stop.
16
16
 
17
- ### Step 2: Read + Update Constraints
17
+ Parse optional flags from `$ARGUMENTS`:
18
+ - `--ttl <value>`: signal lifetime (e.g., `2h`, `1d`, `7d`). Default: `phase_end`.
19
+ - Strip flags from content before using it as the focus area.
20
+
21
+ ### Step 2: Write Signal
18
22
 
19
23
  Read `.aether/data/COLONY_STATE.json`.
20
24
  If `goal: null` -> "No colony initialized.", stop.
21
25
 
22
- Read `.aether/data/constraints.json`. If file doesn't exist, create it with:
23
- ```json
24
- {"version": "1.0", "focus": [], "constraints": []}
26
+ Run using the Bash tool with description "Setting colony focus...":
27
+ ```bash
28
+ bash .aether/aether-utils.sh pheromone-write FOCUS "<content>" --strength 0.8 --reason "User directed colony attention" --ttl <ttl>
25
29
  ```
26
30
 
27
- Append the focus area to the `focus` array.
28
-
29
- If `focus` array exceeds 5 entries, remove the oldest entries to keep only 5.
31
+ Parse the returned JSON for the signal ID.
30
32
 
31
- Write constraints.json.
33
+ ### Step 3: Get Active Counts
32
34
 
33
- ### Step 3: Confirm
35
+ Run using the Bash tool with description "Counting active signals...":
36
+ ```bash
37
+ bash .aether/aether-utils.sh pheromone-count
38
+ ```
34
39
 
35
- Output header:
40
+ ### Step 4: Confirm
36
41
 
42
+ Output (3-4 lines, no banners):
37
43
  ```
38
- 🔦🐜🔍🐜🔦 ═══════════════════════════════════════════════════
39
- F O C U S S I G N A L
40
- ═══════════════════════════════════════════════════ 🔦🐜🔍🐜🔦
41
- ```
42
-
43
- Then output:
44
+ FOCUS signal emitted
45
+ Area: "<content truncated to 60 chars>"
46
+ Strength: 0.8 | Expires: <phase end or ttl value>
47
+ Active signals: <focus_count> FOCUS, <redirect_count> REDIRECT, <feedback_count> FEEDBACK
44
48
  ```
45
- 🎯 FOCUS signal emitted
46
49
 
47
- "{content preview}"
50
+ ### Step 5: Next Up
48
51
 
49
- 🐜 Colony attention directed.
52
+ Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
53
+ ```bash
54
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
55
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
56
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
57
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
50
58
  ```
@@ -11,7 +11,7 @@ Output the following:
11
11
 
12
12
  ```
13
13
  👑 AETHER QUEEN ANT COLONY
14
- ══════════════════════════════════════════
14
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
15
15
 
16
16
  A multi-agent system built on ant colony intelligence.
17
17
  Workers self-organize via pheromone signals. You guide with intention.
@@ -110,3 +110,13 @@ HOW IT WORKS
110
110
  spawn-tree.txt Worker spawn hierarchy
111
111
  constraints.json Focus/redirect pheromone data
112
112
  ```
113
+
114
+ ### Next Up
115
+
116
+ Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
117
+ ```bash
118
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
119
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
120
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
121
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
122
+ ```
@@ -125,3 +125,13 @@ Show total event count at the end:
125
125
  ```
126
126
  Total events recorded: <count>
127
127
  ```
128
+
129
+ ### Step 8: Next Up
130
+
131
+ Generate the state-based Next Up block using the Bash tool with description "Generating Next Up suggestions...":
132
+ ```bash
133
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
134
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
135
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
136
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
137
+ ```
@@ -13,6 +13,37 @@ Parse `$ARGUMENTS`:
13
13
  - If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
14
14
  - Otherwise: set `visual_mode = true`
15
15
 
16
+ <failure_modes>
17
+ ### Colony State Overwrite
18
+ If COLONY_STATE.json already exists with an active colony:
19
+ - STOP before overwriting
20
+ - Warn: "Active colony detected with goal: [goal]. Overwriting will lose this data."
21
+ - Options: (1) Archive first with /ant:seal, (2) Continue and overwrite, (3) Cancel
22
+
23
+ ### Write Failure Mid-Init
24
+ If writing COLONY_STATE.json fails partway:
25
+ - Remove the incomplete file (partial state is worse than no state)
26
+ - Report the error
27
+ - Recovery: user can run /ant:init again safely
28
+ </failure_modes>
29
+
30
+ <success_criteria>
31
+ Command is complete when:
32
+ - COLONY_STATE.json exists and is valid JSON
33
+ - Colony goal, milestone, and timestamp are set
34
+ - Session file is written
35
+ - User sees confirmation of colony creation
36
+ </success_criteria>
37
+
38
+ <read_only>
39
+ Do not touch during init:
40
+ - .aether/dreams/ (user notes)
41
+ - .aether/chambers/ (archived colonies)
42
+ - .env* files
43
+ - .claude/settings.json
44
+ - .github/workflows/
45
+ </read_only>
46
+
16
47
  ### Step 0: Initialize Visual Mode (if enabled)
17
48
 
18
49
  If `visual_mode` is true:
@@ -20,14 +51,13 @@ If `visual_mode` is true:
20
51
  # Generate session ID
21
52
  init_id="init-$(date +%s)"
22
53
 
23
- # Initialize swarm display
24
- bash .aether/aether-utils.sh swarm-display-init "$init_id"
25
- bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Colony initialization" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 0
54
+ # Initialize swarm display (consolidated)
55
+ bash .aether/aether-utils.sh swarm-display-init "$init_id" && bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Colony initialization" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 0
26
56
  ```
27
57
 
28
58
  ### Step 0.5: Version Check (Non-blocking)
29
59
 
30
- Run using the Bash tool: `bash .aether/aether-utils.sh version-check 2>/dev/null || true`
60
+ Run using the Bash tool with description "Checking colony version...": `bash .aether/aether-utils.sh version-check-cached 2>/dev/null || true`
31
61
 
32
62
  If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
33
63
 
@@ -58,18 +88,29 @@ Check if `.aether/aether-utils.sh` exists using the Read tool.
58
88
  **If the file already exists** — skip this step entirely. System files are present.
59
89
 
60
90
  **If the file does NOT exist:**
61
- - Check if `~/.aether/system/` exists (expand `~` to the user's home directory)
91
+ - Check if `~/.aether/system/aether-utils.sh` exists (expand `~` to the user's home directory)
62
92
  - **If the hub exists:** Run using the Bash tool:
93
+ ```bash
94
+ mkdir -p .aether/docs .aether/utils .aether/templates .aether/schemas .aether/exchange .claude/rules && \
95
+ cp -f ~/.aether/system/aether-utils.sh .aether/ && \
96
+ cp -f ~/.aether/system/workers.md .aether/ 2>/dev/null || true && \
97
+ cp -f ~/.aether/system/CONTEXT.md .aether/ 2>/dev/null || true && \
98
+ cp -f ~/.aether/system/model-profiles.yaml .aether/ 2>/dev/null || true && \
99
+ cp -Rf ~/.aether/system/docs/* .aether/docs/ 2>/dev/null || true && \
100
+ cp -Rf ~/.aether/system/utils/* .aether/utils/ 2>/dev/null || true && \
101
+ cp -Rf ~/.aether/system/templates/* .aether/templates/ 2>/dev/null || true && \
102
+ cp -Rf ~/.aether/system/schemas/* .aether/schemas/ 2>/dev/null || true && \
103
+ cp -Rf ~/.aether/system/exchange/* .aether/exchange/ 2>/dev/null || true && \
104
+ cp -Rf ~/.aether/system/rules/* .claude/rules/ 2>/dev/null || true && \
105
+ chmod +x .aether/aether-utils.sh
63
106
  ```
64
- bash ~/.aether/system/aether-utils.sh bootstrap-system
65
- ```
66
- This copies system files from the global hub into `.aether/`. Display:
107
+ This copies system files from the global hub into `.aether/` and rules into `.claude/rules/`. Display:
67
108
  ```
68
109
  Bootstrapped system files from global hub.
69
110
  ```
70
111
  - **If the hub does NOT exist:** Output:
71
112
  ```
72
- No Aether system files found locally or in ~/.aether/.
113
+ No Aether system files found locally or in ~/.aether/system/.
73
114
  Run `aether install` or `npx aether-colony install` to set up the global hub first.
74
115
  ```
75
116
  Stop here. Do not proceed.
@@ -111,7 +152,6 @@ If the `goal` field is not null:
111
152
  Colony already initialized with goal: "{existing_goal}"
112
153
 
113
154
  State freshness: {freshness_status}
114
- Session: {session_id}
115
155
  Initialized: {initialized_at}
116
156
 
117
157
  To reinitialize with a new goal, the current state will be reset.
@@ -149,9 +189,23 @@ If no instincts meet the threshold, display:
149
189
 
150
190
  Generate a session ID in the format `session_{unix_timestamp}_{random}` and an ISO-8601 UTC timestamp.
151
191
 
152
- Use the Write tool to write `.aether/data/COLONY_STATE.json` with the v3.0 structure.
192
+ Resolve the colony-state template path:
193
+ Check `~/.aether/system/templates/colony-state.template.json` first,
194
+ then `.aether/templates/colony-state.template.json`.
195
+
196
+ If no template found: output "Template missing: colony-state.template.json. Run aether update to fix." and stop.
153
197
 
154
- **If Step 2.6 found instincts to inherit**, convert each into the instinct format and seed the `memory.instincts` array. Each inherited instinct should have:
198
+ Read the template file. Follow its `_instructions` field.
199
+ Replace all `__PLACEHOLDER__` values:
200
+ - `__GOAL__` → the user's goal from $ARGUMENTS
201
+ - `__SESSION_ID__` → the generated session ID (format: `session_{unix_timestamp}_{random}`)
202
+ - `__ISO8601_TIMESTAMP__` → the current ISO-8601 UTC timestamp (used in both `initialized_at` and the events entry)
203
+ - `__PHASE_LEARNINGS__` → JSON array from Step 2.6, or `[]` if none
204
+ - `__INSTINCTS__` → JSON array from Step 2.6, or `[]` if none
205
+
206
+ IMPORTANT: `__PHASE_LEARNINGS__` and `__INSTINCTS__` must be JSON array values (e.g., `[]` not `"[]"`).
207
+
208
+ **If Step 2.6 found instincts to inherit**, convert each into the instinct format for the `__INSTINCTS__` array. Each inherited instinct should have:
155
209
  - `id`: `instinct_inherited_{index}`
156
210
  - `trigger`: inferred from the instinct description
157
211
  - `action`: the instinct description
@@ -164,56 +218,29 @@ Use the Write tool to write `.aether/data/COLONY_STATE.json` with the v3.0 struc
164
218
  - `applications`: 0
165
219
  - `successes`: 0
166
220
 
167
- **If Step 2.6 found validated learnings**, seed `memory.phase_learnings` with each as:
221
+ **If Step 2.6 found validated learnings**, seed the `__PHASE_LEARNINGS__` array with each as:
168
222
  - `phase`: `"inherited"`
169
223
  - `learning`: the learning text
170
224
  - `status`: `"validated"`
171
225
  - `source`: `"inherited:completion-report"`
172
226
 
173
- **If Step 2.6 was skipped or found nothing**, use empty arrays as before.
174
-
175
- ```json
176
- {
177
- "version": "3.0",
178
- "goal": "<the user's goal>",
179
- "state": "READY",
180
- "current_phase": 0,
181
- "session_id": "<generated session_id>",
182
- "initialized_at": "<ISO-8601 timestamp>",
183
- "build_started_at": null,
184
- "plan": {
185
- "generated_at": null,
186
- "confidence": null,
187
- "phases": []
188
- },
189
- "memory": {
190
- "phase_learnings": "<inherited learnings or []>",
191
- "decisions": [],
192
- "instincts": "<inherited instincts or []>"
193
- },
194
- "errors": {
195
- "records": [],
196
- "flagged_patterns": []
197
- },
198
- "signals": [],
199
- "graveyards": [],
200
- "events": [
201
- "<ISO-8601 timestamp>|colony_initialized|init|Colony initialized with goal: <the user's goal>"
202
- ]
203
- }
204
- ```
227
+ **If Step 2.6 was skipped or found nothing**, use empty arrays `[]` for both `__PHASE_LEARNINGS__` and `__INSTINCTS__`.
228
+
229
+ Remove ALL keys starting with underscore (`_template`, `_version`, `_instructions`, `_comment_*`).
230
+ Write the resulting JSON to `.aether/data/COLONY_STATE.json` using the Write tool.
205
231
 
206
232
  ### Step 4: Initialize Constraints
207
233
 
208
- Write `.aether/data/constraints.json`:
234
+ Resolve the constraints template path:
235
+ Check `~/.aether/system/templates/constraints.template.json` first,
236
+ then `.aether/templates/constraints.template.json`.
209
237
 
210
- ```json
211
- {
212
- "version": "1.0",
213
- "focus": [],
214
- "constraints": []
215
- }
216
- ```
238
+ If no template found: output "Template missing: constraints.template.json. Run aether update to fix." and stop.
239
+
240
+ Read the template file. Follow its `_instructions` field.
241
+ No placeholder substitution needed — the data keys are written as-is.
242
+ Remove ALL keys starting with underscore (`_template`, `_version`, `_instructions`, `_comment_*`).
243
+ Write the resulting JSON to `.aether/data/constraints.json` using the Write tool.
217
244
 
218
245
  ### Step 5: Initialize Context Document
219
246
 
@@ -260,18 +287,17 @@ If either command fails, proceed silently. These are optional bookkeeping.
260
287
 
261
288
  ### Step 7: Display Result
262
289
 
263
- **If visual_mode is true, render final swarm display:**
290
+ **If visual_mode is true, render final swarm display (consolidated):**
264
291
  ```bash
265
- bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony initialized" "Colony" '{"read":5,"grep":2,"edit":3,"bash":2}' 100 "fungus_garden" 100
266
- bash .aether/aether-utils.sh swarm-display-inline "$init_id"
292
+ bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony initialized" "Colony" '{"read":5,"grep":2,"edit":3,"bash":2}' 100 "fungus_garden" 100 && bash .aether/aether-utils.sh swarm-display-text "$init_id"
267
293
  ```
268
294
 
269
295
  Output this header:
270
296
 
271
297
  ```
272
- 🌱🐜🆕🐜🌱 ═══════════════════════════════════════════════════
298
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
273
299
  A E T H E R C O L O N Y
274
- ═══════════════════════════════════════════════════ 🌱🐜🆕🐜🌱
300
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
275
301
  ```
276
302
 
277
303
  Then output the result:
@@ -282,7 +308,6 @@ Then output the result:
282
308
  "{goal}"
283
309
 
284
310
  🏠 Colony Status: READY
285
- 📋 Session: <session_id>
286
311
 
287
312
  {If instincts or learnings were inherited from Step 2.6:}
288
313
  🧠 Inherited from prior colony:
@@ -295,15 +320,16 @@ Then output the result:
295
320
  during planning and execution.
296
321
  {End if}
297
322
 
298
- 🐜 The colony awaits your command:
299
-
300
- /ant:plan 📋 Generate project plan
301
- /ant:colonize 🗺️ Analyze existing codebase first
302
- /ant:watch 👁️ Set up live visibility
303
-
304
323
  💾 State persisted — safe to /clear, then run /ant:plan
305
324
 
306
325
  📋 Context document created at `.aether/CONTEXT.md` — read this if session resets
326
+
327
+ ──────────────────────────────────────────────────
328
+ 🐜 Next Up
329
+ ──────────────────────────────────────────────────
330
+ /ant:plan 📋 Create execution plan
331
+ /ant:status 📊 Check colony state
332
+ /ant:focus 🎯 Set initial focus
307
333
  ```
308
334
 
309
335
  ### Step 8: Initialize Session
@@ -53,9 +53,9 @@ Also read in parallel:
53
53
  ### Step 2: Display Header
54
54
 
55
55
  ```
56
- 🔍🐜💭🐜🔍 ═══════════════════════════════════════════════
56
+ 🔍🐜💭🐜🔍 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
57
57
  D R E A M I N T E R P R E T E R
58
- ═══════════════════════════════════════════════ 🔍🐜💭🐜🔍
58
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔍🐜💭🐜🔍
59
59
 
60
60
  📓 Reviewing: {dream_filename}
61
61
  {N} dreams | {concerns} concerns | {pheromones} suggested pheromones
@@ -147,9 +147,9 @@ Verdict emoji mapping:
147
147
  After all dreams are interpreted, display:
148
148
 
149
149
  ```
150
- 🔍🐜💭🐜🔍 ═══════════════════════════════════════════════
150
+ 🔍🐜💭🐜🔍 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
151
151
  I N T E R P R E T A T I O N C O M P L E T E
152
- ═══════════════════════════════════════════════ 🔍🐜💭🐜🔍
152
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔍🐜💭🐜🔍
153
153
 
154
154
  📊 Results:
155
155
  {confirmed_count} confirmed | {partial_count} partially confirmed | {unconfirmed_count} unconfirmed | {refuted_count} refuted
@@ -218,6 +218,7 @@ Wait for user response.
218
218
 
219
219
  ### Step 7: Log Activity
220
220
 
221
+ Run using the Bash tool with description "Logging interpretation activity...":
221
222
  ```bash
222
223
  bash .aether/aether-utils.sh activity-log "INTERPRET" "Interpreter" "Dream review: {dream_file}, {confirmed} confirmed, {partial} partial, {unconfirmed} unconfirmed, {refuted} refuted, {actions_taken} actions taken"
223
224
  ```
@@ -243,6 +244,16 @@ bash .aether/aether-utils.sh activity-log "INTERPRET" "Interpreter" "Dream revie
243
244
  /ant:build 🔨 Start building
244
245
  ```
245
246
 
247
+ ### Step 9: Next Up
248
+
249
+ Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
250
+ ```bash
251
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
252
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
253
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
254
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
255
+ ```
256
+
246
257
  ## Investigation Guidelines
247
258
 
248
259
  When investigating dreams, remember: