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,452 +0,0 @@
1
- <!-- Generated from .aether/commands/seal.yaml - DO NOT EDIT DIRECTLY -->
2
- ---
3
- name: ant:seal
4
- description: "🏺🐜🏺 Seal the colony with Crowned Anthill milestone"
5
- ---
6
-
7
- ### Step -1: Normalize Arguments
8
-
9
- Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
10
-
11
- This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
12
-
13
- You are the **Queen**. Seal the colony when all work is complete.
14
-
15
- ## Instructions
16
-
17
- Parse `$normalized_args`:
18
- - If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
19
- - Otherwise: set `visual_mode = true`
20
-
21
- ### Step 1: Read State
22
-
23
- Read `.aether/data/COLONY_STATE.json`.
24
-
25
- If file missing or `goal: null`:
26
- ```
27
- No colony initialized. Run /ant:init first.
28
- ```
29
- Stop here.
30
-
31
- ### Step 2: Validate Colony Is Complete
32
-
33
- Extract: `goal`, `current_phase`, `plan.phases`, `milestone`, `state`.
34
-
35
- **Precondition 1: All phases must be completed**
36
-
37
- Check if all phases in `plan.phases` have `status: "completed"`:
38
- ```
39
- all_completed = all(phase.status == "completed" for phase in plan.phases)
40
- ```
41
-
42
- If NOT all completed:
43
- ```
44
- Cannot archive colony with incomplete phases.
45
-
46
- Completed phases: X of Y
47
- Remaining: {list of incomplete phase names}
48
-
49
- Run /ant:continue to complete remaining phases first.
50
- ```
51
- Stop here.
52
-
53
- **Precondition 2: State must not be EXECUTING**
54
-
55
- If `state == "EXECUTING"`:
56
- ```
57
- Colony is still executing. Run /ant:continue to reconcile first.
58
- ```
59
- Stop here.
60
-
61
- ### Step 3: Check Milestone Eligibility
62
-
63
- The full milestone progression is:
64
- - **First Mound** — Phase 1 complete (first runnable)
65
- - **Open Chambers** — Feature work underway (2+ phases complete)
66
- - **Brood Stable** — Tests consistently green
67
- - **Ventilated Nest** — Perf/latency acceptable (build + lint clean)
68
- - **Sealed Chambers** — All phases complete (interfaces frozen)
69
- - **Crowned Anthill** — Release-ready (user confirms via /ant:seal)
70
-
71
- **If current milestone is "Crowned Anthill":**
72
- ```
73
- Colony is already at Crowned Anthill milestone.
74
- No further archiving needed.
75
-
76
- Use /ant:status to view colony state.
77
- ```
78
- Stop here.
79
-
80
- **If current milestone is "Sealed Chambers":**
81
- - Proceed to Step 4 (will upgrade to Crowned Anthill)
82
-
83
- **If current milestone is "First Mound", "Open Chambers", "Brood Stable", "Ventilated Nest", or any intermediate milestone:**
84
- - Since all phases are complete, the colony qualifies for both Sealed Chambers and Crowned Anthill
85
- - The current logic allows proceeding to Step 4 (seal as Crowned Anthill)
86
- - If user wants to explicitly achieve Sealed Chambers first, they can manually update milestone via COLONY_STATE.json
87
-
88
- **If milestone is unrecognized (not in the 6 known stages):**
89
- ```
90
- Unknown milestone: {milestone}
91
-
92
- The milestone "{milestone}" is not recognized.
93
- Known milestones: First Mound, Open Chambers, Brood Stable, Ventilated Nest, Sealed Chambers, Crowned Anthill
94
-
95
- Run /ant:status to check colony state.
96
- ```
97
- Stop here.
98
-
99
- ### Step 4: Archive Colony State
100
-
101
- Create archive directory:
102
- ```
103
- archive_dir=".aether/data/archive/session_$(date -u +%s)_archive"
104
- mkdir -p "$archive_dir"
105
- ```
106
-
107
- Copy the following files to the archive directory:
108
- 1. `.aether/data/COLONY_STATE.json` → `$archive_dir/COLONY_STATE.json`
109
- 2. `.aether/data/activity.log` → `$archive_dir/activity.log`
110
- 3. `.aether/data/spawn-tree.txt` → `$archive_dir/spawn-tree.txt`
111
- 4. `.aether/data/flags.json` → `$archive_dir/flags.json` (if exists)
112
- 5. `.aether/data/constraints.json` → `$archive_dir/constraints.json` (if exists)
113
-
114
- Create archive manifest file `$archive_dir/manifest.json`:
115
- ```json
116
- {
117
- "archived_at": "<ISO-8601 timestamp>",
118
- "goal": "<colony goal>",
119
- "total_phases": <number>,
120
- "milestone": "Crowned Anthill",
121
- "files": [
122
- "COLONY_STATE.json",
123
- "activity.log",
124
- "spawn-tree.txt",
125
- "flags.json",
126
- "constraints.json"
127
- ]
128
- }
129
- ```
130
-
131
- ### Step 4.5: Increment Colony Version
132
-
133
- Before writing the Crowned Anthill milestone, increment `colony_version` in COLONY_STATE.json.
134
-
135
- ```bash
136
- # Read current colony_version (default to 0 for backward compat with older colonies)
137
- current_colony_version=$(jq -r '.colony_version // 0' .aether/data/COLONY_STATE.json 2>/dev/null || echo 0)
138
- # Guard against non-integer values (floats, strings)
139
- [[ "$current_colony_version" =~ ^[0-9]+$ ]] || current_colony_version=0
140
- new_colony_version=$(( current_colony_version + 1 ))
141
-
142
- # Write incremented value back — guard against empty output destroying the file
143
- updated=$(jq --argjson v "$new_colony_version" '.colony_version = $v' .aether/data/COLONY_STATE.json 2>/dev/null)
144
- if [[ -n "$updated" && ${#updated} -gt 10 ]]; then
145
- echo "$updated" > .aether/data/COLONY_STATE.json
146
- else
147
- echo "Warning: jq update failed — colony_version defaults to 1, state file unchanged"
148
- new_colony_version=1
149
- fi
150
- ```
151
-
152
- Use `new_colony_version` as `{colony_version}` throughout the rest of the seal ceremony (e.g., display as "Crowned Anthill v{colony_version}").
153
-
154
- **Error handling:** If jq fails or produces empty/short output, COLONY_STATE.json is NOT overwritten and `new_colony_version` defaults to 1. Never let version increment failures block the seal.
155
-
156
- ### Step 5: Update Milestone to Crowned Anthill
157
-
158
- Update COLONY_STATE.json:
159
- 1. Set `milestone` to `"Crowned Anthill"`
160
- 2. Set `milestone_updated_at` to current ISO-8601 timestamp
161
- 3. Append event: `"<timestamp>|milestone_reached|archive|Achieved Crowned Anthill milestone - colony archived"`
162
-
163
- ### Step 5.1: Update Changelog
164
-
165
- **MANDATORY: Record the seal in the project changelog. This step is never skipped.**
166
-
167
- If no `CHANGELOG.md` exists, `changelog-append` creates one automatically.
168
-
169
- Build a summary of what the colony accomplished across all phases:
170
- - Collect completed phase names from COLONY_STATE.json
171
- - Summarize the goal and key outcomes in one line
172
-
173
- ```bash
174
- bash .aether/aether-utils.sh changelog-append \
175
- "$(date +%Y-%m-%d)" \
176
- "seal-crowned-anthill" \
177
- "00" \
178
- "{key_files_csv}" \
179
- "Colony sealed at Crowned Anthill;{goal}" \
180
- "{phases_completed} phases completed;Colony wisdom promoted to QUEEN.md" \
181
- ""
182
- ```
183
-
184
- - `{key_files_csv}` — list the most significant files created or modified across the colony's lifetime (derive from phase plans or git log)
185
- - `{goal}` — the colony goal from COLONY_STATE.json
186
-
187
- **Error handling:** If `changelog-append` fails, log to midden and continue — changelog failure never blocks sealing.
188
-
189
- ### Step 5.2: Update Registry (Silent)
190
-
191
- Mark the colony as inactive in the global registry. This is silent on failure — registry is not required for the colony to work.
192
-
193
- Run using the Bash tool (ignore errors):
194
- ```bash
195
- bash .aether/aether-utils.sh registry-add "$(pwd)" "$(jq -r '.version // "unknown"' ~/.aether/version.json 2>/dev/null || echo 'unknown')" --active false 2>/dev/null || true
196
- ```
197
-
198
- If the command fails, proceed silently. This is optional bookkeeping.
199
-
200
- ### Step 5.25: Hive Promotion (NON-BLOCKING)
201
-
202
- After wisdom promotion, promote abstracted instincts to the cross-colony hive.
203
-
204
- **Extract high-confidence instincts for hive promotion:**
205
- ```bash
206
- # Get instincts with confidence >= 0.8
207
- high_conf_instincts=$(jq -r '.memory.instincts[] | select(.confidence >= 0.8) | @base64' .aether/data/COLONY_STATE.json 2>/dev/null || echo "")
208
-
209
- # Derive source repo name from current directory
210
- source_repo="$(pwd)"
211
-
212
- # Read domain tags from registry (NOT from instinct.domain which is a category, not a repo domain)
213
- repo_domain_tags=$(jq -r --arg repo "$(pwd)" \
214
- '[.repos[] | select(.path == $repo) | .domain_tags // []] | .[0] // [] | join(",")' \
215
- "$HOME/.aether/registry.json" 2>/dev/null || echo "")
216
-
217
- hive_promoted_count=0
218
- hive_errors=0
219
- for encoded in $high_conf_instincts; do
220
- [[ -z "$encoded" ]] && continue
221
-
222
- # Extract trigger and action fields from the instinct object
223
- trigger=$(echo "$encoded" | base64 -d | jq -r '.trigger // empty')
224
- action=$(echo "$encoded" | base64 -d | jq -r '.action // empty')
225
- confidence=$(echo "$encoded" | base64 -d | jq -r '.confidence // 0.7')
226
-
227
- [[ -z "$trigger" || -z "$action" ]] && continue
228
-
229
- # Strip leading "When " or "when " from trigger to avoid "When When..." stutter
230
- trigger_clean=$(echo "$trigger" | sed 's/^[Ww]hen //')
231
-
232
- # Build the promotion text in "When {trigger}: {action}" format
233
- promote_text="When ${trigger_clean}: ${action}"
234
-
235
- # Build hive-promote args with --text and --source-repo (required)
236
- promote_args=(hive-promote --text "$promote_text" --source-repo "$source_repo" --confidence "$confidence")
237
- [[ -n "$repo_domain_tags" ]] && promote_args+=(--domain "$repo_domain_tags")
238
-
239
- # Call hive-promote which orchestrates abstract + store
240
- result=$(bash .aether/aether-utils.sh "${promote_args[@]}" 2>/dev/null || echo '{}')
241
- was_promoted=$(echo "$result" | jq -r '.result.action // "skipped"' 2>/dev/null || echo "skipped")
242
-
243
- if [[ "$was_promoted" == "promoted" || "$was_promoted" == "merged" ]]; then
244
- hive_promoted_count=$((hive_promoted_count + 1))
245
- fi
246
- done
247
-
248
- if [[ "$hive_promoted_count" -gt 0 ]]; then
249
- echo "Hive promotion: $hive_promoted_count instinct(s) promoted to cross-colony hive"
250
- fi
251
- ```
252
-
253
- **Continue to Step 5.5 (non-blocking):**
254
- Proceed to Step 5.5 regardless of hive promotion results — hive promotion is strictly non-blocking.
255
-
256
- ### Step 5.5: Write Final Handoff
257
-
258
- After archiving, write the final handoff documenting the completed colony:
259
-
260
- Resolve the handoff template path:
261
- Check ~/.aether/system/templates/handoff.template.md first,
262
- then .aether/templates/handoff.template.md.
263
-
264
- If no template found: output "Template missing: handoff.template.md. Run aether update to fix." and stop.
265
-
266
- Read the template file. Fill all {{PLACEHOLDER}} values:
267
- - {{CHAMBER_NAME}} → archive directory name
268
- - {{GOAL}} → goal
269
- - {{PHASES_COMPLETED}} → total_phases (OpenCode seal archives completed colonies)
270
- - {{TOTAL_PHASES}} → total_phases
271
- - {{MILESTONE}} → "Crowned Anthill"
272
- - {{ENTOMB_TIMESTAMP}} → seal timestamp
273
-
274
- Remove the HTML comment lines at the top of the template.
275
- Write the result to .aether/HANDOFF.md using the Write tool.
276
-
277
- This handoff serves as the final record of the completed colony.
278
-
279
- ### Step 5.75: Export XML Archive (best-effort)
280
-
281
- Export colony data as a combined XML archive and a standalone pheromones.xml. Both are best-effort — seal proceeds even if XML export fails.
282
-
283
- ```bash
284
- # Check if xmllint is available
285
- if command -v xmllint >/dev/null 2>&1; then
286
- xml_result=$(bash .aether/aether-utils.sh colony-archive-xml ".aether/exchange/colony-archive.xml" 2>&1)
287
- xml_ok=$(echo "$xml_result" | jq -r '.ok // false' 2>/dev/null)
288
- if [[ "$xml_ok" == "true" ]]; then
289
- xml_pheromone_count=$(echo "$xml_result" | jq -r '.result.pheromone_count // 0' 2>/dev/null)
290
- xml_export_line="XML Archive: colony-archive.xml (${xml_pheromone_count} active signals)"
291
- else
292
- xml_export_line="XML Archive: export failed (non-blocking)"
293
- fi
294
-
295
- # Also export standalone pheromones.xml for cross-colony sharing
296
- pher_result=$(bash .aether/aether-utils.sh pheromone-export-xml ".aether/exchange/pheromones.xml" 2>&1)
297
- pher_ok=$(echo "$pher_result" | jq -r '.ok // false' 2>/dev/null)
298
- if [[ "$pher_ok" == "true" ]]; then
299
- pher_signal_count=$(jq '[.signals[] | select(.active != false)] | length' .aether/data/pheromones.json 2>/dev/null || echo "0")
300
- pher_export_line="Signal Export: pheromones.xml (${pher_signal_count} signals, importable by other colonies)"
301
- else
302
- pher_export_line="Signal Export: failed (non-blocking)"
303
- fi
304
-
305
- # Export standalone queen-wisdom.xml for cross-colony wisdom sharing
306
- wisdom_result=$(bash .aether/aether-utils.sh wisdom-export-xml ".aether/exchange/queen-wisdom.xml" 2>&1)
307
- wisdom_ok=$(echo "$wisdom_result" | jq -r '.ok // false' 2>/dev/null)
308
- if [[ "$wisdom_ok" == "true" ]]; then
309
- wisdom_count=$(echo "$wisdom_result" | jq -r '.result.entries // 0' 2>/dev/null)
310
- wisdom_export_line="Wisdom Export: queen-wisdom.xml (${wisdom_count} entries)"
311
- else
312
- wisdom_export_line="Wisdom Export: failed (non-blocking)"
313
- fi
314
-
315
- # Export standalone colony-registry.xml for lineage tracking
316
- registry_result=$(bash .aether/aether-utils.sh registry-export-xml ".aether/exchange/colony-registry.xml" 2>&1)
317
- registry_ok=$(echo "$registry_result" | jq -r '.ok // false' 2>/dev/null)
318
- if [[ "$registry_ok" == "true" ]]; then
319
- registry_count=$(echo "$registry_result" | jq -r '.result.colonies // 0' 2>/dev/null)
320
- registry_export_line="Registry Export: colony-registry.xml (${registry_count} colonies)"
321
- else
322
- registry_export_line="Registry Export: failed (non-blocking)"
323
- fi
324
- else
325
- xml_export_line="XML Archive: skipped (xmllint not available)"
326
- pher_export_line="Signal Export: skipped (xmllint not available)"
327
- wisdom_export_line="Wisdom Export: skipped (xmllint not available)"
328
- registry_export_line="Registry Export: skipped (xmllint not available)"
329
- fi
330
- ```
331
-
332
- ### Step 6: Display Result
333
-
334
- Output:
335
- ```
336
- 🏺 ════════════════════════════════════════════════════
337
- C R O W N E D A N T H I L L v{colony_version}
338
- ══════════════════════════════════════════════════ 🏺
339
-
340
- ✅ Colony archived successfully!
341
-
342
- 👑 Goal: {goal (truncated to 60 chars)}
343
- 📍 Phases: {total_phases} completed
344
- 🏆 Milestone: Crowned Anthill v{colony_version}
345
-
346
- 📦 Archive Location: {archive_dir}
347
- - COLONY_STATE.json
348
- - activity.log
349
- - spawn-tree.txt
350
- - flags.json (if existed)
351
- - constraints.json (if existed)
352
- {xml_export_line}
353
- {pher_export_line}
354
- {wisdom_export_line}
355
- {registry_export_line}
356
-
357
- 🐜 The colony has reached its final form.
358
- The anthill stands crowned and sealed.
359
- History is preserved. The colony rests.
360
-
361
- 💾 State persisted — safe to /clear
362
-
363
- 🐜 What would you like to do next?
364
- 1. /ant:lay-eggs "<new goal>" — Start a new colony
365
- 2. /ant:tunnels — Browse archived colonies
366
- 3. /clear — Clear context and continue
367
-
368
- Use AskUserQuestion with these three options.
369
-
370
- If option 1 selected: proceed to run /ant:lay-eggs flow
371
- If option 2 selected: run /ant:tunnels
372
- If option 3 selected: display "Run /ant:lay-eggs to begin anew after clearing"
373
- ```
374
-
375
- ### Step 6.5: Commit Suggestion (Non-blocking)
376
-
377
- After the ceremony, offer to commit all colony work.
378
-
379
- **Gate check — skip silently if any fail:**
380
- 1. Not a git repo: `git rev-parse --git-dir 2>/dev/null` fails -> skip
381
- 2. Clean working tree: `git status --porcelain 2>/dev/null` is empty -> skip to Step 6.6
382
-
383
- **If uncommitted changes exist:**
384
-
385
- Generate a seal commit message:
386
- ```bash
387
- seal_commit=$(bash .aether/aether-utils.sh generate-commit-message seal "$phases_completed" "$goal" "$colony_age_days" 2>/dev/null)
388
- seal_message=$(echo "$seal_commit" | jq -r '.result.message // "aether-seal: colony sealed"')
389
- seal_body=$(echo "$seal_commit" | jq -r '.result.body // ""')
390
- ```
391
-
392
- Display the suggestion:
393
- ```
394
- Commit suggestion:
395
- $seal_message
396
- $seal_body
397
- ```
398
-
399
- Prompt with AskUserQuestion (3 options):
400
- 1. **Commit with this message** — Run `git add -A && git commit -m "$seal_message" -m "$seal_body"`
401
- 2. **Edit message** — Ask user for their preferred message, then commit with that
402
- 3. **Skip** — Do not commit
403
-
404
- If the user chooses option 1 or 2 and the commit succeeds, set `seal_committed = true`.
405
- If the commit fails or user skips, set `seal_committed = false`.
406
-
407
- **Error handling:** If `generate-commit-message` fails, fall back to message `"aether-seal: colony sealed"`. Never let commit suggestion failures stop the seal flow.
408
-
409
- ### Step 6.6: Push Suggestion (Non-blocking)
410
-
411
- Only show if a commit was just made in Step 6.5 (`seal_committed == true`) OR if there are unpushed commits.
412
-
413
- **Gate check — skip silently if any fail:**
414
- 1. Not a git repo -> skip
415
- 2. No remote configured: `git remote -v 2>/dev/null` is empty -> skip
416
-
417
- **Check for unpushed commits:**
418
- ```bash
419
- unpushed=$(git log --oneline @{u}..HEAD 2>/dev/null | wc -l | tr -d ' ')
420
- ```
421
- If `unpushed == 0` and `seal_committed == false` -> skip
422
-
423
- **If there are commits to push:**
424
-
425
- Detect current branch and upstream status:
426
- ```bash
427
- current_branch=$(git branch --show-current)
428
- has_upstream=$(git rev-parse --abbrev-ref @{u} 2>/dev/null && echo "yes" || echo "no")
429
- ```
430
-
431
- Display: `Push {unpushed} commit(s) to remote? Branch: {current_branch}`
432
-
433
- Prompt with AskUserQuestion (2 options):
434
- 1. **Push now** — If upstream exists: `git push`. If no upstream: `git push -u origin $current_branch`
435
- 2. **I'll push later** — Skip
436
-
437
- Display result on success or skip.
438
-
439
- **Error handling:** If push fails, display the error but do not stop the seal flow.
440
-
441
- **Safety:** Never auto-push. Always require explicit user approval.
442
-
443
- ### Edge Cases
444
-
445
- **If milestone is already "Sealed Chambers" but phases are complete:**
446
- - Proceed with archiving and upgrade to Crowned Anthill
447
-
448
- **If any archive files are missing:**
449
- - Archive what exists, note in manifest which files were missing
450
-
451
- **If archive directory already exists:**
452
- - Append timestamp to make unique: `session_<ts>_archive_<random>`
@@ -1,63 +0,0 @@
1
- <!-- Generated from .aether/commands/skill-create.yaml - DO NOT EDIT DIRECTLY -->
2
- ---
3
- name: ant:skill-create
4
- description: "Create a custom domain skill using Oracle mini-research and a guided wizard"
5
- ---
6
-
7
- ### Step -1: Normalize Arguments
8
-
9
- Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
10
-
11
- This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
12
-
13
- You are the **Builder**. Create a custom domain skill by researching best practices and guiding the user through a wizard.
14
-
15
- ## Instructions
16
-
17
- ### Step 0: Parse Arguments
18
-
19
- If `$normalized_args` is empty:
20
- ```
21
- Usage: /ant:skill-create "<topic>"
22
-
23
- Creates a custom domain skill using Oracle mini-research.
24
-
25
- Examples:
26
- /ant:skill-create "tailwind"
27
- /ant:skill-create "react native"
28
- /ant:skill-create "kubernetes"
29
- ```
30
- Stop here.
31
-
32
- ### Step 1: Oracle Mini-Research
33
-
34
- Launch a focused research session on the topic (5 iterations max):
35
- 1. Web search for best practices, common patterns, and gotchas
36
- 2. Codebase scan for existing usage of the technology
37
- 3. Compile findings into structured notes
38
-
39
- ### Step 2: Wizard Questions
40
-
41
- Ask the user:
42
- 1. What aspect to focus on? (provide 2-4 options based on findings)
43
- 2. Experience level? (beginner / intermediate / advanced)
44
- 3. Any specific rules or constraints? (free text)
45
-
46
- ### Step 3: Generate SKILL.md
47
-
48
- Create the skill file with proper frontmatter and body:
49
- - name: derived from topic
50
- - description: "Use when working with {topic}"
51
- - type: domain
52
- - domains: inferred from research
53
- - agent_roles: [builder]
54
- - detect_files / detect_packages: inferred from research
55
- - Body: practical best-practices guide from research + wizard answers
56
-
57
- ### Step 4: Write and Verify
58
-
59
- 1. Write to `~/.aether/skills/domain/{name}/SKILL.md`
60
- 2. Run: `bash .aether/aether-utils.sh skill-parse-frontmatter ~/.aether/skills/domain/{name}/SKILL.md`
61
- 3. Run: `bash .aether/aether-utils.sh skill-cache-rebuild`
62
- 4. Show the generated skill to the user
63
- 5. Ask if they want to adjust anything