aether-colony 3.1.4 → 3.1.15
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/.claude/commands/ant/archaeology.md +12 -0
- package/.claude/commands/ant/build.md +382 -319
- package/.claude/commands/ant/chaos.md +23 -1
- package/.claude/commands/ant/colonize.md +147 -87
- package/.claude/commands/ant/continue.md +213 -23
- package/.claude/commands/ant/council.md +22 -0
- package/.claude/commands/ant/dream.md +18 -0
- package/.claude/commands/ant/entomb.md +178 -6
- package/.claude/commands/ant/init.md +87 -13
- package/.claude/commands/ant/lay-eggs.md +45 -5
- package/.claude/commands/ant/oracle.md +82 -9
- package/.claude/commands/ant/organize.md +2 -2
- package/.claude/commands/ant/pause-colony.md +86 -28
- package/.claude/commands/ant/phase.md +26 -0
- package/.claude/commands/ant/plan.md +204 -111
- package/.claude/commands/ant/resume-colony.md +23 -1
- package/.claude/commands/ant/resume.md +159 -0
- package/.claude/commands/ant/seal.md +177 -3
- package/.claude/commands/ant/swarm.md +78 -97
- package/.claude/commands/ant/verify-castes.md +7 -7
- package/.claude/commands/ant/watch.md +17 -0
- package/.opencode/agents/aether-ambassador.md +97 -0
- package/.opencode/agents/aether-archaeologist.md +91 -0
- package/.opencode/agents/aether-architect.md +66 -0
- package/.opencode/agents/aether-auditor.md +111 -0
- package/.opencode/agents/aether-builder.md +28 -10
- package/.opencode/agents/aether-chaos.md +98 -0
- package/.opencode/agents/aether-chronicler.md +80 -0
- package/.opencode/agents/aether-gatekeeper.md +107 -0
- package/.opencode/agents/aether-guardian.md +107 -0
- package/.opencode/agents/aether-includer.md +108 -0
- package/.opencode/agents/aether-keeper.md +106 -0
- package/.opencode/agents/aether-measurer.md +119 -0
- package/.opencode/agents/aether-probe.md +91 -0
- package/.opencode/agents/aether-queen.md +72 -19
- package/.opencode/agents/aether-route-setter.md +85 -0
- package/.opencode/agents/aether-sage.md +98 -0
- package/.opencode/agents/aether-scout.md +33 -15
- package/.opencode/agents/aether-surveyor-disciplines.md +334 -0
- package/.opencode/agents/aether-surveyor-nest.md +272 -0
- package/.opencode/agents/aether-surveyor-pathogens.md +209 -0
- package/.opencode/agents/aether-surveyor-provisions.md +277 -0
- package/.opencode/agents/aether-tracker.md +91 -0
- package/.opencode/agents/aether-watcher.md +30 -12
- package/.opencode/agents/aether-weaver.md +87 -0
- package/.opencode/agents/workers.md +1034 -0
- package/.opencode/commands/ant/archaeology.md +44 -26
- package/.opencode/commands/ant/build.md +327 -295
- package/.opencode/commands/ant/chaos.md +32 -4
- package/.opencode/commands/ant/colonize.md +119 -93
- package/.opencode/commands/ant/continue.md +98 -10
- package/.opencode/commands/ant/council.md +28 -0
- package/.opencode/commands/ant/dream.md +24 -0
- package/.opencode/commands/ant/entomb.md +73 -1
- package/.opencode/commands/ant/feedback.md +8 -2
- package/.opencode/commands/ant/flag.md +9 -3
- package/.opencode/commands/ant/flags.md +8 -2
- package/.opencode/commands/ant/focus.md +8 -2
- package/.opencode/commands/ant/help.md +12 -0
- package/.opencode/commands/ant/init.md +49 -4
- package/.opencode/commands/ant/lay-eggs.md +30 -2
- package/.opencode/commands/ant/oracle.md +39 -7
- package/.opencode/commands/ant/organize.md +9 -3
- package/.opencode/commands/ant/pause-colony.md +54 -1
- package/.opencode/commands/ant/phase.md +36 -4
- package/.opencode/commands/ant/plan.md +225 -117
- package/.opencode/commands/ant/redirect.md +8 -2
- package/.opencode/commands/ant/resume-colony.md +51 -26
- package/.opencode/commands/ant/seal.md +76 -0
- package/.opencode/commands/ant/status.md +50 -20
- package/.opencode/commands/ant/swarm.md +108 -104
- package/.opencode/commands/ant/tunnels.md +107 -2
- package/CHANGELOG.md +21 -0
- package/README.md +199 -86
- package/bin/cli.js +142 -25
- package/bin/generate-commands.sh +100 -16
- package/bin/lib/caste-colors.js +5 -5
- package/bin/lib/errors.js +16 -0
- package/bin/lib/file-lock.js +279 -44
- package/bin/lib/state-sync.js +206 -23
- package/bin/lib/update-transaction.js +206 -24
- package/bin/sync-to-runtime.sh +129 -0
- package/package.json +2 -2
- package/runtime/CONTEXT.md +160 -0
- package/runtime/aether-utils.sh +1421 -55
- package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +1343 -0
- package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +2642 -0
- package/runtime/docs/PHEROMONE-INJECTION.md +240 -0
- package/runtime/docs/PHEROMONE-INTEGRATION.md +192 -0
- package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +426 -0
- package/runtime/docs/README.md +94 -0
- package/runtime/docs/VISUAL-OUTPUT-SPEC.md +219 -0
- package/runtime/docs/biological-reference.md +272 -0
- package/runtime/docs/codebase-review.md +399 -0
- package/runtime/docs/command-sync.md +164 -0
- package/runtime/docs/implementation-learnings.md +89 -0
- package/runtime/docs/known-issues.md +217 -0
- package/runtime/docs/namespace.md +148 -0
- package/runtime/docs/planning-discipline.md +159 -0
- package/runtime/lib/queen-utils.sh +729 -0
- package/runtime/model-profiles.yaml +100 -0
- package/runtime/recover.sh +136 -0
- package/runtime/templates/QUEEN.md.template +79 -0
- package/runtime/utils/atomic-write.sh +5 -5
- package/runtime/utils/chamber-utils.sh +6 -3
- package/runtime/utils/error-handler.sh +200 -0
- package/runtime/utils/queen-to-md.xsl +395 -0
- package/runtime/utils/spawn-tree.sh +428 -0
- package/runtime/utils/spawn-with-model.sh +56 -0
- package/runtime/utils/state-loader.sh +215 -0
- package/runtime/utils/swarm-display.sh +5 -5
- package/runtime/utils/watch-spawn-tree.sh +90 -22
- package/runtime/utils/xml-compose.sh +247 -0
- package/runtime/utils/xml-core.sh +186 -0
- package/runtime/utils/xml-utils.sh +2161 -0
- package/runtime/verification-loop.md +1 -1
- package/runtime/workers-new-castes.md +516 -0
- package/runtime/workers.md +20 -8
- package/.aether/visualizations/anthill-stages/brood-stable.txt +0 -26
- package/.aether/visualizations/anthill-stages/crowned-anthill.txt +0 -30
- package/.aether/visualizations/anthill-stages/first-mound.txt +0 -18
- package/.aether/visualizations/anthill-stages/open-chambers.txt +0 -24
- package/.aether/visualizations/anthill-stages/sealed-chambers.txt +0 -28
- package/.aether/visualizations/anthill-stages/ventilated-nest.txt +0 -27
|
@@ -7,6 +7,28 @@ You are the **Queen**. Seal the colony when all work is complete.
|
|
|
7
7
|
|
|
8
8
|
## Instructions
|
|
9
9
|
|
|
10
|
+
### Step -1: Normalize Arguments
|
|
11
|
+
|
|
12
|
+
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
13
|
+
|
|
14
|
+
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
15
|
+
|
|
16
|
+
Parse `$normalized_args`:
|
|
17
|
+
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
18
|
+
- Otherwise: set `visual_mode = true`
|
|
19
|
+
|
|
20
|
+
### Step 0: Initialize Visual Mode (if enabled)
|
|
21
|
+
|
|
22
|
+
If `visual_mode` is true:
|
|
23
|
+
```bash
|
|
24
|
+
# Generate session ID
|
|
25
|
+
seal_id="seal-$(date +%s)"
|
|
26
|
+
|
|
27
|
+
# Initialize swarm display
|
|
28
|
+
bash .aether/aether-utils.sh swarm-display-init "$seal_id"
|
|
29
|
+
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Sealing colony" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 0
|
|
30
|
+
```
|
|
31
|
+
|
|
10
32
|
### Step 1: Read State
|
|
11
33
|
|
|
12
34
|
Read `.aether/data/COLONY_STATE.json`.
|
|
@@ -124,8 +146,49 @@ Update COLONY_STATE.json:
|
|
|
124
146
|
2. Set `milestone_updated_at` to current ISO-8601 timestamp
|
|
125
147
|
3. Append event: `"<timestamp>|milestone_reached|archive|Achieved Crowned Anthill milestone - colony archived"`
|
|
126
148
|
|
|
149
|
+
### Step 5.5: Write Final Handoff
|
|
150
|
+
|
|
151
|
+
After archiving, write the final handoff documenting the completed colony:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
cat > .aether/HANDOFF.md << 'HANDOFF_EOF'
|
|
155
|
+
# Colony Session — SEALED (Crowned Anthill)
|
|
156
|
+
|
|
157
|
+
## 🏆 Colony Complete
|
|
158
|
+
**Status:** Crowned Anthill — All phases completed and archived
|
|
159
|
+
|
|
160
|
+
## Archive Location
|
|
161
|
+
{archive_dir}
|
|
162
|
+
|
|
163
|
+
## Colony Summary
|
|
164
|
+
- Goal: "{goal}"
|
|
165
|
+
- Total Phases: {total_phases}
|
|
166
|
+
- Milestone: Crowned Anthill
|
|
167
|
+
- Sealed At: {timestamp}
|
|
168
|
+
|
|
169
|
+
## Files Archived
|
|
170
|
+
- COLONY_STATE.json
|
|
171
|
+
- activity.log
|
|
172
|
+
- spawn-tree.txt
|
|
173
|
+
- flags.json (if existed)
|
|
174
|
+
- constraints.json (if existed)
|
|
175
|
+
|
|
176
|
+
## Session Note
|
|
177
|
+
This colony has been sealed and archived. The anthill stands crowned.
|
|
178
|
+
To start anew, run: /ant:lay-eggs "<new goal>"
|
|
179
|
+
HANDOFF_EOF
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
This handoff serves as the final record of the completed colony.
|
|
183
|
+
|
|
127
184
|
### Step 6: Display Result
|
|
128
185
|
|
|
186
|
+
**If visual_mode is true, render final swarm display:**
|
|
187
|
+
```bash
|
|
188
|
+
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony sealed" "Colony" '{"read":3,"grep":0,"edit":2,"bash":3}' 100 "fungus_garden" 100
|
|
189
|
+
bash .aether/aether-utils.sh swarm-display-render "$seal_id"
|
|
190
|
+
```
|
|
191
|
+
|
|
129
192
|
Output:
|
|
130
193
|
```
|
|
131
194
|
🏺 ════════════════════════════════════════════════════
|
|
@@ -148,6 +211,19 @@ Output:
|
|
|
148
211
|
🐜 The colony has reached its final form.
|
|
149
212
|
The anthill stands crowned and sealed.
|
|
150
213
|
History is preserved. The colony rests.
|
|
214
|
+
|
|
215
|
+
💾 State persisted — safe to /clear
|
|
216
|
+
|
|
217
|
+
🐜 What would you like to do next?
|
|
218
|
+
1. /ant:lay-eggs "<new goal>" — Start a new colony
|
|
219
|
+
2. /ant:tunnels — Browse archived colonies
|
|
220
|
+
3. /clear — Clear context and continue
|
|
221
|
+
|
|
222
|
+
Use AskUserQuestion with these three options.
|
|
223
|
+
|
|
224
|
+
If option 1 selected: proceed to run /ant:lay-eggs flow
|
|
225
|
+
If option 2 selected: run /ant:tunnels
|
|
226
|
+
If option 3 selected: display "Run /ant:lay-eggs to begin anew after clearing"
|
|
151
227
|
```
|
|
152
228
|
|
|
153
229
|
### Edge Cases
|
|
@@ -49,34 +49,49 @@ If `version` field is missing, "1.0", or "2.0":
|
|
|
49
49
|
3. Output: `State auto-upgraded to v3.0`
|
|
50
50
|
4. Continue with command.
|
|
51
51
|
|
|
52
|
-
### Step 1.5: Show Resumption Context
|
|
52
|
+
### Step 1.5: Load State and Show Resumption Context
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Run using Bash tool: `bash .aether/aether-utils.sh load-state`
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
If successful and goal is not null:
|
|
57
|
+
1. Extract current_phase from state
|
|
58
|
+
2. Get phase name from plan.phases[current_phase - 1].name (or "(unnamed)")
|
|
59
|
+
3. Get last event timestamp from events array (last element)
|
|
60
|
+
4. Display extended resumption context:
|
|
61
|
+
```
|
|
62
|
+
🔄 Resuming: Phase X - Name
|
|
63
|
+
Last activity: timestamp
|
|
64
|
+
```
|
|
59
65
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
5. Check for .aether/HANDOFF.md existence in the load-state output or via separate check
|
|
67
|
+
6. If .aether/HANDOFF.md exists:
|
|
68
|
+
- Display: "Resuming from paused session"
|
|
69
|
+
- Read .aether/HANDOFF.md content for additional context
|
|
70
|
+
- Remove .aether/HANDOFF.md after displaying (cleanup)
|
|
64
71
|
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
🔄 Resuming: Phase 2 - Implement Core Features
|
|
68
|
-
Last activity: 2024-01-15T14:32:00Z
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Edge cases:**
|
|
72
|
-
- If no phase name: show "Phase <N> - (unnamed)"
|
|
73
|
-
- If no events array or empty: omit "Last activity" line
|
|
74
|
-
- If `current_phase` is 0: show "Phase 0 - Not started"
|
|
72
|
+
Run: `bash .aether/aether-utils.sh unload-state` to release lock.
|
|
75
73
|
|
|
76
74
|
### Step 2: Compute Summary
|
|
77
75
|
|
|
78
76
|
From state, extract:
|
|
79
77
|
|
|
78
|
+
### Step 2.5: Gather Dream Information
|
|
79
|
+
|
|
80
|
+
Run using Bash tool: `ls -1 .aether/dreams/*.md 2>/dev/null | wc -l`
|
|
81
|
+
|
|
82
|
+
Capture:
|
|
83
|
+
- Dream count: number of .md files in .aether/dreams/
|
|
84
|
+
- Latest dream: most recent file by name (files are timestamped: YYYY-MM-DD-HHMM.md)
|
|
85
|
+
|
|
86
|
+
To get latest dream timestamp:
|
|
87
|
+
```bash
|
|
88
|
+
ls -1 .aether/dreams/*.md 2>/dev/null | sort | tail -1 | sed 's/.*\/\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\)-\([0-9]\{4\}\).*/\1 \2/'
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Format the timestamp as: YYYY-MM-DD HH:MM
|
|
92
|
+
|
|
93
|
+
From state, extract:
|
|
94
|
+
|
|
80
95
|
**Phase info:**
|
|
81
96
|
- Current phase number: `current_phase`
|
|
82
97
|
- Total phases: `plan.phases.length`
|
|
@@ -112,6 +127,16 @@ From `memory.instincts`:
|
|
|
112
127
|
- `milestone` field (First Mound, Open Chambers, Brood Stable, Ventilated Nest, Sealed Chambers, Crowned Anthill)
|
|
113
128
|
- `milestone_updated_at` field (timestamp of last milestone change)
|
|
114
129
|
|
|
130
|
+
### Step 2.6: Detect Milestone
|
|
131
|
+
|
|
132
|
+
Run using Bash tool: `bash .aether/aether-utils.sh milestone-detect`
|
|
133
|
+
|
|
134
|
+
Extract from JSON result:
|
|
135
|
+
- `milestone`: Current milestone name
|
|
136
|
+
- `version`: Computed version string
|
|
137
|
+
- `phases_completed`: Number of completed phases
|
|
138
|
+
- `total_phases`: Total phases in plan
|
|
139
|
+
|
|
115
140
|
### Step 3: Display
|
|
116
141
|
|
|
117
142
|
Output format:
|
|
@@ -131,7 +156,8 @@ Output format:
|
|
|
131
156
|
🎯 Focus: <focus_count> areas | 🚫 Avoid: <constraints_count> patterns
|
|
132
157
|
🧠 Instincts: <total> learned (<high_confidence> strong)
|
|
133
158
|
🚩 Flags: <blockers> blockers | <issues> issues | <notes> notes
|
|
134
|
-
🏆 Milestone: <milestone>
|
|
159
|
+
🏆 Milestone: <milestone> (<version>)
|
|
160
|
+
💭 Dreams: <dream_count> recorded (latest: <latest_dream>)
|
|
135
161
|
|
|
136
162
|
State: <state>
|
|
137
163
|
Next: <suggested_command> <phase_context>
|
|
@@ -165,6 +191,10 @@ Generate the suggested command based on colony state:
|
|
|
165
191
|
|
|
166
192
|
The output must be a copy-pasteable command with real numbers, not placeholders.
|
|
167
193
|
|
|
194
|
+
**Dream display:**
|
|
195
|
+
- If no dreams exist: `💭 Dreams: None recorded`
|
|
196
|
+
- If dreams exist: `💭 Dreams: <count> recorded (latest: YYYY-MM-DD HH:MM)`
|
|
197
|
+
|
|
168
198
|
**Edge cases:**
|
|
169
199
|
- No phases yet: "Phase 0/0: No plan created"
|
|
170
200
|
- No tasks in phase: "Tasks: 0/0 complete"
|
|
@@ -1,17 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ant:swarm
|
|
3
|
-
description: "🔥🐜🗡️🐜🔥
|
|
3
|
+
description: "🔥🐜🗡️🐜🔥 Real-time colony swarm display + stubborn bug destroyer"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are the **Queen Ant Colony**. Deploy the swarm to destroy a stubborn bug.
|
|
6
|
+
You are the **Queen Ant Colony**. Deploy the swarm to destroy a stubborn bug or view real-time colony activity.
|
|
7
7
|
|
|
8
8
|
## Instructions
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
### Step -1: Normalize Arguments
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
15
|
+
|
|
16
|
+
### Quick View Mode (No Arguments)
|
|
17
|
+
|
|
18
|
+
If `$normalized_args` is empty or equals "--watch":
|
|
19
|
+
|
|
20
|
+
Run the real-time swarm display:
|
|
21
|
+
```bash
|
|
22
|
+
bash .aether/utils/swarm-display.sh
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This shows:
|
|
26
|
+
- Active ants with caste colors and emojis (🔨 Builder in blue, etc.)
|
|
27
|
+
- Tool usage stats per ant (📖5 🔍3 ✏️2 ⚡1)
|
|
28
|
+
- Trophallaxis metrics (🍯 token consumption)
|
|
29
|
+
- Timing information (elapsed time per ant)
|
|
30
|
+
- Chamber activity map (which nest zones have active ants)
|
|
31
|
+
- Animated status phrases ("excavating...", "foraging...")
|
|
32
|
+
|
|
33
|
+
Display updates automatically as ants start/complete work.
|
|
34
|
+
Press Ctrl+C to exit.
|
|
35
|
+
|
|
36
|
+
### Bug Destruction Mode (With Arguments)
|
|
37
|
+
|
|
38
|
+
The problem to investigate is: `$normalized_args`
|
|
39
|
+
|
|
40
|
+
#### Step 1: Validate Input
|
|
41
|
+
|
|
42
|
+
If `$normalized_args` is empty:
|
|
15
43
|
```
|
|
16
44
|
🔥🐜🗡️🐜🔥 SWARM
|
|
17
45
|
|
|
@@ -28,7 +56,7 @@ This is the nuclear option - use when repeated fix attempts fail.
|
|
|
28
56
|
```
|
|
29
57
|
Stop here.
|
|
30
58
|
|
|
31
|
-
|
|
59
|
+
#### Step 2: Read State & Initialize
|
|
32
60
|
|
|
33
61
|
Read `.aether/data/COLONY_STATE.json`.
|
|
34
62
|
If `goal` is null → "No colony initialized. Run /ant:init first.", stop.
|
|
@@ -40,6 +68,11 @@ Initialize swarm findings:
|
|
|
40
68
|
bash .aether/aether-utils.sh swarm-findings-init "<swarm_id>"
|
|
41
69
|
```
|
|
42
70
|
|
|
71
|
+
Initialize swarm display for real-time tracking:
|
|
72
|
+
```bash
|
|
73
|
+
bash .aether/aether-utils.sh swarm-display-init "<swarm_id>"
|
|
74
|
+
```
|
|
75
|
+
|
|
43
76
|
Display header:
|
|
44
77
|
```
|
|
45
78
|
🔥🐜🗡️🐜🔥 ═══════════════════════════════════════════════
|
|
@@ -52,7 +85,7 @@ Display header:
|
|
|
52
85
|
⚡ Deploying 4 parallel scouts...
|
|
53
86
|
```
|
|
54
87
|
|
|
55
|
-
|
|
88
|
+
#### Step 3: Create Git Checkpoint
|
|
56
89
|
|
|
57
90
|
Before any investigation that might lead to fixes:
|
|
58
91
|
```bash
|
|
@@ -67,7 +100,7 @@ Store the result for potential rollback:
|
|
|
67
100
|
💾 Checkpoint: {checkpoint_type} → {checkpoint_ref}
|
|
68
101
|
```
|
|
69
102
|
|
|
70
|
-
|
|
103
|
+
#### Step 4: Read Context
|
|
71
104
|
|
|
72
105
|
Read existing blockers for context:
|
|
73
106
|
```bash
|
|
@@ -84,146 +117,112 @@ Scan recent git commits for context:
|
|
|
84
117
|
git log --oneline -20 2>/dev/null || echo "(no git history)"
|
|
85
118
|
```
|
|
86
119
|
|
|
87
|
-
|
|
120
|
+
#### Step 5: Deploy 4 Parallel Scouts
|
|
88
121
|
|
|
89
122
|
Use the **Task** tool to spawn 4 scouts **in a single message** (parallel execution):
|
|
90
123
|
|
|
91
|
-
|
|
124
|
+
Log each scout to swarm display before spawning:
|
|
125
|
+
```bash
|
|
126
|
+
bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-Archaeologist" "scout" "excavating" "Git history investigation" "Queen" '{"read":0,"grep":0,"edit":0,"bash":3}' 0
|
|
127
|
+
bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-PatternHunter" "scout" "excavating" "Pattern search for similar code" "Queen" '{"read":5,"grep":10,"edit":0,"bash":0}' 0
|
|
128
|
+
bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-ErrorAnalyst" "scout" "excavating" "Error chain analysis" "Queen" '{"read":3,"grep":5,"edit":0,"bash":2}' 0
|
|
129
|
+
bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-WebResearcher" "scout" "excavating" "External source research" "Queen" '{"read":0,"grep":0,"edit":0,"bash":0}' 0
|
|
92
130
|
```
|
|
93
|
-
You are the Git Archaeologist scout for swarm {swarm_id}.
|
|
94
131
|
|
|
95
|
-
|
|
132
|
+
**Scout 1: 🏛️ Git Archaeologist**
|
|
133
|
+
```
|
|
134
|
+
You are {swarm_id}-Archaeologist, a 🏛️ Scout Ant.
|
|
96
135
|
|
|
97
|
-
|
|
136
|
+
Investigate git history for: {problem description}
|
|
98
137
|
|
|
99
|
-
|
|
100
|
-
1. Run `git log --oneline -30`
|
|
101
|
-
2. Run `git log -p --since="1 week ago" -- {relevant files}`
|
|
102
|
-
3. Run `git blame {suspected file}` if
|
|
103
|
-
4.
|
|
138
|
+
Steps:
|
|
139
|
+
1. Run `git log --oneline -30`
|
|
140
|
+
2. Run `git log -p --since="1 week ago" -- {relevant files}`
|
|
141
|
+
3. Run `git blame {suspected file}` if mentioned
|
|
142
|
+
4. Find commits that introduced the bug
|
|
104
143
|
|
|
105
|
-
Return JSON:
|
|
106
|
-
{
|
|
107
|
-
"scout": "git-archaeologist",
|
|
108
|
-
"confidence": 0.0-1.0,
|
|
109
|
-
"finding": {
|
|
110
|
-
"likely_cause": "What you found",
|
|
111
|
-
"relevant_commits": ["commit hashes"],
|
|
112
|
-
"when_it_broke": "timestamp or commit",
|
|
113
|
-
"evidence": ["specific findings"]
|
|
114
|
-
},
|
|
115
|
-
"suggested_fix": "If obvious from history"
|
|
116
|
-
}
|
|
144
|
+
Return ONLY this JSON:
|
|
145
|
+
{"scout": "git-archaeologist", "confidence": 0.0-1.0, "finding": {"likely_cause": "...", "relevant_commits": [], "when_it_broke": "...", "evidence": []}, "suggested_fix": "..."}
|
|
117
146
|
```
|
|
118
147
|
|
|
119
|
-
**Scout 2: Pattern Hunter
|
|
148
|
+
**Scout 2: 🔍 Pattern Hunter**
|
|
120
149
|
```
|
|
121
|
-
You are
|
|
150
|
+
You are {swarm_id}-PatternHunter, a 🔍 Scout Ant.
|
|
122
151
|
|
|
123
|
-
|
|
152
|
+
Find working patterns for: {problem description}
|
|
124
153
|
|
|
125
|
-
|
|
154
|
+
Steps:
|
|
155
|
+
1. Grep/glob for related working code
|
|
156
|
+
2. Find how other parts handle this
|
|
157
|
+
3. Look for test files showing correct usage
|
|
158
|
+
4. Identify applicable patterns
|
|
126
159
|
|
|
127
|
-
|
|
128
|
-
1.
|
|
129
|
-
2. Find how other parts of the codebase handle this
|
|
130
|
-
3. Look for test files that demonstrate correct usage
|
|
131
|
-
4. Identify patterns that could be applied
|
|
132
|
-
|
|
133
|
-
Return JSON:
|
|
134
|
-
{
|
|
135
|
-
"scout": "pattern-hunter",
|
|
136
|
-
"confidence": 0.0-1.0,
|
|
137
|
-
"finding": {
|
|
138
|
-
"working_examples": ["file:line - description"],
|
|
139
|
-
"applicable_patterns": ["pattern descriptions"],
|
|
140
|
-
"differences": "What's different in broken code"
|
|
141
|
-
},
|
|
142
|
-
"suggested_fix": "Based on working patterns"
|
|
143
|
-
}
|
|
160
|
+
Return ONLY this JSON:
|
|
161
|
+
{"scout": "pattern-hunter", "confidence": 0.0-1.0, "finding": {"working_examples": [], "applicable_patterns": [], "differences": "..."}, "suggested_fix": "..."}
|
|
144
162
|
```
|
|
145
163
|
|
|
146
|
-
**Scout 3: Error Analyst
|
|
164
|
+
**Scout 3: 💥 Error Analyst**
|
|
147
165
|
```
|
|
148
|
-
You are
|
|
149
|
-
|
|
150
|
-
PROBLEM: {problem description}
|
|
166
|
+
You are {swarm_id}-ErrorAnalyst, a 🔍 Scout Ant.
|
|
151
167
|
|
|
152
|
-
|
|
168
|
+
Analyze error: {problem description}
|
|
153
169
|
|
|
154
|
-
|
|
155
|
-
1.
|
|
156
|
-
2. Identify
|
|
157
|
-
3. Check for
|
|
158
|
-
4. Look for error handling
|
|
170
|
+
Steps:
|
|
171
|
+
1. Trace through stack trace frames
|
|
172
|
+
2. Identify actual failing line vs surface error
|
|
173
|
+
3. Check for null refs, async issues, type mismatches
|
|
174
|
+
4. Look for error handling masking the issue
|
|
159
175
|
|
|
160
|
-
Return JSON:
|
|
161
|
-
{
|
|
162
|
-
"scout": "error-analyst",
|
|
163
|
-
"confidence": 0.0-1.0,
|
|
164
|
-
"finding": {
|
|
165
|
-
"root_cause": "The actual source of the error",
|
|
166
|
-
"error_chain": ["how error propagates"],
|
|
167
|
-
"masked_by": "any error handling hiding the real issue",
|
|
168
|
-
"category": "null-ref|async|type|logic|config|dependency"
|
|
169
|
-
},
|
|
170
|
-
"suggested_fix": "Direct fix for root cause"
|
|
171
|
-
}
|
|
176
|
+
Return ONLY this JSON:
|
|
177
|
+
{"scout": "error-analyst", "confidence": 0.0-1.0, "finding": {"root_cause": "...", "error_chain": [], "masked_by": "...", "category": "null-ref|async|type|logic|config|dependency"}, "suggested_fix": "..."}
|
|
172
178
|
```
|
|
173
179
|
|
|
174
|
-
**Scout 4: Web Researcher
|
|
180
|
+
**Scout 4: 🌐 Web Researcher**
|
|
175
181
|
```
|
|
176
|
-
You are
|
|
177
|
-
|
|
178
|
-
PROBLEM: {problem description}
|
|
182
|
+
You are {swarm_id}-WebResearcher, a 🔍 Scout Ant.
|
|
179
183
|
|
|
180
|
-
|
|
184
|
+
Research external solutions for: {problem description}
|
|
181
185
|
|
|
182
|
-
|
|
183
|
-
1. Search for
|
|
184
|
-
2.
|
|
185
|
-
3. Check GitHub issues
|
|
186
|
+
Steps:
|
|
187
|
+
1. Search for exact error message
|
|
188
|
+
2. Find library/framework docs
|
|
189
|
+
3. Check GitHub issues
|
|
186
190
|
4. Find Stack Overflow answers
|
|
187
191
|
|
|
188
|
-
Return JSON:
|
|
189
|
-
{
|
|
190
|
-
"scout": "web-researcher",
|
|
191
|
-
"confidence": 0.0-1.0,
|
|
192
|
-
"finding": {
|
|
193
|
-
"known_issue": true/false,
|
|
194
|
-
"documentation_link": "if relevant",
|
|
195
|
-
"similar_issues": ["descriptions of similar problems"],
|
|
196
|
-
"community_solutions": ["approaches others used"]
|
|
197
|
-
},
|
|
198
|
-
"suggested_fix": "From external sources"
|
|
199
|
-
}
|
|
192
|
+
Return ONLY this JSON:
|
|
193
|
+
{"scout": "web-researcher", "confidence": 0.0-1.0, "finding": {"known_issue": true/false, "documentation_link": "...", "similar_issues": [], "community_solutions": []}, "suggested_fix": "..."}
|
|
200
194
|
```
|
|
201
195
|
|
|
202
196
|
Wait for all 4 scouts to complete.
|
|
203
197
|
|
|
204
|
-
|
|
198
|
+
#### Step 6: Collect and Cross-Compare Findings
|
|
205
199
|
|
|
206
200
|
As each scout returns, add their findings:
|
|
207
201
|
```bash
|
|
208
202
|
bash .aether/aether-utils.sh swarm-findings-add "{swarm_id}" "{scout_type}" "{confidence}" '{finding_json}'
|
|
209
203
|
```
|
|
210
204
|
|
|
205
|
+
Update scout status in swarm display to "completed":
|
|
206
|
+
```bash
|
|
207
|
+
bash .aether/aether-utils.sh swarm-display-update "{swarm_id}-Archaeologist" "scout" "completed" "Git history investigation" "Queen" '{"read":3,"grep":0,"edit":0,"bash":5}' 150
|
|
208
|
+
```
|
|
209
|
+
|
|
211
210
|
Display each scout's report as they complete:
|
|
212
211
|
```
|
|
213
|
-
🏛️
|
|
212
|
+
🏛️ Archaeologist [{confidence}]
|
|
214
213
|
{summary of finding}
|
|
215
214
|
|
|
216
|
-
🔍
|
|
215
|
+
🔍 PatternHunter [{confidence}]
|
|
217
216
|
{summary of finding}
|
|
218
217
|
|
|
219
|
-
💥
|
|
218
|
+
💥 ErrorAnalyst [{confidence}]
|
|
220
219
|
{summary of finding}
|
|
221
220
|
|
|
222
|
-
🌐
|
|
221
|
+
🌐 WebResearcher [{confidence}]
|
|
223
222
|
{summary of finding}
|
|
224
223
|
```
|
|
225
224
|
|
|
226
|
-
|
|
225
|
+
#### Step 7: Synthesize Solution
|
|
227
226
|
|
|
228
227
|
Cross-compare all findings:
|
|
229
228
|
1. Identify where scouts agree (high confidence)
|
|
@@ -247,13 +246,13 @@ Rank fix options:
|
|
|
247
246
|
Evidence: {limited support}
|
|
248
247
|
```
|
|
249
248
|
|
|
250
|
-
|
|
249
|
+
#### Step 8: Apply Best Fix
|
|
251
250
|
|
|
252
251
|
Select the highest-confidence solution and apply it:
|
|
253
252
|
|
|
254
253
|
**Command Resolution:** Before running verification, resolve `{build_command}` and `{test_command}` using this priority chain (stop at first match per command):
|
|
255
254
|
1. **CLAUDE.md** — Check project CLAUDE.md (in your system context) for explicit build/test commands
|
|
256
|
-
2. **CODEBASE.md** — Read `.
|
|
255
|
+
2. **CODEBASE.md** — Read `.aether/data/codebase.md` `## Commands` section
|
|
257
256
|
3. **Fallback** — Use project manifest heuristics (e.g., `npm run build`/`npm test` for package.json)
|
|
258
257
|
|
|
259
258
|
```
|
|
@@ -269,7 +268,7 @@ After applying:
|
|
|
269
268
|
{test_command} 2>&1 | tail -50
|
|
270
269
|
```
|
|
271
270
|
|
|
272
|
-
|
|
271
|
+
#### Step 9: Verify and Report
|
|
273
272
|
|
|
274
273
|
**If verification passes:**
|
|
275
274
|
```
|
|
@@ -337,7 +336,12 @@ Recommended:
|
|
|
337
336
|
Swarm will not attempt further fixes on this issue.
|
|
338
337
|
```
|
|
339
338
|
|
|
340
|
-
|
|
339
|
+
#### Step 10: Cleanup
|
|
340
|
+
|
|
341
|
+
Clear swarm display:
|
|
342
|
+
```bash
|
|
343
|
+
bash .aether/aether-utils.sh swarm-display-init "complete-{swarm_id}"
|
|
344
|
+
```
|
|
341
345
|
|
|
342
346
|
Archive swarm findings:
|
|
343
347
|
```bash
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ant:tunnels
|
|
3
|
-
description: "🕳️🐜🕳️ Explore tunnels (browse archived colonies)"
|
|
3
|
+
description: "🕳️🐜🕳️ Explore tunnels (browse archived colonies, compare chambers)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
You are the **Queen**. Browse the colony history.
|
|
7
7
|
|
|
8
8
|
## Instructions
|
|
9
9
|
|
|
10
|
+
### Step -1: Normalize Arguments
|
|
11
|
+
|
|
12
|
+
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
13
|
+
|
|
14
|
+
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
15
|
+
|
|
16
|
+
### Argument Handling
|
|
17
|
+
|
|
18
|
+
- No arguments: Show chamber list (Step 4)
|
|
19
|
+
- One argument: Show single chamber detail (Step 3)
|
|
20
|
+
- Two arguments: Compare two chambers (Step 5)
|
|
21
|
+
- More than two: "Too many arguments. Use: /ant:tunnels [chamber1] [chamber2]"
|
|
22
|
+
|
|
10
23
|
### Step 1: Check for Chambers Directory
|
|
11
24
|
|
|
12
25
|
Check if `.aether/chambers/` exists.
|
|
@@ -44,7 +57,7 @@ Stop here.
|
|
|
44
57
|
|
|
45
58
|
### Step 3: Handle Detail View (if argument provided)
|
|
46
59
|
|
|
47
|
-
If `$
|
|
60
|
+
If `$normalized_args` is not empty:
|
|
48
61
|
- Treat it as chamber name
|
|
49
62
|
- Check if `.aether/chambers/{arguments}/` exists
|
|
50
63
|
- If not found:
|
|
@@ -95,6 +108,98 @@ To get the counts and hash status:
|
|
|
95
108
|
|
|
96
109
|
Stop here.
|
|
97
110
|
|
|
111
|
+
### Step 5: Chamber Comparison Mode (Two Arguments)
|
|
112
|
+
|
|
113
|
+
If two arguments provided (chamber names separated by space):
|
|
114
|
+
- Treat as: `/ant:tunnels <chamber_a> <chamber_b>`
|
|
115
|
+
- Run comparison: `bash .aether/utils/chamber-compare.sh compare <chamber_a> <chamber_b>`
|
|
116
|
+
|
|
117
|
+
If either chamber not found:
|
|
118
|
+
```
|
|
119
|
+
Chamber not found: {chamber_name}
|
|
120
|
+
|
|
121
|
+
Available chambers:
|
|
122
|
+
{list from chamber-list}
|
|
123
|
+
```
|
|
124
|
+
Stop here.
|
|
125
|
+
|
|
126
|
+
Display comparison header:
|
|
127
|
+
```
|
|
128
|
+
🕳️ ═══════════════════════════════════════════════════
|
|
129
|
+
C H A M B E R C O M P A R I S O N
|
|
130
|
+
══════════════════════════════════════════════════ 🕳️
|
|
131
|
+
|
|
132
|
+
📦 {chamber_a} vs 📦 {chamber_b}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Display side-by-side comparison:
|
|
136
|
+
```
|
|
137
|
+
┌─────────────────────┬─────────────────────┐
|
|
138
|
+
│ {chamber_a} │ {chamber_b} │
|
|
139
|
+
├─────────────────────┼─────────────────────┤
|
|
140
|
+
│ 👑 {goal_a} │ 👑 {goal_b} │
|
|
141
|
+
│ │ │
|
|
142
|
+
│ 🏆 {milestone_a} │ 🏆 {milestone_b} │
|
|
143
|
+
│ {version_a} │ {version_b} │
|
|
144
|
+
│ │ │
|
|
145
|
+
│ 📍 {phases_a} done │ 📍 {phases_b} done │
|
|
146
|
+
│ of {total_a} │ of {total_b} │
|
|
147
|
+
│ │ │
|
|
148
|
+
│ 🧠 {decisions_a} │ 🧠 {decisions_b} │
|
|
149
|
+
│ decisions │ decisions │
|
|
150
|
+
│ │ │
|
|
151
|
+
│ 💡 {learnings_a} │ 💡 {learnings_b} │
|
|
152
|
+
│ learnings │ learnings │
|
|
153
|
+
│ │ │
|
|
154
|
+
│ 📅 {date_a} │ 📅 {date_b} │
|
|
155
|
+
└─────────────────────┴─────────────────────┘
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Display growth metrics:
|
|
159
|
+
```
|
|
160
|
+
📈 Growth Between Chambers:
|
|
161
|
+
Phases: +{phases_diff} ({phases_a} → {phases_b})
|
|
162
|
+
Decisions: +{decisions_diff} new
|
|
163
|
+
Learnings: +{learnings_diff} new
|
|
164
|
+
Time: {time_between} days apart
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
If phases_diff > 0: show "📈 Colony grew"
|
|
168
|
+
If phases_diff < 0: show "📉 Colony reduced (unusual)"
|
|
169
|
+
If same_milestone: show "🏆 Same milestone reached"
|
|
170
|
+
If milestone changed: show "🏆 Milestone advanced: {milestone_a} → {milestone_b}"
|
|
171
|
+
|
|
172
|
+
Display pheromone trail diff (new decisions/learnings in B):
|
|
173
|
+
```bash
|
|
174
|
+
bash .aether/utils/chamber-compare.sh diff <chamber_a> <chamber_b>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Parse result and show:
|
|
178
|
+
```
|
|
179
|
+
🧠 New Decisions in {chamber_b}:
|
|
180
|
+
{N} new architectural decisions
|
|
181
|
+
{if N <= 5, list them; else show first 3 + "...and {N-3} more"}
|
|
182
|
+
|
|
183
|
+
💡 New Learnings in {chamber_b}:
|
|
184
|
+
{N} new validated learnings
|
|
185
|
+
{if N <= 5, list them; else show first 3 + "...and {N-3} more"}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Display knowledge preservation:
|
|
189
|
+
```
|
|
190
|
+
📚 Knowledge Preservation:
|
|
191
|
+
{preserved_decisions} decisions carried forward
|
|
192
|
+
{preserved_learnings} learnings carried forward
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Footer:
|
|
196
|
+
```
|
|
197
|
+
Run /ant:tunnels to see all chambers
|
|
198
|
+
Run /ant:tunnels <chamber> to view single chamber details
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Stop here.
|
|
202
|
+
|
|
98
203
|
### Step 4: Display Chamber List (default view)
|
|
99
204
|
|
|
100
205
|
```
|