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
|
@@ -0,0 +1,814 @@
|
|
|
1
|
+
name: "ant:tunnels"
|
|
2
|
+
description: "🕳️🐜🕳️ Explore tunnels (browse archived colonies, compare chambers)"
|
|
3
|
+
body_claude: |
|
|
4
|
+
You are the **Queen**. Browse the colony history.
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
### Argument Handling
|
|
9
|
+
|
|
10
|
+
- No arguments: Show timeline view (Step 4)
|
|
11
|
+
- One argument: Show single chamber detail with seal document (Step 3)
|
|
12
|
+
- Two arguments: Compare two chambers side-by-side (Step 5)
|
|
13
|
+
- More than two: "Too many arguments. Use: /ant:tunnels [chamber1] [chamber2]"
|
|
14
|
+
|
|
15
|
+
### Step 1: Check for Chambers Directory
|
|
16
|
+
|
|
17
|
+
Check if `.aether/chambers/` exists.
|
|
18
|
+
|
|
19
|
+
If not:
|
|
20
|
+
```
|
|
21
|
+
TUNNELS — Colony Timeline
|
|
22
|
+
|
|
23
|
+
No chambers found.
|
|
24
|
+
|
|
25
|
+
Archive colonies with /ant:entomb to build the tunnel network.
|
|
26
|
+
```
|
|
27
|
+
Stop here.
|
|
28
|
+
|
|
29
|
+
### Step 2: List All Chambers
|
|
30
|
+
|
|
31
|
+
Run using the Bash tool with description "Loading chamber list...": `bash .aether/aether-utils.sh chamber-list`
|
|
32
|
+
|
|
33
|
+
Parse JSON result into array of chambers.
|
|
34
|
+
|
|
35
|
+
If no chambers (empty array):
|
|
36
|
+
```
|
|
37
|
+
TUNNELS — Colony Timeline
|
|
38
|
+
|
|
39
|
+
0 colonies archived
|
|
40
|
+
|
|
41
|
+
The tunnel network is empty.
|
|
42
|
+
Archive colonies with /ant:entomb to preserve history.
|
|
43
|
+
```
|
|
44
|
+
Stop here.
|
|
45
|
+
|
|
46
|
+
### Step 3: Detail View — Show Seal Document (if one argument provided)
|
|
47
|
+
|
|
48
|
+
If `$ARGUMENTS` is not empty and contains exactly one argument:
|
|
49
|
+
- Treat it as chamber name
|
|
50
|
+
- Check if `.aether/chambers/{arguments}/` exists
|
|
51
|
+
- If not found:
|
|
52
|
+
```
|
|
53
|
+
Chamber not found: {arguments}
|
|
54
|
+
|
|
55
|
+
Run /ant:tunnels to see available chambers.
|
|
56
|
+
```
|
|
57
|
+
Stop here.
|
|
58
|
+
|
|
59
|
+
**If CROWNED-ANTHILL.md exists in the chamber:**
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
seal_doc=".aether/chambers/{arguments}/CROWNED-ANTHILL.md"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Display the header:
|
|
66
|
+
```
|
|
67
|
+
CHAMBER DETAILS — {chamber_name}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then display the FULL content of `CROWNED-ANTHILL.md` (read and output the file contents — this IS the seal ceremony record).
|
|
71
|
+
|
|
72
|
+
After the seal document, check if `colony-archive.xml` exists in the chamber:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
chamber_has_xml=false
|
|
76
|
+
[[ -f ".aether/chambers/{chamber_name}/colony-archive.xml" ]] && chamber_has_xml=true
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**If `colony-archive.xml` exists in the chamber**, show footer with import option:
|
|
80
|
+
```
|
|
81
|
+
Chamber integrity: {hash_status from chamber-verify}
|
|
82
|
+
Chamber location: .aether/chambers/{chamber_name}/
|
|
83
|
+
XML Archive: colony-archive.xml found
|
|
84
|
+
|
|
85
|
+
Actions:
|
|
86
|
+
1. Import signals from this colony into current colony
|
|
87
|
+
2. Return to timeline
|
|
88
|
+
3. Compare with another chamber
|
|
89
|
+
|
|
90
|
+
Select an action (1/2/3)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Use AskUserQuestion with three options.
|
|
94
|
+
|
|
95
|
+
If option 1 selected: proceed to Step 6 (Import Signals from Chamber).
|
|
96
|
+
If option 2 selected: return to timeline (run /ant:tunnels).
|
|
97
|
+
If option 3 selected: prompt for second chamber name then run /ant:tunnels {chamber_a} {chamber_b}.
|
|
98
|
+
|
|
99
|
+
**If `colony-archive.xml` does NOT exist in the chamber**, show the existing footer unchanged:
|
|
100
|
+
```
|
|
101
|
+
Chamber integrity: {hash_status from chamber-verify}
|
|
102
|
+
Chamber location: .aether/chambers/{chamber_name}/
|
|
103
|
+
|
|
104
|
+
Run /ant:tunnels to return to timeline
|
|
105
|
+
Run /ant:tunnels {chamber_a} {chamber_b} to compare chambers
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**If CROWNED-ANTHILL.md does NOT exist (older chamber):**
|
|
109
|
+
|
|
110
|
+
Display the header:
|
|
111
|
+
```
|
|
112
|
+
CHAMBER DETAILS — {chamber_name}
|
|
113
|
+
|
|
114
|
+
(No seal document — this chamber was created before the sealing ceremony was introduced)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Fall back to manifest data display:
|
|
118
|
+
- Read `manifest.json` and show: goal, milestone, version, phases_completed, total_phases, entombed_at
|
|
119
|
+
- Show decisions count and learnings count from manifest
|
|
120
|
+
- Show hash status from `chamber-verify`
|
|
121
|
+
|
|
122
|
+
Footer with navigation guidance:
|
|
123
|
+
```
|
|
124
|
+
Run /ant:tunnels to return to timeline
|
|
125
|
+
Run /ant:tunnels {chamber_a} {chamber_b} to compare chambers
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
To get the hash status, run using the Bash tool with description "Verifying chamber integrity...":
|
|
129
|
+
- Run `bash .aether/aether-utils.sh chamber-verify .aether/chambers/{chamber_name}`
|
|
130
|
+
- If verified: hash_status = "verified"
|
|
131
|
+
- If not verified: hash_status = "hash mismatch"
|
|
132
|
+
- If error: hash_status = "error"
|
|
133
|
+
|
|
134
|
+
Stop here.
|
|
135
|
+
|
|
136
|
+
### Step 4: Timeline View (default, no arguments)
|
|
137
|
+
|
|
138
|
+
Display header:
|
|
139
|
+
```
|
|
140
|
+
TUNNELS — Colony Timeline
|
|
141
|
+
|
|
142
|
+
{count} colonies archived
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
For each chamber in sorted list (already sorted by `chamber-list` — newest first), display as a timeline entry:
|
|
146
|
+
```
|
|
147
|
+
[{date}] {milestone_emoji} {chamber_name}
|
|
148
|
+
{goal (truncated to 60 chars)}
|
|
149
|
+
{phases_completed} phases | {milestone}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Where `milestone_emoji` is:
|
|
153
|
+
- Crowned Anthill: crown emoji
|
|
154
|
+
- Sealed Chambers: lock emoji
|
|
155
|
+
- Other: circle emoji
|
|
156
|
+
|
|
157
|
+
After the timeline entries, show:
|
|
158
|
+
```
|
|
159
|
+
Run /ant:tunnels <chamber_name> to view seal document
|
|
160
|
+
Run /ant:tunnels <chamber_a> <chamber_b> to compare two colonies
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Use the entombed_at field from the chamber-list JSON to extract the date (first 10 chars of ISO timestamp).
|
|
164
|
+
|
|
165
|
+
Stop here.
|
|
166
|
+
|
|
167
|
+
### Step 5: Chamber Comparison Mode (Two Arguments)
|
|
168
|
+
|
|
169
|
+
If two arguments provided (chamber names separated by space):
|
|
170
|
+
- Treat as: `/ant:tunnels <chamber_a> <chamber_b>`
|
|
171
|
+
|
|
172
|
+
Check both chambers exist. If either missing:
|
|
173
|
+
```
|
|
174
|
+
Chamber not found: {chamber_name}
|
|
175
|
+
|
|
176
|
+
Available chambers:
|
|
177
|
+
{list from chamber-list}
|
|
178
|
+
```
|
|
179
|
+
Stop here.
|
|
180
|
+
|
|
181
|
+
Run comparison using the Bash tool with description "Comparing chambers...":
|
|
182
|
+
```bash
|
|
183
|
+
bash .aether/utils/chamber-compare.sh compare <chamber_a> <chamber_b>
|
|
184
|
+
bash .aether/utils/chamber-compare.sh stats <chamber_a> <chamber_b>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Display comparison header:
|
|
188
|
+
```
|
|
189
|
+
CHAMBER COMPARISON
|
|
190
|
+
|
|
191
|
+
{chamber_a} vs {chamber_b}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Display side-by-side comparison:
|
|
195
|
+
```
|
|
196
|
+
+---------------------+---------------------+
|
|
197
|
+
| {chamber_a} | {chamber_b} |
|
|
198
|
+
+---------------------+---------------------+
|
|
199
|
+
| Goal: {goal_a} | Goal: {goal_b} |
|
|
200
|
+
| | |
|
|
201
|
+
| {milestone_a} | {milestone_b} |
|
|
202
|
+
| {version_a} | {version_b} |
|
|
203
|
+
| | |
|
|
204
|
+
| {phases_a} done | {phases_b} done |
|
|
205
|
+
| of {total_a} | of {total_b} |
|
|
206
|
+
| | |
|
|
207
|
+
| {decisions_a} | {decisions_b} |
|
|
208
|
+
| decisions | decisions |
|
|
209
|
+
| | |
|
|
210
|
+
| {learnings_a} | {learnings_b} |
|
|
211
|
+
| learnings | learnings |
|
|
212
|
+
| | |
|
|
213
|
+
| {date_a} | {date_b} |
|
|
214
|
+
+---------------------+---------------------+
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Display growth metrics:
|
|
218
|
+
```
|
|
219
|
+
Growth Between Chambers:
|
|
220
|
+
Phases: +{phases_diff} ({phases_a} -> {phases_b})
|
|
221
|
+
Decisions: +{decisions_diff} new
|
|
222
|
+
Learnings: +{learnings_diff} new
|
|
223
|
+
Time: {time_between} days apart
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
If phases_diff > 0: show "Colony grew"
|
|
227
|
+
If phases_diff < 0: show "Colony reduced (unusual)"
|
|
228
|
+
If same_milestone: show "Same milestone reached"
|
|
229
|
+
If milestone changed: show "Milestone advanced: {milestone_a} -> {milestone_b}"
|
|
230
|
+
|
|
231
|
+
Display pheromone trail diff (new decisions/learnings in B) by running using the Bash tool with description "Analyzing pheromone differences...":
|
|
232
|
+
```bash
|
|
233
|
+
bash .aether/utils/chamber-compare.sh diff <chamber_a> <chamber_b>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Parse result and show:
|
|
237
|
+
```
|
|
238
|
+
New Decisions in {chamber_b}:
|
|
239
|
+
{N} new architectural decisions
|
|
240
|
+
{if N <= 5, list them; else show first 3 + "...and {N-3} more"}
|
|
241
|
+
|
|
242
|
+
New Learnings in {chamber_b}:
|
|
243
|
+
{N} new validated learnings
|
|
244
|
+
{if N <= 5, list them; else show first 3 + "...and {N-3} more"}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
If both chambers have `CROWNED-ANTHILL.md`, note:
|
|
248
|
+
```
|
|
249
|
+
Both colonies have seal documents. Run /ant:tunnels <name> to view individually.
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Footer:
|
|
253
|
+
```
|
|
254
|
+
Run /ant:tunnels to see all chambers
|
|
255
|
+
Run /ant:tunnels <chamber> to view single chamber details
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Stop here.
|
|
259
|
+
|
|
260
|
+
### Step 6: Import Signals from Chamber
|
|
261
|
+
|
|
262
|
+
When user selects "Import signals" from Step 3:
|
|
263
|
+
|
|
264
|
+
**Step 6.1: Check XML tools** by running using the Bash tool with description "Checking XML tools...":
|
|
265
|
+
```bash
|
|
266
|
+
if command -v xmllint >/dev/null 2>&1; then
|
|
267
|
+
xmllint_available=true
|
|
268
|
+
else
|
|
269
|
+
xmllint_available=false
|
|
270
|
+
fi
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
If xmllint not available:
|
|
274
|
+
```
|
|
275
|
+
Import requires xmllint. Install it first:
|
|
276
|
+
macOS: xcode-select --install
|
|
277
|
+
Linux: apt-get install libxml2-utils
|
|
278
|
+
```
|
|
279
|
+
Stop here (return to timeline).
|
|
280
|
+
|
|
281
|
+
**Step 6.2: Extract source colony name** by running using the Bash tool with description "Extracting colony info...":
|
|
282
|
+
```bash
|
|
283
|
+
chamber_xml=".aether/chambers/{chamber_name}/colony-archive.xml"
|
|
284
|
+
# Extract colony_id from the archive root element
|
|
285
|
+
source_colony=$(xmllint --xpath "string(/*/@colony_id)" "$chamber_xml" 2>/dev/null)
|
|
286
|
+
[[ -z "$source_colony" ]] && source_colony="{chamber_name}"
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Step 6.3: Extract pheromone section and show import preview**
|
|
290
|
+
|
|
291
|
+
The combined `colony-archive.xml` contains pheromones, wisdom, and registry sections. Extract the pheromone section to a temp file before counting or importing. This prevents over-counting signals from wisdom/registry sections and ensures `pheromone-import-xml` receives the format it expects (`<pheromones>` as root element).
|
|
292
|
+
|
|
293
|
+
Run using the Bash tool with description "Extracting pheromone signals...":
|
|
294
|
+
```bash
|
|
295
|
+
# Extract the <pheromones> section from the combined archive into a standalone temp file
|
|
296
|
+
import_tmp_dir=$(mktemp -d)
|
|
297
|
+
import_tmp_pheromones="$import_tmp_dir/pheromones-extracted.xml"
|
|
298
|
+
|
|
299
|
+
# Use xmllint to extract the pheromones element (with its namespace)
|
|
300
|
+
xmllint --xpath "//*[local-name()='pheromones']" "$chamber_xml" > "$import_tmp_pheromones" 2>/dev/null
|
|
301
|
+
|
|
302
|
+
# Add XML declaration to make it a standalone well-formed document
|
|
303
|
+
if [[ -s "$import_tmp_pheromones" ]]; then
|
|
304
|
+
# Portable approach: prepend declaration via temp file (avoids macOS/Linux sed -i differences)
|
|
305
|
+
{ echo '<?xml version="1.0" encoding="UTF-8"?>'; cat "$import_tmp_pheromones"; } > "$import_tmp_dir/tmp_decl.xml"
|
|
306
|
+
mv "$import_tmp_dir/tmp_decl.xml" "$import_tmp_pheromones"
|
|
307
|
+
fi
|
|
308
|
+
|
|
309
|
+
# Count pheromone signals in extracted pheromone-only XML
|
|
310
|
+
# Scoped to pheromone section only — no over-counting from wisdom/registry sections
|
|
311
|
+
pheromone_count=$(xmllint --xpath "count(//*[local-name()='signal'])" "$import_tmp_pheromones" 2>/dev/null || echo "unknown")
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Display:
|
|
315
|
+
```
|
|
316
|
+
IMPORT FROM COLONY: {source_colony}
|
|
317
|
+
|
|
318
|
+
Source: .aether/chambers/{chamber_name}/colony-archive.xml
|
|
319
|
+
Signals available: ~{pheromone_count} pheromone signals
|
|
320
|
+
|
|
321
|
+
Import behavior:
|
|
322
|
+
- Signals tagged with prefix "{source_colony}:" to identify origin
|
|
323
|
+
- Additive merge — your current signals are never overwritten
|
|
324
|
+
- On conflict, your current colony wins
|
|
325
|
+
|
|
326
|
+
Import these signals? (yes/no)
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Use AskUserQuestion with yes/no options.
|
|
330
|
+
|
|
331
|
+
If no: "Import cancelled." Clean up: `rm -rf "$import_tmp_dir"`. Return to timeline.
|
|
332
|
+
|
|
333
|
+
**Step 6.4: Perform import**
|
|
334
|
+
|
|
335
|
+
Pass the extracted pheromone-only temp file (NOT the combined `colony-archive.xml`) to `pheromone-import-xml`, along with `$source_colony` as the second argument. This ensures:
|
|
336
|
+
1. `pheromone-import-xml` receives XML with `<pheromones>` as root element (the format it expects)
|
|
337
|
+
2. The prefix-tagging logic prepends `${source_colony}:` to each imported signal's ID before the merge
|
|
338
|
+
|
|
339
|
+
Run using the Bash tool with description "Importing pheromone signals...":
|
|
340
|
+
```bash
|
|
341
|
+
# Import the EXTRACTED pheromone-only XML (NOT the combined colony-archive.xml)
|
|
342
|
+
# $import_tmp_pheromones has <pheromones> as root — the format pheromone-import-xml expects
|
|
343
|
+
# Second argument triggers prefix-tagging — imported signal IDs become "{source_colony}:original_id"
|
|
344
|
+
import_result=$(bash .aether/aether-utils.sh pheromone-import-xml "$import_tmp_pheromones" "$source_colony" 2>&1)
|
|
345
|
+
import_ok=$(echo "$import_result" | jq -r '.ok // false' 2>/dev/null)
|
|
346
|
+
|
|
347
|
+
if [[ "$import_ok" == "true" ]]; then
|
|
348
|
+
imported_count=$(echo "$import_result" | jq -r '.result.signal_count // 0' 2>/dev/null)
|
|
349
|
+
else
|
|
350
|
+
imported_count=0
|
|
351
|
+
import_error=$(echo "$import_result" | jq -r '.error // "Unknown error"' 2>/dev/null)
|
|
352
|
+
fi
|
|
353
|
+
|
|
354
|
+
# Clean up temp files
|
|
355
|
+
rm -rf "$import_tmp_dir"
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Step 6.5: Display result**
|
|
359
|
+
|
|
360
|
+
If import succeeded:
|
|
361
|
+
```
|
|
362
|
+
SIGNALS IMPORTED
|
|
363
|
+
|
|
364
|
+
Source: {source_colony}
|
|
365
|
+
Imported: {imported_count} pheromone signals
|
|
366
|
+
Tagged with: "{source_colony}:" prefix
|
|
367
|
+
|
|
368
|
+
Your colony now carries wisdom from {source_colony}.
|
|
369
|
+
Run /ant:status to see current colony state.
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
If import failed:
|
|
373
|
+
```
|
|
374
|
+
Import failed: {import_error}
|
|
375
|
+
|
|
376
|
+
The archive may be malformed. Check:
|
|
377
|
+
.aether/chambers/{chamber_name}/colony-archive.xml
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### Edge Cases
|
|
381
|
+
|
|
382
|
+
**Malformed manifest:** show "Invalid manifest" for that chamber and skip it.
|
|
383
|
+
|
|
384
|
+
**Missing COLONY_STATE.json:** show "Incomplete chamber" for that chamber.
|
|
385
|
+
|
|
386
|
+
**Very long chamber list:** display all (no pagination for now).
|
|
387
|
+
|
|
388
|
+
**Older chambers without CROWNED-ANTHILL.md:** Fall back to manifest data in detail view.
|
|
389
|
+
|
|
390
|
+
### Step 7: Next Up
|
|
391
|
+
|
|
392
|
+
Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
|
|
393
|
+
```bash
|
|
394
|
+
state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
|
|
395
|
+
current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
|
|
396
|
+
total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
|
|
397
|
+
bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
## Implementation Notes
|
|
401
|
+
|
|
402
|
+
The `chamber-list` utility returns JSON in this format:
|
|
403
|
+
```json
|
|
404
|
+
{
|
|
405
|
+
"ok": true,
|
|
406
|
+
"result": [
|
|
407
|
+
{
|
|
408
|
+
"name": "add-user-auth-20260214-153022",
|
|
409
|
+
"goal": "Add user authentication",
|
|
410
|
+
"milestone": "Sealed Chambers",
|
|
411
|
+
"phases_completed": 5,
|
|
412
|
+
"entombed_at": "2026-02-14T15:30:22Z"
|
|
413
|
+
}
|
|
414
|
+
]
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Parse with jq: `jq -r '.result[] | "\(.name)|\(.goal)|\(.milestone)|\(.phases_completed)|\(.entombed_at)"'`
|
|
419
|
+
|
|
420
|
+
For detail view, read manifest.json directly:
|
|
421
|
+
```bash
|
|
422
|
+
jq -r '.goal, .milestone, .version, .phases_completed, .total_phases, .entombed_at, (.decisions | length), (.learnings | length)' .aether/chambers/{name}/manifest.json
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
body_opencode: |
|
|
426
|
+
You are the **Queen**. Browse the colony history.
|
|
427
|
+
|
|
428
|
+
## Instructions
|
|
429
|
+
|
|
430
|
+
### Step 1: Check for Chambers Directory
|
|
431
|
+
|
|
432
|
+
Check if `.aether/chambers/` exists.
|
|
433
|
+
|
|
434
|
+
If not:
|
|
435
|
+
```
|
|
436
|
+
🕳️ ═══════════════════════════════════════════════════
|
|
437
|
+
T U N N E L S (Colony History)
|
|
438
|
+
══════════════════════════════════════════════════ 🕳️
|
|
439
|
+
|
|
440
|
+
No chambers found.
|
|
441
|
+
|
|
442
|
+
Archive colonies with /ant:entomb to build the tunnel network.
|
|
443
|
+
```
|
|
444
|
+
Stop here.
|
|
445
|
+
|
|
446
|
+
### Step 2: List All Chambers
|
|
447
|
+
|
|
448
|
+
Run: `bash .aether/aether-utils.sh chamber-list`
|
|
449
|
+
|
|
450
|
+
Parse JSON result into array of chambers.
|
|
451
|
+
|
|
452
|
+
If no chambers (empty array):
|
|
453
|
+
```
|
|
454
|
+
🕳️ ═══════════════════════════════════════════════════
|
|
455
|
+
T U N N E L S (Colony History)
|
|
456
|
+
══════════════════════════════════════════════════ 🕳️
|
|
457
|
+
|
|
458
|
+
Chambers: 0 colonies archived
|
|
459
|
+
|
|
460
|
+
The tunnel network is empty.
|
|
461
|
+
Archive colonies with /ant:entomb to preserve history.
|
|
462
|
+
```
|
|
463
|
+
Stop here.
|
|
464
|
+
|
|
465
|
+
### Step 3: Handle Detail View (if argument provided)
|
|
466
|
+
|
|
467
|
+
If `$normalized_args` is not empty:
|
|
468
|
+
- Treat it as chamber name
|
|
469
|
+
- Check if `.aether/chambers/{arguments}/` exists
|
|
470
|
+
- If not found:
|
|
471
|
+
```
|
|
472
|
+
Chamber not found: {arguments}
|
|
473
|
+
|
|
474
|
+
Run /ant:tunnels to see available chambers.
|
|
475
|
+
```
|
|
476
|
+
Stop here.
|
|
477
|
+
|
|
478
|
+
- If found, read manifest.json and display detailed view:
|
|
479
|
+
```
|
|
480
|
+
🕳️ ═══════════════════════════════════════════════════
|
|
481
|
+
C H A M B E R D E T A I L S
|
|
482
|
+
══════════════════════════════════════════════════ 🕳️
|
|
483
|
+
|
|
484
|
+
📦 {chamber_name}
|
|
485
|
+
|
|
486
|
+
👑 Goal:
|
|
487
|
+
{goal}
|
|
488
|
+
|
|
489
|
+
🏆 Milestone: {milestone} ({version})
|
|
490
|
+
📍 Progress: {phases_completed} of {total_phases} phases
|
|
491
|
+
📅 Entombed: {entombed_at}
|
|
492
|
+
|
|
493
|
+
{If decisions exist:}
|
|
494
|
+
🧠 Decisions Preserved:
|
|
495
|
+
{N} architectural decisions recorded
|
|
496
|
+
{End if}
|
|
497
|
+
|
|
498
|
+
{If learnings exist:}
|
|
499
|
+
💡 Learnings Preserved:
|
|
500
|
+
{N} validated learnings recorded
|
|
501
|
+
{End if}
|
|
502
|
+
|
|
503
|
+
📁 Files:
|
|
504
|
+
- COLONY_STATE.json (verified: {hash_status})
|
|
505
|
+
- manifest.json
|
|
506
|
+
|
|
507
|
+
Run /ant:tunnels to return to chamber list.
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
To get the counts and hash status:
|
|
511
|
+
- Run `bash .aether/aether-utils.sh chamber-verify .aether/chambers/{chamber_name}`
|
|
512
|
+
- If verified: hash_status = "✅"
|
|
513
|
+
- If not verified: hash_status = "⚠️ hash mismatch"
|
|
514
|
+
- If error: hash_status = "⚠️ error"
|
|
515
|
+
|
|
516
|
+
Check if `colony-archive.xml` exists in the chamber:
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
chamber_has_xml=false
|
|
520
|
+
[[ -f ".aether/chambers/{chamber_name}/colony-archive.xml" ]] && chamber_has_xml=true
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
**If `colony-archive.xml` exists**, add import option to the detail view footer:
|
|
524
|
+
```
|
|
525
|
+
📁 Files:
|
|
526
|
+
- COLONY_STATE.json (verified: {hash_status})
|
|
527
|
+
- manifest.json
|
|
528
|
+
- colony-archive.xml (XML Archive)
|
|
529
|
+
|
|
530
|
+
Actions:
|
|
531
|
+
1. Import signals from this colony into current colony
|
|
532
|
+
2. Return to chamber list
|
|
533
|
+
|
|
534
|
+
Select an action (1/2)
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
Use AskUserQuestion with two options.
|
|
538
|
+
|
|
539
|
+
If option 1 selected: proceed to Step 6 (Import Signals from Chamber).
|
|
540
|
+
If option 2 selected: return to chamber list (run /ant:tunnels).
|
|
541
|
+
|
|
542
|
+
**If `colony-archive.xml` does NOT exist**, show existing footer unchanged:
|
|
543
|
+
```
|
|
544
|
+
Run /ant:tunnels to return to chamber list.
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
Stop here.
|
|
548
|
+
|
|
549
|
+
### Step 5: Chamber Comparison Mode (Two Arguments)
|
|
550
|
+
|
|
551
|
+
If two arguments provided (chamber names separated by space):
|
|
552
|
+
- Treat as: `/ant:tunnels <chamber_a> <chamber_b>`
|
|
553
|
+
- Run comparison: `bash .aether/utils/chamber-compare.sh compare <chamber_a> <chamber_b>`
|
|
554
|
+
|
|
555
|
+
If either chamber not found:
|
|
556
|
+
```
|
|
557
|
+
Chamber not found: {chamber_name}
|
|
558
|
+
|
|
559
|
+
Available chambers:
|
|
560
|
+
{list from chamber-list}
|
|
561
|
+
```
|
|
562
|
+
Stop here.
|
|
563
|
+
|
|
564
|
+
Display comparison header:
|
|
565
|
+
```
|
|
566
|
+
🕳️ ═══════════════════════════════════════════════════
|
|
567
|
+
C H A M B E R C O M P A R I S O N
|
|
568
|
+
══════════════════════════════════════════════════ 🕳️
|
|
569
|
+
|
|
570
|
+
📦 {chamber_a} vs 📦 {chamber_b}
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
Display side-by-side comparison:
|
|
574
|
+
```
|
|
575
|
+
┌─────────────────────┬─────────────────────┐
|
|
576
|
+
│ {chamber_a} │ {chamber_b} │
|
|
577
|
+
├─────────────────────┼─────────────────────┤
|
|
578
|
+
│ 👑 {goal_a} │ 👑 {goal_b} │
|
|
579
|
+
│ │ │
|
|
580
|
+
│ 🏆 {milestone_a} │ 🏆 {milestone_b} │
|
|
581
|
+
│ {version_a} │ {version_b} │
|
|
582
|
+
│ │ │
|
|
583
|
+
│ 📍 {phases_a} done │ 📍 {phases_b} done │
|
|
584
|
+
│ of {total_a} │ of {total_b} │
|
|
585
|
+
│ │ │
|
|
586
|
+
│ 🧠 {decisions_a} │ 🧠 {decisions_b} │
|
|
587
|
+
│ decisions │ decisions │
|
|
588
|
+
│ │ │
|
|
589
|
+
│ 💡 {learnings_a} │ 💡 {learnings_b} │
|
|
590
|
+
│ learnings │ learnings │
|
|
591
|
+
│ │ │
|
|
592
|
+
│ 📅 {date_a} │ 📅 {date_b} │
|
|
593
|
+
└─────────────────────┴─────────────────────┘
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
Display growth metrics:
|
|
597
|
+
```
|
|
598
|
+
📈 Growth Between Chambers:
|
|
599
|
+
Phases: +{phases_diff} ({phases_a} → {phases_b})
|
|
600
|
+
Decisions: +{decisions_diff} new
|
|
601
|
+
Learnings: +{learnings_diff} new
|
|
602
|
+
Time: {time_between} days apart
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
If phases_diff > 0: show "📈 Colony grew"
|
|
606
|
+
If phases_diff < 0: show "📉 Colony reduced (unusual)"
|
|
607
|
+
If same_milestone: show "🏆 Same milestone reached"
|
|
608
|
+
If milestone changed: show "🏆 Milestone advanced: {milestone_a} → {milestone_b}"
|
|
609
|
+
|
|
610
|
+
Display pheromone trail diff (new decisions/learnings in B):
|
|
611
|
+
```bash
|
|
612
|
+
bash .aether/utils/chamber-compare.sh diff <chamber_a> <chamber_b>
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
Parse result and show:
|
|
616
|
+
```
|
|
617
|
+
🧠 New Decisions in {chamber_b}:
|
|
618
|
+
{N} new architectural decisions
|
|
619
|
+
{if N <= 5, list them; else show first 3 + "...and {N-3} more"}
|
|
620
|
+
|
|
621
|
+
💡 New Learnings in {chamber_b}:
|
|
622
|
+
{N} new validated learnings
|
|
623
|
+
{if N <= 5, list them; else show first 3 + "...and {N-3} more"}
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
Display knowledge preservation:
|
|
627
|
+
```
|
|
628
|
+
📚 Knowledge Preservation:
|
|
629
|
+
{preserved_decisions} decisions carried forward
|
|
630
|
+
{preserved_learnings} learnings carried forward
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
Footer:
|
|
634
|
+
```
|
|
635
|
+
Run /ant:tunnels to see all chambers
|
|
636
|
+
Run /ant:tunnels <chamber> to view single chamber details
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
Stop here.
|
|
640
|
+
|
|
641
|
+
### Step 4: Display Chamber List (default view)
|
|
642
|
+
|
|
643
|
+
```
|
|
644
|
+
🕳️ ═══════════════════════════════════════════════════
|
|
645
|
+
T U N N E L S (Colony History)
|
|
646
|
+
══════════════════════════════════════════════════ 🕳️
|
|
647
|
+
|
|
648
|
+
Chambers: {count} colonies archived
|
|
649
|
+
|
|
650
|
+
{For each chamber in sorted list:}
|
|
651
|
+
📦 {chamber_name}
|
|
652
|
+
👑 {goal (truncated to 50 chars)}
|
|
653
|
+
🏆 {milestone} ({version})
|
|
654
|
+
📍 {phases_completed} phases | 📅 {date}
|
|
655
|
+
|
|
656
|
+
{End for}
|
|
657
|
+
|
|
658
|
+
Run /ant:tunnels <chamber_name> to view details
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
**Formatting details:**
|
|
662
|
+
- Sort by entombed_at descending (newest first) - already sorted by chamber-list
|
|
663
|
+
- Truncate goal to 50 characters with "..." if longer
|
|
664
|
+
- Format date as YYYY-MM-DD from ISO timestamp (extract first 10 chars of entombed_at)
|
|
665
|
+
- Show chamber count at top
|
|
666
|
+
|
|
667
|
+
**Edge cases:**
|
|
668
|
+
- Malformed manifest: show "⚠️ Invalid manifest" for that chamber and skip it
|
|
669
|
+
- Missing COLONY_STATE.json: show "⚠️ Incomplete chamber" for that chamber
|
|
670
|
+
- Very long chamber list: display all (no pagination for now)
|
|
671
|
+
|
|
672
|
+
### Step 6: Import Signals from Chamber
|
|
673
|
+
|
|
674
|
+
When user selects "Import signals" from Step 3:
|
|
675
|
+
|
|
676
|
+
**Step 6.1: Check XML tools**
|
|
677
|
+
```bash
|
|
678
|
+
if command -v xmllint >/dev/null 2>&1; then
|
|
679
|
+
xmllint_available=true
|
|
680
|
+
else
|
|
681
|
+
xmllint_available=false
|
|
682
|
+
fi
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
If xmllint not available:
|
|
686
|
+
```
|
|
687
|
+
Import requires xmllint. Install it first:
|
|
688
|
+
macOS: xcode-select --install
|
|
689
|
+
Linux: apt-get install libxml2-utils
|
|
690
|
+
```
|
|
691
|
+
Stop here (return to chamber list).
|
|
692
|
+
|
|
693
|
+
**Step 6.2: Extract source colony name**
|
|
694
|
+
```bash
|
|
695
|
+
chamber_xml=".aether/chambers/{chamber_name}/colony-archive.xml"
|
|
696
|
+
# Extract colony_id from the archive root element
|
|
697
|
+
source_colony=$(xmllint --xpath "string(/*/@colony_id)" "$chamber_xml" 2>/dev/null)
|
|
698
|
+
[[ -z "$source_colony" ]] && source_colony="{chamber_name}"
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
**Step 6.3: Extract pheromone section and show import preview**
|
|
702
|
+
|
|
703
|
+
The combined `colony-archive.xml` contains pheromones, wisdom, and registry sections. Extract the pheromone section to a temp file before counting or importing. This prevents over-counting signals from wisdom/registry sections and ensures `pheromone-import-xml` receives the format it expects (`<pheromones>` as root element).
|
|
704
|
+
|
|
705
|
+
```bash
|
|
706
|
+
# Extract the <pheromones> section from the combined archive into a standalone temp file
|
|
707
|
+
import_tmp_dir=$(mktemp -d)
|
|
708
|
+
import_tmp_pheromones="$import_tmp_dir/pheromones-extracted.xml"
|
|
709
|
+
|
|
710
|
+
# Use xmllint to extract the pheromones element (with its namespace)
|
|
711
|
+
xmllint --xpath "//*[local-name()='pheromones']" "$chamber_xml" > "$import_tmp_pheromones" 2>/dev/null
|
|
712
|
+
|
|
713
|
+
# Add XML declaration to make it a standalone well-formed document
|
|
714
|
+
if [[ -s "$import_tmp_pheromones" ]]; then
|
|
715
|
+
# Portable approach: prepend declaration via temp file (avoids macOS/Linux sed -i differences)
|
|
716
|
+
{ echo '<?xml version="1.0" encoding="UTF-8"?>'; cat "$import_tmp_pheromones"; } > "$import_tmp_dir/tmp_decl.xml"
|
|
717
|
+
mv "$import_tmp_dir/tmp_decl.xml" "$import_tmp_pheromones"
|
|
718
|
+
fi
|
|
719
|
+
|
|
720
|
+
# Count pheromone signals in extracted pheromone-only XML
|
|
721
|
+
# Scoped to pheromone section only — no over-counting from wisdom/registry sections
|
|
722
|
+
pheromone_count=$(xmllint --xpath "count(//*[local-name()='signal'])" "$import_tmp_pheromones" 2>/dev/null || echo "unknown")
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
Display:
|
|
726
|
+
```
|
|
727
|
+
IMPORT FROM COLONY: {source_colony}
|
|
728
|
+
|
|
729
|
+
Source: .aether/chambers/{chamber_name}/colony-archive.xml
|
|
730
|
+
Signals available: ~{pheromone_count} pheromone signals
|
|
731
|
+
|
|
732
|
+
Import behavior:
|
|
733
|
+
- Signals tagged with prefix "{source_colony}:" to identify origin
|
|
734
|
+
- Additive merge — your current signals are never overwritten
|
|
735
|
+
- On conflict, your current colony wins
|
|
736
|
+
|
|
737
|
+
Import these signals? (yes/no)
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
Use AskUserQuestion with yes/no options.
|
|
741
|
+
|
|
742
|
+
If no: "Import cancelled." Clean up: `rm -rf "$import_tmp_dir"`. Return to chamber list.
|
|
743
|
+
|
|
744
|
+
**Step 6.4: Perform import**
|
|
745
|
+
|
|
746
|
+
Pass the extracted pheromone-only temp file (NOT the combined `colony-archive.xml`) to `pheromone-import-xml`, along with `$source_colony` as the second argument. This ensures:
|
|
747
|
+
1. `pheromone-import-xml` receives XML with `<pheromones>` as root element (the format it expects)
|
|
748
|
+
2. The prefix-tagging logic prepends `${source_colony}:` to each imported signal's ID before the merge
|
|
749
|
+
|
|
750
|
+
```bash
|
|
751
|
+
# Import the EXTRACTED pheromone-only XML (NOT the combined colony-archive.xml)
|
|
752
|
+
# $import_tmp_pheromones has <pheromones> as root — the format pheromone-import-xml expects
|
|
753
|
+
# Second argument triggers prefix-tagging — imported signal IDs become "{source_colony}:original_id"
|
|
754
|
+
import_result=$(bash .aether/aether-utils.sh pheromone-import-xml "$import_tmp_pheromones" "$source_colony" 2>&1)
|
|
755
|
+
import_ok=$(echo "$import_result" | jq -r '.ok // false' 2>/dev/null)
|
|
756
|
+
|
|
757
|
+
if [[ "$import_ok" == "true" ]]; then
|
|
758
|
+
imported_count=$(echo "$import_result" | jq -r '.result.signal_count // 0' 2>/dev/null)
|
|
759
|
+
else
|
|
760
|
+
imported_count=0
|
|
761
|
+
import_error=$(echo "$import_result" | jq -r '.error // "Unknown error"' 2>/dev/null)
|
|
762
|
+
fi
|
|
763
|
+
|
|
764
|
+
# Clean up temp files
|
|
765
|
+
rm -rf "$import_tmp_dir"
|
|
766
|
+
```
|
|
767
|
+
|
|
768
|
+
**Step 6.5: Display result**
|
|
769
|
+
|
|
770
|
+
If import succeeded:
|
|
771
|
+
```
|
|
772
|
+
SIGNALS IMPORTED
|
|
773
|
+
|
|
774
|
+
Source: {source_colony}
|
|
775
|
+
Imported: {imported_count} pheromone signals
|
|
776
|
+
Tagged with: "{source_colony}:" prefix
|
|
777
|
+
|
|
778
|
+
Your colony now carries wisdom from {source_colony}.
|
|
779
|
+
Run /ant:status to see current colony state.
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
If import failed:
|
|
783
|
+
```
|
|
784
|
+
Import failed: {import_error}
|
|
785
|
+
|
|
786
|
+
The archive may be malformed. Check:
|
|
787
|
+
.aether/chambers/{chamber_name}/colony-archive.xml
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
## Implementation Notes
|
|
791
|
+
|
|
792
|
+
The `chamber-list` utility returns JSON in this format:
|
|
793
|
+
```json
|
|
794
|
+
{
|
|
795
|
+
"ok": true,
|
|
796
|
+
"result": [
|
|
797
|
+
{
|
|
798
|
+
"name": "add-user-auth-20260214-153022",
|
|
799
|
+
"goal": "Add user authentication",
|
|
800
|
+
"milestone": "Sealed Chambers",
|
|
801
|
+
"phases_completed": 5,
|
|
802
|
+
"entombed_at": "2026-02-14T15:30:22Z"
|
|
803
|
+
}
|
|
804
|
+
]
|
|
805
|
+
}
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
Parse with jq: `jq -r '.result[] | "\(.name)|\(.goal)|\(.milestone)|\(.phases_completed)|\(.entombed_at)"'`
|
|
809
|
+
|
|
810
|
+
For detail view, read manifest.json directly:
|
|
811
|
+
```bash
|
|
812
|
+
jq -r '.goal, .milestone, .version, .phases_completed, .total_phases, .entombed_at, (.decisions | length), (.learnings | length)' .aether/chambers/{name}/manifest.json
|
|
813
|
+
```
|
|
814
|
+
|