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,29 +1,20 @@
1
+ <!-- Generated from .aether/commands/build.yaml - DO NOT EDIT DIRECTLY -->
1
2
  ---
2
3
  name: ant:build
3
4
  description: "πŸ”¨πŸœπŸ—οΈπŸœπŸ”¨ Build a phase with pure emergence - colony self-organizes and completes tasks"
4
5
  ---
5
6
 
6
- You are the **Queen**. You DIRECTLY spawn multiple workers β€” do not delegate to a single Prime Worker.
7
-
8
- The phase to build is: `$ARGUMENTS`
9
-
10
- ## Instructions
11
-
12
- ### Step 0: Version Check (Non-blocking)
13
-
14
- Run using the Bash tool: `bash .aether/aether-utils.sh version-check 2>/dev/null || true`
7
+ ### Step -1: Normalize Arguments
15
8
 
16
- If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
9
+ Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
17
10
 
18
- ### Step 0.6: Verify LiteLLM Proxy
11
+ This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
19
12
 
20
- Check that the LiteLLM proxy is running for model routing:
13
+ You are the **Queen**. You DIRECTLY spawn multiple workers β€” do not delegate to a single Prime Worker.
21
14
 
22
- ```bash
23
- curl -s http://localhost:4000/health | grep -q "healthy" && echo "Proxy healthy" || echo "Proxy not running - workers will use default model"
24
- ```
15
+ The phase to build is: `$normalized_args`
25
16
 
26
- If proxy is not healthy, log a warning but continue (workers will fall back to default routing).
17
+ ## Instructions
27
18
 
28
19
  ### Step 0.5: Load Colony State
29
20
 
@@ -49,41 +40,40 @@ After displaying context, run: `bash .aether/aether-utils.sh unload-state` to re
49
40
 
50
41
  ### Step 1: Validate + Read State
51
42
 
52
- **Parse $ARGUMENTS:**
43
+ **Parse $normalized_args:**
53
44
  1. Extract the phase number (first argument)
54
45
  2. Check remaining arguments for flags:
55
46
  - If contains `--verbose` or `-v`: set `verbose_mode = true`
56
47
  - If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
57
- - If contains `--model <name>` or `-m <name>`: set `cli_model_override = <name>`
48
+ - If contains `--depth <level>`: set `cli_depth_override = <level>`
58
49
  - Otherwise: set `visual_mode = true` (visual is default)
59
50
 
60
51
  If the phase number is empty or not a number:
61
52
 
62
53
  ```
63
- Usage: /ant:build <phase_number> [--verbose|-v] [--no-visual] [--model <model>|-m <model>]
54
+ Usage: /ant:build <phase_number> [--verbose|-v] [--no-visual] [--depth <level>]
64
55
 
65
56
  Options:
66
57
  --verbose, -v Show full completion details (spawn tree, TDD, patterns)
67
58
  --no-visual Disable real-time visual display (visual is on by default)
68
- --model, -m <name> Override model for this build (one-time)
59
+ --depth <level> Set colony depth for this build (light|standard|deep|full)
69
60
 
70
61
  Examples:
71
62
  /ant:build 1 Build Phase 1 (with visual display)
72
63
  /ant:build 1 --verbose Build Phase 1 (full details + visual)
73
64
  /ant:build 1 --no-visual Build Phase 1 without visual display
74
- /ant:build 1 --model glm-5 Build Phase 1 with glm-5 for all workers
65
+ /ant:build 1 --depth deep Build Phase 1 with thorough investigation
75
66
  ```
76
67
 
77
68
  Stop here.
78
69
 
79
- **Validate CLI model override (if provided):**
80
- If `cli_model_override` is set:
81
- 1. Validate the model: `bash .aether/aether-utils.sh model-profile validate "$cli_model_override"`
82
- 2. Parse JSON result - if `.result.valid` is false:
83
- - Display: `Error: Invalid model "$cli_model_override"`
84
- - Display: `Valid models: {list from .result.models}`
70
+ **Set colony depth (if --depth flag provided):**
71
+ If `cli_depth_override` is set:
72
+ 1. Run using Bash tool: `bash .aether/aether-utils.sh colony-depth set "$cli_depth_override"`
73
+ 2. Parse JSON result - if `.ok` is false:
74
+ - Display: `Error: Invalid depth "$cli_depth_override". Use: light, standard, deep, full`
85
75
  - Stop here
86
- 3. If valid: Display `Using override model: {model}`
76
+ 3. If valid: Display `Colony depth: {level}`
87
77
 
88
78
  **Auto-upgrade old state:**
89
79
  If `version` field is missing, "1.0", or "2.0":
@@ -152,8 +142,8 @@ git rev-parse --git-dir 2>/dev/null
152
142
  ```
153
143
 
154
144
  - **If succeeds** (is a git repo):
155
- 1. Check for changes in Aether-managed directories only: `.aether .claude/commands/ant .claude/commands/st .opencode runtime bin`
156
- 2. **If changes exist**: `git stash push -m "aether-checkpoint: pre-phase-$PHASE_NUMBER" -- .aether .claude/commands/ant .claude/commands/st .opencode runtime bin`
145
+ 1. Check for changes in Aether-managed directories only: `.aether .claude/commands/ant .claude/commands/st .opencode bin`
146
+ 2. **If changes exist**: `git stash push -m "aether-checkpoint: pre-phase-$PHASE_NUMBER" -- .aether .claude/commands/ant .claude/commands/st .opencode bin`
157
147
  - IMPORTANT: Never use `--include-untracked` β€” it stashes ALL files including user work!
158
148
  - Verify: `git stash list | head -1 | grep "aether-checkpoint"` β€” warn if empty
159
149
  - Store checkpoint as `{type: "stash", ref: "aether-checkpoint: pre-phase-$PHASE_NUMBER"}`
@@ -175,6 +165,14 @@ Output header:
175
165
  πŸ”„ Rollback: `git stash pop` (stash) or `git reset --hard {ref}` (commit)
176
166
  ```
177
167
 
168
+ Run using the Bash tool with description "Showing phase progress...":
169
+ ```bash
170
+ progress_bar=$(bash .aether/aether-utils.sh generate-progress-bar "$current_phase" "$total_phases" 20 2>/dev/null || echo "")
171
+ if [[ -n "$progress_bar" ]]; then
172
+ echo "[Phase ${current_phase}/${total_phases}] ${progress_bar}"
173
+ fi
174
+ ```
175
+
178
176
  ### Step 4: Load Constraints
179
177
 
180
178
  Read `.aether/data/constraints.json` if it exists.
@@ -222,8 +220,7 @@ bash .aether/aether-utils.sh survey-load "{phase_name}" 2>/dev/null
222
220
 
223
221
  **Display summary:**
224
222
  ```
225
- πŸ—ΊοΈ SURVEY LOADED
226
- ================
223
+ ━━━ πŸ—ΊοΈπŸœ S U R V E Y L O A D E D ━━━
227
224
  {for each doc loaded}
228
225
  {emoji} {filename} β€” {brief description}
229
226
  {/for}
@@ -261,8 +258,7 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
261
258
 
262
259
  **Display summary (if any wisdom exists):**
263
260
  ```
264
- πŸ“œ QUEEN WISDOM LOADED
265
- =====================
261
+ ━━━ πŸ“œπŸœ Q U E E N W I S D O M ━━━
266
262
  {if queen_philosophies:} πŸ“œ Philosophies: yes{/if}
267
263
  {if queen_patterns:} 🧭 Patterns: yes{/if}
268
264
  {if queen_redirects:} ⚠️ Redirects: yes{/if}
@@ -274,6 +270,47 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
274
270
 
275
271
  **Graceful handling:** If QUEEN.md doesn't exist or `queen-read` fails, continue without wisdom injection. Workers will receive standard prompts.
276
272
 
273
+ ### Step 4.1.6: Load Active Pheromones (Signal Consumption)
274
+
275
+ Call `pheromone-read` to extract active colony signals for worker priming:
276
+
277
+ ```bash
278
+ bash .aether/aether-utils.sh pheromone-read 2>/dev/null
279
+ ```
280
+
281
+ **Parse the JSON response:**
282
+ - If `.ok` is false or command fails: Set `pheromone_section = null` and skip pheromone injection
283
+ - If successful: Extract signals from `.result.signals`
284
+
285
+ **Active Signals Section Template (injected into builder prompts):**
286
+ ```
287
+ --- ACTIVE SIGNALS (Pheromone Consumption) ---
288
+ {focus_section if .result.signals.focus exists:}
289
+ 🎯 FOCUS: {focus_description}
290
+ {redirect_section if .result.signals.redirect exists:}
291
+ ⚠️ AVOID: {redirect_description}
292
+ {feedback_section if .result.signals.feedback exists:}
293
+ πŸ’¬ FEEDBACK: {feedback_description}
294
+ --- END SIGNALS ---
295
+ ```
296
+
297
+ **Store for builder injection:**
298
+ - `pheromone_section` β€” formatted signal section for builder prompts
299
+
300
+ **Display summary (if any signals exist):**
301
+ ```
302
+ ━━━ 🦠🐜 P H E R O M O N E S D E T E C T E D ━━━
303
+ {focus_present:} 🎯 Focus signal: yes{/if}
304
+ {redirect_present:} ⚠️ Redirect signal: yes{/if}
305
+ {feedback_present:} πŸ’¬ Feedback signal: yes{/if}
306
+
307
+ {if none exist:} (no active signals){/if}
308
+ ```
309
+
310
+ **Graceful handling:** If pheromone-read fails or no signals exist, continue without pheromone injection.
311
+
312
+ ---
313
+
277
314
  ### Step 4.2: Archaeologist Pre-Build Scan
278
315
 
279
316
  **Conditional step β€” only fires when the phase modifies existing files.**
@@ -294,20 +331,18 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
294
331
  ```bash
295
332
  bash .aether/aether-utils.sh generate-ant-name "archaeologist"
296
333
  bash .aether/aether-utils.sh spawn-log "Queen" "scout" "{archaeologist_name}" "Pre-build archaeology scan"
297
- bash .aether/aether-utils.sh swarm-display-update "{archaeologist_name}" "scout" "excavating" "Pre-build archaeology scan" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 15
298
334
  ```
299
335
 
300
336
  Display:
301
337
  ```
302
- 🏺 Archaeologist {archaeologist_name} spawning
338
+ 🏺🐜 Archaeologist {archaeologist_name} spawning
303
339
  Scanning history of files to be modified...
304
340
  ```
305
341
 
306
- Spawn a Scout (using Task tool with `subagent_type="general-purpose"`) with this prompt:
307
- # NOTE: Claude Code uses aether-archaeologist; OpenCode uses general-purpose with role injection
342
+ Spawn using Task tool with `subagent_type="aether-archaeologist"`, include `description: "🏺 Archaeologist {archaeologist_name}: Pre-build history scan"`:
308
343
 
309
344
  ```
310
- You are {Archaeologist-Name}, a 🏺 Archaeologist Ant.
345
+ You are {Archaeologist-Name}, a 🏺🐜 Archaeologist Ant.
311
346
 
312
347
  Mission: Pre-build archaeology scan
313
348
 
@@ -332,10 +367,9 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
332
367
 
333
368
  **Wait for results** (blocking β€” use TaskOutput with `block: true`).
334
369
 
335
- Log completion and update swarm display:
370
+ Log completion:
336
371
  ```bash
337
372
  bash .aether/aether-utils.sh spawn-complete "{archaeologist_name}" "completed" "Pre-build archaeology scan"
338
- bash .aether/aether-utils.sh swarm-display-update "{archaeologist_name}" "scout" "completed" "Pre-build archaeology scan" "Queen" '{"read":8,"grep":5,"edit":0,"bash":2}' 100 "fungus_garden" 100
339
373
  ```
340
374
 
341
375
  3. **Store and display findings:**
@@ -344,8 +378,7 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
344
378
 
345
379
  Display summary:
346
380
  ```
347
- 🏺 ARCHAEOLOGY CONTEXT
348
- =====================
381
+ ━━━ 🏺🐜 A R C H A E O L O G Y ━━━
349
382
  {summary of findings from archaeologist}
350
383
  ```
351
384
 
@@ -353,34 +386,22 @@ queen_decrees = .result.wisdom.decrees (if .result.priming.has_decrees)
353
386
  The `archaeology_context` will be injected into builder prompts in Step 5.1 (see below).
354
387
  If this step was skipped (no existing files modified), the archaeology section is omitted from builder prompts.
355
388
 
389
+ ---
390
+
356
391
  ### Step 5: Initialize Swarm Display and Analyze Tasks
357
392
 
358
393
  **YOU (the Queen) will spawn workers directly. Do NOT delegate to a single Prime Worker.**
359
394
 
360
- **Initialize visual swarm tracking:**
361
- ```bash
362
- # Generate unique build ID
363
- build_id="build-$(date +%s)"
364
-
365
- # Initialize swarm display for this build
366
- bash .aether/aether-utils.sh swarm-display-init "$build_id"
367
-
368
- # Log phase start
369
- bash .aether/aether-utils.sh activity-log "EXECUTING" "Queen" "Phase {id}: {name} - Queen dispatching workers"
370
-
371
- # Display animated header
372
- bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Phase {id}: {name}" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 10 "fungus_garden" 0
395
+ **Show build header:**
373
396
  ```
374
-
375
- **Show real-time display header:**
397
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
398
+ Phase {id}: {name} β€” {N} waves, {M} tasks
399
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
376
400
  ```
377
- πŸ”¨ COLONY BUILD INITIATED
378
- ═══════════════════════════════════════════════════
379
- Phase {id}: {name}
380
- Build ID: {build_id}
381
401
 
382
- Launching swarm display...
383
- ```
402
+ Where N = number of builder waves (excluding watcher/chaos) and M = total builder tasks.
403
+
404
+ Record `build_started_at_epoch=$(date +%s)` β€” this epoch integer is used by the BUILD SUMMARY block in Step 7 to calculate elapsed time.
384
405
 
385
406
  Analyze the phase tasks:
386
407
 
@@ -392,10 +413,10 @@ Analyze the phase tasks:
392
413
  - **Wave 3+:** Continue until all tasks assigned
393
414
 
394
415
  2. **Assign castes:**
395
- - Implementation tasks β†’ πŸ”¨ Builder
396
- - Research/docs tasks β†’ πŸ” Scout
397
- - Testing/validation β†’ πŸ‘οΈ Watcher (ALWAYS spawn at least one)
398
- - Resilience testing β†’ 🎲 Chaos (ALWAYS spawn one after Watcher)
416
+ - Implementation tasks β†’ πŸ”¨πŸœ Builder
417
+ - Research/docs tasks β†’ πŸ”πŸœ Scout
418
+ - Testing/validation β†’ πŸ‘οΈπŸœ Watcher (ALWAYS spawn at least one)
419
+ - Resilience testing β†’ 🎲🐜 Chaos (ALWAYS spawn one after Watcher)
399
420
 
400
421
  3. **Generate ant names for each worker:**
401
422
  ```bash
@@ -406,47 +427,100 @@ bash .aether/aether-utils.sh generate-ant-name "chaos"
406
427
 
407
428
  Display spawn plan with caste emojis:
408
429
  ```
409
- 🐜 SPAWN PLAN
430
+ ━━━ 🐜 S P A W N P L A N ━━━
410
431
 
411
432
  Wave 1 β€” Parallel
412
- πŸ”¨ {Builder-Name} Task {id} {description}
413
- πŸ”¨ {Builder-Name} Task {id} {description}
433
+ πŸ”¨πŸœ {Builder-Name} Task {id} {description}
434
+ πŸ”¨πŸœ {Builder-Name} Task {id} {description}
414
435
 
415
436
  Wave 2 β€” After Wave 1
416
- πŸ”¨ {Builder-Name} Task {id} {description}
437
+ πŸ”¨πŸœ {Builder-Name} Task {id} {description}
417
438
 
418
439
  Verification
419
- πŸ‘οΈ {Watcher-Name} Verify all work independently
420
- 🎲 {Chaos-Name} Resilience testing (after Watcher)
440
+ πŸ‘οΈπŸœ {Watcher-Name} Verify all work independently
441
+ 🎲🐜 {Chaos-Name} Resilience testing (after Watcher)
421
442
 
422
443
  Total: {N} Builders + 1 Watcher + 1 Chaos = {N+2} spawns
423
444
  ```
424
445
 
425
446
  **Caste Emoji Legend:**
426
- - πŸ”¨ Builder (cyan if color enabled)
427
- - πŸ‘οΈ Watcher (green if color enabled)
428
- - 🎲 Chaos (red if color enabled)
429
- - πŸ” Scout (yellow if color enabled)
430
- - 🏺 Archaeologist (magenta if color enabled)
447
+ - πŸ”¨πŸœ Builder (cyan if color enabled)
448
+ - πŸ‘οΈπŸœ Watcher (green if color enabled)
449
+ - 🎲🐜 Chaos (red if color enabled)
450
+ - πŸ”πŸœ Scout (yellow if color enabled)
451
+ - 🏺🐜 Archaeologist (magenta if color enabled)
431
452
  - πŸ₯š Queen/Prime
432
453
 
433
454
  **Every spawn must show its caste emoji.**
434
455
 
456
+ ### Step 5.0.5: Select and Announce Workflow Pattern
457
+
458
+ Examine the phase name and task descriptions. Select the first matching pattern:
459
+
460
+ | Phase contains | Pattern |
461
+ |----------------|---------|
462
+ | "bug", "fix", "error", "broken", "failing" | Investigate-Fix |
463
+ | "research", "oracle", "explore", "investigate" | Deep Research |
464
+ | "refactor", "restructure", "clean", "reorganize" | Refactor |
465
+ | "security", "audit", "compliance", "accessibility", "license" | Compliance |
466
+ | "docs", "documentation", "readme", "guide" | Documentation Sprint |
467
+ | (default) | SPBV |
468
+
469
+ Display the selected pattern:
470
+ ```
471
+ ━━ Pattern: {pattern_name} ━━
472
+ {announce_line from Queen's Workflow Patterns definition}
473
+ ```
474
+
475
+ Store `selected_pattern` for inclusion in the BUILD SUMMARY (Step 7).
476
+
435
477
  ### Step 5.1: Spawn Wave 1 Workers (Parallel)
436
478
 
437
479
  **CRITICAL: Spawn ALL Wave 1 workers in a SINGLE message using multiple Task tool calls.**
438
480
 
439
- For each Wave 1 task, use Task tool with `subagent_type="general-purpose"` (DO NOT use run_in_background - multiple Task calls in a single message run in parallel and block until complete):
481
+ **CRITICAL: Spawn ALL Wave 1 workers in a SINGLE message using multiple Task tool calls.**
482
+
483
+ **Announce the wave before spawning:**
484
+
485
+ Display the spawn announcement immediately before firing Task calls:
486
+
487
+ For single-caste waves (typical β€” all builders):
488
+ ```
489
+ ──── πŸ”¨πŸœ Spawning {N} Builders in parallel ────
490
+ ```
491
+
492
+ For mixed-caste waves (uncommon):
493
+ ```
494
+ ──── 🐜 Spawning {N} workers ({X} πŸ”¨ Builder, {Y} πŸ” Scout) ────
495
+ ```
496
+
497
+ For a single worker:
498
+ ```
499
+ ──── πŸ”¨πŸœ Spawning {ant_name} β€” {task_summary} ────
500
+ ```
501
+
502
+ **First, mark build start in context:**
503
+ ```bash
504
+ bash .aether/aether-utils.sh context-update build-start {phase_id} {wave_1_worker_count} {wave_1_task_count}
505
+ ```
506
+
507
+ Before dispatching each worker, refresh colony context so new pheromones/memory are visible:
508
+ ```bash
509
+ prime_result=$(bash .aether/aether-utils.sh colony-prime --compact 2>/dev/null)
510
+ ```
511
+ Update `prompt_section` from `prime_result.result.prompt_section`.
512
+
513
+ For each Wave 1 task, use Task tool with `subagent_type="aether-builder"`, include `description: "πŸ”¨ Builder {Ant-Name}: {task_description}"` (DO NOT use run_in_background - multiple Task calls in a single message run in parallel and block until complete):
440
514
 
441
515
  Log each spawn and update swarm display:
442
516
  ```bash
443
517
  bash .aether/aether-utils.sh spawn-log "Queen" "builder" "{ant_name}" "{task_description}"
444
- bash .aether/aether-utils.sh swarm-display-update "{ant_name}" "builder" "excavating" "{task_description}" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 10
518
+ bash .aether/aether-utils.sh context-update worker-spawn "{ant_name}" "builder" "{task_description}"
445
519
  ```
446
520
 
447
521
  **Builder Worker Prompt (CLEAN OUTPUT):**
448
522
  ```
449
- You are {Ant-Name}, a πŸ”¨ Builder Ant.
523
+ You are {Ant-Name}, a πŸ”¨πŸœ Builder Ant.
450
524
 
451
525
  Task {id}: {description}
452
526
 
@@ -454,64 +528,216 @@ Goal: "{colony_goal}"
454
528
 
455
529
  { archaeology_context if exists }
456
530
 
531
+ { queen_wisdom_section if any wisdom exists }
532
+
533
+ { pheromone_section if pheromone_section exists }
534
+
457
535
  Work:
458
536
  1. Read .aether/workers.md for Builder discipline
459
537
  2. Implement task, write tests
460
538
  3. Log activity: bash .aether/aether-utils.sh activity-log "ACTION" "{Ant-Name}" "description"
461
- 4. Update display: bash .aether/aether-utils.sh swarm-display-update "{Ant-Name}" "builder" "excavating" "current task" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' {progress} "fungus_garden" 50
462
539
 
463
540
  Spawn sub-workers ONLY if 3x complexity:
464
- - Check: bash .aether/aether-utils.sh spawn-can-spawn {depth}
541
+ - Check: bash .aether/aether-utils.sh spawn-can-spawn {depth} --enforce
465
542
  - Generate name: bash .aether/aether-utils.sh generate-ant-name "builder"
466
543
  - Announce: "🐜 Spawning {child_name} for {reason}"
467
544
  - Log: bash .aether/aether-utils.sh spawn-log "{Ant-Name}" "builder" "{child_name}" "{task}"
468
545
 
546
+ Count your total tool calls (Read + Grep + Edit + Bash + Write) and report as tool_count.
547
+
469
548
  Return ONLY this JSON (no other text):
470
- {"ant_name": "{Ant-Name}", "task_id": "{id}", "status": "completed|failed|blocked", "summary": "What you did", "files_created": [], "files_modified": [], "tests_written": [], "blockers": []}
549
+ {"ant_name": "{Ant-Name}", "task_id": "{id}", "status": "completed|failed|blocked", "summary": "What you did", "tool_count": 0, "files_created": [], "files_modified": [], "tests_written": [], "blockers": []}
550
+ ```
551
+
552
+ **Queen Wisdom Section Template (injected only if wisdom exists):**
553
+ ```
554
+ --- QUEEN WISDOM (Eternal Guidance) ---
555
+ { if queen_philosophies: }
556
+ πŸ“œ Philosophies:
557
+ {queen_philosophies}
558
+ { endif }
559
+ { if queen_patterns: }
560
+ 🧭 Patterns:
561
+ {queen_patterns}
562
+ { endif }
563
+ { if queen_redirects: }
564
+ ⚠️ Redirects (AVOID these):
565
+ {queen_redirects}
566
+ { endif }
567
+ { if queen_stack_wisdom: }
568
+ πŸ”§ Stack Wisdom:
569
+ {queen_stack_wisdom}
570
+ { endif }
571
+ { if queen_decrees: }
572
+ πŸ›οΈ Decrees:
573
+ {queen_decrees}
574
+ { endif }
575
+ --- END QUEEN WISDOM ---
576
+ ```
577
+
578
+ **Queen Wisdom Section Template (injected only if wisdom exists):**
579
+ ```
580
+ --- QUEEN WISDOM (Eternal Guidance) ---
581
+ { if queen_philosophies: }
582
+ πŸ“œ Philosophies:
583
+ {queen_philosophies}
584
+ { endif }
585
+ { if queen_patterns: }
586
+ 🧭 Patterns:
587
+ {queen_patterns}
588
+ { endif }
589
+ { if queen_redirects: }
590
+ ⚠️ Redirects (AVOID these):
591
+ {queen_redirects}
592
+ { endif }
593
+ { if queen_stack_wisdom: }
594
+ πŸ”§ Stack Wisdom:
595
+ {queen_stack_wisdom}
596
+ { endif }
597
+ { if queen_decrees: }
598
+ πŸ›οΈ Decrees:
599
+ {queen_decrees}
600
+ { endif }
601
+ --- END QUEEN WISDOM ---
602
+ ```
603
+
604
+ **Active Signals Section (injected if pheromones exist):**
605
+ ```
606
+ --- ACTIVE SIGNALS (From User) ---
607
+
608
+ 🎯 PRIORITIES (FOCUS):
609
+ {for each priority}
610
+ - {priority}
611
+ {endfor}
612
+
613
+ ⚠️ CONSTRAINTS (REDIRECT - AVOID):
614
+ {for each constraint}
615
+ - {constraint.content}
616
+ {endfor}
617
+
618
+ --- END ACTIVE SIGNALS ---
471
619
  ```
472
620
 
473
621
  ### Step 5.2: Process Wave 1 Results
474
622
 
475
623
  **Task calls return results directly (no TaskOutput needed).**
476
624
 
477
- **As each worker result arrives, immediately display:**
625
+ Before using any worker payload, validate schema:
626
+ ```bash
627
+ bash .aether/aether-utils.sh validate-worker-response builder '{worker_json}'
628
+ ```
629
+ If validation fails, treat the worker as failed with blocker `invalid_worker_response`.
630
+
631
+ **As each worker result arrives, IMMEDIATELY display a single completion line β€” do not wait for other workers:**
632
+
633
+ For successful workers:
478
634
  ```
479
- βœ… πŸ”¨ {Builder-Name} completed Task {id}
480
- πŸ“–{read_count} πŸ”{grep_count} ✏️{edit_count} ⚑{bash_count} {elapsed_time}
635
+ πŸ”¨ {Ant-Name}: {task_description} ({tool_count} tools) βœ“
481
636
  ```
482
637
 
638
+ For failed workers:
639
+ ```
640
+ πŸ”¨ {Ant-Name}: {task_description} βœ— ({failure_reason} after {tool_count} tools)
641
+ ```
642
+
643
+ Where `tool_count` comes from the worker's returned JSON `tool_count` field, and `failure_reason` is extracted from the first item in the worker's `blockers` array or "unknown error" if empty.
644
+
483
645
  Log and update swarm display:
484
646
  ```bash
485
647
  bash .aether/aether-utils.sh spawn-complete "{ant_name}" "completed" "{summary}"
486
- bash .aether/aether-utils.sh swarm-display-update "{ant_name}" "builder" "completed" "{task_description}" "Queen" '{"read":5,"grep":3,"edit":2,"bash":1}' 100 "fungus_garden" 100
648
+ bash .aether/aether-utils.sh context-update worker-complete "{ant_name}" "completed"
649
+ ```
650
+
651
+ **Check for total wave failure:**
652
+
653
+ After processing all worker results in this wave, check if EVERY worker returned `status: "failed"`. If ALL workers in the wave failed:
654
+
655
+ Display a prominent halt alert:
656
+ ```
657
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
658
+ ⚠ WAVE FAILURE β€” BUILD HALTED
659
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
660
+
661
+ All {N} workers in Wave {X} failed. Something is fundamentally wrong.
662
+
663
+ Failed workers:
664
+ {for each failed worker in this wave:}
665
+ {caste_emoji} {Ant-Name}: {task_description} βœ— ({failure_reason} after {tool_count} tools)
666
+ {end for}
667
+
668
+ Next steps:
669
+ /ant:flags Review blockers
670
+ /ant:swarm Auto-repair mode
487
671
  ```
488
672
 
489
- **Parse each worker's JSON output to collect:** status, files_created, files_modified, blockers
673
+ Then STOP β€” do not proceed to subsequent waves, Watcher, or Chaos. Skip directly to Step 5.9 synthesis with `status: "failed"`.
674
+
675
+ **Partial wave failure β€” escalation path:**
676
+
677
+ If SOME (but not all) workers in the wave failed:
678
+ 1. For each failed worker, attempt Tier 3 escalation: Queen spawns a different caste for the same task
679
+ 2. If Tier 3 succeeds: continue to next wave
680
+ 3. If Tier 3 fails: display the Tier 4 ESCALATION banner (from Queen agent definition):
681
+
682
+ ```
683
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
684
+ ⚠ ESCALATION β€” QUEEN NEEDS YOU
685
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
686
+
687
+ Task: {failed task description}
688
+ Phase: {phase number} β€” {phase name}
689
+
690
+ Tried:
691
+ β€’ Worker retry (2 attempts) β€” {what failed}
692
+ β€’ Parent tried alternate approach β€” {what failed}
693
+ β€’ Queen reassigned to {other caste} β€” {what failed}
694
+
695
+ Options:
696
+ A) {recommended option} β€” RECOMMENDED
697
+ B) {alternate option}
698
+ C) Skip and continue β€” this task will be marked blocked
699
+
700
+ Awaiting your choice.
701
+ ```
490
702
 
491
- **Visual Mode: Render live display (if enabled):**
492
- If `visual_mode` is true, render the swarm display after all workers complete:
703
+ Log escalation as flag:
493
704
  ```bash
494
- bash .aether/aether-utils.sh swarm-display-render "$build_id"
705
+ bash .aether/aether-utils.sh flag-add "blocker" "{task title}" "{failure summary}" "escalation" {phase_number}
495
706
  ```
496
707
 
708
+ If at least one worker succeeded, continue normally to the next wave.
709
+
710
+ **Parse each worker's validated JSON output to collect:** status, files_created, files_modified, blockers
711
+
497
712
  ### Step 5.3: Spawn Wave 2+ Workers (Sequential Waves)
498
713
 
714
+ **Before each subsequent wave, display a wave separator:**
715
+ ```
716
+ ━━━ 🐜 Wave {X} of {N} ━━━
717
+ ```
718
+ Then display the spawn announcement (same format as Step 5.1).
719
+
499
720
  Repeat Step 5.1-5.2 for each subsequent wave, waiting for previous wave to complete.
500
721
 
501
722
  ### Step 5.4: Spawn Watcher for Verification
502
723
 
503
724
  **MANDATORY: Always spawn a Watcher β€” testing must be independent.**
504
725
 
505
- Spawn the Watcher using Task tool with `subagent_type="general-purpose"` (DO NOT use run_in_background - task blocks until complete):
726
+ **Announce the verification wave:**
727
+ ```
728
+ ━━━ πŸ‘οΈπŸœ V E R I F I C A T I O N ━━━
729
+ ──── πŸ‘οΈπŸœ Spawning {watcher_name} β€” Independent verification ────
730
+ ```
731
+
732
+ Spawn the Watcher using Task tool with `subagent_type="aether-watcher"`, include `description: "πŸ‘οΈ Watcher {Watcher-Name}: Independent verification"` (DO NOT use run_in_background - task blocks until complete):
506
733
 
507
734
  ```bash
508
735
  bash .aether/aether-utils.sh spawn-log "Queen" "watcher" "{watcher_name}" "Independent verification"
509
- bash .aether/aether-utils.sh swarm-display-update "{watcher_name}" "watcher" "observing" "Verification in progress" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "nursery" 50
510
736
  ```
511
737
 
512
738
  **Watcher Worker Prompt (CLEAN OUTPUT):**
513
739
  ```
514
- You are {Watcher-Name}, a πŸ‘οΈ Watcher Ant.
740
+ You are {Watcher-Name}, a πŸ‘οΈπŸœ Watcher Ant.
515
741
 
516
742
  Verify all work done by Builders in Phase {id}.
517
743
 
@@ -529,23 +755,37 @@ Spawn sub-workers if needed:
529
755
  - Log: bash .aether/aether-utils.sh spawn-log "{Watcher-Name}" "watcher" "{child}" "{task}"
530
756
  - Announce: "🐜 Spawning {child} to investigate {issue}"
531
757
 
758
+ Count your total tool calls (Read + Grep + Edit + Bash + Write) and report as tool_count.
759
+
532
760
  Return ONLY this JSON:
533
- {"ant_name": "{Watcher-Name}", "verification_passed": true|false, "files_verified": [], "issues_found": [], "quality_score": N, "recommendation": "proceed|fix_required"}
761
+ {"ant_name": "{Watcher-Name}", "verification_passed": true|false, "files_verified": [], "issues_found": [], "quality_score": N, "tool_count": 0, "recommendation": "proceed|fix_required"}
534
762
  ```
535
763
 
536
764
  ### Step 5.5: Process Watcher Results
537
765
 
538
766
  **Task call returns results directly (no TaskOutput needed).**
539
767
 
540
- **Parse the Watcher's JSON response:** verification_passed, issues_found, quality_score, recommendation
768
+ Validate watcher payload first:
769
+ ```bash
770
+ bash .aether/aether-utils.sh validate-worker-response watcher '{watcher_json}'
771
+ ```
772
+
773
+ **Parse the Watcher's validated JSON response:** verification_passed, issues_found, quality_score, recommendation
541
774
 
542
- **Store results for synthesis in Step 5.7**
775
+ **Display Watcher completion line:**
543
776
 
544
- **Update swarm display when Watcher completes:**
545
- ```bash
546
- bash .aether/aether-utils.sh swarm-display-update "{watcher_name}" "watcher" "completed" "Verification complete" "Queen" '{"read":3,"grep":2,"edit":0,"bash":1}' 100 "nursery" 100
777
+ For successful verification:
778
+ ```
779
+ πŸ‘οΈ {Watcher-Name}: Independent verification ({tool_count} tools) βœ“
547
780
  ```
548
781
 
782
+ For failed verification:
783
+ ```
784
+ πŸ‘οΈ {Watcher-Name}: Independent verification βœ— ({issues_found count} issues after {tool_count} tools)
785
+ ```
786
+
787
+ **Store results for synthesis in Step 5.7**
788
+
549
789
  ### Step 5.6: Spawn Chaos Ant for Resilience Testing
550
790
 
551
791
  **After the Watcher completes, spawn a Chaos Ant to probe the phase work for edge cases and boundary conditions.**
@@ -554,7 +794,6 @@ Generate a chaos ant name and log the spawn:
554
794
  ```bash
555
795
  bash .aether/aether-utils.sh generate-ant-name "chaos"
556
796
  bash .aether/aether-utils.sh spawn-log "Queen" "chaos" "{chaos_name}" "Resilience testing of Phase {id} work"
557
- bash .aether/aether-utils.sh swarm-display-update "{chaos_name}" "chaos" "probing" "Resilience testing" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "refuse_pile" 75
558
797
  ```
559
798
 
560
799
  **Retrieve existing flags for this phase** (to avoid duplicate findings):
@@ -563,12 +802,16 @@ bash .aether/aether-utils.sh flag-list --phase {phase_number}
563
802
  ```
564
803
  Parse the result and extract unresolved flag titles into a list: `{existing_flag_titles}` (comma-separated titles from `.result.flags[].title`). If no flags exist, set `{existing_flag_titles}` to "None".
565
804
 
566
- Spawn the Chaos Ant using Task tool with `subagent_type="general-purpose"` (DO NOT use run_in_background - task blocks until complete):
567
- # NOTE: Claude Code uses aether-chaos; OpenCode uses general-purpose with role injection
805
+ **Announce the resilience testing wave:**
806
+ ```
807
+ ──── 🎲🐜 Spawning {chaos_name} β€” resilience testing ────
808
+ ```
809
+
810
+ Spawn the Chaos Ant using Task tool with `subagent_type="aether-chaos"`, include `description: "🎲 Chaos {Chaos-Name}: Resilience testing"` (DO NOT use run_in_background - task blocks until complete):
568
811
 
569
812
  **Chaos Ant Prompt (CLEAN OUTPUT):**
570
813
  ```
571
- You are {Chaos-Name}, a 🎲 Chaos Ant.
814
+ You are {Chaos-Name}, a 🎲🐜 Chaos Ant.
572
815
 
573
816
  Test Phase {id} work for edge cases and boundary conditions.
574
817
 
@@ -582,8 +825,10 @@ Rules:
582
825
  - Read-only (don't modify code)
583
826
  - Focus: edge cases, boundaries, error handling
584
827
 
828
+ Count your total tool calls (Read + Grep + Edit + Bash + Write) and report as tool_count.
829
+
585
830
  Return ONLY this JSON:
586
- {"ant_name": "{Chaos-Name}", "scenarios_tested": 5, "findings": [{"id": 1, "category": "edge_case|boundary|error_handling", "severity": "critical|high|medium|low", "title": "...", "description": "..."}], "overall_resilience": "strong|moderate|weak", "summary": "..."}
831
+ {"ant_name": "{Chaos-Name}", "scenarios_tested": 5, "findings": [{"id": 1, "category": "edge_case|boundary|error_handling", "severity": "critical|high|medium|low", "title": "...", "description": "..."}], "overall_resilience": "strong|moderate|weak", "tool_count": 0, "summary": "..."}
587
832
  ```
588
833
 
589
834
  ### Step 5.7: Process Chaos Ant Results
@@ -592,6 +837,11 @@ Return ONLY this JSON:
592
837
 
593
838
  **Parse the Chaos Ant's JSON response:** findings, overall_resilience, summary
594
839
 
840
+ **Display Chaos completion line:**
841
+ ```
842
+ 🎲 {Chaos-Name}: Resilience testing ({tool_count} tools) βœ“
843
+ ```
844
+
595
845
  **Store results for synthesis in Step 5.9**
596
846
 
597
847
  **Flag critical/high findings:**
@@ -610,7 +860,6 @@ bash .aether/aether-utils.sh activity-log "FLAG" "Chaos" "Created blocker: {find
610
860
  Log chaos ant completion and update swarm display:
611
861
  ```bash
612
862
  bash .aether/aether-utils.sh spawn-complete "{chaos_name}" "completed" "{summary}"
613
- bash .aether/aether-utils.sh swarm-display-update "{chaos_name}" "chaos" "completed" "Resilience testing done" "Queen" '{"read":2,"grep":1,"edit":0,"bash":0}' 100 "refuse_pile" 100
614
863
  ```
615
864
 
616
865
  ### Step 5.8: Create Flags for Verification Failures
@@ -678,36 +927,22 @@ bash .aether/aether-utils.sh activity-log "GRAVE" "Queen" "Grave marker placed a
678
927
 
679
928
  **Error Handoff Update:**
680
929
  If workers failed, update handoff with error context for recovery:
681
- ```bash
682
- cat > .aether/HANDOFF.md << 'HANDOFF_EOF'
683
- # Colony Session β€” Build Errors
684
-
685
- ## ⚠️ Build Status: ISSUES DETECTED
686
- **Phase:** {phase_number} β€” {phase_name}
687
- **Status:** Build completed with failures
688
- **Updated:** $(date -u +%Y-%m-%dT%H:%M:%SZ)
689
930
 
690
- ## Failed Workers
691
- {for each failed worker:}
692
- - {ant_name}: {failure_summary}
693
- {end for}
931
+ Resolve the build error handoff template path:
932
+ Check ~/.aether/system/templates/handoff-build-error.template.md first,
933
+ then .aether/templates/handoff-build-error.template.md.
694
934
 
695
- ## Grave Markers Placed
696
- {for each grave:}
697
- - {file}: {caution_level} caution
698
- {end for}
935
+ If no template found: output "Template missing: handoff-build-error.template.md. Run aether update to fix." and stop.
699
936
 
700
- ## Recovery Options
701
- 1. Review failures: Check `.aether/data/activity.log`
702
- 2. Fix and retry: `/ant:build {phase_number}`
703
- 3. Swarm fix: `/ant:swarm` for auto-repair
704
- 4. Manual fix: Address issues, then `/ant:continue`
937
+ Read the template file. Fill all {{PLACEHOLDER}} values:
938
+ - {{PHASE_NUMBER}} β†’ current phase number
939
+ - {{PHASE_NAME}} β†’ current phase name
940
+ - {{BUILD_TIMESTAMP}} β†’ current ISO-8601 UTC timestamp
941
+ - {{FAILED_WORKERS}} β†’ formatted list of failed workers (one "- {ant_name}: {failure_summary}" per line)
942
+ - {{GRAVE_MARKERS}} β†’ formatted list of grave markers (one "- {file}: {caution_level} caution" per line)
705
943
 
706
- ## Session Note
707
- Build completed but workers failed. Grave markers placed.
708
- Review failures before advancing.
709
- HANDOFF_EOF
710
- ```
944
+ Remove the HTML comment lines at the top of the template.
945
+ Write the result to .aether/HANDOFF.md using the Write tool.
711
946
 
712
947
  Only fires when workers fail. Zero impact on successful builds.
713
948
 
@@ -785,8 +1020,7 @@ Return JSON:
785
1020
  Parse synthesis result. If `ui_touched` is true:
786
1021
 
787
1022
  ```
788
- Visual Checkpoint
789
- =================
1023
+ ━━━ πŸ–ΌοΈπŸœ V I S U A L C H E C K P O I N T ━━━
790
1024
 
791
1025
  UI changes detected. Verify appearance before continuing.
792
1026
 
@@ -832,157 +1066,103 @@ jq -n \
832
1066
  "can_resume": true,
833
1067
  "note": "Phase build completed. Run /ant:continue to advance if verification passed."
834
1068
  }' > .aether/data/last-build-result.json
1069
+ ```
835
1070
 
836
- # Write handoff markdown
837
- cat > .aether/HANDOFF.md << 'HANDOFF_EOF'
838
- # Colony Session β€” Build Complete
839
-
840
- ## Quick Resume
841
- Run `/ant:continue` to advance phase, or `/ant:resume-colony` to restore full context.
842
-
843
- ## State at Build Completion
844
- - Goal: "$(jq -r '.goal' .aether/data/COLONY_STATE.json)"
845
- - Phase: {phase_number} β€” {phase_name}
846
- - Build Status: {synthesis.status}
847
- - Updated: $(date -u +%Y-%m-%dT%H:%M:%SZ)
848
-
849
- ## Build Summary
850
- {summary}
851
-
852
- ## Tasks
853
- - Completed: {synthesis.tasks_completed | length}
854
- - Failed: {synthesis.tasks_failed | length}
1071
+ Resolve the build success handoff template path:
1072
+ Check ~/.aether/system/templates/handoff-build-success.template.md first,
1073
+ then .aether/templates/handoff-build-success.template.md.
855
1074
 
856
- ## Files Changed
857
- - Created: {synthesis.files_created | length} files
858
- - Modified: {synthesis.files_modified | length} files
1075
+ If no template found: output "Template missing: handoff-build-success.template.md. Run aether update to fix." and stop.
859
1076
 
860
- ## Next Steps
861
- - If verification passed: `/ant:continue` to advance to next phase
862
- - If issues found: `/ant:flags` to review blockers
863
- - To pause: `/ant:pause-colony`
1077
+ Read the template file. Fill all {{PLACEHOLDER}} values:
1078
+ - {{GOAL}} β†’ colony goal (from COLONY_STATE.json)
1079
+ - {{PHASE_NUMBER}} β†’ current phase number
1080
+ - {{PHASE_NAME}} β†’ current phase name
1081
+ - {{BUILD_STATUS}} β†’ synthesis.status
1082
+ - {{BUILD_TIMESTAMP}} β†’ current ISO-8601 UTC timestamp
1083
+ - {{BUILD_SUMMARY}} β†’ synthesis summary
1084
+ - {{TASKS_COMPLETED}} β†’ count of completed tasks
1085
+ - {{TASKS_FAILED}} β†’ count of failed tasks
1086
+ - {{FILES_CREATED}} β†’ count of created files
1087
+ - {{FILES_MODIFIED}} β†’ count of modified files
1088
+ - {{SESSION_NOTE}} β†’ "Build succeeded β€” ready to advance." if status is completed, else "Build completed with issues β€” review before continuing."
864
1089
 
865
- ## Session Note
866
- $(if synthesis.status == "completed" then "Build succeeded β€” ready to advance." else "Build completed with issues β€” review before continuing." end)
867
- HANDOFF_EOF
868
- ```
1090
+ Remove the HTML comment lines at the top of the template.
1091
+ Write the result to .aether/HANDOFF.md using the Write tool.
869
1092
 
870
1093
  This ensures the handoff always reflects the latest build state, even if the session crashes before explicit pause.
871
1094
 
872
- ### Step 7: Display Results
1095
+ ### Step 6.6: Update Context Document
873
1096
 
874
- **This step runs ONLY after synthesis is complete. All values come from actual worker results.**
1097
+ Log this build activity to `.aether/CONTEXT.md`:
875
1098
 
876
- **First, render the final swarm display showing all completed workers:**
877
1099
  ```bash
878
- # Final swarm display update - mark Queen as completed
879
- bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Phase {id} complete" "Colony" '{"read":10,"grep":5,"edit":5,"bash":2}' 100 "fungus_garden" 100
880
-
881
- # Render the final swarm display
882
- bash .aether/aether-utils.sh swarm-display-render "$build_id"
1100
+ bash .aether/aether-utils.sh context-update activity "build {phase_id}" "{synthesis.status}" "{files_created_count + files_modified_count}"
883
1101
  ```
884
1102
 
885
- The swarm display will show:
886
- - 🐜 All workers with their caste emojis (πŸ”¨ Builder, πŸ‘οΈ Watcher, 🎲 Chaos)
887
- - πŸ“– Tool usage stats (Read, Grep, Edit, Bash counts)
888
- - 🏠 Chamber activity map (Fungus Garden, Nursery, Refuse Pile)
889
- - βœ… Progress bars at 100% for completed work
890
- - 🌈 Color-coded by caste
891
-
892
- **Then display build summary based on synthesis results AND `verbose_mode` from Step 1:**
893
-
894
- **If verbose_mode = false (compact output, ~12 lines):**
895
-
1103
+ Mark build as complete in context:
1104
+ ```bash
1105
+ bash .aether/aether-utils.sh context-update build-complete "{synthesis.status}" "{synthesis.status == 'completed' ? 'success' : 'failed'}"
896
1106
  ```
897
- πŸ”¨ PHASE {id} {status_icon}
898
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
899
- πŸ“ {name}
900
- πŸ“Š {status} | πŸ“ {files_created count} created, {files_modified count} modified
901
- 🐜 {spawn_count} workers | πŸ§ͺ {tests_total} tests {if all_passing}passing{else}{passed}/{total}{end if}
902
- {if learning.patterns_observed.length > 0:}🧠 +{patterns_observed.length} patterns{end if}
903
1107
 
904
- {if synthesis.status == "failed" OR verification.recommendation == "fix_required":}
905
- ⚠️ BLOCKERS: {first 2 issues, comma-separated}
906
- {end if}
1108
+ Also update safe-to-clear status:
1109
+ - If build completed successfully: `context-update safe-to-clear "YES" "Build complete, ready to continue"`
1110
+ - If build failed: `context-update safe-to-clear "NO" "Build failed β€” run /ant:swarm or /ant:flags"`
907
1111
 
908
- ➑️ Next: {primary_command}
909
- --verbose for spawn tree, TDD details, patterns
910
- ```
1112
+ ### Step 7: Display Results
911
1113
 
912
- **Status icon logic:** completed+proceed = checkmark, blockers = warning, failed = X
1114
+ **This step runs ONLY after synthesis is complete. All values come from actual worker results.**
913
1115
 
914
- **Primary command logic:**
915
- - completed + proceed: `/ant:continue`
916
- - has blockers: `/ant:flags`
917
- - failed: `/ant:swarm`
1116
+ **Display BUILD SUMMARY (always shown, replaces compact/verbose split):**
918
1117
 
919
- **If verbose_mode = true (full output):**
1118
+ Calculate `total_tools` by summing `tool_count` from all worker return JSONs (builders + watcher + chaos).
1119
+ Calculate `elapsed` using `build_started_at_epoch` (epoch integer captured at Step 5 start): `$(( $(date +%s) - build_started_at_epoch ))` formatted as Xm Ys.
920
1120
 
921
1121
  ```
922
- πŸ”¨πŸœπŸ—οΈπŸœπŸ”¨ ═══════════════════════════════════════════════════
923
- P H A S E {id} C O M P L E T E
924
- ═══════════════════════════════════════════════════ πŸ”¨πŸœπŸ—οΈπŸœπŸ”¨
1122
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1123
+ B U I L D S U M M A R Y
1124
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1125
+ Phase {id}: {name}
1126
+ Pattern: {selected_pattern}
925
1127
 
926
- πŸ“ Phase {id}: {name}
927
- πŸ“Š Status: {status}
928
- πŸ’Ύ Git Checkpoint: {commit_hash}
929
-
930
- πŸ“ Summary:
931
- {summary from synthesis}
932
-
933
- 🐜 Colony Work Tree:
934
- πŸ‘‘Queen
935
- {for each spawn in spawn_tree:}
936
- β”œβ”€β”€ {caste_emoji}{ant_name}: {task} [{status}]
937
- {end for}
938
-
939
- βœ… Tasks Completed:
940
- {for each task in tasks_completed:}
941
- 🐜 {task_id}: done
942
- {end for}
943
- {for each task in tasks_failed:}
944
- ❌ {task_id}: failed
945
- {end for}
946
-
947
- πŸ“ Files: {files_created count} created, {files_modified count} modified
948
-
949
- {if tdd.tests_added > 0:}
950
- πŸ§ͺ TDD: {tdd.cycles_completed} cycles | {tdd.tests_added} tests | {tdd.coverage_percent}% coverage
951
- {end if}
1128
+ Workers: {pass_count} passed {fail_count} failed ({total} total)
1129
+ Tools: {total_tools} calls across all workers
1130
+ Duration: {elapsed}
952
1131
 
953
- {if learning.patterns_observed not empty:}
954
- 🧠 Patterns Learned:
955
- {for each pattern in learning.patterns_observed:}
956
- 🐜 {pattern.trigger} β†’ {pattern.action}
957
- {end for}
958
- {end if}
1132
+ {if fail_count > 0:}
1133
+ Failed:
1134
+ {for each failed worker:}
1135
+ {caste_emoji} {Ant-Name}: {task_description} βœ— ({failure_reason} after {tool_count} tools)
1136
+ {end for}
959
1137
 
960
- {if debugging.issues_encountered > 0:}
961
- πŸ”§ Debugging: {debugging.issues_resolved}/{debugging.issues_encountered} resolved
1138
+ Retry: /ant:swarm to auto-repair failed tasks, or /ant:flags to review blockers
962
1139
  {end if}
1140
+ ```
963
1141
 
964
- πŸ€– Model Routing:
965
- {for each spawn in spawn_tree where model_context exists:}
966
- {caste_emoji}{ant_name}: {model_context.assigned} {if model_context.assigned matches caste expectation:}βœ“{else}⚠️{end if}
967
- {end for}
968
- Proxy: {if proxy_healthy:}βœ“ Healthy @ http://localhost:4000{else}βœ— Not running (using default model){end if}
969
-
970
- 🐜 Next Steps:
971
- {if synthesis.status == "completed" AND verification.recommendation == "proceed":}
972
- /ant:continue ➑️ Advance to next phase
973
- /ant:feedback πŸ’¬ Give feedback first
974
- {else if synthesis.status == "failed" OR verification.recommendation == "fix_required":}
975
- ⚠️ BLOCKERS DETECTED - Cannot proceed until resolved
976
- /ant:flags 🚩 View blockers
977
- /ant:swarm πŸ”₯ Auto-fix issues
978
- {end if}
1142
+ **If verbose_mode is true**, additionally show the spawn tree and TDD details after the BUILD SUMMARY block (keep the existing verbose-only sections: Colony Work Tree, Tasks Completed, TDD, Patterns Learned, Debugging, Model Routing). Prepend with:
1143
+ ```
1144
+ ━━ Details (--verbose) ━━
1145
+ ```
979
1146
 
980
- πŸ’Ύ State persisted β€” safe to /clear, then run /ant:continue
1147
+ After displaying the BUILD SUMMARY (and optional verbose details), display Next Steps based on synthesis results:
1148
+ ```bash
1149
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json 2>/dev/null || echo "IDLE")
1150
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json 2>/dev/null || echo "0")
1151
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json 2>/dev/null || echo "0")
1152
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
981
1153
  ```
982
1154
 
983
- **Conditional Next Steps:** The suggestions above are based on actual worker results. If verification failed or blockers exist, `/ant:continue` is NOT suggested.
1155
+ **Routing Note:** The state-based Next Up block above routes based on colony state. If verification failed or blockers exist, review `/ant:flags` before continuing.
984
1156
 
985
1157
  **IMPORTANT:** Build does NOT update task statuses or advance state. Run `/ant:continue` to:
986
1158
  - Mark tasks as completed
987
1159
  - Extract learnings
988
1160
  - Advance to next phase
1161
+
1162
+ ### Step 8: Update Session
1163
+
1164
+ Update the session tracking file to enable `/ant:resume` after context clear:
1165
+
1166
+ ```bash
1167
+ bash .aether/aether-utils.sh session-update "/ant:build {phase_id}" "/ant:continue" "Phase {phase_id} build completed: {synthesis.status}"
1168
+ ```