aether-colony 5.0.0 → 5.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/aether-utils.sh +3150 -3349
- package/.aether/agents-claude/aether-ambassador.md +265 -0
- package/.aether/agents-claude/aether-archaeologist.md +327 -0
- package/.aether/agents-claude/aether-architect.md +236 -0
- package/.aether/agents-claude/aether-auditor.md +271 -0
- package/.aether/agents-claude/aether-builder.md +224 -0
- package/.aether/agents-claude/aether-chaos.md +269 -0
- package/.aether/agents-claude/aether-chronicler.md +305 -0
- package/.aether/agents-claude/aether-gatekeeper.md +330 -0
- package/.aether/agents-claude/aether-includer.md +374 -0
- package/.aether/agents-claude/aether-keeper.md +272 -0
- package/.aether/agents-claude/aether-measurer.md +322 -0
- package/.aether/agents-claude/aether-oracle.md +237 -0
- package/.aether/agents-claude/aether-probe.md +211 -0
- package/.aether/agents-claude/aether-queen.md +330 -0
- package/.aether/agents-claude/aether-route-setter.md +178 -0
- package/.aether/agents-claude/aether-sage.md +418 -0
- package/.aether/agents-claude/aether-scout.md +179 -0
- package/.aether/agents-claude/aether-surveyor-disciplines.md +417 -0
- package/.aether/agents-claude/aether-surveyor-nest.md +355 -0
- package/.aether/agents-claude/aether-surveyor-pathogens.md +289 -0
- package/.aether/agents-claude/aether-surveyor-provisions.md +360 -0
- package/.aether/agents-claude/aether-tracker.md +270 -0
- package/.aether/agents-claude/aether-watcher.md +280 -0
- package/.aether/agents-claude/aether-weaver.md +248 -0
- package/.aether/commands/archaeology.yaml +653 -0
- package/.aether/commands/build.yaml +1221 -0
- package/.aether/commands/chaos.yaml +653 -0
- package/.aether/commands/colonize.yaml +438 -0
- package/.aether/commands/continue.yaml +1484 -0
- package/.aether/commands/council.yaml +304 -0
- package/.aether/commands/data-clean.yaml +80 -0
- package/.aether/commands/dream.yaml +275 -0
- package/.aether/commands/entomb.yaml +863 -0
- package/.aether/commands/export-signals.yaml +64 -0
- package/.aether/commands/feedback.yaml +158 -0
- package/.aether/commands/flag.yaml +160 -0
- package/.aether/commands/flags.yaml +177 -0
- package/.aether/commands/focus.yaml +112 -0
- package/.aether/commands/help.yaml +167 -0
- package/.aether/commands/history.yaml +137 -0
- package/.aether/commands/import-signals.yaml +79 -0
- package/.aether/commands/init.yaml +469 -0
- package/.aether/commands/insert-phase.yaml +98 -0
- package/.aether/commands/interpret.yaml +285 -0
- package/.aether/commands/lay-eggs.yaml +224 -0
- package/.aether/commands/maturity.yaml +122 -0
- package/.aether/commands/memory-details.yaml +74 -0
- package/.aether/commands/migrate-state.yaml +174 -0
- package/.aether/commands/oracle.yaml +1224 -0
- package/.aether/commands/organize.yaml +446 -0
- package/.aether/commands/patrol.yaml +621 -0
- package/.aether/commands/pause-colony.yaml +424 -0
- package/.aether/commands/phase.yaml +124 -0
- package/.aether/commands/pheromones.yaml +153 -0
- package/.aether/commands/plan.yaml +1313 -0
- package/.aether/commands/preferences.yaml +63 -0
- package/.aether/commands/redirect.yaml +123 -0
- package/.aether/commands/resume-colony.yaml +373 -0
- package/.aether/commands/resume.yaml +398 -0
- package/.aether/commands/run.yaml +193 -0
- package/.aether/commands/seal.yaml +1205 -0
- package/.aether/commands/skill-create.yaml +337 -0
- package/.aether/commands/status.yaml +364 -0
- package/.aether/commands/swarm.yaml +352 -0
- package/.aether/commands/tunnels.yaml +814 -0
- package/.aether/commands/update.yaml +131 -0
- package/.aether/commands/verify-castes.yaml +159 -0
- package/.aether/commands/watch.yaml +454 -0
- package/.aether/docs/INCIDENT_TEMPLATE.md +32 -0
- package/.aether/docs/QUEEN-SYSTEM.md +11 -11
- package/.aether/docs/README.md +32 -2
- package/.aether/docs/command-playbooks/README.md +23 -0
- package/.aether/docs/command-playbooks/build-complete.md +349 -0
- package/.aether/docs/command-playbooks/build-context.md +282 -0
- package/.aether/docs/command-playbooks/build-full.md +1682 -0
- package/.aether/docs/command-playbooks/build-prep.md +283 -0
- package/.aether/docs/command-playbooks/build-verify.md +405 -0
- package/.aether/docs/command-playbooks/build-wave.md +749 -0
- package/.aether/docs/command-playbooks/continue-advance.md +524 -0
- package/.aether/docs/command-playbooks/continue-finalize.md +447 -0
- package/.aether/docs/command-playbooks/continue-full.md +1724 -0
- package/.aether/docs/command-playbooks/continue-gates.md +686 -0
- package/.aether/docs/command-playbooks/continue-verify.md +406 -0
- package/.aether/docs/context-continuity.md +84 -0
- package/.aether/docs/disciplines/DISCIPLINES.md +9 -7
- package/.aether/docs/error-codes.md +1 -1
- package/.aether/docs/known-issues.md +34 -173
- package/.aether/docs/pheromones.md +86 -6
- package/.aether/docs/plans/pheromone-display-plan.md +257 -0
- package/.aether/docs/queen-commands.md +10 -9
- package/.aether/docs/source-of-truth-map.md +132 -0
- package/.aether/docs/xml-utilities.md +47 -0
- package/.aether/rules/aether-colony.md +23 -13
- package/.aether/scripts/incident-test-add.sh +47 -0
- package/.aether/scripts/weekly-audit.sh +79 -0
- package/.aether/skills/.index.json +649 -0
- package/.aether/skills/colony/.manifest.json +16 -0
- package/.aether/skills/colony/build-discipline/SKILL.md +78 -0
- package/.aether/skills/colony/colony-interaction/SKILL.md +56 -0
- package/.aether/skills/colony/colony-lifecycle/SKILL.md +77 -0
- package/.aether/skills/colony/colony-visuals/SKILL.md +112 -0
- package/.aether/skills/colony/context-management/SKILL.md +80 -0
- package/.aether/skills/colony/error-presentation/SKILL.md +99 -0
- package/.aether/skills/colony/pheromone-protocol/SKILL.md +79 -0
- package/.aether/skills/colony/pheromone-visibility/SKILL.md +81 -0
- package/.aether/skills/colony/state-safety/SKILL.md +84 -0
- package/.aether/skills/colony/worker-priming/SKILL.md +82 -0
- package/.aether/skills/domain/.manifest.json +24 -0
- package/.aether/skills/domain/README.md +33 -0
- package/.aether/skills/domain/django/SKILL.md +49 -0
- package/.aether/skills/domain/docker/SKILL.md +52 -0
- package/.aether/skills/domain/golang/SKILL.md +52 -0
- package/.aether/skills/domain/graphql/SKILL.md +51 -0
- package/.aether/skills/domain/html-css/SKILL.md +48 -0
- package/.aether/skills/domain/nextjs/SKILL.md +45 -0
- package/.aether/skills/domain/nodejs/SKILL.md +53 -0
- package/.aether/skills/domain/postgresql/SKILL.md +53 -0
- package/.aether/skills/domain/prisma/SKILL.md +59 -0
- package/.aether/skills/domain/python/SKILL.md +50 -0
- package/.aether/skills/domain/rails/SKILL.md +52 -0
- package/.aether/skills/domain/react/SKILL.md +45 -0
- package/.aether/skills/domain/rest-api/SKILL.md +58 -0
- package/.aether/skills/domain/svelte/SKILL.md +47 -0
- package/.aether/skills/domain/tailwind/SKILL.md +45 -0
- package/.aether/skills/domain/testing/SKILL.md +53 -0
- package/.aether/skills/domain/typescript/SKILL.md +58 -0
- package/.aether/skills/domain/vue/SKILL.md +49 -0
- package/.aether/templates/QUEEN.md.template +23 -41
- package/.aether/templates/colony-state-reset.jq.template +1 -0
- package/.aether/templates/colony-state.template.json +4 -0
- package/.aether/templates/learning-observations.template.json +6 -0
- package/.aether/templates/midden.template.json +13 -0
- package/.aether/templates/pheromones.template.json +6 -0
- package/.aether/templates/session.template.json +9 -0
- package/.aether/utils/atomic-write.sh +63 -17
- package/.aether/utils/chamber-utils.sh +145 -2
- package/.aether/utils/emoji-audit.sh +166 -0
- package/.aether/utils/error-handler.sh +21 -7
- package/.aether/utils/file-lock.sh +182 -27
- package/.aether/utils/flag.sh +267 -0
- package/.aether/utils/hive.sh +572 -0
- package/.aether/utils/learning.sh +1928 -0
- package/.aether/utils/midden.sh +342 -0
- package/.aether/utils/oracle/oracle.md +168 -0
- package/.aether/utils/oracle/oracle.sh +1023 -0
- package/.aether/utils/pheromone.sh +2029 -0
- package/.aether/utils/queen.sh +1698 -0
- package/.aether/utils/scan.sh +860 -0
- package/.aether/utils/semantic-cli.sh +10 -8
- package/.aether/utils/session.sh +552 -0
- package/.aether/utils/skills.sh +509 -0
- package/.aether/utils/spawn-tree.sh +103 -271
- package/.aether/utils/spawn.sh +260 -0
- package/.aether/utils/state-api.sh +199 -0
- package/.aether/utils/state-loader.sh +8 -6
- package/.aether/utils/suggest.sh +611 -0
- package/.aether/utils/swarm-display.sh +10 -1
- package/.aether/utils/swarm.sh +1004 -0
- package/.aether/utils/watch-spawn-tree.sh +11 -2
- package/.aether/utils/xml-compose.sh +2 -2
- package/.aether/utils/xml-convert.sh +9 -5
- package/.aether/utils/xml-core.sh +5 -9
- package/.aether/utils/xml-query.sh +4 -4
- package/.aether/workers.md +86 -67
- package/.claude/agents/ant/aether-ambassador.md +2 -1
- package/.claude/agents/ant/aether-archaeologist.md +6 -1
- package/.claude/agents/ant/aether-architect.md +236 -0
- package/.claude/agents/ant/aether-auditor.md +6 -1
- package/.claude/agents/ant/aether-builder.md +38 -1
- package/.claude/agents/ant/aether-chaos.md +2 -1
- package/.claude/agents/ant/aether-chronicler.md +1 -0
- package/.claude/agents/ant/aether-gatekeeper.md +6 -1
- package/.claude/agents/ant/aether-includer.md +1 -0
- package/.claude/agents/ant/aether-keeper.md +1 -0
- package/.claude/agents/ant/aether-measurer.md +6 -1
- package/.claude/agents/ant/aether-oracle.md +237 -0
- package/.claude/agents/ant/aether-probe.md +2 -1
- package/.claude/agents/ant/aether-queen.md +6 -1
- package/.claude/agents/ant/aether-route-setter.md +6 -1
- package/.claude/agents/ant/aether-sage.md +68 -3
- package/.claude/agents/ant/aether-scout.md +38 -1
- package/.claude/agents/ant/aether-surveyor-disciplines.md +2 -1
- package/.claude/agents/ant/aether-surveyor-nest.md +2 -1
- package/.claude/agents/ant/aether-surveyor-pathogens.md +2 -1
- package/.claude/agents/ant/aether-surveyor-provisions.md +2 -1
- package/.claude/agents/ant/aether-tracker.md +6 -1
- package/.claude/agents/ant/aether-watcher.md +37 -1
- package/.claude/agents/ant/aether-weaver.md +2 -1
- package/.claude/commands/ant/archaeology.md +1 -8
- package/.claude/commands/ant/build.md +43 -1159
- package/.claude/commands/ant/chaos.md +1 -14
- package/.claude/commands/ant/colonize.md +1 -14
- package/.claude/commands/ant/continue.md +40 -1026
- package/.claude/commands/ant/council.md +9 -16
- package/.claude/commands/ant/data-clean.md +81 -0
- package/.claude/commands/ant/dream.md +12 -9
- package/.claude/commands/ant/entomb.md +62 -87
- package/.claude/commands/ant/export-signals.md +57 -0
- package/.claude/commands/ant/feedback.md +18 -0
- package/.claude/commands/ant/flag.md +12 -0
- package/.claude/commands/ant/flags.md +22 -8
- package/.claude/commands/ant/focus.md +18 -0
- package/.claude/commands/ant/help.md +40 -8
- package/.claude/commands/ant/history.md +3 -0
- package/.claude/commands/ant/import-signals.md +71 -0
- package/.claude/commands/ant/init.md +316 -191
- package/.claude/commands/ant/insert-phase.md +101 -0
- package/.claude/commands/ant/interpret.md +11 -0
- package/.claude/commands/ant/lay-eggs.md +167 -158
- package/.claude/commands/ant/maturity.md +22 -11
- package/.claude/commands/ant/memory-details.md +77 -0
- package/.claude/commands/ant/migrate-state.md +6 -0
- package/.claude/commands/ant/oracle.md +317 -62
- package/.claude/commands/ant/organize.md +10 -5
- package/.claude/commands/ant/patrol.md +620 -0
- package/.claude/commands/ant/pause-colony.md +8 -22
- package/.claude/commands/ant/phase.md +26 -37
- package/.claude/commands/ant/pheromones.md +156 -0
- package/.claude/commands/ant/plan.md +175 -52
- package/.claude/commands/ant/preferences.md +65 -0
- package/.claude/commands/ant/redirect.md +18 -0
- package/.claude/commands/ant/resume-colony.md +34 -20
- package/.claude/commands/ant/resume.md +51 -7
- package/.claude/commands/ant/run.md +195 -0
- package/.claude/commands/ant/seal.md +497 -78
- package/.claude/commands/ant/skill-create.md +286 -0
- package/.claude/commands/ant/status.md +127 -1
- package/.claude/commands/ant/swarm.md +11 -23
- package/.claude/commands/ant/tunnels.md +1 -0
- package/.claude/commands/ant/update.md +58 -135
- package/.claude/commands/ant/verify-castes.md +90 -42
- package/.claude/commands/ant/watch.md +1 -0
- package/.opencode/agents/aether-ambassador.md +1 -1
- package/.opencode/agents/aether-architect.md +133 -0
- package/.opencode/agents/aether-builder.md +3 -3
- package/.opencode/agents/aether-oracle.md +137 -0
- package/.opencode/agents/aether-queen.md +1 -1
- package/.opencode/agents/aether-route-setter.md +1 -1
- package/.opencode/agents/aether-scout.md +1 -1
- package/.opencode/agents/aether-surveyor-disciplines.md +6 -1
- package/.opencode/agents/aether-surveyor-nest.md +6 -1
- package/.opencode/agents/aether-surveyor-pathogens.md +6 -1
- package/.opencode/agents/aether-surveyor-provisions.md +6 -1
- package/.opencode/agents/aether-tracker.md +1 -1
- package/.opencode/agents/aether-watcher.md +1 -1
- package/.opencode/agents/aether-weaver.md +1 -1
- package/.opencode/commands/ant/archaeology.md +7 -14
- package/.opencode/commands/ant/build.md +54 -88
- package/.opencode/commands/ant/chaos.md +7 -24
- package/.opencode/commands/ant/colonize.md +8 -17
- package/.opencode/commands/ant/continue.md +595 -66
- package/.opencode/commands/ant/council.md +11 -22
- package/.opencode/commands/ant/data-clean.md +77 -0
- package/.opencode/commands/ant/dream.md +15 -17
- package/.opencode/commands/ant/entomb.md +28 -18
- package/.opencode/commands/ant/export-signals.md +54 -0
- package/.opencode/commands/ant/feedback.md +24 -5
- package/.opencode/commands/ant/flag.md +16 -4
- package/.opencode/commands/ant/flags.md +24 -10
- package/.opencode/commands/ant/focus.md +22 -5
- package/.opencode/commands/ant/help.md +41 -8
- package/.opencode/commands/ant/history.md +9 -0
- package/.opencode/commands/ant/import-signals.md +68 -0
- package/.opencode/commands/ant/init.md +365 -156
- package/.opencode/commands/ant/insert-phase.md +107 -0
- package/.opencode/commands/ant/interpret.md +16 -0
- package/.opencode/commands/ant/lay-eggs.md +184 -112
- package/.opencode/commands/ant/maturity.md +18 -2
- package/.opencode/commands/ant/memory-details.md +83 -0
- package/.opencode/commands/ant/migrate-state.md +12 -0
- package/.opencode/commands/ant/oracle.md +322 -67
- package/.opencode/commands/ant/organize.md +14 -12
- package/.opencode/commands/ant/patrol.md +626 -0
- package/.opencode/commands/ant/pause-colony.md +12 -29
- package/.opencode/commands/ant/phase.md +30 -40
- package/.opencode/commands/ant/pheromones.md +162 -0
- package/.opencode/commands/ant/plan.md +184 -56
- package/.opencode/commands/ant/preferences.md +71 -0
- package/.opencode/commands/ant/redirect.md +22 -5
- package/.opencode/commands/ant/resume-colony.md +38 -27
- package/.opencode/commands/ant/resume.md +71 -20
- package/.opencode/commands/ant/run.md +201 -0
- package/.opencode/commands/ant/seal.md +230 -25
- package/.opencode/commands/ant/skill-create.md +63 -0
- package/.opencode/commands/ant/status.md +124 -31
- package/.opencode/commands/ant/swarm.md +3 -345
- package/.opencode/commands/ant/tunnels.md +3 -9
- package/.opencode/commands/ant/update.md +63 -127
- package/.opencode/commands/ant/verify-castes.md +96 -42
- package/.opencode/commands/ant/watch.md +7 -0
- package/CHANGELOG.md +278 -1
- package/README.md +188 -340
- package/bin/cli.js +236 -429
- package/bin/generate-commands.js +186 -0
- package/bin/generate-commands.sh +128 -89
- package/bin/lib/spawn-logger.js +0 -15
- package/bin/lib/update-transaction.js +285 -35
- package/bin/npx-install.js +178 -0
- package/bin/validate-package.sh +85 -3
- package/package.json +7 -3
- package/.aether/CONTEXT.md +0 -160
- package/.aether/docs/QUEEN.md +0 -84
- package/.aether/exchange/colony-registry.xml +0 -11
- package/.aether/exchange/pheromones.xml +0 -87
- package/.aether/exchange/queen-wisdom.xml +0 -14
- package/.aether/model-profiles.yaml +0 -100
- package/.aether/utils/spawn-with-model.sh +0 -56
- package/bin/lib/model-profiles.js +0 -445
- package/bin/lib/model-verify.js +0 -288
- package/bin/lib/proxy-health.js +0 -253
- package/bin/lib/telemetry.js +0 -441
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- Generated from .aether/commands/seal.yaml - DO NOT EDIT DIRECTLY -->
|
|
1
2
|
---
|
|
2
3
|
name: ant:seal
|
|
3
4
|
description: "🏺🐜🏺 Seal the colony with Crowned Anthill milestone"
|
|
@@ -45,14 +46,6 @@ Do not touch during seal:
|
|
|
45
46
|
### Step 0: Initialize Visual Mode (if enabled)
|
|
46
47
|
|
|
47
48
|
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
49
|
### Step 1: Read State
|
|
57
50
|
|
|
58
51
|
Read `.aether/data/COLONY_STATE.json`.
|
|
@@ -118,83 +111,264 @@ Sealing cancelled. Colony remains active.
|
|
|
118
111
|
```
|
|
119
112
|
Stop here.
|
|
120
113
|
|
|
121
|
-
### Step
|
|
114
|
+
### Step 3.5: Analytics Review
|
|
122
115
|
|
|
123
|
-
|
|
116
|
+
Before wisdom approval, spawn Sage to analyze colony trends and provide data-driven insights.
|
|
124
117
|
|
|
118
|
+
**Check phase threshold and spawn Sage:**
|
|
125
119
|
```bash
|
|
126
|
-
#
|
|
127
|
-
|
|
128
|
-
|
|
120
|
+
# Check if colony has enough history for meaningful analytics
|
|
121
|
+
phases_completed=$(jq '[.plan.phases[] | select(.status == "completed")] | length' .aether/data/COLONY_STATE.json 2>/dev/null || echo "0")
|
|
122
|
+
|
|
123
|
+
if [[ "$phases_completed" -ge 3 ]]; then
|
|
124
|
+
# Generate Sage name and dispatch
|
|
125
|
+
sage_name=$(bash .aether/aether-utils.sh generate-ant-name "sage")
|
|
126
|
+
bash .aether/aether-utils.sh spawn-log "Queen" "sage" "$sage_name" "Colony analytics review"
|
|
127
|
+
|
|
128
|
+
# Display spawn notification
|
|
129
|
+
echo ""
|
|
130
|
+
echo "━━━ 📜🐜 S A G E ━━━"
|
|
131
|
+
echo "──── 📜🐜 Spawning $sage_name — Colony analytics review ────"
|
|
129
132
|
fi
|
|
133
|
+
```
|
|
130
134
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
135
|
+
**Spawn Sage using Task tool when threshold is met:**
|
|
136
|
+
If phases_completed >= 3, spawn the Sage agent using Task tool with `subagent_type="aether-sage"`:
|
|
137
|
+
|
|
138
|
+
```xml
|
|
139
|
+
<task>
|
|
140
|
+
<description>📜 Sage {sage_name}: Colony analytics review</description>
|
|
141
|
+
<prompt>
|
|
142
|
+
You are {sage_name}, a 📜 Sage Ant.
|
|
143
|
+
|
|
144
|
+
Mission: Analyze colony history and provide data-driven insights for wisdom promotion
|
|
145
|
+
|
|
146
|
+
Data Sources:
|
|
147
|
+
- COLONY_STATE.json: Colony configuration, phases, learnings, instincts
|
|
148
|
+
- activity.log: Activity history with timestamps
|
|
149
|
+
- midden.json: Failure patterns and flagged issues
|
|
150
|
+
|
|
151
|
+
Analysis Areas:
|
|
152
|
+
1. Velocity Trends: Phase completion rate over time
|
|
153
|
+
2. Bug Density: Error frequency and patterns from midden
|
|
154
|
+
3. Review Turnaround: Time from build to continue
|
|
155
|
+
|
|
156
|
+
Work:
|
|
157
|
+
1. Read COLONY_STATE.json for phase history and learnings
|
|
158
|
+
2. Read activity.log for velocity patterns
|
|
159
|
+
3. Read midden.json for bug density analysis
|
|
160
|
+
4. Calculate metrics and identify trends
|
|
161
|
+
5. Provide recommendations for wisdom promotion
|
|
162
|
+
|
|
163
|
+
**IMPORTANT:** You are strictly read-only. Do not modify any files.
|
|
164
|
+
|
|
165
|
+
Log activity: bash .aether/aether-utils.sh activity-log "ANALYZING" "{sage_name}" "description"
|
|
166
|
+
|
|
167
|
+
Return ONLY this JSON (no other text):
|
|
168
|
+
{{
|
|
169
|
+
"ant_name": "{sage_name}",
|
|
170
|
+
"caste": "sage",
|
|
171
|
+
"status": "completed" | "failed" | "blocked",
|
|
172
|
+
"summary": "What you analyzed and found",
|
|
173
|
+
"key_findings": [],
|
|
174
|
+
"trends": {{
|
|
175
|
+
"velocity": "increasing|stable|decreasing",
|
|
176
|
+
"bug_density": "high|medium|low",
|
|
177
|
+
"review_turnaround": "fast|moderate|slow"
|
|
178
|
+
}},
|
|
179
|
+
"metrics_analyzed": [],
|
|
180
|
+
"predictions": [],
|
|
181
|
+
"recommendations": [
|
|
182
|
+
{{"priority": 1, "action": "", "expected_impact": ""}}
|
|
183
|
+
],
|
|
184
|
+
"next_steps": [],
|
|
185
|
+
"blockers": []
|
|
186
|
+
}}
|
|
187
|
+
</prompt>
|
|
188
|
+
</task>
|
|
189
|
+
```
|
|
155
190
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
191
|
+
**FALLBACK:** If "Agent type not found", use general-purpose agent and inject role: "You are a Sage Ant - analytics specialist that extracts trends from history to guide decisions."
|
|
192
|
+
|
|
193
|
+
**Parse Sage JSON output:**
|
|
194
|
+
After spawn, extract from response: `key_findings`, `trends`, `recommendations`
|
|
195
|
+
|
|
196
|
+
Log completion and update swarm display:
|
|
197
|
+
```bash
|
|
198
|
+
bash .aether/aether-utils.sh spawn-complete "$sage_name" "completed" "Analytics review complete"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Display Sage completion line:**
|
|
202
|
+
```
|
|
203
|
+
📜 {sage_name}: Colony analytics review complete ✓
|
|
204
|
+
Velocity: {trend} | Bug density: {level} | Review turnaround: {speed}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Log high-priority recommendations to midden (non-blocking):**
|
|
208
|
+
For each recommendation with priority <= 2:
|
|
209
|
+
```bash
|
|
210
|
+
bash .aether/aether-utils.sh midden-write "analytics" "Sage recommendation (P{priority}): {action}" "sage"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Display insights summary:**
|
|
214
|
+
```
|
|
215
|
+
📜 Sage Insights:
|
|
216
|
+
Key Findings: {count}
|
|
217
|
+
Top Recommendation: {first recommendation action}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Continue to Step 3.6 (non-blocking):**
|
|
221
|
+
Proceed to Step 3.6 regardless of Sage findings — Sage is strictly non-blocking.
|
|
222
|
+
|
|
223
|
+
**If phases_completed < 3:**
|
|
224
|
+
Skip silently (no output) — proceed directly to Step 3.6.
|
|
225
|
+
|
|
226
|
+
### Step 3.6: Wisdom Approval
|
|
227
|
+
|
|
228
|
+
Before sealing, review wisdom proposals accumulated during this colony's lifecycle.
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# --- Batch auto-promotion for auto-threshold observations (QUEEN-02) ---
|
|
232
|
+
# Auto-promote observations meeting higher recurrence thresholds
|
|
233
|
+
# before presenting the interactive review for lower-threshold proposals.
|
|
234
|
+
|
|
235
|
+
obs_file=".aether/data/learning-observations.json"
|
|
236
|
+
auto_promoted_count=0
|
|
237
|
+
|
|
238
|
+
if [[ -f "$obs_file" ]]; then
|
|
239
|
+
for encoded in $(jq -r '.observations[] | @base64' "$obs_file" 2>/dev/null); do
|
|
240
|
+
content=$(echo "$encoded" | base64 -d | jq -r '.content // empty')
|
|
241
|
+
wisdom_type=$(echo "$encoded" | base64 -d | jq -r '.wisdom_type // "pattern"')
|
|
242
|
+
colony=$(echo "$encoded" | base64 -d | jq -r '.colonies[0] // "unknown"')
|
|
243
|
+
[[ -z "$content" ]] && continue
|
|
244
|
+
|
|
245
|
+
result=$(bash .aether/aether-utils.sh learning-promote-auto "$wisdom_type" "$content" "$colony" "learning" 2>/dev/null || echo '{}')
|
|
246
|
+
was_promoted=$(echo "$result" | jq -r '.result.promoted // false' 2>/dev/null || echo "false")
|
|
247
|
+
if [[ "$was_promoted" == "true" ]]; then
|
|
248
|
+
auto_promoted_count=$((auto_promoted_count + 1))
|
|
174
249
|
fi
|
|
250
|
+
done
|
|
251
|
+
fi
|
|
252
|
+
|
|
253
|
+
if [[ "$auto_promoted_count" -gt 0 ]]; then
|
|
254
|
+
echo "Auto-promoted $auto_promoted_count observation(s) to QUEEN.md (met recurrence thresholds)"
|
|
255
|
+
echo ""
|
|
256
|
+
fi
|
|
257
|
+
# --- END Batch auto-promotion ---
|
|
258
|
+
|
|
259
|
+
# Check for pending proposals
|
|
260
|
+
proposals=$(bash .aether/aether-utils.sh learning-check-promotion 2>/dev/null || echo '{"proposals":[]}')
|
|
261
|
+
proposal_count=$(echo "$proposals" | jq '.proposals | length')
|
|
262
|
+
|
|
263
|
+
if [[ "$proposal_count" -gt 0 ]]; then
|
|
264
|
+
echo ""
|
|
265
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
266
|
+
echo " 🧠 WISDOM REVIEW"
|
|
267
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
268
|
+
echo ""
|
|
269
|
+
echo "Review wisdom proposals before sealing this colony."
|
|
270
|
+
echo "Approved proposals will be promoted to QUEEN.md."
|
|
271
|
+
echo ""
|
|
272
|
+
|
|
273
|
+
# Run approval workflow (blocking)
|
|
274
|
+
bash .aether/aether-utils.sh learning-approve-proposals
|
|
275
|
+
|
|
276
|
+
echo ""
|
|
277
|
+
echo "Wisdom review complete. Proceeding with sealing ceremony..."
|
|
278
|
+
echo ""
|
|
279
|
+
else
|
|
280
|
+
echo "No wisdom proposals to review."
|
|
281
|
+
fi
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Step 3.7: Hive Promotion (NON-BLOCKING)
|
|
285
|
+
|
|
286
|
+
After QUEEN.md promotion, promote abstracted instincts to the cross-colony hive.
|
|
287
|
+
|
|
288
|
+
**Extract high-confidence instincts for hive promotion:**
|
|
289
|
+
```bash
|
|
290
|
+
# Get instincts with confidence >= 0.8
|
|
291
|
+
high_conf_instincts=$(jq -r '.memory.instincts[] | select(.confidence >= 0.8) | @base64' .aether/data/COLONY_STATE.json 2>/dev/null || echo "")
|
|
292
|
+
|
|
293
|
+
# Derive source repo name from current directory
|
|
294
|
+
source_repo="$(pwd)"
|
|
295
|
+
|
|
296
|
+
# Read domain tags from registry (NOT from instinct.domain which is a category, not a repo domain)
|
|
297
|
+
repo_domain_tags=$(jq -r --arg repo "$(pwd)" \
|
|
298
|
+
'[.repos[] | select(.path == $repo) | .domain_tags // []] | .[0] // [] | join(",")' \
|
|
299
|
+
"$HOME/.aether/registry.json" 2>/dev/null || echo "")
|
|
300
|
+
|
|
301
|
+
hive_promoted_count=0
|
|
302
|
+
hive_errors=0
|
|
303
|
+
for encoded in $high_conf_instincts; do
|
|
304
|
+
[[ -z "$encoded" ]] && continue
|
|
305
|
+
|
|
306
|
+
# Extract trigger and action fields from the instinct object
|
|
307
|
+
trigger=$(echo "$encoded" | base64 -d | jq -r '.trigger // empty')
|
|
308
|
+
action=$(echo "$encoded" | base64 -d | jq -r '.action // empty')
|
|
309
|
+
confidence=$(echo "$encoded" | base64 -d | jq -r '.confidence // 0.7')
|
|
310
|
+
|
|
311
|
+
[[ -z "$trigger" || -z "$action" ]] && continue
|
|
312
|
+
|
|
313
|
+
# Strip leading "When " or "when " from trigger to avoid "When When..." stutter
|
|
314
|
+
trigger_clean=$(echo "$trigger" | sed 's/^[Ww]hen //')
|
|
315
|
+
|
|
316
|
+
# Build the promotion text in "When {trigger}: {action}" format
|
|
317
|
+
promote_text="When ${trigger_clean}: ${action}"
|
|
318
|
+
|
|
319
|
+
# Build hive-promote args with --text and --source-repo (required)
|
|
320
|
+
promote_args=(hive-promote --text "$promote_text" --source-repo "$source_repo" --confidence "$confidence")
|
|
321
|
+
[[ -n "$repo_domain_tags" ]] && promote_args+=(--domain "$repo_domain_tags")
|
|
322
|
+
|
|
323
|
+
# Call hive-promote which orchestrates abstract + store
|
|
324
|
+
result=$(bash .aether/aether-utils.sh "${promote_args[@]}" 2>/dev/null || echo '{}')
|
|
325
|
+
was_promoted=$(echo "$result" | jq -r '.result.action // "skipped"' 2>/dev/null || echo "skipped")
|
|
326
|
+
|
|
327
|
+
if [[ "$was_promoted" == "promoted" || "$was_promoted" == "merged" ]]; then
|
|
328
|
+
hive_promoted_count=$((hive_promoted_count + 1))
|
|
175
329
|
fi
|
|
176
|
-
done
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if echo "$instinct_result" | jq -e '.ok' >/dev/null 2>&1; then
|
|
181
|
-
while IFS= read -r instinct_action; do
|
|
182
|
-
if [[ -n "$instinct_action" && "$instinct_action" != "null" ]]; then
|
|
183
|
-
result=$(bash .aether/aether-utils.sh queen-promote "pattern" "$instinct_action" "$colony_name" 2>/dev/null)
|
|
184
|
-
if echo "$result" | jq -e '.ok' >/dev/null 2>&1; then
|
|
185
|
-
promotions_made=$((promotions_made + 1))
|
|
186
|
-
fi
|
|
187
|
-
fi
|
|
188
|
-
done < <(echo "$instinct_result" | jq -r '.result[]?.action // empty' 2>/dev/null)
|
|
330
|
+
done
|
|
331
|
+
|
|
332
|
+
if [[ "$hive_promoted_count" -gt 0 ]]; then
|
|
333
|
+
echo "Hive promotion: $hive_promoted_count instinct(s) promoted to cross-colony hive"
|
|
189
334
|
fi
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**Continue to Step 4 (non-blocking):**
|
|
338
|
+
Proceed to Step 4 regardless of hive promotion results — hive promotion is strictly non-blocking.
|
|
190
339
|
|
|
191
|
-
|
|
192
|
-
bash .aether/aether-utils.sh activity-log "MODIFIED" "Queen" "Promoted ${promotions_made} learnings/decisions/instincts to QUEEN.md from colony ${colony_name}"
|
|
340
|
+
### Step 4: Log Seal Activity
|
|
193
341
|
|
|
194
|
-
|
|
195
|
-
|
|
342
|
+
Log the seal ceremony to activity log:
|
|
343
|
+
```bash
|
|
344
|
+
bash .aether/aether-utils.sh activity-log "MODIFIED" "Queen" "Colony sealed - wisdom review completed"
|
|
196
345
|
```
|
|
197
346
|
|
|
347
|
+
### Step 4.5: Increment Colony Version
|
|
348
|
+
|
|
349
|
+
Before writing the Crowned Anthill milestone, increment `colony_version` in COLONY_STATE.json.
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
# Read current colony_version (default to 0 for backward compat with older colonies)
|
|
353
|
+
current_colony_version=$(jq -r '.colony_version // 0' .aether/data/COLONY_STATE.json 2>/dev/null || echo 0)
|
|
354
|
+
# Guard against non-integer values (floats, strings)
|
|
355
|
+
[[ "$current_colony_version" =~ ^[0-9]+$ ]] || current_colony_version=0
|
|
356
|
+
new_colony_version=$(( current_colony_version + 1 ))
|
|
357
|
+
|
|
358
|
+
# Write incremented value back — guard against empty output destroying the file
|
|
359
|
+
updated=$(jq --argjson v "$new_colony_version" '.colony_version = $v' .aether/data/COLONY_STATE.json 2>/dev/null)
|
|
360
|
+
if [[ -n "$updated" && ${#updated} -gt 10 ]]; then
|
|
361
|
+
echo "$updated" > .aether/data/COLONY_STATE.json
|
|
362
|
+
else
|
|
363
|
+
echo "Warning: jq update failed — colony_version defaults to 1, state file unchanged"
|
|
364
|
+
new_colony_version=1
|
|
365
|
+
fi
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Use `new_colony_version` as `{colony_version}` throughout the rest of the seal ceremony (e.g., display as "Crowned Anthill v{colony_version}").
|
|
369
|
+
|
|
370
|
+
**Error handling:** If jq fails or produces empty/short output, COLONY_STATE.json is NOT overwritten and `new_colony_version` defaults to 1. Never let version increment failures block the seal.
|
|
371
|
+
|
|
198
372
|
### Step 5: Update Milestone to Crowned Anthill
|
|
199
373
|
|
|
200
374
|
Update COLONY_STATE.json:
|
|
@@ -204,6 +378,142 @@ Update COLONY_STATE.json:
|
|
|
204
378
|
|
|
205
379
|
Run `bash .aether/aether-utils.sh validate-state colony` after write.
|
|
206
380
|
|
|
381
|
+
### Step 5.1: Update Changelog
|
|
382
|
+
|
|
383
|
+
**MANDATORY: Record the seal in the project changelog. This step is never skipped.**
|
|
384
|
+
|
|
385
|
+
If no `CHANGELOG.md` exists, `changelog-append` creates one automatically.
|
|
386
|
+
|
|
387
|
+
Build a summary of what the colony accomplished across all phases:
|
|
388
|
+
- Collect completed phase names from COLONY_STATE.json
|
|
389
|
+
- Summarize the goal and key outcomes in one line
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
bash .aether/aether-utils.sh changelog-append \
|
|
393
|
+
"$(date +%Y-%m-%d)" \
|
|
394
|
+
"seal-crowned-anthill" \
|
|
395
|
+
"00" \
|
|
396
|
+
"{key_files_csv}" \
|
|
397
|
+
"Colony sealed at Crowned Anthill;{goal}" \
|
|
398
|
+
"{phases_completed} phases completed;Colony wisdom promoted to QUEEN.md" \
|
|
399
|
+
""
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
- `{key_files_csv}` — list the most significant files created or modified across the colony's lifetime (derive from phase plans or git log)
|
|
403
|
+
- `{goal}` — the colony goal from COLONY_STATE.json
|
|
404
|
+
|
|
405
|
+
**Error handling:** If `changelog-append` fails, log to midden and continue — changelog failure never blocks sealing.
|
|
406
|
+
|
|
407
|
+
### Step 5.2: Update Registry (Silent)
|
|
408
|
+
|
|
409
|
+
Mark the colony as inactive in the global registry. This is silent on failure — registry is not required for the colony to work.
|
|
410
|
+
|
|
411
|
+
Run using the Bash tool (ignore errors):
|
|
412
|
+
```bash
|
|
413
|
+
bash .aether/aether-utils.sh registry-add "$(pwd)" "$(jq -r '.version // "unknown"' ~/.aether/version.json 2>/dev/null || echo 'unknown')" --active false 2>/dev/null || true
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
If the command fails, proceed silently. This is optional bookkeeping.
|
|
417
|
+
|
|
418
|
+
### Step 5.5: Documentation Coverage Audit
|
|
419
|
+
|
|
420
|
+
Before writing the seal document, spawn a Chronicler to survey documentation coverage.
|
|
421
|
+
|
|
422
|
+
**Generate Chronicler name and dispatch:**
|
|
423
|
+
```bash
|
|
424
|
+
# Generate unique chronicler name
|
|
425
|
+
chronicler_name=$(bash .aether/aether-utils.sh generate-ant-name "chronicler")
|
|
426
|
+
|
|
427
|
+
# Log spawn and update swarm display
|
|
428
|
+
bash .aether/aether-utils.sh spawn-log "Queen" "chronicler" "$chronicler_name" "Documentation coverage audit"
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
**Display:**
|
|
432
|
+
```
|
|
433
|
+
━━━ 📝🐜 C H R O N I C L E R ━━━
|
|
434
|
+
──── 📝🐜 Spawning {chronicler_name} — documentation coverage audit ────
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**Spawn Chronicler using Task tool:**
|
|
438
|
+
Spawn the Chronicler using Task tool with `subagent_type="aether-chronicler"`:
|
|
439
|
+
|
|
440
|
+
```xml
|
|
441
|
+
<task>
|
|
442
|
+
<description>📝 Chronicler {chronicler_name}: Documentation coverage audit</description>
|
|
443
|
+
<prompt>
|
|
444
|
+
You are {chronicler_name}, a 📝 Chronicler Ant.
|
|
445
|
+
|
|
446
|
+
Mission: Documentation coverage audit before seal ceremony
|
|
447
|
+
|
|
448
|
+
Survey the following documentation types:
|
|
449
|
+
- README.md (project overview, quick start)
|
|
450
|
+
- API documentation (endpoints, parameters, responses)
|
|
451
|
+
- Guides (tutorials, how-tos, best practices)
|
|
452
|
+
- Changelogs (version history, release notes)
|
|
453
|
+
- Code comments (JSDoc, TSDoc inline documentation)
|
|
454
|
+
- Architecture docs (system design, decisions)
|
|
455
|
+
|
|
456
|
+
Work:
|
|
457
|
+
1. Check if README.md exists and covers: installation, usage, examples
|
|
458
|
+
2. Look for docs/ directory and survey guide coverage
|
|
459
|
+
3. Check for API documentation (OpenAPI, README sections, etc.)
|
|
460
|
+
4. Verify CHANGELOG.md exists and has recent entries
|
|
461
|
+
5. Sample source files for inline documentation coverage
|
|
462
|
+
6. Identify documentation gaps (missing, outdated, incomplete)
|
|
463
|
+
|
|
464
|
+
**IMPORTANT:** You are strictly read-only. Do not modify any files.
|
|
465
|
+
|
|
466
|
+
Log activity: bash .aether/aether-utils.sh activity-log "SURVEYING" "{chronicler_name}" "description"
|
|
467
|
+
|
|
468
|
+
Return ONLY this JSON (no other text):
|
|
469
|
+
{
|
|
470
|
+
"ant_name": "{chronicler_name}",
|
|
471
|
+
"caste": "chronicler",
|
|
472
|
+
"status": "completed" | "failed" | "blocked",
|
|
473
|
+
"summary": "What you surveyed and found",
|
|
474
|
+
"documentation_created": [],
|
|
475
|
+
"documentation_updated": [],
|
|
476
|
+
"pages_documented": 0,
|
|
477
|
+
"code_examples_verified": [],
|
|
478
|
+
"coverage_percent": 0,
|
|
479
|
+
"gaps_identified": [
|
|
480
|
+
{"type": "README|API|Guide|Changelog|Comments|Architecture", "severity": "high|medium|low", "description": "...", "location": "..."}
|
|
481
|
+
],
|
|
482
|
+
"blockers": []
|
|
483
|
+
}
|
|
484
|
+
</prompt>
|
|
485
|
+
</task>
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
**FALLBACK:** If "Agent type not found", use general-purpose agent and inject role: "You are a Chronicler Ant - documentation specialist that surveys and identifies documentation gaps."
|
|
489
|
+
|
|
490
|
+
**Parse Chronicler JSON output:**
|
|
491
|
+
Extract from response: `coverage_percent`, `gaps_identified`, `pages_documented`
|
|
492
|
+
|
|
493
|
+
Log completion and update swarm display:
|
|
494
|
+
```bash
|
|
495
|
+
bash .aether/aether-utils.sh spawn-complete "$chronicler_name" "completed" "Documentation audit complete"
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
**Display Chronicler completion line:**
|
|
499
|
+
```
|
|
500
|
+
📝 {chronicler_name}: Documentation coverage audit ({pages_documented} pages, {coverage_percent}% coverage) ✓
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
**Log gaps to midden (non-blocking):**
|
|
504
|
+
For each gap in `gaps_identified` with severity "high" or "medium":
|
|
505
|
+
```bash
|
|
506
|
+
bash .aether/aether-utils.sh midden-write "documentation" "Gap ({severity}): {description} at {location}" "chronicler"
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
**Display summary:**
|
|
510
|
+
```
|
|
511
|
+
📝 Chronicler complete — {coverage_percent}% coverage, {gap_count} gaps logged to midden
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
**Continue to Step 6 (non-blocking):**
|
|
515
|
+
Proceed to Step 6 regardless of Chronicler findings — Chronicler is strictly non-blocking.
|
|
516
|
+
|
|
207
517
|
### Step 6: Write CROWNED-ANTHILL.md
|
|
208
518
|
|
|
209
519
|
Calculate colony age:
|
|
@@ -259,7 +569,7 @@ Write the result to .aether/CROWNED-ANTHILL.md using the Write tool.
|
|
|
259
569
|
|
|
260
570
|
### Step 6.5: Export XML Archive (best-effort)
|
|
261
571
|
|
|
262
|
-
Export colony data as a combined XML archive.
|
|
572
|
+
Export colony data as a combined XML archive and a standalone pheromones.xml. Both are best-effort — seal proceeds even if XML export fails.
|
|
263
573
|
|
|
264
574
|
```bash
|
|
265
575
|
# Check if xmllint is available
|
|
@@ -272,17 +582,46 @@ if command -v xmllint >/dev/null 2>&1; then
|
|
|
272
582
|
else
|
|
273
583
|
xml_export_line="XML Archive: export failed (non-blocking)"
|
|
274
584
|
fi
|
|
585
|
+
|
|
586
|
+
# Also export standalone pheromones.xml for cross-colony sharing
|
|
587
|
+
pher_result=$(bash .aether/aether-utils.sh pheromone-export-xml ".aether/exchange/pheromones.xml" 2>&1)
|
|
588
|
+
pher_ok=$(echo "$pher_result" | jq -r '.ok // false' 2>/dev/null)
|
|
589
|
+
if [[ "$pher_ok" == "true" ]]; then
|
|
590
|
+
pher_signal_count=$(jq '[.signals[] | select(.active != false)] | length' .aether/data/pheromones.json 2>/dev/null || echo "0")
|
|
591
|
+
pher_export_line="Signal Export: pheromones.xml (${pher_signal_count} signals, importable by other colonies)"
|
|
592
|
+
else
|
|
593
|
+
pher_export_line="Signal Export: failed (non-blocking)"
|
|
594
|
+
fi
|
|
595
|
+
|
|
596
|
+
# Export standalone queen-wisdom.xml for cross-colony wisdom sharing
|
|
597
|
+
wisdom_result=$(bash .aether/aether-utils.sh wisdom-export-xml ".aether/exchange/queen-wisdom.xml" 2>&1)
|
|
598
|
+
wisdom_ok=$(echo "$wisdom_result" | jq -r '.ok // false' 2>/dev/null)
|
|
599
|
+
if [[ "$wisdom_ok" == "true" ]]; then
|
|
600
|
+
wisdom_count=$(echo "$wisdom_result" | jq -r '.result.entries // 0' 2>/dev/null)
|
|
601
|
+
wisdom_export_line="Wisdom Export: queen-wisdom.xml (${wisdom_count} entries)"
|
|
602
|
+
else
|
|
603
|
+
wisdom_export_line="Wisdom Export: failed (non-blocking)"
|
|
604
|
+
fi
|
|
605
|
+
|
|
606
|
+
# Export standalone colony-registry.xml for lineage tracking
|
|
607
|
+
registry_result=$(bash .aether/aether-utils.sh registry-export-xml ".aether/exchange/colony-registry.xml" 2>&1)
|
|
608
|
+
registry_ok=$(echo "$registry_result" | jq -r '.ok // false' 2>/dev/null)
|
|
609
|
+
if [[ "$registry_ok" == "true" ]]; then
|
|
610
|
+
registry_count=$(echo "$registry_result" | jq -r '.result.colonies // 0' 2>/dev/null)
|
|
611
|
+
registry_export_line="Registry Export: colony-registry.xml (${registry_count} colonies)"
|
|
612
|
+
else
|
|
613
|
+
registry_export_line="Registry Export: failed (non-blocking)"
|
|
614
|
+
fi
|
|
275
615
|
else
|
|
276
616
|
xml_export_line="XML Archive: skipped (xmllint not available)"
|
|
617
|
+
pher_export_line="Signal Export: skipped (xmllint not available)"
|
|
618
|
+
wisdom_export_line="Wisdom Export: skipped (xmllint not available)"
|
|
619
|
+
registry_export_line="Registry Export: skipped (xmllint not available)"
|
|
277
620
|
fi
|
|
278
621
|
```
|
|
279
622
|
|
|
280
623
|
### Step 7: Display Ceremony
|
|
281
624
|
|
|
282
|
-
**If visual_mode is true, render swarm display BEFORE the ASCII art (consolidated):**
|
|
283
|
-
```bash
|
|
284
|
-
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"
|
|
285
|
-
```
|
|
286
625
|
|
|
287
626
|
Display the ASCII art ceremony:
|
|
288
627
|
```
|
|
@@ -305,16 +644,20 @@ Display the ASCII art ceremony:
|
|
|
305
644
|
Below the ASCII art, display:
|
|
306
645
|
```
|
|
307
646
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
308
|
-
C R O W N E D A N T H I L L
|
|
647
|
+
C R O W N E D A N T H I L L v{colony_version}
|
|
309
648
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
310
649
|
|
|
311
650
|
Goal: {goal}
|
|
312
651
|
Phases: {phases_completed} of {total_phases} completed
|
|
652
|
+
Milestone: Crowned Anthill v{colony_version}
|
|
313
653
|
{If incomplete_warning is not empty: display it}
|
|
314
654
|
Wisdom Promoted: {promotion_summary}
|
|
315
655
|
|
|
316
656
|
Seal Document: .aether/CROWNED-ANTHILL.md
|
|
317
657
|
{xml_export_line}
|
|
658
|
+
{pher_export_line}
|
|
659
|
+
{wisdom_export_line}
|
|
660
|
+
{registry_export_line}
|
|
318
661
|
|
|
319
662
|
The colony stands crowned and sealed.
|
|
320
663
|
Its wisdom lives on in QUEEN.md.
|
|
@@ -328,6 +671,82 @@ The anthill has reached its final form.
|
|
|
328
671
|
/ant:tunnels 🗄️ Browse archived chambers
|
|
329
672
|
```
|
|
330
673
|
|
|
674
|
+
### Step 7.5: Commit Suggestion (Non-blocking)
|
|
675
|
+
|
|
676
|
+
After the ceremony, offer to commit all colony work.
|
|
677
|
+
|
|
678
|
+
**Gate check — skip silently if any fail:**
|
|
679
|
+
1. Not a git repo: `git rev-parse --git-dir 2>/dev/null` fails → skip
|
|
680
|
+
2. Clean working tree: `git status --porcelain 2>/dev/null` is empty → skip to Step 7.6 (may still want to push)
|
|
681
|
+
|
|
682
|
+
**If uncommitted changes exist:**
|
|
683
|
+
|
|
684
|
+
Generate a seal commit message:
|
|
685
|
+
```bash
|
|
686
|
+
seal_commit=$(bash .aether/aether-utils.sh generate-commit-message seal "$phases_completed" "$goal" "$colony_age_days" 2>/dev/null)
|
|
687
|
+
seal_message=$(echo "$seal_commit" | jq -r '.result.message // "aether-seal: colony sealed"')
|
|
688
|
+
seal_body=$(echo "$seal_commit" | jq -r '.result.body // ""')
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
Display the suggestion:
|
|
692
|
+
```
|
|
693
|
+
──────────────────────────────────────────────────
|
|
694
|
+
Commit suggestion:
|
|
695
|
+
|
|
696
|
+
$seal_message
|
|
697
|
+
|
|
698
|
+
$seal_body
|
|
699
|
+
──────────────────────────────────────────────────
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
Prompt with AskUserQuestion (3 options):
|
|
703
|
+
1. **Commit with this message** — Run `git add -A && git commit -m "$seal_message" -m "$seal_body"`
|
|
704
|
+
2. **Edit message** — Ask user for their preferred message, then commit with that
|
|
705
|
+
3. **Skip** — Do not commit
|
|
706
|
+
|
|
707
|
+
If the user chooses option 1 or 2 and the commit succeeds, set `seal_committed = true`.
|
|
708
|
+
If the commit fails or user skips, set `seal_committed = false`.
|
|
709
|
+
|
|
710
|
+
**Error handling:** If `generate-commit-message` fails, fall back to message `"aether-seal: colony sealed"`. Never let commit suggestion failures stop the seal flow.
|
|
711
|
+
|
|
712
|
+
### Step 7.6: Push Suggestion (Non-blocking)
|
|
713
|
+
|
|
714
|
+
Only show if a commit was just made in Step 7.5 (`seal_committed == true`) OR if there are unpushed commits.
|
|
715
|
+
|
|
716
|
+
**Gate check — skip silently if any fail:**
|
|
717
|
+
1. Not a git repo → skip
|
|
718
|
+
2. No remote configured: `git remote -v 2>/dev/null` is empty → skip
|
|
719
|
+
|
|
720
|
+
**Check for unpushed commits:**
|
|
721
|
+
```bash
|
|
722
|
+
unpushed=$(git log --oneline @{u}..HEAD 2>/dev/null | wc -l | tr -d ' ')
|
|
723
|
+
```
|
|
724
|
+
If `unpushed == 0` and `seal_committed == false` → skip (nothing to push)
|
|
725
|
+
|
|
726
|
+
**If there are commits to push:**
|
|
727
|
+
|
|
728
|
+
Detect current branch and upstream status:
|
|
729
|
+
```bash
|
|
730
|
+
current_branch=$(git branch --show-current)
|
|
731
|
+
has_upstream=$(git rev-parse --abbrev-ref @{u} 2>/dev/null && echo "yes" || echo "no")
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
Display:
|
|
735
|
+
```
|
|
736
|
+
Push {unpushed} commit(s) to remote?
|
|
737
|
+
Branch: {current_branch}
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
Prompt with AskUserQuestion (2 options):
|
|
741
|
+
1. **Push now** — If upstream exists: `git push`. If no upstream: `git push -u origin $current_branch`
|
|
742
|
+
2. **I'll push later** — Skip
|
|
743
|
+
|
|
744
|
+
Display result: `Pushed to origin/{current_branch}` on success, or `Push skipped` if declined.
|
|
745
|
+
|
|
746
|
+
**Error handling:** If push fails, display the error message but do not stop the seal flow. Suggest: "You can push manually with `git push`."
|
|
747
|
+
|
|
748
|
+
**Safety:** Never auto-push. Always require explicit user approval via AskUserQuestion.
|
|
749
|
+
|
|
331
750
|
### Edge Cases
|
|
332
751
|
|
|
333
752
|
**Colony already at Crowned Anthill:**
|