aether-colony 3.1.17 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.aether/aether-utils.sh +5354 -0
- package/.aether/agents-claude/aether-ambassador.md +265 -0
- package/.aether/agents-claude/aether-archaeologist.md +327 -0
- package/.aether/agents-claude/aether-architect.md +236 -0
- package/.aether/agents-claude/aether-auditor.md +271 -0
- package/.aether/agents-claude/aether-builder.md +224 -0
- package/.aether/agents-claude/aether-chaos.md +269 -0
- package/.aether/agents-claude/aether-chronicler.md +305 -0
- package/.aether/agents-claude/aether-gatekeeper.md +330 -0
- package/.aether/agents-claude/aether-includer.md +374 -0
- package/.aether/agents-claude/aether-keeper.md +272 -0
- package/.aether/agents-claude/aether-measurer.md +322 -0
- package/.aether/agents-claude/aether-oracle.md +237 -0
- package/.aether/agents-claude/aether-probe.md +211 -0
- package/.aether/agents-claude/aether-queen.md +330 -0
- package/.aether/agents-claude/aether-route-setter.md +178 -0
- package/.aether/agents-claude/aether-sage.md +418 -0
- package/.aether/agents-claude/aether-scout.md +179 -0
- package/.aether/agents-claude/aether-surveyor-disciplines.md +417 -0
- package/.aether/agents-claude/aether-surveyor-nest.md +355 -0
- package/.aether/agents-claude/aether-surveyor-pathogens.md +289 -0
- package/.aether/agents-claude/aether-surveyor-provisions.md +360 -0
- package/.aether/agents-claude/aether-tracker.md +270 -0
- package/.aether/agents-claude/aether-watcher.md +280 -0
- package/.aether/agents-claude/aether-weaver.md +248 -0
- package/.aether/commands/archaeology.yaml +653 -0
- package/.aether/commands/build.yaml +1221 -0
- package/.aether/commands/chaos.yaml +653 -0
- package/.aether/commands/colonize.yaml +438 -0
- package/.aether/commands/continue.yaml +1484 -0
- package/.aether/commands/council.yaml +304 -0
- package/.aether/commands/data-clean.yaml +80 -0
- package/.aether/commands/dream.yaml +275 -0
- package/.aether/commands/entomb.yaml +863 -0
- package/.aether/commands/export-signals.yaml +64 -0
- package/.aether/commands/feedback.yaml +158 -0
- package/.aether/commands/flag.yaml +160 -0
- package/.aether/commands/flags.yaml +177 -0
- package/.aether/commands/focus.yaml +112 -0
- package/.aether/commands/help.yaml +167 -0
- package/.aether/commands/history.yaml +137 -0
- package/.aether/commands/import-signals.yaml +79 -0
- package/.aether/commands/init.yaml +469 -0
- package/.aether/commands/insert-phase.yaml +98 -0
- package/.aether/commands/interpret.yaml +285 -0
- package/.aether/commands/lay-eggs.yaml +224 -0
- package/.aether/commands/maturity.yaml +122 -0
- package/.aether/commands/memory-details.yaml +74 -0
- package/.aether/commands/migrate-state.yaml +174 -0
- package/.aether/commands/oracle.yaml +1224 -0
- package/.aether/commands/organize.yaml +446 -0
- package/.aether/commands/patrol.yaml +621 -0
- package/.aether/commands/pause-colony.yaml +424 -0
- package/.aether/commands/phase.yaml +124 -0
- package/.aether/commands/pheromones.yaml +153 -0
- package/.aether/commands/plan.yaml +1313 -0
- package/.aether/commands/preferences.yaml +63 -0
- package/.aether/commands/redirect.yaml +123 -0
- package/.aether/commands/resume-colony.yaml +373 -0
- package/.aether/commands/resume.yaml +398 -0
- package/.aether/commands/run.yaml +193 -0
- package/.aether/commands/seal.yaml +1205 -0
- package/.aether/commands/skill-create.yaml +337 -0
- package/.aether/commands/status.yaml +364 -0
- package/.aether/commands/swarm.yaml +352 -0
- package/.aether/commands/tunnels.yaml +814 -0
- package/.aether/commands/update.yaml +131 -0
- package/.aether/commands/verify-castes.yaml +159 -0
- package/.aether/commands/watch.yaml +454 -0
- package/.aether/docs/INCIDENT_TEMPLATE.md +32 -0
- package/.aether/docs/QUEEN-SYSTEM.md +211 -0
- package/.aether/docs/README.md +98 -0
- package/.aether/docs/caste-system.md +48 -0
- package/.aether/docs/command-playbooks/README.md +23 -0
- package/.aether/docs/command-playbooks/build-complete.md +349 -0
- package/.aether/docs/command-playbooks/build-context.md +282 -0
- package/.aether/docs/command-playbooks/build-full.md +1682 -0
- package/.aether/docs/command-playbooks/build-prep.md +283 -0
- package/.aether/docs/command-playbooks/build-verify.md +405 -0
- package/.aether/docs/command-playbooks/build-wave.md +749 -0
- package/.aether/docs/command-playbooks/continue-advance.md +524 -0
- package/.aether/docs/command-playbooks/continue-finalize.md +447 -0
- package/.aether/docs/command-playbooks/continue-full.md +1724 -0
- package/.aether/docs/command-playbooks/continue-gates.md +686 -0
- package/.aether/docs/command-playbooks/continue-verify.md +406 -0
- package/.aether/docs/context-continuity.md +84 -0
- package/{runtime → .aether/docs/disciplines}/DISCIPLINES.md +13 -11
- package/.aether/docs/error-codes.md +268 -0
- package/.aether/docs/known-issues.md +94 -0
- package/{runtime → .aether}/docs/pheromones.md +86 -6
- package/.aether/docs/plans/pheromone-display-plan.md +257 -0
- package/.aether/docs/queen-commands.md +98 -0
- package/.aether/docs/source-of-truth-map.md +132 -0
- package/.aether/docs/xml-utilities.md +47 -0
- package/{runtime → .aether}/exchange/pheromone-xml.sh +2 -1
- package/{runtime → .aether}/exchange/registry-xml.sh +7 -3
- package/{runtime → .aether}/exchange/wisdom-xml.sh +11 -4
- package/.aether/rules/aether-colony.md +144 -0
- package/.aether/schemas/example-prompt-builder.xml +234 -0
- 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 +61 -0
- package/.aether/templates/colony-state-reset.jq.template +23 -0
- package/.aether/templates/colony-state.template.json +39 -0
- package/.aether/templates/constraints.template.json +9 -0
- package/.aether/templates/crowned-anthill.template.md +36 -0
- package/.aether/templates/handoff-build-error.template.md +30 -0
- package/.aether/templates/handoff-build-success.template.md +39 -0
- package/.aether/templates/handoff.template.md +40 -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/{runtime → .aether}/utils/atomic-write.sh +68 -22
- package/{runtime → .aether}/utils/chamber-compare.sh +23 -10
- package/.aether/utils/chamber-utils.sh +440 -0
- package/.aether/utils/emoji-audit.sh +166 -0
- package/{runtime → .aether}/utils/error-handler.sh +34 -8
- package/.aether/utils/file-lock.sh +313 -0
- package/.aether/utils/flag.sh +267 -0
- package/.aether/utils/hive.sh +572 -0
- package/.aether/utils/learning.sh +1928 -0
- package/.aether/utils/midden.sh +342 -0
- package/.aether/utils/oracle/oracle.md +168 -0
- package/.aether/utils/oracle/oracle.sh +1023 -0
- package/.aether/utils/pheromone.sh +2029 -0
- package/.aether/utils/queen.sh +1698 -0
- package/.aether/utils/scan.sh +860 -0
- package/.aether/utils/semantic-cli.sh +415 -0
- package/.aether/utils/session.sh +552 -0
- package/.aether/utils/skills.sh +509 -0
- package/.aether/utils/spawn-tree.sh +260 -0
- package/.aether/utils/spawn.sh +260 -0
- package/.aether/utils/state-api.sh +199 -0
- package/{runtime → .aether}/utils/state-loader.sh +8 -6
- package/.aether/utils/suggest.sh +611 -0
- package/{runtime → .aether}/utils/swarm-display.sh +10 -1
- package/.aether/utils/swarm.sh +1004 -0
- package/{runtime → .aether}/utils/watch-spawn-tree.sh +11 -2
- package/{runtime → .aether}/utils/xml-compose.sh +9 -3
- package/.aether/utils/xml-convert.sh +277 -0
- package/{runtime → .aether}/utils/xml-core.sh +5 -9
- package/.aether/utils/xml-query.sh +201 -0
- package/.aether/utils/xml-utils.sh +110 -0
- package/{runtime → .aether}/workers.md +97 -81
- package/.claude/agents/ant/aether-ambassador.md +265 -0
- package/.claude/agents/ant/aether-archaeologist.md +327 -0
- package/.claude/agents/ant/aether-architect.md +236 -0
- package/.claude/agents/ant/aether-auditor.md +271 -0
- package/.claude/agents/ant/aether-builder.md +224 -0
- package/.claude/agents/ant/aether-chaos.md +269 -0
- package/.claude/agents/ant/aether-chronicler.md +305 -0
- package/.claude/agents/ant/aether-gatekeeper.md +330 -0
- package/.claude/agents/ant/aether-includer.md +374 -0
- package/.claude/agents/ant/aether-keeper.md +272 -0
- package/.claude/agents/ant/aether-measurer.md +322 -0
- package/.claude/agents/ant/aether-oracle.md +237 -0
- package/.claude/agents/ant/aether-probe.md +211 -0
- package/.claude/agents/ant/aether-queen.md +330 -0
- package/.claude/agents/ant/aether-route-setter.md +178 -0
- package/.claude/agents/ant/aether-sage.md +418 -0
- package/.claude/agents/ant/aether-scout.md +179 -0
- package/.claude/agents/ant/aether-surveyor-disciplines.md +417 -0
- package/.claude/agents/ant/aether-surveyor-nest.md +355 -0
- package/.claude/agents/ant/aether-surveyor-pathogens.md +289 -0
- package/.claude/agents/ant/aether-surveyor-provisions.md +360 -0
- package/.claude/agents/ant/aether-tracker.md +270 -0
- package/.claude/agents/ant/aether-watcher.md +280 -0
- package/.claude/agents/ant/aether-weaver.md +248 -0
- package/.claude/commands/ant/archaeology.md +16 -14
- package/.claude/commands/ant/build.md +43 -1028
- package/.claude/commands/ant/chaos.md +19 -23
- package/.claude/commands/ant/colonize.md +52 -31
- package/.claude/commands/ant/continue.md +40 -1016
- package/.claude/commands/ant/council.md +21 -18
- package/.claude/commands/ant/data-clean.md +81 -0
- package/.claude/commands/ant/dream.md +27 -15
- package/.claude/commands/ant/entomb.md +317 -225
- package/.claude/commands/ant/export-signals.md +57 -0
- package/.claude/commands/ant/feedback.md +48 -26
- package/.claude/commands/ant/flag.md +30 -10
- package/.claude/commands/ant/flags.md +34 -12
- package/.claude/commands/ant/focus.md +45 -19
- package/.claude/commands/ant/help.md +50 -8
- package/.claude/commands/ant/history.md +13 -0
- package/.claude/commands/ant/import-signals.md +71 -0
- package/.claude/commands/ant/init.md +345 -194
- package/.claude/commands/ant/insert-phase.md +101 -0
- package/.claude/commands/ant/interpret.md +26 -4
- package/.claude/commands/ant/lay-eggs.md +184 -127
- package/.claude/commands/ant/maturity.md +32 -11
- package/.claude/commands/ant/memory-details.md +77 -0
- package/.claude/commands/ant/migrate-state.md +20 -2
- package/.claude/commands/ant/oracle.md +337 -74
- package/.claude/commands/ant/organize.md +39 -25
- package/.claude/commands/ant/patrol.md +620 -0
- package/.claude/commands/ant/pause-colony.md +23 -27
- package/.claude/commands/ant/phase.md +40 -42
- package/.claude/commands/ant/pheromones.md +156 -0
- package/.claude/commands/ant/plan.md +185 -51
- package/.claude/commands/ant/preferences.md +65 -0
- package/.claude/commands/ant/redirect.md +45 -30
- package/.claude/commands/ant/resume-colony.md +51 -27
- package/.claude/commands/ant/resume.md +314 -94
- package/.claude/commands/ant/run.md +195 -0
- package/.claude/commands/ant/seal.md +650 -221
- package/.claude/commands/ant/skill-create.md +286 -0
- package/.claude/commands/ant/status.md +196 -31
- package/.claude/commands/ant/swarm.md +16 -46
- package/.claude/commands/ant/tunnels.md +280 -105
- package/.claude/commands/ant/update.md +73 -89
- package/.claude/commands/ant/verify-castes.md +100 -42
- package/.claude/commands/ant/watch.md +14 -12
- package/.opencode/agents/aether-ambassador.md +63 -20
- package/.opencode/agents/aether-archaeologist.md +29 -12
- package/.opencode/agents/aether-architect.md +103 -36
- package/.opencode/agents/aether-auditor.md +51 -18
- package/.opencode/agents/aether-builder.md +70 -20
- package/.opencode/agents/aether-chaos.md +29 -12
- package/.opencode/agents/aether-chronicler.md +60 -18
- package/.opencode/agents/aether-gatekeeper.md +27 -18
- package/.opencode/agents/aether-includer.md +27 -18
- package/.opencode/agents/aether-keeper.md +89 -18
- package/.opencode/agents/aether-measurer.md +27 -18
- package/.opencode/agents/aether-oracle.md +137 -0
- package/.opencode/agents/aether-probe.md +60 -18
- package/.opencode/agents/aether-queen.md +172 -24
- package/.opencode/agents/aether-route-setter.md +57 -12
- package/.opencode/agents/aether-sage.md +26 -18
- package/.opencode/agents/aether-scout.md +28 -20
- package/.opencode/agents/aether-surveyor-disciplines.md +59 -2
- package/.opencode/agents/aether-surveyor-nest.md +59 -2
- package/.opencode/agents/aether-surveyor-pathogens.md +57 -2
- package/.opencode/agents/aether-surveyor-provisions.md +59 -2
- package/.opencode/agents/aether-tracker.md +64 -18
- package/.opencode/agents/aether-watcher.md +66 -19
- package/.opencode/agents/aether-weaver.md +61 -18
- package/.opencode/commands/ant/archaeology.md +7 -14
- package/.opencode/commands/ant/build.md +437 -257
- package/.opencode/commands/ant/chaos.md +7 -24
- package/.opencode/commands/ant/colonize.md +8 -17
- package/.opencode/commands/ant/continue.md +661 -142
- package/.opencode/commands/ant/council.md +11 -22
- package/.opencode/commands/ant/data-clean.md +77 -0
- package/.opencode/commands/ant/dream.md +15 -17
- package/.opencode/commands/ant/entomb.md +133 -62
- 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 +374 -167
- package/.opencode/commands/ant/insert-phase.md +107 -0
- package/.opencode/commands/ant/interpret.md +16 -0
- package/.opencode/commands/ant/lay-eggs.md +184 -112
- package/.opencode/commands/ant/maturity.md +18 -2
- package/.opencode/commands/ant/memory-details.md +83 -0
- package/.opencode/commands/ant/migrate-state.md +12 -0
- package/.opencode/commands/ant/oracle.md +322 -67
- package/.opencode/commands/ant/organize.md +18 -16
- package/.opencode/commands/ant/patrol.md +626 -0
- package/.opencode/commands/ant/pause-colony.md +12 -29
- package/.opencode/commands/ant/phase.md +30 -40
- package/.opencode/commands/ant/pheromones.md +162 -0
- package/.opencode/commands/ant/plan.md +184 -56
- package/.opencode/commands/ant/preferences.md +71 -0
- package/.opencode/commands/ant/redirect.md +22 -5
- package/.opencode/commands/ant/resume-colony.md +38 -27
- package/.opencode/commands/ant/resume.md +385 -0
- package/.opencode/commands/ant/run.md +201 -0
- package/.opencode/commands/ant/seal.md +259 -45
- package/.opencode/commands/ant/skill-create.md +63 -0
- package/.opencode/commands/ant/status.md +135 -31
- package/.opencode/commands/ant/swarm.md +3 -345
- package/.opencode/commands/ant/tunnels.md +152 -9
- package/.opencode/commands/ant/update.md +70 -91
- package/.opencode/commands/ant/verify-castes.md +96 -42
- package/.opencode/commands/ant/watch.md +7 -0
- package/CHANGELOG.md +356 -0
- package/README.md +203 -573
- package/bin/cli.js +455 -527
- package/bin/generate-commands.js +186 -0
- package/bin/generate-commands.sh +127 -88
- package/bin/lib/init.js +13 -3
- package/bin/lib/spawn-logger.js +0 -15
- package/bin/lib/update-transaction.js +392 -140
- package/bin/npx-install.js +178 -0
- package/bin/sync-to-runtime.sh +5 -137
- package/bin/validate-package.sh +166 -0
- package/package.json +14 -7
- package/.opencode/agents/aether-guardian.md +0 -107
- package/.opencode/agents/workers.md +0 -1034
- 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
- package/runtime/CONTEXT.md +0 -160
- package/runtime/QUEEN_ANT_ARCHITECTURE.md +0 -402
- package/runtime/aether-utils.sh +0 -3879
- package/runtime/data/signatures.json +0 -41
- package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +0 -1343
- package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +0 -2642
- package/runtime/docs/PHEROMONE-INJECTION.md +0 -240
- package/runtime/docs/PHEROMONE-INTEGRATION.md +0 -192
- package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +0 -426
- package/runtime/docs/README.md +0 -94
- package/runtime/docs/VISUAL-OUTPUT-SPEC.md +0 -219
- package/runtime/docs/biological-reference.md +0 -272
- package/runtime/docs/codebase-review.md +0 -399
- package/runtime/docs/command-sync.md +0 -164
- package/runtime/docs/constraints.md +0 -116
- package/runtime/docs/implementation-learnings.md +0 -89
- package/runtime/docs/known-issues.md +0 -217
- package/runtime/docs/namespace.md +0 -148
- package/runtime/docs/pathogen-schema-example.json +0 -36
- package/runtime/docs/pathogen-schema.md +0 -111
- package/runtime/docs/planning-discipline.md +0 -159
- package/runtime/docs/progressive-disclosure.md +0 -184
- package/runtime/lib/queen-utils.sh +0 -729
- package/runtime/model-profiles.yaml +0 -100
- package/runtime/planning.md +0 -159
- package/runtime/recover.sh +0 -136
- package/runtime/templates/QUEEN.md.template +0 -79
- package/runtime/utils/chamber-utils.sh +0 -285
- package/runtime/utils/file-lock.sh +0 -122
- package/runtime/utils/spawn-tree.sh +0 -428
- package/runtime/utils/spawn-with-model.sh +0 -56
- package/runtime/utils/xml-utils.sh +0 -2196
- package/runtime/workers-new-castes.md +0 -516
- /package/{runtime → .aether/docs/disciplines}/coding-standards.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/debugging.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/learning.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/tdd.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/verification-loop.md +0 -0
- /package/{runtime → .aether/docs/disciplines}/verification.md +0 -0
- /package/{runtime → .aether}/schemas/aether-types.xsd +0 -0
- /package/{runtime → .aether}/schemas/colony-registry.xsd +0 -0
- /package/{runtime → .aether}/schemas/pheromone.xsd +0 -0
- /package/{runtime → .aether}/schemas/prompt.xsd +0 -0
- /package/{runtime → .aether}/schemas/queen-wisdom.xsd +0 -0
- /package/{runtime → .aether}/schemas/worker-priming.xsd +0 -0
- /package/{runtime → .aether}/utils/colorize-log.sh +0 -0
- /package/{runtime → .aether}/utils/queen-to-md.xsl +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
<!-- Generated from .aether/commands/entomb.yaml - DO NOT EDIT DIRECTLY -->
|
|
1
2
|
---
|
|
2
3
|
name: ant:entomb
|
|
3
4
|
description: "⚰️🐜⚰️ Entomb completed colony in chambers"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
You are the **Queen**. Archive the
|
|
7
|
+
You are the **Queen**. Archive the sealed colony to chambers.
|
|
7
8
|
|
|
8
9
|
## Instructions
|
|
9
10
|
|
|
@@ -11,18 +12,47 @@ Parse `$ARGUMENTS`:
|
|
|
11
12
|
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
12
13
|
- Otherwise: set `visual_mode = true`
|
|
13
14
|
|
|
15
|
+
<failure_modes>
|
|
16
|
+
### Archive Write Failure
|
|
17
|
+
If writing to chambers/ archive fails partway:
|
|
18
|
+
- Do NOT delete source data (the active colony) until archive is verified
|
|
19
|
+
- Report what was archived vs. what failed
|
|
20
|
+
- Recovery: the original colony data is intact -- user can retry
|
|
21
|
+
|
|
22
|
+
### Seal Verification Failure
|
|
23
|
+
If the colony was not properly sealed before entomb:
|
|
24
|
+
- STOP -- do not archive an incomplete colony
|
|
25
|
+
- Direct user to run /ant:seal first
|
|
26
|
+
- This is a hard gate, not a suggestion
|
|
27
|
+
|
|
28
|
+
### Chamber Naming Conflict
|
|
29
|
+
If the target chamber directory already exists:
|
|
30
|
+
- STOP -- do not overwrite an existing archive
|
|
31
|
+
- Report the conflict
|
|
32
|
+
- Options: (1) Use a different name, (2) Merge with existing, (3) Cancel
|
|
33
|
+
</failure_modes>
|
|
34
|
+
|
|
35
|
+
<success_criteria>
|
|
36
|
+
Command is complete when:
|
|
37
|
+
- Colony data is fully copied to chambers/ archive directory
|
|
38
|
+
- Archive integrity is verified (all expected files present)
|
|
39
|
+
- Active colony state is cleared only after archive verification
|
|
40
|
+
- User sees confirmation with archive location
|
|
41
|
+
</success_criteria>
|
|
42
|
+
|
|
43
|
+
<read_only>
|
|
44
|
+
Do not touch during entomb:
|
|
45
|
+
- .aether/dreams/ (user notes -- not archived)
|
|
46
|
+
- Source code files
|
|
47
|
+
- .env* files
|
|
48
|
+
- .claude/settings.json
|
|
49
|
+
- .github/workflows/
|
|
50
|
+
- Other chamber directories (only write to the new chamber)
|
|
51
|
+
</read_only>
|
|
52
|
+
|
|
14
53
|
### Step 0: Initialize Visual Mode (if enabled)
|
|
15
54
|
|
|
16
55
|
If `visual_mode` is true:
|
|
17
|
-
```bash
|
|
18
|
-
# Generate session ID
|
|
19
|
-
entomb_id="entomb-$(date +%s)"
|
|
20
|
-
|
|
21
|
-
# Initialize swarm display
|
|
22
|
-
bash .aether/aether-utils.sh swarm-display-init "$entomb_id"
|
|
23
|
-
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "Entombing colony" "Colony" '{"read":0,"grep":0,"edit":0,"bash":0}' 0 "fungus_garden" 0
|
|
24
|
-
```
|
|
25
|
-
|
|
26
56
|
### Step 1: Read State
|
|
27
57
|
|
|
28
58
|
Read `.aether/data/COLONY_STATE.json`.
|
|
@@ -33,204 +63,169 @@ No colony to entomb. Run /ant:init first.
|
|
|
33
63
|
```
|
|
34
64
|
Stop here.
|
|
35
65
|
|
|
36
|
-
|
|
66
|
+
Extract: `goal`, `state`, `current_phase`, `plan.phases`, `milestone`, `version`, `initialized_at`, `memory.decisions`, `memory.phase_learnings`, `memory.instincts`.
|
|
37
67
|
|
|
38
|
-
|
|
68
|
+
Read `colony_version` for display (default to 1 for backward compat with older colonies):
|
|
39
69
|
```bash
|
|
40
|
-
|
|
70
|
+
colony_version=$(jq -r '.colony_version // 1' .aether/data/COLONY_STATE.json 2>/dev/null || echo 1)
|
|
71
|
+
[[ "$colony_version" =~ ^[0-9]+$ ]] || colony_version=1
|
|
41
72
|
```
|
|
42
73
|
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
# Check for incomplete chambers (no colony-state.json)
|
|
46
|
-
incomplete_chambers=$(find .aether/chambers -type d -mindepth 1 -maxdepth 1 2>/dev/null | while read dir; do
|
|
47
|
-
if [[ ! -f "$dir/colony-state.json" ]]; then
|
|
48
|
-
echo "$dir"
|
|
49
|
-
fi
|
|
50
|
-
done)
|
|
74
|
+
### Step 2: Seal-First Enforcement
|
|
51
75
|
|
|
52
|
-
|
|
53
|
-
echo "Warning: Incomplete chamber operations detected:"
|
|
54
|
-
echo "$incomplete_chambers"
|
|
55
|
-
fi
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Step 2: Validate Colony Can Be Entombed
|
|
76
|
+
Check `milestone` in COLONY_STATE.json.
|
|
59
77
|
|
|
60
|
-
|
|
78
|
+
**If milestone != "Crowned Anthill":**
|
|
79
|
+
```
|
|
80
|
+
Colony has not been sealed.
|
|
61
81
|
|
|
62
|
-
|
|
82
|
+
Current milestone: {milestone}
|
|
83
|
+
Required: Crowned Anthill
|
|
63
84
|
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
all_completed = all(phase.status == "completed" for phase in plan.phases)
|
|
85
|
+
Run /ant:seal first to complete the sealing ceremony.
|
|
67
86
|
```
|
|
87
|
+
Stop here.
|
|
68
88
|
|
|
69
|
-
If
|
|
89
|
+
**Belt-and-suspenders:** Also check `.aether/CROWNED-ANTHILL.md` exists. If milestone is Crowned Anthill but file is missing:
|
|
70
90
|
```
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
Completed phases: X of Y
|
|
74
|
-
Remaining: {list of incomplete phase names}
|
|
75
|
-
|
|
76
|
-
Run /ant:continue to complete remaining phases first.
|
|
91
|
+
CROWNED-ANTHILL.md not found — seal may have been interrupted. Run /ant:seal again.
|
|
77
92
|
```
|
|
78
93
|
Stop here.
|
|
79
94
|
|
|
80
|
-
|
|
95
|
+
### Step 3: User Confirmation
|
|
81
96
|
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
Colony is still executing. Run /ant:continue to reconcile first.
|
|
97
|
+
Show what will be archived:
|
|
85
98
|
```
|
|
86
|
-
|
|
99
|
+
ENTOMB COLONY
|
|
100
|
+
|
|
101
|
+
Goal: {goal}
|
|
102
|
+
Version: v{colony_version}
|
|
103
|
+
Milestone: Crowned Anthill
|
|
104
|
+
Phases: {phases_completed} of {total_phases}
|
|
87
105
|
|
|
88
|
-
|
|
106
|
+
This will:
|
|
107
|
+
- Archive ALL colony data to .aether/chambers/
|
|
108
|
+
- Copy CROWNED-ANTHILL.md, pheromones, dreams, session data
|
|
109
|
+
- Promote colony wisdom to QUEEN.md (cross-generational learning)
|
|
110
|
+
- Reset COLONY_STATE.json for a fresh start
|
|
111
|
+
- Clear session data
|
|
89
112
|
|
|
90
|
-
|
|
113
|
+
This action is permanent. The archived colony can be browsed via /ant:tunnels.
|
|
91
114
|
|
|
92
|
-
|
|
115
|
+
Entomb this colony? (yes/no)
|
|
93
116
|
```
|
|
94
|
-
Cannot entomb colony with critical errors.
|
|
95
117
|
|
|
96
|
-
|
|
97
|
-
|
|
118
|
+
Use `AskUserQuestion with yes/no options`.
|
|
119
|
+
|
|
120
|
+
If not "yes":
|
|
121
|
+
```
|
|
122
|
+
Entombment cancelled. Colony remains active.
|
|
98
123
|
```
|
|
99
124
|
Stop here.
|
|
100
125
|
|
|
101
|
-
### Step 3:
|
|
126
|
+
### Step 3.25: Wisdom Approval
|
|
102
127
|
|
|
103
|
-
|
|
104
|
-
- 0 phases: "Fresh Start"
|
|
105
|
-
- 1 phase: "First Mound"
|
|
106
|
-
- 2-4 phases: "Open Chambers"
|
|
107
|
-
- 5+ phases: "Sealed Chambers"
|
|
128
|
+
Before archiving, review wisdom proposals accumulated during this colony's lifecycle.
|
|
108
129
|
|
|
109
|
-
|
|
130
|
+
```bash
|
|
131
|
+
# Check for pending proposals
|
|
132
|
+
proposals=$(bash .aether/aether-utils.sh learning-check-promotion 2>/dev/null || echo '{"proposals":[]}')
|
|
133
|
+
proposal_count=$(echo "$proposals" | jq '.proposals | length')
|
|
134
|
+
|
|
135
|
+
if [[ "$proposal_count" -gt 0 ]]; then
|
|
136
|
+
echo ""
|
|
137
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
138
|
+
echo " 🧠 FINAL WISDOM REVIEW"
|
|
139
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
140
|
+
echo ""
|
|
141
|
+
echo "Review wisdom proposals before archiving this colony."
|
|
142
|
+
echo "Approved proposals will be promoted to QUEEN.md."
|
|
143
|
+
echo ""
|
|
144
|
+
|
|
145
|
+
# Run approval workflow (blocking)
|
|
146
|
+
bash .aether/aether-utils.sh learning-approve-proposals
|
|
147
|
+
|
|
148
|
+
echo ""
|
|
149
|
+
echo "Wisdom review complete. Proceeding with entombment..."
|
|
150
|
+
echo ""
|
|
151
|
+
else
|
|
152
|
+
echo "No wisdom proposals to review."
|
|
153
|
+
fi
|
|
154
|
+
```
|
|
110
155
|
|
|
111
|
-
|
|
156
|
+
### Step 3.5: Check XML Tools
|
|
112
157
|
|
|
113
|
-
|
|
158
|
+
XML archiving is required for entombment. Check tool availability before proceeding.
|
|
159
|
+
Uses `command -v xmllint` directly — consistent with seal.md's tool check.
|
|
114
160
|
|
|
115
|
-
|
|
161
|
+
```bash
|
|
162
|
+
if command -v xmllint >/dev/null 2>&1; then
|
|
163
|
+
xmllint_available=true
|
|
164
|
+
else
|
|
165
|
+
xmllint_available=false
|
|
166
|
+
fi
|
|
116
167
|
```
|
|
117
|
-
🏺 ═══════════════════════════════════════════════════
|
|
118
|
-
E N T O M B C O L O N Y
|
|
119
|
-
══════════════════════════════════════════════════ 🏺
|
|
120
168
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
169
|
+
**If xmllint is NOT available:**
|
|
170
|
+
|
|
171
|
+
Ask the user:
|
|
172
|
+
```
|
|
173
|
+
xmllint is not installed — XML archiving requires it.
|
|
124
174
|
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
175
|
+
Install now?
|
|
176
|
+
- macOS: xcode-select --install (or brew install libxml2)
|
|
177
|
+
- Linux: apt-get install libxml2-utils
|
|
128
178
|
|
|
129
|
-
|
|
179
|
+
Install xmllint? (yes/no)
|
|
130
180
|
```
|
|
131
181
|
|
|
132
|
-
|
|
182
|
+
Use AskUserQuestion with yes/no options.
|
|
133
183
|
|
|
134
|
-
If
|
|
184
|
+
If yes:
|
|
185
|
+
- On macOS: Run `xcode-select --install` or `brew install libxml2`
|
|
186
|
+
- On Linux: Run `sudo apt-get install -y libxml2-utils`
|
|
187
|
+
- After install attempt, re-check: `command -v xmllint >/dev/null 2>&1`
|
|
188
|
+
- If still not available after install:
|
|
189
|
+
```
|
|
190
|
+
xmllint installation failed. Cannot entomb without XML archiving.
|
|
191
|
+
Install xmllint manually and try again.
|
|
192
|
+
```
|
|
193
|
+
Stop here.
|
|
194
|
+
|
|
195
|
+
If no:
|
|
135
196
|
```
|
|
136
|
-
Entombment
|
|
197
|
+
Entombment requires XML archiving. Install xmllint and try again.
|
|
137
198
|
```
|
|
138
199
|
Stop here.
|
|
139
200
|
|
|
140
|
-
### Step
|
|
141
|
-
|
|
142
|
-
Before creating the chamber, promote validated learnings to QUEEN.md for future colonies.
|
|
201
|
+
### Step 4: Ensure QUEEN.md Exists
|
|
143
202
|
|
|
144
|
-
|
|
203
|
+
Verify QUEEN.md is initialized for wisdom storage:
|
|
145
204
|
|
|
146
205
|
```bash
|
|
147
|
-
queen_file=".aether/
|
|
206
|
+
queen_file=".aether/QUEEN.md"
|
|
148
207
|
if [[ ! -f "$queen_file" ]]; then
|
|
149
208
|
init_result=$(bash .aether/aether-utils.sh queen-init 2>/dev/null || echo '{"ok":false}')
|
|
150
209
|
init_ok=$(echo "$init_result" | jq -r '.ok // false')
|
|
151
210
|
if [[ "$init_ok" == "true" ]]; then
|
|
152
211
|
created=$(echo "$init_result" | jq -r '.result.created // false')
|
|
153
212
|
if [[ "$created" == "true" ]]; then
|
|
154
|
-
bash .aether/aether-utils.sh activity-log "CREATED" "Queen" "Initialized QUEEN.md for wisdom
|
|
213
|
+
bash .aether/aether-utils.sh activity-log "CREATED" "Queen" "Initialized QUEEN.md for wisdom storage"
|
|
155
214
|
fi
|
|
156
215
|
fi
|
|
157
216
|
fi
|
|
158
217
|
```
|
|
159
218
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
# Extract colony name from goal (sanitized)
|
|
164
|
-
colony_name=$(jq -r '.goal' .aether/data/COLONY_STATE.json | tr '[:upper:]' '[:lower:]' | tr -cs '[:alnum:]' '-' | sed 's/^-//;s/-$//' | cut -c1-30)
|
|
165
|
-
|
|
166
|
-
# Extract validated learnings from phase_learnings
|
|
167
|
-
learnings=$(jq -c '.memory.phase_learnings // []' .aether/data/COLONY_STATE.json)
|
|
168
|
-
|
|
169
|
-
# Extract decisions
|
|
170
|
-
decisions=$(jq -c '.memory.decisions // []' .aether/data/COLONY_STATE.json)
|
|
171
|
-
|
|
172
|
-
promotion_count=0
|
|
173
|
-
|
|
174
|
-
# Promote patterns from validated learnings
|
|
175
|
-
if [[ -f "$queen_file" ]]; then
|
|
176
|
-
# Process each phase's learnings
|
|
177
|
-
echo "$learnings" | jq -c '.[]' 2>/dev/null | while read -r learning_group; do
|
|
178
|
-
phase=$(echo "$learning_group" | jq -r '.phase // "unknown"')
|
|
179
|
-
# Extract individual learnings and promote as patterns
|
|
180
|
-
echo "$learning_group" | jq -r '.learnings[]? | select(.status == "validated") | .claim' 2>/dev/null | while read -r claim; do
|
|
181
|
-
if [[ -n "$claim" && "$claim" != "null" ]]; then
|
|
182
|
-
# Truncate if too long
|
|
183
|
-
content=$(echo "$claim" | cut -c1-200)
|
|
184
|
-
result=$(bash .aether/aether-utils.sh queen-promote "pattern" "$content" "$colony_name" 2>/dev/null || echo '{"ok":false}')
|
|
185
|
-
if [[ $(echo "$result" | jq -r '.ok // false') == "true" ]]; then
|
|
186
|
-
promotion_count=$((promotion_count + 1))
|
|
187
|
-
fi
|
|
188
|
-
fi
|
|
189
|
-
done
|
|
190
|
-
done
|
|
191
|
-
|
|
192
|
-
# Promote high-confidence instincts as patterns
|
|
193
|
-
instincts=$(jq -c '.memory.instincts // []' .aether/data/COLONY_STATE.json)
|
|
194
|
-
echo "$instincts" | jq -c '.[]' 2>/dev/null | while read -r instinct; do
|
|
195
|
-
confidence=$(echo "$instinct" | jq -r '.confidence // 0')
|
|
196
|
-
status=$(echo "$instinct" | jq -r '.status // ""')
|
|
197
|
-
action=$(echo "$instinct" | jq -r '.action // ""')
|
|
198
|
-
# Promote validated instincts with high confidence (>= 0.7)
|
|
199
|
-
if [[ "$status" == "validated" && $(echo "$confidence >= 0.7" | bc -l 2>/dev/null || echo 0) -eq 1 && -n "$action" ]]; then
|
|
200
|
-
content=$(echo "$action" | cut -c1-200)
|
|
201
|
-
result=$(bash .aether/aether-utils.sh queen-promote "pattern" "$content" "$colony_name" 2>/dev/null || echo '{"ok":false}')
|
|
202
|
-
if [[ $(echo "$result" | jq -r '.ok // false') == "true" ]]; then
|
|
203
|
-
promotion_count=$((promotion_count + 1))
|
|
204
|
-
fi
|
|
205
|
-
fi
|
|
206
|
-
done
|
|
207
|
-
|
|
208
|
-
# Log promotion results
|
|
209
|
-
bash .aether/aether-utils.sh activity-log "MODIFIED" "Queen" "Promoted $promotion_count validated learnings to QUEEN.md from entombed colony"
|
|
210
|
-
fi
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
**Step 5.3: Display promotion summary**
|
|
214
|
-
|
|
215
|
-
```
|
|
216
|
-
---
|
|
217
|
-
Wisdom Promotion Summary
|
|
218
|
-
---
|
|
219
|
-
Colony: {colony_name}
|
|
220
|
-
Promoted: {promotion_count} validated patterns to QUEEN.md
|
|
221
|
-
---
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### Step 6: Create Chamber
|
|
219
|
+
### Step 5: Generate Chamber Name
|
|
225
220
|
|
|
226
|
-
|
|
221
|
+
Date-first naming:
|
|
227
222
|
```bash
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
chamber_name="${
|
|
223
|
+
date_prefix=$(date -u +%Y-%m-%d)
|
|
224
|
+
sanitized_goal=$(echo "$goal" | tr '[:upper:]' '[:lower:]' | tr -cs '[:alnum:]' '-' | sed 's/^-//;s/-$//' | cut -c1-40)
|
|
225
|
+
chamber_name="${date_prefix}-${sanitized_goal}"
|
|
231
226
|
```
|
|
232
227
|
|
|
233
|
-
|
|
228
|
+
Collision handling:
|
|
234
229
|
```bash
|
|
235
230
|
counter=1
|
|
236
231
|
original_name="$chamber_name"
|
|
@@ -240,7 +235,7 @@ while [[ -d ".aether/chambers/$chamber_name" ]]; do
|
|
|
240
235
|
done
|
|
241
236
|
```
|
|
242
237
|
|
|
243
|
-
### Step
|
|
238
|
+
### Step 6: Create Chamber
|
|
244
239
|
|
|
245
240
|
Extract decisions and learnings as JSON arrays:
|
|
246
241
|
```bash
|
|
@@ -254,27 +249,89 @@ version=$(jq -r '.version // "3.0"' .aether/data/COLONY_STATE.json)
|
|
|
254
249
|
Create the chamber:
|
|
255
250
|
```bash
|
|
256
251
|
bash .aether/aether-utils.sh chamber-create \
|
|
257
|
-
".aether/chambers
|
|
252
|
+
".aether/chambers/$chamber_name" \
|
|
258
253
|
".aether/data/COLONY_STATE.json" \
|
|
259
|
-
"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
"
|
|
263
|
-
"
|
|
264
|
-
|
|
265
|
-
|
|
254
|
+
"$goal" \
|
|
255
|
+
"$phases_completed" \
|
|
256
|
+
"$total_phases" \
|
|
257
|
+
"$milestone" \
|
|
258
|
+
"$version" \
|
|
259
|
+
"$decisions_json" \
|
|
260
|
+
"$learnings_json"
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Step 7: Archive Additional Files
|
|
264
|
+
|
|
265
|
+
AFTER chamber-create succeeds, copy additional data files:
|
|
266
|
+
```bash
|
|
267
|
+
chamber_dir=".aether/chambers/$chamber_name"
|
|
268
|
+
|
|
269
|
+
# Archive data files (if they exist)
|
|
270
|
+
for f in pheromones.json session.json activity.log flags.json constraints.json spawn-tree.txt timing.log view-state.json; do
|
|
271
|
+
[[ -f ".aether/data/$f" ]] && cp ".aether/data/$f" "$chamber_dir/" 2>/dev/null || true
|
|
272
|
+
done
|
|
273
|
+
|
|
274
|
+
# Archive seal document (critical — this is the ceremony record)
|
|
275
|
+
[[ -f ".aether/CROWNED-ANTHILL.md" ]] && cp ".aether/CROWNED-ANTHILL.md" "$chamber_dir/"
|
|
276
|
+
|
|
277
|
+
# Archive HANDOFF.md if it exists
|
|
278
|
+
[[ -f ".aether/HANDOFF.md" ]] && cp ".aether/HANDOFF.md" "$chamber_dir/"
|
|
279
|
+
|
|
280
|
+
# Archive dreams directory (optional — may not exist)
|
|
281
|
+
[[ -d ".aether/dreams" ]] && cp -r ".aether/dreams" "$chamber_dir/dreams" 2>/dev/null || true
|
|
282
|
+
|
|
283
|
+
# Archive XML exchange files to chamber (per D-04, D-05)
|
|
284
|
+
xml_archived=0
|
|
285
|
+
for xml_file in .aether/exchange/*.xml; do
|
|
286
|
+
[[ -f "$xml_file" ]] && cp "$xml_file" "$chamber_dir/" && xml_archived=$((xml_archived + 1))
|
|
287
|
+
done
|
|
288
|
+
if [[ "$xml_archived" -gt 0 ]]; then
|
|
289
|
+
echo "XML Archive: ${xml_archived} exchange file(s) copied to chamber"
|
|
290
|
+
fi
|
|
266
291
|
```
|
|
267
292
|
|
|
293
|
+
Do NOT copy: `.aether/data/backups/`, `.aether/data/locks/`, `.aether/data/midden/`, `.aether/data/survey/`.
|
|
294
|
+
|
|
295
|
+
### Step 7.5: Export XML Archive (hard-stop)
|
|
296
|
+
|
|
297
|
+
Export combined XML archive to the chamber. This is a HARD REQUIREMENT — entomb fails if XML export fails.
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
chamber_dir=".aether/chambers/$chamber_name"
|
|
301
|
+
xml_result=$(bash .aether/aether-utils.sh colony-archive-xml "$chamber_dir/colony-archive.xml" 2>&1)
|
|
302
|
+
xml_ok=$(echo "$xml_result" | jq -r '.ok // false' 2>/dev/null)
|
|
303
|
+
|
|
304
|
+
if [[ "$xml_ok" != "true" ]]; then
|
|
305
|
+
# HARD STOP — remove the chamber and abort
|
|
306
|
+
rm -rf "$chamber_dir"
|
|
307
|
+
echo "XML archive export failed. Colony NOT entombed."
|
|
308
|
+
echo ""
|
|
309
|
+
echo "Error: $(echo "$xml_result" | jq -r '.error // "Unknown error"' 2>/dev/null)"
|
|
310
|
+
echo ""
|
|
311
|
+
echo "The chamber has been cleaned up. Fix the XML issue and try again."
|
|
312
|
+
# Do NOT proceed to state reset or any further steps
|
|
313
|
+
fi
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
If xml_ok is true, store for display:
|
|
317
|
+
```bash
|
|
318
|
+
xml_pheromone_count=$(echo "$xml_result" | jq -r '.result.pheromone_count // 0' 2>/dev/null)
|
|
319
|
+
xml_exchange_count=$(find .aether/exchange -maxdepth 1 -name "*.xml" 2>/dev/null | wc -l | tr -d ' ')
|
|
320
|
+
xml_archive_line="XML Archive: colony-archive.xml (${xml_pheromone_count} signals) + ${xml_exchange_count} exchange file(s)"
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
**Critical behavior:** If XML export fails, entomb STOPS. The chamber directory is removed (cleanup). The colony state is NOT reset. The user sees a clear error and can retry after fixing the issue.
|
|
324
|
+
|
|
268
325
|
### Step 8: Verify Chamber Integrity
|
|
269
326
|
|
|
270
327
|
Run verification:
|
|
271
328
|
```bash
|
|
272
|
-
bash .aether/aether-utils.sh chamber-verify ".aether/chambers
|
|
329
|
+
bash .aether/aether-utils.sh chamber-verify ".aether/chambers/$chamber_name"
|
|
273
330
|
```
|
|
274
331
|
|
|
275
332
|
If verification fails, display error and stop:
|
|
276
333
|
```
|
|
277
|
-
|
|
334
|
+
Chamber verification failed.
|
|
278
335
|
|
|
279
336
|
Error: {verification_error}
|
|
280
337
|
|
|
@@ -283,31 +340,51 @@ The colony has NOT been reset. Please check the chamber directory:
|
|
|
283
340
|
```
|
|
284
341
|
Stop here.
|
|
285
342
|
|
|
286
|
-
### Step 9:
|
|
343
|
+
### Step 9: Record in Eternal Memory
|
|
344
|
+
|
|
345
|
+
Write colony summary to eternal memory:
|
|
346
|
+
```bash
|
|
347
|
+
bash .aether/aether-utils.sh eternal-init # idempotent
|
|
348
|
+
eternal_file="$HOME/.aether/eternal/memory.json"
|
|
349
|
+
if [[ -f "$eternal_file" ]]; then
|
|
350
|
+
colony_entry=$(jq -n \
|
|
351
|
+
--arg goal "$goal" \
|
|
352
|
+
--arg milestone "$milestone" \
|
|
353
|
+
--arg sealed_at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
|
354
|
+
--arg chamber ".aether/chambers/$chamber_name" \
|
|
355
|
+
'{goal: $goal, milestone: $milestone, sealed_at: $sealed_at, chamber: $chamber}')
|
|
356
|
+
tmp_eternal="$(mktemp /tmp/aether-eternal.XXXXXX)"
|
|
357
|
+
jq --argjson colony_entry "$colony_entry" '.colonies = ((.colonies // []) + [$colony_entry])' "$eternal_file" > "$tmp_eternal" \
|
|
358
|
+
&& mv "$tmp_eternal" "$eternal_file"
|
|
359
|
+
fi
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Step 10: Reset Colony State
|
|
287
363
|
|
|
288
364
|
Backup current state:
|
|
289
365
|
```bash
|
|
290
366
|
cp .aether/data/COLONY_STATE.json .aether/data/COLONY_STATE.json.bak
|
|
291
367
|
```
|
|
292
368
|
|
|
293
|
-
Reset state
|
|
369
|
+
Reset state, clearing everything including promoted wisdom (already in QUEEN.md):
|
|
294
370
|
```bash
|
|
295
|
-
jq
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
.
|
|
299
|
-
.
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
371
|
+
# Resolve jq template path (hub-first)
|
|
372
|
+
jq_template=""
|
|
373
|
+
for path in \
|
|
374
|
+
"$HOME/.aether/system/templates/colony-state-reset.jq.template" \
|
|
375
|
+
".aether/templates/colony-state-reset.jq.template"; do
|
|
376
|
+
if [[ -f "$path" ]]; then
|
|
377
|
+
jq_template="$path"
|
|
378
|
+
break
|
|
379
|
+
fi
|
|
380
|
+
done
|
|
381
|
+
|
|
382
|
+
if [[ -z "$jq_template" ]]; then
|
|
383
|
+
echo "Template missing: colony-state-reset.jq.template. Run aether update to fix."
|
|
384
|
+
exit 1
|
|
385
|
+
fi
|
|
386
|
+
|
|
387
|
+
jq -f "$jq_template" .aether/data/COLONY_STATE.json.bak > .aether/data/COLONY_STATE.json
|
|
311
388
|
```
|
|
312
389
|
|
|
313
390
|
Verify reset succeeded:
|
|
@@ -326,67 +403,72 @@ Remove backup after successful reset:
|
|
|
326
403
|
rm -f .aether/data/COLONY_STATE.json.bak
|
|
327
404
|
```
|
|
328
405
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
406
|
+
Clear session data:
|
|
407
|
+
```bash
|
|
408
|
+
rm -f .aether/data/session.json
|
|
409
|
+
```
|
|
332
410
|
|
|
411
|
+
Clean up seal document (it's now in the chamber):
|
|
333
412
|
```bash
|
|
334
|
-
|
|
335
|
-
|
|
413
|
+
rm -f .aether/CROWNED-ANTHILL.md
|
|
414
|
+
```
|
|
336
415
|
|
|
337
|
-
|
|
338
|
-
|
|
416
|
+
Clean up exchange XML files (now archived in chamber per D-06):
|
|
417
|
+
```bash
|
|
418
|
+
rm -f .aether/exchange/*.xml 2>/dev/null || true
|
|
419
|
+
```
|
|
339
420
|
|
|
340
|
-
|
|
341
|
-
.aether/chambers/{chamber_name}/
|
|
421
|
+
### Step 11: Write HANDOFF.md
|
|
342
422
|
|
|
343
|
-
|
|
344
|
-
- Goal: "{goal}"
|
|
345
|
-
- Phases: {completed} completed of {total}
|
|
346
|
-
- Milestone: {milestone}
|
|
347
|
-
- Entombed At: {timestamp}
|
|
423
|
+
Write handoff documenting the entombed colony:
|
|
348
424
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
- activity.log — Colony activity history
|
|
353
|
-
- spawn-tree.txt — Worker spawn records
|
|
354
|
-
- flags.json — Project flags (if existed)
|
|
425
|
+
Resolve the handoff template path:
|
|
426
|
+
Check ~/.aether/system/templates/handoff.template.md first,
|
|
427
|
+
then .aether/templates/handoff.template.md.
|
|
355
428
|
|
|
356
|
-
|
|
357
|
-
This colony has been entombed and the active state reset.
|
|
358
|
-
The colony rests. Its learnings are preserved in the chamber.
|
|
429
|
+
If no template found: output "Template missing: handoff.template.md. Run aether update to fix." and stop.
|
|
359
430
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
431
|
+
Read the template file. Fill all {{PLACEHOLDER}} values:
|
|
432
|
+
- {{CHAMBER_NAME}} → chamber_name
|
|
433
|
+
- {{GOAL}} → goal
|
|
434
|
+
- {{PHASES_COMPLETED}} → phases completed count
|
|
435
|
+
- {{TOTAL_PHASES}} → total phases count
|
|
436
|
+
- {{MILESTONE}} → milestone
|
|
437
|
+
- {{ENTOMB_TIMESTAMP}} → current ISO-8601 UTC timestamp
|
|
364
438
|
|
|
365
|
-
|
|
439
|
+
Remove the HTML comment lines at the top of the template.
|
|
440
|
+
Write the result to .aether/HANDOFF.md using the Write tool.
|
|
366
441
|
|
|
367
|
-
### Step
|
|
442
|
+
### Step 12: Display Result
|
|
368
443
|
|
|
444
|
+
Display:
|
|
369
445
|
```
|
|
370
|
-
|
|
446
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
371
447
|
C O L O N Y E N T O M B E D
|
|
372
|
-
|
|
448
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
373
449
|
|
|
374
|
-
|
|
450
|
+
Entombed v{colony_version}
|
|
375
451
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
452
|
+
Goal: {goal}
|
|
453
|
+
Phases: {completed} completed
|
|
454
|
+
Milestone: {milestone}
|
|
379
455
|
|
|
380
|
-
|
|
456
|
+
Chamber: .aether/chambers/{chamber_name}/
|
|
457
|
+
{xml_archive_line}
|
|
381
458
|
|
|
382
|
-
|
|
459
|
+
The colony rests. Its learnings live on in QUEEN.md.
|
|
383
460
|
|
|
384
|
-
|
|
461
|
+
──────────────────────────────────────────────────
|
|
462
|
+
🐜 Next Up
|
|
463
|
+
──────────────────────────────────────────────────
|
|
464
|
+
/ant:lay-eggs 🥚 Start a new colony
|
|
465
|
+
/ant:tunnels 🗄️ Browse archived chambers
|
|
466
|
+
```
|
|
385
467
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
468
|
+
What would you like to do next?
|
|
469
|
+
1. /ant:lay-eggs "<new goal>" — Start a new colony
|
|
470
|
+
2. /ant:tunnels — Browse archived colonies
|
|
471
|
+
3. /clear — Clear context and continue
|
|
390
472
|
|
|
391
473
|
Use AskUserQuestion with these three options.
|
|
392
474
|
|
|
@@ -397,10 +479,20 @@ If option 3 selected: display "Run /ant:lay-eggs to begin anew after clearing"
|
|
|
397
479
|
|
|
398
480
|
### Edge Cases
|
|
399
481
|
|
|
400
|
-
**
|
|
482
|
+
**Colony not sealed:**
|
|
483
|
+
- Refuse with guidance to run /ant:seal first. This is the primary gate.
|
|
484
|
+
|
|
485
|
+
**Chamber name collision:**
|
|
486
|
+
- Automatically append counter to make unique.
|
|
487
|
+
|
|
488
|
+
**Missing files during archive:**
|
|
489
|
+
- Note in output but continue with available files. The `|| true` in the copy loop handles this.
|
|
401
490
|
|
|
402
|
-
**
|
|
491
|
+
**State reset failure:**
|
|
492
|
+
- Restore from backup, display error, do not claim success.
|
|
403
493
|
|
|
404
|
-
**
|
|
494
|
+
**Empty phases array:**
|
|
495
|
+
- Can entomb a colony that was initialized but had no phases planned (treat as 0 of 0 completed).
|
|
405
496
|
|
|
406
|
-
**
|
|
497
|
+
**Missing CROWNED-ANTHILL.md:**
|
|
498
|
+
- Refuse with guidance to run /ant:seal again.
|