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,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ant:seal
|
|
3
|
+
description: "🏺🐜🏺 Seal the colony with Crowned Anthill milestone"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are the **Queen**. Seal the colony when all work is complete.
|
|
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
|
+
seal_id="seal-$(date +%s)"
|
|
26
|
+
|
|
27
|
+
# Initialize swarm display
|
|
28
|
+
bash .aether/aether-utils.sh swarm-display-init "$seal_id"
|
|
29
|
+
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
|
|
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 initialized. Run /ant:init first.
|
|
39
|
+
```
|
|
40
|
+
Stop here.
|
|
41
|
+
|
|
42
|
+
### Step 2: Validate Colony Is Complete
|
|
43
|
+
|
|
44
|
+
Extract: `goal`, `current_phase`, `plan.phases`, `milestone`, `state`.
|
|
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 archive colony with incomplete phases.
|
|
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
|
+
### Step 3: Check Milestone Eligibility
|
|
73
|
+
|
|
74
|
+
The full milestone progression is:
|
|
75
|
+
- **First Mound** — Phase 1 complete (first runnable)
|
|
76
|
+
- **Open Chambers** — Feature work underway (2+ phases complete)
|
|
77
|
+
- **Brood Stable** — Tests consistently green
|
|
78
|
+
- **Ventilated Nest** — Perf/latency acceptable (build + lint clean)
|
|
79
|
+
- **Sealed Chambers** — All phases complete (interfaces frozen)
|
|
80
|
+
- **Crowned Anthill** — Release-ready (user confirms via /ant:seal)
|
|
81
|
+
|
|
82
|
+
**If current milestone is "Crowned Anthill":**
|
|
83
|
+
```
|
|
84
|
+
Colony is already at Crowned Anthill milestone.
|
|
85
|
+
No further archiving needed.
|
|
86
|
+
|
|
87
|
+
Use /ant:status to view colony state.
|
|
88
|
+
```
|
|
89
|
+
Stop here.
|
|
90
|
+
|
|
91
|
+
**If current milestone is "Sealed Chambers":**
|
|
92
|
+
- Proceed to Step 4 (will upgrade to Crowned Anthill)
|
|
93
|
+
|
|
94
|
+
**If current milestone is "First Mound", "Open Chambers", "Brood Stable", "Ventilated Nest", or any intermediate milestone:**
|
|
95
|
+
- Since all phases are complete, the colony qualifies for both Sealed Chambers and Crowned Anthill
|
|
96
|
+
- The current logic allows proceeding to Step 4 (seal as Crowned Anthill)
|
|
97
|
+
- If user wants to explicitly achieve Sealed Chambers first, they can manually update milestone via COLONY_STATE.json
|
|
98
|
+
|
|
99
|
+
**If milestone is unrecognized (not in the 6 known stages):**
|
|
100
|
+
```
|
|
101
|
+
Unknown milestone: {milestone}
|
|
102
|
+
|
|
103
|
+
The milestone "{milestone}" is not recognized.
|
|
104
|
+
Known milestones: First Mound, Open Chambers, Brood Stable, Ventilated Nest, Sealed Chambers, Crowned Anthill
|
|
105
|
+
|
|
106
|
+
Run /ant:status to check colony state.
|
|
107
|
+
```
|
|
108
|
+
Stop here.
|
|
109
|
+
|
|
110
|
+
### Step 4: Archive Colony State
|
|
111
|
+
|
|
112
|
+
Create archive directory:
|
|
113
|
+
```
|
|
114
|
+
archive_dir=".aether/data/archive/session_$(date -u +%s)_archive"
|
|
115
|
+
mkdir -p "$archive_dir"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Copy the following files to the archive directory:
|
|
119
|
+
1. `.aether/data/COLONY_STATE.json` → `$archive_dir/COLONY_STATE.json`
|
|
120
|
+
2. `.aether/data/activity.log` → `$archive_dir/activity.log`
|
|
121
|
+
3. `.aether/data/spawn-tree.txt` → `$archive_dir/spawn-tree.txt`
|
|
122
|
+
4. `.aether/data/flags.json` → `$archive_dir/flags.json` (if exists)
|
|
123
|
+
5. `.aether/data/constraints.json` → `$archive_dir/constraints.json` (if exists)
|
|
124
|
+
|
|
125
|
+
Create archive manifest file `$archive_dir/manifest.json`:
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"archived_at": "<ISO-8601 timestamp>",
|
|
129
|
+
"goal": "<colony goal>",
|
|
130
|
+
"total_phases": <number>,
|
|
131
|
+
"milestone": "Crowned Anthill",
|
|
132
|
+
"files": [
|
|
133
|
+
"COLONY_STATE.json",
|
|
134
|
+
"activity.log",
|
|
135
|
+
"spawn-tree.txt",
|
|
136
|
+
"flags.json",
|
|
137
|
+
"constraints.json"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Step 5: Update Milestone to Crowned Anthill
|
|
143
|
+
|
|
144
|
+
Update COLONY_STATE.json:
|
|
145
|
+
1. Set `milestone` to `"Crowned Anthill"`
|
|
146
|
+
2. Set `milestone_updated_at` to current ISO-8601 timestamp
|
|
147
|
+
3. Append event: `"<timestamp>|milestone_reached|archive|Achieved Crowned Anthill milestone - colony archived"`
|
|
148
|
+
|
|
149
|
+
### Step 5.5: Write Final Handoff
|
|
150
|
+
|
|
151
|
+
After archiving, write the final handoff documenting the completed colony:
|
|
152
|
+
|
|
153
|
+
Resolve the handoff template path:
|
|
154
|
+
Check ~/.aether/system/templates/handoff.template.md first,
|
|
155
|
+
then .aether/templates/handoff.template.md.
|
|
156
|
+
|
|
157
|
+
If no template found: output "Template missing: handoff.template.md. Run aether update to fix." and stop.
|
|
158
|
+
|
|
159
|
+
Read the template file. Fill all {{PLACEHOLDER}} values:
|
|
160
|
+
- {{CHAMBER_NAME}} → archive directory name
|
|
161
|
+
- {{GOAL}} → goal
|
|
162
|
+
- {{PHASES_COMPLETED}} → total_phases (OpenCode seal archives completed colonies)
|
|
163
|
+
- {{TOTAL_PHASES}} → total_phases
|
|
164
|
+
- {{MILESTONE}} → "Crowned Anthill"
|
|
165
|
+
- {{ENTOMB_TIMESTAMP}} → seal timestamp
|
|
166
|
+
|
|
167
|
+
Remove the HTML comment lines at the top of the template.
|
|
168
|
+
Write the result to .aether/HANDOFF.md using the Write tool.
|
|
169
|
+
|
|
170
|
+
This handoff serves as the final record of the completed colony.
|
|
171
|
+
|
|
172
|
+
### Step 5.75: Export XML Archive (best-effort)
|
|
173
|
+
|
|
174
|
+
Export colony data as a combined XML archive. This is best-effort — seal proceeds even if XML export fails.
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# Check if xmllint is available
|
|
178
|
+
if command -v xmllint >/dev/null 2>&1; then
|
|
179
|
+
xml_result=$(bash .aether/aether-utils.sh colony-archive-xml ".aether/exchange/colony-archive.xml" 2>&1)
|
|
180
|
+
xml_ok=$(echo "$xml_result" | jq -r '.ok // false' 2>/dev/null)
|
|
181
|
+
if [[ "$xml_ok" == "true" ]]; then
|
|
182
|
+
xml_pheromone_count=$(echo "$xml_result" | jq -r '.result.pheromone_count // 0' 2>/dev/null)
|
|
183
|
+
xml_export_line="XML Archive: colony-archive.xml (${xml_pheromone_count} active signals)"
|
|
184
|
+
else
|
|
185
|
+
xml_export_line="XML Archive: export failed (non-blocking)"
|
|
186
|
+
fi
|
|
187
|
+
else
|
|
188
|
+
xml_export_line="XML Archive: skipped (xmllint not available)"
|
|
189
|
+
fi
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Step 6: Display Result
|
|
193
|
+
|
|
194
|
+
**If visual_mode is true, render final swarm display:**
|
|
195
|
+
```bash
|
|
196
|
+
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
|
|
197
|
+
bash .aether/aether-utils.sh swarm-display-render "$seal_id"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Output:
|
|
201
|
+
```
|
|
202
|
+
🏺 ════════════════════════════════════════════════════
|
|
203
|
+
C R O W N E D A N T H I L L
|
|
204
|
+
══════════════════════════════════════════════════ 🏺
|
|
205
|
+
|
|
206
|
+
✅ Colony archived successfully!
|
|
207
|
+
|
|
208
|
+
👑 Goal: {goal (truncated to 60 chars)}
|
|
209
|
+
📍 Phases: {total_phases} completed
|
|
210
|
+
🏆 Milestone: Crowned Anthill
|
|
211
|
+
|
|
212
|
+
📦 Archive Location: {archive_dir}
|
|
213
|
+
- COLONY_STATE.json
|
|
214
|
+
- activity.log
|
|
215
|
+
- spawn-tree.txt
|
|
216
|
+
- flags.json (if existed)
|
|
217
|
+
- constraints.json (if existed)
|
|
218
|
+
{xml_export_line}
|
|
219
|
+
|
|
220
|
+
🐜 The colony has reached its final form.
|
|
221
|
+
The anthill stands crowned and sealed.
|
|
222
|
+
History is preserved. The colony rests.
|
|
223
|
+
|
|
224
|
+
💾 State persisted — safe to /clear
|
|
225
|
+
|
|
226
|
+
🐜 What would you like to do next?
|
|
227
|
+
1. /ant:lay-eggs "<new goal>" — Start a new colony
|
|
228
|
+
2. /ant:tunnels — Browse archived colonies
|
|
229
|
+
3. /clear — Clear context and continue
|
|
230
|
+
|
|
231
|
+
Use AskUserQuestion with these three options.
|
|
232
|
+
|
|
233
|
+
If option 1 selected: proceed to run /ant:lay-eggs flow
|
|
234
|
+
If option 2 selected: run /ant:tunnels
|
|
235
|
+
If option 3 selected: display "Run /ant:lay-eggs to begin anew after clearing"
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Edge Cases
|
|
239
|
+
|
|
240
|
+
**If milestone is already "Sealed Chambers" but phases are complete:**
|
|
241
|
+
- Proceed with archiving and upgrade to Crowned Anthill
|
|
242
|
+
|
|
243
|
+
**If any archive files are missing:**
|
|
244
|
+
- Archive what exists, note in manifest which files were missing
|
|
245
|
+
|
|
246
|
+
**If archive directory already exists:**
|
|
247
|
+
- Append timestamp to make unique: `session_<ts>_archive_<random>`
|
|
@@ -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).
|