aether-colony 5.0.0 → 5.2.1
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 +3226 -3345
- 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 +442 -0
- package/.aether/commands/continue.yaml +1484 -0
- package/.aether/commands/council.yaml +509 -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 +502 -0
- package/.aether/commands/insert-phase.yaml +102 -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 +1364 -0
- package/.aether/commands/preferences.yaml +63 -0
- package/.aether/commands/quick.yaml +104 -0
- package/.aether/commands/redirect.yaml +123 -0
- package/.aether/commands/resume-colony.yaml +375 -0
- package/.aether/commands/resume.yaml +407 -0
- package/.aether/commands/run.yaml +229 -0
- package/.aether/commands/seal.yaml +1214 -0
- package/.aether/commands/skill-create.yaml +337 -0
- package/.aether/commands/status.yaml +408 -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 +1683 -0
- package/.aether/docs/command-playbooks/build-prep.md +284 -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 +1725 -0
- package/.aether/docs/command-playbooks/continue-gates.md +686 -0
- package/.aether/docs/command-playbooks/continue-verify.md +407 -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/council.sh +425 -0
- 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 +278 -0
- package/.aether/utils/hive.sh +572 -0
- package/.aether/utils/immune.sh +508 -0
- package/.aether/utils/learning.sh +1928 -0
- package/.aether/utils/midden.sh +520 -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 +1710 -0
- package/.aether/utils/scan.sh +860 -0
- package/.aether/utils/semantic-cli.sh +10 -8
- package/.aether/utils/session.sh +816 -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 +389 -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 +3 -14
- package/.claude/commands/ant/continue.md +40 -1026
- package/.claude/commands/ant/council.md +213 -15
- 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 +349 -191
- package/.claude/commands/ant/insert-phase.md +105 -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 +199 -50
- package/.claude/commands/ant/preferences.md +65 -0
- package/.claude/commands/ant/quick.md +100 -0
- package/.claude/commands/ant/redirect.md +18 -0
- package/.claude/commands/ant/resume-colony.md +37 -22
- package/.claude/commands/ant/resume.md +60 -7
- package/.claude/commands/ant/run.md +231 -0
- package/.claude/commands/ant/seal.md +506 -78
- package/.claude/commands/ant/skill-create.md +286 -0
- package/.claude/commands/ant/status.md +171 -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 +10 -17
- package/.opencode/commands/ant/continue.md +595 -66
- package/.opencode/commands/ant/council.md +150 -18
- 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 +396 -154
- package/.opencode/commands/ant/insert-phase.md +111 -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 +210 -57
- package/.opencode/commands/ant/preferences.md +71 -0
- package/.opencode/commands/ant/quick.md +91 -0
- package/.opencode/commands/ant/redirect.md +22 -5
- package/.opencode/commands/ant/resume-colony.md +41 -29
- package/.opencode/commands/ant/resume.md +80 -20
- package/.opencode/commands/ant/run.md +237 -0
- package/.opencode/commands/ant/seal.md +230 -25
- package/.opencode/commands/ant/skill-create.md +63 -0
- package/.opencode/commands/ant/status.md +125 -30
- 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 +368 -1
- package/README.md +195 -324
- 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 +16 -4
- 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,6 +1,7 @@
|
|
|
1
|
+
<!-- Generated from .aether/commands/init.yaml - DO NOT EDIT DIRECTLY -->
|
|
1
2
|
---
|
|
2
3
|
name: ant:init
|
|
3
|
-
description: "
|
|
4
|
+
description: "Initialize Aether colony - scan repo, approve charter, create colony"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
You are the **Queen Ant Colony**. Initialize the colony with the Queen's intention.
|
|
@@ -13,12 +14,11 @@ Parse `$ARGUMENTS`:
|
|
|
13
14
|
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
14
15
|
- Otherwise: set `visual_mode = true`
|
|
15
16
|
|
|
17
|
+
|
|
18
|
+
|
|
16
19
|
<failure_modes>
|
|
17
20
|
### Colony State Overwrite
|
|
18
|
-
|
|
19
|
-
- STOP before overwriting
|
|
20
|
-
- Warn: "Active colony detected with goal: [goal]. Overwriting will lose this data."
|
|
21
|
-
- Options: (1) Archive first with /ant:seal, (2) Continue and overwrite, (3) Cancel
|
|
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
22
|
|
|
23
23
|
### Write Failure Mid-Init
|
|
24
24
|
If writing COLONY_STATE.json fails partway:
|
|
@@ -29,10 +29,11 @@ If writing COLONY_STATE.json fails partway:
|
|
|
29
29
|
|
|
30
30
|
<success_criteria>
|
|
31
31
|
Command is complete when:
|
|
32
|
-
-
|
|
33
|
-
-
|
|
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)
|
|
34
35
|
- Session file is written
|
|
35
|
-
- User sees confirmation of colony creation
|
|
36
|
+
- User sees confirmation of colony creation or re-init
|
|
36
37
|
</success_criteria>
|
|
37
38
|
|
|
38
39
|
<read_only>
|
|
@@ -44,23 +45,6 @@ Do not touch during init:
|
|
|
44
45
|
- .github/workflows/
|
|
45
46
|
</read_only>
|
|
46
47
|
|
|
47
|
-
### Step 0: Initialize Visual Mode (if enabled)
|
|
48
|
-
|
|
49
|
-
If `visual_mode` is true:
|
|
50
|
-
```bash
|
|
51
|
-
# Generate session ID
|
|
52
|
-
init_id="init-$(date +%s)"
|
|
53
|
-
|
|
54
|
-
# Initialize swarm display (consolidated)
|
|
55
|
-
bash .aether/aether-utils.sh swarm-display-init "$init_id" && bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Colony initialization" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 0
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Step 0.5: Version Check (Non-blocking)
|
|
59
|
-
|
|
60
|
-
Run using the Bash tool with description "Checking colony version...": `bash .aether/aether-utils.sh version-check-cached 2>/dev/null || true`
|
|
61
|
-
|
|
62
|
-
If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
|
|
63
|
-
|
|
64
48
|
### Step 1: Validate Input
|
|
65
49
|
|
|
66
50
|
If `$ARGUMENTS` is empty or blank, output:
|
|
@@ -68,8 +52,8 @@ If `$ARGUMENTS` is empty or blank, output:
|
|
|
68
52
|
```
|
|
69
53
|
Aether Colony
|
|
70
54
|
|
|
71
|
-
Initialize the colony with a goal. This
|
|
72
|
-
|
|
55
|
+
Initialize the colony with a goal. This scans the repo, generates
|
|
56
|
+
a charter for your approval, then creates colony files.
|
|
73
57
|
|
|
74
58
|
Usage: /ant:init "<your goal here>"
|
|
75
59
|
|
|
@@ -81,43 +65,30 @@ Aether Colony
|
|
|
81
65
|
|
|
82
66
|
Stop here. Do not proceed.
|
|
83
67
|
|
|
84
|
-
### Step 1.5:
|
|
68
|
+
### Step 1.5: Verify Aether Setup
|
|
85
69
|
|
|
86
70
|
Check if `.aether/aether-utils.sh` exists using the Read tool.
|
|
87
71
|
|
|
88
|
-
**If the file already exists**
|
|
72
|
+
**If the file already exists** -- skip this step entirely. Aether is set up.
|
|
89
73
|
|
|
90
74
|
**If the file does NOT exist:**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
Bootstrapped system files from global hub.
|
|
110
|
-
```
|
|
111
|
-
- **If the hub does NOT exist:** Output:
|
|
112
|
-
```
|
|
113
|
-
No Aether system files found locally or in ~/.aether/system/.
|
|
114
|
-
Run `aether install` or `npx aether-colony install` to set up the global hub first.
|
|
115
|
-
```
|
|
116
|
-
Stop here. Do not proceed.
|
|
117
|
-
|
|
118
|
-
### Step 1.6: Initialize QUEEN.md Wisdom Document
|
|
119
|
-
|
|
120
|
-
After bootstrap completes (or if system files already existed), run using the Bash tool:
|
|
75
|
+
```
|
|
76
|
+
Aether is not set up in this repo yet.
|
|
77
|
+
|
|
78
|
+
Run /ant:lay-eggs first to create the .aether/ directory
|
|
79
|
+
with all system files, then run /ant:init "your goal" to
|
|
80
|
+
start a colony.
|
|
81
|
+
|
|
82
|
+
If the global hub isn't installed either:
|
|
83
|
+
npm install -g aether-colony (installs the hub)
|
|
84
|
+
/ant:lay-eggs (sets up this repo)
|
|
85
|
+
/ant:init "your goal" (starts the colony)
|
|
86
|
+
```
|
|
87
|
+
Stop here. Do not proceed.
|
|
88
|
+
|
|
89
|
+
### Step 2: Initialize QUEEN.md
|
|
90
|
+
|
|
91
|
+
Run using the Bash tool with description "Initializing QUEEN.md...":
|
|
121
92
|
```
|
|
122
93
|
bash .aether/aether-utils.sh queen-init
|
|
123
94
|
```
|
|
@@ -126,216 +97,403 @@ Parse the JSON result:
|
|
|
126
97
|
- If `created` is true: Display `QUEEN.md initialized`
|
|
127
98
|
- If `created` is false and `reason` is "already_exists": Display `QUEEN.md already exists`
|
|
128
99
|
|
|
129
|
-
This step is non-blocking
|
|
100
|
+
This step is non-blocking -- proceed regardless of outcome.
|
|
130
101
|
|
|
131
|
-
### Step
|
|
102
|
+
### Step 3: Scan Repository
|
|
132
103
|
|
|
133
|
-
|
|
104
|
+
Run the scan via Bash tool:
|
|
134
105
|
```bash
|
|
135
|
-
|
|
106
|
+
scan_result=$(bash .aether/aether-utils.sh init-research 2>/dev/null)
|
|
107
|
+
scan_data=$(echo "$scan_result" | jq '.result')
|
|
136
108
|
```
|
|
137
109
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
110
|
+
Extract fields with jq defaults for missing data:
|
|
111
|
+
- `tech_langs`: `.tech_stack.languages | if length > 0 then join(", ") else "not detected" end`
|
|
112
|
+
- `tech_fwks`: `.tech_stack.frameworks | if length > 0 then join(", ") else "none" end`
|
|
113
|
+
- `tech_pkg`: `.tech_stack.package_managers | join(", ")`
|
|
114
|
+
- `complexity`: `.complexity.size`
|
|
115
|
+
- `file_count`: `.complexity.metrics.file_count`
|
|
116
|
+
- `top_dirs`: `.directory_structure.top_level_dirs | if . and length > 0 then join(", ") else "flat" end`
|
|
117
|
+
- `commit_count`: `.git_history.commit_count // "unknown"`
|
|
118
|
+
- `is_git`: `.git_history.is_git_repo // false`
|
|
119
|
+
- `survey_suggestion`: `.survey_status.suggestion.reason // empty`
|
|
120
|
+
- `has_active`: `.prior_colonies.has_active_colony // false`
|
|
121
|
+
- `active_goal`: `.prior_colonies.active_goal // empty`
|
|
122
|
+
|
|
123
|
+
**Intelligence fields (new):**
|
|
124
|
+
- `colony_context_colonies`: `.colony_context.prior_colonies // []` -- array of prior colony summaries (each has goal, phases, outcome, summary)
|
|
125
|
+
- `colony_context_charter`: `.colony_context.existing_charter // {}` -- existing charter content from QUEEN.md
|
|
126
|
+
- `governance_rules`: `.governance.rules // []` -- array of governance rule objects (each has rule, source, strength)
|
|
127
|
+
- `pheromone_suggestions`: `.pheromone_suggestions // []` -- array of suggestion objects (each has type, content, reason, priority)
|
|
128
|
+
|
|
129
|
+
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).
|
|
130
|
+
|
|
131
|
+
### Step 4: Detect Re-Init Mode
|
|
132
|
+
|
|
133
|
+
Use Read tool to check `.aether/data/COLONY_STATE.json`.
|
|
134
|
+
|
|
135
|
+
- If file exists AND has a non-null `goal` field:
|
|
136
|
+
- Check the `milestone` field. If `milestone == "Crowned Anthill"`:
|
|
137
|
+
- This is a **sealed colony**. Treat as **fresh init**, NOT re-init.
|
|
138
|
+
- Set `reinit_mode = false`
|
|
139
|
+
- Display: `Previous colony was sealed. Starting fresh colony.`
|
|
140
|
+
- The old COLONY_STATE.json will be overwritten in Step 7 (fresh init path).
|
|
141
|
+
- Otherwise (colony exists but is NOT sealed): set `reinit_mode = true`, store `existing_goal`
|
|
142
|
+
- If file does not exist or `goal` is null: set `reinit_mode = false`
|
|
143
|
+
|
|
144
|
+
If re-init mode, read existing charter entries from `.aether/QUEEN.md`:
|
|
141
145
|
```bash
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
146
|
+
existing_intent=$(grep '\[charter\] \*\*Intent\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Intent\*\*: //' | sed 's/ (Colony:.*//' || true)
|
|
147
|
+
existing_vision=$(grep '\[charter\] \*\*Vision\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Vision\*\*: //' | sed 's/ (Colony:.*//' || true)
|
|
148
|
+
existing_governance=$(grep '\[charter\] \*\*Governance\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Governance\*\*: //' | sed 's/ (Colony:.*//' || true)
|
|
149
|
+
existing_goals=$(grep '\[charter\] \*\*Goal\*\*:' .aether/QUEEN.md 2>/dev/null | sed 's/.*\*\*Goal\*\*: //' | sed 's/ (Colony:.*//' || true)
|
|
145
150
|
```
|
|
146
151
|
|
|
147
|
-
|
|
148
|
-
- If state is stale (old session): Warn user but proceed
|
|
149
|
-
- If state is fresh (active session): Strongly recommend continuation
|
|
152
|
+
Strip `(Colony: ...)` suffixes using sed. If grep finds nothing, variables remain empty.
|
|
150
153
|
|
|
151
|
-
|
|
152
|
-
Colony already initialized with goal: "{existing_goal}"
|
|
154
|
+
### Step 5: Assemble and Display Approval Prompt
|
|
153
155
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
Display a brief header:
|
|
157
|
+
```
|
|
158
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
159
|
+
A E T H E R C O L O N Y I N I T
|
|
160
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
161
|
+
```
|
|
156
162
|
|
|
157
|
-
|
|
158
|
-
Proceeding with new goal: "{new_goal}"
|
|
163
|
+
If re-init mode, display:
|
|
159
164
|
```
|
|
165
|
+
Re-init mode detected (existing goal: "{existing_goal}")
|
|
166
|
+
Charter will be updated. All colony state, wisdom, instincts, and progress will be preserved.
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Then display the approval prompt as formatted Markdown. Section ordering: Prior Context (if any) -> Charter -> Context -> Pheromones.
|
|
160
170
|
|
|
161
|
-
**
|
|
171
|
+
**Section 1: Prior Context (conditional -- only when prior colonies exist)**
|
|
162
172
|
|
|
163
|
-
|
|
173
|
+
If `colony_context_colonies` has entries (length > 0), display:
|
|
174
|
+
```markdown
|
|
175
|
+
## Prior Context
|
|
164
176
|
|
|
165
|
-
|
|
177
|
+
Previous colonies in this repo:
|
|
166
178
|
|
|
167
|
-
|
|
179
|
+
{For each colony (max 3, most recent first):}
|
|
180
|
+
- **{goal}** -- {outcome} ({phases} phases){if summary is non-empty: ". {summary}"}
|
|
181
|
+
```
|
|
168
182
|
|
|
169
|
-
|
|
170
|
-
1. **Instincts** — look for the `## Colony Instincts` section. Each line has format: `N. [confidence] domain: description`. Keep only instincts with confidence >= 0.5.
|
|
171
|
-
2. **Learnings** — look for the `## Colony Learnings (Validated)` section. Keep all numbered items.
|
|
183
|
+
Per locked decision: when no prior colonies exist, omit this section entirely. No placeholder, no header.
|
|
172
184
|
|
|
173
|
-
|
|
185
|
+
Keep each colony to 1-2 lines. Show goal, outcome (milestone), phase count, and summary from CROWNED-ANTHILL.md if available.
|
|
174
186
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
{N} validated learning(s) carried forward
|
|
179
|
-
```
|
|
187
|
+
**Section 2: Charter**
|
|
188
|
+
```markdown
|
|
189
|
+
## Charter
|
|
180
190
|
|
|
181
|
-
|
|
191
|
+
**Intent:** {user's goal from $ARGUMENTS, or existing_intent if re-init}
|
|
192
|
+
**Vision:** {derived from user's goal by Claude, or existing_vision if re-init}
|
|
193
|
+
**Governance:** {see governance logic below}
|
|
194
|
+
**Goals:** {blank for fresh init, or existing_goals if re-init}
|
|
182
195
|
```
|
|
183
|
-
|
|
196
|
+
|
|
197
|
+
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.
|
|
198
|
+
|
|
199
|
+
**Governance field logic:**
|
|
200
|
+
- 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.
|
|
201
|
+
- For fresh init with no governance_rules: leave blank.
|
|
202
|
+
- For re-init with existing_governance non-empty: pre-populate from existing QUEEN.md charter entries.
|
|
203
|
+
- For re-init with existing_governance empty but governance_rules available: pre-populate from governance_rules.
|
|
204
|
+
|
|
205
|
+
For re-init, pre-populate Intent, Vision, and Goals from existing QUEEN.md charter entries.
|
|
206
|
+
|
|
207
|
+
**Section 3: Context**
|
|
208
|
+
```markdown
|
|
209
|
+
## Context
|
|
210
|
+
|
|
211
|
+
**Tech Stack:** {tech_langs} | {tech_fwks} | {tech_pkg}
|
|
212
|
+
**Project Size:** {complexity} ({file_count} files)
|
|
213
|
+
**Structure:** {top_dirs}
|
|
214
|
+
**Git:** {commit_count} commits
|
|
215
|
+
{if survey_suggestion: **Note:** {survey_suggestion}}
|
|
184
216
|
```
|
|
185
217
|
|
|
186
|
-
**
|
|
218
|
+
**Section 4: Pheromones**
|
|
187
219
|
|
|
188
|
-
|
|
220
|
+
If `pheromone_suggestions` has entries (length > 0), display:
|
|
221
|
+
```markdown
|
|
222
|
+
## Pheromones
|
|
189
223
|
|
|
190
|
-
|
|
224
|
+
Suggested signals based on repo analysis:
|
|
191
225
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
226
|
+
1. [FOCUS] Testing infrastructure present (47 test files) -- maintain TDD discipline
|
|
227
|
+
2. [REDIRECT] Environment files detected -- never commit secrets or .env files
|
|
228
|
+
3. [FOCUS] Code quality tools configured -- follow existing lint/format rules
|
|
195
229
|
|
|
196
|
-
|
|
230
|
+
Edit, remove, or add signals as needed. Approved signals will be auto-applied.
|
|
231
|
+
```
|
|
197
232
|
|
|
198
|
-
|
|
199
|
-
Replace all `__PLACEHOLDER__` values:
|
|
200
|
-
- `__GOAL__` → the user's goal from $ARGUMENTS
|
|
201
|
-
- `__SESSION_ID__` → the generated session ID (format: `session_{unix_timestamp}_{random}`)
|
|
202
|
-
- `__ISO8601_TIMESTAMP__` → the current ISO-8601 UTC timestamp (used in both `initialized_at` and the events entry)
|
|
203
|
-
- `__PHASE_LEARNINGS__` → JSON array from Step 2.6, or `[]` if none
|
|
204
|
-
- `__INSTINCTS__` → JSON array from Step 2.6, or `[]` if none
|
|
233
|
+
The numbered list uses the actual type and content from `pheromone_suggestions`. Each line format: `{N}. [{type}] {content}`.
|
|
205
234
|
|
|
206
|
-
|
|
235
|
+
Per locked decision: suggestions are fully editable. User can reword, remove, or add their own.
|
|
236
|
+
Per locked decision: all sections look the same -- no visual distinction between auto-generated and user-written content.
|
|
207
237
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
- `action`: the instinct description
|
|
212
|
-
- `confidence`: the original confidence value (from the completion report)
|
|
213
|
-
- `domain`: the original domain (from the completion report)
|
|
214
|
-
- `source`: `"inherited:completion-report"`
|
|
215
|
-
- `evidence`: `["Validated in prior colony session"]`
|
|
216
|
-
- `created_at`: current ISO-8601 timestamp
|
|
217
|
-
- `last_applied`: null
|
|
218
|
-
- `applications`: 0
|
|
219
|
-
- `successes`: 0
|
|
238
|
+
If no pheromone suggestions available (empty array), display the existing default:
|
|
239
|
+
```markdown
|
|
240
|
+
## Pheromones
|
|
220
241
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
- `learning`: the learning text
|
|
224
|
-
- `status`: `"validated"`
|
|
225
|
-
- `source`: `"inherited:completion-report"`
|
|
242
|
+
No pheromone suggestions yet -- use /ant:focus and /ant:redirect to guide the colony.
|
|
243
|
+
```
|
|
226
244
|
|
|
227
|
-
|
|
245
|
+
End with clear instructions:
|
|
246
|
+
```
|
|
247
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
248
|
+
Review the prompt above. You can:
|
|
249
|
+
- Edit any section (just describe your changes)
|
|
250
|
+
- Say "approve" or "looks good" to proceed
|
|
251
|
+
- Say "cancel" to abort
|
|
228
252
|
|
|
229
|
-
|
|
230
|
-
|
|
253
|
+
If you don't respond, the colony will not be initialized.
|
|
254
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
255
|
+
```
|
|
231
256
|
|
|
232
|
-
|
|
257
|
+
**STOP HERE.** Wait for the user's response. Do NOT proceed to Step 6 until the user responds.
|
|
233
258
|
|
|
234
|
-
|
|
235
|
-
Check `~/.aether/system/templates/constraints.template.json` first,
|
|
236
|
-
then `.aether/templates/constraints.template.json`.
|
|
259
|
+
### Step 6: Handle User Response
|
|
237
260
|
|
|
238
|
-
|
|
261
|
+
Parse the user's response:
|
|
262
|
+
- If the user approves (says "approve", "looks good", "yes", "ok", or similar): proceed to Step 7
|
|
263
|
+
- 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
|
|
264
|
+
- If the user cancels: display "Colony initialization cancelled." and stop
|
|
265
|
+
- Max 2 revision rounds. After 2 rejections/edits, display: "Maximum revisions reached. Approve current version, or cancel init?" and wait for final decision
|
|
239
266
|
|
|
240
|
-
|
|
241
|
-
No placeholder substitution needed — the data keys are written as-is.
|
|
242
|
-
Remove ALL keys starting with underscore (`_template`, `_version`, `_instructions`, `_comment_*`).
|
|
243
|
-
Write the resulting JSON to `.aether/data/constraints.json` using the Write tool.
|
|
267
|
+
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)"
|
|
244
268
|
|
|
245
|
-
### Step
|
|
269
|
+
### Step 7: Create Colony (Post-Approval)
|
|
246
270
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
```
|
|
271
|
+
Only reached after user approval. ALL file writes happen here.
|
|
272
|
+
|
|
273
|
+
**If re-init mode:**
|
|
251
274
|
|
|
252
|
-
|
|
275
|
+
1. Write charter content via:
|
|
276
|
+
```bash
|
|
277
|
+
bash .aether/aether-utils.sh charter-write --intent "{approved_intent}" --vision "{approved_vision}" --governance "{approved_governance}" --goals "{approved_goals}"
|
|
278
|
+
```
|
|
253
279
|
|
|
254
|
-
|
|
280
|
+
2. Auto-apply approved pheromone suggestions (see pheromone auto-apply below).
|
|
255
281
|
|
|
256
|
-
|
|
282
|
+
3. Update the goal field in COLONY_STATE.json in-place using the state API:
|
|
283
|
+
```bash
|
|
284
|
+
bash .aether/aether-utils.sh state-write "$(jq --arg new_goal "{approved_intent}" '.goal = $new_goal' .aether/data/COLONY_STATE.json)"
|
|
257
285
|
```
|
|
258
|
-
|
|
286
|
+
|
|
287
|
+
4. **Verify the write** — read back and confirm goal is set:
|
|
288
|
+
```bash
|
|
289
|
+
verify_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json)
|
|
290
|
+
if [[ "$verify_goal" == "null" || -z "$verify_goal" ]]; then
|
|
291
|
+
echo "ERROR: Colony state write failed — goal is still null after write. Re-run /ant:init."
|
|
292
|
+
# Attempt recovery: write goal directly
|
|
293
|
+
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
|
|
294
|
+
verify_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json)
|
|
295
|
+
if [[ "$verify_goal" == "null" || -z "$verify_goal" ]]; then
|
|
296
|
+
echo "FATAL: Recovery write also failed. Colony state may be corrupted."
|
|
297
|
+
stop
|
|
298
|
+
fi
|
|
299
|
+
fi
|
|
259
300
|
```
|
|
260
301
|
|
|
261
|
-
|
|
302
|
+
5. Run `bash .aether/aether-utils.sh session-init "$(jq -r '.session_id' .aether/data/COLONY_STATE.json)" "{approved_intent}"`
|
|
262
303
|
|
|
263
|
-
|
|
304
|
+
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.
|
|
264
305
|
|
|
265
|
-
|
|
306
|
+
**If fresh init:**
|
|
266
307
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
308
|
+
1. Initialize QUEEN.md (already done in Step 2)
|
|
309
|
+
2. Write charter content via charter-write (same command as above)
|
|
310
|
+
3. Auto-apply approved pheromone suggestions (see pheromone auto-apply below).
|
|
311
|
+
4. Write COLONY_STATE.json from template:
|
|
312
|
+
- Generate a session ID in the format `session_{unix_timestamp}_{random}` and an ISO-8601 UTC timestamp
|
|
313
|
+
- Resolve template: check `~/.aether/system/templates/colony-state.template.json` first, then `.aether/templates/colony-state.template.json`
|
|
314
|
+
- If no template found: output "Template missing: colony-state.template.json. Run aether update to fix." and stop
|
|
315
|
+
- Read the template file. Follow its `_instructions` field
|
|
316
|
+
- Replace placeholders: `__GOAL__` with approved intent, `__SESSION_ID__` with generated session ID, `__ISO8601_TIMESTAMP__` with current timestamp, `__PHASE_LEARNINGS__` with `[]`, `__INSTINCTS__` with `[]`
|
|
317
|
+
- Remove ALL keys starting with underscore
|
|
318
|
+
- Write the resulting JSON to `.aether/data/COLONY_STATE.json` using the Write tool
|
|
271
319
|
|
|
272
|
-
|
|
320
|
+
5. **Verify the write** — read back and confirm COLONY_STATE.json is valid and goal is set:
|
|
321
|
+
```bash
|
|
322
|
+
verify_goal=$(jq -r '.goal' .aether/data/COLONY_STATE.json 2>/dev/null)
|
|
323
|
+
verify_valid=$(jq -e . .aether/data/COLONY_STATE.json >/dev/null 2>&1 && echo "valid" || echo "invalid")
|
|
324
|
+
if [[ "$verify_valid" != "valid" || "$verify_goal" == "null" || -z "$verify_goal" ]]; then
|
|
325
|
+
echo "ERROR: Colony state write verification failed (valid=$verify_valid, goal=$verify_goal)"
|
|
326
|
+
echo "The colony file may be corrupted. Remove .aether/data/COLONY_STATE.json and re-run /ant:init."
|
|
327
|
+
stop
|
|
328
|
+
fi
|
|
329
|
+
echo "Colony state verified: goal=\"$verify_goal\""
|
|
330
|
+
```
|
|
273
331
|
|
|
274
|
-
|
|
332
|
+
6. Write constraints.json from template:
|
|
333
|
+
- Resolve template: check `~/.aether/system/templates/constraints.template.json` first, then `.aether/templates/constraints.template.json`
|
|
334
|
+
- If no template found: output "Template missing: constraints.template.json. Run aether update to fix." and stop
|
|
335
|
+
- Read template, follow `_instructions`, remove `_` prefixed keys, write to `.aether/data/constraints.json`
|
|
275
336
|
|
|
276
|
-
|
|
277
|
-
```
|
|
278
|
-
|
|
337
|
+
7. Initialize runtime files from templates (non-blocking):
|
|
338
|
+
```bash
|
|
339
|
+
for template in pheromones midden learning-observations; do
|
|
340
|
+
if [[ "$template" == "midden" ]]; then
|
|
341
|
+
target=".aether/data/midden/midden.json"
|
|
342
|
+
else
|
|
343
|
+
target=".aether/data/${template}.json"
|
|
344
|
+
fi
|
|
345
|
+
if [[ ! -f "$target" ]]; then
|
|
346
|
+
template_file=""
|
|
347
|
+
for path in ~/.aether/system/templates/${template}.template.json .aether/templates/${template}.template.json; do
|
|
348
|
+
if [[ -f "$path" ]]; then
|
|
349
|
+
template_file="$path"
|
|
350
|
+
break
|
|
351
|
+
fi
|
|
352
|
+
done
|
|
353
|
+
if [[ -n "$template_file" ]]; then
|
|
354
|
+
jq 'with_entries(select(.key | startswith("_") | not))' "$template_file" > "$target" 2>/dev/null || true
|
|
355
|
+
fi
|
|
356
|
+
fi
|
|
357
|
+
done
|
|
279
358
|
```
|
|
280
359
|
|
|
281
|
-
|
|
282
|
-
|
|
360
|
+
8. Run `bash .aether/aether-utils.sh context-update init "{approved_intent}"`
|
|
361
|
+
9. Run `bash .aether/aether-utils.sh validate-state colony`
|
|
362
|
+
10. Register repo (silent on failure):
|
|
363
|
+
```bash
|
|
364
|
+
domain_tags=$(bash .aether/aether-utils.sh domain-detect 2>/dev/null | jq -r '.result.tags // ""' || echo "")
|
|
365
|
+
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
|
|
283
366
|
cp ~/.aether/version.json .aether/version.json 2>/dev/null || true
|
|
284
367
|
```
|
|
368
|
+
11. Seed QUEEN.md from hive (non-blocking):
|
|
369
|
+
```bash
|
|
370
|
+
domain_tags=$(jq -r --arg repo "$(pwd)" \
|
|
371
|
+
'[.repos[] | select(.path == $repo) | .domain_tags // []] | .[0] // [] | join(",")' \
|
|
372
|
+
"$HOME/.aether/registry.json" 2>/dev/null || echo "")
|
|
373
|
+
seed_args="queen-seed-from-hive --limit 5"
|
|
374
|
+
[[ -n "$domain_tags" ]] && seed_args="$seed_args --domain $domain_tags"
|
|
375
|
+
seed_result=$(bash .aether/aether-utils.sh $seed_args 2>/dev/null || echo '{}')
|
|
376
|
+
seeded_count=$(echo "$seed_result" | jq -r '.result.seeded // 0' 2>/dev/null || echo "0")
|
|
377
|
+
```
|
|
378
|
+
12. Run `bash .aether/aether-utils.sh session-init "{session_id}" "{approved_intent}"`
|
|
379
|
+
|
|
380
|
+
**Pheromone auto-apply (referenced by both re-init and fresh init paths above):**
|
|
381
|
+
|
|
382
|
+
If approved pheromone suggestions exist (the user kept them in the prompt and didn't remove them during the approval loop):
|
|
383
|
+
|
|
384
|
+
For each approved pheromone suggestion, call:
|
|
385
|
+
```bash
|
|
386
|
+
bash .aether/aether-utils.sh pheromone-write "{type}" '{content}' --source "system:init" --reason '{reason}' --ttl "30d" 2>/dev/null || true
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
Implementation notes:
|
|
390
|
+
- 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.
|
|
391
|
+
- Use single quotes around pheromone content and reason to avoid shell metacharacter issues (per pitfall 4).
|
|
392
|
+
- Each `pheromone-write` call uses `2>/dev/null || true` to make it non-blocking -- a failed write should never stop colony creation.
|
|
393
|
+
- The `--source "system:init"` tag identifies these as init-derived pheromones.
|
|
394
|
+
- The `--ttl "30d"` gives suggestions a 30-day lifespan (project-level conventions, not phase-specific).
|
|
395
|
+
- `pheromone-write` handles deduplication via content hashing -- if a signal with the same content already exists, it will reinforce rather than duplicate.
|
|
285
396
|
|
|
286
|
-
|
|
397
|
+
### Step 7.5: Import Previous Colony Data (optional)
|
|
287
398
|
|
|
288
|
-
|
|
399
|
+
Check if previous colony chambers contain importable XML data:
|
|
289
400
|
|
|
290
|
-
**If visual_mode is true, render final swarm display (consolidated):**
|
|
291
401
|
```bash
|
|
292
|
-
|
|
402
|
+
# Find most recent chamber with XML files (per D-07)
|
|
403
|
+
latest_chamber=$(ls -d .aether/chambers/20* 2>/dev/null | sort -r | head -1)
|
|
404
|
+
xml_import_available=false
|
|
405
|
+
import_summary=""
|
|
406
|
+
|
|
407
|
+
if [[ -n "$latest_chamber" ]]; then
|
|
408
|
+
xml_count=$(find "$latest_chamber" -maxdepth 1 -name "*.xml" ! -name "colony-archive.xml" 2>/dev/null | wc -l | tr -d ' ')
|
|
409
|
+
if [[ "$xml_count" -gt 0 ]] && command -v xmllint >/dev/null 2>&1; then
|
|
410
|
+
xml_import_available=true
|
|
411
|
+
chamber_name=$(basename "$latest_chamber")
|
|
412
|
+
# Count importable items for display
|
|
413
|
+
signal_count=$(jq '.signals | length' "$latest_chamber/pheromones.json" 2>/dev/null || echo "0")
|
|
414
|
+
import_summary="Found ${signal_count} signal(s) and ${xml_count} XML file(s) from colony '${chamber_name}'"
|
|
415
|
+
fi
|
|
416
|
+
fi
|
|
293
417
|
```
|
|
294
418
|
|
|
295
|
-
|
|
419
|
+
**If xml_import_available is true:**
|
|
296
420
|
|
|
421
|
+
Display the import offer (per D-08):
|
|
297
422
|
```
|
|
298
423
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
299
|
-
|
|
424
|
+
PREVIOUS COLONY DATA FOUND
|
|
300
425
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
426
|
+
|
|
427
|
+
{import_summary}
|
|
428
|
+
|
|
429
|
+
Import signals and wisdom from this colony?
|
|
430
|
+
This will add to (not replace) your current colony data.
|
|
431
|
+
|
|
432
|
+
Import? (yes/no)
|
|
301
433
|
```
|
|
302
434
|
|
|
303
|
-
|
|
435
|
+
Use `AskUserQuestion` with yes/no options.
|
|
436
|
+
|
|
437
|
+
**If user selects "yes":**
|
|
304
438
|
|
|
439
|
+
Import ALL available data types (per D-09 -- no cherry-picking):
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
# Import pheromones (per D-09)
|
|
443
|
+
if [[ -f "$latest_chamber/pheromones.xml" ]]; then
|
|
444
|
+
pher_import=$(bash .aether/aether-utils.sh pheromone-import-xml "$latest_chamber/pheromones.xml" "imported" 2>/dev/null || echo '{"ok":false}')
|
|
445
|
+
pher_imported=$(echo "$pher_import" | jq -r '.result.imported // 0' 2>/dev/null || echo "0")
|
|
446
|
+
echo "Pheromones: ${pher_imported} signal(s) imported"
|
|
447
|
+
fi
|
|
448
|
+
|
|
449
|
+
# Import wisdom to queen-wisdom.json (per D-09)
|
|
450
|
+
if [[ -f "$latest_chamber/queen-wisdom.xml" ]]; then
|
|
451
|
+
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}')
|
|
452
|
+
wis_imported=$(echo "$wis_import" | jq -r '.result.imported // 0' 2>/dev/null || echo "0")
|
|
453
|
+
echo "Wisdom: ${wis_imported} entries(s) imported to queen-wisdom.json"
|
|
454
|
+
fi
|
|
455
|
+
|
|
456
|
+
# Import registry lineage (per D-09)
|
|
457
|
+
if [[ -f "$latest_chamber/colony-registry.xml" ]]; then
|
|
458
|
+
reg_import=$(bash .aether/aether-utils.sh registry-import-xml "$latest_chamber/colony-registry.xml" 2>/dev/null || echo '{"ok":false}')
|
|
459
|
+
reg_imported=$(echo "$reg_import" | jq -r '.result.imported // 0' 2>/dev/null || echo "0")
|
|
460
|
+
echo "Registry: ${reg_imported} colon(ies) lineage imported"
|
|
461
|
+
fi
|
|
305
462
|
```
|
|
306
|
-
👑 Queen has set the colony's intention
|
|
307
463
|
|
|
308
|
-
|
|
464
|
+
All imports are non-blocking -- log warning and continue if any fails.
|
|
309
465
|
|
|
310
|
-
|
|
466
|
+
**If user selects "no":**
|
|
311
467
|
|
|
312
|
-
|
|
313
|
-
🧠 Inherited from prior colony:
|
|
314
|
-
{N} instinct(s) | {N} learning(s)
|
|
315
|
-
{End if}
|
|
468
|
+
Display "Import skipped. Starting fresh colony." and proceed to Step 8.
|
|
316
469
|
|
|
317
|
-
|
|
318
|
-
🏘️ Nest Context: {N} sibling colonies detected
|
|
319
|
-
Context from related projects will be automatically considered
|
|
320
|
-
during planning and execution.
|
|
321
|
-
{End if}
|
|
470
|
+
**If xml_import_available is false (no chambers, no XML, or no xmllint):**
|
|
322
471
|
|
|
323
|
-
|
|
472
|
+
Skip silently -- proceed directly to Step 8 without any mention of import (per D-11).
|
|
473
|
+
### Step 8: Display Result
|
|
324
474
|
|
|
325
|
-
|
|
475
|
+
Display the success header and result block:
|
|
326
476
|
|
|
327
|
-
──────────────────────────────────────────────────
|
|
328
|
-
🐜 Next Up
|
|
329
|
-
──────────────────────────────────────────────────
|
|
330
|
-
/ant:plan 📋 Create execution plan
|
|
331
|
-
/ant:status 📊 Check colony state
|
|
332
|
-
/ant:focus 🎯 Set initial focus
|
|
333
477
|
```
|
|
478
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
479
|
+
A E T H E R C O L O N Y
|
|
480
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
334
481
|
|
|
335
|
-
|
|
482
|
+
Queen has set the colony's intention
|
|
336
483
|
|
|
337
|
-
|
|
484
|
+
"{approved_intent}"
|
|
338
485
|
|
|
339
|
-
|
|
340
|
-
|
|
486
|
+
Colony Status: READY
|
|
487
|
+
|
|
488
|
+
{If re-init: " Mode: Re-init (charter updated, state preserved)"}
|
|
489
|
+
{If fresh and seeded_count > 0: " Hive wisdom: {seeded_count} cross-colony pattern(s) seeded into QUEEN.md"}
|
|
490
|
+
|
|
491
|
+
State persisted -- safe to /clear, then run /ant:plan
|
|
492
|
+
|
|
493
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
494
|
+
Next Up
|
|
495
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
496
|
+
/ant:plan Generate execution plan
|
|
497
|
+
/ant:status Check colony state
|
|
498
|
+
/ant:focus Set initial focus
|
|
341
499
|
```
|