aether-colony 5.0.0 → 5.2.1

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 (317) hide show
  1. package/.aether/aether-utils.sh +3226 -3345
  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 +442 -0
  30. package/.aether/commands/continue.yaml +1484 -0
  31. package/.aether/commands/council.yaml +509 -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 +502 -0
  44. package/.aether/commands/insert-phase.yaml +102 -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 +1364 -0
  57. package/.aether/commands/preferences.yaml +63 -0
  58. package/.aether/commands/quick.yaml +104 -0
  59. package/.aether/commands/redirect.yaml +123 -0
  60. package/.aether/commands/resume-colony.yaml +375 -0
  61. package/.aether/commands/resume.yaml +407 -0
  62. package/.aether/commands/run.yaml +229 -0
  63. package/.aether/commands/seal.yaml +1214 -0
  64. package/.aether/commands/skill-create.yaml +337 -0
  65. package/.aether/commands/status.yaml +408 -0
  66. package/.aether/commands/swarm.yaml +352 -0
  67. package/.aether/commands/tunnels.yaml +814 -0
  68. package/.aether/commands/update.yaml +131 -0
  69. package/.aether/commands/verify-castes.yaml +159 -0
  70. package/.aether/commands/watch.yaml +454 -0
  71. package/.aether/docs/INCIDENT_TEMPLATE.md +32 -0
  72. package/.aether/docs/QUEEN-SYSTEM.md +11 -11
  73. package/.aether/docs/README.md +32 -2
  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 +1683 -0
  78. package/.aether/docs/command-playbooks/build-prep.md +284 -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 +1725 -0
  84. package/.aether/docs/command-playbooks/continue-gates.md +686 -0
  85. package/.aether/docs/command-playbooks/continue-verify.md +407 -0
  86. package/.aether/docs/context-continuity.md +84 -0
  87. package/.aether/docs/disciplines/DISCIPLINES.md +9 -7
  88. package/.aether/docs/error-codes.md +1 -1
  89. package/.aether/docs/known-issues.md +34 -173
  90. package/.aether/docs/pheromones.md +86 -6
  91. package/.aether/docs/plans/pheromone-display-plan.md +257 -0
  92. package/.aether/docs/queen-commands.md +10 -9
  93. package/.aether/docs/source-of-truth-map.md +132 -0
  94. package/.aether/docs/xml-utilities.md +47 -0
  95. package/.aether/rules/aether-colony.md +23 -13
  96. package/.aether/scripts/incident-test-add.sh +47 -0
  97. package/.aether/scripts/weekly-audit.sh +79 -0
  98. package/.aether/skills/.index.json +649 -0
  99. package/.aether/skills/colony/.manifest.json +16 -0
  100. package/.aether/skills/colony/build-discipline/SKILL.md +78 -0
  101. package/.aether/skills/colony/colony-interaction/SKILL.md +56 -0
  102. package/.aether/skills/colony/colony-lifecycle/SKILL.md +77 -0
  103. package/.aether/skills/colony/colony-visuals/SKILL.md +112 -0
  104. package/.aether/skills/colony/context-management/SKILL.md +80 -0
  105. package/.aether/skills/colony/error-presentation/SKILL.md +99 -0
  106. package/.aether/skills/colony/pheromone-protocol/SKILL.md +79 -0
  107. package/.aether/skills/colony/pheromone-visibility/SKILL.md +81 -0
  108. package/.aether/skills/colony/state-safety/SKILL.md +84 -0
  109. package/.aether/skills/colony/worker-priming/SKILL.md +82 -0
  110. package/.aether/skills/domain/.manifest.json +24 -0
  111. package/.aether/skills/domain/README.md +33 -0
  112. package/.aether/skills/domain/django/SKILL.md +49 -0
  113. package/.aether/skills/domain/docker/SKILL.md +52 -0
  114. package/.aether/skills/domain/golang/SKILL.md +52 -0
  115. package/.aether/skills/domain/graphql/SKILL.md +51 -0
  116. package/.aether/skills/domain/html-css/SKILL.md +48 -0
  117. package/.aether/skills/domain/nextjs/SKILL.md +45 -0
  118. package/.aether/skills/domain/nodejs/SKILL.md +53 -0
  119. package/.aether/skills/domain/postgresql/SKILL.md +53 -0
  120. package/.aether/skills/domain/prisma/SKILL.md +59 -0
  121. package/.aether/skills/domain/python/SKILL.md +50 -0
  122. package/.aether/skills/domain/rails/SKILL.md +52 -0
  123. package/.aether/skills/domain/react/SKILL.md +45 -0
  124. package/.aether/skills/domain/rest-api/SKILL.md +58 -0
  125. package/.aether/skills/domain/svelte/SKILL.md +47 -0
  126. package/.aether/skills/domain/tailwind/SKILL.md +45 -0
  127. package/.aether/skills/domain/testing/SKILL.md +53 -0
  128. package/.aether/skills/domain/typescript/SKILL.md +58 -0
  129. package/.aether/skills/domain/vue/SKILL.md +49 -0
  130. package/.aether/templates/QUEEN.md.template +23 -41
  131. package/.aether/templates/colony-state-reset.jq.template +1 -0
  132. package/.aether/templates/colony-state.template.json +4 -0
  133. package/.aether/templates/learning-observations.template.json +6 -0
  134. package/.aether/templates/midden.template.json +13 -0
  135. package/.aether/templates/pheromones.template.json +6 -0
  136. package/.aether/templates/session.template.json +9 -0
  137. package/.aether/utils/atomic-write.sh +63 -17
  138. package/.aether/utils/chamber-utils.sh +145 -2
  139. package/.aether/utils/council.sh +425 -0
  140. package/.aether/utils/emoji-audit.sh +166 -0
  141. package/.aether/utils/error-handler.sh +21 -7
  142. package/.aether/utils/file-lock.sh +182 -27
  143. package/.aether/utils/flag.sh +278 -0
  144. package/.aether/utils/hive.sh +572 -0
  145. package/.aether/utils/immune.sh +508 -0
  146. package/.aether/utils/learning.sh +1928 -0
  147. package/.aether/utils/midden.sh +520 -0
  148. package/.aether/utils/oracle/oracle.md +168 -0
  149. package/.aether/utils/oracle/oracle.sh +1023 -0
  150. package/.aether/utils/pheromone.sh +2029 -0
  151. package/.aether/utils/queen.sh +1710 -0
  152. package/.aether/utils/scan.sh +860 -0
  153. package/.aether/utils/semantic-cli.sh +10 -8
  154. package/.aether/utils/session.sh +816 -0
  155. package/.aether/utils/skills.sh +509 -0
  156. package/.aether/utils/spawn-tree.sh +103 -271
  157. package/.aether/utils/spawn.sh +260 -0
  158. package/.aether/utils/state-api.sh +389 -0
  159. package/.aether/utils/state-loader.sh +8 -6
  160. package/.aether/utils/suggest.sh +611 -0
  161. package/.aether/utils/swarm-display.sh +10 -1
  162. package/.aether/utils/swarm.sh +1004 -0
  163. package/.aether/utils/watch-spawn-tree.sh +11 -2
  164. package/.aether/utils/xml-compose.sh +2 -2
  165. package/.aether/utils/xml-convert.sh +9 -5
  166. package/.aether/utils/xml-core.sh +5 -9
  167. package/.aether/utils/xml-query.sh +4 -4
  168. package/.aether/workers.md +86 -67
  169. package/.claude/agents/ant/aether-ambassador.md +2 -1
  170. package/.claude/agents/ant/aether-archaeologist.md +6 -1
  171. package/.claude/agents/ant/aether-architect.md +236 -0
  172. package/.claude/agents/ant/aether-auditor.md +6 -1
  173. package/.claude/agents/ant/aether-builder.md +38 -1
  174. package/.claude/agents/ant/aether-chaos.md +2 -1
  175. package/.claude/agents/ant/aether-chronicler.md +1 -0
  176. package/.claude/agents/ant/aether-gatekeeper.md +6 -1
  177. package/.claude/agents/ant/aether-includer.md +1 -0
  178. package/.claude/agents/ant/aether-keeper.md +1 -0
  179. package/.claude/agents/ant/aether-measurer.md +6 -1
  180. package/.claude/agents/ant/aether-oracle.md +237 -0
  181. package/.claude/agents/ant/aether-probe.md +2 -1
  182. package/.claude/agents/ant/aether-queen.md +6 -1
  183. package/.claude/agents/ant/aether-route-setter.md +6 -1
  184. package/.claude/agents/ant/aether-sage.md +68 -3
  185. package/.claude/agents/ant/aether-scout.md +38 -1
  186. package/.claude/agents/ant/aether-surveyor-disciplines.md +2 -1
  187. package/.claude/agents/ant/aether-surveyor-nest.md +2 -1
  188. package/.claude/agents/ant/aether-surveyor-pathogens.md +2 -1
  189. package/.claude/agents/ant/aether-surveyor-provisions.md +2 -1
  190. package/.claude/agents/ant/aether-tracker.md +6 -1
  191. package/.claude/agents/ant/aether-watcher.md +37 -1
  192. package/.claude/agents/ant/aether-weaver.md +2 -1
  193. package/.claude/commands/ant/archaeology.md +1 -8
  194. package/.claude/commands/ant/build.md +43 -1159
  195. package/.claude/commands/ant/chaos.md +1 -14
  196. package/.claude/commands/ant/colonize.md +3 -14
  197. package/.claude/commands/ant/continue.md +40 -1026
  198. package/.claude/commands/ant/council.md +213 -15
  199. package/.claude/commands/ant/data-clean.md +81 -0
  200. package/.claude/commands/ant/dream.md +12 -9
  201. package/.claude/commands/ant/entomb.md +62 -87
  202. package/.claude/commands/ant/export-signals.md +57 -0
  203. package/.claude/commands/ant/feedback.md +18 -0
  204. package/.claude/commands/ant/flag.md +12 -0
  205. package/.claude/commands/ant/flags.md +22 -8
  206. package/.claude/commands/ant/focus.md +18 -0
  207. package/.claude/commands/ant/help.md +40 -8
  208. package/.claude/commands/ant/history.md +3 -0
  209. package/.claude/commands/ant/import-signals.md +71 -0
  210. package/.claude/commands/ant/init.md +349 -191
  211. package/.claude/commands/ant/insert-phase.md +105 -0
  212. package/.claude/commands/ant/interpret.md +11 -0
  213. package/.claude/commands/ant/lay-eggs.md +167 -158
  214. package/.claude/commands/ant/maturity.md +22 -11
  215. package/.claude/commands/ant/memory-details.md +77 -0
  216. package/.claude/commands/ant/migrate-state.md +6 -0
  217. package/.claude/commands/ant/oracle.md +317 -62
  218. package/.claude/commands/ant/organize.md +10 -5
  219. package/.claude/commands/ant/patrol.md +620 -0
  220. package/.claude/commands/ant/pause-colony.md +8 -22
  221. package/.claude/commands/ant/phase.md +26 -37
  222. package/.claude/commands/ant/pheromones.md +156 -0
  223. package/.claude/commands/ant/plan.md +199 -50
  224. package/.claude/commands/ant/preferences.md +65 -0
  225. package/.claude/commands/ant/quick.md +100 -0
  226. package/.claude/commands/ant/redirect.md +18 -0
  227. package/.claude/commands/ant/resume-colony.md +37 -22
  228. package/.claude/commands/ant/resume.md +60 -7
  229. package/.claude/commands/ant/run.md +231 -0
  230. package/.claude/commands/ant/seal.md +506 -78
  231. package/.claude/commands/ant/skill-create.md +286 -0
  232. package/.claude/commands/ant/status.md +171 -1
  233. package/.claude/commands/ant/swarm.md +11 -23
  234. package/.claude/commands/ant/tunnels.md +1 -0
  235. package/.claude/commands/ant/update.md +58 -135
  236. package/.claude/commands/ant/verify-castes.md +90 -42
  237. package/.claude/commands/ant/watch.md +1 -0
  238. package/.opencode/agents/aether-ambassador.md +1 -1
  239. package/.opencode/agents/aether-architect.md +133 -0
  240. package/.opencode/agents/aether-builder.md +3 -3
  241. package/.opencode/agents/aether-oracle.md +137 -0
  242. package/.opencode/agents/aether-queen.md +1 -1
  243. package/.opencode/agents/aether-route-setter.md +1 -1
  244. package/.opencode/agents/aether-scout.md +1 -1
  245. package/.opencode/agents/aether-surveyor-disciplines.md +6 -1
  246. package/.opencode/agents/aether-surveyor-nest.md +6 -1
  247. package/.opencode/agents/aether-surveyor-pathogens.md +6 -1
  248. package/.opencode/agents/aether-surveyor-provisions.md +6 -1
  249. package/.opencode/agents/aether-tracker.md +1 -1
  250. package/.opencode/agents/aether-watcher.md +1 -1
  251. package/.opencode/agents/aether-weaver.md +1 -1
  252. package/.opencode/commands/ant/archaeology.md +7 -14
  253. package/.opencode/commands/ant/build.md +54 -88
  254. package/.opencode/commands/ant/chaos.md +7 -24
  255. package/.opencode/commands/ant/colonize.md +10 -17
  256. package/.opencode/commands/ant/continue.md +595 -66
  257. package/.opencode/commands/ant/council.md +150 -18
  258. package/.opencode/commands/ant/data-clean.md +77 -0
  259. package/.opencode/commands/ant/dream.md +15 -17
  260. package/.opencode/commands/ant/entomb.md +28 -18
  261. package/.opencode/commands/ant/export-signals.md +54 -0
  262. package/.opencode/commands/ant/feedback.md +24 -5
  263. package/.opencode/commands/ant/flag.md +16 -4
  264. package/.opencode/commands/ant/flags.md +24 -10
  265. package/.opencode/commands/ant/focus.md +22 -5
  266. package/.opencode/commands/ant/help.md +41 -8
  267. package/.opencode/commands/ant/history.md +9 -0
  268. package/.opencode/commands/ant/import-signals.md +68 -0
  269. package/.opencode/commands/ant/init.md +396 -154
  270. package/.opencode/commands/ant/insert-phase.md +111 -0
  271. package/.opencode/commands/ant/interpret.md +16 -0
  272. package/.opencode/commands/ant/lay-eggs.md +184 -112
  273. package/.opencode/commands/ant/maturity.md +18 -2
  274. package/.opencode/commands/ant/memory-details.md +83 -0
  275. package/.opencode/commands/ant/migrate-state.md +12 -0
  276. package/.opencode/commands/ant/oracle.md +322 -67
  277. package/.opencode/commands/ant/organize.md +14 -12
  278. package/.opencode/commands/ant/patrol.md +626 -0
  279. package/.opencode/commands/ant/pause-colony.md +12 -29
  280. package/.opencode/commands/ant/phase.md +30 -40
  281. package/.opencode/commands/ant/pheromones.md +162 -0
  282. package/.opencode/commands/ant/plan.md +210 -57
  283. package/.opencode/commands/ant/preferences.md +71 -0
  284. package/.opencode/commands/ant/quick.md +91 -0
  285. package/.opencode/commands/ant/redirect.md +22 -5
  286. package/.opencode/commands/ant/resume-colony.md +41 -29
  287. package/.opencode/commands/ant/resume.md +80 -20
  288. package/.opencode/commands/ant/run.md +237 -0
  289. package/.opencode/commands/ant/seal.md +230 -25
  290. package/.opencode/commands/ant/skill-create.md +63 -0
  291. package/.opencode/commands/ant/status.md +125 -30
  292. package/.opencode/commands/ant/swarm.md +3 -345
  293. package/.opencode/commands/ant/tunnels.md +3 -9
  294. package/.opencode/commands/ant/update.md +63 -127
  295. package/.opencode/commands/ant/verify-castes.md +96 -42
  296. package/.opencode/commands/ant/watch.md +7 -0
  297. package/CHANGELOG.md +368 -1
  298. package/README.md +195 -324
  299. package/bin/cli.js +236 -429
  300. package/bin/generate-commands.js +186 -0
  301. package/bin/generate-commands.sh +128 -89
  302. package/bin/lib/spawn-logger.js +0 -15
  303. package/bin/lib/update-transaction.js +285 -35
  304. package/bin/npx-install.js +178 -0
  305. package/bin/validate-package.sh +85 -3
  306. package/package.json +16 -4
  307. package/.aether/CONTEXT.md +0 -160
  308. package/.aether/docs/QUEEN.md +0 -84
  309. package/.aether/exchange/colony-registry.xml +0 -11
  310. package/.aether/exchange/pheromones.xml +0 -87
  311. package/.aether/exchange/queen-wisdom.xml +0 -14
  312. package/.aether/model-profiles.yaml +0 -100
  313. package/.aether/utils/spawn-with-model.sh +0 -56
  314. package/bin/lib/model-profiles.js +0 -445
  315. package/bin/lib/model-verify.js +0 -288
  316. package/bin/lib/proxy-health.js +0 -253
  317. package/bin/lib/telemetry.js +0 -441
@@ -0,0 +1,620 @@
1
+ <!-- Generated from .aether/commands/patrol.yaml - DO NOT EDIT DIRECTLY -->
2
+ ---
3
+ name: ant:patrol
4
+ description: "🐜🔦 Patrol the colony — comprehensive pre-seal review of all work against the plan"
5
+ ---
6
+
7
+
8
+ You are the **Queen**. Send patrol ants through the colony before sealing.
9
+
10
+
11
+
12
+ ## Instructions
13
+
14
+ Parse `$ARGUMENTS`:
15
+ - If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
16
+ - Otherwise: set `visual_mode = true`
17
+
18
+ <failure_modes>
19
+ ### State Read Failure
20
+ If COLONY_STATE.json is missing or unreadable:
21
+ - Report: "No colony initialized. Run /ant:init first."
22
+ - Stop immediately.
23
+
24
+ ### Test Command Failure
25
+ If npm test or bash test suites fail to run:
26
+ - Record the failure in the report as "Tests: UNABLE TO RUN"
27
+ - Continue with remaining audit steps (non-blocking)
28
+
29
+ ### Subagent Spawn Failure
30
+ If a scout or watcher agent fails to spawn:
31
+ - Fall back to running the verification inline (Queen does it directly)
32
+ - Note the fallback in the report
33
+ </failure_modes>
34
+
35
+ <success_criteria>
36
+ Command is complete when:
37
+ - All 8 audit steps have been executed
38
+ - completion-report.md is written to .aether/data/
39
+ - User sees formatted audit results with pass/fail indicators
40
+ - No files were modified except completion-report.md
41
+ </success_criteria>
42
+
43
+ <read_only>
44
+ Do not touch during audit (except completion-report.md):
45
+ - .aether/dreams/ (user notes)
46
+ - .aether/chambers/ (archived colonies)
47
+ - Source code files
48
+ - .env* files
49
+ - .claude/settings.json
50
+ - COLONY_STATE.json (read-only during audit)
51
+ - CLAUDE.md (read-only during audit)
52
+ </read_only>
53
+
54
+ ### Step 1: Load Colony State
55
+
56
+ Read these files in parallel using the Read tool:
57
+ - `.aether/data/COLONY_STATE.json`
58
+ - `CLAUDE.md`
59
+
60
+ If `COLONY_STATE.json` is missing or `goal: null`:
61
+ ```
62
+ No colony initialized. Run /ant:init first.
63
+ ```
64
+ Stop here.
65
+
66
+ Extract from COLONY_STATE.json:
67
+ - `goal` — colony objective
68
+ - `state` — current state (IDLE, READY, EXECUTING, PLANNING)
69
+ - `current_phase` — active phase number
70
+ - `plan.phases` — all phases with tasks and statuses
71
+ - `memory.instincts` — learned patterns
72
+ - `memory.phase_learnings` — phase-specific learnings
73
+ - `memory.decisions` — recorded decisions
74
+ - `events` — event log
75
+ - `milestone` — current milestone
76
+ - `initialized_at` — colony start time
77
+ - `version` — state version
78
+
79
+ Display audit header:
80
+ ```
81
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
82
+ C O L O N Y A U D I T
83
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
84
+
85
+ Goal: {goal}
86
+ Milestone: {milestone}
87
+ State: {state}
88
+ Auditing...
89
+ ```
90
+
91
+ Initialize tracking variables:
92
+ - `audit_issues = []` — list of issues found
93
+ - `audit_passes = 0` — count of checks that passed
94
+ - `audit_fails = 0` — count of checks that failed
95
+ - `audit_warnings = 0` — count of warnings
96
+
97
+ ### Step 2: Plan vs Reality Verification
98
+
99
+ Display: `Verifying plan against codebase...`
100
+
101
+ For each phase in `plan.phases`:
102
+
103
+ 1. **Check phase status:** Record whether status is "completed", "in_progress", or "pending"
104
+
105
+ 2. **Verify task evidence:** For each task in the phase:
106
+ - Parse the task description for verifiable claims:
107
+ - If description mentions "create" or "add" a file: use Glob to check the file exists
108
+ - If description mentions "subcommand" or "command": use Grep to search for it in the codebase
109
+ - If description mentions "update" or "modify" a file: use Glob to check the file exists
110
+ - If description mentions "test": use Glob to check test files exist
111
+ - Classify each task as:
112
+ - **VERIFIED** — evidence found in codebase
113
+ - **UNVERIFIABLE** — task description too vague to verify programmatically
114
+ - **MISSING** — task claims to create/modify something that doesn't exist
115
+
116
+ 3. **Compile results:**
117
+ ```
118
+ Phase {N}: {name} [{status}]
119
+ Tasks: {verified} verified | {unverifiable} unverifiable | {missing} missing evidence
120
+ {For each MISSING task: " MISSING: {task description}"}
121
+ ```
122
+
123
+ Track totals:
124
+ - `total_tasks`, `verified_tasks`, `unverifiable_tasks`, `missing_tasks`
125
+
126
+ If `missing_tasks > 0`: increment `audit_fails` and add to `audit_issues`
127
+ Otherwise: increment `audit_passes`
128
+
129
+ ### Step 3: Documentation Accuracy Audit
130
+
131
+ Display: `Auditing documentation accuracy...`
132
+
133
+ Spawn a **Watcher** using Task tool with `subagent_type="aether-watcher"`:
134
+
135
+ ```xml
136
+ <task>
137
+ <description>Documentation accuracy audit for colony pre-seal review</description>
138
+ <prompt>
139
+ You are a Watcher Ant performing a documentation accuracy audit.
140
+
141
+ Mission: Verify that key documentation files accurately reflect the current codebase state.
142
+
143
+ **IMPORTANT:** You are strictly read-only. Do not modify any files.
144
+
145
+ ## Checks to Perform
146
+
147
+ ### 1. Command Count Verification
148
+ - Count files in .claude/commands/ant/ (use Glob: .claude/commands/ant/*.md)
149
+ - Count files in .opencode/commands/ant/ (use Glob: .opencode/commands/ant/*.md)
150
+ - Read CLAUDE.md and find the claimed command count (look for "Slash commands" in Quick Reference table)
151
+ - Compare: do counts match claimed numbers?
152
+
153
+ ### 2. Agent Count Verification
154
+ - Count files in .claude/agents/ant/ (use Glob: .claude/agents/ant/*.md)
155
+ - Read CLAUDE.md and find the claimed agent count (look for "Agent definitions" in Quick Reference)
156
+ - Compare: do counts match?
157
+
158
+ ### 3. Version Consistency
159
+ - Read version from CLAUDE.md (look for "Current Version" in Quick Reference)
160
+ - Read version from package.json (if exists)
161
+ - Read version from .aether/docs/source-of-truth-map.md (if exists)
162
+ - Compare: are all versions consistent?
163
+
164
+ ### 4. Colony Rules Verification
165
+ - Read .claude/rules/aether-colony.md
166
+ - Check the "Available Commands" table — does it list all commands that exist in .claude/commands/ant/?
167
+ - Identify any commands that exist as files but are missing from the table
168
+ - Identify any commands listed in the table but missing as files
169
+
170
+ ### 5. Source of Truth Map Spot-Check
171
+ - Read .aether/docs/source-of-truth-map.md (if exists)
172
+ - Pick 3-5 entries and verify the claimed paths exist
173
+ - Report any broken references
174
+
175
+ ## Output
176
+
177
+ Return ONLY this JSON (no other text):
178
+ {
179
+ "ant_name": "audit-watcher",
180
+ "caste": "watcher",
181
+ "status": "completed",
182
+ "summary": "Documentation accuracy audit results",
183
+ "checks": [
184
+ {
185
+ "name": "command_count",
186
+ "status": "PASS|FAIL|WARN",
187
+ "expected": "value from docs",
188
+ "actual": "value from codebase",
189
+ "detail": "explanation"
190
+ },
191
+ {
192
+ "name": "agent_count",
193
+ "status": "PASS|FAIL|WARN",
194
+ "expected": "value from docs",
195
+ "actual": "value from codebase",
196
+ "detail": "explanation"
197
+ },
198
+ {
199
+ "name": "version_consistency",
200
+ "status": "PASS|FAIL|WARN",
201
+ "expected": "all same",
202
+ "actual": "list of versions found",
203
+ "detail": "explanation"
204
+ },
205
+ {
206
+ "name": "colony_rules_commands",
207
+ "status": "PASS|FAIL|WARN",
208
+ "expected": "all commands listed",
209
+ "actual": "missing or extra commands",
210
+ "detail": "explanation"
211
+ },
212
+ {
213
+ "name": "source_of_truth_map",
214
+ "status": "PASS|FAIL|WARN",
215
+ "expected": "all paths valid",
216
+ "actual": "broken paths if any",
217
+ "detail": "explanation"
218
+ }
219
+ ],
220
+ "accuracy_score": 0,
221
+ "blockers": []
222
+ }
223
+ </prompt>
224
+ </task>
225
+ ```
226
+
227
+ **FALLBACK:** If "Agent type not found", use general-purpose agent and inject role: "You are a Watcher Ant - quality specialist that validates accuracy and consistency."
228
+
229
+ **Parse Watcher output:**
230
+ Extract `checks` array and `accuracy_score`.
231
+
232
+ For each check:
233
+ - If `status == "PASS"`: increment `audit_passes`
234
+ - If `status == "FAIL"`: increment `audit_fails`, add to `audit_issues`
235
+ - If `status == "WARN"`: increment `audit_warnings`, add to `audit_issues`
236
+
237
+ Display:
238
+ ```
239
+ Documentation Accuracy:
240
+ {For each check: "[PASS|FAIL|WARN] {name}: {detail}"}
241
+ Score: {accuracy_score}%
242
+ ```
243
+
244
+ ### Step 4: Unresolved Issues Review
245
+
246
+ Display: `Reviewing unresolved issues...`
247
+
248
+ Run these commands in parallel using the Bash tool:
249
+
250
+ **Flags check:**
251
+ ```bash
252
+ bash .aether/aether-utils.sh flag-list 2>/dev/null || echo '{"result":{"flags":[]}}'
253
+ ```
254
+
255
+ **Midden check:**
256
+ ```bash
257
+ bash .aether/aether-utils.sh midden-recent-failures 2>/dev/null || echo '{"result":{"failures":[]}}'
258
+ ```
259
+
260
+ **Parse flag results:**
261
+ - Count unresolved flags by severity (blocker, high, medium, low)
262
+ - List any unresolved blockers with their titles
263
+
264
+ **Parse midden results:**
265
+ - Look for recurring patterns (same error type appearing 3+ times)
266
+ - List recurring failure patterns
267
+
268
+ Display:
269
+ ```
270
+ Unresolved Issues:
271
+ Flags: {blocker_count} blockers | {high_count} high | {medium_count} medium | {low_count} low
272
+ {For each unresolved blocker: " BLOCKER: {title}"}
273
+ Midden: {failure_count} recent failures | {recurring_count} recurring patterns
274
+ {For each recurring pattern: " RECURRING: {pattern}"}
275
+ ```
276
+
277
+ If `blocker_count > 0`: increment `audit_fails`, add blockers to `audit_issues`
278
+ If `recurring_count > 0`: increment `audit_warnings`, add to `audit_issues`
279
+ Otherwise: increment `audit_passes`
280
+
281
+ ### Step 5: Test Coverage Summary
282
+
283
+ Display: `Checking test coverage...`
284
+
285
+
286
+ **Count test files created during colony lifetime:**
287
+
288
+
289
+
290
+ Run using the Bash tool:
291
+ ```bash
292
+ # Count test files
293
+ test_count_unit=$(ls -1 tests/unit/*.test.sh 2>/dev/null | wc -l | tr -d ' ')
294
+ test_count_e2e=$(ls -1 tests/e2e/*.test.sh 2>/dev/null | wc -l | tr -d ' ')
295
+ test_count_js=$(find . -name "*.test.js" -o -name "*.test.ts" -o -name "*.spec.js" -o -name "*.spec.ts" 2>/dev/null | wc -l | tr -d ' ')
296
+ echo "unit=$test_count_unit"
297
+ echo "e2e=$test_count_e2e"
298
+ echo "js=$test_count_js"
299
+ echo "total=$((test_count_unit + test_count_e2e + test_count_js))"
300
+ ```
301
+
302
+ **Run test suites (capture counts, do not block on failure):**
303
+
304
+ Run using the Bash tool (with timeout 120000):
305
+ ```bash
306
+ npm test 2>&1 | tail -20
307
+ ```
308
+
309
+ Parse output for pass/fail counts. If command fails, record as "UNABLE TO RUN".
310
+
311
+ Run bash test suites if they exist:
312
+ ```bash
313
+ if [[ -f "tests/e2e/run-all-e2e.sh" ]]; then
314
+ bash tests/e2e/run-all-e2e.sh 2>&1 | tail -10
315
+ fi
316
+ ```
317
+
318
+ Display:
319
+ ```
320
+ Test Coverage:
321
+ Test files: {unit} unit | {e2e} e2e | {js} JS/TS
322
+ Results: {pass_count} passing | {fail_count} failing
323
+ {If any failing: " FAILING: {list of failing test names}"}
324
+ ```
325
+
326
+ If tests all pass: increment `audit_passes`
327
+ If any fail: increment `audit_fails`, add to `audit_issues`
328
+
329
+ ### Step 6: Colony Health Check
330
+
331
+ Display: `Checking colony health...`
332
+
333
+ **Expire stale pheromones:**
334
+ ```bash
335
+ bash .aether/aether-utils.sh pheromone-expire 2>/dev/null || true
336
+ ```
337
+
338
+ **Load memory metrics:**
339
+ ```bash
340
+ bash .aether/aether-utils.sh memory-metrics 2>/dev/null || echo '{}'
341
+ ```
342
+
343
+ **Load instincts:**
344
+ From COLONY_STATE.json `memory.instincts`:
345
+ - Count total instincts
346
+ - Count high-confidence instincts (>= 0.7)
347
+
348
+ **Count learnings:**
349
+ From COLONY_STATE.json `memory.phase_learnings`:
350
+ - Count total learnings
351
+
352
+ **Check event log for anomalies:**
353
+ From COLONY_STATE.json `events`:
354
+ - Count total events
355
+ - Look for error events (events containing "error" or "failed")
356
+ - Look for state corruption events
357
+
358
+ **Count pheromone signals:**
359
+ ```bash
360
+ bash .aether/aether-utils.sh pheromone-count 2>/dev/null || echo '{"result":{"count":0}}'
361
+ ```
362
+
363
+ Display:
364
+ ```
365
+ Colony Health:
366
+ Instincts: {total} ({high_confidence} strong)
367
+ Learnings: {learning_count}
368
+ Pheromones: {signal_count} active
369
+ Events: {event_count} total ({error_event_count} errors)
370
+ {If error_event_count > 0: " WARNING: {error_event_count} error events in log"}
371
+ ```
372
+
373
+ Increment `audit_passes` (health check is informational, not pass/fail)
374
+
375
+ ### Step 7: Generate Completion Report
376
+
377
+ Calculate colony age:
378
+ ```bash
379
+ initialized_at=$(jq -r '.initialized_at // empty' .aether/data/COLONY_STATE.json)
380
+ if [[ -n "$initialized_at" ]]; then
381
+ init_epoch=$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "$initialized_at" +%s 2>/dev/null || echo 0)
382
+ now_epoch=$(date +%s)
383
+ if [[ "$init_epoch" -gt 0 ]]; then
384
+ colony_age_days=$(( (now_epoch - init_epoch) / 86400 ))
385
+ else
386
+ colony_age_days=0
387
+ fi
388
+ else
389
+ colony_age_days=0
390
+ fi
391
+ ```
392
+
393
+ Count phases completed:
394
+ ```bash
395
+ phases_completed=$(jq '[.plan.phases[] | select(.status == "completed")] | length' .aether/data/COLONY_STATE.json 2>/dev/null || echo "0")
396
+ total_phases=$(jq '.plan.phases | length' .aether/data/COLONY_STATE.json 2>/dev/null || echo "0")
397
+ ```
398
+
399
+ Determine recommendation:
400
+ - If `audit_fails == 0` and `audit_warnings == 0`: `recommendation = "READY TO SEAL"`
401
+ - If `audit_fails == 0` and `audit_warnings > 0`: `recommendation = "READY TO SEAL (with warnings)"`
402
+ - If `audit_fails > 0`: `recommendation = "ISSUES TO RESOLVE"`
403
+
404
+ Write `.aether/data/completion-report.md` using the Write tool:
405
+
406
+ ```markdown
407
+ # Colony Completion Report
408
+
409
+ **Generated:** {ISO-8601 timestamp}
410
+ **Colony Goal:** {goal}
411
+ **Milestone:** {milestone}
412
+ **Colony Age:** {colony_age_days} days
413
+
414
+ ---
415
+
416
+ ## Recommendation: {recommendation}
417
+
418
+ ---
419
+
420
+ ## Plan vs Reality
421
+
422
+ | Metric | Count |
423
+ |--------|-------|
424
+ | Total Tasks | {total_tasks} |
425
+ | Verified | {verified_tasks} |
426
+ | Unverifiable | {unverifiable_tasks} |
427
+ | Missing Evidence | {missing_tasks} |
428
+
429
+ **Phases:** {phases_completed} of {total_phases} completed
430
+
431
+ {For each phase:}
432
+ ### Phase {N}: {name} [{status}]
433
+ {For each MISSING task: "- MISSING: {description}"}
434
+ {If no missing: "All tasks verified or unverifiable."}
435
+
436
+ ---
437
+
438
+ ## Documentation Accuracy
439
+
440
+ **Score:** {accuracy_score}%
441
+
442
+ | Check | Status | Detail |
443
+ |-------|--------|--------|
444
+ {For each doc check: "| {name} | {status} | {detail} |"}
445
+
446
+ ---
447
+
448
+ ## Unresolved Issues
449
+
450
+ **Flags:** {blocker_count} blockers | {high_count} high | {medium_count} medium | {low_count} low
451
+
452
+ {For each unresolved blocker: "- BLOCKER: {title}"}
453
+
454
+ **Recurring Failures:** {recurring_count}
455
+ {For each recurring pattern: "- {pattern}"}
456
+
457
+ ---
458
+
459
+ ## Test Coverage
460
+
461
+ | Type | Count |
462
+ |------|-------|
463
+ | Unit Tests | {unit} |
464
+ | E2E Tests | {e2e} |
465
+ | JS/TS Tests | {js} |
466
+
467
+ **Results:** {pass_count} passing | {fail_count} failing
468
+
469
+ ---
470
+
471
+ ## Colony Health
472
+
473
+ | Metric | Value |
474
+ |--------|-------|
475
+ | Instincts | {total} ({high_confidence} strong) |
476
+ | Learnings | {learning_count} |
477
+ | Pheromones | {signal_count} active |
478
+ | Events | {event_count} ({error_event_count} errors) |
479
+
480
+ ---
481
+
482
+ ## Audit Summary
483
+
484
+ | Category | Result |
485
+ |----------|--------|
486
+ | Checks Passed | {audit_passes} |
487
+ | Checks Failed | {audit_fails} |
488
+ | Warnings | {audit_warnings} |
489
+
490
+ {If audit_issues is not empty:}
491
+ ### Issues to Address
492
+
493
+ {For each issue in audit_issues:}
494
+ - {issue description}
495
+ {end}
496
+ ```
497
+
498
+ ### Step 8: Display Results
499
+
500
+ Display the formatted audit summary:
501
+
502
+ ```
503
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
504
+ A U D I T R E S U L T S
505
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
506
+
507
+ Goal: {goal}
508
+ Colony Age: {colony_age_days} days
509
+ Milestone: {milestone}
510
+
511
+ Plan Verification
512
+ Phases: {phases_completed}/{total_phases} completed
513
+ Tasks: {verified_tasks} verified | {unverifiable_tasks} unverifiable | {missing_tasks} missing
514
+ {PASS or FAIL indicator}
515
+
516
+ Documentation Accuracy
517
+ Score: {accuracy_score}%
518
+ {For each check: "[PASS|FAIL|WARN] {name}"}
519
+ {PASS or FAIL indicator}
520
+
521
+ Unresolved Issues
522
+ Flags: {blocker_count} blockers | {high_count} high
523
+ Recurring failures: {recurring_count}
524
+ {PASS, WARN, or FAIL indicator}
525
+
526
+ Test Coverage
527
+ {pass_count} passing | {fail_count} failing
528
+ {PASS or FAIL indicator}
529
+
530
+ Colony Health
531
+ Instincts: {total} | Learnings: {learning_count} | Signals: {signal_count}
532
+
533
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
534
+ PASSED: {audit_passes} | FAILED: {audit_fails} | WARNINGS: {audit_warnings}
535
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
536
+ ```
537
+
538
+ **If recommendation is "READY TO SEAL":**
539
+ ```
540
+ Colony ready to seal.
541
+
542
+ Report: .aether/data/completion-report.md
543
+
544
+ Next:
545
+ /ant:seal Seal colony at Crowned Anthill
546
+ ```
547
+
548
+ **If recommendation is "READY TO SEAL (with warnings)":**
549
+ ```
550
+ Colony ready to seal (with warnings).
551
+
552
+ {For each warning: " WARNING: {description}"}
553
+
554
+ These warnings are non-blocking. You may seal or address them first.
555
+
556
+ Report: .aether/data/completion-report.md
557
+
558
+ Next:
559
+ /ant:seal Seal colony at Crowned Anthill
560
+ /ant:build <phase> Address remaining work
561
+ ```
562
+
563
+ **If recommendation is "ISSUES TO RESOLVE":**
564
+ ```
565
+ Issues found that should be addressed before sealing.
566
+
567
+ {For each issue with audit_fails: " ISSUE: {description}"}
568
+
569
+ Suggested actions:
570
+ {For each issue, suggest a concrete action:}
571
+ - Missing task evidence: Re-run the build or verify manually
572
+ - Documentation mismatch: Update docs to match reality
573
+ - Unresolved blockers: Run /ant:flags to review and resolve
574
+ - Failing tests: Fix tests before sealing
575
+ - Recurring failures: Investigate root cause via /ant:swarm
576
+
577
+ Report: .aether/data/completion-report.md
578
+
579
+ Next:
580
+ /ant:status Check colony status
581
+ /ant:build <phase> Address remaining work
582
+ /ant:flags Review unresolved flags
583
+ ```
584
+
585
+ ### Step 9: Log Activity
586
+
587
+ Run using the Bash tool:
588
+ ```bash
589
+ bash .aether/aether-utils.sh activity-log "COMPLETE" "queen" "Colony audit completed - {recommendation}"
590
+ ```
591
+
592
+ Display persistence confirmation:
593
+ ```
594
+ All state persisted. Safe to /clear context if needed.
595
+ Report: .aether/data/completion-report.md
596
+ Resume: /ant:resume-colony
597
+ ```
598
+
599
+ ### Edge Cases
600
+
601
+ **Colony has no plan (0 phases):**
602
+ - Skip Step 2 (plan verification)
603
+ - Note: "No plan generated. Skipping plan verification."
604
+ - Recommendation defaults to "ISSUES TO RESOLVE" with note about missing plan
605
+
606
+ **Colony is still EXECUTING:**
607
+ - Warn: "Colony is still executing. Audit results may be incomplete."
608
+ - Proceed with audit anyway (do not block)
609
+
610
+ **No test files found:**
611
+ - Report: "No test files detected."
612
+ - Count as a warning, not a failure
613
+
614
+ **COLONY_STATE.json version is old (< 3.0):**
615
+ - Proceed with available fields
616
+ - Note missing fields in report as "N/A (older state format)"
617
+
618
+ **Subagent spawn fails:**
619
+ - Fall back to running the documentation checks inline
620
+ - Note the fallback in the report
@@ -1,3 +1,4 @@
1
+ <!-- Generated from .aether/commands/pause-colony.yaml - DO NOT EDIT DIRECTLY -->
1
2
  ---
2
3
  name: ant:pause-colony
3
4
  description: "💾🐜⏸️🐜💾 Pause colony work and create handoff document for resuming later"
@@ -14,15 +15,6 @@ Parse `$ARGUMENTS`:
14
15
  ### Step 0: Initialize Visual Mode (if enabled)
15
16
 
16
17
  If `visual_mode` is true, run using the Bash tool with description "Initializing pause display...":
17
- ```bash
18
- # Generate session ID
19
- pause_id="pause-$(date +%s)"
20
-
21
- # Initialize swarm display
22
- bash .aether/aether-utils.sh swarm-display-init "$pause_id"
23
- bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Pausing colony" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 0
24
- ```
25
-
26
18
  ### Step 1: Read State
27
19
 
28
20
  Use the Read tool to read `.aether/data/COLONY_STATE.json`.
@@ -31,13 +23,13 @@ If `goal` is null, output `No colony initialized. Nothing to pause.` and stop.
31
23
 
32
24
  ### Step 2: Compute Active Signals
33
25
 
34
- Read active signals from COLONY_STATE.json `signals` array (already loaded in Step 1).
35
-
36
- Filter signals where:
37
- - `expires_at` is null (permanent signals like INIT), OR
38
- - `expires_at` > current timestamp (not expired)
26
+ Run using the Bash tool with description "Loading active pheromones...":
27
+ ```bash
28
+ bash .aether/aether-utils.sh pheromone-read
29
+ ```
39
30
 
40
- If `signals` array is empty or all expired, treat as "no active pheromones."
31
+ Use `.result.signals` as the active signal list (already decay-filtered by runtime logic).
32
+ If empty, treat as "no active pheromones."
41
33
 
42
34
  ### Step 3: Build Handoff Summary
43
35
 
@@ -45,7 +37,7 @@ Gather context for the handoff from `COLONY_STATE.json`:
45
37
  - `goal` from top level
46
38
  - `state` and `current_phase` from top level
47
39
  - `workers` object
48
- - Active signals from `signals` array (with current decayed strengths from Step 2)
40
+ - Active signals from `pheromone-read` output (with current decayed strengths from Step 2)
49
41
  - Phase progress from `plan.phases` (how many complete, current phase tasks)
50
42
  - What was in progress or pending
51
43
 
@@ -191,12 +183,6 @@ bash .aether/aether-utils.sh context-update safe-to-clear "YES" "Colony paused
191
183
 
192
184
  ### Step 5: Display Confirmation
193
185
 
194
- **If visual_mode is true, render final swarm display** by running using the Bash tool with description "Updating pause display...":
195
- ```bash
196
- bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony paused" "Colony" '{"read":3,"grep":0,"edit":2,"bash":1}' 100 "fungus_garden" 100
197
- bash .aether/aether-utils.sh swarm-display-text "$pause_id"
198
- ```
199
-
200
186
  Output header:
201
187
 
202
188
  ```