aether-colony 1.1.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/CONTEXT.md +160 -0
- package/.aether/QUEEN.md +84 -0
- package/.aether/aether-utils.sh +7749 -0
- package/.aether/docs/QUEEN-SYSTEM.md +211 -0
- package/.aether/docs/README.md +68 -0
- package/.aether/docs/caste-system.md +48 -0
- package/.aether/docs/disciplines/DISCIPLINES.md +93 -0
- package/.aether/docs/disciplines/coding-standards.md +197 -0
- package/.aether/docs/disciplines/debugging.md +207 -0
- package/.aether/docs/disciplines/learning.md +254 -0
- package/.aether/docs/disciplines/tdd.md +257 -0
- package/.aether/docs/disciplines/verification-loop.md +167 -0
- package/.aether/docs/disciplines/verification.md +116 -0
- package/.aether/docs/error-codes.md +268 -0
- package/.aether/docs/known-issues.md +233 -0
- package/.aether/docs/pheromones.md +205 -0
- package/.aether/docs/queen-commands.md +97 -0
- package/.aether/exchange/colony-registry.xml +11 -0
- package/.aether/exchange/pheromone-xml.sh +575 -0
- package/.aether/exchange/pheromones.xml +87 -0
- package/.aether/exchange/queen-wisdom.xml +14 -0
- package/.aether/exchange/registry-xml.sh +273 -0
- package/.aether/exchange/wisdom-xml.sh +319 -0
- package/.aether/midden/approach-changes.md +5 -0
- package/.aether/midden/build-failures.md +5 -0
- package/.aether/midden/test-failures.md +5 -0
- package/.aether/model-profiles.yaml +100 -0
- package/.aether/rules/aether-colony.md +134 -0
- package/.aether/schemas/aether-types.xsd +255 -0
- package/.aether/schemas/colony-registry.xsd +309 -0
- package/.aether/schemas/example-prompt-builder.xml +234 -0
- package/.aether/schemas/pheromone.xsd +163 -0
- package/.aether/schemas/prompt.xsd +416 -0
- package/.aether/schemas/queen-wisdom.xsd +325 -0
- package/.aether/schemas/worker-priming.xsd +276 -0
- package/.aether/templates/QUEEN.md.template +79 -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/.aether/templates/learning-observations.template.json +6 -0
- package/.aether/templates/midden.template.json +7 -0
- package/.aether/templates/pheromones.template.json +6 -0
- package/.aether/templates/session.template.json +9 -0
- package/.aether/utils/atomic-write.sh +219 -0
- package/.aether/utils/chamber-compare.sh +193 -0
- package/.aether/utils/chamber-utils.sh +297 -0
- package/.aether/utils/colorize-log.sh +132 -0
- package/.aether/utils/error-handler.sh +212 -0
- package/.aether/utils/file-lock.sh +158 -0
- package/.aether/utils/queen-to-md.xsl +395 -0
- package/.aether/utils/semantic-cli.sh +413 -0
- package/.aether/utils/spawn-tree.sh +428 -0
- package/.aether/utils/spawn-with-model.sh +56 -0
- package/.aether/utils/state-loader.sh +215 -0
- package/.aether/utils/swarm-display.sh +268 -0
- package/.aether/utils/watch-spawn-tree.sh +253 -0
- package/.aether/utils/xml-compose.sh +253 -0
- package/.aether/utils/xml-convert.sh +273 -0
- package/.aether/utils/xml-core.sh +186 -0
- package/.aether/utils/xml-query.sh +201 -0
- package/.aether/utils/xml-utils.sh +110 -0
- package/.aether/workers.md +765 -0
- 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 +341 -0
- package/.claude/commands/ant/build.md +1160 -0
- package/.claude/commands/ant/chaos.md +349 -0
- package/.claude/commands/ant/colonize.md +270 -0
- package/.claude/commands/ant/continue.md +1070 -0
- package/.claude/commands/ant/council.md +309 -0
- package/.claude/commands/ant/dream.md +265 -0
- package/.claude/commands/ant/entomb.md +487 -0
- package/.claude/commands/ant/feedback.md +78 -0
- package/.claude/commands/ant/flag.md +139 -0
- package/.claude/commands/ant/flags.md +155 -0
- package/.claude/commands/ant/focus.md +58 -0
- package/.claude/commands/ant/help.md +122 -0
- package/.claude/commands/ant/history.md +137 -0
- package/.claude/commands/ant/init.md +409 -0
- package/.claude/commands/ant/interpret.md +267 -0
- package/.claude/commands/ant/lay-eggs.md +201 -0
- package/.claude/commands/ant/maturity.md +102 -0
- package/.claude/commands/ant/memory-details.md +77 -0
- package/.claude/commands/ant/migrate-state.md +165 -0
- package/.claude/commands/ant/oracle.md +387 -0
- package/.claude/commands/ant/organize.md +227 -0
- package/.claude/commands/ant/pause-colony.md +247 -0
- package/.claude/commands/ant/phase.md +126 -0
- package/.claude/commands/ant/plan.md +544 -0
- package/.claude/commands/ant/redirect.md +58 -0
- package/.claude/commands/ant/resume-colony.md +182 -0
- package/.claude/commands/ant/resume.md +363 -0
- package/.claude/commands/ant/seal.md +306 -0
- package/.claude/commands/ant/status.md +272 -0
- package/.claude/commands/ant/swarm.md +361 -0
- package/.claude/commands/ant/tunnels.md +425 -0
- package/.claude/commands/ant/update.md +209 -0
- package/.claude/commands/ant/verify-castes.md +95 -0
- package/.claude/commands/ant/watch.md +238 -0
- package/.opencode/agents/aether-ambassador.md +140 -0
- package/.opencode/agents/aether-archaeologist.md +108 -0
- package/.opencode/agents/aether-auditor.md +144 -0
- package/.opencode/agents/aether-builder.md +184 -0
- package/.opencode/agents/aether-chaos.md +115 -0
- package/.opencode/agents/aether-chronicler.md +122 -0
- package/.opencode/agents/aether-gatekeeper.md +116 -0
- package/.opencode/agents/aether-includer.md +117 -0
- package/.opencode/agents/aether-keeper.md +177 -0
- package/.opencode/agents/aether-measurer.md +128 -0
- package/.opencode/agents/aether-probe.md +133 -0
- package/.opencode/agents/aether-queen.md +286 -0
- package/.opencode/agents/aether-route-setter.md +130 -0
- package/.opencode/agents/aether-sage.md +106 -0
- package/.opencode/agents/aether-scout.md +101 -0
- package/.opencode/agents/aether-surveyor-disciplines.md +386 -0
- package/.opencode/agents/aether-surveyor-nest.md +324 -0
- package/.opencode/agents/aether-surveyor-pathogens.md +259 -0
- package/.opencode/agents/aether-surveyor-provisions.md +329 -0
- package/.opencode/agents/aether-tracker.md +137 -0
- package/.opencode/agents/aether-watcher.md +174 -0
- package/.opencode/agents/aether-weaver.md +130 -0
- package/.opencode/commands/ant/archaeology.md +338 -0
- package/.opencode/commands/ant/build.md +1200 -0
- package/.opencode/commands/ant/chaos.md +346 -0
- package/.opencode/commands/ant/colonize.md +202 -0
- package/.opencode/commands/ant/continue.md +938 -0
- package/.opencode/commands/ant/council.md +305 -0
- package/.opencode/commands/ant/dream.md +262 -0
- package/.opencode/commands/ant/entomb.md +367 -0
- package/.opencode/commands/ant/feedback.md +80 -0
- package/.opencode/commands/ant/flag.md +137 -0
- package/.opencode/commands/ant/flags.md +153 -0
- package/.opencode/commands/ant/focus.md +56 -0
- package/.opencode/commands/ant/help.md +124 -0
- package/.opencode/commands/ant/history.md +127 -0
- package/.opencode/commands/ant/init.md +337 -0
- package/.opencode/commands/ant/interpret.md +256 -0
- package/.opencode/commands/ant/lay-eggs.md +141 -0
- package/.opencode/commands/ant/maturity.md +92 -0
- package/.opencode/commands/ant/memory-details.md +77 -0
- package/.opencode/commands/ant/migrate-state.md +153 -0
- package/.opencode/commands/ant/oracle.md +338 -0
- package/.opencode/commands/ant/organize.md +224 -0
- package/.opencode/commands/ant/pause-colony.md +220 -0
- package/.opencode/commands/ant/phase.md +123 -0
- package/.opencode/commands/ant/plan.md +531 -0
- package/.opencode/commands/ant/redirect.md +67 -0
- package/.opencode/commands/ant/resume-colony.md +178 -0
- package/.opencode/commands/ant/resume.md +363 -0
- package/.opencode/commands/ant/seal.md +247 -0
- package/.opencode/commands/ant/status.md +272 -0
- package/.opencode/commands/ant/swarm.md +357 -0
- package/.opencode/commands/ant/tunnels.md +406 -0
- package/.opencode/commands/ant/update.md +191 -0
- package/.opencode/commands/ant/verify-castes.md +85 -0
- package/.opencode/commands/ant/watch.md +220 -0
- package/.opencode/opencode.json +3 -0
- package/CHANGELOG.md +325 -0
- package/DISCLAIMER.md +74 -0
- package/LICENSE +21 -0
- package/README.md +258 -0
- package/bin/cli.js +2436 -0
- package/bin/generate-commands.sh +291 -0
- package/bin/lib/caste-colors.js +57 -0
- package/bin/lib/colors.js +76 -0
- package/bin/lib/errors.js +255 -0
- package/bin/lib/event-types.js +190 -0
- package/bin/lib/file-lock.js +695 -0
- package/bin/lib/init.js +454 -0
- package/bin/lib/logger.js +242 -0
- package/bin/lib/model-profiles.js +445 -0
- package/bin/lib/model-verify.js +288 -0
- package/bin/lib/nestmate-loader.js +130 -0
- package/bin/lib/proxy-health.js +253 -0
- package/bin/lib/spawn-logger.js +266 -0
- package/bin/lib/state-guard.js +602 -0
- package/bin/lib/state-sync.js +516 -0
- package/bin/lib/telemetry.js +441 -0
- package/bin/lib/update-transaction.js +1454 -0
- package/bin/npx-install.js +178 -0
- package/bin/sync-to-runtime.sh +6 -0
- package/bin/validate-package.sh +88 -0
- package/package.json +70 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ant:entomb
|
|
3
|
+
description: "⚰️🐜⚰️ Entomb completed colony in chambers"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are the **Queen**. Archive the completed colony to chambers.
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
### Step -1: Normalize Arguments
|
|
11
|
+
|
|
12
|
+
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
13
|
+
|
|
14
|
+
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
15
|
+
|
|
16
|
+
Parse `$normalized_args`:
|
|
17
|
+
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
18
|
+
- Otherwise: set `visual_mode = true`
|
|
19
|
+
|
|
20
|
+
### Step 0: Initialize Visual Mode (if enabled)
|
|
21
|
+
|
|
22
|
+
If `visual_mode` is true:
|
|
23
|
+
```bash
|
|
24
|
+
# Generate session ID
|
|
25
|
+
entomb_id="entomb-$(date +%s)"
|
|
26
|
+
|
|
27
|
+
# Initialize swarm display
|
|
28
|
+
bash .aether/aether-utils.sh swarm-display-init "$entomb_id"
|
|
29
|
+
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Entombing colony" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 0
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Step 1: Read State
|
|
33
|
+
|
|
34
|
+
Read `.aether/data/COLONY_STATE.json`.
|
|
35
|
+
|
|
36
|
+
If file missing or `goal: null`:
|
|
37
|
+
```
|
|
38
|
+
No colony to entomb. Run /ant:init first.
|
|
39
|
+
```
|
|
40
|
+
Stop here.
|
|
41
|
+
|
|
42
|
+
### Step 2: Validate Colony Can Be Entombed
|
|
43
|
+
|
|
44
|
+
Extract: `goal`, `state`, `current_phase`, `plan.phases`, `memory.decisions`, `memory.phase_learnings`.
|
|
45
|
+
|
|
46
|
+
**Precondition 1: All phases must be completed**
|
|
47
|
+
|
|
48
|
+
Check if all phases in `plan.phases` have `status: "completed"`:
|
|
49
|
+
```
|
|
50
|
+
all_completed = all(phase.status == "completed" for phase in plan.phases)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If NOT all completed:
|
|
54
|
+
```
|
|
55
|
+
Cannot entomb incomplete colony.
|
|
56
|
+
|
|
57
|
+
Completed phases: X of Y
|
|
58
|
+
Remaining: {list of incomplete phase names}
|
|
59
|
+
|
|
60
|
+
Run /ant:continue to complete remaining phases first.
|
|
61
|
+
```
|
|
62
|
+
Stop here.
|
|
63
|
+
|
|
64
|
+
**Precondition 2: State must not be EXECUTING**
|
|
65
|
+
|
|
66
|
+
If `state == "EXECUTING"`:
|
|
67
|
+
```
|
|
68
|
+
Colony is still executing. Run /ant:continue to reconcile first.
|
|
69
|
+
```
|
|
70
|
+
Stop here.
|
|
71
|
+
|
|
72
|
+
**Precondition 3: No critical errors**
|
|
73
|
+
|
|
74
|
+
Check `errors.records` for any entries with `severity: "critical"`.
|
|
75
|
+
|
|
76
|
+
If critical errors exist:
|
|
77
|
+
```
|
|
78
|
+
Cannot entomb colony with critical errors.
|
|
79
|
+
|
|
80
|
+
Critical errors: {count}
|
|
81
|
+
Run /ant:continue to resolve errors first.
|
|
82
|
+
```
|
|
83
|
+
Stop here.
|
|
84
|
+
|
|
85
|
+
### Step 3: Compute Milestone
|
|
86
|
+
|
|
87
|
+
Determine milestone based on phases completed:
|
|
88
|
+
- 0 phases: "Fresh Start"
|
|
89
|
+
- 1 phase: "First Mound"
|
|
90
|
+
- 2-4 phases: "Open Chambers"
|
|
91
|
+
- 5+ phases: "Sealed Chambers"
|
|
92
|
+
|
|
93
|
+
If all phases completed AND user explicitly sealing: "Crowned Anthill"
|
|
94
|
+
|
|
95
|
+
For entombment, use the computed milestone or extract from state if already set.
|
|
96
|
+
|
|
97
|
+
### Step 4: User Confirmation
|
|
98
|
+
|
|
99
|
+
Display:
|
|
100
|
+
```
|
|
101
|
+
🏺 ═══════════════════════════════════════════════════
|
|
102
|
+
E N T O M B C O L O N Y
|
|
103
|
+
══════════════════════════════════════════════════ 🏺
|
|
104
|
+
|
|
105
|
+
Goal: {goal}
|
|
106
|
+
Phases: {completed}/{total} completed
|
|
107
|
+
Milestone: {milestone}
|
|
108
|
+
|
|
109
|
+
Archive will include:
|
|
110
|
+
- COLONY_STATE.json
|
|
111
|
+
- manifest.json (pheromone trails)
|
|
112
|
+
|
|
113
|
+
This will reset the active colony. Continue? (yes/no)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Wait for explicit "yes" response before proceeding.
|
|
117
|
+
|
|
118
|
+
If user responds with anything other than "yes", display:
|
|
119
|
+
```
|
|
120
|
+
Entombment cancelled. Colony remains active.
|
|
121
|
+
```
|
|
122
|
+
Stop here.
|
|
123
|
+
|
|
124
|
+
### Step 4.5: Check XML Tools
|
|
125
|
+
|
|
126
|
+
XML archiving is required for entombment. Check tool availability before proceeding.
|
|
127
|
+
Uses `command -v xmllint` directly — consistent with seal.md's tool check.
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
if command -v xmllint >/dev/null 2>&1; then
|
|
131
|
+
xmllint_available=true
|
|
132
|
+
else
|
|
133
|
+
xmllint_available=false
|
|
134
|
+
fi
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**If xmllint is NOT available:**
|
|
138
|
+
|
|
139
|
+
Ask the user:
|
|
140
|
+
```
|
|
141
|
+
xmllint is not installed — XML archiving requires it.
|
|
142
|
+
|
|
143
|
+
Install now?
|
|
144
|
+
- macOS: xcode-select --install (or brew install libxml2)
|
|
145
|
+
- Linux: apt-get install libxml2-utils
|
|
146
|
+
|
|
147
|
+
Install xmllint? (yes/no)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Use AskUserQuestion with yes/no options.
|
|
151
|
+
|
|
152
|
+
If yes:
|
|
153
|
+
- On macOS: Run `xcode-select --install` or `brew install libxml2`
|
|
154
|
+
- On Linux: Run `sudo apt-get install -y libxml2-utils`
|
|
155
|
+
- After install attempt, re-check: `command -v xmllint >/dev/null 2>&1`
|
|
156
|
+
- If still not available after install:
|
|
157
|
+
```
|
|
158
|
+
xmllint installation failed. Cannot entomb without XML archiving.
|
|
159
|
+
Install xmllint manually and try again.
|
|
160
|
+
```
|
|
161
|
+
Stop here.
|
|
162
|
+
|
|
163
|
+
If no:
|
|
164
|
+
```
|
|
165
|
+
Entombment requires XML archiving. Install xmllint and try again.
|
|
166
|
+
```
|
|
167
|
+
Stop here.
|
|
168
|
+
|
|
169
|
+
### Step 5: Create Chamber
|
|
170
|
+
|
|
171
|
+
Generate chamber name:
|
|
172
|
+
```bash
|
|
173
|
+
sanitized_goal=$(echo "{goal}" | tr '[:upper:]' '[:lower:]' | tr -cs '[:alnum:]' '-' | sed 's/^-//;s/-$//' | cut -c1-50)
|
|
174
|
+
timestamp=$(date -u +%Y%m%d-%H%M%S)
|
|
175
|
+
chamber_name="${sanitized_goal}-${timestamp}"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Handle name collision: if directory exists, append counter:
|
|
179
|
+
```bash
|
|
180
|
+
counter=1
|
|
181
|
+
original_name="$chamber_name"
|
|
182
|
+
while [[ -d ".aether/chambers/$chamber_name" ]]; do
|
|
183
|
+
chamber_name="${original_name}-${counter}"
|
|
184
|
+
counter=$((counter + 1))
|
|
185
|
+
done
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Step 6: Create Chamber Using Utilities
|
|
189
|
+
|
|
190
|
+
Extract decisions and learnings as JSON arrays:
|
|
191
|
+
```bash
|
|
192
|
+
decisions_json=$(jq -c '.memory.decisions // []' .aether/data/COLONY_STATE.json)
|
|
193
|
+
learnings_json=$(jq -c '.memory.phase_learnings // []' .aether/data/COLONY_STATE.json)
|
|
194
|
+
phases_completed=$(jq '[.plan.phases[] | select(.status == "completed")] | length' .aether/data/COLONY_STATE.json)
|
|
195
|
+
total_phases=$(jq '.plan.phases | length' .aether/data/COLONY_STATE.json)
|
|
196
|
+
version=$(jq -r '.version // "3.0"' .aether/data/COLONY_STATE.json)
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Create the chamber:
|
|
200
|
+
```bash
|
|
201
|
+
bash .aether/aether-utils.sh chamber-create \
|
|
202
|
+
".aether/chambers/{chamber_name}" \
|
|
203
|
+
".aether/data/COLONY_STATE.json" \
|
|
204
|
+
"{goal}" \
|
|
205
|
+
{phases_completed} \
|
|
206
|
+
{total_phases} \
|
|
207
|
+
"{milestone}" \
|
|
208
|
+
"{version}" \
|
|
209
|
+
'{decisions_json}' \
|
|
210
|
+
'{learnings_json}'
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Step 6.5: Export XML Archive (hard-stop)
|
|
214
|
+
|
|
215
|
+
Export combined XML archive to the chamber. This is a HARD REQUIREMENT — entomb fails if XML export fails.
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
chamber_dir=".aether/chambers/$chamber_name"
|
|
219
|
+
xml_result=$(bash .aether/aether-utils.sh colony-archive-xml "$chamber_dir/colony-archive.xml" 2>&1)
|
|
220
|
+
xml_ok=$(echo "$xml_result" | jq -r '.ok // false' 2>/dev/null)
|
|
221
|
+
|
|
222
|
+
if [[ "$xml_ok" != "true" ]]; then
|
|
223
|
+
# HARD STOP — remove the chamber and abort
|
|
224
|
+
rm -rf "$chamber_dir"
|
|
225
|
+
echo "XML archive export failed. Colony NOT entombed."
|
|
226
|
+
echo ""
|
|
227
|
+
echo "Error: $(echo "$xml_result" | jq -r '.error // "Unknown error"' 2>/dev/null)"
|
|
228
|
+
echo ""
|
|
229
|
+
echo "The chamber has been cleaned up. Fix the XML issue and try again."
|
|
230
|
+
# Do NOT proceed to state reset or any further steps
|
|
231
|
+
fi
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
If xml_ok is true, store for display:
|
|
235
|
+
```bash
|
|
236
|
+
xml_pheromone_count=$(echo "$xml_result" | jq -r '.result.pheromone_count // 0' 2>/dev/null)
|
|
237
|
+
xml_archive_line="XML Archive: colony-archive.xml (${xml_pheromone_count} active signals)"
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Critical behavior:** If XML export fails, entomb STOPS. The chamber directory is removed (cleanup). The colony state is NOT reset. The user sees a clear error and can retry after fixing the issue.
|
|
241
|
+
|
|
242
|
+
### Step 7: Verify Chamber Integrity
|
|
243
|
+
|
|
244
|
+
Run verification:
|
|
245
|
+
```bash
|
|
246
|
+
bash .aether/aether-utils.sh chamber-verify ".aether/chambers/{chamber_name}"
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
If verification fails, display error and stop:
|
|
250
|
+
```
|
|
251
|
+
❌ Chamber verification failed.
|
|
252
|
+
|
|
253
|
+
Error: {verification_error}
|
|
254
|
+
|
|
255
|
+
The colony has NOT been reset. Please check the chamber directory:
|
|
256
|
+
.aether/chambers/{chamber_name}/
|
|
257
|
+
```
|
|
258
|
+
Stop here.
|
|
259
|
+
|
|
260
|
+
### Step 8: Reset Colony State
|
|
261
|
+
|
|
262
|
+
Backup current state:
|
|
263
|
+
```bash
|
|
264
|
+
cp .aether/data/COLONY_STATE.json .aether/data/COLONY_STATE.json.bak
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Reset state (including memory fields, already promoted to QUEEN.md):
|
|
268
|
+
```bash
|
|
269
|
+
# Resolve jq template path (hub-first)
|
|
270
|
+
jq_template=""
|
|
271
|
+
for path in \
|
|
272
|
+
"$HOME/.aether/system/templates/colony-state-reset.jq.template" \
|
|
273
|
+
".aether/templates/colony-state-reset.jq.template"; do
|
|
274
|
+
if [[ -f "$path" ]]; then
|
|
275
|
+
jq_template="$path"
|
|
276
|
+
break
|
|
277
|
+
fi
|
|
278
|
+
done
|
|
279
|
+
|
|
280
|
+
if [[ -z "$jq_template" ]]; then
|
|
281
|
+
echo "Template missing: colony-state-reset.jq.template. Run aether update to fix."
|
|
282
|
+
exit 1
|
|
283
|
+
fi
|
|
284
|
+
|
|
285
|
+
jq -f "$jq_template" .aether/data/COLONY_STATE.json.bak > .aether/data/COLONY_STATE.json
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Verify reset succeeded:
|
|
289
|
+
```bash
|
|
290
|
+
new_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json)
|
|
291
|
+
if [[ "$new_goal" != "null" ]]; then
|
|
292
|
+
# Restore from backup
|
|
293
|
+
mv .aether/data/COLONY_STATE.json.bak .aether/data/COLONY_STATE.json
|
|
294
|
+
echo "Error: State reset failed. Restored from backup."
|
|
295
|
+
exit 1
|
|
296
|
+
fi
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Remove backup after successful reset:
|
|
300
|
+
```bash
|
|
301
|
+
rm -f .aether/data/COLONY_STATE.json.bak
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Step 8.5: Write Final Handoff
|
|
305
|
+
|
|
306
|
+
After entombing the colony, write the final handoff documenting the archived colony:
|
|
307
|
+
|
|
308
|
+
Resolve the handoff template path:
|
|
309
|
+
Check ~/.aether/system/templates/handoff.template.md first,
|
|
310
|
+
then .aether/templates/handoff.template.md.
|
|
311
|
+
|
|
312
|
+
If no template found: output "Template missing: handoff.template.md. Run aether update to fix." and stop.
|
|
313
|
+
|
|
314
|
+
Read the template file. Fill all {{PLACEHOLDER}} values:
|
|
315
|
+
- {{CHAMBER_NAME}} → chamber_name
|
|
316
|
+
- {{GOAL}} → goal
|
|
317
|
+
- {{PHASES_COMPLETED}} → phases completed count
|
|
318
|
+
- {{TOTAL_PHASES}} → total phases count
|
|
319
|
+
- {{MILESTONE}} → milestone
|
|
320
|
+
- {{ENTOMB_TIMESTAMP}} → current ISO-8601 UTC timestamp
|
|
321
|
+
|
|
322
|
+
Remove the HTML comment lines at the top of the template.
|
|
323
|
+
Write the result to .aether/HANDOFF.md using the Write tool.
|
|
324
|
+
|
|
325
|
+
This handoff serves as the record of the entombed colony.
|
|
326
|
+
|
|
327
|
+
### Step 9: Display Result
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
🏺 ═══════════════════════════════════════════════════
|
|
331
|
+
C O L O N Y E N T O M B E D
|
|
332
|
+
══════════════════════════════════════════════════ 🏺
|
|
333
|
+
|
|
334
|
+
✅ Colony archived successfully
|
|
335
|
+
|
|
336
|
+
👑 Goal: {goal}
|
|
337
|
+
📍 Phases: {completed} completed
|
|
338
|
+
🏆 Milestone: {milestone}
|
|
339
|
+
|
|
340
|
+
📦 Chamber: .aether/chambers/{chamber_name}/
|
|
341
|
+
{xml_archive_line}
|
|
342
|
+
|
|
343
|
+
🐜 The colony rests. Its learnings are preserved.
|
|
344
|
+
|
|
345
|
+
💾 State persisted — safe to /clear
|
|
346
|
+
|
|
347
|
+
🐜 What would you like to do next?
|
|
348
|
+
1. /ant:lay-eggs "<new goal>" — Start a new colony
|
|
349
|
+
2. /ant:tunnels — Browse archived colonies
|
|
350
|
+
3. /clear — Clear context and continue
|
|
351
|
+
|
|
352
|
+
Use AskUserQuestion with these three options.
|
|
353
|
+
|
|
354
|
+
If option 1 selected: proceed to run /ant:lay-eggs flow
|
|
355
|
+
If option 2 selected: run /ant:tunnels
|
|
356
|
+
If option 3 selected: display "Run /ant:lay-eggs to begin anew after clearing"
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
### Edge Cases
|
|
360
|
+
|
|
361
|
+
**Chamber name collision:** Automatically append counter to make unique.
|
|
362
|
+
|
|
363
|
+
**Missing files during archive:** Note in output but continue with available files.
|
|
364
|
+
|
|
365
|
+
**State reset failure:** Restore from backup, display error, do not claim success.
|
|
366
|
+
|
|
367
|
+
**Empty phases array:** Can entomb a colony that was initialized but had no phases planned (treat as 0 of 0 completed).
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ant:feedback
|
|
3
|
+
description: "💬🐜🧠🐜💬 Emit FEEDBACK signal to provide guidance to colony"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are the **Queen**. Emit a FEEDBACK signal.
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
### Step -1: Normalize Arguments
|
|
11
|
+
|
|
12
|
+
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
13
|
+
|
|
14
|
+
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
15
|
+
|
|
16
|
+
The feedback message is: `$normalized_args`
|
|
17
|
+
|
|
18
|
+
### Step 1: Validate
|
|
19
|
+
If `$normalized_args` empty -> show usage: `/ant:feedback <message>`, stop.
|
|
20
|
+
If content > 500 chars -> "Signal content too long (max 500 chars)", stop.
|
|
21
|
+
|
|
22
|
+
### Step 2: Read + Update State
|
|
23
|
+
Read `.aether/data/COLONY_STATE.json`.
|
|
24
|
+
If `goal: null` -> "No colony initialized.", stop.
|
|
25
|
+
|
|
26
|
+
Generate ISO-8601 timestamp.
|
|
27
|
+
|
|
28
|
+
**Add signal:**
|
|
29
|
+
Append to `signals` array:
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"id": "feedback_<timestamp_ms>",
|
|
33
|
+
"type": "FEEDBACK",
|
|
34
|
+
"content": "<feedback message>",
|
|
35
|
+
"priority": "low",
|
|
36
|
+
"created_at": "<ISO-8601>",
|
|
37
|
+
"expires_at": "phase_end"
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Create instinct from feedback:**
|
|
42
|
+
User feedback is high-value learning. Append to `memory.instincts`:
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"id": "instinct_<timestamp>",
|
|
46
|
+
"trigger": "<infer from feedback context>",
|
|
47
|
+
"action": "<the feedback guidance>",
|
|
48
|
+
"confidence": 0.7,
|
|
49
|
+
"domain": "<infer: testing|architecture|code-style|debugging|workflow>",
|
|
50
|
+
"source": "user_feedback",
|
|
51
|
+
"evidence": ["User feedback: <content>"],
|
|
52
|
+
"created_at": "<ISO-8601>",
|
|
53
|
+
"last_applied": null,
|
|
54
|
+
"applications": 0,
|
|
55
|
+
"successes": 0
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Write COLONY_STATE.json.
|
|
60
|
+
|
|
61
|
+
### Step 3: Confirm
|
|
62
|
+
|
|
63
|
+
Output header:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
💬🐜🧠🐜💬 ═══════════════════════════════════════════════════
|
|
67
|
+
F E E D B A C K S I G N A L
|
|
68
|
+
═══════════════════════════════════════════════════ 💬🐜🧠🐜💬
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Then output:
|
|
72
|
+
```
|
|
73
|
+
💬 FEEDBACK signal emitted
|
|
74
|
+
|
|
75
|
+
"{content preview}"
|
|
76
|
+
|
|
77
|
+
🧠 Instinct created: [0.7] <domain>: <action summary>
|
|
78
|
+
|
|
79
|
+
🐜 The colony will remember this guidance.
|
|
80
|
+
```
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ant:flag
|
|
3
|
+
description: "🚩🐜📋🐜🚩 Create a project-specific flag (blocker, issue, or note)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are the **Queen**. Create a project-specific flag.
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
### Step -1: Normalize Arguments
|
|
11
|
+
|
|
12
|
+
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
13
|
+
|
|
14
|
+
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
15
|
+
|
|
16
|
+
The flag is: `$normalized_args`
|
|
17
|
+
|
|
18
|
+
### Step 1: Parse Arguments
|
|
19
|
+
|
|
20
|
+
Parse `$normalized_args` for:
|
|
21
|
+
- `--type` or `-t`: blocker | issue | note (default: issue)
|
|
22
|
+
- `--phase` or `-p`: phase number (optional)
|
|
23
|
+
- Remaining text: the flag title/description
|
|
24
|
+
|
|
25
|
+
Examples:
|
|
26
|
+
- `/ant:flag "Build fails on auth module"` → issue type
|
|
27
|
+
- `/ant:flag --type blocker "API rate limit hit"` → blocker type
|
|
28
|
+
- `/ant:flag -t note -p 3 "Consider refactoring later"` → note for phase 3
|
|
29
|
+
|
|
30
|
+
If `$normalized_args` is empty:
|
|
31
|
+
```
|
|
32
|
+
Usage: /ant:flag "<description>" [--type blocker|issue|note] [--phase N]
|
|
33
|
+
|
|
34
|
+
Types:
|
|
35
|
+
blocker Critical issue that blocks phase advancement
|
|
36
|
+
issue Warning that should be addressed (default)
|
|
37
|
+
note Informational for future reference
|
|
38
|
+
|
|
39
|
+
Examples:
|
|
40
|
+
/ant:flag "Build fails on auth"
|
|
41
|
+
/ant:flag --type blocker "Tests hanging"
|
|
42
|
+
/ant:flag -t note "Consider refactoring"
|
|
43
|
+
```
|
|
44
|
+
Stop here.
|
|
45
|
+
|
|
46
|
+
### Step 2: Validate Colony
|
|
47
|
+
|
|
48
|
+
Read `.aether/data/COLONY_STATE.json`.
|
|
49
|
+
If file missing or `goal: null`:
|
|
50
|
+
```
|
|
51
|
+
No colony initialized. Run /ant:init first.
|
|
52
|
+
```
|
|
53
|
+
Stop here.
|
|
54
|
+
|
|
55
|
+
### Step 3: Create Flag
|
|
56
|
+
|
|
57
|
+
Run:
|
|
58
|
+
```bash
|
|
59
|
+
bash .aether/aether-utils.sh flag-add "{type}" "{title}" "{description}" "manual" {phase_or_null}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Parse the result for the flag ID.
|
|
63
|
+
|
|
64
|
+
### Step 4: Confirm
|
|
65
|
+
|
|
66
|
+
Output header based on flag type:
|
|
67
|
+
|
|
68
|
+
**For blocker:**
|
|
69
|
+
```
|
|
70
|
+
🚩🐜📋🐜🚩 ═══════════════════════════════════════════════════
|
|
71
|
+
B L O C K E R F L A G C R E A T E D
|
|
72
|
+
═══════════════════════════════════════════════════ 🚩🐜📋🐜🚩
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**For issue:**
|
|
76
|
+
```
|
|
77
|
+
🚩🐜📋🐜🚩 ═══════════════════════════════════════════════════
|
|
78
|
+
I S S U E F L A G C R E A T E D
|
|
79
|
+
═══════════════════════════════════════════════════ 🚩🐜📋🐜🚩
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**For note:**
|
|
83
|
+
```
|
|
84
|
+
🚩🐜📋🐜🚩 ═══════════════════════════════════════════════════
|
|
85
|
+
N O T E F L A G C R E A T E D
|
|
86
|
+
═══════════════════════════════════════════════════ 🚩🐜📋🐜🚩
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Then output based on flag type:
|
|
90
|
+
|
|
91
|
+
**For blocker:**
|
|
92
|
+
```
|
|
93
|
+
🚫 BLOCKER flag created
|
|
94
|
+
|
|
95
|
+
"{title}"
|
|
96
|
+
|
|
97
|
+
ID: {flag_id}
|
|
98
|
+
Phase: {phase or "all"}
|
|
99
|
+
|
|
100
|
+
⚠️ This will BLOCK phase advancement until resolved.
|
|
101
|
+
Use /ant:flags to view all flags.
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**For issue:**
|
|
105
|
+
```
|
|
106
|
+
⚠️ ISSUE flag created
|
|
107
|
+
|
|
108
|
+
"{title}"
|
|
109
|
+
|
|
110
|
+
ID: {flag_id}
|
|
111
|
+
Phase: {phase or "all"}
|
|
112
|
+
|
|
113
|
+
Use /ant:flags to view all flags.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**For note:**
|
|
117
|
+
```
|
|
118
|
+
📝 NOTE flag created
|
|
119
|
+
|
|
120
|
+
"{title}"
|
|
121
|
+
|
|
122
|
+
ID: {flag_id}
|
|
123
|
+
Phase: {phase or "all"}
|
|
124
|
+
|
|
125
|
+
Use /ant:flags to view all flags.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Flag Lifecycle
|
|
131
|
+
|
|
132
|
+
1. **Created** - Flag is active and visible
|
|
133
|
+
2. **Acknowledged** - Flag noted but continuing (issues/notes only)
|
|
134
|
+
3. **Resolved** - Flag closed with resolution message
|
|
135
|
+
4. **Auto-resolved** - Blockers auto-resolve on build_pass
|
|
136
|
+
|
|
137
|
+
Blockers CANNOT be acknowledged - they must be resolved before phase advancement.
|