aether-colony 5.3.2 → 5.4.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 (281) hide show
  1. package/.aether/aether-utils.sh +181 -5
  2. package/.aether/commands/archaeology.yaml +3 -3
  3. package/.aether/commands/build.yaml +80 -45
  4. package/.aether/commands/chaos.yaml +7 -7
  5. package/.aether/commands/colonize.yaml +17 -17
  6. package/.aether/commands/continue.yaml +40 -40
  7. package/.aether/commands/council.yaml +6 -6
  8. package/.aether/commands/data-clean.yaml +3 -3
  9. package/.aether/commands/dream.yaml +2 -2
  10. package/.aether/commands/entomb.yaml +12 -12
  11. package/.aether/commands/export-signals.yaml +2 -2
  12. package/.aether/commands/feedback.yaml +6 -6
  13. package/.aether/commands/flag.yaml +2 -2
  14. package/.aether/commands/flags.yaml +4 -4
  15. package/.aether/commands/focus.yaml +6 -6
  16. package/.aether/commands/help.yaml +1 -1
  17. package/.aether/commands/history.yaml +1 -1
  18. package/.aether/commands/import-signals.yaml +2 -2
  19. package/.aether/commands/init.yaml +44 -27
  20. package/.aether/commands/insert-phase.yaml +1 -1
  21. package/.aether/commands/interpret.yaml +2 -2
  22. package/.aether/commands/lay-eggs.yaml +3 -3
  23. package/.aether/commands/maturity.yaml +2 -2
  24. package/.aether/commands/memory-details.yaml +1 -1
  25. package/.aether/commands/migrate-state.yaml +1 -1
  26. package/.aether/commands/oracle.yaml +147 -82
  27. package/.aether/commands/organize.yaml +5 -5
  28. package/.aether/commands/patrol.yaml +8 -8
  29. package/.aether/commands/pause-colony.yaml +7 -7
  30. package/.aether/commands/phase.yaml +1 -1
  31. package/.aether/commands/pheromones.yaml +1 -1
  32. package/.aether/commands/plan.yaml +14 -14
  33. package/.aether/commands/quick.yaml +4 -4
  34. package/.aether/commands/redirect.yaml +6 -6
  35. package/.aether/commands/resume-colony.yaml +9 -9
  36. package/.aether/commands/resume.yaml +5 -38
  37. package/.aether/commands/run.yaml +10 -10
  38. package/.aether/commands/seal.yaml +33 -33
  39. package/.aether/commands/skill-create.yaml +4 -4
  40. package/.aether/commands/status.yaml +14 -14
  41. package/.aether/commands/swarm.yaml +14 -14
  42. package/.aether/commands/tunnels.yaml +7 -7
  43. package/.aether/commands/update.yaml +1 -1
  44. package/.aether/commands/verify-castes.yaml +3 -3
  45. package/.aether/commands/watch.yaml +15 -15
  46. package/.aether/docs/command-playbooks/build-complete.md +48 -15
  47. package/.aether/docs/command-playbooks/build-context.md +11 -11
  48. package/.aether/docs/command-playbooks/build-full.md +76 -76
  49. package/.aether/docs/command-playbooks/build-prep.md +10 -10
  50. package/.aether/docs/command-playbooks/build-verify.md +27 -27
  51. package/.aether/docs/command-playbooks/build-wave.md +38 -38
  52. package/.aether/docs/command-playbooks/continue-advance.md +60 -27
  53. package/.aether/docs/command-playbooks/continue-finalize.md +25 -11
  54. package/.aether/docs/command-playbooks/continue-full.md +60 -46
  55. package/.aether/docs/command-playbooks/continue-gates.md +18 -18
  56. package/.aether/docs/command-playbooks/continue-verify.md +10 -10
  57. package/.aether/docs/source-of-truth-map.md +10 -10
  58. package/.aether/docs/structural-learning-stack.md +283 -0
  59. package/.aether/templates/colony-state-template.json +1 -0
  60. package/.aether/utils/consolidation-seal.sh +196 -0
  61. package/.aether/utils/consolidation.sh +127 -0
  62. package/.aether/utils/curation-ants/archivist.sh +97 -0
  63. package/.aether/utils/curation-ants/critic.sh +214 -0
  64. package/.aether/utils/curation-ants/herald.sh +102 -0
  65. package/.aether/utils/curation-ants/janitor.sh +121 -0
  66. package/.aether/utils/curation-ants/librarian.sh +99 -0
  67. package/.aether/utils/curation-ants/nurse.sh +153 -0
  68. package/.aether/utils/curation-ants/orchestrator.sh +181 -0
  69. package/.aether/utils/curation-ants/scribe.sh +164 -0
  70. package/.aether/utils/curation-ants/sentinel.sh +119 -0
  71. package/.aether/utils/event-bus.sh +301 -0
  72. package/.aether/utils/graph.sh +559 -0
  73. package/.aether/utils/instinct-store.sh +401 -0
  74. package/.aether/utils/learning.sh +79 -7
  75. package/.aether/utils/oracle/oracle-stop-hook.sh +896 -0
  76. package/.aether/utils/session.sh +13 -0
  77. package/.aether/utils/state-api.sh +1 -1
  78. package/.aether/utils/trust-scoring.sh +347 -0
  79. package/.aether/utils/worktree.sh +97 -0
  80. package/.claude/commands/ant/archaeology.md +2 -2
  81. package/.claude/commands/ant/chaos.md +4 -4
  82. package/.claude/commands/ant/colonize.md +9 -9
  83. package/.claude/commands/ant/council.md +6 -6
  84. package/.claude/commands/ant/data-clean.md +3 -3
  85. package/.claude/commands/ant/dream.md +2 -2
  86. package/.claude/commands/ant/entomb.md +9 -9
  87. package/.claude/commands/ant/export-signals.md +2 -2
  88. package/.claude/commands/ant/feedback.md +4 -4
  89. package/.claude/commands/ant/flag.md +2 -2
  90. package/.claude/commands/ant/flags.md +4 -4
  91. package/.claude/commands/ant/focus.md +4 -4
  92. package/.claude/commands/ant/help.md +1 -1
  93. package/.claude/commands/ant/history.md +1 -1
  94. package/.claude/commands/ant/import-signals.md +2 -2
  95. package/.claude/commands/ant/init.md +44 -27
  96. package/.claude/commands/ant/insert-phase.md +1 -1
  97. package/.claude/commands/ant/interpret.md +2 -2
  98. package/.claude/commands/ant/lay-eggs.md +2 -2
  99. package/.claude/commands/ant/maturity.md +2 -2
  100. package/.claude/commands/ant/memory-details.md +1 -1
  101. package/.claude/commands/ant/migrate-state.md +1 -1
  102. package/.claude/commands/ant/oracle.md +78 -42
  103. package/.claude/commands/ant/organize.md +3 -3
  104. package/.claude/commands/ant/patrol.md +8 -8
  105. package/.claude/commands/ant/pause-colony.md +5 -5
  106. package/.claude/commands/ant/phase.md +1 -1
  107. package/.claude/commands/ant/pheromones.md +1 -1
  108. package/.claude/commands/ant/plan.md +8 -8
  109. package/.claude/commands/ant/quick.md +4 -4
  110. package/.claude/commands/ant/redirect.md +4 -4
  111. package/.claude/commands/ant/resume-colony.md +5 -5
  112. package/.claude/commands/ant/resume.md +17 -29
  113. package/.claude/commands/ant/run.md +10 -10
  114. package/.claude/commands/ant/seal.md +25 -25
  115. package/.claude/commands/ant/skill-create.md +2 -2
  116. package/.claude/commands/ant/status.md +14 -14
  117. package/.claude/commands/ant/swarm.md +14 -14
  118. package/.claude/commands/ant/tunnels.md +4 -4
  119. package/.claude/commands/ant/update.md +1 -1
  120. package/.claude/commands/ant/verify-castes.md +2 -2
  121. package/.claude/commands/ant/watch.md +8 -8
  122. package/.opencode/commands/ant/archaeology.md +1 -1
  123. package/.opencode/commands/ant/build.md +80 -45
  124. package/.opencode/commands/ant/chaos.md +3 -3
  125. package/.opencode/commands/ant/colonize.md +8 -8
  126. package/.opencode/commands/ant/continue.md +40 -40
  127. package/.opencode/commands/ant/council.md +5 -5
  128. package/.opencode/commands/ant/data-clean.md +2 -2
  129. package/.opencode/commands/ant/dream.md +1 -1
  130. package/.opencode/commands/ant/entomb.md +3 -3
  131. package/.opencode/commands/ant/export-signals.md +1 -1
  132. package/.opencode/commands/ant/feedback.md +2 -2
  133. package/.opencode/commands/ant/flag.md +1 -1
  134. package/.opencode/commands/ant/flags.md +3 -3
  135. package/.opencode/commands/ant/focus.md +2 -2
  136. package/.opencode/commands/ant/import-signals.md +1 -1
  137. package/.opencode/commands/ant/init.md +44 -27
  138. package/.opencode/commands/ant/insert-phase.md +1 -1
  139. package/.opencode/commands/ant/interpret.md +1 -1
  140. package/.opencode/commands/ant/lay-eggs.md +2 -2
  141. package/.opencode/commands/ant/maturity.md +1 -1
  142. package/.opencode/commands/ant/memory-details.md +1 -1
  143. package/.opencode/commands/ant/oracle.md +69 -40
  144. package/.opencode/commands/ant/organize.md +2 -2
  145. package/.opencode/commands/ant/patrol.md +8 -8
  146. package/.opencode/commands/ant/pause-colony.md +2 -2
  147. package/.opencode/commands/ant/pheromones.md +1 -1
  148. package/.opencode/commands/ant/plan.md +6 -6
  149. package/.opencode/commands/ant/quick.md +4 -4
  150. package/.opencode/commands/ant/redirect.md +2 -2
  151. package/.opencode/commands/ant/resume-colony.md +4 -4
  152. package/.opencode/commands/ant/resume.md +5 -17
  153. package/.opencode/commands/ant/run.md +10 -10
  154. package/.opencode/commands/ant/seal.md +8 -8
  155. package/.opencode/commands/ant/skill-create.md +2 -2
  156. package/.opencode/commands/ant/status.md +10 -10
  157. package/.opencode/commands/ant/tunnels.md +3 -3
  158. package/.opencode/commands/ant/verify-castes.md +1 -1
  159. package/.opencode/commands/ant/watch.md +7 -7
  160. package/CHANGELOG.md +83 -0
  161. package/README.md +22 -9
  162. package/bin/cli.js +118 -3
  163. package/bin/lib/binary-downloader.js +267 -0
  164. package/bin/lib/update-transaction.js +27 -3
  165. package/bin/lib/version-gate.js +179 -0
  166. package/bin/npx-entry.js +0 -0
  167. package/package.json +1 -1
  168. package/.aether/agents/aether-ambassador.md +0 -140
  169. package/.aether/agents/aether-archaeologist.md +0 -108
  170. package/.aether/agents/aether-architect.md +0 -133
  171. package/.aether/agents/aether-auditor.md +0 -144
  172. package/.aether/agents/aether-builder.md +0 -184
  173. package/.aether/agents/aether-chaos.md +0 -115
  174. package/.aether/agents/aether-chronicler.md +0 -122
  175. package/.aether/agents/aether-gatekeeper.md +0 -116
  176. package/.aether/agents/aether-includer.md +0 -117
  177. package/.aether/agents/aether-keeper.md +0 -177
  178. package/.aether/agents/aether-measurer.md +0 -128
  179. package/.aether/agents/aether-oracle.md +0 -137
  180. package/.aether/agents/aether-probe.md +0 -133
  181. package/.aether/agents/aether-queen.md +0 -286
  182. package/.aether/agents/aether-route-setter.md +0 -130
  183. package/.aether/agents/aether-sage.md +0 -106
  184. package/.aether/agents/aether-scout.md +0 -101
  185. package/.aether/agents/aether-surveyor-disciplines.md +0 -391
  186. package/.aether/agents/aether-surveyor-nest.md +0 -329
  187. package/.aether/agents/aether-surveyor-pathogens.md +0 -264
  188. package/.aether/agents/aether-surveyor-provisions.md +0 -334
  189. package/.aether/agents/aether-tracker.md +0 -137
  190. package/.aether/agents/aether-watcher.md +0 -174
  191. package/.aether/agents/aether-weaver.md +0 -130
  192. package/.aether/commands/claude/archaeology.md +0 -334
  193. package/.aether/commands/claude/build.md +0 -65
  194. package/.aether/commands/claude/chaos.md +0 -336
  195. package/.aether/commands/claude/colonize.md +0 -259
  196. package/.aether/commands/claude/continue.md +0 -60
  197. package/.aether/commands/claude/council.md +0 -507
  198. package/.aether/commands/claude/data-clean.md +0 -81
  199. package/.aether/commands/claude/dream.md +0 -268
  200. package/.aether/commands/claude/entomb.md +0 -498
  201. package/.aether/commands/claude/export-signals.md +0 -57
  202. package/.aether/commands/claude/feedback.md +0 -96
  203. package/.aether/commands/claude/flag.md +0 -151
  204. package/.aether/commands/claude/flags.md +0 -169
  205. package/.aether/commands/claude/focus.md +0 -76
  206. package/.aether/commands/claude/help.md +0 -154
  207. package/.aether/commands/claude/history.md +0 -140
  208. package/.aether/commands/claude/import-signals.md +0 -71
  209. package/.aether/commands/claude/init.md +0 -505
  210. package/.aether/commands/claude/insert-phase.md +0 -105
  211. package/.aether/commands/claude/interpret.md +0 -278
  212. package/.aether/commands/claude/lay-eggs.md +0 -210
  213. package/.aether/commands/claude/maturity.md +0 -113
  214. package/.aether/commands/claude/memory-details.md +0 -77
  215. package/.aether/commands/claude/migrate-state.md +0 -171
  216. package/.aether/commands/claude/oracle.md +0 -642
  217. package/.aether/commands/claude/organize.md +0 -232
  218. package/.aether/commands/claude/patrol.md +0 -620
  219. package/.aether/commands/claude/pause-colony.md +0 -233
  220. package/.aether/commands/claude/phase.md +0 -115
  221. package/.aether/commands/claude/pheromones.md +0 -156
  222. package/.aether/commands/claude/plan.md +0 -693
  223. package/.aether/commands/claude/preferences.md +0 -65
  224. package/.aether/commands/claude/quick.md +0 -100
  225. package/.aether/commands/claude/redirect.md +0 -76
  226. package/.aether/commands/claude/resume-colony.md +0 -197
  227. package/.aether/commands/claude/resume.md +0 -388
  228. package/.aether/commands/claude/run.md +0 -231
  229. package/.aether/commands/claude/seal.md +0 -774
  230. package/.aether/commands/claude/skill-create.md +0 -286
  231. package/.aether/commands/claude/status.md +0 -410
  232. package/.aether/commands/claude/swarm.md +0 -349
  233. package/.aether/commands/claude/tunnels.md +0 -426
  234. package/.aether/commands/claude/update.md +0 -132
  235. package/.aether/commands/claude/verify-castes.md +0 -143
  236. package/.aether/commands/claude/watch.md +0 -239
  237. package/.aether/commands/opencode/archaeology.md +0 -331
  238. package/.aether/commands/opencode/build.md +0 -1168
  239. package/.aether/commands/opencode/chaos.md +0 -329
  240. package/.aether/commands/opencode/colonize.md +0 -195
  241. package/.aether/commands/opencode/continue.md +0 -1436
  242. package/.aether/commands/opencode/council.md +0 -437
  243. package/.aether/commands/opencode/data-clean.md +0 -77
  244. package/.aether/commands/opencode/dream.md +0 -260
  245. package/.aether/commands/opencode/entomb.md +0 -377
  246. package/.aether/commands/opencode/export-signals.md +0 -54
  247. package/.aether/commands/opencode/feedback.md +0 -99
  248. package/.aether/commands/opencode/flag.md +0 -149
  249. package/.aether/commands/opencode/flags.md +0 -167
  250. package/.aether/commands/opencode/focus.md +0 -73
  251. package/.aether/commands/opencode/help.md +0 -157
  252. package/.aether/commands/opencode/history.md +0 -136
  253. package/.aether/commands/opencode/import-signals.md +0 -68
  254. package/.aether/commands/opencode/init.md +0 -518
  255. package/.aether/commands/opencode/insert-phase.md +0 -111
  256. package/.aether/commands/opencode/interpret.md +0 -272
  257. package/.aether/commands/opencode/lay-eggs.md +0 -213
  258. package/.aether/commands/opencode/maturity.md +0 -108
  259. package/.aether/commands/opencode/memory-details.md +0 -83
  260. package/.aether/commands/opencode/migrate-state.md +0 -165
  261. package/.aether/commands/opencode/oracle.md +0 -593
  262. package/.aether/commands/opencode/organize.md +0 -226
  263. package/.aether/commands/opencode/patrol.md +0 -626
  264. package/.aether/commands/opencode/pause-colony.md +0 -203
  265. package/.aether/commands/opencode/phase.md +0 -113
  266. package/.aether/commands/opencode/pheromones.md +0 -162
  267. package/.aether/commands/opencode/plan.md +0 -684
  268. package/.aether/commands/opencode/preferences.md +0 -71
  269. package/.aether/commands/opencode/quick.md +0 -91
  270. package/.aether/commands/opencode/redirect.md +0 -84
  271. package/.aether/commands/opencode/resume-colony.md +0 -190
  272. package/.aether/commands/opencode/resume.md +0 -394
  273. package/.aether/commands/opencode/run.md +0 -237
  274. package/.aether/commands/opencode/seal.md +0 -452
  275. package/.aether/commands/opencode/skill-create.md +0 -63
  276. package/.aether/commands/opencode/status.md +0 -307
  277. package/.aether/commands/opencode/swarm.md +0 -15
  278. package/.aether/commands/opencode/tunnels.md +0 -400
  279. package/.aether/commands/opencode/update.md +0 -127
  280. package/.aether/commands/opencode/verify-castes.md +0 -139
  281. package/.aether/commands/opencode/watch.md +0 -227
@@ -1,498 +0,0 @@
1
- <!-- Generated from .aether/commands/entomb.yaml - DO NOT EDIT DIRECTLY -->
2
- ---
3
- name: ant:entomb
4
- description: "⚰️🐜⚰️ Entomb completed colony in chambers"
5
- ---
6
-
7
- You are the **Queen**. Archive the sealed colony to chambers.
8
-
9
- ## Instructions
10
-
11
- Parse `$ARGUMENTS`:
12
- - If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
13
- - Otherwise: set `visual_mode = true`
14
-
15
- <failure_modes>
16
- ### Archive Write Failure
17
- If writing to chambers/ archive fails partway:
18
- - Do NOT delete source data (the active colony) until archive is verified
19
- - Report what was archived vs. what failed
20
- - Recovery: the original colony data is intact -- user can retry
21
-
22
- ### Seal Verification Failure
23
- If the colony was not properly sealed before entomb:
24
- - STOP -- do not archive an incomplete colony
25
- - Direct user to run /ant:seal first
26
- - This is a hard gate, not a suggestion
27
-
28
- ### Chamber Naming Conflict
29
- If the target chamber directory already exists:
30
- - STOP -- do not overwrite an existing archive
31
- - Report the conflict
32
- - Options: (1) Use a different name, (2) Merge with existing, (3) Cancel
33
- </failure_modes>
34
-
35
- <success_criteria>
36
- Command is complete when:
37
- - Colony data is fully copied to chambers/ archive directory
38
- - Archive integrity is verified (all expected files present)
39
- - Active colony state is cleared only after archive verification
40
- - User sees confirmation with archive location
41
- </success_criteria>
42
-
43
- <read_only>
44
- Do not touch during entomb:
45
- - .aether/dreams/ (user notes -- not archived)
46
- - Source code files
47
- - .env* files
48
- - .claude/settings.json
49
- - .github/workflows/
50
- - Other chamber directories (only write to the new chamber)
51
- </read_only>
52
-
53
- ### Step 0: Initialize Visual Mode (if enabled)
54
-
55
- If `visual_mode` is true:
56
- ### Step 1: Read State
57
-
58
- Read `.aether/data/COLONY_STATE.json`.
59
-
60
- If file missing or `goal: null`:
61
- ```
62
- No colony to entomb. Run /ant:init first.
63
- ```
64
- Stop here.
65
-
66
- Extract: `goal`, `state`, `current_phase`, `plan.phases`, `milestone`, `version`, `initialized_at`, `memory.decisions`, `memory.phase_learnings`, `memory.instincts`.
67
-
68
- Read `colony_version` for display (default to 1 for backward compat with older colonies):
69
- ```bash
70
- colony_version=$(jq -r '.colony_version // 1' .aether/data/COLONY_STATE.json 2>/dev/null || echo 1)
71
- [[ "$colony_version" =~ ^[0-9]+$ ]] || colony_version=1
72
- ```
73
-
74
- ### Step 2: Seal-First Enforcement
75
-
76
- Check `milestone` in COLONY_STATE.json.
77
-
78
- **If milestone != "Crowned Anthill":**
79
- ```
80
- Colony has not been sealed.
81
-
82
- Current milestone: {milestone}
83
- Required: Crowned Anthill
84
-
85
- Run /ant:seal first to complete the sealing ceremony.
86
- ```
87
- Stop here.
88
-
89
- **Belt-and-suspenders:** Also check `.aether/CROWNED-ANTHILL.md` exists. If milestone is Crowned Anthill but file is missing:
90
- ```
91
- CROWNED-ANTHILL.md not found — seal may have been interrupted. Run /ant:seal again.
92
- ```
93
- Stop here.
94
-
95
- ### Step 3: User Confirmation
96
-
97
- Show what will be archived:
98
- ```
99
- ENTOMB COLONY
100
-
101
- Goal: {goal}
102
- Version: v{colony_version}
103
- Milestone: Crowned Anthill
104
- Phases: {phases_completed} of {total_phases}
105
-
106
- This will:
107
- - Archive ALL colony data to .aether/chambers/
108
- - Copy CROWNED-ANTHILL.md, pheromones, dreams, session data
109
- - Promote colony wisdom to QUEEN.md (cross-generational learning)
110
- - Reset COLONY_STATE.json for a fresh start
111
- - Clear session data
112
-
113
- This action is permanent. The archived colony can be browsed via /ant:tunnels.
114
-
115
- Entomb this colony? (yes/no)
116
- ```
117
-
118
- Use `AskUserQuestion with yes/no options`.
119
-
120
- If not "yes":
121
- ```
122
- Entombment cancelled. Colony remains active.
123
- ```
124
- Stop here.
125
-
126
- ### Step 3.25: Wisdom Approval
127
-
128
- Before archiving, review wisdom proposals accumulated during this colony's lifecycle.
129
-
130
- ```bash
131
- # Check for pending proposals
132
- proposals=$(bash .aether/aether-utils.sh learning-check-promotion 2>/dev/null || echo '{"proposals":[]}')
133
- proposal_count=$(echo "$proposals" | jq '.proposals | length')
134
-
135
- if [[ "$proposal_count" -gt 0 ]]; then
136
- echo ""
137
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
138
- echo " 🧠 FINAL WISDOM REVIEW"
139
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
140
- echo ""
141
- echo "Review wisdom proposals before archiving this colony."
142
- echo "Approved proposals will be promoted to QUEEN.md."
143
- echo ""
144
-
145
- # Run approval workflow (blocking)
146
- bash .aether/aether-utils.sh learning-approve-proposals
147
-
148
- echo ""
149
- echo "Wisdom review complete. Proceeding with entombment..."
150
- echo ""
151
- else
152
- echo "No wisdom proposals to review."
153
- fi
154
- ```
155
-
156
- ### Step 3.5: Check XML Tools
157
-
158
- XML archiving is required for entombment. Check tool availability before proceeding.
159
- Uses `command -v xmllint` directly — consistent with seal.md's tool check.
160
-
161
- ```bash
162
- if command -v xmllint >/dev/null 2>&1; then
163
- xmllint_available=true
164
- else
165
- xmllint_available=false
166
- fi
167
- ```
168
-
169
- **If xmllint is NOT available:**
170
-
171
- Ask the user:
172
- ```
173
- xmllint is not installed — XML archiving requires it.
174
-
175
- Install now?
176
- - macOS: xcode-select --install (or brew install libxml2)
177
- - Linux: apt-get install libxml2-utils
178
-
179
- Install xmllint? (yes/no)
180
- ```
181
-
182
- Use AskUserQuestion with yes/no options.
183
-
184
- If yes:
185
- - On macOS: Run `xcode-select --install` or `brew install libxml2`
186
- - On Linux: Run `sudo apt-get install -y libxml2-utils`
187
- - After install attempt, re-check: `command -v xmllint >/dev/null 2>&1`
188
- - If still not available after install:
189
- ```
190
- xmllint installation failed. Cannot entomb without XML archiving.
191
- Install xmllint manually and try again.
192
- ```
193
- Stop here.
194
-
195
- If no:
196
- ```
197
- Entombment requires XML archiving. Install xmllint and try again.
198
- ```
199
- Stop here.
200
-
201
- ### Step 4: Ensure QUEEN.md Exists
202
-
203
- Verify QUEEN.md is initialized for wisdom storage:
204
-
205
- ```bash
206
- queen_file=".aether/QUEEN.md"
207
- if [[ ! -f "$queen_file" ]]; then
208
- init_result=$(bash .aether/aether-utils.sh queen-init 2>/dev/null || echo '{"ok":false}')
209
- init_ok=$(echo "$init_result" | jq -r '.ok // false')
210
- if [[ "$init_ok" == "true" ]]; then
211
- created=$(echo "$init_result" | jq -r '.result.created // false')
212
- if [[ "$created" == "true" ]]; then
213
- bash .aether/aether-utils.sh activity-log "CREATED" "Queen" "Initialized QUEEN.md for wisdom storage"
214
- fi
215
- fi
216
- fi
217
- ```
218
-
219
- ### Step 5: Generate Chamber Name
220
-
221
- Date-first naming:
222
- ```bash
223
- date_prefix=$(date -u +%Y-%m-%d)
224
- sanitized_goal=$(echo "$goal" | tr '[:upper:]' '[:lower:]' | tr -cs '[:alnum:]' '-' | sed 's/^-//;s/-$//' | cut -c1-40)
225
- chamber_name="${date_prefix}-${sanitized_goal}"
226
- ```
227
-
228
- Collision handling:
229
- ```bash
230
- counter=1
231
- original_name="$chamber_name"
232
- while [[ -d ".aether/chambers/$chamber_name" ]]; do
233
- chamber_name="${original_name}-${counter}"
234
- counter=$((counter + 1))
235
- done
236
- ```
237
-
238
- ### Step 6: Create Chamber
239
-
240
- Extract decisions and learnings as JSON arrays:
241
- ```bash
242
- decisions_json=$(jq -c '.memory.decisions // []' .aether/data/COLONY_STATE.json)
243
- learnings_json=$(jq -c '.memory.phase_learnings // []' .aether/data/COLONY_STATE.json)
244
- phases_completed=$(jq '[.plan.phases[] | select(.status == "completed")] | length' .aether/data/COLONY_STATE.json)
245
- total_phases=$(jq '.plan.phases | length' .aether/data/COLONY_STATE.json)
246
- version=$(jq -r '.version // "3.0"' .aether/data/COLONY_STATE.json)
247
- ```
248
-
249
- Create the chamber:
250
- ```bash
251
- bash .aether/aether-utils.sh chamber-create \
252
- ".aether/chambers/$chamber_name" \
253
- ".aether/data/COLONY_STATE.json" \
254
- "$goal" \
255
- "$phases_completed" \
256
- "$total_phases" \
257
- "$milestone" \
258
- "$version" \
259
- "$decisions_json" \
260
- "$learnings_json"
261
- ```
262
-
263
- ### Step 7: Archive Additional Files
264
-
265
- AFTER chamber-create succeeds, copy additional data files:
266
- ```bash
267
- chamber_dir=".aether/chambers/$chamber_name"
268
-
269
- # Archive data files (if they exist)
270
- for f in pheromones.json session.json activity.log flags.json constraints.json spawn-tree.txt timing.log view-state.json; do
271
- [[ -f ".aether/data/$f" ]] && cp ".aether/data/$f" "$chamber_dir/" 2>/dev/null || true
272
- done
273
-
274
- # Archive seal document (critical — this is the ceremony record)
275
- [[ -f ".aether/CROWNED-ANTHILL.md" ]] && cp ".aether/CROWNED-ANTHILL.md" "$chamber_dir/"
276
-
277
- # Archive HANDOFF.md if it exists
278
- [[ -f ".aether/HANDOFF.md" ]] && cp ".aether/HANDOFF.md" "$chamber_dir/"
279
-
280
- # Archive dreams directory (optional — may not exist)
281
- [[ -d ".aether/dreams" ]] && cp -r ".aether/dreams" "$chamber_dir/dreams" 2>/dev/null || true
282
-
283
- # Archive XML exchange files to chamber (per D-04, D-05)
284
- xml_archived=0
285
- for xml_file in .aether/exchange/*.xml; do
286
- [[ -f "$xml_file" ]] && cp "$xml_file" "$chamber_dir/" && xml_archived=$((xml_archived + 1))
287
- done
288
- if [[ "$xml_archived" -gt 0 ]]; then
289
- echo "XML Archive: ${xml_archived} exchange file(s) copied to chamber"
290
- fi
291
- ```
292
-
293
- Do NOT copy: `.aether/data/backups/`, `.aether/data/locks/`, `.aether/data/midden/`, `.aether/data/survey/`.
294
-
295
- ### Step 7.5: Export XML Archive (hard-stop)
296
-
297
- Export combined XML archive to the chamber. This is a HARD REQUIREMENT — entomb fails if XML export fails.
298
-
299
- ```bash
300
- chamber_dir=".aether/chambers/$chamber_name"
301
- xml_result=$(bash .aether/aether-utils.sh colony-archive-xml "$chamber_dir/colony-archive.xml" 2>&1)
302
- xml_ok=$(echo "$xml_result" | jq -r '.ok // false' 2>/dev/null)
303
-
304
- if [[ "$xml_ok" != "true" ]]; then
305
- # HARD STOP — remove the chamber and abort
306
- rm -rf "$chamber_dir"
307
- echo "XML archive export failed. Colony NOT entombed."
308
- echo ""
309
- echo "Error: $(echo "$xml_result" | jq -r '.error // "Unknown error"' 2>/dev/null)"
310
- echo ""
311
- echo "The chamber has been cleaned up. Fix the XML issue and try again."
312
- # Do NOT proceed to state reset or any further steps
313
- fi
314
- ```
315
-
316
- If xml_ok is true, store for display:
317
- ```bash
318
- xml_pheromone_count=$(echo "$xml_result" | jq -r '.result.pheromone_count // 0' 2>/dev/null)
319
- xml_exchange_count=$(find .aether/exchange -maxdepth 1 -name "*.xml" 2>/dev/null | wc -l | tr -d ' ')
320
- xml_archive_line="XML Archive: colony-archive.xml (${xml_pheromone_count} signals) + ${xml_exchange_count} exchange file(s)"
321
- ```
322
-
323
- **Critical behavior:** If XML export fails, entomb STOPS. The chamber directory is removed (cleanup). The colony state is NOT reset. The user sees a clear error and can retry after fixing the issue.
324
-
325
- ### Step 8: Verify Chamber Integrity
326
-
327
- Run verification:
328
- ```bash
329
- bash .aether/aether-utils.sh chamber-verify ".aether/chambers/$chamber_name"
330
- ```
331
-
332
- If verification fails, display error and stop:
333
- ```
334
- Chamber verification failed.
335
-
336
- Error: {verification_error}
337
-
338
- The colony has NOT been reset. Please check the chamber directory:
339
- .aether/chambers/{chamber_name}/
340
- ```
341
- Stop here.
342
-
343
- ### Step 9: Record in Eternal Memory
344
-
345
- Write colony summary to eternal memory:
346
- ```bash
347
- bash .aether/aether-utils.sh eternal-init # idempotent
348
- eternal_file="$HOME/.aether/eternal/memory.json"
349
- if [[ -f "$eternal_file" ]]; then
350
- colony_entry=$(jq -n \
351
- --arg goal "$goal" \
352
- --arg milestone "$milestone" \
353
- --arg sealed_at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
354
- --arg chamber ".aether/chambers/$chamber_name" \
355
- '{goal: $goal, milestone: $milestone, sealed_at: $sealed_at, chamber: $chamber}')
356
- tmp_eternal="$(mktemp /tmp/aether-eternal.XXXXXX)"
357
- jq --argjson colony_entry "$colony_entry" '.colonies = ((.colonies // []) + [$colony_entry])' "$eternal_file" > "$tmp_eternal" \
358
- && mv "$tmp_eternal" "$eternal_file"
359
- fi
360
- ```
361
-
362
- ### Step 10: Reset Colony State
363
-
364
- Backup current state:
365
- ```bash
366
- cp .aether/data/COLONY_STATE.json .aether/data/COLONY_STATE.json.bak
367
- ```
368
-
369
- Reset state, clearing everything including promoted wisdom (already in QUEEN.md):
370
- ```bash
371
- # Resolve jq template path (hub-first)
372
- jq_template=""
373
- for path in \
374
- "$HOME/.aether/system/templates/colony-state-reset.jq.template" \
375
- ".aether/templates/colony-state-reset.jq.template"; do
376
- if [[ -f "$path" ]]; then
377
- jq_template="$path"
378
- break
379
- fi
380
- done
381
-
382
- if [[ -z "$jq_template" ]]; then
383
- echo "Template missing: colony-state-reset.jq.template. Run aether update to fix."
384
- exit 1
385
- fi
386
-
387
- jq -f "$jq_template" .aether/data/COLONY_STATE.json.bak > .aether/data/COLONY_STATE.json
388
- ```
389
-
390
- Verify reset succeeded:
391
- ```bash
392
- new_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json)
393
- if [[ "$new_goal" != "null" ]]; then
394
- # Restore from backup
395
- mv .aether/data/COLONY_STATE.json.bak .aether/data/COLONY_STATE.json
396
- echo "Error: State reset failed. Restored from backup."
397
- exit 1
398
- fi
399
- ```
400
-
401
- Remove backup after successful reset:
402
- ```bash
403
- rm -f .aether/data/COLONY_STATE.json.bak
404
- ```
405
-
406
- Clear session data:
407
- ```bash
408
- rm -f .aether/data/session.json
409
- ```
410
-
411
- Clean up seal document (it's now in the chamber):
412
- ```bash
413
- rm -f .aether/CROWNED-ANTHILL.md
414
- ```
415
-
416
- Clean up exchange XML files (now archived in chamber per D-06):
417
- ```bash
418
- rm -f .aether/exchange/*.xml 2>/dev/null || true
419
- ```
420
-
421
- ### Step 11: Write HANDOFF.md
422
-
423
- Write handoff documenting the entombed colony:
424
-
425
- Resolve the handoff template path:
426
- Check ~/.aether/system/templates/handoff.template.md first,
427
- then .aether/templates/handoff.template.md.
428
-
429
- If no template found: output "Template missing: handoff.template.md. Run aether update to fix." and stop.
430
-
431
- Read the template file. Fill all {{PLACEHOLDER}} values:
432
- - {{CHAMBER_NAME}} → chamber_name
433
- - {{GOAL}} → goal
434
- - {{PHASES_COMPLETED}} → phases completed count
435
- - {{TOTAL_PHASES}} → total phases count
436
- - {{MILESTONE}} → milestone
437
- - {{ENTOMB_TIMESTAMP}} → current ISO-8601 UTC timestamp
438
-
439
- Remove the HTML comment lines at the top of the template.
440
- Write the result to .aether/HANDOFF.md using the Write tool.
441
-
442
- ### Step 12: Display Result
443
-
444
- Display:
445
- ```
446
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
447
- C O L O N Y E N T O M B E D
448
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
449
-
450
- Entombed v{colony_version}
451
-
452
- Goal: {goal}
453
- Phases: {completed} completed
454
- Milestone: {milestone}
455
-
456
- Chamber: .aether/chambers/{chamber_name}/
457
- {xml_archive_line}
458
-
459
- The colony rests. Its learnings live on in QUEEN.md.
460
-
461
- ──────────────────────────────────────────────────
462
- 🐜 Next Up
463
- ──────────────────────────────────────────────────
464
- /ant:lay-eggs 🥚 Start a new colony
465
- /ant:tunnels 🗄️ Browse archived chambers
466
- ```
467
-
468
- What would you like to do next?
469
- 1. /ant:lay-eggs "<new goal>" — Start a new colony
470
- 2. /ant:tunnels — Browse archived colonies
471
- 3. /clear — Clear context and continue
472
-
473
- Use AskUserQuestion with these three options.
474
-
475
- If option 1 selected: proceed to run /ant:lay-eggs flow
476
- If option 2 selected: run /ant:tunnels
477
- If option 3 selected: display "Run /ant:lay-eggs to begin anew after clearing"
478
- ```
479
-
480
- ### Edge Cases
481
-
482
- **Colony not sealed:**
483
- - Refuse with guidance to run /ant:seal first. This is the primary gate.
484
-
485
- **Chamber name collision:**
486
- - Automatically append counter to make unique.
487
-
488
- **Missing files during archive:**
489
- - Note in output but continue with available files. The `|| true` in the copy loop handles this.
490
-
491
- **State reset failure:**
492
- - Restore from backup, display error, do not claim success.
493
-
494
- **Empty phases array:**
495
- - Can entomb a colony that was initialized but had no phases planned (treat as 0 of 0 completed).
496
-
497
- **Missing CROWNED-ANTHILL.md:**
498
- - Refuse with guidance to run /ant:seal again.
@@ -1,57 +0,0 @@
1
- <!-- Generated from .aether/commands/export-signals.yaml - DO NOT EDIT DIRECTLY -->
2
- ---
3
- name: ant:export-signals
4
- description: "Export colony pheromone signals to portable XML format"
5
- ---
6
-
7
- You are the **Queen**. Export colony pheromone signals to portable XML format.
8
-
9
- ## Instructions
10
-
11
- The optional output path is: `$ARGUMENTS`
12
-
13
- ### Step 1: Validate
14
-
15
- Read `.aether/data/COLONY_STATE.json`.
16
- If file missing or `goal: null` -> "No colony initialized. Run /ant:init first.", stop.
17
-
18
- Parse `$ARGUMENTS`:
19
- - If a path is provided, use it as the output path.
20
- - If empty, default to `.aether/exchange/pheromones.xml`.
21
-
22
- ### Step 2: Export
23
-
24
- Run using the Bash tool with description "Exporting pheromone signals to XML...":
25
- ```bash
26
- bash .aether/aether-utils.sh pheromone-export-xml "<output_path>"
27
- ```
28
-
29
- Parse the returned JSON:
30
- - If `.ok` is `true`: extract `.result.path` and `.result.validated` (if present).
31
- - If `.ok` is `false`: check `.error` for details. If error mentions `xmllint` or `E_FEATURE_UNAVAILABLE`, display: "XML export requires xmllint. Install with: xcode-select --install (macOS) or apt-get install libxml2-utils (Linux)." Otherwise display the error message and stop.
32
-
33
- ### Step 3: Confirm
34
-
35
-
36
- Output (3-5 lines, no banners):
37
- ```
38
- Pheromone signals exported to XML
39
- Path: <output_path>
40
- Validated: <yes/no based on .result.validated>
41
-
42
- Share this file with another colony using /ant:import-signals.
43
- ```
44
-
45
-
46
-
47
-
48
- ### Step 4: Next Up
49
-
50
- Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
51
- ```bash
52
- state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
53
- current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
54
- total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
55
- bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
56
- ```
57
-
@@ -1,96 +0,0 @@
1
- <!-- Generated from .aether/commands/feedback.yaml - DO NOT EDIT DIRECTLY -->
2
- ---
3
- name: ant:feedback
4
- description: "Emit FEEDBACK signal to provide guidance to colony"
5
- ---
6
-
7
-
8
- You are the **Queen**. Emit a FEEDBACK pheromone signal.
9
-
10
-
11
-
12
- ## Instructions
13
-
14
- The feedback message is: `$ARGUMENTS`
15
-
16
- ### Step 1: Validate
17
-
18
- If `$ARGUMENTS` empty -> show usage: `/ant:feedback <message>`, stop.
19
- If content > 500 chars -> "Signal content too long (max 500 chars)", stop.
20
-
21
-
22
- Parse optional flags from `$ARGUMENTS`:
23
- - `--ttl <value>`: signal lifetime (e.g., `2h`, `1d`, `7d`). Default: `phase_end`.
24
- - Strip flags from content before using it as the feedback message.
25
-
26
-
27
- ### Step 2: Write Signal and Create Instinct
28
-
29
- Read `.aether/data/COLONY_STATE.json`.
30
- If `goal: null` -> "No colony initialized.", stop.
31
-
32
-
33
- Run using the Bash tool with description "Recording colony feedback...":
34
- ```bash
35
- bash .aether/aether-utils.sh pheromone-write FEEDBACK "<content>" --strength 0.7 --reason "User feedback guidance" --ttl <ttl>
36
- ```
37
-
38
- **Create instinct from feedback:**
39
- User feedback is high-value learning. Generate ISO-8601 timestamp and append to `memory.instincts` in COLONY_STATE.json:
40
- ```json
41
- {
42
- "id": "instinct_<timestamp>",
43
- "trigger": "<infer from feedback context>",
44
- "action": "<the feedback guidance>",
45
- "confidence": 0.7,
46
- "domain": "<infer: testing|architecture|code-style|debugging|workflow>",
47
- "source": "user_feedback",
48
- "evidence": ["User feedback: <content>"],
49
- "created_at": "<ISO-8601>",
50
- "last_applied": null,
51
- "applications": 0,
52
- "successes": 0
53
- }
54
- ```
55
-
56
- Write COLONY_STATE.json.
57
-
58
- ### Step 2.5: Update Context Document
59
-
60
- Run using the Bash tool with description "Updating context document...":
61
- ```bash
62
- bash .aether/aether-utils.sh context-update constraint feedback "<content>" "user" 2>/dev/null || true
63
- ```
64
-
65
- ### Step 3: Get Active Counts
66
-
67
- Run using the Bash tool with description "Counting active signals...":
68
- ```bash
69
- bash .aether/aether-utils.sh pheromone-count
70
- ```
71
-
72
- ### Step 4: Confirm
73
-
74
- Output (4 lines, no banners):
75
- ```
76
- FEEDBACK signal emitted
77
- Note: "<content truncated to 60 chars>"
78
- Strength: 0.7 | Expires: <phase end or ttl value>
79
- Active signals: <focus_count> FOCUS, <redirect_count> REDIRECT, <feedback_count> FEEDBACK
80
-
81
- Instinct created: [0.7] <domain>: <action summary>
82
- ```
83
-
84
-
85
-
86
-
87
- ### Step 5: Next Up
88
-
89
- Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
90
- ```bash
91
- state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
92
- current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
93
- total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
94
- bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
95
- ```
96
-