aether-colony 3.1.17 → 5.0.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/{runtime → .aether}/CONTEXT.md +1 -1
- package/{runtime → .aether}/aether-utils.sh +1772 -98
- package/.aether/docs/QUEEN-SYSTEM.md +211 -0
- package/.aether/docs/QUEEN.md +84 -0
- package/.aether/docs/README.md +68 -0
- package/.aether/docs/caste-system.md +48 -0
- package/{runtime → .aether/docs/disciplines}/DISCIPLINES.md +8 -8
- package/.aether/docs/error-codes.md +268 -0
- package/{runtime → .aether}/docs/known-issues.md +42 -26
- package/.aether/docs/queen-commands.md +97 -0
- package/.aether/exchange/colony-registry.xml +11 -0
- package/{runtime → .aether}/exchange/pheromone-xml.sh +2 -1
- package/.aether/exchange/pheromones.xml +87 -0
- package/.aether/exchange/queen-wisdom.xml +14 -0
- package/{runtime → .aether}/exchange/registry-xml.sh +7 -3
- package/{runtime → .aether}/exchange/wisdom-xml.sh +11 -4
- package/.aether/rules/aether-colony.md +134 -0
- package/.aether/schemas/example-prompt-builder.xml +234 -0
- package/.aether/templates/colony-state-reset.jq.template +22 -0
- package/.aether/templates/colony-state.template.json +35 -0
- package/.aether/templates/constraints.template.json +9 -0
- package/.aether/templates/crowned-anthill.template.md +36 -0
- package/.aether/templates/handoff-build-error.template.md +30 -0
- package/.aether/templates/handoff-build-success.template.md +39 -0
- package/.aether/templates/handoff.template.md +40 -0
- package/{runtime → .aether}/utils/atomic-write.sh +5 -5
- package/{runtime → .aether}/utils/chamber-compare.sh +23 -10
- package/{runtime → .aether}/utils/chamber-utils.sh +32 -20
- package/{runtime → .aether}/utils/error-handler.sh +13 -1
- package/{runtime → .aether}/utils/file-lock.sh +49 -13
- package/.aether/utils/semantic-cli.sh +413 -0
- package/{runtime → .aether}/utils/xml-compose.sh +7 -1
- package/.aether/utils/xml-convert.sh +273 -0
- package/.aether/utils/xml-query.sh +201 -0
- package/.aether/utils/xml-utils.sh +110 -0
- package/{runtime → .aether}/workers.md +14 -17
- package/.claude/agents/ant/aether-ambassador.md +264 -0
- package/.claude/agents/ant/aether-archaeologist.md +322 -0
- package/.claude/agents/ant/aether-auditor.md +266 -0
- package/.claude/agents/ant/aether-builder.md +187 -0
- package/.claude/agents/ant/aether-chaos.md +268 -0
- package/.claude/agents/ant/aether-chronicler.md +304 -0
- package/.claude/agents/ant/aether-gatekeeper.md +325 -0
- package/.claude/agents/ant/aether-includer.md +373 -0
- package/.claude/agents/ant/aether-keeper.md +271 -0
- package/.claude/agents/ant/aether-measurer.md +317 -0
- package/.claude/agents/ant/aether-probe.md +210 -0
- package/.claude/agents/ant/aether-queen.md +325 -0
- package/.claude/agents/ant/aether-route-setter.md +173 -0
- package/.claude/agents/ant/aether-sage.md +353 -0
- package/.claude/agents/ant/aether-scout.md +142 -0
- package/.claude/agents/ant/aether-surveyor-disciplines.md +416 -0
- package/.claude/agents/ant/aether-surveyor-nest.md +354 -0
- package/.claude/agents/ant/aether-surveyor-pathogens.md +288 -0
- package/.claude/agents/ant/aether-surveyor-provisions.md +359 -0
- package/.claude/agents/ant/aether-tracker.md +265 -0
- package/.claude/agents/ant/aether-watcher.md +244 -0
- package/.claude/agents/ant/aether-weaver.md +247 -0
- package/.claude/commands/ant/archaeology.md +16 -7
- package/.claude/commands/ant/build.md +415 -284
- package/.claude/commands/ant/chaos.md +19 -10
- package/.claude/commands/ant/colonize.md +58 -24
- package/.claude/commands/ant/continue.md +155 -145
- package/.claude/commands/ant/council.md +15 -5
- package/.claude/commands/ant/dream.md +16 -7
- package/.claude/commands/ant/entomb.md +274 -157
- package/.claude/commands/ant/feedback.md +33 -29
- package/.claude/commands/ant/flag.md +18 -10
- package/.claude/commands/ant/flags.md +14 -6
- package/.claude/commands/ant/focus.md +29 -21
- package/.claude/commands/ant/help.md +11 -1
- package/.claude/commands/ant/history.md +10 -0
- package/.claude/commands/ant/init.md +91 -65
- package/.claude/commands/ant/interpret.md +15 -4
- package/.claude/commands/ant/lay-eggs.md +55 -7
- package/.claude/commands/ant/maturity.md +11 -1
- package/.claude/commands/ant/migrate-state.md +14 -2
- package/.claude/commands/ant/oracle.md +23 -15
- package/.claude/commands/ant/organize.md +29 -20
- package/.claude/commands/ant/pause-colony.md +17 -7
- package/.claude/commands/ant/phase.md +17 -8
- package/.claude/commands/ant/plan.md +20 -9
- package/.claude/commands/ant/redirect.md +29 -32
- package/.claude/commands/ant/resume-colony.md +19 -9
- package/.claude/commands/ant/resume.md +272 -96
- package/.claude/commands/ant/seal.md +201 -191
- package/.claude/commands/ant/status.md +71 -32
- package/.claude/commands/ant/swarm.md +26 -44
- package/.claude/commands/ant/tunnels.md +279 -105
- package/.claude/commands/ant/update.md +81 -20
- package/.claude/commands/ant/verify-castes.md +14 -4
- package/.claude/commands/ant/watch.md +13 -12
- package/.opencode/agents/aether-ambassador.md +63 -20
- package/.opencode/agents/aether-archaeologist.md +29 -12
- package/.opencode/agents/aether-auditor.md +51 -18
- package/.opencode/agents/aether-builder.md +69 -19
- package/.opencode/agents/aether-chaos.md +29 -12
- package/.opencode/agents/aether-chronicler.md +60 -18
- package/.opencode/agents/aether-gatekeeper.md +27 -18
- package/.opencode/agents/aether-includer.md +27 -18
- package/.opencode/agents/aether-keeper.md +89 -18
- package/.opencode/agents/aether-measurer.md +27 -18
- package/.opencode/agents/aether-probe.md +60 -18
- package/.opencode/agents/aether-queen.md +172 -24
- package/.opencode/agents/aether-route-setter.md +57 -12
- package/.opencode/agents/aether-sage.md +26 -18
- package/.opencode/agents/aether-scout.md +27 -19
- package/.opencode/agents/aether-surveyor-disciplines.md +53 -1
- package/.opencode/agents/aether-surveyor-nest.md +53 -1
- package/.opencode/agents/aether-surveyor-pathogens.md +51 -1
- package/.opencode/agents/aether-surveyor-provisions.md +53 -1
- package/.opencode/agents/aether-tracker.md +64 -18
- package/.opencode/agents/aether-watcher.md +66 -19
- package/.opencode/agents/aether-weaver.md +61 -18
- package/.opencode/commands/ant/build.md +406 -192
- package/.opencode/commands/ant/continue.md +66 -76
- package/.opencode/commands/ant/entomb.md +106 -45
- package/.opencode/commands/ant/init.md +46 -48
- package/.opencode/commands/ant/organize.md +5 -5
- package/.opencode/commands/ant/resume.md +334 -0
- package/.opencode/commands/ant/seal.md +33 -24
- package/.opencode/commands/ant/status.md +11 -0
- package/.opencode/commands/ant/tunnels.md +149 -0
- package/.opencode/commands/ant/update.md +59 -16
- package/CHANGELOG.md +79 -0
- package/README.md +135 -353
- package/bin/cli.js +243 -122
- package/bin/generate-commands.sh +2 -2
- package/bin/lib/init.js +13 -3
- package/bin/lib/update-transaction.js +119 -117
- package/bin/sync-to-runtime.sh +5 -137
- package/bin/validate-package.sh +84 -0
- package/package.json +9 -6
- package/.opencode/agents/aether-architect.md +0 -66
- package/.opencode/agents/aether-guardian.md +0 -107
- package/.opencode/agents/workers.md +0 -1034
- package/runtime/QUEEN_ANT_ARCHITECTURE.md +0 -402
- package/runtime/data/signatures.json +0 -41
- package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +0 -1343
- package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +0 -2642
- package/runtime/docs/PHEROMONE-INJECTION.md +0 -240
- package/runtime/docs/PHEROMONE-INTEGRATION.md +0 -192
- package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +0 -426
- package/runtime/docs/README.md +0 -94
- package/runtime/docs/VISUAL-OUTPUT-SPEC.md +0 -219
- package/runtime/docs/biological-reference.md +0 -272
- package/runtime/docs/codebase-review.md +0 -399
- package/runtime/docs/command-sync.md +0 -164
- package/runtime/docs/constraints.md +0 -116
- package/runtime/docs/implementation-learnings.md +0 -89
- package/runtime/docs/namespace.md +0 -148
- package/runtime/docs/pathogen-schema-example.json +0 -36
- package/runtime/docs/pathogen-schema.md +0 -111
- package/runtime/docs/planning-discipline.md +0 -159
- package/runtime/docs/progressive-disclosure.md +0 -184
- package/runtime/lib/queen-utils.sh +0 -729
- package/runtime/planning.md +0 -159
- package/runtime/recover.sh +0 -136
- package/runtime/utils/xml-utils.sh +0 -2196
- package/runtime/workers-new-castes.md +0 -516
- /package/{runtime → .aether/docs/disciplines}/coding-standards.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/debugging.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/learning.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/tdd.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/verification-loop.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/verification.md +0 -0
- /package/{runtime → .aether}/docs/pheromones.md +0 -0
- /package/{runtime → .aether}/model-profiles.yaml +0 -0
- /package/{runtime → .aether}/schemas/aether-types.xsd +0 -0
- /package/{runtime → .aether}/schemas/colony-registry.xsd +0 -0
- /package/{runtime → .aether}/schemas/pheromone.xsd +0 -0
- /package/{runtime → .aether}/schemas/prompt.xsd +0 -0
- /package/{runtime → .aether}/schemas/queen-wisdom.xsd +0 -0
- /package/{runtime → .aether}/schemas/worker-priming.xsd +0 -0
- /package/{runtime → .aether}/templates/QUEEN.md.template +0 -0
- /package/{runtime → .aether}/utils/colorize-log.sh +0 -0
- /package/{runtime → .aether}/utils/queen-to-md.xsl +0 -0
- /package/{runtime → .aether}/utils/spawn-tree.sh +0 -0
- /package/{runtime → .aether}/utils/spawn-with-model.sh +0 -0
- /package/{runtime → .aether}/utils/state-loader.sh +0 -0
- /package/{runtime → .aether}/utils/swarm-display.sh +0 -0
- /package/{runtime → .aether}/utils/watch-spawn-tree.sh +0 -0
- /package/{runtime → .aether}/utils/xml-core.sh +0 -0
|
@@ -66,7 +66,7 @@ xml-registry-export() {
|
|
|
66
66
|
colony=$(jq -c ".colonies[$idx]" "$json_file")
|
|
67
67
|
|
|
68
68
|
local id name created_at status parent_id
|
|
69
|
-
id=$(echo "$colony" | jq -r '.id')
|
|
69
|
+
id=$(echo "$colony" | jq -r '.id' | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g')
|
|
70
70
|
name=$(echo "$colony" | jq -r '.name // "Unnamed Colony"')
|
|
71
71
|
created_at=$(echo "$colony" | jq -r '.created_at // "'"$generated_at"'"')
|
|
72
72
|
status=$(echo "$colony" | jq -r '.status // "active"')
|
|
@@ -170,9 +170,13 @@ xml-registry-import() {
|
|
|
170
170
|
# Extract colonies using xmlstarlet if available
|
|
171
171
|
if [[ "$XMLSTARLET_AVAILABLE" == "true" ]]; then
|
|
172
172
|
local colony_array
|
|
173
|
-
|
|
173
|
+
# Note: xmlstarlet sel returns exit 1 when no nodes match.
|
|
174
|
+
# With pipefail, the pipeline exit code reflects xmlstarlet failure even if jq succeeds.
|
|
175
|
+
# Use a subshell with set +e to safely capture the output regardless of xmlstarlet exit code.
|
|
176
|
+
colony_array=$(set +e; xmlstarlet sel -t -m "//colony" \
|
|
174
177
|
-o '{"id":"' -v "@id" -o '","name":"' -v "name" -o '","status":"' -v "@status" -o '","created_at":"' -v "@created_at" -o '"}' \
|
|
175
|
-
-n "$xml_file" 2>/dev/null | jq -s '.')
|
|
178
|
+
-n "$xml_file" 2>/dev/null | jq -s '.' 2>/dev/null; true) || colony_array='[]'
|
|
179
|
+
[[ -z "$colony_array" || "$colony_array" == "null" ]] && colony_array='[]'
|
|
176
180
|
|
|
177
181
|
colony_count=$(echo "$colony_array" | jq 'length')
|
|
178
182
|
if [[ $colony_count -gt 0 ]]; then
|
|
@@ -195,9 +195,13 @@ xml-wisdom-import() {
|
|
|
195
195
|
# Extract philosophies using xmlstarlet if available
|
|
196
196
|
if [[ "$XMLSTARLET_AVAILABLE" == "true" ]]; then
|
|
197
197
|
local phil_array
|
|
198
|
-
|
|
198
|
+
# Note: xmlstarlet sel returns exit 1 when no nodes match.
|
|
199
|
+
# With pipefail, the pipeline exit code reflects xmlstarlet failure even if jq succeeds.
|
|
200
|
+
# Use set +e in subshell to safely capture output regardless of xmlstarlet exit code.
|
|
201
|
+
phil_array=$(set +e; xmlstarlet sel -t -m "//philosophy" \
|
|
199
202
|
-o '{"id":"' -v "@id" -o '","confidence":' -v "@confidence" -o ',"domain":"' -v "@domain" -o '","source":"' -v "@source" -o '","content":"' -v "content" -o '"}' \
|
|
200
|
-
-n "$xml_file" 2>/dev/null | jq -s '.')
|
|
203
|
+
-n "$xml_file" 2>/dev/null | jq -s '.' 2>/dev/null; true) || phil_array='[]'
|
|
204
|
+
[[ -z "$phil_array" || "$phil_array" == "null" ]] && phil_array='[]'
|
|
201
205
|
|
|
202
206
|
local phil_count
|
|
203
207
|
phil_count=$(echo "$phil_array" | jq 'length')
|
|
@@ -208,9 +212,12 @@ xml-wisdom-import() {
|
|
|
208
212
|
|
|
209
213
|
# Extract patterns
|
|
210
214
|
local pattern_array
|
|
211
|
-
|
|
215
|
+
# Note: xmlstarlet sel returns exit 1 when no nodes match.
|
|
216
|
+
# Use set +e in subshell to safely capture output regardless of xmlstarlet exit code.
|
|
217
|
+
pattern_array=$(set +e; xmlstarlet sel -t -m "//pattern" \
|
|
212
218
|
-o '{"id":"' -v "@id" -o '","confidence":' -v "@confidence" -o ',"domain":"' -v "@domain" -o '"}' \
|
|
213
|
-
-n "$xml_file" 2>/dev/null | jq -s '.')
|
|
219
|
+
-n "$xml_file" 2>/dev/null | jq -s '.' 2>/dev/null; true) || pattern_array='[]'
|
|
220
|
+
[[ -z "$pattern_array" || "$pattern_array" == "null" ]] && pattern_array='[]'
|
|
214
221
|
|
|
215
222
|
local pattern_count
|
|
216
223
|
pattern_count=$(echo "$pattern_array" | jq 'length')
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Aether Colony System
|
|
2
|
+
|
|
3
|
+
> This repo uses the Aether colony system for multi-agent development.
|
|
4
|
+
> These rules are auto-distributed by `aether update` — do not edit directly.
|
|
5
|
+
|
|
6
|
+
## Session Recovery
|
|
7
|
+
|
|
8
|
+
On the first message of a new conversation, check if `.aether/data/session.json` exists. If it does:
|
|
9
|
+
|
|
10
|
+
1. Read the file briefly to check for `colony_goal`
|
|
11
|
+
2. If a goal exists, display:
|
|
12
|
+
```
|
|
13
|
+
Previous colony session detected: "{goal}"
|
|
14
|
+
Run /ant:resume to restore context, or continue with a new topic.
|
|
15
|
+
```
|
|
16
|
+
3. Do NOT auto-restore — wait for the user to explicitly run /ant:resume
|
|
17
|
+
|
|
18
|
+
This only applies to genuinely new conversations, not after /clear.
|
|
19
|
+
|
|
20
|
+
## Available Commands
|
|
21
|
+
|
|
22
|
+
### Getting Started
|
|
23
|
+
| Command | Purpose |
|
|
24
|
+
|---------|---------|
|
|
25
|
+
| `/ant:init "<goal>"` | Set colony intention and initialize |
|
|
26
|
+
| `/ant:colonize` | Analyze existing codebase |
|
|
27
|
+
| `/ant:plan` | Generate project phases |
|
|
28
|
+
| `/ant:build <phase>` | Execute a phase with parallel workers |
|
|
29
|
+
| `/ant:continue` | Verify work, extract learnings, advance |
|
|
30
|
+
|
|
31
|
+
### Pheromone Signals
|
|
32
|
+
| Command | Priority | Purpose |
|
|
33
|
+
|---------|----------|---------|
|
|
34
|
+
| `/ant:focus "<area>"` | normal | Guide colony attention |
|
|
35
|
+
| `/ant:redirect "<pattern>"` | high | Hard constraint — avoid this |
|
|
36
|
+
| `/ant:feedback "<note>"` | low | Gentle adjustment |
|
|
37
|
+
|
|
38
|
+
### Status & Monitoring
|
|
39
|
+
| Command | Purpose |
|
|
40
|
+
|---------|---------|
|
|
41
|
+
| `/ant:status` | Colony dashboard |
|
|
42
|
+
| `/ant:phase [N]` | View phase details |
|
|
43
|
+
| `/ant:flags` | List active flags |
|
|
44
|
+
| `/ant:flag "<title>"` | Create a flag |
|
|
45
|
+
| `/ant:history` | Browse colony events |
|
|
46
|
+
| `/ant:watch` | Live tmux monitoring |
|
|
47
|
+
|
|
48
|
+
### Session Management
|
|
49
|
+
| Command | Purpose |
|
|
50
|
+
|---------|---------|
|
|
51
|
+
| `/ant:pause-colony` | Save state and create handoff |
|
|
52
|
+
| `/ant:resume-colony` | Restore from pause |
|
|
53
|
+
| `/ant:resume` | Quick session restore |
|
|
54
|
+
|
|
55
|
+
### Lifecycle
|
|
56
|
+
| Command | Purpose |
|
|
57
|
+
|---------|---------|
|
|
58
|
+
| `/ant:seal` | Seal colony (Crowned Anthill) |
|
|
59
|
+
| `/ant:entomb` | Archive completed colony |
|
|
60
|
+
| `/ant:maturity` | View colony maturity journey |
|
|
61
|
+
| `/ant:update` | Update system files from hub |
|
|
62
|
+
|
|
63
|
+
### Advanced
|
|
64
|
+
| Command | Purpose |
|
|
65
|
+
|---------|---------|
|
|
66
|
+
| `/ant:swarm "<bug>"` | Parallel bug investigation |
|
|
67
|
+
| `/ant:oracle` | Deep research (RALF loop) |
|
|
68
|
+
| `/ant:dream` | Philosophical observation |
|
|
69
|
+
| `/ant:interpret` | Review dreams, discuss actions |
|
|
70
|
+
| `/ant:chaos` | Resilience testing |
|
|
71
|
+
| `/ant:archaeology` | Git history analysis |
|
|
72
|
+
| `/ant:organize` | Codebase hygiene report |
|
|
73
|
+
| `/ant:council` | Intent clarification |
|
|
74
|
+
|
|
75
|
+
## Typical Workflow
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
/ant:init "Build feature X" → Set colony goal
|
|
79
|
+
/ant:colonize → Understand existing code (optional)
|
|
80
|
+
/ant:plan → Generate phases
|
|
81
|
+
/ant:focus "security" → Steer attention (optional)
|
|
82
|
+
/ant:build 1 → Execute phase 1
|
|
83
|
+
/ant:continue → Verify, learn, advance
|
|
84
|
+
/ant:build 2 → Execute phase 2
|
|
85
|
+
...repeat until complete...
|
|
86
|
+
/ant:seal → Seal completed colony
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
After `/clear` or session break: `/ant:resume-colony` to restore context.
|
|
90
|
+
|
|
91
|
+
## Worker Castes
|
|
92
|
+
|
|
93
|
+
Workers are assigned to castes based on task type:
|
|
94
|
+
|
|
95
|
+
| Caste | Role |
|
|
96
|
+
|-------|------|
|
|
97
|
+
| builder | Implementation work |
|
|
98
|
+
| watcher | Monitoring, quality checks |
|
|
99
|
+
| scout | Research, discovery |
|
|
100
|
+
| chaos | Edge case testing |
|
|
101
|
+
| oracle | Deep research (RALF loop) |
|
|
102
|
+
| architect | Planning, design |
|
|
103
|
+
| colonizer | Codebase exploration |
|
|
104
|
+
| route_setter | Phase planning |
|
|
105
|
+
| archaeologist | Git history analysis |
|
|
106
|
+
|
|
107
|
+
## Protected Paths
|
|
108
|
+
|
|
109
|
+
**Never modify these programmatically:**
|
|
110
|
+
|
|
111
|
+
| Path | Reason |
|
|
112
|
+
|------|--------|
|
|
113
|
+
| `.aether/data/` | Colony state (COLONY_STATE.json, session files) |
|
|
114
|
+
| `.aether/dreams/` | Dream journal entries |
|
|
115
|
+
| `.aether/checkpoints/` | Session checkpoints |
|
|
116
|
+
| `.aether/locks/` | File locks |
|
|
117
|
+
|
|
118
|
+
## Colony State
|
|
119
|
+
|
|
120
|
+
State is stored in `.aether/data/COLONY_STATE.json` and includes:
|
|
121
|
+
- Colony goal and current phase
|
|
122
|
+
- Task breakdown and completion status
|
|
123
|
+
- Instincts (learned patterns with confidence scores)
|
|
124
|
+
- Pheromone signals (FOCUS/REDIRECT/FEEDBACK)
|
|
125
|
+
- Event history
|
|
126
|
+
|
|
127
|
+
## Pheromone System
|
|
128
|
+
|
|
129
|
+
Signals guide colony behavior without hard-coding instructions:
|
|
130
|
+
- **FOCUS** — attracts attention to an area (expires at phase end)
|
|
131
|
+
- **REDIRECT** — repels workers from a pattern (high priority, hard constraint)
|
|
132
|
+
- **FEEDBACK** — calibrates behavior based on observation (low priority)
|
|
133
|
+
|
|
134
|
+
Use FOCUS + REDIRECT before builds to steer. Use FEEDBACK after builds to adjust.
|
|
@@ -0,0 +1,234 @@
|
|
|
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>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# colony-state-reset.jq.template — Reset colony state fields for entomb
|
|
2
|
+
# Usage: jq -f .aether/templates/colony-state-reset.jq.template STATE.json.bak > STATE.json
|
|
3
|
+
# Version: 1.0
|
|
4
|
+
|
|
5
|
+
.goal = null |
|
|
6
|
+
.state = "IDLE" |
|
|
7
|
+
.current_phase = 0 |
|
|
8
|
+
.plan.phases = [] |
|
|
9
|
+
.plan.generated_at = null |
|
|
10
|
+
.plan.confidence = null |
|
|
11
|
+
.build_started_at = null |
|
|
12
|
+
.session_id = null |
|
|
13
|
+
.initialized_at = null |
|
|
14
|
+
.milestone = null |
|
|
15
|
+
.events = [] |
|
|
16
|
+
.errors.records = [] |
|
|
17
|
+
.errors.flagged_patterns = [] |
|
|
18
|
+
.signals = [] |
|
|
19
|
+
.graveyards = [] |
|
|
20
|
+
.memory.instincts = [] |
|
|
21
|
+
.memory.phase_learnings = [] |
|
|
22
|
+
.memory.decisions = []
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_template": "colony-state",
|
|
3
|
+
"_version": "3.0",
|
|
4
|
+
"_instructions": "Write this file to .aether/data/COLONY_STATE.json. Replace every __PLACEHOLDER__ value with real data (see _comment_* fields for details). After filling all placeholders, remove every key whose name starts with underscore (_template, _version, _instructions, and all _comment_*) before writing the final file.",
|
|
5
|
+
"_comment_goal": "Replace __GOAL__ with the user's goal string exactly as provided to /ant:init.",
|
|
6
|
+
"_comment_session": "Replace __SESSION_ID__ with a generated ID in the format: session_{unix_timestamp}_{random}. Replace __ISO8601_TIMESTAMP__ with the current UTC time in ISO-8601 format (e.g., 2026-02-20T00:00:00Z). The same timestamp value is used in both 'initialized_at' and the events array entry.",
|
|
7
|
+
"_comment_memory": "Replace __PHASE_LEARNINGS__ with a JSON array (e.g., [] if no prior colony found, or [{...}, ...] if inherited from completion-report.md). Replace __INSTINCTS__ with a JSON array (e.g., [] or [{...}, ...]). IMPORTANT: both must be JSON arrays, not strings — write [] not \"[]\".",
|
|
8
|
+
"_comment_events": "The events array records colony lifecycle events. Each entry is a pipe-delimited string: 'ISO8601_TIMESTAMP|event_type|source|description'. The initialization event uses the same __ISO8601_TIMESTAMP__ as 'initialized_at'. Do not add extra events during init — the single initialization entry is correct.",
|
|
9
|
+
"version": "3.0",
|
|
10
|
+
"goal": "__GOAL__",
|
|
11
|
+
"state": "READY",
|
|
12
|
+
"current_phase": 0,
|
|
13
|
+
"session_id": "__SESSION_ID__",
|
|
14
|
+
"initialized_at": "__ISO8601_TIMESTAMP__",
|
|
15
|
+
"build_started_at": null,
|
|
16
|
+
"plan": {
|
|
17
|
+
"generated_at": null,
|
|
18
|
+
"confidence": null,
|
|
19
|
+
"phases": []
|
|
20
|
+
},
|
|
21
|
+
"memory": {
|
|
22
|
+
"phase_learnings": "__PHASE_LEARNINGS__",
|
|
23
|
+
"decisions": [],
|
|
24
|
+
"instincts": "__INSTINCTS__"
|
|
25
|
+
},
|
|
26
|
+
"errors": {
|
|
27
|
+
"records": [],
|
|
28
|
+
"flagged_patterns": []
|
|
29
|
+
},
|
|
30
|
+
"signals": [],
|
|
31
|
+
"graveyards": [],
|
|
32
|
+
"events": [
|
|
33
|
+
"__ISO8601_TIMESTAMP__|colony_initialized|init|Colony initialized with goal: __GOAL__"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_template": "constraints",
|
|
3
|
+
"_version": "1.0",
|
|
4
|
+
"_instructions": "Write this file to .aether/data/constraints.json. No placeholder substitution needed — copy the data keys as-is. Remove all keys whose names start with underscore (_template, _version, _instructions, _comment_*) before writing the final file.",
|
|
5
|
+
"_comment_purpose": "constraints.json stores user pheromone signals. 'focus' holds FOCUS signals (areas of attention set via /ant:focus). 'constraints' holds REDIRECT signals (hard constraints set via /ant:redirect). Both start as empty arrays and accumulate signals over the colony's lifetime.",
|
|
6
|
+
"version": "1.0",
|
|
7
|
+
"focus": [],
|
|
8
|
+
"constraints": []
|
|
9
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!-- Template: crowned-anthill | Version: 2.0 -->
|
|
2
|
+
<!-- Instructions: Fill all {{PLACEHOLDER}} values with real colony data. Remove this comment block before writing to .aether/CROWNED-ANTHILL.md -->
|
|
3
|
+
|
|
4
|
+
# Crowned Anthill — {{GOAL}}
|
|
5
|
+
|
|
6
|
+
**Sealed:** {{SEAL_DATE}}
|
|
7
|
+
**Milestone:** Crowned Anthill
|
|
8
|
+
**Version:** {{VERSION}}
|
|
9
|
+
|
|
10
|
+
## The Achievement
|
|
11
|
+
|
|
12
|
+
This colony set out to accomplish something real — and it did. Every phase pushed the anthill higher. Now it stands crowned.
|
|
13
|
+
|
|
14
|
+
## Colony Stats
|
|
15
|
+
- Total Phases: {{TOTAL_PHASES}}
|
|
16
|
+
- Phases Completed: {{PHASES_COMPLETED}} of {{TOTAL_PHASES}}
|
|
17
|
+
- Colony Age: {{COLONY_AGE_DAYS}} days of focused work
|
|
18
|
+
- Wisdom Promoted: {{PROMOTIONS_MADE}} entries carried forward
|
|
19
|
+
|
|
20
|
+
## Phase Recap
|
|
21
|
+
|
|
22
|
+
Every phase below is a chapter in the story of this anthill's rise:
|
|
23
|
+
|
|
24
|
+
{{PHASE_RECAP}}
|
|
25
|
+
|
|
26
|
+
## Pheromone Legacy
|
|
27
|
+
|
|
28
|
+
The colony's hard-won wisdom doesn't stop here. {{PROMOTIONS_MADE}} validated learnings and instincts have been promoted to QUEEN.md — a living record that will guide future colonies before they take their first steps.
|
|
29
|
+
|
|
30
|
+
What this colony learned, the next colony inherits.
|
|
31
|
+
|
|
32
|
+
## The Work
|
|
33
|
+
|
|
34
|
+
{{GOAL}}
|
|
35
|
+
|
|
36
|
+
The anthill stands crowned. The work endures.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Template: handoff-build-error | Version: 1.0 -->
|
|
2
|
+
<!-- Instructions: Fill all {{PLACEHOLDER}} values with real colony data. Remove this comment block before writing to .aether/HANDOFF.md -->
|
|
3
|
+
|
|
4
|
+
# Colony Session — Build Errors
|
|
5
|
+
|
|
6
|
+
## Build Status: ISSUES DETECTED
|
|
7
|
+
|
|
8
|
+
**Phase:** {{PHASE_NUMBER}} — {{PHASE_NAME}}
|
|
9
|
+
**Status:** Build completed with failures
|
|
10
|
+
**Updated:** {{BUILD_TIMESTAMP}}
|
|
11
|
+
|
|
12
|
+
## Failed Workers
|
|
13
|
+
|
|
14
|
+
{{FAILED_WORKERS}}
|
|
15
|
+
|
|
16
|
+
## Grave Markers Placed
|
|
17
|
+
|
|
18
|
+
{{GRAVE_MARKERS}}
|
|
19
|
+
|
|
20
|
+
## Recovery Options
|
|
21
|
+
|
|
22
|
+
1. Review failures: Check `.aether/data/activity.log`
|
|
23
|
+
2. Fix and retry: `/ant:build {{PHASE_NUMBER}}`
|
|
24
|
+
3. Swarm fix: `/ant:swarm` for auto-repair
|
|
25
|
+
4. Manual fix: Address issues, then `/ant:continue`
|
|
26
|
+
|
|
27
|
+
## Session Note
|
|
28
|
+
|
|
29
|
+
Build completed but workers failed. Grave markers placed.
|
|
30
|
+
Review failures before advancing.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!-- Template: handoff-build-success | Version: 1.0 -->
|
|
2
|
+
<!-- Instructions: Fill all {{PLACEHOLDER}} values with real colony data. Remove this comment block before writing to .aether/HANDOFF.md -->
|
|
3
|
+
|
|
4
|
+
# Colony Session — Build Complete
|
|
5
|
+
|
|
6
|
+
## Quick Resume
|
|
7
|
+
|
|
8
|
+
Run `/ant:continue` to advance phase, or `/ant:resume-colony` to restore full context.
|
|
9
|
+
|
|
10
|
+
## State at Build Completion
|
|
11
|
+
|
|
12
|
+
- Goal: "{{GOAL}}"
|
|
13
|
+
- Phase: {{PHASE_NUMBER}} — {{PHASE_NAME}}
|
|
14
|
+
- Build Status: {{BUILD_STATUS}}
|
|
15
|
+
- Updated: {{BUILD_TIMESTAMP}}
|
|
16
|
+
|
|
17
|
+
## Build Summary
|
|
18
|
+
|
|
19
|
+
{{BUILD_SUMMARY}}
|
|
20
|
+
|
|
21
|
+
## Tasks
|
|
22
|
+
|
|
23
|
+
- Completed: {{TASKS_COMPLETED}}
|
|
24
|
+
- Failed: {{TASKS_FAILED}}
|
|
25
|
+
|
|
26
|
+
## Files Changed
|
|
27
|
+
|
|
28
|
+
- Created: {{FILES_CREATED}} files
|
|
29
|
+
- Modified: {{FILES_MODIFIED}} files
|
|
30
|
+
|
|
31
|
+
## Next Steps
|
|
32
|
+
|
|
33
|
+
- If verification passed: `/ant:continue` to advance to next phase
|
|
34
|
+
- If issues found: `/ant:flags` to review blockers
|
|
35
|
+
- To pause: `/ant:pause-colony`
|
|
36
|
+
|
|
37
|
+
## Session Note
|
|
38
|
+
|
|
39
|
+
{{SESSION_NOTE}}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!-- Template: handoff | Version: 2.0 -->
|
|
2
|
+
<!-- Instructions: Fill all {{PLACEHOLDER}} values with real colony data. Remove this comment block before writing to .aether/HANDOFF.md -->
|
|
3
|
+
|
|
4
|
+
# Colony Session — {{CHAMBER_NAME}}
|
|
5
|
+
|
|
6
|
+
## A Colony's Rest
|
|
7
|
+
|
|
8
|
+
This colony has been entombed. Its work is complete, its story told.
|
|
9
|
+
What began with a goal has ended with a chamber — a place of quiet preservation.
|
|
10
|
+
|
|
11
|
+
**Chamber:** .aether/chambers/{{CHAMBER_NAME}}/
|
|
12
|
+
|
|
13
|
+
## Colony Summary
|
|
14
|
+
|
|
15
|
+
- Goal: "{{GOAL}}"
|
|
16
|
+
- Phases: {{PHASES_COMPLETED}} completed of {{TOTAL_PHASES}}
|
|
17
|
+
- Milestone reached: {{MILESTONE}}
|
|
18
|
+
- Entombed at: {{ENTOMB_TIMESTAMP}}
|
|
19
|
+
|
|
20
|
+
## Chamber Contents
|
|
21
|
+
|
|
22
|
+
Everything the colony built and learned rests here now:
|
|
23
|
+
|
|
24
|
+
- colony-state.json — Full colony state
|
|
25
|
+
- manifest.json — Archive metadata
|
|
26
|
+
- CROWNED-ANTHILL.md — Seal ceremony record
|
|
27
|
+
- pheromones.json — Pheromone signals
|
|
28
|
+
- activity.log — Colony activity history
|
|
29
|
+
- spawn-tree.txt — Worker spawn records
|
|
30
|
+
- dreams/ — Dream journal (if existed)
|
|
31
|
+
|
|
32
|
+
## Session Note
|
|
33
|
+
|
|
34
|
+
The active colony has been reset. The chambers hold what was.
|
|
35
|
+
The learnings have been carried forward to QUEEN.md — the next colony won't start from nothing.
|
|
36
|
+
|
|
37
|
+
When you are ready to begin again:
|
|
38
|
+
|
|
39
|
+
To start anew: /ant:lay-eggs "<new goal>"
|
|
40
|
+
To revisit what came before: /ant:tunnels
|
|
@@ -117,6 +117,11 @@ atomic_write_from_file() {
|
|
|
117
117
|
return 1
|
|
118
118
|
fi
|
|
119
119
|
|
|
120
|
+
# Create backup BEFORE validation (mirrors atomic_write ordering — LOCK-03)
|
|
121
|
+
if [ -f "$target_file" ]; then
|
|
122
|
+
create_backup "$target_file"
|
|
123
|
+
fi
|
|
124
|
+
|
|
120
125
|
# Validate JSON if it's a JSON file
|
|
121
126
|
if [[ "$target_file" == *.json ]]; then
|
|
122
127
|
if ! python3 -c "import json; json.load(open('$temp_file'))" 2>/dev/null; then
|
|
@@ -126,11 +131,6 @@ atomic_write_from_file() {
|
|
|
126
131
|
fi
|
|
127
132
|
fi
|
|
128
133
|
|
|
129
|
-
# Create backup if target exists
|
|
130
|
-
if [ -f "$target_file" ]; then
|
|
131
|
-
create_backup "$target_file"
|
|
132
|
-
fi
|
|
133
|
-
|
|
134
134
|
# Atomic rename
|
|
135
135
|
if ! mv "$temp_file" "$target_file"; then
|
|
136
136
|
echo "Failed to rename temp file to target: $target_file"
|