aether-colony 3.1.17 β†’ 5.1.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 (378) hide show
  1. package/.aether/aether-utils.sh +5354 -0
  2. package/.aether/agents-claude/aether-ambassador.md +265 -0
  3. package/.aether/agents-claude/aether-archaeologist.md +327 -0
  4. package/.aether/agents-claude/aether-architect.md +236 -0
  5. package/.aether/agents-claude/aether-auditor.md +271 -0
  6. package/.aether/agents-claude/aether-builder.md +224 -0
  7. package/.aether/agents-claude/aether-chaos.md +269 -0
  8. package/.aether/agents-claude/aether-chronicler.md +305 -0
  9. package/.aether/agents-claude/aether-gatekeeper.md +330 -0
  10. package/.aether/agents-claude/aether-includer.md +374 -0
  11. package/.aether/agents-claude/aether-keeper.md +272 -0
  12. package/.aether/agents-claude/aether-measurer.md +322 -0
  13. package/.aether/agents-claude/aether-oracle.md +237 -0
  14. package/.aether/agents-claude/aether-probe.md +211 -0
  15. package/.aether/agents-claude/aether-queen.md +330 -0
  16. package/.aether/agents-claude/aether-route-setter.md +178 -0
  17. package/.aether/agents-claude/aether-sage.md +418 -0
  18. package/.aether/agents-claude/aether-scout.md +179 -0
  19. package/.aether/agents-claude/aether-surveyor-disciplines.md +417 -0
  20. package/.aether/agents-claude/aether-surveyor-nest.md +355 -0
  21. package/.aether/agents-claude/aether-surveyor-pathogens.md +289 -0
  22. package/.aether/agents-claude/aether-surveyor-provisions.md +360 -0
  23. package/.aether/agents-claude/aether-tracker.md +270 -0
  24. package/.aether/agents-claude/aether-watcher.md +280 -0
  25. package/.aether/agents-claude/aether-weaver.md +248 -0
  26. package/.aether/commands/archaeology.yaml +653 -0
  27. package/.aether/commands/build.yaml +1221 -0
  28. package/.aether/commands/chaos.yaml +653 -0
  29. package/.aether/commands/colonize.yaml +438 -0
  30. package/.aether/commands/continue.yaml +1484 -0
  31. package/.aether/commands/council.yaml +304 -0
  32. package/.aether/commands/data-clean.yaml +80 -0
  33. package/.aether/commands/dream.yaml +275 -0
  34. package/.aether/commands/entomb.yaml +863 -0
  35. package/.aether/commands/export-signals.yaml +64 -0
  36. package/.aether/commands/feedback.yaml +158 -0
  37. package/.aether/commands/flag.yaml +160 -0
  38. package/.aether/commands/flags.yaml +177 -0
  39. package/.aether/commands/focus.yaml +112 -0
  40. package/.aether/commands/help.yaml +167 -0
  41. package/.aether/commands/history.yaml +137 -0
  42. package/.aether/commands/import-signals.yaml +79 -0
  43. package/.aether/commands/init.yaml +469 -0
  44. package/.aether/commands/insert-phase.yaml +98 -0
  45. package/.aether/commands/interpret.yaml +285 -0
  46. package/.aether/commands/lay-eggs.yaml +224 -0
  47. package/.aether/commands/maturity.yaml +122 -0
  48. package/.aether/commands/memory-details.yaml +74 -0
  49. package/.aether/commands/migrate-state.yaml +174 -0
  50. package/.aether/commands/oracle.yaml +1224 -0
  51. package/.aether/commands/organize.yaml +446 -0
  52. package/.aether/commands/patrol.yaml +621 -0
  53. package/.aether/commands/pause-colony.yaml +424 -0
  54. package/.aether/commands/phase.yaml +124 -0
  55. package/.aether/commands/pheromones.yaml +153 -0
  56. package/.aether/commands/plan.yaml +1313 -0
  57. package/.aether/commands/preferences.yaml +63 -0
  58. package/.aether/commands/redirect.yaml +123 -0
  59. package/.aether/commands/resume-colony.yaml +373 -0
  60. package/.aether/commands/resume.yaml +398 -0
  61. package/.aether/commands/run.yaml +193 -0
  62. package/.aether/commands/seal.yaml +1205 -0
  63. package/.aether/commands/skill-create.yaml +337 -0
  64. package/.aether/commands/status.yaml +364 -0
  65. package/.aether/commands/swarm.yaml +352 -0
  66. package/.aether/commands/tunnels.yaml +814 -0
  67. package/.aether/commands/update.yaml +131 -0
  68. package/.aether/commands/verify-castes.yaml +159 -0
  69. package/.aether/commands/watch.yaml +454 -0
  70. package/.aether/docs/INCIDENT_TEMPLATE.md +32 -0
  71. package/.aether/docs/QUEEN-SYSTEM.md +211 -0
  72. package/.aether/docs/README.md +98 -0
  73. package/.aether/docs/caste-system.md +48 -0
  74. package/.aether/docs/command-playbooks/README.md +23 -0
  75. package/.aether/docs/command-playbooks/build-complete.md +349 -0
  76. package/.aether/docs/command-playbooks/build-context.md +282 -0
  77. package/.aether/docs/command-playbooks/build-full.md +1682 -0
  78. package/.aether/docs/command-playbooks/build-prep.md +283 -0
  79. package/.aether/docs/command-playbooks/build-verify.md +405 -0
  80. package/.aether/docs/command-playbooks/build-wave.md +749 -0
  81. package/.aether/docs/command-playbooks/continue-advance.md +524 -0
  82. package/.aether/docs/command-playbooks/continue-finalize.md +447 -0
  83. package/.aether/docs/command-playbooks/continue-full.md +1724 -0
  84. package/.aether/docs/command-playbooks/continue-gates.md +686 -0
  85. package/.aether/docs/command-playbooks/continue-verify.md +406 -0
  86. package/.aether/docs/context-continuity.md +84 -0
  87. package/{runtime β†’ .aether/docs/disciplines}/DISCIPLINES.md +13 -11
  88. package/.aether/docs/error-codes.md +268 -0
  89. package/.aether/docs/known-issues.md +94 -0
  90. package/{runtime β†’ .aether}/docs/pheromones.md +86 -6
  91. package/.aether/docs/plans/pheromone-display-plan.md +257 -0
  92. package/.aether/docs/queen-commands.md +98 -0
  93. package/.aether/docs/source-of-truth-map.md +132 -0
  94. package/.aether/docs/xml-utilities.md +47 -0
  95. package/{runtime β†’ .aether}/exchange/pheromone-xml.sh +2 -1
  96. package/{runtime β†’ .aether}/exchange/registry-xml.sh +7 -3
  97. package/{runtime β†’ .aether}/exchange/wisdom-xml.sh +11 -4
  98. package/.aether/rules/aether-colony.md +144 -0
  99. package/.aether/schemas/example-prompt-builder.xml +234 -0
  100. package/.aether/scripts/incident-test-add.sh +47 -0
  101. package/.aether/scripts/weekly-audit.sh +79 -0
  102. package/.aether/skills/.index.json +649 -0
  103. package/.aether/skills/colony/.manifest.json +16 -0
  104. package/.aether/skills/colony/build-discipline/SKILL.md +78 -0
  105. package/.aether/skills/colony/colony-interaction/SKILL.md +56 -0
  106. package/.aether/skills/colony/colony-lifecycle/SKILL.md +77 -0
  107. package/.aether/skills/colony/colony-visuals/SKILL.md +112 -0
  108. package/.aether/skills/colony/context-management/SKILL.md +80 -0
  109. package/.aether/skills/colony/error-presentation/SKILL.md +99 -0
  110. package/.aether/skills/colony/pheromone-protocol/SKILL.md +79 -0
  111. package/.aether/skills/colony/pheromone-visibility/SKILL.md +81 -0
  112. package/.aether/skills/colony/state-safety/SKILL.md +84 -0
  113. package/.aether/skills/colony/worker-priming/SKILL.md +82 -0
  114. package/.aether/skills/domain/.manifest.json +24 -0
  115. package/.aether/skills/domain/README.md +33 -0
  116. package/.aether/skills/domain/django/SKILL.md +49 -0
  117. package/.aether/skills/domain/docker/SKILL.md +52 -0
  118. package/.aether/skills/domain/golang/SKILL.md +52 -0
  119. package/.aether/skills/domain/graphql/SKILL.md +51 -0
  120. package/.aether/skills/domain/html-css/SKILL.md +48 -0
  121. package/.aether/skills/domain/nextjs/SKILL.md +45 -0
  122. package/.aether/skills/domain/nodejs/SKILL.md +53 -0
  123. package/.aether/skills/domain/postgresql/SKILL.md +53 -0
  124. package/.aether/skills/domain/prisma/SKILL.md +59 -0
  125. package/.aether/skills/domain/python/SKILL.md +50 -0
  126. package/.aether/skills/domain/rails/SKILL.md +52 -0
  127. package/.aether/skills/domain/react/SKILL.md +45 -0
  128. package/.aether/skills/domain/rest-api/SKILL.md +58 -0
  129. package/.aether/skills/domain/svelte/SKILL.md +47 -0
  130. package/.aether/skills/domain/tailwind/SKILL.md +45 -0
  131. package/.aether/skills/domain/testing/SKILL.md +53 -0
  132. package/.aether/skills/domain/typescript/SKILL.md +58 -0
  133. package/.aether/skills/domain/vue/SKILL.md +49 -0
  134. package/.aether/templates/QUEEN.md.template +61 -0
  135. package/.aether/templates/colony-state-reset.jq.template +23 -0
  136. package/.aether/templates/colony-state.template.json +39 -0
  137. package/.aether/templates/constraints.template.json +9 -0
  138. package/.aether/templates/crowned-anthill.template.md +36 -0
  139. package/.aether/templates/handoff-build-error.template.md +30 -0
  140. package/.aether/templates/handoff-build-success.template.md +39 -0
  141. package/.aether/templates/handoff.template.md +40 -0
  142. package/.aether/templates/learning-observations.template.json +6 -0
  143. package/.aether/templates/midden.template.json +13 -0
  144. package/.aether/templates/pheromones.template.json +6 -0
  145. package/.aether/templates/session.template.json +9 -0
  146. package/{runtime β†’ .aether}/utils/atomic-write.sh +68 -22
  147. package/{runtime β†’ .aether}/utils/chamber-compare.sh +23 -10
  148. package/.aether/utils/chamber-utils.sh +440 -0
  149. package/.aether/utils/emoji-audit.sh +166 -0
  150. package/{runtime β†’ .aether}/utils/error-handler.sh +34 -8
  151. package/.aether/utils/file-lock.sh +313 -0
  152. package/.aether/utils/flag.sh +267 -0
  153. package/.aether/utils/hive.sh +572 -0
  154. package/.aether/utils/learning.sh +1928 -0
  155. package/.aether/utils/midden.sh +342 -0
  156. package/.aether/utils/oracle/oracle.md +168 -0
  157. package/.aether/utils/oracle/oracle.sh +1023 -0
  158. package/.aether/utils/pheromone.sh +2029 -0
  159. package/.aether/utils/queen.sh +1698 -0
  160. package/.aether/utils/scan.sh +860 -0
  161. package/.aether/utils/semantic-cli.sh +415 -0
  162. package/.aether/utils/session.sh +552 -0
  163. package/.aether/utils/skills.sh +509 -0
  164. package/.aether/utils/spawn-tree.sh +260 -0
  165. package/.aether/utils/spawn.sh +260 -0
  166. package/.aether/utils/state-api.sh +199 -0
  167. package/{runtime β†’ .aether}/utils/state-loader.sh +8 -6
  168. package/.aether/utils/suggest.sh +611 -0
  169. package/{runtime β†’ .aether}/utils/swarm-display.sh +10 -1
  170. package/.aether/utils/swarm.sh +1004 -0
  171. package/{runtime β†’ .aether}/utils/watch-spawn-tree.sh +11 -2
  172. package/{runtime β†’ .aether}/utils/xml-compose.sh +9 -3
  173. package/.aether/utils/xml-convert.sh +277 -0
  174. package/{runtime β†’ .aether}/utils/xml-core.sh +5 -9
  175. package/.aether/utils/xml-query.sh +201 -0
  176. package/.aether/utils/xml-utils.sh +110 -0
  177. package/{runtime β†’ .aether}/workers.md +97 -81
  178. package/.claude/agents/ant/aether-ambassador.md +265 -0
  179. package/.claude/agents/ant/aether-archaeologist.md +327 -0
  180. package/.claude/agents/ant/aether-architect.md +236 -0
  181. package/.claude/agents/ant/aether-auditor.md +271 -0
  182. package/.claude/agents/ant/aether-builder.md +224 -0
  183. package/.claude/agents/ant/aether-chaos.md +269 -0
  184. package/.claude/agents/ant/aether-chronicler.md +305 -0
  185. package/.claude/agents/ant/aether-gatekeeper.md +330 -0
  186. package/.claude/agents/ant/aether-includer.md +374 -0
  187. package/.claude/agents/ant/aether-keeper.md +272 -0
  188. package/.claude/agents/ant/aether-measurer.md +322 -0
  189. package/.claude/agents/ant/aether-oracle.md +237 -0
  190. package/.claude/agents/ant/aether-probe.md +211 -0
  191. package/.claude/agents/ant/aether-queen.md +330 -0
  192. package/.claude/agents/ant/aether-route-setter.md +178 -0
  193. package/.claude/agents/ant/aether-sage.md +418 -0
  194. package/.claude/agents/ant/aether-scout.md +179 -0
  195. package/.claude/agents/ant/aether-surveyor-disciplines.md +417 -0
  196. package/.claude/agents/ant/aether-surveyor-nest.md +355 -0
  197. package/.claude/agents/ant/aether-surveyor-pathogens.md +289 -0
  198. package/.claude/agents/ant/aether-surveyor-provisions.md +360 -0
  199. package/.claude/agents/ant/aether-tracker.md +270 -0
  200. package/.claude/agents/ant/aether-watcher.md +280 -0
  201. package/.claude/agents/ant/aether-weaver.md +248 -0
  202. package/.claude/commands/ant/archaeology.md +16 -14
  203. package/.claude/commands/ant/build.md +43 -1028
  204. package/.claude/commands/ant/chaos.md +19 -23
  205. package/.claude/commands/ant/colonize.md +52 -31
  206. package/.claude/commands/ant/continue.md +40 -1016
  207. package/.claude/commands/ant/council.md +21 -18
  208. package/.claude/commands/ant/data-clean.md +81 -0
  209. package/.claude/commands/ant/dream.md +27 -15
  210. package/.claude/commands/ant/entomb.md +317 -225
  211. package/.claude/commands/ant/export-signals.md +57 -0
  212. package/.claude/commands/ant/feedback.md +48 -26
  213. package/.claude/commands/ant/flag.md +30 -10
  214. package/.claude/commands/ant/flags.md +34 -12
  215. package/.claude/commands/ant/focus.md +45 -19
  216. package/.claude/commands/ant/help.md +50 -8
  217. package/.claude/commands/ant/history.md +13 -0
  218. package/.claude/commands/ant/import-signals.md +71 -0
  219. package/.claude/commands/ant/init.md +345 -194
  220. package/.claude/commands/ant/insert-phase.md +101 -0
  221. package/.claude/commands/ant/interpret.md +26 -4
  222. package/.claude/commands/ant/lay-eggs.md +184 -127
  223. package/.claude/commands/ant/maturity.md +32 -11
  224. package/.claude/commands/ant/memory-details.md +77 -0
  225. package/.claude/commands/ant/migrate-state.md +20 -2
  226. package/.claude/commands/ant/oracle.md +337 -74
  227. package/.claude/commands/ant/organize.md +39 -25
  228. package/.claude/commands/ant/patrol.md +620 -0
  229. package/.claude/commands/ant/pause-colony.md +23 -27
  230. package/.claude/commands/ant/phase.md +40 -42
  231. package/.claude/commands/ant/pheromones.md +156 -0
  232. package/.claude/commands/ant/plan.md +185 -51
  233. package/.claude/commands/ant/preferences.md +65 -0
  234. package/.claude/commands/ant/redirect.md +45 -30
  235. package/.claude/commands/ant/resume-colony.md +51 -27
  236. package/.claude/commands/ant/resume.md +314 -94
  237. package/.claude/commands/ant/run.md +195 -0
  238. package/.claude/commands/ant/seal.md +650 -221
  239. package/.claude/commands/ant/skill-create.md +286 -0
  240. package/.claude/commands/ant/status.md +196 -31
  241. package/.claude/commands/ant/swarm.md +16 -46
  242. package/.claude/commands/ant/tunnels.md +280 -105
  243. package/.claude/commands/ant/update.md +73 -89
  244. package/.claude/commands/ant/verify-castes.md +100 -42
  245. package/.claude/commands/ant/watch.md +14 -12
  246. package/.opencode/agents/aether-ambassador.md +63 -20
  247. package/.opencode/agents/aether-archaeologist.md +29 -12
  248. package/.opencode/agents/aether-architect.md +103 -36
  249. package/.opencode/agents/aether-auditor.md +51 -18
  250. package/.opencode/agents/aether-builder.md +70 -20
  251. package/.opencode/agents/aether-chaos.md +29 -12
  252. package/.opencode/agents/aether-chronicler.md +60 -18
  253. package/.opencode/agents/aether-gatekeeper.md +27 -18
  254. package/.opencode/agents/aether-includer.md +27 -18
  255. package/.opencode/agents/aether-keeper.md +89 -18
  256. package/.opencode/agents/aether-measurer.md +27 -18
  257. package/.opencode/agents/aether-oracle.md +137 -0
  258. package/.opencode/agents/aether-probe.md +60 -18
  259. package/.opencode/agents/aether-queen.md +172 -24
  260. package/.opencode/agents/aether-route-setter.md +57 -12
  261. package/.opencode/agents/aether-sage.md +26 -18
  262. package/.opencode/agents/aether-scout.md +28 -20
  263. package/.opencode/agents/aether-surveyor-disciplines.md +59 -2
  264. package/.opencode/agents/aether-surveyor-nest.md +59 -2
  265. package/.opencode/agents/aether-surveyor-pathogens.md +57 -2
  266. package/.opencode/agents/aether-surveyor-provisions.md +59 -2
  267. package/.opencode/agents/aether-tracker.md +64 -18
  268. package/.opencode/agents/aether-watcher.md +66 -19
  269. package/.opencode/agents/aether-weaver.md +61 -18
  270. package/.opencode/commands/ant/archaeology.md +7 -14
  271. package/.opencode/commands/ant/build.md +437 -257
  272. package/.opencode/commands/ant/chaos.md +7 -24
  273. package/.opencode/commands/ant/colonize.md +8 -17
  274. package/.opencode/commands/ant/continue.md +661 -142
  275. package/.opencode/commands/ant/council.md +11 -22
  276. package/.opencode/commands/ant/data-clean.md +77 -0
  277. package/.opencode/commands/ant/dream.md +15 -17
  278. package/.opencode/commands/ant/entomb.md +133 -62
  279. package/.opencode/commands/ant/export-signals.md +54 -0
  280. package/.opencode/commands/ant/feedback.md +24 -5
  281. package/.opencode/commands/ant/flag.md +16 -4
  282. package/.opencode/commands/ant/flags.md +24 -10
  283. package/.opencode/commands/ant/focus.md +22 -5
  284. package/.opencode/commands/ant/help.md +41 -8
  285. package/.opencode/commands/ant/history.md +9 -0
  286. package/.opencode/commands/ant/import-signals.md +68 -0
  287. package/.opencode/commands/ant/init.md +374 -167
  288. package/.opencode/commands/ant/insert-phase.md +107 -0
  289. package/.opencode/commands/ant/interpret.md +16 -0
  290. package/.opencode/commands/ant/lay-eggs.md +184 -112
  291. package/.opencode/commands/ant/maturity.md +18 -2
  292. package/.opencode/commands/ant/memory-details.md +83 -0
  293. package/.opencode/commands/ant/migrate-state.md +12 -0
  294. package/.opencode/commands/ant/oracle.md +322 -67
  295. package/.opencode/commands/ant/organize.md +18 -16
  296. package/.opencode/commands/ant/patrol.md +626 -0
  297. package/.opencode/commands/ant/pause-colony.md +12 -29
  298. package/.opencode/commands/ant/phase.md +30 -40
  299. package/.opencode/commands/ant/pheromones.md +162 -0
  300. package/.opencode/commands/ant/plan.md +184 -56
  301. package/.opencode/commands/ant/preferences.md +71 -0
  302. package/.opencode/commands/ant/redirect.md +22 -5
  303. package/.opencode/commands/ant/resume-colony.md +38 -27
  304. package/.opencode/commands/ant/resume.md +385 -0
  305. package/.opencode/commands/ant/run.md +201 -0
  306. package/.opencode/commands/ant/seal.md +259 -45
  307. package/.opencode/commands/ant/skill-create.md +63 -0
  308. package/.opencode/commands/ant/status.md +135 -31
  309. package/.opencode/commands/ant/swarm.md +3 -345
  310. package/.opencode/commands/ant/tunnels.md +152 -9
  311. package/.opencode/commands/ant/update.md +70 -91
  312. package/.opencode/commands/ant/verify-castes.md +96 -42
  313. package/.opencode/commands/ant/watch.md +7 -0
  314. package/CHANGELOG.md +356 -0
  315. package/README.md +203 -573
  316. package/bin/cli.js +455 -527
  317. package/bin/generate-commands.js +186 -0
  318. package/bin/generate-commands.sh +127 -88
  319. package/bin/lib/init.js +13 -3
  320. package/bin/lib/spawn-logger.js +0 -15
  321. package/bin/lib/update-transaction.js +392 -140
  322. package/bin/npx-install.js +178 -0
  323. package/bin/sync-to-runtime.sh +5 -137
  324. package/bin/validate-package.sh +166 -0
  325. package/package.json +14 -7
  326. package/.opencode/agents/aether-guardian.md +0 -107
  327. package/.opencode/agents/workers.md +0 -1034
  328. package/bin/lib/model-profiles.js +0 -445
  329. package/bin/lib/model-verify.js +0 -288
  330. package/bin/lib/proxy-health.js +0 -253
  331. package/bin/lib/telemetry.js +0 -441
  332. package/runtime/CONTEXT.md +0 -160
  333. package/runtime/QUEEN_ANT_ARCHITECTURE.md +0 -402
  334. package/runtime/aether-utils.sh +0 -3879
  335. package/runtime/data/signatures.json +0 -41
  336. package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +0 -1343
  337. package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +0 -2642
  338. package/runtime/docs/PHEROMONE-INJECTION.md +0 -240
  339. package/runtime/docs/PHEROMONE-INTEGRATION.md +0 -192
  340. package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +0 -426
  341. package/runtime/docs/README.md +0 -94
  342. package/runtime/docs/VISUAL-OUTPUT-SPEC.md +0 -219
  343. package/runtime/docs/biological-reference.md +0 -272
  344. package/runtime/docs/codebase-review.md +0 -399
  345. package/runtime/docs/command-sync.md +0 -164
  346. package/runtime/docs/constraints.md +0 -116
  347. package/runtime/docs/implementation-learnings.md +0 -89
  348. package/runtime/docs/known-issues.md +0 -217
  349. package/runtime/docs/namespace.md +0 -148
  350. package/runtime/docs/pathogen-schema-example.json +0 -36
  351. package/runtime/docs/pathogen-schema.md +0 -111
  352. package/runtime/docs/planning-discipline.md +0 -159
  353. package/runtime/docs/progressive-disclosure.md +0 -184
  354. package/runtime/lib/queen-utils.sh +0 -729
  355. package/runtime/model-profiles.yaml +0 -100
  356. package/runtime/planning.md +0 -159
  357. package/runtime/recover.sh +0 -136
  358. package/runtime/templates/QUEEN.md.template +0 -79
  359. package/runtime/utils/chamber-utils.sh +0 -285
  360. package/runtime/utils/file-lock.sh +0 -122
  361. package/runtime/utils/spawn-tree.sh +0 -428
  362. package/runtime/utils/spawn-with-model.sh +0 -56
  363. package/runtime/utils/xml-utils.sh +0 -2196
  364. package/runtime/workers-new-castes.md +0 -516
  365. /package/{runtime β†’ .aether/docs/disciplines}/coding-standards.md +0 -0
  366. /package/{runtime β†’ .aether/docs/disciplines}/debugging.md +0 -0
  367. /package/{runtime β†’ .aether/docs/disciplines}/learning.md +0 -0
  368. /package/{runtime β†’ .aether/docs/disciplines}/tdd.md +0 -0
  369. /package/{runtime β†’ .aether/docs/disciplines}/verification-loop.md +0 -0
  370. /package/{runtime β†’ .aether/docs/disciplines}/verification.md +0 -0
  371. /package/{runtime β†’ .aether}/schemas/aether-types.xsd +0 -0
  372. /package/{runtime β†’ .aether}/schemas/colony-registry.xsd +0 -0
  373. /package/{runtime β†’ .aether}/schemas/pheromone.xsd +0 -0
  374. /package/{runtime β†’ .aether}/schemas/prompt.xsd +0 -0
  375. /package/{runtime β†’ .aether}/schemas/queen-wisdom.xsd +0 -0
  376. /package/{runtime β†’ .aether}/schemas/worker-priming.xsd +0 -0
  377. /package/{runtime β†’ .aether}/utils/colorize-log.sh +0 -0
  378. /package/{runtime β†’ .aether}/utils/queen-to-md.xsl +0 -0
@@ -1,6 +1,7 @@
1
+ <!-- Generated from .aether/commands/init.yaml - DO NOT EDIT DIRECTLY -->
1
2
  ---
2
3
  name: ant:init
3
- description: "πŸŒ±πŸœπŸ†•πŸœπŸŒ± Initialize Aether colony - Queen sets intention, colony mobilizes"
4
+ description: "Initialize Aether colony - scan repo, approve charter, create colony"
4
5
  ---
5
6
 
6
7
  You are the **Queen Ant Colony**. Initialize the colony with the Queen's intention.
@@ -13,23 +14,36 @@ Parse `$ARGUMENTS`:
13
14
  - If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
14
15
  - Otherwise: set `visual_mode = true`
15
16
 
16
- ### Step 0: Initialize Visual Mode (if enabled)
17
17
 
18
- If `visual_mode` is true:
19
- ```bash
20
- # Generate session ID
21
- init_id="init-$(date +%s)"
22
-
23
- # Initialize swarm display
24
- bash .aether/aether-utils.sh swarm-display-init "$init_id"
25
- bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Colony initialization" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 0
26
- ```
27
-
28
- ### Step 0.5: Version Check (Non-blocking)
29
-
30
- Run using the Bash tool: `bash .aether/aether-utils.sh version-check 2>/dev/null || true`
31
18
 
32
- If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
19
+ <failure_modes>
20
+ ### Colony State Overwrite
21
+ Re-init mode detects existing COLONY_STATE.json and preserves all state. Charter content is updated in-place via charter-write. Colony state, wisdom, instincts, learnings, pheromones, and phase progress are never reset.
22
+
23
+ ### Write Failure Mid-Init
24
+ If writing COLONY_STATE.json fails partway:
25
+ - Remove the incomplete file (partial state is worse than no state)
26
+ - Report the error
27
+ - Recovery: user can run /ant:init again safely
28
+ </failure_modes>
29
+
30
+ <success_criteria>
31
+ Command is complete when:
32
+ - User has approved the charter prompt (Charter, Context, Pheromones sections)
33
+ - Charter content is written to QUEEN.md via charter-write
34
+ - COLONY_STATE.json exists and is valid JSON (fresh init only)
35
+ - Session file is written
36
+ - User sees confirmation of colony creation or re-init
37
+ </success_criteria>
38
+
39
+ <read_only>
40
+ Do not touch during init:
41
+ - .aether/dreams/ (user notes)
42
+ - .aether/chambers/ (archived colonies)
43
+ - .env* files
44
+ - .claude/settings.json
45
+ - .github/workflows/
46
+ </read_only>
33
47
 
34
48
  ### Step 1: Validate Input
35
49
 
@@ -38,8 +52,8 @@ If `$ARGUMENTS` is empty or blank, output:
38
52
  ```
39
53
  Aether Colony
40
54
 
41
- Initialize the colony with a goal. This creates the colony state,
42
- initializes constraints, and logs the init event.
55
+ Initialize the colony with a goal. This scans the repo, generates
56
+ a charter for your approval, then creates colony files.
43
57
 
44
58
  Usage: /ant:init "<your goal here>"
45
59
 
@@ -51,32 +65,30 @@ Aether Colony
51
65
 
52
66
  Stop here. Do not proceed.
53
67
 
54
- ### Step 1.5: Bootstrap System Files (Conditional)
68
+ ### Step 1.5: Verify Aether Setup
55
69
 
56
70
  Check if `.aether/aether-utils.sh` exists using the Read tool.
57
71
 
58
- **If the file already exists** β€” skip this step entirely. System files are present.
72
+ **If the file already exists** -- skip this step entirely. Aether is set up.
59
73
 
60
74
  **If the file does NOT exist:**
61
- - Check if `~/.aether/system/` exists (expand `~` to the user's home directory)
62
- - **If the hub exists:** Run using the Bash tool:
63
- ```
64
- bash ~/.aether/system/aether-utils.sh bootstrap-system
65
- ```
66
- This copies system files from the global hub into `.aether/`. Display:
67
- ```
68
- Bootstrapped system files from global hub.
69
- ```
70
- - **If the hub does NOT exist:** Output:
71
- ```
72
- No Aether system files found locally or in ~/.aether/.
73
- Run `aether install` or `npx aether-colony install` to set up the global hub first.
74
- ```
75
- Stop here. Do not proceed.
76
-
77
- ### Step 1.6: Initialize QUEEN.md Wisdom Document
78
-
79
- After bootstrap completes (or if system files already existed), run using the Bash tool:
75
+ ```
76
+ Aether is not set up in this repo yet.
77
+
78
+ Run /ant:lay-eggs first to create the .aether/ directory
79
+ with all system files, then run /ant:init "your goal" to
80
+ start a colony.
81
+
82
+ If the global hub isn't installed either:
83
+ npm install -g aether-colony (installs the hub)
84
+ /ant:lay-eggs (sets up this repo)
85
+ /ant:init "your goal" (starts the colony)
86
+ ```
87
+ Stop here. Do not proceed.
88
+
89
+ ### Step 2: Initialize QUEEN.md
90
+
91
+ Run using the Bash tool with description "Initializing QUEEN.md...":
80
92
  ```
81
93
  bash .aether/aether-utils.sh queen-init
82
94
  ```
@@ -85,231 +97,370 @@ Parse the JSON result:
85
97
  - If `created` is true: Display `QUEEN.md initialized`
86
98
  - If `created` is false and `reason` is "already_exists": Display `QUEEN.md already exists`
87
99
 
88
- This step is non-blocking β€” proceed regardless of outcome.
100
+ This step is non-blocking -- proceed regardless of outcome.
89
101
 
90
- ### Step 2: Read Current State with Freshness Check
102
+ ### Step 3: Scan Repository
91
103
 
92
- Capture session start time:
104
+ Run the scan via Bash tool:
93
105
  ```bash
94
- INIT_START=$(date +%s)
106
+ scan_result=$(bash .aether/aether-utils.sh init-research 2>/dev/null)
107
+ scan_data=$(echo "$scan_result" | jq '.result')
95
108
  ```
96
109
 
97
- Use the Read tool to read `.aether/data/COLONY_STATE.json`.
110
+ Extract fields with jq defaults for missing data:
111
+ - `tech_langs`: `.tech_stack.languages | if length > 0 then join(", ") else "not detected" end`
112
+ - `tech_fwks`: `.tech_stack.frameworks | if length > 0 then join(", ") else "none" end`
113
+ - `tech_pkg`: `.tech_stack.package_managers | join(", ")`
114
+ - `complexity`: `.complexity.size`
115
+ - `file_count`: `.complexity.metrics.file_count`
116
+ - `top_dirs`: `.directory_structure.top_level_dirs | if . and length > 0 then join(", ") else "flat" end`
117
+ - `commit_count`: `.git_history.commit_count // "unknown"`
118
+ - `is_git`: `.git_history.is_git_repo // false`
119
+ - `survey_suggestion`: `.survey_status.suggestion.reason // empty`
120
+ - `has_active`: `.prior_colonies.has_active_colony // false`
121
+ - `active_goal`: `.prior_colonies.active_goal // empty`
122
+
123
+ **Intelligence fields (new):**
124
+ - `colony_context_colonies`: `.colony_context.prior_colonies // []` -- array of prior colony summaries (each has goal, phases, outcome, summary)
125
+ - `colony_context_charter`: `.colony_context.existing_charter // {}` -- existing charter content from QUEEN.md
126
+ - `governance_rules`: `.governance.rules // []` -- array of governance rule objects (each has rule, source, strength)
127
+ - `pheromone_suggestions`: `.pheromone_suggestions // []` -- array of suggestion objects (each has type, content, reason, priority)
128
+
129
+ If `scan_result` is empty or `jq` fails, set all fields to fallback values (empty arrays/objects for intelligence fields) and proceed (graceful degradation -- never stop init because scan fails).
130
+
131
+ ### Step 4: Detect Re-Init Mode
132
+
133
+ Use Read tool to check `.aether/data/COLONY_STATE.json`.
134
+
135
+ - If file exists AND has a non-null `goal` field: set `reinit_mode = true`, store `existing_goal`
136
+ - Otherwise: set `reinit_mode = false`
98
137
 
99
- Check freshness of existing state:
138
+ If re-init mode, read existing charter entries from `.aether/QUEEN.md`:
100
139
  ```bash
101
- fresh_check=$(bash .aether/aether-utils.sh session-verify-fresh --command init "" "$INIT_START")
102
- is_stale=$(echo "$fresh_check" | jq -r '.stale | length')
103
- freshness_status=$([[ "$is_stale" -gt 0 ]] && echo "stale" || echo "fresh")
140
+ existing_intent=$(grep '\[charter\] \*\*Intent\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Intent\*\*: //' | sed 's/ (Colony:.*//' || true)
141
+ existing_vision=$(grep '\[charter\] \*\*Vision\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Vision\*\*: //' | sed 's/ (Colony:.*//' || true)
142
+ existing_governance=$(grep '\[charter\] \*\*Governance\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Governance\*\*: //' | sed 's/ (Colony:.*//' || true)
143
+ existing_goals=$(grep '\[charter\] \*\*Goal\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Goal\*\*: //' | sed 's/ (Colony:.*//' || true)
104
144
  ```
105
145
 
106
- If the `goal` field is not null:
107
- - If state is stale (old session): Warn user but proceed
108
- - If state is fresh (active session): Strongly recommend continuation
146
+ Strip `(Colony: ...)` suffixes using sed. If grep finds nothing, variables remain empty.
109
147
 
110
- ```
111
- Colony already initialized with goal: "{existing_goal}"
148
+ ### Step 5: Assemble and Display Approval Prompt
112
149
 
113
- State freshness: {freshness_status}
114
- Session: {session_id}
115
- Initialized: {initialized_at}
150
+ Display a brief header:
151
+ ```
152
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
153
+ A E T H E R C O L O N Y I N I T
154
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
155
+ ```
116
156
 
117
- To reinitialize with a new goal, the current state will be reset.
118
- Proceeding with new goal: "{new_goal}"
157
+ If re-init mode, display:
158
+ ```
159
+ Re-init mode detected (existing goal: "{existing_goal}")
160
+ Charter will be updated. All colony state, wisdom, instincts, and progress will be preserved.
119
161
  ```
120
162
 
121
- **Note:** Init never auto-clears COLONY_STATE.json. Reinitialization is an explicit user choice.
163
+ Then display the approval prompt as formatted Markdown. Section ordering: Prior Context (if any) -> Charter -> Context -> Pheromones.
122
164
 
123
- ### Step 2.6: Load Prior Colony Knowledge (Optional)
165
+ **Section 1: Prior Context (conditional -- only when prior colonies exist)**
124
166
 
125
- Check if `.aether/data/completion-report.md` exists using the Read tool.
167
+ If `colony_context_colonies` has entries (length > 0), display:
168
+ ```markdown
169
+ ## Prior Context
126
170
 
127
- **If the file does NOT exist**, skip to Step 3 β€” this is a fresh colony with no prior history.
171
+ Previous colonies in this repo:
128
172
 
129
- **If the file exists**, read it and extract:
130
- 1. **Instincts** β€” look for the `## Colony Instincts` section. Each line has format: `N. [confidence] domain: description`. Keep only instincts with confidence >= 0.5.
131
- 2. **Learnings** β€” look for the `## Colony Learnings (Validated)` section. Keep all numbered items.
173
+ {For each colony (max 3, most recent first):}
174
+ - **{goal}** -- {outcome} ({phases} phases){if summary is non-empty: ". {summary}"}
175
+ ```
132
176
 
133
- Store the extracted instincts and learnings for use in Step 3 (Write Colony State). Display a brief note:
177
+ Per locked decision: when no prior colonies exist, omit this section entirely. No placeholder, no header.
134
178
 
135
- ```
136
- 🧠 Prior colony knowledge found:
137
- {N} instinct(s) inherited (confidence >= 0.5)
138
- {N} validated learning(s) carried forward
139
- ```
179
+ Keep each colony to 1-2 lines. Show goal, outcome (milestone), phase count, and summary from CROWNED-ANTHILL.md if available.
140
180
 
141
- If no instincts meet the threshold, display:
142
- ```
143
- 🧠 Prior colony knowledge found but no high-confidence instincts to inherit.
144
- ```
181
+ **Section 2: Charter**
182
+ ```markdown
183
+ ## Charter
145
184
 
146
- **Important:** This step is read-only and non-blocking. If the file is malformed or unreadable, skip silently and proceed to Step 3 with empty memory.
147
-
148
- ### Step 3: Write Colony State
149
-
150
- Generate a session ID in the format `session_{unix_timestamp}_{random}` and an ISO-8601 UTC timestamp.
151
-
152
- Use the Write tool to write `.aether/data/COLONY_STATE.json` with the v3.0 structure.
153
-
154
- **If Step 2.6 found instincts to inherit**, convert each into the instinct format and seed the `memory.instincts` array. Each inherited instinct should have:
155
- - `id`: `instinct_inherited_{index}`
156
- - `trigger`: inferred from the instinct description
157
- - `action`: the instinct description
158
- - `confidence`: the original confidence value (from the completion report)
159
- - `domain`: the original domain (from the completion report)
160
- - `source`: `"inherited:completion-report"`
161
- - `evidence`: `["Validated in prior colony session"]`
162
- - `created_at`: current ISO-8601 timestamp
163
- - `last_applied`: null
164
- - `applications`: 0
165
- - `successes`: 0
166
-
167
- **If Step 2.6 found validated learnings**, seed `memory.phase_learnings` with each as:
168
- - `phase`: `"inherited"`
169
- - `learning`: the learning text
170
- - `status`: `"validated"`
171
- - `source`: `"inherited:completion-report"`
172
-
173
- **If Step 2.6 was skipped or found nothing**, use empty arrays as before.
174
-
175
- ```json
176
- {
177
- "version": "3.0",
178
- "goal": "<the user's goal>",
179
- "state": "READY",
180
- "current_phase": 0,
181
- "session_id": "<generated session_id>",
182
- "initialized_at": "<ISO-8601 timestamp>",
183
- "build_started_at": null,
184
- "plan": {
185
- "generated_at": null,
186
- "confidence": null,
187
- "phases": []
188
- },
189
- "memory": {
190
- "phase_learnings": "<inherited learnings or []>",
191
- "decisions": [],
192
- "instincts": "<inherited instincts or []>"
193
- },
194
- "errors": {
195
- "records": [],
196
- "flagged_patterns": []
197
- },
198
- "signals": [],
199
- "graveyards": [],
200
- "events": [
201
- "<ISO-8601 timestamp>|colony_initialized|init|Colony initialized with goal: <the user's goal>"
202
- ]
203
- }
185
+ **Intent:** {user's goal from $ARGUMENTS, or existing_intent if re-init}
186
+ **Vision:** {derived from user's goal by Claude, or existing_vision if re-init}
187
+ **Governance:** {see governance logic below}
188
+ **Goals:** {blank for fresh init, or existing_goals if re-init}
204
189
  ```
205
190
 
206
- ### Step 4: Initialize Constraints
191
+ For fresh init, Claude should derive a brief Vision from the user's goal (1-2 sentences). Goals start blank. The user fills them in if desired.
207
192
 
208
- Write `.aether/data/constraints.json`:
193
+ **Governance field logic:**
194
+ - For fresh init with `governance_rules` available (length > 0): pre-populate with semicolon-separated rule text from the detected rules. Format: `"TDD required; ESLint enforced; Follow CONTRIBUTING.md"`. These are editable by the user.
195
+ - For fresh init with no governance_rules: leave blank.
196
+ - For re-init with existing_governance non-empty: pre-populate from existing QUEEN.md charter entries.
197
+ - For re-init with existing_governance empty but governance_rules available: pre-populate from governance_rules.
209
198
 
210
- ```json
211
- {
212
- "version": "1.0",
213
- "focus": [],
214
- "constraints": []
215
- }
216
- ```
199
+ For re-init, pre-populate Intent, Vision, and Goals from existing QUEEN.md charter entries.
217
200
 
218
- ### Step 5: Initialize Context Document
201
+ **Section 3: Context**
202
+ ```markdown
203
+ ## Context
219
204
 
220
- Run using Bash tool:
205
+ **Tech Stack:** {tech_langs} | {tech_fwks} | {tech_pkg}
206
+ **Project Size:** {complexity} ({file_count} files)
207
+ **Structure:** {top_dirs}
208
+ **Git:** {commit_count} commits
209
+ {if survey_suggestion: **Note:** {survey_suggestion}}
221
210
  ```
222
- bash .aether/aether-utils.sh context-update init "$ARGUMENTS"
211
+
212
+ **Section 4: Pheromones**
213
+
214
+ If `pheromone_suggestions` has entries (length > 0), display:
215
+ ```markdown
216
+ ## Pheromones
217
+
218
+ Suggested signals based on repo analysis:
219
+
220
+ 1. [FOCUS] Testing infrastructure present (47 test files) -- maintain TDD discipline
221
+ 2. [REDIRECT] Environment files detected -- never commit secrets or .env files
222
+ 3. [FOCUS] Code quality tools configured -- follow existing lint/format rules
223
+
224
+ Edit, remove, or add signals as needed. Approved signals will be auto-applied.
223
225
  ```
224
226
 
225
- This creates `.aether/CONTEXT.md` β€” the colony's persistent memory. If context collapses, this file tells the next session what we were doing.
227
+ The numbered list uses the actual type and content from `pheromone_suggestions`. Each line format: `{N}. [{type}] {content}`.
226
228
 
227
- ### Step 6: Validate State File
229
+ Per locked decision: suggestions are fully editable. User can reword, remove, or add their own.
230
+ Per locked decision: all sections look the same -- no visual distinction between auto-generated and user-written content.
228
231
 
229
- Use the Bash tool to run:
232
+ If no pheromone suggestions available (empty array), display the existing default:
233
+ ```markdown
234
+ ## Pheromones
235
+
236
+ No pheromone suggestions yet -- use /ant:focus and /ant:redirect to guide the colony.
230
237
  ```
231
- bash .aether/aether-utils.sh validate-state colony
238
+
239
+ End with clear instructions:
232
240
  ```
241
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
242
+ Review the prompt above. You can:
243
+ - Edit any section (just describe your changes)
244
+ - Say "approve" or "looks good" to proceed
245
+ - Say "cancel" to abort
246
+
247
+ If you don't respond, the colony will not be initialized.
248
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
249
+ ```
250
+
251
+ **STOP HERE.** Wait for the user's response. Do NOT proceed to Step 6 until the user responds.
233
252
 
234
- This validates COLONY_STATE.json structure. If validation fails, output a warning.
253
+ ### Step 6: Handle User Response
235
254
 
236
- ### Step 6.5: Detect Nestmates
255
+ Parse the user's response:
256
+ - If the user approves (says "approve", "looks good", "yes", "ok", or similar): proceed to Step 7
257
+ - If the user provides edits: apply the edits to the relevant section(s), re-display the full prompt, increment a revision counter, and wait again
258
+ - If the user cancels: display "Colony initialization cancelled." and stop
259
+ - Max 2 revision rounds. After 2 rejections/edits, display: "Maximum revisions reached. Approve current version, or cancel init?" and wait for final decision
237
260
 
238
- Run using Bash tool: `node -e "const nl = require('./bin/lib/nestmate-loader'); console.log(JSON.stringify(nl.findNestmates(process.cwd())))"`
261
+ When applying edits, Claude updates the section content in memory (not files) and re-displays the full prompt. Each re-display includes a revision counter: "(Revision {N}/2)"
239
262
 
240
- If nestmates are found:
241
- 1. Display: `Nestmates found: N related colonies`
242
- 2. List each nestmate with name and truncated goal
243
- 3. Check for shared TO-DOs or cross-project dependencies
263
+ ### Step 7: Create Colony (Post-Approval)
244
264
 
245
- ### Step 6.6: Register Repo (Silent)
265
+ Only reached after user approval. ALL file writes happen here.
246
266
 
247
- Attempt to register this repo in the global hub. Both steps are silent on failure β€” registry is not required for the colony to work.
267
+ **If re-init mode:**
248
268
 
249
- Run using the Bash tool (ignore errors):
269
+ 1. Write charter content via:
270
+ ```bash
271
+ bash .aether/aether-utils.sh charter-write --intent "{approved_intent}" --vision "{approved_vision}" --governance "{approved_governance}" --goals "{approved_goals}"
250
272
  ```
251
- bash .aether/aether-utils.sh registry-add "$(pwd)" "$(jq -r '.version // "unknown"' ~/.aether/version.json 2>/dev/null || echo 'unknown')" 2>/dev/null || true
273
+
274
+ 2. Auto-apply approved pheromone suggestions (see pheromone auto-apply below).
275
+
276
+ 3. Optionally update the goal field in COLONY_STATE.json in-place:
277
+ ```bash
278
+ jq --arg new_goal "{approved_intent}" '.goal = $new_goal' .aether/data/COLONY_STATE.json > .aether/data/COLONY_STATE.json.tmp && mv .aether/data/COLONY_STATE.json.tmp .aether/data/COLONY_STATE.json
252
279
  ```
253
280
 
254
- Then attempt to write `.aether/version.json` with the hub version:
281
+ 4. Run `bash .aether/aether-utils.sh session-init "$(jq -r '.session_id' .aether/data/COLONY_STATE.json)" "{approved_intent}"`
282
+
283
+ 5. Skip to Step 8 (display result). Do NOT write COLONY_STATE.json from template, do NOT write constraints.json, do NOT write pheromones.json.
284
+
285
+ **If fresh init:**
286
+
287
+ 1. Initialize QUEEN.md (already done in Step 2)
288
+ 2. Write charter content via charter-write (same command as above)
289
+ 3. Auto-apply approved pheromone suggestions (see pheromone auto-apply below).
290
+ 4. Write COLONY_STATE.json from template:
291
+ - Generate a session ID in the format `session_{unix_timestamp}_{random}` and an ISO-8601 UTC timestamp
292
+ - Resolve template: check `~/.aether/system/templates/colony-state.template.json` first, then `.aether/templates/colony-state.template.json`
293
+ - If no template found: output "Template missing: colony-state.template.json. Run aether update to fix." and stop
294
+ - Read the template file. Follow its `_instructions` field
295
+ - Replace placeholders: `__GOAL__` with approved intent, `__SESSION_ID__` with generated session ID, `__ISO8601_TIMESTAMP__` with current timestamp, `__PHASE_LEARNINGS__` with `[]`, `__INSTINCTS__` with `[]`
296
+ - Remove ALL keys starting with underscore
297
+ - Write the resulting JSON to `.aether/data/COLONY_STATE.json` using the Write tool
298
+
299
+ 5. Write constraints.json from template:
300
+ - Resolve template: check `~/.aether/system/templates/constraints.template.json` first, then `.aether/templates/constraints.template.json`
301
+ - If no template found: output "Template missing: constraints.template.json. Run aether update to fix." and stop
302
+ - Read template, follow `_instructions`, remove `_` prefixed keys, write to `.aether/data/constraints.json`
303
+
304
+ 6. Initialize runtime files from templates (non-blocking):
305
+ ```bash
306
+ for template in pheromones midden learning-observations; do
307
+ if [[ "$template" == "midden" ]]; then
308
+ target=".aether/data/midden/midden.json"
309
+ else
310
+ target=".aether/data/${template}.json"
311
+ fi
312
+ if [[ ! -f "$target" ]]; then
313
+ template_file=""
314
+ for path in ~/.aether/system/templates/${template}.template.json .aether/templates/${template}.template.json; do
315
+ if [[ -f "$path" ]]; then
316
+ template_file="$path"
317
+ break
318
+ fi
319
+ done
320
+ if [[ -n "$template_file" ]]; then
321
+ jq 'with_entries(select(.key | startswith("_") | not))' "$template_file" > "$target" 2>/dev/null || true
322
+ fi
323
+ fi
324
+ done
255
325
  ```
326
+
327
+ 7. Run `bash .aether/aether-utils.sh context-update init "{approved_intent}"`
328
+ 8. Run `bash .aether/aether-utils.sh validate-state colony`
329
+ 9. Register repo (silent on failure):
330
+ ```bash
331
+ domain_tags=$(bash .aether/aether-utils.sh domain-detect 2>/dev/null | jq -r '.result.tags // ""' || echo "")
332
+ bash .aether/aether-utils.sh registry-add "$(pwd)" "$(jq -r '.version // "unknown"' ~/.aether/version.json 2>/dev/null || echo 'unknown')" --goal "{approved_intent}" --active true --tags "$domain_tags" 2>/dev/null || true
256
333
  cp ~/.aether/version.json .aether/version.json 2>/dev/null || true
257
334
  ```
335
+ 10. Seed QUEEN.md from hive (non-blocking):
336
+ ```bash
337
+ domain_tags=$(jq -r --arg repo "$(pwd)" \
338
+ '[.repos[] | select(.path == $repo) | .domain_tags // []] | .[0] // [] | join(",")' \
339
+ "$HOME/.aether/registry.json" 2>/dev/null || echo "")
340
+ seed_args="queen-seed-from-hive --limit 5"
341
+ [[ -n "$domain_tags" ]] && seed_args="$seed_args --domain $domain_tags"
342
+ seed_result=$(bash .aether/aether-utils.sh $seed_args 2>/dev/null || echo '{}')
343
+ seeded_count=$(echo "$seed_result" | jq -r '.result.seeded // 0' 2>/dev/null || echo "0")
344
+ ```
345
+ 11. Run `bash .aether/aether-utils.sh session-init "{session_id}" "{approved_intent}"`
258
346
 
259
- If either command fails, proceed silently. These are optional bookkeeping.
347
+ **Pheromone auto-apply (referenced by both re-init and fresh init paths above):**
260
348
 
261
- ### Step 7: Display Result
349
+ If approved pheromone suggestions exist (the user kept them in the prompt and didn't remove them during the approval loop):
262
350
 
263
- **If visual_mode is true, render final swarm display:**
351
+ For each approved pheromone suggestion, call:
264
352
  ```bash
265
- bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony initialized" "Colony" '{"read":5,"grep":2,"edit":3,"bash":2}' 100 "fungus_garden" 100
266
- bash .aether/aether-utils.sh swarm-display-inline "$init_id"
353
+ bash .aether/aether-utils.sh pheromone-write "{type}" '{content}' --source "system:init" --reason '{reason}' --ttl "30d" 2>/dev/null || true
267
354
  ```
268
355
 
269
- Output this header:
356
+ Implementation notes:
357
+ - Claude (the LLM executing init.md) tracks which pheromones the user kept, edited, or removed during the approval loop (Step 6). Only emit pheromones that survived approval.
358
+ - Use single quotes around pheromone content and reason to avoid shell metacharacter issues (per pitfall 4).
359
+ - Each `pheromone-write` call uses `2>/dev/null || true` to make it non-blocking -- a failed write should never stop colony creation.
360
+ - The `--source "system:init"` tag identifies these as init-derived pheromones.
361
+ - The `--ttl "30d"` gives suggestions a 30-day lifespan (project-level conventions, not phase-specific).
362
+ - `pheromone-write` handles deduplication via content hashing -- if a signal with the same content already exists, it will reinforce rather than duplicate.
363
+
364
+ ### Step 7.5: Import Previous Colony Data (optional)
270
365
 
366
+ Check if previous colony chambers contain importable XML data:
367
+
368
+ ```bash
369
+ # Find most recent chamber with XML files (per D-07)
370
+ latest_chamber=$(ls -d .aether/chambers/20* 2>/dev/null | sort -r | head -1)
371
+ xml_import_available=false
372
+ import_summary=""
373
+
374
+ if [[ -n "$latest_chamber" ]]; then
375
+ xml_count=$(find "$latest_chamber" -maxdepth 1 -name "*.xml" ! -name "colony-archive.xml" 2>/dev/null | wc -l | tr -d ' ')
376
+ if [[ "$xml_count" -gt 0 ]] && command -v xmllint >/dev/null 2>&1; then
377
+ xml_import_available=true
378
+ chamber_name=$(basename "$latest_chamber")
379
+ # Count importable items for display
380
+ signal_count=$(jq '.signals | length' "$latest_chamber/pheromones.json" 2>/dev/null || echo "0")
381
+ import_summary="Found ${signal_count} signal(s) and ${xml_count} XML file(s) from colony '${chamber_name}'"
382
+ fi
383
+ fi
271
384
  ```
272
- πŸŒ±πŸœπŸ†•πŸœπŸŒ± ═══════════════════════════════════════════════════
273
- A E T H E R C O L O N Y
274
- ═══════════════════════════════════════════════════ πŸŒ±πŸœπŸ†•πŸœπŸŒ±
385
+
386
+ **If xml_import_available is true:**
387
+
388
+ Display the import offer (per D-08):
275
389
  ```
390
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
391
+ PREVIOUS COLONY DATA FOUND
392
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
393
+
394
+ {import_summary}
276
395
 
277
- Then output the result:
396
+ Import signals and wisdom from this colony?
397
+ This will add to (not replace) your current colony data.
278
398
 
399
+ Import? (yes/no)
279
400
  ```
280
- πŸ‘‘ Queen has set the colony's intention
281
401
 
282
- "{goal}"
402
+ Use `AskUserQuestion` with yes/no options.
403
+
404
+ **If user selects "yes":**
405
+
406
+ Import ALL available data types (per D-09 -- no cherry-picking):
283
407
 
284
- 🏠 Colony Status: READY
285
- πŸ“‹ Session: <session_id>
408
+ ```bash
409
+ # Import pheromones (per D-09)
410
+ if [[ -f "$latest_chamber/pheromones.xml" ]]; then
411
+ pher_import=$(bash .aether/aether-utils.sh pheromone-import-xml "$latest_chamber/pheromones.xml" "imported" 2>/dev/null || echo '{"ok":false}')
412
+ pher_imported=$(echo "$pher_import" | jq -r '.result.imported // 0' 2>/dev/null || echo "0")
413
+ echo "Pheromones: ${pher_imported} signal(s) imported"
414
+ fi
415
+
416
+ # Import wisdom to queen-wisdom.json (per D-09)
417
+ if [[ -f "$latest_chamber/queen-wisdom.xml" ]]; then
418
+ wis_import=$(bash .aether/aether-utils.sh wisdom-import-xml "$latest_chamber/queen-wisdom.xml" ".aether/data/queen-wisdom.json" 2>/dev/null || echo '{"ok":false}')
419
+ wis_imported=$(echo "$wis_import" | jq -r '.result.imported // 0' 2>/dev/null || echo "0")
420
+ echo "Wisdom: ${wis_imported} entries(s) imported to queen-wisdom.json"
421
+ fi
422
+
423
+ # Import registry lineage (per D-09)
424
+ if [[ -f "$latest_chamber/colony-registry.xml" ]]; then
425
+ reg_import=$(bash .aether/aether-utils.sh registry-import-xml "$latest_chamber/colony-registry.xml" 2>/dev/null || echo '{"ok":false}')
426
+ reg_imported=$(echo "$reg_import" | jq -r '.result.imported // 0' 2>/dev/null || echo "0")
427
+ echo "Registry: ${reg_imported} colon(ies) lineage imported"
428
+ fi
429
+ ```
286
430
 
287
- {If instincts or learnings were inherited from Step 2.6:}
288
- 🧠 Inherited from prior colony:
289
- {N} instinct(s) | {N} learning(s)
290
- {End if}
431
+ All imports are non-blocking -- log warning and continue if any fails.
291
432
 
292
- {If nestmates found in Step 5.5:}
293
- 🏘️ Nest Context: {N} sibling colonies detected
294
- Context from related projects will be automatically considered
295
- during planning and execution.
296
- {End if}
433
+ **If user selects "no":**
297
434
 
298
- 🐜 The colony awaits your command:
435
+ Display "Import skipped. Starting fresh colony." and proceed to Step 8.
299
436
 
300
- /ant:plan πŸ“‹ Generate project plan
301
- /ant:colonize πŸ—ΊοΈ Analyze existing codebase first
302
- /ant:watch πŸ‘οΈ Set up live visibility
437
+ **If xml_import_available is false (no chambers, no XML, or no xmllint):**
303
438
 
304
- πŸ’Ύ State persisted β€” safe to /clear, then run /ant:plan
439
+ Skip silently -- proceed directly to Step 8 without any mention of import (per D-11).
440
+ ### Step 8: Display Result
441
+
442
+ Display the success header and result block:
305
443
 
306
- πŸ“‹ Context document created at `.aether/CONTEXT.md` β€” read this if session resets
307
444
  ```
445
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
446
+ A E T H E R C O L O N Y
447
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
308
448
 
309
- ### Step 8: Initialize Session
449
+ Queen has set the colony's intention
310
450
 
311
- Initialize session tracking to enable `/ant:resume` after context clear:
451
+ "{approved_intent}"
312
452
 
313
- ```bash
314
- bash .aether/aether-utils.sh session-init "$(jq -r '.session_id' .aether/data/COLONY_STATE.json)" "$ARGUMENTS"
453
+ Colony Status: READY
454
+
455
+ {If re-init: " Mode: Re-init (charter updated, state preserved)"}
456
+ {If fresh and seeded_count > 0: " Hive wisdom: {seeded_count} cross-colony pattern(s) seeded into QUEEN.md"}
457
+
458
+ State persisted -- safe to /clear, then run /ant:plan
459
+
460
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
461
+ Next Up
462
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
463
+ /ant:plan Generate execution plan
464
+ /ant:status Check colony state
465
+ /ant:focus Set initial focus
315
466
  ```