aether-colony 5.3.2 → 5.4.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 +181 -5
- package/.aether/commands/archaeology.yaml +3 -3
- package/.aether/commands/build.yaml +80 -45
- package/.aether/commands/chaos.yaml +7 -7
- package/.aether/commands/colonize.yaml +17 -17
- package/.aether/commands/continue.yaml +40 -40
- package/.aether/commands/council.yaml +6 -6
- package/.aether/commands/data-clean.yaml +3 -3
- package/.aether/commands/dream.yaml +2 -2
- package/.aether/commands/entomb.yaml +12 -12
- package/.aether/commands/export-signals.yaml +2 -2
- package/.aether/commands/feedback.yaml +6 -6
- package/.aether/commands/flag.yaml +2 -2
- package/.aether/commands/flags.yaml +4 -4
- package/.aether/commands/focus.yaml +6 -6
- package/.aether/commands/help.yaml +1 -1
- package/.aether/commands/history.yaml +1 -1
- package/.aether/commands/import-signals.yaml +2 -2
- package/.aether/commands/init.yaml +44 -27
- package/.aether/commands/insert-phase.yaml +1 -1
- package/.aether/commands/interpret.yaml +2 -2
- package/.aether/commands/lay-eggs.yaml +3 -3
- package/.aether/commands/maturity.yaml +2 -2
- package/.aether/commands/memory-details.yaml +1 -1
- package/.aether/commands/migrate-state.yaml +1 -1
- package/.aether/commands/oracle.yaml +147 -82
- package/.aether/commands/organize.yaml +5 -5
- package/.aether/commands/patrol.yaml +8 -8
- package/.aether/commands/pause-colony.yaml +7 -7
- package/.aether/commands/phase.yaml +1 -1
- package/.aether/commands/pheromones.yaml +1 -1
- package/.aether/commands/plan.yaml +14 -14
- package/.aether/commands/quick.yaml +4 -4
- package/.aether/commands/redirect.yaml +6 -6
- package/.aether/commands/resume-colony.yaml +9 -9
- package/.aether/commands/resume.yaml +5 -38
- package/.aether/commands/run.yaml +10 -10
- package/.aether/commands/seal.yaml +33 -33
- package/.aether/commands/skill-create.yaml +4 -4
- package/.aether/commands/status.yaml +14 -14
- package/.aether/commands/swarm.yaml +14 -14
- package/.aether/commands/tunnels.yaml +7 -7
- package/.aether/commands/update.yaml +1 -1
- package/.aether/commands/verify-castes.yaml +3 -3
- package/.aether/commands/watch.yaml +15 -15
- package/.aether/docs/command-playbooks/build-complete.md +48 -15
- package/.aether/docs/command-playbooks/build-context.md +11 -11
- package/.aether/docs/command-playbooks/build-full.md +76 -76
- package/.aether/docs/command-playbooks/build-prep.md +10 -10
- package/.aether/docs/command-playbooks/build-verify.md +27 -27
- package/.aether/docs/command-playbooks/build-wave.md +38 -38
- package/.aether/docs/command-playbooks/continue-advance.md +60 -27
- package/.aether/docs/command-playbooks/continue-finalize.md +25 -11
- package/.aether/docs/command-playbooks/continue-full.md +60 -46
- package/.aether/docs/command-playbooks/continue-gates.md +18 -18
- package/.aether/docs/command-playbooks/continue-verify.md +10 -10
- package/.aether/docs/source-of-truth-map.md +10 -10
- package/.aether/docs/structural-learning-stack.md +283 -0
- package/.aether/templates/colony-state-template.json +1 -0
- package/.aether/utils/consolidation-seal.sh +196 -0
- package/.aether/utils/consolidation.sh +127 -0
- package/.aether/utils/curation-ants/archivist.sh +97 -0
- package/.aether/utils/curation-ants/critic.sh +214 -0
- package/.aether/utils/curation-ants/herald.sh +102 -0
- package/.aether/utils/curation-ants/janitor.sh +121 -0
- package/.aether/utils/curation-ants/librarian.sh +99 -0
- package/.aether/utils/curation-ants/nurse.sh +153 -0
- package/.aether/utils/curation-ants/orchestrator.sh +181 -0
- package/.aether/utils/curation-ants/scribe.sh +164 -0
- package/.aether/utils/curation-ants/sentinel.sh +119 -0
- package/.aether/utils/event-bus.sh +301 -0
- package/.aether/utils/graph.sh +559 -0
- package/.aether/utils/instinct-store.sh +401 -0
- package/.aether/utils/learning.sh +79 -7
- package/.aether/utils/oracle/oracle-stop-hook.sh +896 -0
- package/.aether/utils/session.sh +13 -0
- package/.aether/utils/state-api.sh +1 -1
- package/.aether/utils/trust-scoring.sh +347 -0
- package/.aether/utils/worktree.sh +97 -0
- package/.claude/commands/ant/archaeology.md +2 -2
- package/.claude/commands/ant/chaos.md +4 -4
- package/.claude/commands/ant/colonize.md +9 -9
- package/.claude/commands/ant/council.md +6 -6
- package/.claude/commands/ant/data-clean.md +3 -3
- package/.claude/commands/ant/dream.md +2 -2
- package/.claude/commands/ant/entomb.md +9 -9
- package/.claude/commands/ant/export-signals.md +2 -2
- package/.claude/commands/ant/feedback.md +4 -4
- package/.claude/commands/ant/flag.md +2 -2
- package/.claude/commands/ant/flags.md +4 -4
- package/.claude/commands/ant/focus.md +4 -4
- package/.claude/commands/ant/help.md +1 -1
- package/.claude/commands/ant/history.md +1 -1
- package/.claude/commands/ant/import-signals.md +2 -2
- package/.claude/commands/ant/init.md +44 -27
- package/.claude/commands/ant/insert-phase.md +1 -1
- package/.claude/commands/ant/interpret.md +2 -2
- package/.claude/commands/ant/lay-eggs.md +2 -2
- package/.claude/commands/ant/maturity.md +2 -2
- package/.claude/commands/ant/memory-details.md +1 -1
- package/.claude/commands/ant/migrate-state.md +1 -1
- package/.claude/commands/ant/oracle.md +78 -42
- package/.claude/commands/ant/organize.md +3 -3
- package/.claude/commands/ant/patrol.md +8 -8
- package/.claude/commands/ant/pause-colony.md +5 -5
- package/.claude/commands/ant/phase.md +1 -1
- package/.claude/commands/ant/pheromones.md +1 -1
- package/.claude/commands/ant/plan.md +8 -8
- package/.claude/commands/ant/quick.md +4 -4
- package/.claude/commands/ant/redirect.md +4 -4
- package/.claude/commands/ant/resume-colony.md +5 -5
- package/.claude/commands/ant/resume.md +17 -29
- package/.claude/commands/ant/run.md +10 -10
- package/.claude/commands/ant/seal.md +25 -25
- package/.claude/commands/ant/skill-create.md +2 -2
- package/.claude/commands/ant/status.md +14 -14
- package/.claude/commands/ant/swarm.md +14 -14
- package/.claude/commands/ant/tunnels.md +4 -4
- package/.claude/commands/ant/update.md +1 -1
- package/.claude/commands/ant/verify-castes.md +2 -2
- package/.claude/commands/ant/watch.md +8 -8
- package/.opencode/commands/ant/archaeology.md +1 -1
- package/.opencode/commands/ant/build.md +80 -45
- package/.opencode/commands/ant/chaos.md +3 -3
- package/.opencode/commands/ant/colonize.md +8 -8
- package/.opencode/commands/ant/continue.md +40 -40
- package/.opencode/commands/ant/council.md +5 -5
- package/.opencode/commands/ant/data-clean.md +2 -2
- package/.opencode/commands/ant/dream.md +1 -1
- package/.opencode/commands/ant/entomb.md +3 -3
- package/.opencode/commands/ant/export-signals.md +1 -1
- package/.opencode/commands/ant/feedback.md +2 -2
- package/.opencode/commands/ant/flag.md +1 -1
- package/.opencode/commands/ant/flags.md +3 -3
- package/.opencode/commands/ant/focus.md +2 -2
- package/.opencode/commands/ant/import-signals.md +1 -1
- package/.opencode/commands/ant/init.md +44 -27
- package/.opencode/commands/ant/insert-phase.md +1 -1
- package/.opencode/commands/ant/interpret.md +1 -1
- package/.opencode/commands/ant/lay-eggs.md +2 -2
- package/.opencode/commands/ant/maturity.md +1 -1
- package/.opencode/commands/ant/memory-details.md +1 -1
- package/.opencode/commands/ant/oracle.md +69 -40
- package/.opencode/commands/ant/organize.md +2 -2
- package/.opencode/commands/ant/patrol.md +8 -8
- package/.opencode/commands/ant/pause-colony.md +2 -2
- package/.opencode/commands/ant/pheromones.md +1 -1
- package/.opencode/commands/ant/plan.md +6 -6
- package/.opencode/commands/ant/quick.md +4 -4
- package/.opencode/commands/ant/redirect.md +2 -2
- package/.opencode/commands/ant/resume-colony.md +4 -4
- package/.opencode/commands/ant/resume.md +5 -17
- package/.opencode/commands/ant/run.md +10 -10
- package/.opencode/commands/ant/seal.md +8 -8
- package/.opencode/commands/ant/skill-create.md +2 -2
- package/.opencode/commands/ant/status.md +10 -10
- package/.opencode/commands/ant/tunnels.md +3 -3
- package/.opencode/commands/ant/verify-castes.md +1 -1
- package/.opencode/commands/ant/watch.md +7 -7
- package/CHANGELOG.md +83 -0
- package/README.md +22 -9
- package/bin/cli.js +118 -3
- package/bin/lib/binary-downloader.js +267 -0
- package/bin/lib/update-transaction.js +27 -3
- package/bin/lib/version-gate.js +179 -0
- package/bin/npx-entry.js +0 -0
- package/package.json +1 -1
- package/.aether/agents/aether-ambassador.md +0 -140
- package/.aether/agents/aether-archaeologist.md +0 -108
- package/.aether/agents/aether-architect.md +0 -133
- package/.aether/agents/aether-auditor.md +0 -144
- package/.aether/agents/aether-builder.md +0 -184
- package/.aether/agents/aether-chaos.md +0 -115
- package/.aether/agents/aether-chronicler.md +0 -122
- package/.aether/agents/aether-gatekeeper.md +0 -116
- package/.aether/agents/aether-includer.md +0 -117
- package/.aether/agents/aether-keeper.md +0 -177
- package/.aether/agents/aether-measurer.md +0 -128
- package/.aether/agents/aether-oracle.md +0 -137
- package/.aether/agents/aether-probe.md +0 -133
- package/.aether/agents/aether-queen.md +0 -286
- package/.aether/agents/aether-route-setter.md +0 -130
- package/.aether/agents/aether-sage.md +0 -106
- package/.aether/agents/aether-scout.md +0 -101
- package/.aether/agents/aether-surveyor-disciplines.md +0 -391
- package/.aether/agents/aether-surveyor-nest.md +0 -329
- package/.aether/agents/aether-surveyor-pathogens.md +0 -264
- package/.aether/agents/aether-surveyor-provisions.md +0 -334
- package/.aether/agents/aether-tracker.md +0 -137
- package/.aether/agents/aether-watcher.md +0 -174
- package/.aether/agents/aether-weaver.md +0 -130
- package/.aether/commands/claude/archaeology.md +0 -334
- package/.aether/commands/claude/build.md +0 -65
- package/.aether/commands/claude/chaos.md +0 -336
- package/.aether/commands/claude/colonize.md +0 -259
- package/.aether/commands/claude/continue.md +0 -60
- package/.aether/commands/claude/council.md +0 -507
- package/.aether/commands/claude/data-clean.md +0 -81
- package/.aether/commands/claude/dream.md +0 -268
- package/.aether/commands/claude/entomb.md +0 -498
- package/.aether/commands/claude/export-signals.md +0 -57
- package/.aether/commands/claude/feedback.md +0 -96
- package/.aether/commands/claude/flag.md +0 -151
- package/.aether/commands/claude/flags.md +0 -169
- package/.aether/commands/claude/focus.md +0 -76
- package/.aether/commands/claude/help.md +0 -154
- package/.aether/commands/claude/history.md +0 -140
- package/.aether/commands/claude/import-signals.md +0 -71
- package/.aether/commands/claude/init.md +0 -505
- package/.aether/commands/claude/insert-phase.md +0 -105
- package/.aether/commands/claude/interpret.md +0 -278
- package/.aether/commands/claude/lay-eggs.md +0 -210
- package/.aether/commands/claude/maturity.md +0 -113
- package/.aether/commands/claude/memory-details.md +0 -77
- package/.aether/commands/claude/migrate-state.md +0 -171
- package/.aether/commands/claude/oracle.md +0 -642
- package/.aether/commands/claude/organize.md +0 -232
- package/.aether/commands/claude/patrol.md +0 -620
- package/.aether/commands/claude/pause-colony.md +0 -233
- package/.aether/commands/claude/phase.md +0 -115
- package/.aether/commands/claude/pheromones.md +0 -156
- package/.aether/commands/claude/plan.md +0 -693
- package/.aether/commands/claude/preferences.md +0 -65
- package/.aether/commands/claude/quick.md +0 -100
- package/.aether/commands/claude/redirect.md +0 -76
- package/.aether/commands/claude/resume-colony.md +0 -197
- package/.aether/commands/claude/resume.md +0 -388
- package/.aether/commands/claude/run.md +0 -231
- package/.aether/commands/claude/seal.md +0 -774
- package/.aether/commands/claude/skill-create.md +0 -286
- package/.aether/commands/claude/status.md +0 -410
- package/.aether/commands/claude/swarm.md +0 -349
- package/.aether/commands/claude/tunnels.md +0 -426
- package/.aether/commands/claude/update.md +0 -132
- package/.aether/commands/claude/verify-castes.md +0 -143
- package/.aether/commands/claude/watch.md +0 -239
- package/.aether/commands/opencode/archaeology.md +0 -331
- package/.aether/commands/opencode/build.md +0 -1168
- package/.aether/commands/opencode/chaos.md +0 -329
- package/.aether/commands/opencode/colonize.md +0 -195
- package/.aether/commands/opencode/continue.md +0 -1436
- package/.aether/commands/opencode/council.md +0 -437
- package/.aether/commands/opencode/data-clean.md +0 -77
- package/.aether/commands/opencode/dream.md +0 -260
- package/.aether/commands/opencode/entomb.md +0 -377
- package/.aether/commands/opencode/export-signals.md +0 -54
- package/.aether/commands/opencode/feedback.md +0 -99
- package/.aether/commands/opencode/flag.md +0 -149
- package/.aether/commands/opencode/flags.md +0 -167
- package/.aether/commands/opencode/focus.md +0 -73
- package/.aether/commands/opencode/help.md +0 -157
- package/.aether/commands/opencode/history.md +0 -136
- package/.aether/commands/opencode/import-signals.md +0 -68
- package/.aether/commands/opencode/init.md +0 -518
- package/.aether/commands/opencode/insert-phase.md +0 -111
- package/.aether/commands/opencode/interpret.md +0 -272
- package/.aether/commands/opencode/lay-eggs.md +0 -213
- package/.aether/commands/opencode/maturity.md +0 -108
- package/.aether/commands/opencode/memory-details.md +0 -83
- package/.aether/commands/opencode/migrate-state.md +0 -165
- package/.aether/commands/opencode/oracle.md +0 -593
- package/.aether/commands/opencode/organize.md +0 -226
- package/.aether/commands/opencode/patrol.md +0 -626
- package/.aether/commands/opencode/pause-colony.md +0 -203
- package/.aether/commands/opencode/phase.md +0 -113
- package/.aether/commands/opencode/pheromones.md +0 -162
- package/.aether/commands/opencode/plan.md +0 -684
- package/.aether/commands/opencode/preferences.md +0 -71
- package/.aether/commands/opencode/quick.md +0 -91
- package/.aether/commands/opencode/redirect.md +0 -84
- package/.aether/commands/opencode/resume-colony.md +0 -190
- package/.aether/commands/opencode/resume.md +0 -394
- package/.aether/commands/opencode/run.md +0 -237
- package/.aether/commands/opencode/seal.md +0 -452
- package/.aether/commands/opencode/skill-create.md +0 -63
- package/.aether/commands/opencode/status.md +0 -307
- package/.aether/commands/opencode/swarm.md +0 -15
- package/.aether/commands/opencode/tunnels.md +0 -400
- package/.aether/commands/opencode/update.md +0 -127
- package/.aether/commands/opencode/verify-castes.md +0 -139
- package/.aether/commands/opencode/watch.md +0 -227
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
<!-- Generated from .aether/commands/seal.yaml - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
---
|
|
3
|
-
name: ant:seal
|
|
4
|
-
description: "🏺🐜🏺 Seal the colony with Crowned Anthill milestone"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
### Step -1: Normalize Arguments
|
|
8
|
-
|
|
9
|
-
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
10
|
-
|
|
11
|
-
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
12
|
-
|
|
13
|
-
You are the **Queen**. Seal the colony when all work is complete.
|
|
14
|
-
|
|
15
|
-
## Instructions
|
|
16
|
-
|
|
17
|
-
Parse `$normalized_args`:
|
|
18
|
-
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
19
|
-
- Otherwise: set `visual_mode = true`
|
|
20
|
-
|
|
21
|
-
### Step 1: Read State
|
|
22
|
-
|
|
23
|
-
Read `.aether/data/COLONY_STATE.json`.
|
|
24
|
-
|
|
25
|
-
If file missing or `goal: null`:
|
|
26
|
-
```
|
|
27
|
-
No colony initialized. Run /ant:init first.
|
|
28
|
-
```
|
|
29
|
-
Stop here.
|
|
30
|
-
|
|
31
|
-
### Step 2: Validate Colony Is Complete
|
|
32
|
-
|
|
33
|
-
Extract: `goal`, `current_phase`, `plan.phases`, `milestone`, `state`.
|
|
34
|
-
|
|
35
|
-
**Precondition 1: All phases must be completed**
|
|
36
|
-
|
|
37
|
-
Check if all phases in `plan.phases` have `status: "completed"`:
|
|
38
|
-
```
|
|
39
|
-
all_completed = all(phase.status == "completed" for phase in plan.phases)
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
If NOT all completed:
|
|
43
|
-
```
|
|
44
|
-
Cannot archive colony with incomplete phases.
|
|
45
|
-
|
|
46
|
-
Completed phases: X of Y
|
|
47
|
-
Remaining: {list of incomplete phase names}
|
|
48
|
-
|
|
49
|
-
Run /ant:continue to complete remaining phases first.
|
|
50
|
-
```
|
|
51
|
-
Stop here.
|
|
52
|
-
|
|
53
|
-
**Precondition 2: State must not be EXECUTING**
|
|
54
|
-
|
|
55
|
-
If `state == "EXECUTING"`:
|
|
56
|
-
```
|
|
57
|
-
Colony is still executing. Run /ant:continue to reconcile first.
|
|
58
|
-
```
|
|
59
|
-
Stop here.
|
|
60
|
-
|
|
61
|
-
### Step 3: Check Milestone Eligibility
|
|
62
|
-
|
|
63
|
-
The full milestone progression is:
|
|
64
|
-
- **First Mound** — Phase 1 complete (first runnable)
|
|
65
|
-
- **Open Chambers** — Feature work underway (2+ phases complete)
|
|
66
|
-
- **Brood Stable** — Tests consistently green
|
|
67
|
-
- **Ventilated Nest** — Perf/latency acceptable (build + lint clean)
|
|
68
|
-
- **Sealed Chambers** — All phases complete (interfaces frozen)
|
|
69
|
-
- **Crowned Anthill** — Release-ready (user confirms via /ant:seal)
|
|
70
|
-
|
|
71
|
-
**If current milestone is "Crowned Anthill":**
|
|
72
|
-
```
|
|
73
|
-
Colony is already at Crowned Anthill milestone.
|
|
74
|
-
No further archiving needed.
|
|
75
|
-
|
|
76
|
-
Use /ant:status to view colony state.
|
|
77
|
-
```
|
|
78
|
-
Stop here.
|
|
79
|
-
|
|
80
|
-
**If current milestone is "Sealed Chambers":**
|
|
81
|
-
- Proceed to Step 4 (will upgrade to Crowned Anthill)
|
|
82
|
-
|
|
83
|
-
**If current milestone is "First Mound", "Open Chambers", "Brood Stable", "Ventilated Nest", or any intermediate milestone:**
|
|
84
|
-
- Since all phases are complete, the colony qualifies for both Sealed Chambers and Crowned Anthill
|
|
85
|
-
- The current logic allows proceeding to Step 4 (seal as Crowned Anthill)
|
|
86
|
-
- If user wants to explicitly achieve Sealed Chambers first, they can manually update milestone via COLONY_STATE.json
|
|
87
|
-
|
|
88
|
-
**If milestone is unrecognized (not in the 6 known stages):**
|
|
89
|
-
```
|
|
90
|
-
Unknown milestone: {milestone}
|
|
91
|
-
|
|
92
|
-
The milestone "{milestone}" is not recognized.
|
|
93
|
-
Known milestones: First Mound, Open Chambers, Brood Stable, Ventilated Nest, Sealed Chambers, Crowned Anthill
|
|
94
|
-
|
|
95
|
-
Run /ant:status to check colony state.
|
|
96
|
-
```
|
|
97
|
-
Stop here.
|
|
98
|
-
|
|
99
|
-
### Step 4: Archive Colony State
|
|
100
|
-
|
|
101
|
-
Create archive directory:
|
|
102
|
-
```
|
|
103
|
-
archive_dir=".aether/data/archive/session_$(date -u +%s)_archive"
|
|
104
|
-
mkdir -p "$archive_dir"
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Copy the following files to the archive directory:
|
|
108
|
-
1. `.aether/data/COLONY_STATE.json` → `$archive_dir/COLONY_STATE.json`
|
|
109
|
-
2. `.aether/data/activity.log` → `$archive_dir/activity.log`
|
|
110
|
-
3. `.aether/data/spawn-tree.txt` → `$archive_dir/spawn-tree.txt`
|
|
111
|
-
4. `.aether/data/flags.json` → `$archive_dir/flags.json` (if exists)
|
|
112
|
-
5. `.aether/data/constraints.json` → `$archive_dir/constraints.json` (if exists)
|
|
113
|
-
|
|
114
|
-
Create archive manifest file `$archive_dir/manifest.json`:
|
|
115
|
-
```json
|
|
116
|
-
{
|
|
117
|
-
"archived_at": "<ISO-8601 timestamp>",
|
|
118
|
-
"goal": "<colony goal>",
|
|
119
|
-
"total_phases": <number>,
|
|
120
|
-
"milestone": "Crowned Anthill",
|
|
121
|
-
"files": [
|
|
122
|
-
"COLONY_STATE.json",
|
|
123
|
-
"activity.log",
|
|
124
|
-
"spawn-tree.txt",
|
|
125
|
-
"flags.json",
|
|
126
|
-
"constraints.json"
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Step 4.5: Increment Colony Version
|
|
132
|
-
|
|
133
|
-
Before writing the Crowned Anthill milestone, increment `colony_version` in COLONY_STATE.json.
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
# Read current colony_version (default to 0 for backward compat with older colonies)
|
|
137
|
-
current_colony_version=$(jq -r '.colony_version // 0' .aether/data/COLONY_STATE.json 2>/dev/null || echo 0)
|
|
138
|
-
# Guard against non-integer values (floats, strings)
|
|
139
|
-
[[ "$current_colony_version" =~ ^[0-9]+$ ]] || current_colony_version=0
|
|
140
|
-
new_colony_version=$(( current_colony_version + 1 ))
|
|
141
|
-
|
|
142
|
-
# Write incremented value back — guard against empty output destroying the file
|
|
143
|
-
updated=$(jq --argjson v "$new_colony_version" '.colony_version = $v' .aether/data/COLONY_STATE.json 2>/dev/null)
|
|
144
|
-
if [[ -n "$updated" && ${#updated} -gt 10 ]]; then
|
|
145
|
-
echo "$updated" > .aether/data/COLONY_STATE.json
|
|
146
|
-
else
|
|
147
|
-
echo "Warning: jq update failed — colony_version defaults to 1, state file unchanged"
|
|
148
|
-
new_colony_version=1
|
|
149
|
-
fi
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Use `new_colony_version` as `{colony_version}` throughout the rest of the seal ceremony (e.g., display as "Crowned Anthill v{colony_version}").
|
|
153
|
-
|
|
154
|
-
**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.
|
|
155
|
-
|
|
156
|
-
### Step 5: Update Milestone to Crowned Anthill
|
|
157
|
-
|
|
158
|
-
Update COLONY_STATE.json:
|
|
159
|
-
1. Set `milestone` to `"Crowned Anthill"`
|
|
160
|
-
2. Set `milestone_updated_at` to current ISO-8601 timestamp
|
|
161
|
-
3. Append event: `"<timestamp>|milestone_reached|archive|Achieved Crowned Anthill milestone - colony archived"`
|
|
162
|
-
|
|
163
|
-
### Step 5.1: Update Changelog
|
|
164
|
-
|
|
165
|
-
**MANDATORY: Record the seal in the project changelog. This step is never skipped.**
|
|
166
|
-
|
|
167
|
-
If no `CHANGELOG.md` exists, `changelog-append` creates one automatically.
|
|
168
|
-
|
|
169
|
-
Build a summary of what the colony accomplished across all phases:
|
|
170
|
-
- Collect completed phase names from COLONY_STATE.json
|
|
171
|
-
- Summarize the goal and key outcomes in one line
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
bash .aether/aether-utils.sh changelog-append \
|
|
175
|
-
"$(date +%Y-%m-%d)" \
|
|
176
|
-
"seal-crowned-anthill" \
|
|
177
|
-
"00" \
|
|
178
|
-
"{key_files_csv}" \
|
|
179
|
-
"Colony sealed at Crowned Anthill;{goal}" \
|
|
180
|
-
"{phases_completed} phases completed;Colony wisdom promoted to QUEEN.md" \
|
|
181
|
-
""
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
- `{key_files_csv}` — list the most significant files created or modified across the colony's lifetime (derive from phase plans or git log)
|
|
185
|
-
- `{goal}` — the colony goal from COLONY_STATE.json
|
|
186
|
-
|
|
187
|
-
**Error handling:** If `changelog-append` fails, log to midden and continue — changelog failure never blocks sealing.
|
|
188
|
-
|
|
189
|
-
### Step 5.2: Update Registry (Silent)
|
|
190
|
-
|
|
191
|
-
Mark the colony as inactive in the global registry. This is silent on failure — registry is not required for the colony to work.
|
|
192
|
-
|
|
193
|
-
Run using the Bash tool (ignore errors):
|
|
194
|
-
```bash
|
|
195
|
-
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
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
If the command fails, proceed silently. This is optional bookkeeping.
|
|
199
|
-
|
|
200
|
-
### Step 5.25: Hive Promotion (NON-BLOCKING)
|
|
201
|
-
|
|
202
|
-
After wisdom promotion, promote abstracted instincts to the cross-colony hive.
|
|
203
|
-
|
|
204
|
-
**Extract high-confidence instincts for hive promotion:**
|
|
205
|
-
```bash
|
|
206
|
-
# Get instincts with confidence >= 0.8
|
|
207
|
-
high_conf_instincts=$(jq -r '.memory.instincts[] | select(.confidence >= 0.8) | @base64' .aether/data/COLONY_STATE.json 2>/dev/null || echo "")
|
|
208
|
-
|
|
209
|
-
# Derive source repo name from current directory
|
|
210
|
-
source_repo="$(pwd)"
|
|
211
|
-
|
|
212
|
-
# Read domain tags from registry (NOT from instinct.domain which is a category, not a repo domain)
|
|
213
|
-
repo_domain_tags=$(jq -r --arg repo "$(pwd)" \
|
|
214
|
-
'[.repos[] | select(.path == $repo) | .domain_tags // []] | .[0] // [] | join(",")' \
|
|
215
|
-
"$HOME/.aether/registry.json" 2>/dev/null || echo "")
|
|
216
|
-
|
|
217
|
-
hive_promoted_count=0
|
|
218
|
-
hive_errors=0
|
|
219
|
-
for encoded in $high_conf_instincts; do
|
|
220
|
-
[[ -z "$encoded" ]] && continue
|
|
221
|
-
|
|
222
|
-
# Extract trigger and action fields from the instinct object
|
|
223
|
-
trigger=$(echo "$encoded" | base64 -d | jq -r '.trigger // empty')
|
|
224
|
-
action=$(echo "$encoded" | base64 -d | jq -r '.action // empty')
|
|
225
|
-
confidence=$(echo "$encoded" | base64 -d | jq -r '.confidence // 0.7')
|
|
226
|
-
|
|
227
|
-
[[ -z "$trigger" || -z "$action" ]] && continue
|
|
228
|
-
|
|
229
|
-
# Strip leading "When " or "when " from trigger to avoid "When When..." stutter
|
|
230
|
-
trigger_clean=$(echo "$trigger" | sed 's/^[Ww]hen //')
|
|
231
|
-
|
|
232
|
-
# Build the promotion text in "When {trigger}: {action}" format
|
|
233
|
-
promote_text="When ${trigger_clean}: ${action}"
|
|
234
|
-
|
|
235
|
-
# Build hive-promote args with --text and --source-repo (required)
|
|
236
|
-
promote_args=(hive-promote --text "$promote_text" --source-repo "$source_repo" --confidence "$confidence")
|
|
237
|
-
[[ -n "$repo_domain_tags" ]] && promote_args+=(--domain "$repo_domain_tags")
|
|
238
|
-
|
|
239
|
-
# Call hive-promote which orchestrates abstract + store
|
|
240
|
-
result=$(bash .aether/aether-utils.sh "${promote_args[@]}" 2>/dev/null || echo '{}')
|
|
241
|
-
was_promoted=$(echo "$result" | jq -r '.result.action // "skipped"' 2>/dev/null || echo "skipped")
|
|
242
|
-
|
|
243
|
-
if [[ "$was_promoted" == "promoted" || "$was_promoted" == "merged" ]]; then
|
|
244
|
-
hive_promoted_count=$((hive_promoted_count + 1))
|
|
245
|
-
fi
|
|
246
|
-
done
|
|
247
|
-
|
|
248
|
-
if [[ "$hive_promoted_count" -gt 0 ]]; then
|
|
249
|
-
echo "Hive promotion: $hive_promoted_count instinct(s) promoted to cross-colony hive"
|
|
250
|
-
fi
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
**Continue to Step 5.5 (non-blocking):**
|
|
254
|
-
Proceed to Step 5.5 regardless of hive promotion results — hive promotion is strictly non-blocking.
|
|
255
|
-
|
|
256
|
-
### Step 5.5: Write Final Handoff
|
|
257
|
-
|
|
258
|
-
After archiving, write the final handoff documenting the completed colony:
|
|
259
|
-
|
|
260
|
-
Resolve the handoff template path:
|
|
261
|
-
Check ~/.aether/system/templates/handoff.template.md first,
|
|
262
|
-
then .aether/templates/handoff.template.md.
|
|
263
|
-
|
|
264
|
-
If no template found: output "Template missing: handoff.template.md. Run aether update to fix." and stop.
|
|
265
|
-
|
|
266
|
-
Read the template file. Fill all {{PLACEHOLDER}} values:
|
|
267
|
-
- {{CHAMBER_NAME}} → archive directory name
|
|
268
|
-
- {{GOAL}} → goal
|
|
269
|
-
- {{PHASES_COMPLETED}} → total_phases (OpenCode seal archives completed colonies)
|
|
270
|
-
- {{TOTAL_PHASES}} → total_phases
|
|
271
|
-
- {{MILESTONE}} → "Crowned Anthill"
|
|
272
|
-
- {{ENTOMB_TIMESTAMP}} → seal timestamp
|
|
273
|
-
|
|
274
|
-
Remove the HTML comment lines at the top of the template.
|
|
275
|
-
Write the result to .aether/HANDOFF.md using the Write tool.
|
|
276
|
-
|
|
277
|
-
This handoff serves as the final record of the completed colony.
|
|
278
|
-
|
|
279
|
-
### Step 5.75: Export XML Archive (best-effort)
|
|
280
|
-
|
|
281
|
-
Export colony data as a combined XML archive and a standalone pheromones.xml. Both are best-effort — seal proceeds even if XML export fails.
|
|
282
|
-
|
|
283
|
-
```bash
|
|
284
|
-
# Check if xmllint is available
|
|
285
|
-
if command -v xmllint >/dev/null 2>&1; then
|
|
286
|
-
xml_result=$(bash .aether/aether-utils.sh colony-archive-xml ".aether/exchange/colony-archive.xml" 2>&1)
|
|
287
|
-
xml_ok=$(echo "$xml_result" | jq -r '.ok // false' 2>/dev/null)
|
|
288
|
-
if [[ "$xml_ok" == "true" ]]; then
|
|
289
|
-
xml_pheromone_count=$(echo "$xml_result" | jq -r '.result.pheromone_count // 0' 2>/dev/null)
|
|
290
|
-
xml_export_line="XML Archive: colony-archive.xml (${xml_pheromone_count} active signals)"
|
|
291
|
-
else
|
|
292
|
-
xml_export_line="XML Archive: export failed (non-blocking)"
|
|
293
|
-
fi
|
|
294
|
-
|
|
295
|
-
# Also export standalone pheromones.xml for cross-colony sharing
|
|
296
|
-
pher_result=$(bash .aether/aether-utils.sh pheromone-export-xml ".aether/exchange/pheromones.xml" 2>&1)
|
|
297
|
-
pher_ok=$(echo "$pher_result" | jq -r '.ok // false' 2>/dev/null)
|
|
298
|
-
if [[ "$pher_ok" == "true" ]]; then
|
|
299
|
-
pher_signal_count=$(jq '[.signals[] | select(.active != false)] | length' .aether/data/pheromones.json 2>/dev/null || echo "0")
|
|
300
|
-
pher_export_line="Signal Export: pheromones.xml (${pher_signal_count} signals, importable by other colonies)"
|
|
301
|
-
else
|
|
302
|
-
pher_export_line="Signal Export: failed (non-blocking)"
|
|
303
|
-
fi
|
|
304
|
-
|
|
305
|
-
# Export standalone queen-wisdom.xml for cross-colony wisdom sharing
|
|
306
|
-
wisdom_result=$(bash .aether/aether-utils.sh wisdom-export-xml ".aether/exchange/queen-wisdom.xml" 2>&1)
|
|
307
|
-
wisdom_ok=$(echo "$wisdom_result" | jq -r '.ok // false' 2>/dev/null)
|
|
308
|
-
if [[ "$wisdom_ok" == "true" ]]; then
|
|
309
|
-
wisdom_count=$(echo "$wisdom_result" | jq -r '.result.entries // 0' 2>/dev/null)
|
|
310
|
-
wisdom_export_line="Wisdom Export: queen-wisdom.xml (${wisdom_count} entries)"
|
|
311
|
-
else
|
|
312
|
-
wisdom_export_line="Wisdom Export: failed (non-blocking)"
|
|
313
|
-
fi
|
|
314
|
-
|
|
315
|
-
# Export standalone colony-registry.xml for lineage tracking
|
|
316
|
-
registry_result=$(bash .aether/aether-utils.sh registry-export-xml ".aether/exchange/colony-registry.xml" 2>&1)
|
|
317
|
-
registry_ok=$(echo "$registry_result" | jq -r '.ok // false' 2>/dev/null)
|
|
318
|
-
if [[ "$registry_ok" == "true" ]]; then
|
|
319
|
-
registry_count=$(echo "$registry_result" | jq -r '.result.colonies // 0' 2>/dev/null)
|
|
320
|
-
registry_export_line="Registry Export: colony-registry.xml (${registry_count} colonies)"
|
|
321
|
-
else
|
|
322
|
-
registry_export_line="Registry Export: failed (non-blocking)"
|
|
323
|
-
fi
|
|
324
|
-
else
|
|
325
|
-
xml_export_line="XML Archive: skipped (xmllint not available)"
|
|
326
|
-
pher_export_line="Signal Export: skipped (xmllint not available)"
|
|
327
|
-
wisdom_export_line="Wisdom Export: skipped (xmllint not available)"
|
|
328
|
-
registry_export_line="Registry Export: skipped (xmllint not available)"
|
|
329
|
-
fi
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
### Step 6: Display Result
|
|
333
|
-
|
|
334
|
-
Output:
|
|
335
|
-
```
|
|
336
|
-
🏺 ════════════════════════════════════════════════════
|
|
337
|
-
C R O W N E D A N T H I L L v{colony_version}
|
|
338
|
-
══════════════════════════════════════════════════ 🏺
|
|
339
|
-
|
|
340
|
-
✅ Colony archived successfully!
|
|
341
|
-
|
|
342
|
-
👑 Goal: {goal (truncated to 60 chars)}
|
|
343
|
-
📍 Phases: {total_phases} completed
|
|
344
|
-
🏆 Milestone: Crowned Anthill v{colony_version}
|
|
345
|
-
|
|
346
|
-
📦 Archive Location: {archive_dir}
|
|
347
|
-
- COLONY_STATE.json
|
|
348
|
-
- activity.log
|
|
349
|
-
- spawn-tree.txt
|
|
350
|
-
- flags.json (if existed)
|
|
351
|
-
- constraints.json (if existed)
|
|
352
|
-
{xml_export_line}
|
|
353
|
-
{pher_export_line}
|
|
354
|
-
{wisdom_export_line}
|
|
355
|
-
{registry_export_line}
|
|
356
|
-
|
|
357
|
-
🐜 The colony has reached its final form.
|
|
358
|
-
The anthill stands crowned and sealed.
|
|
359
|
-
History is preserved. The colony rests.
|
|
360
|
-
|
|
361
|
-
💾 State persisted — safe to /clear
|
|
362
|
-
|
|
363
|
-
🐜 What would you like to do next?
|
|
364
|
-
1. /ant:lay-eggs "<new goal>" — Start a new colony
|
|
365
|
-
2. /ant:tunnels — Browse archived colonies
|
|
366
|
-
3. /clear — Clear context and continue
|
|
367
|
-
|
|
368
|
-
Use AskUserQuestion with these three options.
|
|
369
|
-
|
|
370
|
-
If option 1 selected: proceed to run /ant:lay-eggs flow
|
|
371
|
-
If option 2 selected: run /ant:tunnels
|
|
372
|
-
If option 3 selected: display "Run /ant:lay-eggs to begin anew after clearing"
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
### Step 6.5: Commit Suggestion (Non-blocking)
|
|
376
|
-
|
|
377
|
-
After the ceremony, offer to commit all colony work.
|
|
378
|
-
|
|
379
|
-
**Gate check — skip silently if any fail:**
|
|
380
|
-
1. Not a git repo: `git rev-parse --git-dir 2>/dev/null` fails -> skip
|
|
381
|
-
2. Clean working tree: `git status --porcelain 2>/dev/null` is empty -> skip to Step 6.6
|
|
382
|
-
|
|
383
|
-
**If uncommitted changes exist:**
|
|
384
|
-
|
|
385
|
-
Generate a seal commit message:
|
|
386
|
-
```bash
|
|
387
|
-
seal_commit=$(bash .aether/aether-utils.sh generate-commit-message seal "$phases_completed" "$goal" "$colony_age_days" 2>/dev/null)
|
|
388
|
-
seal_message=$(echo "$seal_commit" | jq -r '.result.message // "aether-seal: colony sealed"')
|
|
389
|
-
seal_body=$(echo "$seal_commit" | jq -r '.result.body // ""')
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
Display the suggestion:
|
|
393
|
-
```
|
|
394
|
-
Commit suggestion:
|
|
395
|
-
$seal_message
|
|
396
|
-
$seal_body
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
Prompt with AskUserQuestion (3 options):
|
|
400
|
-
1. **Commit with this message** — Run `git add -A && git commit -m "$seal_message" -m "$seal_body"`
|
|
401
|
-
2. **Edit message** — Ask user for their preferred message, then commit with that
|
|
402
|
-
3. **Skip** — Do not commit
|
|
403
|
-
|
|
404
|
-
If the user chooses option 1 or 2 and the commit succeeds, set `seal_committed = true`.
|
|
405
|
-
If the commit fails or user skips, set `seal_committed = false`.
|
|
406
|
-
|
|
407
|
-
**Error handling:** If `generate-commit-message` fails, fall back to message `"aether-seal: colony sealed"`. Never let commit suggestion failures stop the seal flow.
|
|
408
|
-
|
|
409
|
-
### Step 6.6: Push Suggestion (Non-blocking)
|
|
410
|
-
|
|
411
|
-
Only show if a commit was just made in Step 6.5 (`seal_committed == true`) OR if there are unpushed commits.
|
|
412
|
-
|
|
413
|
-
**Gate check — skip silently if any fail:**
|
|
414
|
-
1. Not a git repo -> skip
|
|
415
|
-
2. No remote configured: `git remote -v 2>/dev/null` is empty -> skip
|
|
416
|
-
|
|
417
|
-
**Check for unpushed commits:**
|
|
418
|
-
```bash
|
|
419
|
-
unpushed=$(git log --oneline @{u}..HEAD 2>/dev/null | wc -l | tr -d ' ')
|
|
420
|
-
```
|
|
421
|
-
If `unpushed == 0` and `seal_committed == false` -> skip
|
|
422
|
-
|
|
423
|
-
**If there are commits to push:**
|
|
424
|
-
|
|
425
|
-
Detect current branch and upstream status:
|
|
426
|
-
```bash
|
|
427
|
-
current_branch=$(git branch --show-current)
|
|
428
|
-
has_upstream=$(git rev-parse --abbrev-ref @{u} 2>/dev/null && echo "yes" || echo "no")
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
Display: `Push {unpushed} commit(s) to remote? Branch: {current_branch}`
|
|
432
|
-
|
|
433
|
-
Prompt with AskUserQuestion (2 options):
|
|
434
|
-
1. **Push now** — If upstream exists: `git push`. If no upstream: `git push -u origin $current_branch`
|
|
435
|
-
2. **I'll push later** — Skip
|
|
436
|
-
|
|
437
|
-
Display result on success or skip.
|
|
438
|
-
|
|
439
|
-
**Error handling:** If push fails, display the error but do not stop the seal flow.
|
|
440
|
-
|
|
441
|
-
**Safety:** Never auto-push. Always require explicit user approval.
|
|
442
|
-
|
|
443
|
-
### Edge Cases
|
|
444
|
-
|
|
445
|
-
**If milestone is already "Sealed Chambers" but phases are complete:**
|
|
446
|
-
- Proceed with archiving and upgrade to Crowned Anthill
|
|
447
|
-
|
|
448
|
-
**If any archive files are missing:**
|
|
449
|
-
- Archive what exists, note in manifest which files were missing
|
|
450
|
-
|
|
451
|
-
**If archive directory already exists:**
|
|
452
|
-
- Append timestamp to make unique: `session_<ts>_archive_<random>`
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<!-- Generated from .aether/commands/skill-create.yaml - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
---
|
|
3
|
-
name: ant:skill-create
|
|
4
|
-
description: "Create a custom domain skill using Oracle mini-research and a guided wizard"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
### Step -1: Normalize Arguments
|
|
8
|
-
|
|
9
|
-
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
10
|
-
|
|
11
|
-
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
12
|
-
|
|
13
|
-
You are the **Builder**. Create a custom domain skill by researching best practices and guiding the user through a wizard.
|
|
14
|
-
|
|
15
|
-
## Instructions
|
|
16
|
-
|
|
17
|
-
### Step 0: Parse Arguments
|
|
18
|
-
|
|
19
|
-
If `$normalized_args` is empty:
|
|
20
|
-
```
|
|
21
|
-
Usage: /ant:skill-create "<topic>"
|
|
22
|
-
|
|
23
|
-
Creates a custom domain skill using Oracle mini-research.
|
|
24
|
-
|
|
25
|
-
Examples:
|
|
26
|
-
/ant:skill-create "tailwind"
|
|
27
|
-
/ant:skill-create "react native"
|
|
28
|
-
/ant:skill-create "kubernetes"
|
|
29
|
-
```
|
|
30
|
-
Stop here.
|
|
31
|
-
|
|
32
|
-
### Step 1: Oracle Mini-Research
|
|
33
|
-
|
|
34
|
-
Launch a focused research session on the topic (5 iterations max):
|
|
35
|
-
1. Web search for best practices, common patterns, and gotchas
|
|
36
|
-
2. Codebase scan for existing usage of the technology
|
|
37
|
-
3. Compile findings into structured notes
|
|
38
|
-
|
|
39
|
-
### Step 2: Wizard Questions
|
|
40
|
-
|
|
41
|
-
Ask the user:
|
|
42
|
-
1. What aspect to focus on? (provide 2-4 options based on findings)
|
|
43
|
-
2. Experience level? (beginner / intermediate / advanced)
|
|
44
|
-
3. Any specific rules or constraints? (free text)
|
|
45
|
-
|
|
46
|
-
### Step 3: Generate SKILL.md
|
|
47
|
-
|
|
48
|
-
Create the skill file with proper frontmatter and body:
|
|
49
|
-
- name: derived from topic
|
|
50
|
-
- description: "Use when working with {topic}"
|
|
51
|
-
- type: domain
|
|
52
|
-
- domains: inferred from research
|
|
53
|
-
- agent_roles: [builder]
|
|
54
|
-
- detect_files / detect_packages: inferred from research
|
|
55
|
-
- Body: practical best-practices guide from research + wizard answers
|
|
56
|
-
|
|
57
|
-
### Step 4: Write and Verify
|
|
58
|
-
|
|
59
|
-
1. Write to `~/.aether/skills/domain/{name}/SKILL.md`
|
|
60
|
-
2. Run: `bash .aether/aether-utils.sh skill-parse-frontmatter ~/.aether/skills/domain/{name}/SKILL.md`
|
|
61
|
-
3. Run: `bash .aether/aether-utils.sh skill-cache-rebuild`
|
|
62
|
-
4. Show the generated skill to the user
|
|
63
|
-
5. Ask if they want to adjust anything
|