aether-colony 5.2.1 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.aether/aether-utils.sh +35 -0
- package/.aether/agents/aether-ambassador.md +140 -0
- package/.aether/agents/aether-archaeologist.md +108 -0
- package/.aether/agents/aether-architect.md +133 -0
- package/.aether/agents/aether-auditor.md +144 -0
- package/.aether/agents/aether-builder.md +184 -0
- package/.aether/agents/aether-chaos.md +115 -0
- package/.aether/agents/aether-chronicler.md +122 -0
- package/.aether/agents/aether-gatekeeper.md +116 -0
- package/.aether/agents/aether-includer.md +117 -0
- package/.aether/agents/aether-keeper.md +177 -0
- package/.aether/agents/aether-measurer.md +128 -0
- package/.aether/agents/aether-oracle.md +137 -0
- package/.aether/agents/aether-probe.md +133 -0
- package/.aether/agents/aether-queen.md +286 -0
- package/.aether/agents/aether-route-setter.md +130 -0
- package/.aether/agents/aether-sage.md +106 -0
- package/.aether/agents/aether-scout.md +101 -0
- package/.aether/agents/aether-surveyor-disciplines.md +391 -0
- package/.aether/agents/aether-surveyor-nest.md +329 -0
- package/.aether/agents/aether-surveyor-pathogens.md +264 -0
- package/.aether/agents/aether-surveyor-provisions.md +334 -0
- package/.aether/agents/aether-tracker.md +137 -0
- package/.aether/agents/aether-watcher.md +174 -0
- package/.aether/agents/aether-weaver.md +130 -0
- package/.aether/commands/claude/archaeology.md +334 -0
- package/.aether/commands/claude/build.md +65 -0
- package/.aether/commands/claude/chaos.md +336 -0
- package/.aether/commands/claude/colonize.md +259 -0
- package/.aether/commands/claude/continue.md +60 -0
- package/.aether/commands/claude/council.md +507 -0
- package/.aether/commands/claude/data-clean.md +81 -0
- package/.aether/commands/claude/dream.md +268 -0
- package/.aether/commands/claude/entomb.md +498 -0
- package/.aether/commands/claude/export-signals.md +57 -0
- package/.aether/commands/claude/feedback.md +96 -0
- package/.aether/commands/claude/flag.md +151 -0
- package/.aether/commands/claude/flags.md +169 -0
- package/.aether/commands/claude/focus.md +76 -0
- package/.aether/commands/claude/help.md +154 -0
- package/.aether/commands/claude/history.md +140 -0
- package/.aether/commands/claude/import-signals.md +71 -0
- package/.aether/commands/claude/init.md +505 -0
- package/.aether/commands/claude/insert-phase.md +105 -0
- package/.aether/commands/claude/interpret.md +278 -0
- package/.aether/commands/claude/lay-eggs.md +210 -0
- package/.aether/commands/claude/maturity.md +113 -0
- package/.aether/commands/claude/memory-details.md +77 -0
- package/.aether/commands/claude/migrate-state.md +171 -0
- package/.aether/commands/claude/oracle.md +642 -0
- package/.aether/commands/claude/organize.md +232 -0
- package/.aether/commands/claude/patrol.md +620 -0
- package/.aether/commands/claude/pause-colony.md +233 -0
- package/.aether/commands/claude/phase.md +115 -0
- package/.aether/commands/claude/pheromones.md +156 -0
- package/.aether/commands/claude/plan.md +693 -0
- package/.aether/commands/claude/preferences.md +65 -0
- package/.aether/commands/claude/quick.md +100 -0
- package/.aether/commands/claude/redirect.md +76 -0
- package/.aether/commands/claude/resume-colony.md +197 -0
- package/.aether/commands/claude/resume.md +388 -0
- package/.aether/commands/claude/run.md +231 -0
- package/.aether/commands/claude/seal.md +774 -0
- package/.aether/commands/claude/skill-create.md +286 -0
- package/.aether/commands/claude/status.md +410 -0
- package/.aether/commands/claude/swarm.md +349 -0
- package/.aether/commands/claude/tunnels.md +426 -0
- package/.aether/commands/claude/update.md +132 -0
- package/.aether/commands/claude/verify-castes.md +143 -0
- package/.aether/commands/claude/watch.md +239 -0
- package/.aether/commands/opencode/archaeology.md +331 -0
- package/.aether/commands/opencode/build.md +1168 -0
- package/.aether/commands/opencode/chaos.md +329 -0
- package/.aether/commands/opencode/colonize.md +195 -0
- package/.aether/commands/opencode/continue.md +1436 -0
- package/.aether/commands/opencode/council.md +437 -0
- package/.aether/commands/opencode/data-clean.md +77 -0
- package/.aether/commands/opencode/dream.md +260 -0
- package/.aether/commands/opencode/entomb.md +377 -0
- package/.aether/commands/opencode/export-signals.md +54 -0
- package/.aether/commands/opencode/feedback.md +99 -0
- package/.aether/commands/opencode/flag.md +149 -0
- package/.aether/commands/opencode/flags.md +167 -0
- package/.aether/commands/opencode/focus.md +73 -0
- package/.aether/commands/opencode/help.md +157 -0
- package/.aether/commands/opencode/history.md +136 -0
- package/.aether/commands/opencode/import-signals.md +68 -0
- package/.aether/commands/opencode/init.md +518 -0
- package/.aether/commands/opencode/insert-phase.md +111 -0
- package/.aether/commands/opencode/interpret.md +272 -0
- package/.aether/commands/opencode/lay-eggs.md +213 -0
- package/.aether/commands/opencode/maturity.md +108 -0
- package/.aether/commands/opencode/memory-details.md +83 -0
- package/.aether/commands/opencode/migrate-state.md +165 -0
- package/.aether/commands/opencode/oracle.md +593 -0
- package/.aether/commands/opencode/organize.md +226 -0
- package/.aether/commands/opencode/patrol.md +626 -0
- package/.aether/commands/opencode/pause-colony.md +203 -0
- package/.aether/commands/opencode/phase.md +113 -0
- package/.aether/commands/opencode/pheromones.md +162 -0
- package/.aether/commands/opencode/plan.md +684 -0
- package/.aether/commands/opencode/preferences.md +71 -0
- package/.aether/commands/opencode/quick.md +91 -0
- package/.aether/commands/opencode/redirect.md +84 -0
- package/.aether/commands/opencode/resume-colony.md +190 -0
- package/.aether/commands/opencode/resume.md +394 -0
- package/.aether/commands/opencode/run.md +237 -0
- package/.aether/commands/opencode/seal.md +452 -0
- package/.aether/commands/opencode/skill-create.md +63 -0
- package/.aether/commands/opencode/status.md +307 -0
- package/.aether/commands/opencode/swarm.md +15 -0
- package/.aether/commands/opencode/tunnels.md +400 -0
- package/.aether/commands/opencode/update.md +127 -0
- package/.aether/commands/opencode/verify-castes.md +139 -0
- package/.aether/commands/opencode/watch.md +227 -0
- package/.aether/docs/command-playbooks/build-full.md +1 -1
- package/.aether/docs/command-playbooks/build-prep.md +10 -3
- package/.aether/docs/command-playbooks/build-verify.md +51 -0
- package/.aether/docs/command-playbooks/continue-advance.md +115 -6
- package/.aether/docs/command-playbooks/continue-verify.md +32 -0
- package/.aether/utils/clash-detect.sh +239 -0
- package/.aether/utils/hooks/clash-pre-tool-use.js +99 -0
- package/.aether/utils/merge-driver-lockfile.sh +35 -0
- package/.aether/utils/midden.sh +534 -0
- package/.aether/utils/pheromone.sh +1376 -108
- package/.aether/utils/queen.sh +2 -4
- package/.aether/utils/state-api.sh +25 -4
- package/.aether/utils/swarm.sh +1 -1
- package/.aether/utils/worktree.sh +189 -0
- package/.claude/commands/ant/init.md +9 -3
- package/.opencode/commands/ant/init.md +9 -2
- package/CHANGELOG.md +26 -0
- package/README.md +11 -8
- package/bin/cli.js +103 -61
- package/bin/lib/banner.js +14 -0
- package/bin/lib/init.js +8 -7
- package/bin/lib/interactive-setup.js +251 -0
- package/bin/npx-entry.js +21 -0
- package/bin/npx-install.js +9 -167
- package/bin/validate-package.sh +23 -0
- package/package.json +2 -2
- package/.aether/docs/plans/pheromone-display-plan.md +0 -257
- package/.aether/schemas/example-prompt-builder.xml +0 -234
- package/.aether/scripts/incident-test-add.sh +0 -47
- package/.aether/scripts/weekly-audit.sh +0 -79
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
# Pheromone Display Enhancement Plan
|
|
2
|
-
|
|
3
|
-
**Created:** 2026-02-21
|
|
4
|
-
**Status:** ✅ COMPLETED
|
|
5
|
-
**Priority:** High - User-requested feature gap
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Problem Statement
|
|
10
|
-
|
|
11
|
-
The pheromone system works but is invisible:
|
|
12
|
-
|
|
13
|
-
1. **Council command exists** - `/ant:council` proposes pheromones via multiple choice
|
|
14
|
-
2. **Pheromone signals exist** - Stored in `.aether/data/pheromones.json`
|
|
15
|
-
3. **Colony-prime loads them** - But only shows a count like "Primed: 2 signals"
|
|
16
|
-
4. **User never sees them** - The actual content is hidden
|
|
17
|
-
|
|
18
|
-
**User's exact words:** "I think it's important to create a significant plan here for how to display the pheromones that are being injected."
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## What Exists (Don't Rebuild)
|
|
23
|
-
|
|
24
|
-
| Component | Location | Status |
|
|
25
|
-
|-----------|----------|--------|
|
|
26
|
-
| Council command | `.claude/commands/ant/council.md` | ✅ Works - multi-choice pheromone proposal |
|
|
27
|
-
| Focus command | `.claude/commands/ant/focus.md` | ✅ Works - emits FOCUS signal |
|
|
28
|
-
| Redirect command | `.claude/commands/ant/redirect.md` | ✅ Works - emits REDIRECT signal |
|
|
29
|
-
| Feedback command | `.claude/commands/ant/feedback.md` | ✅ Works - emits FEEDBACK signal |
|
|
30
|
-
| Pheromone storage | `.aether/data/pheromones.json` | ✅ Works - stores signals |
|
|
31
|
-
| Pheromone-prime | `aether-utils.sh:6211` | ✅ Works - loads signals with decay |
|
|
32
|
-
| Colony-prime | `aether-utils.sh:6337` | ✅ Works - combines wisdom + signals |
|
|
33
|
-
| Pheromone-count | `aether-utils.sh:6036` | ✅ Works - counts active signals |
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## What's Missing
|
|
38
|
-
|
|
39
|
-
### 1. **Pheromone Display Function** (aether-utils.sh)
|
|
40
|
-
|
|
41
|
-
A new `pheromone-display` function that outputs a formatted table:
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
-
A C T I V E P H E R O M O N E S
|
|
46
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
47
|
-
|
|
48
|
-
🎯 FOCUS (Pay attention here)
|
|
49
|
-
1. [85%] "security" — injected 2d ago
|
|
50
|
-
2. [72%] "performance optimization" — injected 5d ago
|
|
51
|
-
|
|
52
|
-
🚫 REDIRECT (Hard constraints - DO NOT do this)
|
|
53
|
-
1. [90%] "use ORM" — injected 1d ago
|
|
54
|
-
2. [68%] "jQuery" — injected 7d ago
|
|
55
|
-
|
|
56
|
-
💬 FEEDBACK (Guidance to consider)
|
|
57
|
-
1. [65%] "prefer composition over inheritance" — injected 3d ago
|
|
58
|
-
|
|
59
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
|
-
Total: 5 active signals | Decay: FOCUS 30d, REDIRECT 60d, FEEDBACK 90d
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### 2. **Build Command Enhancement** (build.md)
|
|
64
|
-
|
|
65
|
-
After Step 4 (Load Colony Context), add Step 4.1:
|
|
66
|
-
|
|
67
|
-
```markdown
|
|
68
|
-
### Step 4.1: Display Active Pheromones
|
|
69
|
-
|
|
70
|
-
Run using the Bash tool:
|
|
71
|
-
```bash
|
|
72
|
-
bash .aether/aether-utils.sh pheromone-display
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
This displays the formatted pheromone table to the user so they can see what guidance is active.
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### 3. **Status Command Enhancement** (status.md)
|
|
79
|
-
|
|
80
|
-
Add pheromone summary to `/ant:status` output:
|
|
81
|
-
|
|
82
|
-
```markdown
|
|
83
|
-
### Pheromones Active
|
|
84
|
-
|
|
85
|
-
🎯 FOCUS: 2 signals
|
|
86
|
-
🚫 REDIRECT: 1 signal
|
|
87
|
-
💬 FEEDBACK: 1 signal
|
|
88
|
-
|
|
89
|
-
Run /ant:pheromones for full details
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### 4. **New Pheromones Command** (pheromones.md)
|
|
93
|
-
|
|
94
|
-
A dedicated command for viewing/managing pheromones:
|
|
95
|
-
|
|
96
|
-
```markdown
|
|
97
|
-
---
|
|
98
|
-
name: ant:pheromones
|
|
99
|
-
description: "🎯🐜🚫🐜💬 View and manage active pheromone signals"
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
Usage:
|
|
103
|
-
/ant:pheromones # Display all active signals
|
|
104
|
-
/ant:pheromones focus # Show only FOCUS signals
|
|
105
|
-
/ant:pheromones redirect # Show only REDIRECT signals
|
|
106
|
-
/ant:pheromones feedback # Show only FEEDBACK signals
|
|
107
|
-
/ant:pheromones clear # Clear all expired signals
|
|
108
|
-
/ant:pheromones expire <id> # Expire a specific signal
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Implementation Plan
|
|
114
|
-
|
|
115
|
-
### Phase 1: pheromone-display Function (aether-utils.sh)
|
|
116
|
-
|
|
117
|
-
**Location:** After `pheromone-count` (~line 6058)
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
pheromone-display)
|
|
121
|
-
# Display active pheromones in formatted table
|
|
122
|
-
# Usage: pheromone-display [type]
|
|
123
|
-
# type: Optional filter (focus/redirect/feedback)
|
|
124
|
-
# Returns: Formatted table string
|
|
125
|
-
|
|
126
|
-
pd_file="$DATA_DIR/pheromones.json"
|
|
127
|
-
pd_type="${1:-all}"
|
|
128
|
-
pd_now=$(date +%s)
|
|
129
|
-
|
|
130
|
-
if [[ ! -f "$pd_file" ]]; then
|
|
131
|
-
echo "No pheromones file found. Run /ant:init to initialize colony."
|
|
132
|
-
exit 0
|
|
133
|
-
fi
|
|
134
|
-
|
|
135
|
-
# Build display using same decay logic as pheromone-read
|
|
136
|
-
# ... (implementation details)
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
**Output format:**
|
|
140
|
-
- Header with box drawing
|
|
141
|
-
- Grouped by type (FOCUS, REDIRECT, FEEDBACK)
|
|
142
|
-
- Each signal shows: effective strength %, content, age
|
|
143
|
-
- Footer with totals and decay info
|
|
144
|
-
|
|
145
|
-
### Phase 2: Update build.md
|
|
146
|
-
|
|
147
|
-
Add Step 4.1 after colony-prime call to display pheromones visibly.
|
|
148
|
-
|
|
149
|
-
### Phase 3: Update status.md
|
|
150
|
-
|
|
151
|
-
Add pheromone summary section after memory health display.
|
|
152
|
-
|
|
153
|
-
### Phase 4: Create pheromones.md Command
|
|
154
|
-
|
|
155
|
-
New slash command for dedicated pheromone viewing and management.
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## Display Locations
|
|
160
|
-
|
|
161
|
-
| Where | What | When |
|
|
162
|
-
|-------|------|------|
|
|
163
|
-
| `/ant:build` | Full table | Before spawning workers |
|
|
164
|
-
| `/ant:status` | Summary counts | In colony overview |
|
|
165
|
-
| `/ant:council` | After injection | Show what was added |
|
|
166
|
-
| `/ant:pheromones` | Full table + management | On demand |
|
|
167
|
-
| `/ant:continue` | Summary | After phase completion |
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Visual Design
|
|
172
|
-
|
|
173
|
-
### Full Table (for /ant:build, /ant:pheromones)
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
177
|
-
A C T I V E P H E R O M O N E S
|
|
178
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
179
|
-
|
|
180
|
-
🎯 FOCUS (Pay attention here)
|
|
181
|
-
1. [85%] "security"
|
|
182
|
-
└── injected 2d ago, expires in 28d
|
|
183
|
-
2. [72%] "performance optimization"
|
|
184
|
-
└── injected 5d ago, expires in 25d
|
|
185
|
-
|
|
186
|
-
🚫 REDIRECT (Hard constraints - DO NOT do this)
|
|
187
|
-
1. [90%] "use ORM"
|
|
188
|
-
└── injected 1d ago, expires in 59d
|
|
189
|
-
2. [68%] "jQuery"
|
|
190
|
-
└── injected 7d ago, expires in 53d
|
|
191
|
-
|
|
192
|
-
💬 FEEDBACK (Guidance to consider)
|
|
193
|
-
1. [65%] "prefer composition over inheritance"
|
|
194
|
-
└── injected 3d ago, expires in 87d
|
|
195
|
-
|
|
196
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
197
|
-
5 signals active | Decay rates: FOCUS 30d, REDIRECT 60d, FEEDBACK 90d
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Summary (for /ant:status)
|
|
201
|
-
|
|
202
|
-
```
|
|
203
|
-
┌─────────────────────────────────────────────────────────┐
|
|
204
|
-
│ PHEROMONES │
|
|
205
|
-
├─────────────────────────────────────────────────────────┤
|
|
206
|
-
│ 🎯 FOCUS: 2 🚫 REDIRECT: 1 💬 FEEDBACK: 1 │
|
|
207
|
-
│ │
|
|
208
|
-
│ Strongest: "use ORM" [90%] │
|
|
209
|
-
│ Newest: "security" [85%] - 2d ago │
|
|
210
|
-
│ │
|
|
211
|
-
│ Run /ant:pheromones for details │
|
|
212
|
-
└─────────────────────────────────────────────────────────┘
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Injection Confirmation (for /ant:council, /ant:focus, etc.)
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
✓ Pheromone injected:
|
|
219
|
-
🎯 FOCUS: "security"
|
|
220
|
-
Strength: 0.8 | Expires: 30d
|
|
221
|
-
|
|
222
|
-
Active signals: 5
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
---
|
|
226
|
-
|
|
227
|
-
## Files to Create/Modify
|
|
228
|
-
|
|
229
|
-
| File | Action | Purpose |
|
|
230
|
-
|------|--------|---------|
|
|
231
|
-
| `.aether/aether-utils.sh` | Modify | Add `pheromone-display` function |
|
|
232
|
-
| `.claude/commands/ant/build.md` | Modify | Add Step 4.1 - display pheromones |
|
|
233
|
-
| `.claude/commands/ant/status.md` | Modify | Add pheromone summary section |
|
|
234
|
-
| `.claude/commands/ant/pheromones.md` | Create | New command for viewing/managing |
|
|
235
|
-
| `.opencode/commands/ant/pheromones.md` | Create | OpenCode version |
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## Testing
|
|
240
|
-
|
|
241
|
-
1. Run `/ant:focus "test signal"` and verify it appears in display
|
|
242
|
-
2. Run `/ant:redirect "avoid this"` and verify it appears in display
|
|
243
|
-
3. Run `/ant:build 1` and verify pheromone table shows before workers spawn
|
|
244
|
-
4. Run `/ant:status` and verify pheromone summary appears
|
|
245
|
-
5. Test decay: Create signal, wait, verify strength decreases
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Success Criteria
|
|
250
|
-
|
|
251
|
-
- [x] `/ant:build` displays full pheromone table before spawning workers
|
|
252
|
-
- [x] `/ant:status` shows pheromone counts and strongest/newest
|
|
253
|
-
- [x] `/ant:pheromones` command exists for dedicated viewing
|
|
254
|
-
- [x] `/ant:council` displays what was injected after session (already existed)
|
|
255
|
-
- [x] All signal types (FOCUS/REDIRECT/FEEDBACK) visible
|
|
256
|
-
- [x] Decay strength shown as percentage
|
|
257
|
-
- [x] Age and expiry shown per signal
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!--
|
|
3
|
-
Example Aether Prompt: Builder Worker
|
|
4
|
-
|
|
5
|
-
This demonstrates the structured XML prompt format for colony workers.
|
|
6
|
-
XML-structured prompts are more reliable and parseable than free-form text.
|
|
7
|
-
-->
|
|
8
|
-
<aether-prompt version="1.0.0">
|
|
9
|
-
|
|
10
|
-
<metadata>
|
|
11
|
-
<version>1.0.0</version>
|
|
12
|
-
<author>Aether Colony System</author>
|
|
13
|
-
<created>2026-02-16T10:00:00Z</created>
|
|
14
|
-
<modified>2026-02-16T10:00:00Z</modified>
|
|
15
|
-
<tags>
|
|
16
|
-
<tag>worker</tag>
|
|
17
|
-
<tag>builder</tag>
|
|
18
|
-
<tag>implementation</tag>
|
|
19
|
-
</tags>
|
|
20
|
-
</metadata>
|
|
21
|
-
|
|
22
|
-
<name>builder-worker</name>
|
|
23
|
-
<type>worker</type>
|
|
24
|
-
<caste>builder</caste>
|
|
25
|
-
|
|
26
|
-
<objective>
|
|
27
|
-
Implement features, fix bugs, or improve code quality according to specifications
|
|
28
|
-
while following the Iron Laws of colony development and respecting existing
|
|
29
|
-
codebase patterns.
|
|
30
|
-
</objective>
|
|
31
|
-
|
|
32
|
-
<context>
|
|
33
|
-
<background>
|
|
34
|
-
Builders are the primary implementation workers in the Aether colony system.
|
|
35
|
-
They receive specifications from route-setters and implement working code
|
|
36
|
-
that meets success criteria. Builders work within the constraints defined
|
|
37
|
-
by the Queen's redirects and the colony's established patterns.
|
|
38
|
-
</background>
|
|
39
|
-
<assumptions>
|
|
40
|
-
<assumption>Specification is complete enough to begin implementation</assumption>
|
|
41
|
-
<assumption>Required tools and dependencies are available</assumption>
|
|
42
|
-
<assumption>Test framework is configured and working</assumption>
|
|
43
|
-
</assumptions>
|
|
44
|
-
<dependencies>
|
|
45
|
-
<dependency type="data">COLONY_STATE.json (current phase and tasks)</dependency>
|
|
46
|
-
<dependency type="file">workers.md (Iron Laws reference)</dependency>
|
|
47
|
-
<dependency type="command">Git for version control</dependency>
|
|
48
|
-
</dependencies>
|
|
49
|
-
</context>
|
|
50
|
-
|
|
51
|
-
<requirements>
|
|
52
|
-
<requirement id="req_1" priority="critical">
|
|
53
|
-
<description>Follow Test-Driven Development (TDD) methodology</description>
|
|
54
|
-
<rationale>Ensures code is testable and specifications are clear</rationale>
|
|
55
|
-
</requirement>
|
|
56
|
-
<requirement id="req_2" priority="high">
|
|
57
|
-
<description>Write tests BEFORE implementation code</description>
|
|
58
|
-
<rationale>RED-GREEN-REFACTOR cycle produces better designs</rationale>
|
|
59
|
-
</requirement>
|
|
60
|
-
<requirement id="req_3" priority="high">
|
|
61
|
-
<description>All code must compile and tests must pass before marking complete</description>
|
|
62
|
-
<rationale>Prevents broken code from entering the codebase</rationale>
|
|
63
|
-
</requirement>
|
|
64
|
-
<requirement id="req_4" priority="normal">
|
|
65
|
-
<description>Match existing codebase patterns and conventions</description>
|
|
66
|
-
<rationale>Maintains consistency and readability</rationale>
|
|
67
|
-
</requirement>
|
|
68
|
-
<requirement id="req_5" priority="normal">
|
|
69
|
-
<description>Document public APIs and complex logic</description>
|
|
70
|
-
<rationale>Future maintainers need context</rationale>
|
|
71
|
-
</requirement>
|
|
72
|
-
</requirements>
|
|
73
|
-
|
|
74
|
-
<constraints>
|
|
75
|
-
<constraint id="cons_1" strength="must-not">
|
|
76
|
-
<rule>Never commit broken or failing code</rule>
|
|
77
|
-
<enforcement>Watcher verification will catch this</enforcement>
|
|
78
|
-
</constraint>
|
|
79
|
-
<constraint id="cons_2" strength="must">
|
|
80
|
-
<rule>Respect protected paths defined in security rules</rule>
|
|
81
|
-
<exception>None - security boundaries are absolute</exception>
|
|
82
|
-
</constraint>
|
|
83
|
-
<constraint id="cons_3" strength="should">
|
|
84
|
-
<rule>Keep functions under 50 lines when possible</rule>
|
|
85
|
-
<exception>Complex switch statements or configuration tables</exception>
|
|
86
|
-
</constraint>
|
|
87
|
-
<constraint id="cons_4" strength="should">
|
|
88
|
-
<rule>Extract helpers for repeated patterns</rule>
|
|
89
|
-
</constraint>
|
|
90
|
-
</constraints>
|
|
91
|
-
|
|
92
|
-
<thinking>
|
|
93
|
-
<approach>
|
|
94
|
-
Research existing patterns first, then implement following TDD cycle.
|
|
95
|
-
When uncertain, consult the Archaeologist for historical context.
|
|
96
|
-
</approach>
|
|
97
|
-
<steps>
|
|
98
|
-
<step order="1" optional="false">
|
|
99
|
-
<description>Read and understand the specification</description>
|
|
100
|
-
<checkpoint>Can explain the requirement in my own words</checkpoint>
|
|
101
|
-
</step>
|
|
102
|
-
<step order="2" optional="false">
|
|
103
|
-
<description>Research existing patterns in the codebase</description>
|
|
104
|
-
<checkpoint>Found at least 2 similar implementations to learn from</checkpoint>
|
|
105
|
-
</step>
|
|
106
|
-
<step order="3" optional="false">
|
|
107
|
-
<description>Write failing test (RED phase)</description>
|
|
108
|
-
<checkpoint>Test fails with expected error message</checkpoint>
|
|
109
|
-
</step>
|
|
110
|
-
<step order="4" optional="false">
|
|
111
|
-
<description>Implement minimal code to pass (GREEN phase)</description>
|
|
112
|
-
<checkpoint>Test now passes</checkpoint>
|
|
113
|
-
</step>
|
|
114
|
-
<step order="5" optional="false">
|
|
115
|
-
<description>Refactor while keeping tests green (REFACTOR phase)</description>
|
|
116
|
-
<checkpoint>Code is cleaner, tests still pass</checkpoint>
|
|
117
|
-
</step>
|
|
118
|
-
<step order="6" optional="true">
|
|
119
|
-
<description>Check for nearby graveyards (failed attempts)</description>
|
|
120
|
-
<checkpoint>Understood why previous attempts failed (if any)</checkpoint>
|
|
121
|
-
</step>
|
|
122
|
-
</steps>
|
|
123
|
-
<pitfalls>
|
|
124
|
-
<pitfall>Jumping to implementation before understanding the problem</pitfall>
|
|
125
|
-
<pitfall>Skipping tests for "simple" changes</pitfall>
|
|
126
|
-
<pitfall>Over-engineering the solution</pitfall>
|
|
127
|
-
<pitfall>Ignoring existing patterns in the codebase</pitfall>
|
|
128
|
-
</pitfalls>
|
|
129
|
-
</thinking>
|
|
130
|
-
|
|
131
|
-
<tools>
|
|
132
|
-
<tool required="true">
|
|
133
|
-
<name>Glob</name>
|
|
134
|
-
<purpose>Find files matching patterns</purpose>
|
|
135
|
-
<when_to_use>When searching for existing implementations or files</when_to_use>
|
|
136
|
-
</tool>
|
|
137
|
-
<tool required="true">
|
|
138
|
-
<name>Grep</name>
|
|
139
|
-
<purpose>Search file contents for patterns</purpose>
|
|
140
|
-
<when_to_use>When looking for specific code patterns or function definitions</when_to_use>
|
|
141
|
-
</tool>
|
|
142
|
-
<tool required="true">
|
|
143
|
-
<name>Read</name>
|
|
144
|
-
<purpose>Read file contents</purpose>
|
|
145
|
-
<when_to_use>When examining existing code or specifications</when_to_use>
|
|
146
|
-
</tool>
|
|
147
|
-
<tool required="true">
|
|
148
|
-
<name>Edit</name>
|
|
149
|
-
<purpose>Modify existing files</purpose>
|
|
150
|
-
<when_to_use>When implementing changes to existing code</when_to_use>
|
|
151
|
-
</tool>
|
|
152
|
-
<tool required="true">
|
|
153
|
-
<name>Write</name>
|
|
154
|
-
<purpose>Create new files</purpose>
|
|
155
|
-
<when_to_use>When creating new modules or test files</when_to_use>
|
|
156
|
-
</tool>
|
|
157
|
-
<tool required="false">
|
|
158
|
-
<name>Bash</name>
|
|
159
|
-
<purpose>Execute shell commands</purpose>
|
|
160
|
-
<when_to_use>When running tests or build commands</when_to_use>
|
|
161
|
-
</tool>
|
|
162
|
-
</tools>
|
|
163
|
-
|
|
164
|
-
<output>
|
|
165
|
-
<format>Modified source code with tests</format>
|
|
166
|
-
<structure>
|
|
167
|
-
Implementation files following existing patterns,
|
|
168
|
-
Test files in appropriate test directory,
|
|
169
|
-
Activity log entry documenting work done
|
|
170
|
-
</structure>
|
|
171
|
-
<example>
|
|
172
|
-
After completing work:
|
|
173
|
-
- src/feature.js: New implementation with tests
|
|
174
|
-
- tests/feature.test.js: Test coverage
|
|
175
|
-
- Activity logged: "Builder-X implemented feature Y with N tests"
|
|
176
|
-
</example>
|
|
177
|
-
</output>
|
|
178
|
-
|
|
179
|
-
<verification>
|
|
180
|
-
<method>Run full test suite and verify success criteria</method>
|
|
181
|
-
<steps>
|
|
182
|
-
<step>Run unit tests for modified code</step>
|
|
183
|
-
<step>Run integration tests if affected</step>
|
|
184
|
-
<step>Check code coverage meets threshold</step>
|
|
185
|
-
<step>Verify no lint errors</step>
|
|
186
|
-
</steps>
|
|
187
|
-
<tools>
|
|
188
|
-
<tool>npm test</tool>
|
|
189
|
-
<tool>npm run lint</tool>
|
|
190
|
-
<tool>npm run coverage</tool>
|
|
191
|
-
</tools>
|
|
192
|
-
</verification>
|
|
193
|
-
|
|
194
|
-
<success_criteria>
|
|
195
|
-
<criterion id="crit_1" required="true">
|
|
196
|
-
<description>All tests pass</description>
|
|
197
|
-
<measure>npm test exits with code 0</measure>
|
|
198
|
-
</criterion>
|
|
199
|
-
<criterion id="crit_2" required="true">
|
|
200
|
-
<description>Code compiles without errors</description>
|
|
201
|
-
<measure>No TypeScript or build errors</measure>
|
|
202
|
-
</criterion>
|
|
203
|
-
<criterion id="crit_3" required="true">
|
|
204
|
-
<description>Specification requirements are met</description>
|
|
205
|
-
<measure>All acceptance criteria from spec pass</measure>
|
|
206
|
-
</criterion>
|
|
207
|
-
<criterion id="crit_4" required="false">
|
|
208
|
-
<description>Code coverage maintained or improved</description>
|
|
209
|
-
<measure>Coverage >= 80% for new code</measure>
|
|
210
|
-
</criterion>
|
|
211
|
-
<criterion id="crit_5" required="false">
|
|
212
|
-
<description>No lint warnings</description>
|
|
213
|
-
<measure>npm run lint produces no errors</measure>
|
|
214
|
-
</criterion>
|
|
215
|
-
</success_criteria>
|
|
216
|
-
|
|
217
|
-
<error_handling>
|
|
218
|
-
<on_failure>
|
|
219
|
-
Stop work, preserve state, document what was attempted and what failed.
|
|
220
|
-
Create a graveyard marker if the approach is abandoned.
|
|
221
|
-
</on_failure>
|
|
222
|
-
<escalation>
|
|
223
|
-
Escalate to Queen when: specification is unclear, test cannot be written,
|
|
224
|
-
existing patterns conflict with requirements, or blocked by external dependency.
|
|
225
|
-
</escalation>
|
|
226
|
-
<recovery_steps>
|
|
227
|
-
<step>Document current state and what failed</step>
|
|
228
|
-
<step>Check for existing graveyards on this task</step>
|
|
229
|
-
<step>Consider alternative approach or request clarification</step>
|
|
230
|
-
<step>Update activity log with failure and reason</step>
|
|
231
|
-
</recovery_steps>
|
|
232
|
-
</error_handling>
|
|
233
|
-
|
|
234
|
-
</aether-prompt>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Create a scaffold regression test for an incident fix.
|
|
3
|
-
# Usage:
|
|
4
|
-
# bash .aether/scripts/incident-test-add.sh <incident_id> <description> "<command>" "<expected_pattern>"
|
|
5
|
-
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
incident_id="${1:-}"
|
|
9
|
-
description="${2:-}"
|
|
10
|
-
command_string="${3:-}"
|
|
11
|
-
expected_pattern="${4:-}"
|
|
12
|
-
|
|
13
|
-
if [[ -z "$incident_id" || -z "$description" || -z "$command_string" || -z "$expected_pattern" ]]; then
|
|
14
|
-
echo "Usage: bash .aether/scripts/incident-test-add.sh <incident_id> <description> \"<command>\" \"<expected_pattern>\""
|
|
15
|
-
exit 1
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
tests_dir=".aether/tests"
|
|
19
|
-
mkdir -p "$tests_dir"
|
|
20
|
-
test_file="$tests_dir/incident-${incident_id}.sh"
|
|
21
|
-
|
|
22
|
-
cat > "$test_file" <<EOF
|
|
23
|
-
#!/usr/bin/env bash
|
|
24
|
-
# Regression test for incident ${incident_id}
|
|
25
|
-
# Description: ${description}
|
|
26
|
-
|
|
27
|
-
set -euo pipefail
|
|
28
|
-
|
|
29
|
-
result=\$(bash -lc '${command_string}' 2>&1 || true)
|
|
30
|
-
|
|
31
|
-
if echo "\$result" | grep -q '${expected_pattern}'; then
|
|
32
|
-
echo "PASS: ${description}"
|
|
33
|
-
exit 0
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
echo "FAIL: Expected pattern '${expected_pattern}' not found"
|
|
37
|
-
echo ""
|
|
38
|
-
echo "Command:"
|
|
39
|
-
echo " ${command_string}"
|
|
40
|
-
echo ""
|
|
41
|
-
echo "Output:"
|
|
42
|
-
echo "\$result"
|
|
43
|
-
exit 1
|
|
44
|
-
EOF
|
|
45
|
-
|
|
46
|
-
chmod +x "$test_file"
|
|
47
|
-
echo "Created: $test_file"
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Weekly Colony Health Audit
|
|
3
|
-
# Run: bash .aether/scripts/weekly-audit.sh
|
|
4
|
-
|
|
5
|
-
set -euo pipefail
|
|
6
|
-
|
|
7
|
-
AETHER_ROOT="${AETHER_ROOT:-$(pwd)}"
|
|
8
|
-
DATA_DIR="$AETHER_ROOT/.aether/data"
|
|
9
|
-
UTILS="$AETHER_ROOT/.aether/aether-utils.sh"
|
|
10
|
-
|
|
11
|
-
echo "# Colony Audit Report - $(date -u +%Y-%m-%d)"
|
|
12
|
-
echo ""
|
|
13
|
-
|
|
14
|
-
state_size=$(wc -c < "$DATA_DIR/COLONY_STATE.json" 2>/dev/null || echo 0)
|
|
15
|
-
pheromone_size=$(wc -c < "$DATA_DIR/pheromones.json" 2>/dev/null || echo 0)
|
|
16
|
-
observations_size=$(wc -c < "$DATA_DIR/learning-observations.json" 2>/dev/null || echo 0)
|
|
17
|
-
echo "## Memory Sizes"
|
|
18
|
-
echo "- COLONY_STATE.json: $state_size bytes"
|
|
19
|
-
echo "- pheromones.json: $pheromone_size bytes"
|
|
20
|
-
echo "- learning-observations.json: $observations_size bytes"
|
|
21
|
-
echo ""
|
|
22
|
-
|
|
23
|
-
signal_count=$(jq '.signals | length' "$DATA_DIR/pheromones.json" 2>/dev/null || echo 0)
|
|
24
|
-
expired_count=$(jq '[.signals[]? | select(.active == false)] | length' "$DATA_DIR/pheromones.json" 2>/dev/null || echo 0)
|
|
25
|
-
echo "## Pheromone Health"
|
|
26
|
-
echo "- Total signals: $signal_count"
|
|
27
|
-
echo "- Expired signals: $expired_count"
|
|
28
|
-
echo ""
|
|
29
|
-
|
|
30
|
-
spawn_eff=$(bash "$UTILS" spawn-efficiency 2>/dev/null | jq -c '.result // {}' 2>/dev/null || echo '{}')
|
|
31
|
-
total_spawned=$(echo "$spawn_eff" | jq -r '.total // 0')
|
|
32
|
-
completed_spawned=$(echo "$spawn_eff" | jq -r '.completed // 0')
|
|
33
|
-
efficiency_pct=$(echo "$spawn_eff" | jq -r '.efficiency_pct // 0')
|
|
34
|
-
echo "## Spawn Efficiency"
|
|
35
|
-
echo "- Total spawned: $total_spawned"
|
|
36
|
-
echo "- Completed: $completed_spawned"
|
|
37
|
-
echo "- Efficiency: ${efficiency_pct}%"
|
|
38
|
-
echo ""
|
|
39
|
-
|
|
40
|
-
blocker_count=$(jq '[.flags[]? | select(.type == "blocker" and (.resolved_at == null))] | length' "$DATA_DIR/flags.json" 2>/dev/null || echo 0)
|
|
41
|
-
echo "## Gate Failures"
|
|
42
|
-
echo "- Unresolved blockers: $blocker_count"
|
|
43
|
-
echo ""
|
|
44
|
-
|
|
45
|
-
if [[ -f "$DATA_DIR/midden/midden.json" ]]; then
|
|
46
|
-
oracle_avg=$(jq '
|
|
47
|
-
[
|
|
48
|
-
(.entries[]? | select(.category == "oracle") | (.iterations // 0)),
|
|
49
|
-
(.signals[]? | select(.type == "oracle") | (.iterations // 0))
|
|
50
|
-
] | flatten | if length > 0 then (add / length) else null end
|
|
51
|
-
' "$DATA_DIR/midden/midden.json" 2>/dev/null || echo "null")
|
|
52
|
-
echo "## Oracle Metrics"
|
|
53
|
-
if [[ "$oracle_avg" == "null" ]]; then
|
|
54
|
-
echo "- Average iterations: N/A"
|
|
55
|
-
else
|
|
56
|
-
echo "- Average iterations: $oracle_avg"
|
|
57
|
-
fi
|
|
58
|
-
echo ""
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
entropy=$(bash "$UTILS" entropy-score 2>/dev/null | jq -r '.result.score // "N/A"' 2>/dev/null || echo "N/A")
|
|
62
|
-
echo "## Entropy Score"
|
|
63
|
-
echo "- Current: $entropy"
|
|
64
|
-
echo "- Threshold: 75 (organize required if exceeded)"
|
|
65
|
-
echo ""
|
|
66
|
-
|
|
67
|
-
echo "## Recommendations"
|
|
68
|
-
if [[ "$efficiency_pct" =~ ^[0-9]+$ ]] && [[ "$efficiency_pct" -lt 70 ]]; then
|
|
69
|
-
echo "- [HIGH] Spawn efficiency below 70% - review worker task decomposition"
|
|
70
|
-
fi
|
|
71
|
-
if [[ "$signal_count" =~ ^[0-9]+$ ]] && [[ "$signal_count" -gt 20 ]]; then
|
|
72
|
-
echo "- [MEDIUM] High pheromone count - consider consolidation or expiry acceleration"
|
|
73
|
-
fi
|
|
74
|
-
if [[ "$blocker_count" =~ ^[0-9]+$ ]] && [[ "$blocker_count" -gt 3 ]]; then
|
|
75
|
-
echo "- [HIGH] Multiple unresolved blockers - run /ant:swarm for auto-repair"
|
|
76
|
-
fi
|
|
77
|
-
if [[ "$entropy" =~ ^[0-9]+$ ]] && [[ "$entropy" -gt 75 ]]; then
|
|
78
|
-
echo "- [CRITICAL] High entropy - run /ant:organize before next build"
|
|
79
|
-
fi
|