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