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,306 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ant:seal
|
|
3
|
+
description: "🏺🐜🏺 Seal the colony with Crowned Anthill milestone"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are the **Queen**. Seal the colony with a ceremony — no archiving.
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
Parse `$ARGUMENTS`:
|
|
11
|
+
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
12
|
+
- Otherwise: set `visual_mode = true`
|
|
13
|
+
|
|
14
|
+
<failure_modes>
|
|
15
|
+
### Crowned Anthill Write Failure
|
|
16
|
+
If writing the Crowned Anthill milestone document fails:
|
|
17
|
+
- Do not mark the colony as sealed in state
|
|
18
|
+
- Report the error -- sealing is incomplete
|
|
19
|
+
- Recovery: user can re-run /ant:seal after fixing the issue
|
|
20
|
+
|
|
21
|
+
### State Update Failure After Seal
|
|
22
|
+
If COLONY_STATE.json update fails after seal document is written:
|
|
23
|
+
- The seal document exists but state doesn't reflect it
|
|
24
|
+
- Report the inconsistency
|
|
25
|
+
- Options: (1) Retry state update only, (2) Manual state fix, (3) Re-run /ant:seal
|
|
26
|
+
</failure_modes>
|
|
27
|
+
|
|
28
|
+
<success_criteria>
|
|
29
|
+
Command is complete when:
|
|
30
|
+
- Crowned Anthill milestone document is written
|
|
31
|
+
- COLONY_STATE.json reflects sealed status
|
|
32
|
+
- All phase evidence is summarized in the seal document
|
|
33
|
+
- User sees confirmation of successful seal
|
|
34
|
+
</success_criteria>
|
|
35
|
+
|
|
36
|
+
<read_only>
|
|
37
|
+
Do not touch during seal:
|
|
38
|
+
- .aether/dreams/ (user notes)
|
|
39
|
+
- .aether/chambers/ (archived colonies -- seal does NOT archive)
|
|
40
|
+
- Source code files
|
|
41
|
+
- .env* files
|
|
42
|
+
- .claude/settings.json
|
|
43
|
+
</read_only>
|
|
44
|
+
|
|
45
|
+
### Step 0: Initialize Visual Mode (if enabled)
|
|
46
|
+
|
|
47
|
+
If `visual_mode` is true:
|
|
48
|
+
```bash
|
|
49
|
+
# Generate session ID
|
|
50
|
+
seal_id="seal-$(date +%s)"
|
|
51
|
+
|
|
52
|
+
# Initialize swarm display (consolidated)
|
|
53
|
+
bash .aether/aether-utils.sh swarm-display-init "$seal_id" && bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Sealing colony" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 0
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 1: Read State
|
|
57
|
+
|
|
58
|
+
Read `.aether/data/COLONY_STATE.json`.
|
|
59
|
+
|
|
60
|
+
If file missing or `goal: null`:
|
|
61
|
+
```
|
|
62
|
+
No colony initialized. Run /ant:init first.
|
|
63
|
+
```
|
|
64
|
+
Stop here.
|
|
65
|
+
|
|
66
|
+
Extract: `goal`, `state`, `current_phase`, `plan.phases`, `milestone`, `version`, `initialized_at`.
|
|
67
|
+
|
|
68
|
+
### Step 2: Maturity Gate
|
|
69
|
+
|
|
70
|
+
Run `bash .aether/aether-utils.sh milestone-detect` to get `milestone`, `phases_completed`, `total_phases`.
|
|
71
|
+
|
|
72
|
+
**If milestone is already "Crowned Anthill":**
|
|
73
|
+
```
|
|
74
|
+
Colony already sealed at Crowned Anthill.
|
|
75
|
+
Run /ant:entomb to archive this colony to chambers.
|
|
76
|
+
```
|
|
77
|
+
Stop here.
|
|
78
|
+
|
|
79
|
+
**If state is "EXECUTING":**
|
|
80
|
+
```
|
|
81
|
+
Colony is still executing. Run /ant:continue first.
|
|
82
|
+
```
|
|
83
|
+
Stop here.
|
|
84
|
+
|
|
85
|
+
**If all phases complete** (phases_completed == total_phases, or milestone is "Sealed Chambers"):
|
|
86
|
+
- Set `incomplete_warning = ""` (no warning needed)
|
|
87
|
+
- Proceed to Step 3.
|
|
88
|
+
|
|
89
|
+
**If phases are incomplete** (any other milestone — First Mound, Open Chambers, Brood Stable, Ventilated Nest, etc.):
|
|
90
|
+
- Set `incomplete_warning = "WARNING: {phases_completed} of {total_phases} phases complete. Sealing now will mark incomplete work as the final state."`
|
|
91
|
+
- Proceed to Step 3 (warn but DO NOT block).
|
|
92
|
+
|
|
93
|
+
### Step 3: Confirmation
|
|
94
|
+
|
|
95
|
+
Display what will be sealed:
|
|
96
|
+
```
|
|
97
|
+
SEAL COLONY
|
|
98
|
+
|
|
99
|
+
Goal: {goal}
|
|
100
|
+
Phases: {phases_completed} of {total_phases} completed
|
|
101
|
+
Current Milestone: {milestone}
|
|
102
|
+
|
|
103
|
+
{If incomplete_warning is not empty, display it here}
|
|
104
|
+
|
|
105
|
+
This will:
|
|
106
|
+
- Award the Crowned Anthill milestone
|
|
107
|
+
- Write CROWNED-ANTHILL.md ceremony record
|
|
108
|
+
- Promote colony wisdom to QUEEN.md
|
|
109
|
+
|
|
110
|
+
Seal this colony? (yes/no)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Use `AskUserQuestion with yes/no options`.
|
|
114
|
+
|
|
115
|
+
If not "yes":
|
|
116
|
+
```
|
|
117
|
+
Sealing cancelled. Colony remains active.
|
|
118
|
+
```
|
|
119
|
+
Stop here.
|
|
120
|
+
|
|
121
|
+
### Step 3.5: Wisdom Approval
|
|
122
|
+
|
|
123
|
+
Before sealing, review wisdom proposals accumulated during this colony's lifecycle.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Check for pending proposals
|
|
127
|
+
proposals=$(bash .aether/aether-utils.sh learning-check-promotion 2>/dev/null || echo '{"proposals":[]}')
|
|
128
|
+
proposal_count=$(echo "$proposals" | jq '.proposals | length')
|
|
129
|
+
|
|
130
|
+
if [[ "$proposal_count" -gt 0 ]]; then
|
|
131
|
+
echo ""
|
|
132
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
133
|
+
echo " 🧠 WISDOM REVIEW"
|
|
134
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
135
|
+
echo ""
|
|
136
|
+
echo "Review wisdom proposals before sealing this colony."
|
|
137
|
+
echo "Approved proposals will be promoted to QUEEN.md."
|
|
138
|
+
echo ""
|
|
139
|
+
|
|
140
|
+
# Run approval workflow (blocking)
|
|
141
|
+
bash .aether/aether-utils.sh learning-approve-proposals
|
|
142
|
+
|
|
143
|
+
echo ""
|
|
144
|
+
echo "Wisdom review complete. Proceeding with sealing ceremony..."
|
|
145
|
+
echo ""
|
|
146
|
+
else
|
|
147
|
+
echo "No wisdom proposals to review."
|
|
148
|
+
fi
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Step 4: Log Seal Activity
|
|
152
|
+
|
|
153
|
+
Log the seal ceremony to activity log:
|
|
154
|
+
```bash
|
|
155
|
+
bash .aether/aether-utils.sh activity-log "MODIFIED" "Queen" "Colony sealed - wisdom review completed"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Step 5: Update Milestone to Crowned Anthill
|
|
159
|
+
|
|
160
|
+
Update COLONY_STATE.json:
|
|
161
|
+
1. Set `milestone` to `"Crowned Anthill"`
|
|
162
|
+
2. Set `milestone_updated_at` to current ISO-8601 timestamp
|
|
163
|
+
3. Append event: `"<timestamp>|milestone_reached|seal|Achieved Crowned Anthill milestone"`
|
|
164
|
+
|
|
165
|
+
Run `bash .aether/aether-utils.sh validate-state colony` after write.
|
|
166
|
+
|
|
167
|
+
### Step 6: Write CROWNED-ANTHILL.md
|
|
168
|
+
|
|
169
|
+
Calculate colony age:
|
|
170
|
+
```bash
|
|
171
|
+
initialized_at=$(jq -r '.initialized_at // empty' .aether/data/COLONY_STATE.json)
|
|
172
|
+
if [[ -n "$initialized_at" ]]; then
|
|
173
|
+
init_epoch=$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "$initialized_at" +%s 2>/dev/null || echo 0)
|
|
174
|
+
now_epoch=$(date +%s)
|
|
175
|
+
if [[ "$init_epoch" -gt 0 ]]; then
|
|
176
|
+
colony_age_days=$(( (now_epoch - init_epoch) / 86400 ))
|
|
177
|
+
else
|
|
178
|
+
colony_age_days=0
|
|
179
|
+
fi
|
|
180
|
+
else
|
|
181
|
+
colony_age_days=0
|
|
182
|
+
fi
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Extract phase recap:
|
|
186
|
+
```bash
|
|
187
|
+
phase_recap=""
|
|
188
|
+
while IFS= read -r phase_line; do
|
|
189
|
+
phase_name=$(echo "$phase_line" | jq -r '.name')
|
|
190
|
+
phase_status=$(echo "$phase_line" | jq -r '.status')
|
|
191
|
+
phase_recap="${phase_recap} - ${phase_name}: ${phase_status}\n"
|
|
192
|
+
done < <(jq -c '.plan.phases[]' .aether/data/COLONY_STATE.json 2>/dev/null)
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Write the seal document:
|
|
196
|
+
```bash
|
|
197
|
+
version=$(jq -r '.version // "3.0"' .aether/data/COLONY_STATE.json)
|
|
198
|
+
seal_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Resolve the crowned-anthill template path:
|
|
202
|
+
Check ~/.aether/system/templates/crowned-anthill.template.md first,
|
|
203
|
+
then .aether/templates/crowned-anthill.template.md.
|
|
204
|
+
|
|
205
|
+
If no template found: output "Template missing: crowned-anthill.template.md. Run aether update to fix." and stop.
|
|
206
|
+
|
|
207
|
+
Read the template file. Fill all {{PLACEHOLDER}} values:
|
|
208
|
+
- {{GOAL}} → goal (from colony state)
|
|
209
|
+
- {{SEAL_DATE}} → seal_date (ISO-8601 UTC timestamp)
|
|
210
|
+
- {{VERSION}} → version (from colony state)
|
|
211
|
+
- {{TOTAL_PHASES}} → total_phases
|
|
212
|
+
- {{PHASES_COMPLETED}} → phases_completed
|
|
213
|
+
- {{COLONY_AGE_DAYS}} → colony_age_days
|
|
214
|
+
- {{PROMOTIONS_MADE}} → promotions_made
|
|
215
|
+
- {{PHASE_RECAP}} → phase recap list (one entry per line, formatted from the bash loop above)
|
|
216
|
+
|
|
217
|
+
Remove the HTML comment lines at the top of the template (lines starting with <!--).
|
|
218
|
+
Write the result to .aether/CROWNED-ANTHILL.md using the Write tool.
|
|
219
|
+
|
|
220
|
+
### Step 6.5: Export XML Archive (best-effort)
|
|
221
|
+
|
|
222
|
+
Export colony data as a combined XML archive. This is best-effort — seal proceeds even if XML export fails.
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Check if xmllint is available
|
|
226
|
+
if command -v xmllint >/dev/null 2>&1; then
|
|
227
|
+
xml_result=$(bash .aether/aether-utils.sh colony-archive-xml ".aether/exchange/colony-archive.xml" 2>&1)
|
|
228
|
+
xml_ok=$(echo "$xml_result" | jq -r '.ok // false' 2>/dev/null)
|
|
229
|
+
if [[ "$xml_ok" == "true" ]]; then
|
|
230
|
+
xml_pheromone_count=$(echo "$xml_result" | jq -r '.result.pheromone_count // 0' 2>/dev/null)
|
|
231
|
+
xml_export_line="XML Archive: colony-archive.xml (${xml_pheromone_count} active signals)"
|
|
232
|
+
else
|
|
233
|
+
xml_export_line="XML Archive: export failed (non-blocking)"
|
|
234
|
+
fi
|
|
235
|
+
else
|
|
236
|
+
xml_export_line="XML Archive: skipped (xmllint not available)"
|
|
237
|
+
fi
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Step 7: Display Ceremony
|
|
241
|
+
|
|
242
|
+
**If visual_mode is true, render swarm display BEFORE the ASCII art (consolidated):**
|
|
243
|
+
```bash
|
|
244
|
+
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony sealed" "Colony" '{"read":3,"grep":0,"edit":2,"bash":3}' 100 "fungus_garden" 100 && bash .aether/aether-utils.sh swarm-display-inline "$seal_id"
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Display the ASCII art ceremony:
|
|
248
|
+
```
|
|
249
|
+
. .
|
|
250
|
+
/|\ /|\
|
|
251
|
+
/ | \ / | \
|
|
252
|
+
/ | X | \
|
|
253
|
+
/ | / \ | \
|
|
254
|
+
/ |/ \| \
|
|
255
|
+
/ / \ \
|
|
256
|
+
/____ / ___ \ ____\
|
|
257
|
+
/ / \ \
|
|
258
|
+
/ / \ \
|
|
259
|
+
/_/ \_\
|
|
260
|
+
| CROWNED |
|
|
261
|
+
| ANTHILL |
|
|
262
|
+
|__________|
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Below the ASCII art, display:
|
|
266
|
+
```
|
|
267
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
268
|
+
C R O W N E D A N T H I L L
|
|
269
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
270
|
+
|
|
271
|
+
Goal: {goal}
|
|
272
|
+
Phases: {phases_completed} of {total_phases} completed
|
|
273
|
+
{If incomplete_warning is not empty: display it}
|
|
274
|
+
Wisdom Promoted: {promotion_summary}
|
|
275
|
+
|
|
276
|
+
Seal Document: .aether/CROWNED-ANTHILL.md
|
|
277
|
+
{xml_export_line}
|
|
278
|
+
|
|
279
|
+
The colony stands crowned and sealed.
|
|
280
|
+
Its wisdom lives on in QUEEN.md.
|
|
281
|
+
The anthill has reached its final form.
|
|
282
|
+
|
|
283
|
+
──────────────────────────────────────────────────
|
|
284
|
+
🐜 Next Up
|
|
285
|
+
──────────────────────────────────────────────────
|
|
286
|
+
/ant:entomb 🏺 Archive colony to chambers
|
|
287
|
+
/ant:lay-eggs 🥚 Start a new colony
|
|
288
|
+
/ant:tunnels 🗄️ Browse archived chambers
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Edge Cases
|
|
292
|
+
|
|
293
|
+
**Colony already at Crowned Anthill:**
|
|
294
|
+
- Display message and guide to /ant:entomb. Do NOT re-seal.
|
|
295
|
+
|
|
296
|
+
**Phases incomplete:**
|
|
297
|
+
- Warn but allow. The seal proceeds after confirmation.
|
|
298
|
+
|
|
299
|
+
**Missing QUEEN.md:**
|
|
300
|
+
- queen-init creates it. If that fails, skip promotion (non-fatal).
|
|
301
|
+
|
|
302
|
+
**Missing initialized_at:**
|
|
303
|
+
- Colony age defaults to 0 days.
|
|
304
|
+
|
|
305
|
+
**Empty phases array:**
|
|
306
|
+
- Can seal a colony with 0 phases (rare but valid). phases_completed = 0, total_phases = 0.
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ant:status
|
|
3
|
+
description: "📈🐜🏘️🐜📈 Show colony status at a glance"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are the **Queen**. Show colony status.
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
### Step 0: Version Check (Non-blocking)
|
|
11
|
+
|
|
12
|
+
Run using the Bash tool with description "Checking colony version...": `bash .aether/aether-utils.sh version-check-cached 2>/dev/null || true`
|
|
13
|
+
|
|
14
|
+
If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
|
|
15
|
+
|
|
16
|
+
### Step 1: Read State + Version Check
|
|
17
|
+
|
|
18
|
+
Read `.aether/data/COLONY_STATE.json`.
|
|
19
|
+
|
|
20
|
+
If file missing or `goal: null`:
|
|
21
|
+
```
|
|
22
|
+
No colony initialized. Run /ant:init first.
|
|
23
|
+
```
|
|
24
|
+
Stop here.
|
|
25
|
+
|
|
26
|
+
**Auto-upgrade old state:**
|
|
27
|
+
If `version` field is missing, "1.0", or "2.0":
|
|
28
|
+
1. Preserve: `goal`, `state`, `current_phase`, `plan.phases` (keep phase structure)
|
|
29
|
+
2. Write upgraded state:
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"version": "3.0",
|
|
33
|
+
"goal": "<preserved>",
|
|
34
|
+
"state": "<preserved or 'READY'>",
|
|
35
|
+
"current_phase": <preserved or 0>,
|
|
36
|
+
"session_id": "migrated_<timestamp>",
|
|
37
|
+
"initialized_at": "<preserved or now>",
|
|
38
|
+
"build_started_at": null,
|
|
39
|
+
"plan": {
|
|
40
|
+
"generated_at": "<preserved or null>",
|
|
41
|
+
"confidence": null,
|
|
42
|
+
"phases": <preserved or []>
|
|
43
|
+
},
|
|
44
|
+
"memory": { "phase_learnings": [], "decisions": [], "instincts": [] },
|
|
45
|
+
"errors": { "records": [], "flagged_patterns": [] },
|
|
46
|
+
"events": ["<now>|state_upgraded|system|Auto-upgraded from v<old> to v3.0"]
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
3. Output: `State auto-upgraded to v3.0`
|
|
50
|
+
4. Continue with command.
|
|
51
|
+
|
|
52
|
+
### Step 1.5: Load State and Show Resumption Context
|
|
53
|
+
|
|
54
|
+
Run using the Bash tool with description "Loading colony state...": `bash .aether/aether-utils.sh load-state`
|
|
55
|
+
|
|
56
|
+
If successful and goal is not null:
|
|
57
|
+
1. Extract current_phase from state
|
|
58
|
+
2. Get phase name from plan.phases[current_phase - 1].name (or "(unnamed)")
|
|
59
|
+
3. Get last event timestamp from events array (last element)
|
|
60
|
+
4. Display extended resumption context:
|
|
61
|
+
```
|
|
62
|
+
🔄 Resuming: Phase X - Name
|
|
63
|
+
Last activity: timestamp
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
5. Check for .aether/HANDOFF.md existence in the load-state output or via separate check
|
|
67
|
+
6. If .aether/HANDOFF.md exists:
|
|
68
|
+
- Display: "Resuming from paused session"
|
|
69
|
+
- Read .aether/HANDOFF.md content for additional context
|
|
70
|
+
- Remove .aether/HANDOFF.md after displaying (cleanup)
|
|
71
|
+
|
|
72
|
+
Run using the Bash tool with description "Releasing colony lock...": `bash .aether/aether-utils.sh unload-state` to release lock.
|
|
73
|
+
|
|
74
|
+
### Step 2: Compute Summary
|
|
75
|
+
|
|
76
|
+
From state, extract:
|
|
77
|
+
|
|
78
|
+
### Step 2.5: Gather Dream Information
|
|
79
|
+
|
|
80
|
+
Run using the Bash tool with description "Counting dream entries...": `ls -1 .aether/dreams/*.md 2>/dev/null | wc -l`
|
|
81
|
+
|
|
82
|
+
Capture:
|
|
83
|
+
- Dream count: number of .md files in .aether/dreams/
|
|
84
|
+
- Latest dream: most recent file by name (files are timestamped: YYYY-MM-DD-HHMM.md)
|
|
85
|
+
|
|
86
|
+
To get latest dream timestamp, run using the Bash tool with description "Finding latest dream...":
|
|
87
|
+
```bash
|
|
88
|
+
ls -1 .aether/dreams/*.md 2>/dev/null | sort | tail -1 | sed 's/.*\/\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\)-\([0-9]\{4\}\).*/\1 \2/'
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Format the timestamp as: YYYY-MM-DD HH:MM
|
|
92
|
+
|
|
93
|
+
From state, extract:
|
|
94
|
+
|
|
95
|
+
**Phase info:**
|
|
96
|
+
- Current phase number: `current_phase`
|
|
97
|
+
- Total phases: `plan.phases.length`
|
|
98
|
+
- Phase name: `plan.phases[current_phase - 1].name` (if exists)
|
|
99
|
+
|
|
100
|
+
**Task progress:**
|
|
101
|
+
- If phases exist, count tasks in current phase
|
|
102
|
+
- Completed: tasks with `status: "completed"`
|
|
103
|
+
- Total: all tasks in current phase
|
|
104
|
+
|
|
105
|
+
**Constraints:**
|
|
106
|
+
Read `.aether/data/constraints.json` if exists:
|
|
107
|
+
- Focus count: `focus.length`
|
|
108
|
+
- Constraints count: `constraints.length`
|
|
109
|
+
|
|
110
|
+
**Flags:**
|
|
111
|
+
Run using the Bash tool with description "Checking for blockers...": `bash .aether/aether-utils.sh flag-check-blockers`
|
|
112
|
+
Extract:
|
|
113
|
+
- Blockers count (critical, block advancement)
|
|
114
|
+
- Issues count (high, warnings)
|
|
115
|
+
- Notes count (low, informational)
|
|
116
|
+
|
|
117
|
+
**Escalation state:**
|
|
118
|
+
Count escalated flags by checking for blocker flags with source "escalation":
|
|
119
|
+
|
|
120
|
+
Run using the Bash tool with description "Checking escalation state...":
|
|
121
|
+
```bash
|
|
122
|
+
escalated_count=$(bash .aether/aether-utils.sh flag-list --type blocker 2>/dev/null | jq '[.result.flags[] | select(.source == "escalation")] | length' 2>/dev/null || echo "0")
|
|
123
|
+
echo "escalated_count=$escalated_count"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Instincts:**
|
|
127
|
+
From `memory.instincts`:
|
|
128
|
+
- Total count: `instincts.length`
|
|
129
|
+
- High confidence (≥0.7): count where confidence >= 0.7
|
|
130
|
+
- Top 3: sorted by confidence descending
|
|
131
|
+
|
|
132
|
+
**Colony state:**
|
|
133
|
+
- `state` field (IDLE, READY, EXECUTING, PLANNING)
|
|
134
|
+
|
|
135
|
+
**Milestone:**
|
|
136
|
+
- `milestone` field (First Mound, Open Chambers, Brood Stable, Ventilated Nest, Sealed Chambers, Crowned Anthill)
|
|
137
|
+
- `milestone_updated_at` field (timestamp of last milestone change)
|
|
138
|
+
|
|
139
|
+
### Step 2.6: Detect Milestone
|
|
140
|
+
|
|
141
|
+
Run using the Bash tool with description "Detecting colony milestone...": `bash .aether/aether-utils.sh milestone-detect`
|
|
142
|
+
|
|
143
|
+
Extract from JSON result:
|
|
144
|
+
- `milestone`: Current milestone name
|
|
145
|
+
- `version`: Computed version string
|
|
146
|
+
- `phases_completed`: Number of completed phases
|
|
147
|
+
- `total_phases`: Total phases in plan
|
|
148
|
+
|
|
149
|
+
### Step 2.8: Load Memory Health Metrics
|
|
150
|
+
|
|
151
|
+
Run using the Bash tool with description "Loading memory health metrics...":
|
|
152
|
+
```bash
|
|
153
|
+
bash .aether/aether-utils.sh memory-metrics
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Extract from JSON result:
|
|
157
|
+
- wisdom.total
|
|
158
|
+
- pending.total
|
|
159
|
+
- recent_failures.count
|
|
160
|
+
- last_activity.queen_md_updated
|
|
161
|
+
- last_activity.learning_captured
|
|
162
|
+
|
|
163
|
+
Format timestamps for display (YYYY-MM-DD HH:MM).
|
|
164
|
+
|
|
165
|
+
### Step 2.7: Generate Progress Bars
|
|
166
|
+
|
|
167
|
+
Calculate progress metrics and generate visual bars.
|
|
168
|
+
|
|
169
|
+
Run using the Bash tool with description "Computing phase progress...":
|
|
170
|
+
```bash
|
|
171
|
+
current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
|
|
172
|
+
total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
|
|
173
|
+
|
|
174
|
+
# Calculate task progress in current phase
|
|
175
|
+
if [[ "$current_phase" -gt 0 && "$current_phase" -le "$total_phases" ]]; then
|
|
176
|
+
phase_idx=$((current_phase - 1))
|
|
177
|
+
tasks_completed=$(jq -r ".plan.phases[$phase_idx].tasks // [] | map(select(.status == \"completed\")) | length" .aether/data/COLONY_STATE.json)
|
|
178
|
+
tasks_total=$(jq -r ".plan.phases[$phase_idx].tasks // [] | length" .aether/data/COLONY_STATE.json)
|
|
179
|
+
phase_name=$(jq -r ".plan.phases[$phase_idx].name // \"Unnamed\"" .aether/data/COLONY_STATE.json)
|
|
180
|
+
else
|
|
181
|
+
tasks_completed=0
|
|
182
|
+
tasks_total=0
|
|
183
|
+
phase_name="No plan created"
|
|
184
|
+
fi
|
|
185
|
+
|
|
186
|
+
# Generate progress bars
|
|
187
|
+
phase_bar=$(bash .aether/aether-utils.sh generate-progress-bar "$current_phase" "$total_phases" 20)
|
|
188
|
+
task_bar=$(bash .aether/aether-utils.sh generate-progress-bar "$tasks_completed" "$tasks_total" 20)
|
|
189
|
+
|
|
190
|
+
echo "phase_bar=$phase_bar"
|
|
191
|
+
echo "task_bar=$task_bar"
|
|
192
|
+
echo "phase_name=$phase_name"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Store `phase_bar`, `task_bar`, and `phase_name` values for display in Step 3.
|
|
196
|
+
|
|
197
|
+
### Step 3: Display
|
|
198
|
+
|
|
199
|
+
Output format:
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
.-.
|
|
203
|
+
(o o) AETHER COLONY
|
|
204
|
+
| O | Status Report
|
|
205
|
+
`-`
|
|
206
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
207
|
+
|
|
208
|
+
👑 Goal: <goal (truncated to 60 chars)>
|
|
209
|
+
|
|
210
|
+
📍 Progress
|
|
211
|
+
Phase: [████████░░░░░░░░░░░░] <N>/<M> phases
|
|
212
|
+
Tasks: [████████████████░░░░] <completed>/<total> tasks in Phase <N>
|
|
213
|
+
|
|
214
|
+
🎯 Focus: <focus_count> areas | 🚫 Avoid: <constraints_count> patterns
|
|
215
|
+
🧠 Instincts: <total> learned (<high_confidence> strong)
|
|
216
|
+
🚩 Flags: <blockers> blockers | <issues> issues | <notes> notes
|
|
217
|
+
{if escalated_count > 0:}
|
|
218
|
+
⚠️ Escalated: {escalated_count} task(s) awaiting your decision
|
|
219
|
+
{end if}
|
|
220
|
+
🏆 Milestone: <milestone> (<version>)
|
|
221
|
+
💭 Dreams: <dream_count> recorded (latest: <latest_dream>)
|
|
222
|
+
|
|
223
|
+
📚 Memory Health
|
|
224
|
+
┌─────────────────┬────────┬─────────────────────────────┐
|
|
225
|
+
│ Metric │ Count │ Last Updated │
|
|
226
|
+
├─────────────────┼────────┼─────────────────────────────┤
|
|
227
|
+
│ Wisdom Entries │ {wisdom_total:>6} │ {queen_updated} │
|
|
228
|
+
│ Pending Promos │ {pending_total:>6} │ {learning_updated} │
|
|
229
|
+
│ Recent Failures │ {failures_count:>6} │ {last_failure} │
|
|
230
|
+
└─────────────────┴────────┴─────────────────────────────┘
|
|
231
|
+
|
|
232
|
+
State: <state>
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Use the `phase_bar` and `task_bar` values computed in Step 2.7 for the actual bar characters and counts.
|
|
236
|
+
|
|
237
|
+
**If instincts exist, also show top 3:**
|
|
238
|
+
```
|
|
239
|
+
🧠 Colony Instincts:
|
|
240
|
+
[0.9] 🐜 testing: Always run tests before completion
|
|
241
|
+
[0.8] 🐜 architecture: Use composition over inheritance
|
|
242
|
+
[0.7] 🐜 debugging: Trace to root cause first
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Dream display:**
|
|
246
|
+
- If no dreams exist: `💭 Dreams: None recorded`
|
|
247
|
+
- If dreams exist: `💭 Dreams: <count> recorded (latest: YYYY-MM-DD HH:MM)`
|
|
248
|
+
|
|
249
|
+
**Memory Health display:**
|
|
250
|
+
- If memory-metrics returns empty/null values, show:
|
|
251
|
+
```
|
|
252
|
+
📚 Memory Health
|
|
253
|
+
No memory data available. Colony wisdom will accumulate as you complete phases.
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**Edge cases:**
|
|
257
|
+
- No phases yet: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 phases`
|
|
258
|
+
- No tasks in phase: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 tasks in Phase 0`
|
|
259
|
+
- No constraints file: "Constraints: 0 focus, 0 avoid"
|
|
260
|
+
|
|
261
|
+
**At the end of the output, generate the Next Up block:**
|
|
262
|
+
|
|
263
|
+
Run using the Bash tool with description "Generating next steps...":
|
|
264
|
+
```bash
|
|
265
|
+
state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
|
|
266
|
+
current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
|
|
267
|
+
total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
|
|
268
|
+
|
|
269
|
+
bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
This auto-generates state-based recommendations (IDLE → init, READY → build, EXECUTING → continue, PLANNING → plan).
|