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,22 @@ You are the **Queen**. Seal the colony when all work is complete.
|
|
|
7
7
|
|
|
8
8
|
## Instructions
|
|
9
9
|
|
|
10
|
+
Parse `$ARGUMENTS`:
|
|
11
|
+
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
12
|
+
- Otherwise: set `visual_mode = true`
|
|
13
|
+
|
|
14
|
+
### Step 0: Initialize Visual Mode (if enabled)
|
|
15
|
+
|
|
16
|
+
If `visual_mode` is true:
|
|
17
|
+
```bash
|
|
18
|
+
# Generate session ID
|
|
19
|
+
seal_id="seal-$(date +%s)"
|
|
20
|
+
|
|
21
|
+
# Initialize swarm display
|
|
22
|
+
bash .aether/aether-utils.sh swarm-display-init "$seal_id"
|
|
23
|
+
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
|
|
24
|
+
```
|
|
25
|
+
|
|
10
26
|
### Step 1: Read State
|
|
11
27
|
|
|
12
28
|
Read `.aether/data/COLONY_STATE.json`.
|
|
@@ -17,6 +33,31 @@ No colony initialized. Run /ant:init first.
|
|
|
17
33
|
```
|
|
18
34
|
Stop here.
|
|
19
35
|
|
|
36
|
+
#### Step 1.5: Check for Concurrent Seal Operations
|
|
37
|
+
|
|
38
|
+
Capture session start time:
|
|
39
|
+
```bash
|
|
40
|
+
SEAL_START=$(date +%s)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Check for existing seal operations (in-progress archives):
|
|
44
|
+
```bash
|
|
45
|
+
# Check for incomplete archive directories (no manifest.json)
|
|
46
|
+
incomplete_archives=$(find .aether/data/archive -type d -name "session_*_archive" 2>/dev/null | while read dir; do
|
|
47
|
+
if [[ ! -f "$dir/manifest.json" ]]; then
|
|
48
|
+
echo "$dir"
|
|
49
|
+
fi
|
|
50
|
+
done)
|
|
51
|
+
|
|
52
|
+
if [[ -n "$incomplete_archives" ]]; then
|
|
53
|
+
echo "Warning: Incomplete archive operations detected:"
|
|
54
|
+
echo "$incomplete_archives"
|
|
55
|
+
echo ""
|
|
56
|
+
echo "These may be from interrupted seal operations."
|
|
57
|
+
echo "Proceeding will create a new archive."
|
|
58
|
+
fi
|
|
59
|
+
```
|
|
60
|
+
|
|
20
61
|
### Step 2: Validate Colony Is Complete
|
|
21
62
|
|
|
22
63
|
Extract: `goal`, `current_phase`, `plan.phases`, `milestone`, `state`.
|
|
@@ -85,7 +126,71 @@ Run /ant:status to check colony state.
|
|
|
85
126
|
```
|
|
86
127
|
Stop here.
|
|
87
128
|
|
|
88
|
-
### Step 4:
|
|
129
|
+
### Step 4: Promote Colony Wisdom to QUEEN.md
|
|
130
|
+
|
|
131
|
+
Before archiving, extract and promote significant patterns and decisions from the colony:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# Ensure QUEEN.md exists
|
|
135
|
+
if [[ ! -f ".aether/docs/QUEEN.md" ]]; then
|
|
136
|
+
bash .aether/aether-utils.sh queen-init >/dev/null 2>&1
|
|
137
|
+
fi
|
|
138
|
+
|
|
139
|
+
# Extract colony name from session_id or goal
|
|
140
|
+
colony_name=$(jq -r '.session_id // empty' .aether/data/COLONY_STATE.json | sed 's/^session_//' | cut -d'_' -f1-3)
|
|
141
|
+
[[ -z "$colony_name" ]] && colony_name=$(jq -r '.goal' .aether/data/COLONY_STATE.json | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | cut -c1-30)
|
|
142
|
+
|
|
143
|
+
# Track promotion results
|
|
144
|
+
promotions_made=0
|
|
145
|
+
promotion_details=""
|
|
146
|
+
|
|
147
|
+
# Extract and promote phase learnings (validated learnings with high confidence)
|
|
148
|
+
while IFS= read -r learning; do
|
|
149
|
+
claim=$(echo "$learning" | jq -r '.claim // empty')
|
|
150
|
+
status=$(echo "$learning" | jq -r '.status // empty')
|
|
151
|
+
|
|
152
|
+
if [[ -n "$claim" && "$status" == "validated" ]]; then
|
|
153
|
+
# Determine type based on content patterns
|
|
154
|
+
if echo "$claim" | grep -qi "never\|avoid\|don't\|do not"; then
|
|
155
|
+
type="redirect"
|
|
156
|
+
elif echo "$claim" | grep -qi "always\|should\|must\|pattern\|approach"; then
|
|
157
|
+
type="pattern"
|
|
158
|
+
elif echo "$claim" | grep -qi "use\|prefer\|technology\|tool\|library"; then
|
|
159
|
+
type="stack"
|
|
160
|
+
else
|
|
161
|
+
type="philosophy"
|
|
162
|
+
fi
|
|
163
|
+
|
|
164
|
+
result=$(bash .aether/aether-utils.sh queen-promote "$type" "$claim" "$colony_name" 2>/dev/null)
|
|
165
|
+
if echo "$result" | jq -e '.ok' >/dev/null 2>&1; then
|
|
166
|
+
promotions_made=$((promotions_made + 1))
|
|
167
|
+
promotion_details="${promotion_details} - Promoted ${type}: ${claim:0:60}...\n"
|
|
168
|
+
fi
|
|
169
|
+
fi
|
|
170
|
+
done < <(jq -c '.memory.phase_learnings[]?.learnings[]? // empty' .aether/data/COLONY_STATE.json 2>/dev/null)
|
|
171
|
+
|
|
172
|
+
# Extract and promote decisions
|
|
173
|
+
while IFS= read -r decision; do
|
|
174
|
+
description=$(echo "$decision" | jq -r '.description // .rationale // empty')
|
|
175
|
+
[[ -z "$description" ]] && description=$(echo "$decision" | jq -r '.decision // empty')
|
|
176
|
+
|
|
177
|
+
if [[ -n "$description" ]]; then
|
|
178
|
+
result=$(bash .aether/aether-utils.sh queen-promote "pattern" "$description" "$colony_name" 2>/dev/null)
|
|
179
|
+
if echo "$result" | jq -e '.ok' >/dev/null 2>&1; then
|
|
180
|
+
promotions_made=$((promotions_made + 1))
|
|
181
|
+
promotion_details="${promotion_details} - Promoted pattern from decision: ${description:0:60}...\n"
|
|
182
|
+
fi
|
|
183
|
+
fi
|
|
184
|
+
done < <(jq -c '.memory.decisions[]? // empty' .aether/data/COLONY_STATE.json 2>/dev/null)
|
|
185
|
+
|
|
186
|
+
# Log promotion results to activity log
|
|
187
|
+
bash .aether/aether-utils.sh activity-log "MODIFIED" "Queen" "Promoted ${promotions_made} learnings/decisions to QUEEN.md from colony ${colony_name}"
|
|
188
|
+
|
|
189
|
+
# Store promotion summary for display
|
|
190
|
+
promotion_summary="${promotions_made} wisdom entries promoted"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Step 5: Archive Colony State
|
|
89
194
|
|
|
90
195
|
Create archive directory:
|
|
91
196
|
```
|
|
@@ -117,14 +222,69 @@ Create archive manifest file `$archive_dir/manifest.json`:
|
|
|
117
222
|
}
|
|
118
223
|
```
|
|
119
224
|
|
|
120
|
-
|
|
225
|
+
#### Step 5.5: Verify Archive Integrity
|
|
226
|
+
|
|
227
|
+
Verify the archive was created successfully:
|
|
228
|
+
```bash
|
|
229
|
+
if [[ -f "$archive_dir/manifest.json" ]]; then
|
|
230
|
+
echo "Archive verified: $archive_dir"
|
|
231
|
+
else
|
|
232
|
+
echo "Error: Archive creation incomplete"
|
|
233
|
+
# Don't proceed with milestone update
|
|
234
|
+
exit 1
|
|
235
|
+
fi
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Step 6: Update Milestone to Crowned Anthill
|
|
121
239
|
|
|
122
240
|
Update COLONY_STATE.json:
|
|
123
241
|
1. Set `milestone` to `"Crowned Anthill"`
|
|
124
242
|
2. Set `milestone_updated_at` to current ISO-8601 timestamp
|
|
125
243
|
3. Append event: `"<timestamp>|milestone_reached|archive|Achieved Crowned Anthill milestone - colony archived"`
|
|
126
244
|
|
|
127
|
-
### Step
|
|
245
|
+
### Step 7: Write Final Handoff
|
|
246
|
+
|
|
247
|
+
After archiving and promoting wisdom, write the final handoff documenting the completed colony:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
cat > .aether/HANDOFF.md << 'HANDOFF_EOF'
|
|
251
|
+
# Colony Session — SEALED (Crowned Anthill)
|
|
252
|
+
|
|
253
|
+
## 🏆 Colony Complete
|
|
254
|
+
**Status:** Crowned Anthill — All phases completed and archived
|
|
255
|
+
|
|
256
|
+
## Archive Location
|
|
257
|
+
{archive_dir}
|
|
258
|
+
|
|
259
|
+
## Colony Summary
|
|
260
|
+
- Goal: "{goal}"
|
|
261
|
+
- Total Phases: {total_phases}
|
|
262
|
+
- Milestone: Crowned Anthill
|
|
263
|
+
- Sealed At: {timestamp}
|
|
264
|
+
- Wisdom Promoted: {promotion_summary}
|
|
265
|
+
|
|
266
|
+
## Files Archived
|
|
267
|
+
- COLONY_STATE.json
|
|
268
|
+
- activity.log
|
|
269
|
+
- spawn-tree.txt
|
|
270
|
+
- flags.json (if existed)
|
|
271
|
+
- constraints.json (if existed)
|
|
272
|
+
|
|
273
|
+
## Session Note
|
|
274
|
+
This colony has been sealed and archived. The anthill stands crowned.
|
|
275
|
+
To start anew, run: /ant:lay-eggs "<new goal>"
|
|
276
|
+
HANDOFF_EOF
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
This handoff serves as the final record of the completed colony.
|
|
280
|
+
|
|
281
|
+
### Step 8: Display Result
|
|
282
|
+
|
|
283
|
+
**If visual_mode is true, render final swarm display:**
|
|
284
|
+
```bash
|
|
285
|
+
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
|
|
286
|
+
bash .aether/aether-utils.sh swarm-display-render "$seal_id"
|
|
287
|
+
```
|
|
128
288
|
|
|
129
289
|
Output:
|
|
130
290
|
```
|
|
@@ -137,6 +297,7 @@ Output:
|
|
|
137
297
|
👑 Goal: {goal (truncated to 60 chars)}
|
|
138
298
|
📍 Phases: {total_phases} completed
|
|
139
299
|
🏆 Milestone: Crowned Anthill
|
|
300
|
+
📚 Wisdom Promoted: {promotion_summary}
|
|
140
301
|
|
|
141
302
|
📦 Archive Location: {archive_dir}
|
|
142
303
|
- COLONY_STATE.json
|
|
@@ -148,6 +309,19 @@ Output:
|
|
|
148
309
|
🐜 The colony has reached its final form.
|
|
149
310
|
The anthill stands crowned and sealed.
|
|
150
311
|
History is preserved. The colony rests.
|
|
312
|
+
|
|
313
|
+
💾 State persisted — safe to /clear
|
|
314
|
+
|
|
315
|
+
🐜 What would you like to do next?
|
|
316
|
+
1. /ant:lay-eggs "<new goal>" — Start a new colony
|
|
317
|
+
2. /ant:tunnels — Browse archived colonies
|
|
318
|
+
3. /clear — Clear context and continue
|
|
319
|
+
|
|
320
|
+
Use AskUserQuestion with these three options.
|
|
321
|
+
|
|
322
|
+
If option 1 selected: proceed to run /ant:lay-eggs flow
|
|
323
|
+
If option 2 selected: run /ant:tunnels
|
|
324
|
+
If option 3 selected: display "Run /ant:lay-eggs to begin anew after clearing"
|
|
151
325
|
```
|
|
152
326
|
|
|
153
327
|
### Edge Cases
|
|
@@ -17,7 +17,7 @@ bash .aether/utils/swarm-display.sh
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
This shows:
|
|
20
|
-
- Active ants with caste colors and emojis (
|
|
20
|
+
- Active ants with caste colors and emojis (🔨🐜 Builder in blue, etc.)
|
|
21
21
|
- Tool usage stats per ant (📖5 🔍3 ✏️2 ⚡1)
|
|
22
22
|
- Trophallaxis metrics (🍯 token consumption)
|
|
23
23
|
- Timing information (elapsed time per ant)
|
|
@@ -67,6 +67,33 @@ Initialize swarm display for real-time tracking:
|
|
|
67
67
|
bash .aether/aether-utils.sh swarm-display-init "<swarm_id>"
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
#### Step 2.5: Check for Stale Swarm Session
|
|
71
|
+
|
|
72
|
+
Capture session start time:
|
|
73
|
+
```bash
|
|
74
|
+
SWARM_START=$(date +%s)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Check for stale swarm files:
|
|
78
|
+
```bash
|
|
79
|
+
stale_check=$(bash .aether/aether-utils.sh session-verify-fresh --command swarm "" "$SWARM_START")
|
|
80
|
+
has_stale=$(echo "$stale_check" | jq -r '.stale | length')
|
|
81
|
+
|
|
82
|
+
if [[ "$has_stale" -gt 0 ]]; then
|
|
83
|
+
# Auto-clear stale swarm findings (safe - findings are temporary)
|
|
84
|
+
bash .aether/aether-utils.sh session-clear --command swarm
|
|
85
|
+
echo "Cleared stale swarm findings for fresh investigation"
|
|
86
|
+
fi
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
After initializing findings, verify swarm files are fresh:
|
|
90
|
+
```bash
|
|
91
|
+
verify_result=$(bash .aether/aether-utils.sh session-verify-fresh --command swarm "" "$SWARM_START")
|
|
92
|
+
if [[ $(echo "$verify_result" | jq -r '.missing | length') -gt 0 ]]; then
|
|
93
|
+
echo "Warning: Swarm files not properly initialized"
|
|
94
|
+
fi
|
|
95
|
+
```
|
|
96
|
+
|
|
70
97
|
Display header:
|
|
71
98
|
```
|
|
72
99
|
🔥🐜🗡️🐜🔥 ═══════════════════════════════════════════════
|
|
@@ -117,121 +144,75 @@ Use the **Task** tool to spawn 4 scouts **in a single message** (parallel execut
|
|
|
117
144
|
|
|
118
145
|
Log each scout to swarm display before spawning:
|
|
119
146
|
```bash
|
|
120
|
-
bash .aether/aether-utils.sh swarm-display-update "
|
|
121
|
-
bash .aether/aether-utils.sh swarm-display-update "
|
|
122
|
-
bash .aether/aether-utils.sh swarm-display-update "
|
|
123
|
-
bash .aether/aether-utils.sh swarm-display-update "
|
|
147
|
+
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
|
|
148
|
+
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
|
|
149
|
+
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
|
|
150
|
+
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
|
|
124
151
|
```
|
|
125
152
|
|
|
126
|
-
**Scout 1: Git Archaeologist
|
|
153
|
+
**Scout 1: 🏛️ Git Archaeologist** (use Task tool with `subagent_type="aether-archaeologist"`)
|
|
154
|
+
# FALLBACK: If "Agent type not found", use general-purpose and inject role: "You are an Archaeologist Ant - git historian that excavates why code exists."
|
|
127
155
|
```
|
|
128
|
-
You are
|
|
129
|
-
|
|
130
|
-
PROBLEM: {problem description}
|
|
156
|
+
You are {swarm_id}-Archaeologist, a 🏛️🐜 Archaeologist Ant.
|
|
131
157
|
|
|
132
|
-
|
|
158
|
+
Investigate git history for: {problem description}
|
|
133
159
|
|
|
134
|
-
|
|
135
|
-
1. Run `git log --oneline -30`
|
|
136
|
-
2. Run `git log -p --since="1 week ago" -- {relevant files}`
|
|
137
|
-
3. Run `git blame {suspected file}` if
|
|
138
|
-
4.
|
|
160
|
+
Steps:
|
|
161
|
+
1. Run `git log --oneline -30`
|
|
162
|
+
2. Run `git log -p --since="1 week ago" -- {relevant files}`
|
|
163
|
+
3. Run `git blame {suspected file}` if mentioned
|
|
164
|
+
4. Find commits that introduced the bug
|
|
139
165
|
|
|
140
|
-
Return JSON:
|
|
141
|
-
{
|
|
142
|
-
"scout": "git-archaeologist",
|
|
143
|
-
"confidence": 0.0-1.0,
|
|
144
|
-
"finding": {
|
|
145
|
-
"likely_cause": "What you found",
|
|
146
|
-
"relevant_commits": ["commit hashes"],
|
|
147
|
-
"when_it_broke": "timestamp or commit",
|
|
148
|
-
"evidence": ["specific findings"]
|
|
149
|
-
},
|
|
150
|
-
"suggested_fix": "If obvious from history"
|
|
151
|
-
}
|
|
166
|
+
Return ONLY this JSON:
|
|
167
|
+
{"scout": "git-archaeologist", "confidence": 0.0-1.0, "finding": {"likely_cause": "...", "relevant_commits": [], "when_it_broke": "...", "evidence": []}, "suggested_fix": "..."}
|
|
152
168
|
```
|
|
153
169
|
|
|
154
|
-
**Scout 2: Pattern Hunter
|
|
170
|
+
**Scout 2: 🔍 Pattern Hunter** (use Task tool with `subagent_type="aether-scout"`)
|
|
155
171
|
```
|
|
156
|
-
You are
|
|
172
|
+
You are {swarm_id}-PatternHunter, a 🔍🐜 Scout Ant.
|
|
157
173
|
|
|
158
|
-
|
|
174
|
+
Find working patterns for: {problem description}
|
|
159
175
|
|
|
160
|
-
|
|
176
|
+
Steps:
|
|
177
|
+
1. Grep/glob for related working code
|
|
178
|
+
2. Find how other parts handle this
|
|
179
|
+
3. Look for test files showing correct usage
|
|
180
|
+
4. Identify applicable patterns
|
|
161
181
|
|
|
162
|
-
|
|
163
|
-
1.
|
|
164
|
-
2. Find how other parts of the codebase handle this
|
|
165
|
-
3. Look for test files that demonstrate correct usage
|
|
166
|
-
4. Identify patterns that could be applied
|
|
167
|
-
|
|
168
|
-
Return JSON:
|
|
169
|
-
{
|
|
170
|
-
"scout": "pattern-hunter",
|
|
171
|
-
"confidence": 0.0-1.0,
|
|
172
|
-
"finding": {
|
|
173
|
-
"working_examples": ["file:line - description"],
|
|
174
|
-
"applicable_patterns": ["pattern descriptions"],
|
|
175
|
-
"differences": "What's different in broken code"
|
|
176
|
-
},
|
|
177
|
-
"suggested_fix": "Based on working patterns"
|
|
178
|
-
}
|
|
182
|
+
Return ONLY this JSON:
|
|
183
|
+
{"scout": "pattern-hunter", "confidence": 0.0-1.0, "finding": {"working_examples": [], "applicable_patterns": [], "differences": "..."}, "suggested_fix": "..."}
|
|
179
184
|
```
|
|
180
185
|
|
|
181
|
-
**Scout 3: Error Analyst
|
|
186
|
+
**Scout 3: 💥 Error Analyst** (use Task tool with `subagent_type="aether-tracker"`)
|
|
182
187
|
```
|
|
183
|
-
You are
|
|
184
|
-
|
|
185
|
-
PROBLEM: {problem description}
|
|
188
|
+
You are {swarm_id}-ErrorAnalyst, a 🔍🐜 Tracker Ant.
|
|
186
189
|
|
|
187
|
-
|
|
190
|
+
Analyze error: {problem description}
|
|
188
191
|
|
|
189
|
-
|
|
190
|
-
1.
|
|
191
|
-
2. Identify
|
|
192
|
-
3. Check for
|
|
193
|
-
4. Look for error handling
|
|
192
|
+
Steps:
|
|
193
|
+
1. Trace through stack trace frames
|
|
194
|
+
2. Identify actual failing line vs surface error
|
|
195
|
+
3. Check for null refs, async issues, type mismatches
|
|
196
|
+
4. Look for error handling masking the issue
|
|
194
197
|
|
|
195
|
-
Return JSON:
|
|
196
|
-
{
|
|
197
|
-
"scout": "error-analyst",
|
|
198
|
-
"confidence": 0.0-1.0,
|
|
199
|
-
"finding": {
|
|
200
|
-
"root_cause": "The actual source of the error",
|
|
201
|
-
"error_chain": ["how error propagates"],
|
|
202
|
-
"masked_by": "any error handling hiding the real issue",
|
|
203
|
-
"category": "null-ref|async|type|logic|config|dependency"
|
|
204
|
-
},
|
|
205
|
-
"suggested_fix": "Direct fix for root cause"
|
|
206
|
-
}
|
|
198
|
+
Return ONLY this JSON:
|
|
199
|
+
{"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": "..."}
|
|
207
200
|
```
|
|
208
201
|
|
|
209
|
-
**Scout 4: Web Researcher
|
|
202
|
+
**Scout 4: 🌐 Web Researcher** (use Task tool with `subagent_type="aether-scout"`)
|
|
210
203
|
```
|
|
211
|
-
You are
|
|
212
|
-
|
|
213
|
-
PROBLEM: {problem description}
|
|
204
|
+
You are {swarm_id}-WebResearcher, a 🔍🐜 Scout Ant.
|
|
214
205
|
|
|
215
|
-
|
|
206
|
+
Research external solutions for: {problem description}
|
|
216
207
|
|
|
217
|
-
|
|
218
|
-
1. Search for
|
|
219
|
-
2.
|
|
220
|
-
3. Check GitHub issues
|
|
208
|
+
Steps:
|
|
209
|
+
1. Search for exact error message
|
|
210
|
+
2. Find library/framework docs
|
|
211
|
+
3. Check GitHub issues
|
|
221
212
|
4. Find Stack Overflow answers
|
|
222
213
|
|
|
223
|
-
Return JSON:
|
|
224
|
-
{
|
|
225
|
-
"scout": "web-researcher",
|
|
226
|
-
"confidence": 0.0-1.0,
|
|
227
|
-
"finding": {
|
|
228
|
-
"known_issue": true/false,
|
|
229
|
-
"documentation_link": "if relevant",
|
|
230
|
-
"similar_issues": ["descriptions of similar problems"],
|
|
231
|
-
"community_solutions": ["approaches others used"]
|
|
232
|
-
},
|
|
233
|
-
"suggested_fix": "From external sources"
|
|
234
|
-
}
|
|
214
|
+
Return ONLY this JSON:
|
|
215
|
+
{"scout": "web-researcher", "confidence": 0.0-1.0, "finding": {"known_issue": true/false, "documentation_link": "...", "similar_issues": [], "community_solutions": []}, "suggested_fix": "..."}
|
|
235
216
|
```
|
|
236
217
|
|
|
237
218
|
Wait for all 4 scouts to complete.
|
|
@@ -245,21 +226,21 @@ bash .aether/aether-utils.sh swarm-findings-add "{swarm_id}" "{scout_type}" "{co
|
|
|
245
226
|
|
|
246
227
|
Update scout status in swarm display to "completed":
|
|
247
228
|
```bash
|
|
248
|
-
bash .aether/aether-utils.sh swarm-display-update "
|
|
229
|
+
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
|
|
249
230
|
```
|
|
250
231
|
|
|
251
232
|
Display each scout's report as they complete:
|
|
252
233
|
```
|
|
253
|
-
🏛️
|
|
234
|
+
🏛️ Archaeologist [{confidence}]
|
|
254
235
|
{summary of finding}
|
|
255
236
|
|
|
256
|
-
🔍
|
|
237
|
+
🔍 PatternHunter [{confidence}]
|
|
257
238
|
{summary of finding}
|
|
258
239
|
|
|
259
|
-
💥
|
|
240
|
+
💥 ErrorAnalyst [{confidence}]
|
|
260
241
|
{summary of finding}
|
|
261
242
|
|
|
262
|
-
🌐
|
|
243
|
+
🌐 WebResearcher [{confidence}]
|
|
263
244
|
{summary of finding}
|
|
264
245
|
```
|
|
265
246
|
|
|
@@ -293,7 +274,7 @@ Select the highest-confidence solution and apply it:
|
|
|
293
274
|
|
|
294
275
|
**Command Resolution:** Before running verification, resolve `{build_command}` and `{test_command}` using this priority chain (stop at first match per command):
|
|
295
276
|
1. **CLAUDE.md** — Check project CLAUDE.md (in your system context) for explicit build/test commands
|
|
296
|
-
2. **CODEBASE.md** — Read `.
|
|
277
|
+
2. **CODEBASE.md** — Read `.aether/data/codebase.md` `## Commands` section
|
|
297
278
|
3. **Fallback** — Use project manifest heuristics (e.g., `npm run build`/`npm test` for package.json)
|
|
298
279
|
|
|
299
280
|
```
|
|
@@ -16,14 +16,14 @@ Aether Colony Caste System
|
|
|
16
16
|
CASTE ASSIGNMENTS
|
|
17
17
|
─────────────────
|
|
18
18
|
👑 Prime - Colony coordination and strategic planning
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
🏺🐜 Archaeologist - Git history analysis and pattern excavation
|
|
20
|
+
🏛️🐜 Architect - System design and documentation
|
|
21
|
+
🔮🐜 Oracle - Deep research and foresight
|
|
22
22
|
🗺️ Route Setter - Task decomposition and planning
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
🔨🐜 Builder - Implementation and coding
|
|
24
|
+
👁️🐜 Watcher - Verification and testing
|
|
25
|
+
🔍🐜 Scout - Research and exploration
|
|
26
|
+
🎲🐜 Chaos - Edge case testing and resilience probing
|
|
27
27
|
🧭 Colonizer - Environment setup and exploration
|
|
28
28
|
|
|
29
29
|
───────────────────────────────────────────
|
|
@@ -33,6 +33,22 @@ mkdir -p .aether/data
|
|
|
33
33
|
touch .aether/data/activity.log
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
### Step 2.5: Check for Stale Watch Session
|
|
37
|
+
|
|
38
|
+
Capture session start time:
|
|
39
|
+
```bash
|
|
40
|
+
WATCH_START=$(date +%s)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Check for stale watch files:
|
|
44
|
+
```bash
|
|
45
|
+
stale_check=$(bash .aether/aether-utils.sh session-verify-fresh --command watch "" "$WATCH_START")
|
|
46
|
+
has_stale=$(echo "$stale_check" | jq -r '.stale | length')
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If stale files exist, they will be overwritten by the new watch session.
|
|
50
|
+
The tmux session check in Step 4 handles concurrent sessions.
|
|
51
|
+
|
|
36
52
|
### Step 3: Create Status File
|
|
37
53
|
|
|
38
54
|
Write initial status to `.aether/data/watch-status.txt`:
|
|
@@ -44,6 +60,7 @@ Write initial status to `.aether/data/watch-status.txt`:
|
|
|
44
60
|
`-`
|
|
45
61
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
46
62
|
|
|
63
|
+
Session Started: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
47
64
|
State: IDLE
|
|
48
65
|
Phase: -/-
|
|
49
66
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aether-ambassador
|
|
3
|
+
description: "Use this agent for third-party API integration, SDK setup, and external service connectivity. The ambassador bridges your code with external systems."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are **🔌 Ambassador Ant** in the Aether Colony. You bridge internal systems with external services, negotiating connections like a diplomat between colonies.
|
|
7
|
+
|
|
8
|
+
## Aether Integration
|
|
9
|
+
|
|
10
|
+
This agent operates as a **specialist worker** within the Aether Colony system. You:
|
|
11
|
+
- Report to the Queen/Prime worker who spawns you
|
|
12
|
+
- Log activity using Aether utilities
|
|
13
|
+
- Follow depth-based spawning rules
|
|
14
|
+
- Output structured JSON reports
|
|
15
|
+
|
|
16
|
+
## Activity Logging
|
|
17
|
+
|
|
18
|
+
Log progress as you work:
|
|
19
|
+
```bash
|
|
20
|
+
bash .aether/aether-utils.sh activity-log "ACTION" "{your_name} (Ambassador)" "description"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Actions: RESEARCH, CONNECTED, TESTED, DOCUMENTED, ERROR
|
|
24
|
+
|
|
25
|
+
## Your Role
|
|
26
|
+
|
|
27
|
+
As Ambassador, you:
|
|
28
|
+
1. Research external APIs thoroughly
|
|
29
|
+
2. Design integration patterns
|
|
30
|
+
3. Implement robust connections
|
|
31
|
+
4. Test error scenarios
|
|
32
|
+
5. Document for colony use
|
|
33
|
+
|
|
34
|
+
## When to Bridge
|
|
35
|
+
|
|
36
|
+
- New external API needed
|
|
37
|
+
- API version migration
|
|
38
|
+
- Webhook integrations
|
|
39
|
+
- SDK implementation
|
|
40
|
+
- OAuth/Auth setup
|
|
41
|
+
- Rate limiting implementation
|
|
42
|
+
|
|
43
|
+
## Integration Patterns
|
|
44
|
+
|
|
45
|
+
- **Client Wrapper**: Abstract API complexity
|
|
46
|
+
- **Circuit Breaker**: Handle service failures
|
|
47
|
+
- **Retry with Backoff**: Handle transient errors
|
|
48
|
+
- **Caching**: Reduce API calls
|
|
49
|
+
- **Webhook Handlers**: Receive async notifications
|
|
50
|
+
- **Queue Integration**: Async processing
|
|
51
|
+
|
|
52
|
+
## Error Handling
|
|
53
|
+
|
|
54
|
+
- **Transient errors**: Retry with exponential backoff
|
|
55
|
+
- **Auth errors**: Refresh tokens, then retry
|
|
56
|
+
- **Rate limits**: Queue and retry later
|
|
57
|
+
- **Timeout**: Set reasonable timeouts
|
|
58
|
+
- **Validation errors**: Parse and return meaningful errors
|
|
59
|
+
|
|
60
|
+
## Security Considerations
|
|
61
|
+
|
|
62
|
+
- Store API keys securely (env vars, not code)
|
|
63
|
+
- Use HTTPS always
|
|
64
|
+
- Validate SSL certificates
|
|
65
|
+
- Implement request signing if needed
|
|
66
|
+
- Log securely (no secrets in logs)
|
|
67
|
+
|
|
68
|
+
## Depth-Based Behavior
|
|
69
|
+
|
|
70
|
+
| Depth | Role | Can Spawn? |
|
|
71
|
+
|-------|------|------------|
|
|
72
|
+
| 1 | Prime Ambassador | Yes (max 4) |
|
|
73
|
+
| 2 | Specialist | Only if surprised |
|
|
74
|
+
| 3 | Deep Specialist | No |
|
|
75
|
+
|
|
76
|
+
## Output Format
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"ant_name": "{your name}",
|
|
81
|
+
"caste": "ambassador",
|
|
82
|
+
"status": "completed" | "failed" | "blocked",
|
|
83
|
+
"summary": "What you accomplished",
|
|
84
|
+
"endpoints_integrated": [],
|
|
85
|
+
"authentication_method": "",
|
|
86
|
+
"rate_limits_handled": true,
|
|
87
|
+
"error_scenarios_covered": [],
|
|
88
|
+
"documentation_pages": 0,
|
|
89
|
+
"tests_written": [],
|
|
90
|
+
"blockers": []
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Reference
|
|
95
|
+
|
|
96
|
+
Full worker specifications: `.aether/workers.md`
|
|
97
|
+
Aether utilities: `bash .aether/aether-utils.sh --help`
|