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
@@ -0,0 +1,507 @@
1
+ <!-- Generated from .aether/commands/council.yaml - DO NOT EDIT DIRECTLY -->
2
+ ---
3
+ name: ant:council
4
+ description: "📜🐜🏛️🐜📜 Convene council for intent clarification via multi-choice questions"
5
+ ---
6
+
7
+ You are the **Queen Ant Colony**. Convene the council to clarify user intent and inject guidance as pheromones.
8
+
9
+ ## Instructions
10
+
11
+ Parse `$ARGUMENTS`:
12
+ - If starts with `--deliberate`: set `deliberate_mode = true`, extract proposal text after `--deliberate`
13
+ - If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
14
+ - Otherwise: set `visual_mode = true`
15
+
16
+ **If `deliberate_mode` is true:** Skip to [Deliberation Mode](#deliberation-mode) and stop after it.
17
+
18
+ ---
19
+
20
+ ## Deliberation Mode
21
+
22
+ When `--deliberate "<proposal>"` is passed, run a structured Advocate/Challenger/Sage deliberation.
23
+
24
+ ### Step D1: Check Budget
25
+
26
+ Run using the Bash tool with description "Checking deliberation budget...":
27
+ ```bash
28
+ bash .aether/aether-utils.sh council-budget-check
29
+ ```
30
+
31
+ Parse result. If `allowed` is `false`:
32
+ ```
33
+ 📜🐜🏛️🐜📜 COUNCIL — BUDGET EXHAUSTED
34
+
35
+ Spawn budget is fully allocated. Complete or close existing deliberations before starting new ones.
36
+ Run /ant:council to review existing deliberations.
37
+ ```
38
+ Stop here.
39
+
40
+ ### Step D2: Open Deliberation
41
+
42
+ Run using the Bash tool with description "Opening deliberation...":
43
+ ```bash
44
+ bash .aether/aether-utils.sh council-deliberate --proposal "<proposal>"
45
+ ```
46
+
47
+ Capture `deliberation_id` from `result.id`.
48
+
49
+ Display:
50
+ ```
51
+ 📜🐜🏛️🐜📜 COUNCIL DELIBERATION OPENED
52
+
53
+ Proposal: "<proposal>"
54
+ ID: {deliberation_id}
55
+ Budget: {budget} spawns available
56
+
57
+ Convening Advocate, Challenger, and Sage...
58
+ ```
59
+
60
+ ### Step D3: Spawn Advocate Scout
61
+
62
+ Spawn an Advocate scout to argue **in favor** of the proposal.
63
+
64
+
65
+ Use the Task tool to spawn a scout with the following system prompt:
66
+ ```
67
+ You are the Advocate on the Ant Colony council.
68
+ Your role is to argue STRONGLY IN FAVOR of the proposal.
69
+ Present the strongest possible case for why this proposal should be adopted.
70
+ Be specific. Focus on concrete benefits and outcomes.
71
+ Keep your argument under 200 words.
72
+ Reply with ONLY your argument text — no preamble or meta-commentary.
73
+ ```
74
+
75
+ And user message:
76
+ ```
77
+ Proposal: "<proposal>"
78
+
79
+ Present your strongest argument in favor of this proposal.
80
+ ```
81
+
82
+ Capture the advocate's argument as `advocate_argument`.
83
+
84
+
85
+ Record the argument:
86
+ ```bash
87
+ bash .aether/aether-utils.sh council-advocate \
88
+ --deliberation-id "<deliberation_id>" \
89
+ --argument "<advocate_argument>"
90
+ ```
91
+
92
+ Display:
93
+ ```
94
+ ⚖️ ADVOCATE:
95
+ {advocate_argument}
96
+ ```
97
+
98
+ ### Step D4: Spawn Challenger Scout
99
+
100
+ Spawn a Challenger scout to argue **against** the proposal.
101
+
102
+
103
+ Use the Task tool to spawn a scout with the following system prompt:
104
+ ```
105
+ You are the Challenger on the Ant Colony council.
106
+ Your role is to argue STRONGLY AGAINST the proposal.
107
+ Present the strongest possible case for why this proposal should be rejected or deferred.
108
+ Be specific. Focus on concrete risks, costs, and downsides.
109
+ Keep your argument under 200 words.
110
+ Reply with ONLY your argument text — no preamble or meta-commentary.
111
+ ```
112
+
113
+ And user message:
114
+ ```
115
+ Proposal: "<proposal>"
116
+
117
+ Present your strongest argument against this proposal.
118
+ ```
119
+
120
+ Capture the challenger's argument as `challenger_argument`.
121
+
122
+
123
+ Record the argument:
124
+ ```bash
125
+ bash .aether/aether-utils.sh council-challenger \
126
+ --deliberation-id "<deliberation_id>" \
127
+ --argument "<challenger_argument>"
128
+ ```
129
+
130
+ Display:
131
+ ```
132
+ ⚔️ CHALLENGER:
133
+ {challenger_argument}
134
+ ```
135
+
136
+ ### Step D5: Spawn Sage Scout
137
+
138
+ Spawn a Sage scout to synthesize both positions and provide a recommendation.
139
+
140
+
141
+ Use the Task tool to spawn a scout with the following system prompt:
142
+ ```
143
+ You are the Sage on the Ant Colony council.
144
+ You have heard both the Advocate and Challenger arguments.
145
+ Your role is to synthesize both positions into balanced wisdom and provide a clear recommendation.
146
+ Your recommendation must be one of: adopt, reject, defer, or adopt-with-conditions.
147
+ Keep your synthesis under 150 words.
148
+ Reply with JSON only:
149
+ {"synthesis": "<your balanced synthesis>", "recommendation": "adopt|reject|defer|adopt-with-conditions"}
150
+ ```
151
+
152
+ And user message:
153
+ ```
154
+ Proposal: "<proposal>"
155
+
156
+ Advocate argued: "<advocate_argument>"
157
+
158
+ Challenger argued: "<challenger_argument>"
159
+
160
+ Synthesize both positions and provide your recommendation.
161
+ ```
162
+
163
+ Parse the JSON response. Capture `synthesis` and `recommendation`.
164
+
165
+
166
+ Record the sage synthesis:
167
+ ```bash
168
+ bash .aether/aether-utils.sh council-sage \
169
+ --deliberation-id "<deliberation_id>" \
170
+ --synthesis "<synthesis>" \
171
+ --recommendation "<recommendation>"
172
+ ```
173
+
174
+ ### Step D6: Display Result
175
+
176
+ ```
177
+ 📜🐜🏛️🐜📜 COUNCIL DELIBERATION COMPLETE
178
+
179
+ Proposal: "<proposal>"
180
+
181
+ ⚖️ Advocate:
182
+ {advocate_argument}
183
+
184
+ ⚔️ Challenger:
185
+ {challenger_argument}
186
+
187
+ 🧙 Sage Synthesis:
188
+ {synthesis}
189
+
190
+ Recommendation: {recommendation}
191
+ ```
192
+
193
+ If recommendation is `adopt` or `adopt-with-conditions`:
194
+ ```
195
+ ✅ Council recommends proceeding.
196
+ Run /ant:focus "<proposal summary>" to inject guidance for the colony.
197
+ ```
198
+
199
+ If recommendation is `reject`:
200
+ ```
201
+ ❌ Council recommends against this proposal.
202
+ Run /ant:redirect "<proposal summary>" if you want to make this a hard constraint.
203
+ ```
204
+
205
+ If recommendation is `defer`:
206
+ ```
207
+ ⏸️ Council recommends deferring this decision.
208
+ Return when more context is available.
209
+ ```
210
+
211
+ ---
212
+
213
+
214
+
215
+ ### Step 0: Initialize Visual Mode (if enabled)
216
+
217
+ If `visual_mode` is true, run using the Bash tool with description "Initializing council display...":
218
+
219
+ ### Step 1: Read Current State
220
+
221
+ Read `.aether/data/COLONY_STATE.json`.
222
+
223
+ If file doesn't exist or `goal` is null:
224
+ ```
225
+ 📜🐜🏛️🐜📜 COUNCIL
226
+
227
+ No colony initialized. Run /ant:init first.
228
+ ```
229
+ Stop here.
230
+
231
+ If `milestone` == `"Crowned Anthill"`:
232
+ ```
233
+ This colony has been sealed. Start a new colony with /ant:init "new goal".
234
+ ```
235
+ Stop here.
236
+
237
+ Capture the current state for context:
238
+ - `prior_state` = state field value (READY, EXECUTING, PLANNING, etc.)
239
+ - `current_phase` = current_phase field value
240
+ - `goal` = goal field value
241
+
242
+ ### Step 2: Display Council Header
243
+
244
+
245
+ ```
246
+ 📜🐜🏛️🐜📜 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
247
+ A N T C O U N C I L
248
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📜🐜🏛️🐜📜
249
+
250
+
251
+
252
+ 👑 Queen convenes the council for guidance
253
+
254
+ Colony Goal: "{goal}"
255
+ Current State: {prior_state}
256
+ Phase: {current_phase}
257
+ ```
258
+
259
+ If `prior_state` is `EXECUTING`:
260
+ ```
261
+ ⚡ Note: Build in progress. New guidance will apply to future work.
262
+ Current workers continue with existing constraints.
263
+ ```
264
+
265
+ ### Step 3: Present Category Menu
266
+
267
+ Use the **AskUserQuestion** tool to ask:
268
+
269
+ ```
270
+ question: "What would you like to clarify with the council?"
271
+ header: "Topic"
272
+ options:
273
+ - label: "Project Direction"
274
+ description: "Clarify project type, architecture, or tech stack choices"
275
+ - label: "Quality Priorities"
276
+ description: "Define tradeoffs: speed vs robustness vs simplicity"
277
+ - label: "Constraints & Boundaries"
278
+ description: "Set rules about what to avoid or require"
279
+ - label: "Custom Topic"
280
+ description: "Describe something specific you want to discuss"
281
+ multiSelect: false
282
+ ```
283
+
284
+ Wait for user response.
285
+
286
+ ### Step 4: Drill Down Based on Selection
287
+
288
+ Based on the user's selection, ask follow-up questions:
289
+
290
+ **If "Project Direction":**
291
+ ```
292
+ question: "What aspect of project direction needs clarification?"
293
+ header: "Direction"
294
+ options:
295
+ - label: "Architecture Pattern"
296
+ description: "Monolith vs microservices, MVC vs functional, etc."
297
+ - label: "Tech Stack"
298
+ description: "Framework, database, or library choices"
299
+ - label: "Code Style"
300
+ description: "Naming conventions, file organization, patterns"
301
+ - label: "Testing Approach"
302
+ description: "TDD, integration-first, coverage requirements"
303
+ multiSelect: true
304
+ ```
305
+
306
+ **If "Quality Priorities":**
307
+ ```
308
+ question: "What's most important for this project?"
309
+ header: "Priority"
310
+ options:
311
+ - label: "Speed of Development"
312
+ description: "Get it working fast, iterate later"
313
+ - label: "Robustness"
314
+ description: "Handle edge cases, thorough error handling"
315
+ - label: "Simplicity"
316
+ description: "Minimal code, easy to understand and maintain"
317
+ - label: "Performance"
318
+ description: "Optimize for speed and efficiency"
319
+ multiSelect: true
320
+ ```
321
+
322
+ **If "Constraints & Boundaries":**
323
+ ```
324
+ question: "What constraints should the colony follow?"
325
+ header: "Constraints"
326
+ options:
327
+ - label: "Security Requirements"
328
+ description: "Auth patterns, data handling, secrets management"
329
+ - label: "Compatibility"
330
+ description: "Browser support, Node version, API compatibility"
331
+ - label: "Dependencies"
332
+ description: "Prefer/avoid certain libraries or frameworks"
333
+ - label: "Patterns to Avoid"
334
+ description: "Anti-patterns, deprecated approaches"
335
+ multiSelect: true
336
+ ```
337
+
338
+ **If "Custom Topic":**
339
+ ```
340
+ question: "Describe what you want to clarify:"
341
+ header: "Custom"
342
+ options:
343
+ - label: "Type your topic below"
344
+ description: "Use the 'Other' option to enter your specific topic"
345
+ multiSelect: false
346
+ ```
347
+
348
+ Wait for user response. Based on answers, ask 1-2 more specific follow-up questions to get actionable guidance.
349
+
350
+ ### Step 5: Translate Answers to Pheromones
351
+
352
+ Based on all gathered answers, determine which pheromones to inject:
353
+
354
+ **FOCUS signals** (areas to emphasize):
355
+ - Architecture choices → FOCUS on that pattern
356
+ - Quality priorities → FOCUS on that approach
357
+ - Specific requirements → FOCUS on those areas
358
+
359
+ **REDIRECT signals** (patterns to avoid):
360
+ - Patterns to avoid → REDIRECT away
361
+ - Incompatible approaches → REDIRECT away
362
+ - Security concerns → REDIRECT away from risky patterns
363
+
364
+ **FEEDBACK signals** (guidance to remember):
365
+ - Style preferences → FEEDBACK as instinct
366
+ - General guidance → FEEDBACK for colony memory
367
+
368
+ ### Step 6: Inject Pheromones
369
+
370
+ Read `.aether/data/constraints.json`. Create if doesn't exist:
371
+ ```json
372
+ {"version": "1.0", "focus": [], "constraints": []}
373
+ ```
374
+
375
+ **For each FOCUS area identified:**
376
+ - Check for duplicates (case-insensitive match in existing focus array)
377
+ - If not duplicate, append to `focus` array
378
+ - Keep max 5 entries (remove oldest if exceeded)
379
+
380
+ **For each REDIRECT pattern identified:**
381
+ - Generate ID: `c_<unix_timestamp_ms>`
382
+ - Append to `constraints` array:
383
+ ```json
384
+ {
385
+ "id": "<generated_id>",
386
+ "type": "AVOID",
387
+ "content": "<pattern to avoid>",
388
+ "source": "council:redirect",
389
+ "created_at": "<ISO-8601 timestamp>"
390
+ }
391
+ ```
392
+ - Keep max 10 constraints (remove oldest if exceeded)
393
+
394
+ Write constraints.json.
395
+
396
+ **For each FEEDBACK identified:**
397
+ Read `.aether/data/COLONY_STATE.json`.
398
+
399
+ Append to `signals` array:
400
+ ```json
401
+ {
402
+ "id": "feedback_<timestamp_ms>",
403
+ "type": "FEEDBACK",
404
+ "content": "<feedback message>",
405
+ "priority": "low",
406
+ "source": "council:feedback",
407
+ "created_at": "<ISO-8601>",
408
+ "expires_at": "phase_end"
409
+ }
410
+ ```
411
+
412
+ Create instinct in `memory.instincts`:
413
+ ```json
414
+ {
415
+ "id": "instinct_<timestamp>",
416
+ "trigger": "<inferred from context>",
417
+ "action": "<the guidance>",
418
+ "confidence": 0.7,
419
+ "domain": "<inferred: testing|architecture|code-style|debugging|workflow>",
420
+ "source": "council:feedback",
421
+ "evidence": ["Council session guidance"],
422
+ "created_at": "<ISO-8601>",
423
+ "last_applied": null,
424
+ "applications": 0,
425
+ "successes": 0
426
+ }
427
+ ```
428
+
429
+ Keep max 30 instincts (remove lowest confidence if exceeded).
430
+
431
+ Write COLONY_STATE.json.
432
+
433
+ ### Step 7: Log Council Event
434
+
435
+ Append to COLONY_STATE.json `events` array:
436
+ ```
437
+ <ISO-8601>|council_session|council|Council convened: <brief summary of topics discussed>
438
+ ```
439
+
440
+ Keep max 100 events.
441
+
442
+ ### Step 8: Display Summary
443
+
444
+ ```
445
+ 📜🐜🏛️🐜📜 COUNCIL ADJOURNED
446
+
447
+ Pheromones Injected:
448
+ ```
449
+
450
+ For each FOCUS added:
451
+ ```
452
+ 🎯 FOCUS: "{content}"
453
+ ```
454
+
455
+ For each REDIRECT added:
456
+ ```
457
+ 🚫 REDIRECT: "{content}"
458
+ ```
459
+
460
+ For each FEEDBACK added:
461
+ ```
462
+ 💬 FEEDBACK: "{content}"
463
+ 🧠 Instinct: [{confidence}] {domain}: {action summary}
464
+ ```
465
+
466
+ If no pheromones were injected:
467
+ ```
468
+ (No new constraints needed based on discussion)
469
+ ```
470
+
471
+ Then:
472
+ ```
473
+ 🐜 Colony guidance updated. Resuming {prior_state} state.
474
+ ```
475
+
476
+ If `prior_state` was EXECUTING:
477
+ ```
478
+ ⚡ Active workers will complete with prior constraints.
479
+ New spawns will use updated guidance.
480
+
481
+ /ant:status 📊 View current progress
482
+ /ant:continue ⏭️ Check for phase completion
483
+ ```
484
+
485
+ If `prior_state` was READY:
486
+ ```
487
+ /ant:plan 📋 Generate or refine plan
488
+ /ant:build 🔨 Start building a phase
489
+ /ant:status 📊 View colony status
490
+ ```
491
+
492
+ If `prior_state` was PLANNING:
493
+ ```
494
+ Planning will continue with new guidance.
495
+ ```
496
+
497
+
498
+ ### Step 9: Next Up
499
+
500
+ Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
501
+ ```bash
502
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
503
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
504
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
505
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
506
+ ```
507
+
@@ -0,0 +1,81 @@
1
+ <!-- Generated from .aether/commands/data-clean.yaml - DO NOT EDIT DIRECTLY -->
2
+ ---
3
+ name: ant:data-clean
4
+ description: "Scan and remove test artifacts from colony data files"
5
+ ---
6
+
7
+ You are the **Queen Ant Colony**. Run the data cleaner to scan for and remove test/synthetic artifacts from colony data files.
8
+
9
+
10
+ > **Note:** `$ARGUMENTS` is unused. This command always scans all data files.
11
+
12
+
13
+
14
+ ## Instructions
15
+
16
+ ### Step 1: Scan
17
+
18
+ Run using the Bash tool with description "Scanning colony data for test artifacts...":
19
+ ```bash
20
+ bash .aether/aether-utils.sh data-clean --dry-run
21
+ ```
22
+
23
+ Display the output to the user. This shows artifact counts per data file without modifying anything.
24
+
25
+ ### Step 2: Decision Gate
26
+
27
+ Parse the scan output for "Total artifacts: N".
28
+
29
+ **If total is 0:**
30
+ Display:
31
+ ```
32
+ Colony data is clean. No artifacts found.
33
+ ```
34
+ Skip to Step 5.
35
+
36
+ **If total is greater than 0:**
37
+ Ask the user:
38
+ ```
39
+ Found {N} test artifacts across colony data files.
40
+ Remove these artifacts? (yes/no)
41
+ ```
42
+
43
+ If user says no, display "No changes made." and skip to Step 5.
44
+
45
+ ### Step 3: Clean
46
+
47
+ If user confirmed, run using the Bash tool with description "Removing test artifacts...":
48
+ ```bash
49
+ bash .aether/aether-utils.sh data-clean --confirm
50
+ ```
51
+
52
+ ### Step 4: Summary
53
+
54
+ Display the cleanup results showing what was removed from each file.
55
+
56
+ For example:
57
+ ```
58
+ Data Clean Complete
59
+ ===================
60
+ Removed {total} artifacts:
61
+ - pheromones.json: {N} test signals
62
+ - QUEEN.md: {N} test entries
63
+ - learning-observations.json: {N} test observations
64
+ - midden.json: {N} test entries
65
+ - spawn-tree.txt: {N} test worker lines
66
+ - constraints.json: {N} test focus entries
67
+
68
+ Run /ant:status to verify colony state.
69
+ ```
70
+
71
+
72
+ ### Step 5: Next Up
73
+
74
+ Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
75
+ ```bash
76
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
77
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
78
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
79
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
80
+ ```
81
+