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,71 +0,0 @@
|
|
|
1
|
-
<!-- Generated from .aether/commands/import-signals.yaml - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
---
|
|
3
|
-
name: ant:import-signals
|
|
4
|
-
description: "Import pheromone signals from another colony's XML export"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are the **Queen**. Import pheromone signals from another colony's XML export.
|
|
8
|
-
|
|
9
|
-
## Instructions
|
|
10
|
-
|
|
11
|
-
The arguments are: `$ARGUMENTS`
|
|
12
|
-
|
|
13
|
-
### Step 1: Validate
|
|
14
|
-
|
|
15
|
-
Read `.aether/data/COLONY_STATE.json`.
|
|
16
|
-
If file missing or `goal: null` -> "No colony initialized. Run /ant:init first.", stop.
|
|
17
|
-
|
|
18
|
-
Parse `$ARGUMENTS`:
|
|
19
|
-
- First argument: path to XML file (required).
|
|
20
|
-
- Second argument: colony name/prefix (optional; default: derive from XML filename without extension, or use "imported").
|
|
21
|
-
|
|
22
|
-
If no arguments provided, show usage and stop:
|
|
23
|
-
```
|
|
24
|
-
Usage: /ant:import-signals <path-to-signals.xml> [colony-name]
|
|
25
|
-
|
|
26
|
-
<path-to-signals.xml> Path to an exported pheromone XML file
|
|
27
|
-
[colony-name] Optional prefix for imported signal IDs (prevents collisions)
|
|
28
|
-
|
|
29
|
-
Example:
|
|
30
|
-
/ant:import-signals .aether/exchange/pheromones.xml partner-colony
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Verify the XML file exists. If not -> "File not found: <path>", stop.
|
|
34
|
-
|
|
35
|
-
### Step 2: Import
|
|
36
|
-
|
|
37
|
-
Run using the Bash tool with description "Importing pheromone signals from XML...":
|
|
38
|
-
```bash
|
|
39
|
-
bash .aether/aether-utils.sh pheromone-import-xml "<xml_path>" "<colony_prefix>"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Parse the returned JSON:
|
|
43
|
-
- If `.ok` is `true`: extract `.result.signal_count` and `.result.source`.
|
|
44
|
-
- If `.ok` is `false`: check `.error` for details. If error mentions `xmllint` or `E_FEATURE_UNAVAILABLE`, display: "XML import requires xmllint. Install with: xcode-select --install (macOS) or apt-get install libxml2-utils (Linux)." Otherwise display the error message and stop.
|
|
45
|
-
|
|
46
|
-
### Step 3: Confirm
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Output (4-5 lines, no banners):
|
|
50
|
-
```
|
|
51
|
-
Pheromone signals imported
|
|
52
|
-
Source: <xml_path>
|
|
53
|
-
Signals imported: <signal_count>
|
|
54
|
-
Colony prefix: <colony_prefix>
|
|
55
|
-
|
|
56
|
-
Note: On signal ID collision, current colony signals take priority.
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### Step 4: Next Up
|
|
63
|
-
|
|
64
|
-
Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
|
|
65
|
-
```bash
|
|
66
|
-
state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
|
|
67
|
-
current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
|
|
68
|
-
total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
|
|
69
|
-
bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
|
|
70
|
-
```
|
|
71
|
-
|
|
@@ -1,505 +0,0 @@
|
|
|
1
|
-
<!-- Generated from .aether/commands/init.yaml - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
---
|
|
3
|
-
name: ant:init
|
|
4
|
-
description: "Initialize Aether colony - scan repo, approve charter, create colony"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are the **Queen Ant Colony**. Initialize the colony with the Queen's intention.
|
|
8
|
-
|
|
9
|
-
## Instructions
|
|
10
|
-
|
|
11
|
-
The user's goal is: `$ARGUMENTS`
|
|
12
|
-
|
|
13
|
-
Parse `$ARGUMENTS`:
|
|
14
|
-
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
15
|
-
- Otherwise: set `visual_mode = true`
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<failure_modes>
|
|
20
|
-
### Colony State Overwrite
|
|
21
|
-
Re-init mode detects existing COLONY_STATE.json and preserves all state. Charter content is updated in-place via charter-write. Colony state, wisdom, instincts, learnings, pheromones, and phase progress are never reset.
|
|
22
|
-
|
|
23
|
-
### Write Failure Mid-Init
|
|
24
|
-
If writing COLONY_STATE.json fails partway:
|
|
25
|
-
- Remove the incomplete file (partial state is worse than no state)
|
|
26
|
-
- Report the error
|
|
27
|
-
- Recovery: user can run /ant:init again safely
|
|
28
|
-
</failure_modes>
|
|
29
|
-
|
|
30
|
-
<success_criteria>
|
|
31
|
-
Command is complete when:
|
|
32
|
-
- User has approved the charter prompt (Charter, Context, Pheromones sections)
|
|
33
|
-
- Charter content is written to QUEEN.md via charter-write
|
|
34
|
-
- COLONY_STATE.json exists and is valid JSON (fresh init only)
|
|
35
|
-
- Session file is written
|
|
36
|
-
- User sees confirmation of colony creation or re-init
|
|
37
|
-
</success_criteria>
|
|
38
|
-
|
|
39
|
-
<read_only>
|
|
40
|
-
Do not touch during init:
|
|
41
|
-
- .aether/dreams/ (user notes)
|
|
42
|
-
- .aether/chambers/ (archived colonies)
|
|
43
|
-
- .env* files
|
|
44
|
-
- .github/workflows/
|
|
45
|
-
</read_only>
|
|
46
|
-
|
|
47
|
-
### Step 1: Validate Input
|
|
48
|
-
|
|
49
|
-
If `$ARGUMENTS` is empty or blank, output:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
Aether Colony
|
|
53
|
-
|
|
54
|
-
Initialize the colony with a goal. This scans the repo, generates
|
|
55
|
-
a charter for your approval, then creates colony files.
|
|
56
|
-
|
|
57
|
-
Usage: /ant:init "<your goal here>"
|
|
58
|
-
|
|
59
|
-
Examples:
|
|
60
|
-
/ant:init "Build a REST API with authentication"
|
|
61
|
-
/ant:init "Create a soothing sound application"
|
|
62
|
-
/ant:init "Design a calculator CLI tool"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Stop here. Do not proceed.
|
|
66
|
-
|
|
67
|
-
### Step 1.5: Verify Aether Setup
|
|
68
|
-
|
|
69
|
-
Check if `.aether/aether-utils.sh` exists using the Read tool.
|
|
70
|
-
|
|
71
|
-
**If the file already exists** -- skip this step entirely. Aether is set up.
|
|
72
|
-
|
|
73
|
-
**If the file does NOT exist:**
|
|
74
|
-
```
|
|
75
|
-
Aether is not set up in this repo yet.
|
|
76
|
-
|
|
77
|
-
Run /ant:lay-eggs first to create the .aether/ directory
|
|
78
|
-
with all system files, then run /ant:init "your goal" to
|
|
79
|
-
start a colony.
|
|
80
|
-
|
|
81
|
-
If the global hub isn't installed either:
|
|
82
|
-
npm install -g aether-colony (installs the hub)
|
|
83
|
-
/ant:lay-eggs (sets up this repo)
|
|
84
|
-
/ant:init "your goal" (starts the colony)
|
|
85
|
-
```
|
|
86
|
-
Stop here. Do not proceed.
|
|
87
|
-
|
|
88
|
-
### Step 2: Initialize QUEEN.md
|
|
89
|
-
|
|
90
|
-
Run using the Bash tool with description "Initializing QUEEN.md...":
|
|
91
|
-
```
|
|
92
|
-
bash .aether/aether-utils.sh queen-init
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Parse the JSON result:
|
|
96
|
-
- If `created` is true: Display `QUEEN.md initialized`
|
|
97
|
-
- If `created` is false and `reason` is "already_exists": Display `QUEEN.md already exists`
|
|
98
|
-
|
|
99
|
-
This step is non-blocking -- proceed regardless of outcome.
|
|
100
|
-
|
|
101
|
-
### Step 3: Scan Repository
|
|
102
|
-
|
|
103
|
-
Run the scan via Bash tool:
|
|
104
|
-
```bash
|
|
105
|
-
scan_result=$(bash .aether/aether-utils.sh init-research 2>/dev/null)
|
|
106
|
-
scan_data=$(echo "$scan_result" | jq '.result')
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Extract fields with jq defaults for missing data:
|
|
110
|
-
- `tech_langs`: `.tech_stack.languages | if length > 0 then join(", ") else "not detected" end`
|
|
111
|
-
- `tech_fwks`: `.tech_stack.frameworks | if length > 0 then join(", ") else "none" end`
|
|
112
|
-
- `tech_pkg`: `.tech_stack.package_managers | join(", ")`
|
|
113
|
-
- `complexity`: `.complexity.size`
|
|
114
|
-
- `file_count`: `.complexity.metrics.file_count`
|
|
115
|
-
- `top_dirs`: `.directory_structure.top_level_dirs | if . and length > 0 then join(", ") else "flat" end`
|
|
116
|
-
- `commit_count`: `.git_history.commit_count // "unknown"`
|
|
117
|
-
- `is_git`: `.git_history.is_git_repo // false`
|
|
118
|
-
- `survey_suggestion`: `.survey_status.suggestion.reason // empty`
|
|
119
|
-
- `has_active`: `.prior_colonies.has_active_colony // false`
|
|
120
|
-
- `active_goal`: `.prior_colonies.active_goal // empty`
|
|
121
|
-
|
|
122
|
-
**Intelligence fields (new):**
|
|
123
|
-
- `colony_context_colonies`: `.colony_context.prior_colonies // []` -- array of prior colony summaries (each has goal, phases, outcome, summary)
|
|
124
|
-
- `colony_context_charter`: `.colony_context.existing_charter // {}` -- existing charter content from QUEEN.md
|
|
125
|
-
- `governance_rules`: `.governance.rules // []` -- array of governance rule objects (each has rule, source, strength)
|
|
126
|
-
- `pheromone_suggestions`: `.pheromone_suggestions // []` -- array of suggestion objects (each has type, content, reason, priority)
|
|
127
|
-
|
|
128
|
-
If `scan_result` is empty or `jq` fails, set all fields to fallback values (empty arrays/objects for intelligence fields) and proceed (graceful degradation -- never stop init because scan fails).
|
|
129
|
-
|
|
130
|
-
### Step 4: Detect Re-Init Mode
|
|
131
|
-
|
|
132
|
-
Use Read tool to check `.aether/data/COLONY_STATE.json`.
|
|
133
|
-
|
|
134
|
-
- If file exists AND has a non-null `goal` field:
|
|
135
|
-
- Check the `milestone` field. If `milestone == "Crowned Anthill"`:
|
|
136
|
-
- This is a **sealed colony**. Treat as **fresh init**, NOT re-init.
|
|
137
|
-
- Set `reinit_mode = false`
|
|
138
|
-
- Display: `Previous colony was sealed. Starting fresh colony.`
|
|
139
|
-
- The old COLONY_STATE.json will be overwritten in Step 7 (fresh init path).
|
|
140
|
-
- Otherwise (colony exists but is NOT sealed): set `reinit_mode = true`, store `existing_goal`
|
|
141
|
-
- If file does not exist or `goal` is null: set `reinit_mode = false`
|
|
142
|
-
|
|
143
|
-
If re-init mode, read existing charter entries from `.aether/QUEEN.md`:
|
|
144
|
-
```bash
|
|
145
|
-
existing_intent=$(grep '\[charter\] \*\*Intent\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Intent\*\*: //' | sed 's/ (Colony:.*//' || true)
|
|
146
|
-
existing_vision=$(grep '\[charter\] \*\*Vision\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Vision\*\*: //' | sed 's/ (Colony:.*//' || true)
|
|
147
|
-
existing_governance=$(grep '\[charter\] \*\*Governance\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Governance\*\*: //' | sed 's/ (Colony:.*//' || true)
|
|
148
|
-
existing_goals=$(grep '\[charter\] \*\*Goal\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Goal\*\*: //' | sed 's/ (Colony:.*//' || true)
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Strip `(Colony: ...)` suffixes using sed. If grep finds nothing, variables remain empty.
|
|
152
|
-
|
|
153
|
-
### Step 5: Assemble and Display Approval Prompt
|
|
154
|
-
|
|
155
|
-
Display a brief header:
|
|
156
|
-
```
|
|
157
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
158
|
-
A E T H E R C O L O N Y I N I T
|
|
159
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
If re-init mode, display:
|
|
163
|
-
```
|
|
164
|
-
Re-init mode detected (existing goal: "{existing_goal}")
|
|
165
|
-
Charter will be updated. All colony state, wisdom, instincts, and progress will be preserved.
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Then display the approval prompt as formatted Markdown. Section ordering: Prior Context (if any) -> Charter -> Context -> Pheromones.
|
|
169
|
-
|
|
170
|
-
**Section 1: Prior Context (conditional -- only when prior colonies exist)**
|
|
171
|
-
|
|
172
|
-
If `colony_context_colonies` has entries (length > 0), display:
|
|
173
|
-
```markdown
|
|
174
|
-
## Prior Context
|
|
175
|
-
|
|
176
|
-
Previous colonies in this repo:
|
|
177
|
-
|
|
178
|
-
{For each colony (max 3, most recent first):}
|
|
179
|
-
- **{goal}** -- {outcome} ({phases} phases){if summary is non-empty: ". {summary}"}
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Per locked decision: when no prior colonies exist, omit this section entirely. No placeholder, no header.
|
|
183
|
-
|
|
184
|
-
Keep each colony to 1-2 lines. Show goal, outcome (milestone), phase count, and summary from CROWNED-ANTHILL.md if available.
|
|
185
|
-
|
|
186
|
-
**Section 2: Charter**
|
|
187
|
-
```markdown
|
|
188
|
-
## Charter
|
|
189
|
-
|
|
190
|
-
**Intent:** {user's goal from $ARGUMENTS, or existing_intent if re-init}
|
|
191
|
-
**Vision:** {derived from user's goal by Claude, or existing_vision if re-init}
|
|
192
|
-
**Governance:** {see governance logic below}
|
|
193
|
-
**Goals:** {blank for fresh init, or existing_goals if re-init}
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
For fresh init, Claude should derive a brief Vision from the user's goal (1-2 sentences). Goals start blank. The user fills them in if desired.
|
|
197
|
-
|
|
198
|
-
**Governance field logic:**
|
|
199
|
-
- For fresh init with `governance_rules` available (length > 0): pre-populate with semicolon-separated rule text from the detected rules. Format: `"TDD required; ESLint enforced; Follow CONTRIBUTING.md"`. These are editable by the user.
|
|
200
|
-
- For fresh init with no governance_rules: leave blank.
|
|
201
|
-
- For re-init with existing_governance non-empty: pre-populate from existing QUEEN.md charter entries.
|
|
202
|
-
- For re-init with existing_governance empty but governance_rules available: pre-populate from governance_rules.
|
|
203
|
-
|
|
204
|
-
For re-init, pre-populate Intent, Vision, and Goals from existing QUEEN.md charter entries.
|
|
205
|
-
|
|
206
|
-
**Section 3: Context**
|
|
207
|
-
```markdown
|
|
208
|
-
## Context
|
|
209
|
-
|
|
210
|
-
**Tech Stack:** {tech_langs} | {tech_fwks} | {tech_pkg}
|
|
211
|
-
**Project Size:** {complexity} ({file_count} files)
|
|
212
|
-
**Structure:** {top_dirs}
|
|
213
|
-
**Git:** {commit_count} commits
|
|
214
|
-
{if survey_suggestion: **Note:** {survey_suggestion}}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
**Section 4: Pheromones**
|
|
218
|
-
|
|
219
|
-
If `pheromone_suggestions` has entries (length > 0), display:
|
|
220
|
-
```markdown
|
|
221
|
-
## Pheromones
|
|
222
|
-
|
|
223
|
-
Suggested signals based on repo analysis:
|
|
224
|
-
|
|
225
|
-
1. [FOCUS] Testing infrastructure present (47 test files) -- maintain TDD discipline
|
|
226
|
-
2. [REDIRECT] Environment files detected -- never commit secrets or .env files
|
|
227
|
-
3. [FOCUS] Code quality tools configured -- follow existing lint/format rules
|
|
228
|
-
|
|
229
|
-
Edit, remove, or add signals as needed. Approved signals will be auto-applied.
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
The numbered list uses the actual type and content from `pheromone_suggestions`. Each line format: `{N}. [{type}] {content}`.
|
|
233
|
-
|
|
234
|
-
Per locked decision: suggestions are fully editable. User can reword, remove, or add their own.
|
|
235
|
-
Per locked decision: all sections look the same -- no visual distinction between auto-generated and user-written content.
|
|
236
|
-
|
|
237
|
-
If no pheromone suggestions available (empty array), display the existing default:
|
|
238
|
-
```markdown
|
|
239
|
-
## Pheromones
|
|
240
|
-
|
|
241
|
-
No pheromone suggestions yet -- use /ant:focus and /ant:redirect to guide the colony.
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
End with clear instructions:
|
|
245
|
-
```
|
|
246
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
247
|
-
Review the prompt above. You can:
|
|
248
|
-
- Edit any section (just describe your changes)
|
|
249
|
-
- Say "approve" or "looks good" to proceed
|
|
250
|
-
- Say "cancel" to abort
|
|
251
|
-
|
|
252
|
-
If you don't respond, the colony will not be initialized.
|
|
253
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
**STOP HERE.** Wait for the user's response. Do NOT proceed to Step 6 until the user responds.
|
|
257
|
-
|
|
258
|
-
### Step 6: Handle User Response
|
|
259
|
-
|
|
260
|
-
Parse the user's response:
|
|
261
|
-
- If the user approves (says "approve", "looks good", "yes", "ok", or similar): proceed to Step 7
|
|
262
|
-
- If the user provides edits: apply the edits to the relevant section(s), re-display the full prompt, increment a revision counter, and wait again
|
|
263
|
-
- If the user cancels: display "Colony initialization cancelled." and stop
|
|
264
|
-
- Max 2 revision rounds. After 2 rejections/edits, display: "Maximum revisions reached. Approve current version, or cancel init?" and wait for final decision
|
|
265
|
-
|
|
266
|
-
When applying edits, Claude updates the section content in memory (not files) and re-displays the full prompt. Each re-display includes a revision counter: "(Revision {N}/2)"
|
|
267
|
-
|
|
268
|
-
### Step 7: Create Colony (Post-Approval)
|
|
269
|
-
|
|
270
|
-
Only reached after user approval. ALL file writes happen here.
|
|
271
|
-
|
|
272
|
-
**If re-init mode:**
|
|
273
|
-
|
|
274
|
-
1. Write charter content via:
|
|
275
|
-
```bash
|
|
276
|
-
bash .aether/aether-utils.sh charter-write --intent "{approved_intent}" --vision "{approved_vision}" --governance "{approved_governance}" --goals "{approved_goals}"
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
2. Auto-apply approved pheromone suggestions (see pheromone auto-apply below).
|
|
280
|
-
|
|
281
|
-
3. Update the goal field in COLONY_STATE.json in-place using the state API:
|
|
282
|
-
```bash
|
|
283
|
-
bash .aether/aether-utils.sh state-write "$(jq --arg new_goal "{approved_intent}" '.goal = $new_goal' .aether/data/COLONY_STATE.json)"
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
4. **Verify the write** — read back and confirm goal is set:
|
|
287
|
-
```bash
|
|
288
|
-
verify_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json)
|
|
289
|
-
if [[ "$verify_goal" == "null" || -z "$verify_goal" ]]; then
|
|
290
|
-
echo "ERROR: Colony state write failed — goal is still null after write. Re-run /ant:init."
|
|
291
|
-
# Attempt recovery: write goal directly
|
|
292
|
-
jq --arg g "{approved_intent}" '.goal = $g' .aether/data/COLONY_STATE.json > .aether/data/COLONY_STATE.json.tmp && mv .aether/data/COLONY_STATE.json.tmp .aether/data/COLONY_STATE.json
|
|
293
|
-
verify_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json)
|
|
294
|
-
if [[ "$verify_goal" == "null" || -z "$verify_goal" ]]; then
|
|
295
|
-
echo "FATAL: Recovery write also failed. Colony state may be corrupted."
|
|
296
|
-
stop
|
|
297
|
-
fi
|
|
298
|
-
fi
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
5. Run `bash .aether/aether-utils.sh session-init "$(jq -r '.session_id' .aether/data/COLONY_STATE.json)" "{approved_intent}"`
|
|
302
|
-
|
|
303
|
-
6. Skip to Step 8 (display result). Do NOT write COLONY_STATE.json from template, do NOT write constraints.json, do NOT write pheromones.json.
|
|
304
|
-
|
|
305
|
-
**If fresh init:**
|
|
306
|
-
|
|
307
|
-
1. Initialize QUEEN.md (already done in Step 2)
|
|
308
|
-
2. Write charter content via charter-write (same command as above)
|
|
309
|
-
3. Auto-apply approved pheromone suggestions (see pheromone auto-apply below).
|
|
310
|
-
4. Write COLONY_STATE.json from template:
|
|
311
|
-
- Generate a session ID in the format `session_{unix_timestamp}_{random}` and an ISO-8601 UTC timestamp
|
|
312
|
-
- Resolve template: check `~/.aether/system/templates/colony-state.template.json` first, then `.aether/templates/colony-state.template.json`
|
|
313
|
-
- If no template found: output "Template missing: colony-state.template.json. Run aether update to fix." and stop
|
|
314
|
-
- Read the template file. Follow its `_instructions` field
|
|
315
|
-
- Replace placeholders: `__GOAL__` with approved intent, `__SESSION_ID__` with generated session ID, `__ISO8601_TIMESTAMP__` with current timestamp, `__PHASE_LEARNINGS__` with `[]`, `__INSTINCTS__` with `[]`
|
|
316
|
-
- Remove ALL keys starting with underscore
|
|
317
|
-
- Write the resulting JSON to `.aether/data/COLONY_STATE.json` using the Write tool
|
|
318
|
-
|
|
319
|
-
5. **Verify the write** — read back and confirm COLONY_STATE.json is valid and goal is set:
|
|
320
|
-
```bash
|
|
321
|
-
verify_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json 2>/dev/null)
|
|
322
|
-
verify_valid=$(jq -e . .aether/data/COLONY_STATE.json >/dev/null 2>&1 && echo "valid" || echo "invalid")
|
|
323
|
-
if [[ "$verify_valid" != "valid" || "$verify_goal" == "null" || -z "$verify_goal" ]]; then
|
|
324
|
-
echo "ERROR: Colony state write verification failed (valid=$verify_valid, goal=$verify_goal)"
|
|
325
|
-
echo "The colony file may be corrupted. Remove .aether/data/COLONY_STATE.json and re-run /ant:init."
|
|
326
|
-
stop
|
|
327
|
-
fi
|
|
328
|
-
echo "Colony state verified: goal=\"$verify_goal\""
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
6. Write constraints.json from template:
|
|
332
|
-
- Resolve template: check `~/.aether/system/templates/constraints.template.json` first, then `.aether/templates/constraints.template.json`
|
|
333
|
-
- If no template found: output "Template missing: constraints.template.json. Run aether update to fix." and stop
|
|
334
|
-
- Read template, follow `_instructions`, remove `_` prefixed keys, write to `.aether/data/constraints.json`
|
|
335
|
-
|
|
336
|
-
7. Initialize runtime files from templates (non-blocking):
|
|
337
|
-
```bash
|
|
338
|
-
for template in pheromones midden learning-observations; do
|
|
339
|
-
if [[ "$template" == "midden" ]]; then
|
|
340
|
-
target=".aether/data/midden/midden.json"
|
|
341
|
-
else
|
|
342
|
-
target=".aether/data/${template}.json"
|
|
343
|
-
fi
|
|
344
|
-
if [[ ! -f "$target" ]]; then
|
|
345
|
-
template_file=""
|
|
346
|
-
for path in ~/.aether/system/templates/${template}.template.json .aether/templates/${template}.template.json; do
|
|
347
|
-
if [[ -f "$path" ]]; then
|
|
348
|
-
template_file="$path"
|
|
349
|
-
break
|
|
350
|
-
fi
|
|
351
|
-
done
|
|
352
|
-
if [[ -n "$template_file" ]]; then
|
|
353
|
-
jq 'with_entries(select(.key | startswith("_") | not))' "$template_file" > "$target" 2>/dev/null || true
|
|
354
|
-
fi
|
|
355
|
-
fi
|
|
356
|
-
done
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
8. Run `bash .aether/aether-utils.sh context-update init "{approved_intent}"`
|
|
360
|
-
9. Run `bash .aether/aether-utils.sh validate-state colony`
|
|
361
|
-
10. Register repo (silent on failure):
|
|
362
|
-
```bash
|
|
363
|
-
domain_tags=$(bash .aether/aether-utils.sh domain-detect 2>/dev/null | jq -r '.result.tags // ""' || echo "")
|
|
364
|
-
bash .aether/aether-utils.sh registry-add "$(pwd)" "$(jq -r '.version // "unknown"' ~/.aether/version.json 2>/dev/null || echo 'unknown')" --goal "{approved_intent}" --active true --tags "$domain_tags" 2>/dev/null || true
|
|
365
|
-
cp ~/.aether/version.json .aether/version.json 2>/dev/null || true
|
|
366
|
-
```
|
|
367
|
-
11. Install clash detection hook and merge driver (non-blocking):
|
|
368
|
-
```bash
|
|
369
|
-
# Install PreToolUse hook to detect file conflicts across worktrees
|
|
370
|
-
bash .aether/aether-utils.sh clash-setup --install 2>/dev/null || true
|
|
371
|
-
# Register lockfile merge driver (keeps "ours" on package-lock.json conflicts)
|
|
372
|
-
git config merge.lockfile.driver "bash .aether/utils/merge-driver-lockfile.sh %O %A %B" 2>/dev/null || true
|
|
373
|
-
```
|
|
374
|
-
12. Seed QUEEN.md from hive (non-blocking):
|
|
375
|
-
```bash
|
|
376
|
-
domain_tags=$(jq -r --arg repo "$(pwd)" \
|
|
377
|
-
'[.repos[] | select(.path == $repo) | .domain_tags // []] | .[0] // [] | join(",")' \
|
|
378
|
-
"$HOME/.aether/registry.json" 2>/dev/null || echo "")
|
|
379
|
-
seed_args="queen-seed-from-hive --limit 5"
|
|
380
|
-
[[ -n "$domain_tags" ]] && seed_args="$seed_args --domain $domain_tags"
|
|
381
|
-
seed_result=$(bash .aether/aether-utils.sh $seed_args 2>/dev/null || echo '{}')
|
|
382
|
-
seeded_count=$(echo "$seed_result" | jq -r '.result.seeded // 0' 2>/dev/null || echo "0")
|
|
383
|
-
```
|
|
384
|
-
13. Run `bash .aether/aether-utils.sh session-init "{session_id}" "{approved_intent}"`
|
|
385
|
-
|
|
386
|
-
**Pheromone auto-apply (referenced by both re-init and fresh init paths above):**
|
|
387
|
-
|
|
388
|
-
If approved pheromone suggestions exist (the user kept them in the prompt and didn't remove them during the approval loop):
|
|
389
|
-
|
|
390
|
-
For each approved pheromone suggestion, call:
|
|
391
|
-
```bash
|
|
392
|
-
bash .aether/aether-utils.sh pheromone-write "{type}" '{content}' --source "system:init" --reason '{reason}' --ttl "30d" 2>/dev/null || true
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
Implementation notes:
|
|
396
|
-
- Claude (the LLM executing init.md) tracks which pheromones the user kept, edited, or removed during the approval loop (Step 6). Only emit pheromones that survived approval.
|
|
397
|
-
- Use single quotes around pheromone content and reason to avoid shell metacharacter issues (per pitfall 4).
|
|
398
|
-
- Each `pheromone-write` call uses `2>/dev/null || true` to make it non-blocking -- a failed write should never stop colony creation.
|
|
399
|
-
- The `--source "system:init"` tag identifies these as init-derived pheromones.
|
|
400
|
-
- The `--ttl "30d"` gives suggestions a 30-day lifespan (project-level conventions, not phase-specific).
|
|
401
|
-
- `pheromone-write` handles deduplication via content hashing -- if a signal with the same content already exists, it will reinforce rather than duplicate.
|
|
402
|
-
|
|
403
|
-
### Step 7.5: Import Previous Colony Data (optional)
|
|
404
|
-
|
|
405
|
-
Check if previous colony chambers contain importable XML data:
|
|
406
|
-
|
|
407
|
-
```bash
|
|
408
|
-
# Find most recent chamber with XML files (per D-07)
|
|
409
|
-
latest_chamber=$(ls -d .aether/chambers/20* 2>/dev/null | sort -r | head -1)
|
|
410
|
-
xml_import_available=false
|
|
411
|
-
import_summary=""
|
|
412
|
-
|
|
413
|
-
if [[ -n "$latest_chamber" ]]; then
|
|
414
|
-
xml_count=$(find "$latest_chamber" -maxdepth 1 -name "*.xml" ! -name "colony-archive.xml" 2>/dev/null | wc -l | tr -d ' ')
|
|
415
|
-
if [[ "$xml_count" -gt 0 ]] && command -v xmllint >/dev/null 2>&1; then
|
|
416
|
-
xml_import_available=true
|
|
417
|
-
chamber_name=$(basename "$latest_chamber")
|
|
418
|
-
# Count importable items for display
|
|
419
|
-
signal_count=$(jq '.signals | length' "$latest_chamber/pheromones.json" 2>/dev/null || echo "0")
|
|
420
|
-
import_summary="Found ${signal_count} signal(s) and ${xml_count} XML file(s) from colony '${chamber_name}'"
|
|
421
|
-
fi
|
|
422
|
-
fi
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
**If xml_import_available is true:**
|
|
426
|
-
|
|
427
|
-
Display the import offer (per D-08):
|
|
428
|
-
```
|
|
429
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
430
|
-
PREVIOUS COLONY DATA FOUND
|
|
431
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
432
|
-
|
|
433
|
-
{import_summary}
|
|
434
|
-
|
|
435
|
-
Import signals and wisdom from this colony?
|
|
436
|
-
This will add to (not replace) your current colony data.
|
|
437
|
-
|
|
438
|
-
Import? (yes/no)
|
|
439
|
-
```
|
|
440
|
-
|
|
441
|
-
Use `AskUserQuestion` with yes/no options.
|
|
442
|
-
|
|
443
|
-
**If user selects "yes":**
|
|
444
|
-
|
|
445
|
-
Import ALL available data types (per D-09 -- no cherry-picking):
|
|
446
|
-
|
|
447
|
-
```bash
|
|
448
|
-
# Import pheromones (per D-09)
|
|
449
|
-
if [[ -f "$latest_chamber/pheromones.xml" ]]; then
|
|
450
|
-
pher_import=$(bash .aether/aether-utils.sh pheromone-import-xml "$latest_chamber/pheromones.xml" "imported" 2>/dev/null || echo '{"ok":false}')
|
|
451
|
-
pher_imported=$(echo "$pher_import" | jq -r '.result.imported // 0' 2>/dev/null || echo "0")
|
|
452
|
-
echo "Pheromones: ${pher_imported} signal(s) imported"
|
|
453
|
-
fi
|
|
454
|
-
|
|
455
|
-
# Import wisdom to queen-wisdom.json (per D-09)
|
|
456
|
-
if [[ -f "$latest_chamber/queen-wisdom.xml" ]]; then
|
|
457
|
-
wis_import=$(bash .aether/aether-utils.sh wisdom-import-xml "$latest_chamber/queen-wisdom.xml" ".aether/data/queen-wisdom.json" 2>/dev/null || echo '{"ok":false}')
|
|
458
|
-
wis_imported=$(echo "$wis_import" | jq -r '.result.imported // 0' 2>/dev/null || echo "0")
|
|
459
|
-
echo "Wisdom: ${wis_imported} entries(s) imported to queen-wisdom.json"
|
|
460
|
-
fi
|
|
461
|
-
|
|
462
|
-
# Import registry lineage (per D-09)
|
|
463
|
-
if [[ -f "$latest_chamber/colony-registry.xml" ]]; then
|
|
464
|
-
reg_import=$(bash .aether/aether-utils.sh registry-import-xml "$latest_chamber/colony-registry.xml" 2>/dev/null || echo '{"ok":false}')
|
|
465
|
-
reg_imported=$(echo "$reg_import" | jq -r '.result.imported // 0' 2>/dev/null || echo "0")
|
|
466
|
-
echo "Registry: ${reg_imported} colon(ies) lineage imported"
|
|
467
|
-
fi
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
All imports are non-blocking -- log warning and continue if any fails.
|
|
471
|
-
|
|
472
|
-
**If user selects "no":**
|
|
473
|
-
|
|
474
|
-
Display "Import skipped. Starting fresh colony." and proceed to Step 8.
|
|
475
|
-
|
|
476
|
-
**If xml_import_available is false (no chambers, no XML, or no xmllint):**
|
|
477
|
-
|
|
478
|
-
Skip silently -- proceed directly to Step 8 without any mention of import (per D-11).
|
|
479
|
-
### Step 8: Display Result
|
|
480
|
-
|
|
481
|
-
Display the success header and result block:
|
|
482
|
-
|
|
483
|
-
```
|
|
484
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
485
|
-
A E T H E R C O L O N Y
|
|
486
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
487
|
-
|
|
488
|
-
Queen has set the colony's intention
|
|
489
|
-
|
|
490
|
-
"{approved_intent}"
|
|
491
|
-
|
|
492
|
-
Colony Status: READY
|
|
493
|
-
|
|
494
|
-
{If re-init: " Mode: Re-init (charter updated, state preserved)"}
|
|
495
|
-
{If fresh and seeded_count > 0: " Hive wisdom: {seeded_count} cross-colony pattern(s) seeded into QUEEN.md"}
|
|
496
|
-
|
|
497
|
-
State persisted -- safe to /clear, then run /ant:plan
|
|
498
|
-
|
|
499
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
500
|
-
Next Up
|
|
501
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
502
|
-
/ant:plan Generate execution plan
|
|
503
|
-
/ant:status Check colony state
|
|
504
|
-
/ant:focus Set initial focus
|
|
505
|
-
```
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<!-- Generated from .aether/commands/insert-phase.yaml - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
---
|
|
3
|
-
name: ant:insert-phase
|
|
4
|
-
description: "➕🐜 Insert a corrective phase into the active plan"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are the **Queen**. Insert a new corrective phase without forcing the user to provide flags.
|
|
8
|
-
|
|
9
|
-
## Instructions
|
|
10
|
-
|
|
11
|
-
### Step 1: Validate Colony State
|
|
12
|
-
|
|
13
|
-
Read `.aether/data/COLONY_STATE.json`.
|
|
14
|
-
|
|
15
|
-
If `goal` is null:
|
|
16
|
-
`No colony initialized. Run /ant:init first.`
|
|
17
|
-
Stop.
|
|
18
|
-
|
|
19
|
-
If `milestone` == `"Crowned Anthill"`:
|
|
20
|
-
`This colony has been sealed. Start a new colony with /ant:init "new goal".`
|
|
21
|
-
Stop.
|
|
22
|
-
|
|
23
|
-
If `plan.phases` is empty:
|
|
24
|
-
`No project plan. Run /ant:plan first.`
|
|
25
|
-
Stop.
|
|
26
|
-
|
|
27
|
-
Determine:
|
|
28
|
-
- `current_phase`
|
|
29
|
-
- `total_phases`
|
|
30
|
-
- `current_phase_name` (if available)
|
|
31
|
-
|
|
32
|
-
### Step 2: Collect Minimal Input
|
|
33
|
-
|
|
34
|
-
This command is designed to work with no arguments.
|
|
35
|
-
|
|
36
|
-
If `$ARGUMENTS` is non-empty:
|
|
37
|
-
- Use `$ARGUMENTS` as the issue summary.
|
|
38
|
-
- Skip the first question.
|
|
39
|
-
|
|
40
|
-
Otherwise ask:
|
|
41
|
-
```text
|
|
42
|
-
What is not working and needs a corrective phase?
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Then ask:
|
|
46
|
-
```text
|
|
47
|
-
What should the inserted phase accomplish?
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Then ask (optional):
|
|
51
|
-
```text
|
|
52
|
-
Any hard constraints to enforce while fixing this? (or say "none")
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
If constraints answer is `none` (case-insensitive), treat constraints as empty.
|
|
56
|
-
|
|
57
|
-
### Step 3: Derive Phase Name
|
|
58
|
-
|
|
59
|
-
Create a concise phase name from the user goal:
|
|
60
|
-
- Start with `Stabilize`
|
|
61
|
-
- Add a short noun phrase from the goal (max 6 words)
|
|
62
|
-
- Keep under 80 characters
|
|
63
|
-
|
|
64
|
-
Example:
|
|
65
|
-
- Goal: `Fix retry flow and stop duplicate requests`
|
|
66
|
-
- Name: `Stabilize retry flow and duplicate requests`
|
|
67
|
-
|
|
68
|
-
### Step 4: Insert Phase Safely
|
|
69
|
-
|
|
70
|
-
Run using the Bash tool with description "Inserting corrective phase...":
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
bash .aether/aether-utils.sh phase-insert "<phase_name>" "<goal_text>" "<constraints_text>"
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Parse JSON result:
|
|
77
|
-
- If `ok != true`, display error and stop.
|
|
78
|
-
- Extract `inserted_phase_id` and `after_phase`.
|
|
79
|
-
|
|
80
|
-
### Step 5: Confirm Outcome
|
|
81
|
-
|
|
82
|
-
Display:
|
|
83
|
-
|
|
84
|
-
```text
|
|
85
|
-
Inserted corrective phase successfully.
|
|
86
|
-
New phase: <inserted_phase_id> — <phase_name>
|
|
87
|
-
Inserted after phase: <after_phase>
|
|
88
|
-
Goal: <goal_text>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
If constraints were provided, also display:
|
|
92
|
-
```text
|
|
93
|
-
Constraints captured: <constraints_text>
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Step 6: Next Up
|
|
97
|
-
|
|
98
|
-
Show:
|
|
99
|
-
|
|
100
|
-
```text
|
|
101
|
-
Next steps:
|
|
102
|
-
/ant:phase <inserted_phase_id> Review inserted phase details
|
|
103
|
-
/ant:build <inserted_phase_id> Execute corrective phase
|
|
104
|
-
/ant:status Verify updated plan state
|
|
105
|
-
```
|