aether-colony 5.3.2 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/.aether/aether-utils.sh +181 -5
  2. package/.aether/commands/archaeology.yaml +3 -3
  3. package/.aether/commands/build.yaml +80 -45
  4. package/.aether/commands/chaos.yaml +7 -7
  5. package/.aether/commands/colonize.yaml +17 -17
  6. package/.aether/commands/continue.yaml +40 -40
  7. package/.aether/commands/council.yaml +6 -6
  8. package/.aether/commands/data-clean.yaml +3 -3
  9. package/.aether/commands/dream.yaml +2 -2
  10. package/.aether/commands/entomb.yaml +12 -12
  11. package/.aether/commands/export-signals.yaml +2 -2
  12. package/.aether/commands/feedback.yaml +6 -6
  13. package/.aether/commands/flag.yaml +2 -2
  14. package/.aether/commands/flags.yaml +4 -4
  15. package/.aether/commands/focus.yaml +6 -6
  16. package/.aether/commands/help.yaml +1 -1
  17. package/.aether/commands/history.yaml +1 -1
  18. package/.aether/commands/import-signals.yaml +2 -2
  19. package/.aether/commands/init.yaml +44 -27
  20. package/.aether/commands/insert-phase.yaml +1 -1
  21. package/.aether/commands/interpret.yaml +2 -2
  22. package/.aether/commands/lay-eggs.yaml +3 -3
  23. package/.aether/commands/maturity.yaml +2 -2
  24. package/.aether/commands/memory-details.yaml +1 -1
  25. package/.aether/commands/migrate-state.yaml +1 -1
  26. package/.aether/commands/oracle.yaml +147 -82
  27. package/.aether/commands/organize.yaml +5 -5
  28. package/.aether/commands/patrol.yaml +8 -8
  29. package/.aether/commands/pause-colony.yaml +7 -7
  30. package/.aether/commands/phase.yaml +1 -1
  31. package/.aether/commands/pheromones.yaml +1 -1
  32. package/.aether/commands/plan.yaml +14 -14
  33. package/.aether/commands/quick.yaml +4 -4
  34. package/.aether/commands/redirect.yaml +6 -6
  35. package/.aether/commands/resume-colony.yaml +9 -9
  36. package/.aether/commands/resume.yaml +5 -38
  37. package/.aether/commands/run.yaml +10 -10
  38. package/.aether/commands/seal.yaml +33 -33
  39. package/.aether/commands/skill-create.yaml +4 -4
  40. package/.aether/commands/status.yaml +14 -14
  41. package/.aether/commands/swarm.yaml +14 -14
  42. package/.aether/commands/tunnels.yaml +7 -7
  43. package/.aether/commands/update.yaml +1 -1
  44. package/.aether/commands/verify-castes.yaml +3 -3
  45. package/.aether/commands/watch.yaml +15 -15
  46. package/.aether/docs/command-playbooks/build-complete.md +48 -15
  47. package/.aether/docs/command-playbooks/build-context.md +11 -11
  48. package/.aether/docs/command-playbooks/build-full.md +76 -76
  49. package/.aether/docs/command-playbooks/build-prep.md +10 -10
  50. package/.aether/docs/command-playbooks/build-verify.md +27 -27
  51. package/.aether/docs/command-playbooks/build-wave.md +38 -38
  52. package/.aether/docs/command-playbooks/continue-advance.md +60 -27
  53. package/.aether/docs/command-playbooks/continue-finalize.md +25 -11
  54. package/.aether/docs/command-playbooks/continue-full.md +60 -46
  55. package/.aether/docs/command-playbooks/continue-gates.md +18 -18
  56. package/.aether/docs/command-playbooks/continue-verify.md +10 -10
  57. package/.aether/docs/source-of-truth-map.md +10 -10
  58. package/.aether/docs/structural-learning-stack.md +283 -0
  59. package/.aether/templates/colony-state-template.json +1 -0
  60. package/.aether/utils/consolidation-seal.sh +196 -0
  61. package/.aether/utils/consolidation.sh +127 -0
  62. package/.aether/utils/curation-ants/archivist.sh +97 -0
  63. package/.aether/utils/curation-ants/critic.sh +214 -0
  64. package/.aether/utils/curation-ants/herald.sh +102 -0
  65. package/.aether/utils/curation-ants/janitor.sh +121 -0
  66. package/.aether/utils/curation-ants/librarian.sh +99 -0
  67. package/.aether/utils/curation-ants/nurse.sh +153 -0
  68. package/.aether/utils/curation-ants/orchestrator.sh +181 -0
  69. package/.aether/utils/curation-ants/scribe.sh +164 -0
  70. package/.aether/utils/curation-ants/sentinel.sh +119 -0
  71. package/.aether/utils/event-bus.sh +301 -0
  72. package/.aether/utils/graph.sh +559 -0
  73. package/.aether/utils/instinct-store.sh +401 -0
  74. package/.aether/utils/learning.sh +79 -7
  75. package/.aether/utils/oracle/oracle-stop-hook.sh +896 -0
  76. package/.aether/utils/session.sh +13 -0
  77. package/.aether/utils/state-api.sh +1 -1
  78. package/.aether/utils/trust-scoring.sh +347 -0
  79. package/.aether/utils/worktree.sh +97 -0
  80. package/.claude/commands/ant/archaeology.md +2 -2
  81. package/.claude/commands/ant/chaos.md +4 -4
  82. package/.claude/commands/ant/colonize.md +9 -9
  83. package/.claude/commands/ant/council.md +6 -6
  84. package/.claude/commands/ant/data-clean.md +3 -3
  85. package/.claude/commands/ant/dream.md +2 -2
  86. package/.claude/commands/ant/entomb.md +9 -9
  87. package/.claude/commands/ant/export-signals.md +2 -2
  88. package/.claude/commands/ant/feedback.md +4 -4
  89. package/.claude/commands/ant/flag.md +2 -2
  90. package/.claude/commands/ant/flags.md +4 -4
  91. package/.claude/commands/ant/focus.md +4 -4
  92. package/.claude/commands/ant/help.md +1 -1
  93. package/.claude/commands/ant/history.md +1 -1
  94. package/.claude/commands/ant/import-signals.md +2 -2
  95. package/.claude/commands/ant/init.md +44 -27
  96. package/.claude/commands/ant/insert-phase.md +1 -1
  97. package/.claude/commands/ant/interpret.md +2 -2
  98. package/.claude/commands/ant/lay-eggs.md +2 -2
  99. package/.claude/commands/ant/maturity.md +2 -2
  100. package/.claude/commands/ant/memory-details.md +1 -1
  101. package/.claude/commands/ant/migrate-state.md +1 -1
  102. package/.claude/commands/ant/oracle.md +78 -42
  103. package/.claude/commands/ant/organize.md +3 -3
  104. package/.claude/commands/ant/patrol.md +8 -8
  105. package/.claude/commands/ant/pause-colony.md +5 -5
  106. package/.claude/commands/ant/phase.md +1 -1
  107. package/.claude/commands/ant/pheromones.md +1 -1
  108. package/.claude/commands/ant/plan.md +8 -8
  109. package/.claude/commands/ant/quick.md +4 -4
  110. package/.claude/commands/ant/redirect.md +4 -4
  111. package/.claude/commands/ant/resume-colony.md +5 -5
  112. package/.claude/commands/ant/resume.md +17 -29
  113. package/.claude/commands/ant/run.md +10 -10
  114. package/.claude/commands/ant/seal.md +25 -25
  115. package/.claude/commands/ant/skill-create.md +2 -2
  116. package/.claude/commands/ant/status.md +14 -14
  117. package/.claude/commands/ant/swarm.md +14 -14
  118. package/.claude/commands/ant/tunnels.md +4 -4
  119. package/.claude/commands/ant/update.md +1 -1
  120. package/.claude/commands/ant/verify-castes.md +2 -2
  121. package/.claude/commands/ant/watch.md +8 -8
  122. package/.opencode/commands/ant/archaeology.md +1 -1
  123. package/.opencode/commands/ant/build.md +80 -45
  124. package/.opencode/commands/ant/chaos.md +3 -3
  125. package/.opencode/commands/ant/colonize.md +8 -8
  126. package/.opencode/commands/ant/continue.md +40 -40
  127. package/.opencode/commands/ant/council.md +5 -5
  128. package/.opencode/commands/ant/data-clean.md +2 -2
  129. package/.opencode/commands/ant/dream.md +1 -1
  130. package/.opencode/commands/ant/entomb.md +3 -3
  131. package/.opencode/commands/ant/export-signals.md +1 -1
  132. package/.opencode/commands/ant/feedback.md +2 -2
  133. package/.opencode/commands/ant/flag.md +1 -1
  134. package/.opencode/commands/ant/flags.md +3 -3
  135. package/.opencode/commands/ant/focus.md +2 -2
  136. package/.opencode/commands/ant/import-signals.md +1 -1
  137. package/.opencode/commands/ant/init.md +44 -27
  138. package/.opencode/commands/ant/insert-phase.md +1 -1
  139. package/.opencode/commands/ant/interpret.md +1 -1
  140. package/.opencode/commands/ant/lay-eggs.md +2 -2
  141. package/.opencode/commands/ant/maturity.md +1 -1
  142. package/.opencode/commands/ant/memory-details.md +1 -1
  143. package/.opencode/commands/ant/oracle.md +69 -40
  144. package/.opencode/commands/ant/organize.md +2 -2
  145. package/.opencode/commands/ant/patrol.md +8 -8
  146. package/.opencode/commands/ant/pause-colony.md +2 -2
  147. package/.opencode/commands/ant/pheromones.md +1 -1
  148. package/.opencode/commands/ant/plan.md +6 -6
  149. package/.opencode/commands/ant/quick.md +4 -4
  150. package/.opencode/commands/ant/redirect.md +2 -2
  151. package/.opencode/commands/ant/resume-colony.md +4 -4
  152. package/.opencode/commands/ant/resume.md +5 -17
  153. package/.opencode/commands/ant/run.md +10 -10
  154. package/.opencode/commands/ant/seal.md +8 -8
  155. package/.opencode/commands/ant/skill-create.md +2 -2
  156. package/.opencode/commands/ant/status.md +10 -10
  157. package/.opencode/commands/ant/tunnels.md +3 -3
  158. package/.opencode/commands/ant/verify-castes.md +1 -1
  159. package/.opencode/commands/ant/watch.md +7 -7
  160. package/CHANGELOG.md +83 -0
  161. package/README.md +22 -9
  162. package/bin/cli.js +118 -3
  163. package/bin/lib/binary-downloader.js +267 -0
  164. package/bin/lib/update-transaction.js +27 -3
  165. package/bin/lib/version-gate.js +179 -0
  166. package/bin/npx-entry.js +0 -0
  167. package/package.json +1 -1
  168. package/.aether/agents/aether-ambassador.md +0 -140
  169. package/.aether/agents/aether-archaeologist.md +0 -108
  170. package/.aether/agents/aether-architect.md +0 -133
  171. package/.aether/agents/aether-auditor.md +0 -144
  172. package/.aether/agents/aether-builder.md +0 -184
  173. package/.aether/agents/aether-chaos.md +0 -115
  174. package/.aether/agents/aether-chronicler.md +0 -122
  175. package/.aether/agents/aether-gatekeeper.md +0 -116
  176. package/.aether/agents/aether-includer.md +0 -117
  177. package/.aether/agents/aether-keeper.md +0 -177
  178. package/.aether/agents/aether-measurer.md +0 -128
  179. package/.aether/agents/aether-oracle.md +0 -137
  180. package/.aether/agents/aether-probe.md +0 -133
  181. package/.aether/agents/aether-queen.md +0 -286
  182. package/.aether/agents/aether-route-setter.md +0 -130
  183. package/.aether/agents/aether-sage.md +0 -106
  184. package/.aether/agents/aether-scout.md +0 -101
  185. package/.aether/agents/aether-surveyor-disciplines.md +0 -391
  186. package/.aether/agents/aether-surveyor-nest.md +0 -329
  187. package/.aether/agents/aether-surveyor-pathogens.md +0 -264
  188. package/.aether/agents/aether-surveyor-provisions.md +0 -334
  189. package/.aether/agents/aether-tracker.md +0 -137
  190. package/.aether/agents/aether-watcher.md +0 -174
  191. package/.aether/agents/aether-weaver.md +0 -130
  192. package/.aether/commands/claude/archaeology.md +0 -334
  193. package/.aether/commands/claude/build.md +0 -65
  194. package/.aether/commands/claude/chaos.md +0 -336
  195. package/.aether/commands/claude/colonize.md +0 -259
  196. package/.aether/commands/claude/continue.md +0 -60
  197. package/.aether/commands/claude/council.md +0 -507
  198. package/.aether/commands/claude/data-clean.md +0 -81
  199. package/.aether/commands/claude/dream.md +0 -268
  200. package/.aether/commands/claude/entomb.md +0 -498
  201. package/.aether/commands/claude/export-signals.md +0 -57
  202. package/.aether/commands/claude/feedback.md +0 -96
  203. package/.aether/commands/claude/flag.md +0 -151
  204. package/.aether/commands/claude/flags.md +0 -169
  205. package/.aether/commands/claude/focus.md +0 -76
  206. package/.aether/commands/claude/help.md +0 -154
  207. package/.aether/commands/claude/history.md +0 -140
  208. package/.aether/commands/claude/import-signals.md +0 -71
  209. package/.aether/commands/claude/init.md +0 -505
  210. package/.aether/commands/claude/insert-phase.md +0 -105
  211. package/.aether/commands/claude/interpret.md +0 -278
  212. package/.aether/commands/claude/lay-eggs.md +0 -210
  213. package/.aether/commands/claude/maturity.md +0 -113
  214. package/.aether/commands/claude/memory-details.md +0 -77
  215. package/.aether/commands/claude/migrate-state.md +0 -171
  216. package/.aether/commands/claude/oracle.md +0 -642
  217. package/.aether/commands/claude/organize.md +0 -232
  218. package/.aether/commands/claude/patrol.md +0 -620
  219. package/.aether/commands/claude/pause-colony.md +0 -233
  220. package/.aether/commands/claude/phase.md +0 -115
  221. package/.aether/commands/claude/pheromones.md +0 -156
  222. package/.aether/commands/claude/plan.md +0 -693
  223. package/.aether/commands/claude/preferences.md +0 -65
  224. package/.aether/commands/claude/quick.md +0 -100
  225. package/.aether/commands/claude/redirect.md +0 -76
  226. package/.aether/commands/claude/resume-colony.md +0 -197
  227. package/.aether/commands/claude/resume.md +0 -388
  228. package/.aether/commands/claude/run.md +0 -231
  229. package/.aether/commands/claude/seal.md +0 -774
  230. package/.aether/commands/claude/skill-create.md +0 -286
  231. package/.aether/commands/claude/status.md +0 -410
  232. package/.aether/commands/claude/swarm.md +0 -349
  233. package/.aether/commands/claude/tunnels.md +0 -426
  234. package/.aether/commands/claude/update.md +0 -132
  235. package/.aether/commands/claude/verify-castes.md +0 -143
  236. package/.aether/commands/claude/watch.md +0 -239
  237. package/.aether/commands/opencode/archaeology.md +0 -331
  238. package/.aether/commands/opencode/build.md +0 -1168
  239. package/.aether/commands/opencode/chaos.md +0 -329
  240. package/.aether/commands/opencode/colonize.md +0 -195
  241. package/.aether/commands/opencode/continue.md +0 -1436
  242. package/.aether/commands/opencode/council.md +0 -437
  243. package/.aether/commands/opencode/data-clean.md +0 -77
  244. package/.aether/commands/opencode/dream.md +0 -260
  245. package/.aether/commands/opencode/entomb.md +0 -377
  246. package/.aether/commands/opencode/export-signals.md +0 -54
  247. package/.aether/commands/opencode/feedback.md +0 -99
  248. package/.aether/commands/opencode/flag.md +0 -149
  249. package/.aether/commands/opencode/flags.md +0 -167
  250. package/.aether/commands/opencode/focus.md +0 -73
  251. package/.aether/commands/opencode/help.md +0 -157
  252. package/.aether/commands/opencode/history.md +0 -136
  253. package/.aether/commands/opencode/import-signals.md +0 -68
  254. package/.aether/commands/opencode/init.md +0 -518
  255. package/.aether/commands/opencode/insert-phase.md +0 -111
  256. package/.aether/commands/opencode/interpret.md +0 -272
  257. package/.aether/commands/opencode/lay-eggs.md +0 -213
  258. package/.aether/commands/opencode/maturity.md +0 -108
  259. package/.aether/commands/opencode/memory-details.md +0 -83
  260. package/.aether/commands/opencode/migrate-state.md +0 -165
  261. package/.aether/commands/opencode/oracle.md +0 -593
  262. package/.aether/commands/opencode/organize.md +0 -226
  263. package/.aether/commands/opencode/patrol.md +0 -626
  264. package/.aether/commands/opencode/pause-colony.md +0 -203
  265. package/.aether/commands/opencode/phase.md +0 -113
  266. package/.aether/commands/opencode/pheromones.md +0 -162
  267. package/.aether/commands/opencode/plan.md +0 -684
  268. package/.aether/commands/opencode/preferences.md +0 -71
  269. package/.aether/commands/opencode/quick.md +0 -91
  270. package/.aether/commands/opencode/redirect.md +0 -84
  271. package/.aether/commands/opencode/resume-colony.md +0 -190
  272. package/.aether/commands/opencode/resume.md +0 -394
  273. package/.aether/commands/opencode/run.md +0 -237
  274. package/.aether/commands/opencode/seal.md +0 -452
  275. package/.aether/commands/opencode/skill-create.md +0 -63
  276. package/.aether/commands/opencode/status.md +0 -307
  277. package/.aether/commands/opencode/swarm.md +0 -15
  278. package/.aether/commands/opencode/tunnels.md +0 -400
  279. package/.aether/commands/opencode/update.md +0 -127
  280. package/.aether/commands/opencode/verify-castes.md +0 -139
  281. package/.aether/commands/opencode/watch.md +0 -227
@@ -1,620 +0,0 @@
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