aether-colony 5.0.0 → 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 +3150 -3349
- 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 +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 +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/.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/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 +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 +10 -8
- package/.aether/utils/session.sh +552 -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 +199 -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 +1 -14
- package/.claude/commands/ant/continue.md +40 -1026
- package/.claude/commands/ant/council.md +9 -16
- 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 +316 -191
- package/.claude/commands/ant/insert-phase.md +101 -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 +175 -52
- package/.claude/commands/ant/preferences.md +65 -0
- package/.claude/commands/ant/redirect.md +18 -0
- package/.claude/commands/ant/resume-colony.md +34 -20
- package/.claude/commands/ant/resume.md +51 -7
- package/.claude/commands/ant/run.md +195 -0
- package/.claude/commands/ant/seal.md +497 -78
- package/.claude/commands/ant/skill-create.md +286 -0
- package/.claude/commands/ant/status.md +127 -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 +8 -17
- package/.opencode/commands/ant/continue.md +595 -66
- 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 +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 +365 -156
- 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 +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 +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 +71 -20
- package/.opencode/commands/ant/run.md +201 -0
- package/.opencode/commands/ant/seal.md +230 -25
- package/.opencode/commands/ant/skill-create.md +63 -0
- package/.opencode/commands/ant/status.md +124 -31
- 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 +278 -1
- package/README.md +188 -340
- 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 +7 -3
- 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,447 @@
|
|
|
1
|
+
### Step 2.1.6: Batch Wisdom Auto-Promotion (QUEEN-01)
|
|
2
|
+
|
|
3
|
+
After learnings extraction and auto-emission, sweep all recorded observations and auto-promote any that meet the higher recurrence thresholds (pattern=2, philosophy=3, etc.) to QUEEN.md. The learning-promote-auto subcommand has an internal grep guard that skips content already in QUEEN.md, so this is safe to run even after memory-capture in Step 2.5 already attempted promotion.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# === Batch Wisdom Auto-Promotion (QUEEN-01) ===
|
|
7
|
+
# Sweep all observations and auto-promote any that crossed auto thresholds.
|
|
8
|
+
# The grep guard inside learning-promote-auto prevents double-promotion
|
|
9
|
+
# for observations already promoted by memory-capture in Step 2.5.
|
|
10
|
+
|
|
11
|
+
obs_file=".aether/data/learning-observations.json"
|
|
12
|
+
if [[ -f "$obs_file" ]]; then
|
|
13
|
+
obs_count=$(jq '.observations | length' "$obs_file" 2>/dev/null || echo "0")
|
|
14
|
+
promoted_count=0
|
|
15
|
+
|
|
16
|
+
if [[ "$obs_count" -gt 0 ]]; then
|
|
17
|
+
for encoded in $(jq -r '.observations[] | @base64' "$obs_file" 2>/dev/null); do
|
|
18
|
+
content=$(echo "$encoded" | base64 -d | jq -r '.content // empty')
|
|
19
|
+
wisdom_type=$(echo "$encoded" | base64 -d | jq -r '.wisdom_type // "pattern"')
|
|
20
|
+
colony=$(echo "$encoded" | base64 -d | jq -r '.colonies[0] // "unknown"')
|
|
21
|
+
[[ -z "$content" ]] && continue
|
|
22
|
+
|
|
23
|
+
result=$(bash .aether/aether-utils.sh learning-promote-auto "$wisdom_type" "$content" "$colony" "learning" 2>/dev/null || echo '{}')
|
|
24
|
+
was_promoted=$(echo "$result" | jq -r '.result.promoted // false' 2>/dev/null || echo "false")
|
|
25
|
+
if [[ "$was_promoted" == "true" ]]; then
|
|
26
|
+
promoted_count=$((promoted_count + 1))
|
|
27
|
+
fi
|
|
28
|
+
done
|
|
29
|
+
fi
|
|
30
|
+
fi
|
|
31
|
+
# === END Batch Wisdom Auto-Promotion ===
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Step 2.1.7: Write Build Learnings to QUEEN.md (QUEEN-01)
|
|
35
|
+
|
|
36
|
+
After learning extraction and auto-promotion, write the current phase's learnings directly
|
|
37
|
+
to the QUEEN.md Build Learnings section. This captures both successes and failures from every
|
|
38
|
+
build, regardless of recurrence thresholds.
|
|
39
|
+
|
|
40
|
+
**This step uses queen-write-learnings, which bypasses observation thresholds.**
|
|
41
|
+
Every build writes learnings -- this is the user's explicit decision.
|
|
42
|
+
|
|
43
|
+
Run using the Bash tool with description "Writing build learnings to QUEEN.md...":
|
|
44
|
+
```bash
|
|
45
|
+
# Get phase info
|
|
46
|
+
current_phase=$(jq -r '.current_phase' .aether/data/COLONY_STATE.json 2>/dev/null || echo "0")
|
|
47
|
+
phase_name=$(jq -r --argjson p "$current_phase" '.plan.phases[] | select(.id == $p) | .name // "unknown"' .aether/data/COLONY_STATE.json 2>/dev/null || echo "unknown")
|
|
48
|
+
|
|
49
|
+
# Extract learnings from the just-completed phase
|
|
50
|
+
learnings_json=$(jq -r --argjson p "$((current_phase - 1))" '
|
|
51
|
+
[.memory.phase_learnings[]
|
|
52
|
+
| select(.phase == $p)
|
|
53
|
+
| .learnings[]
|
|
54
|
+
| {
|
|
55
|
+
claim: .claim,
|
|
56
|
+
tag: (if (.claim | test("this (codebase|repo|project)"; "i")) then "repo" else "general" end),
|
|
57
|
+
evidence: (.evidence // "")
|
|
58
|
+
}
|
|
59
|
+
]' .aether/data/COLONY_STATE.json 2>/dev/null || echo '[]')
|
|
60
|
+
|
|
61
|
+
learnings_count=$(echo "$learnings_json" | jq 'length' 2>/dev/null || echo "0")
|
|
62
|
+
|
|
63
|
+
if [[ "$learnings_count" -gt 0 ]] && [[ "$learnings_json" != "[]" ]]; then
|
|
64
|
+
prev_phase=$((current_phase - 1))
|
|
65
|
+
queen_error="false"
|
|
66
|
+
result=$(bash .aether/aether-utils.sh queen-write-learnings \
|
|
67
|
+
"$prev_phase" "$phase_name" "$learnings_json" 2>/dev/null || echo '{"ok":false}')
|
|
68
|
+
[[ "$result" == '{"ok":false}' ]] && queen_error="true"
|
|
69
|
+
|
|
70
|
+
written=$(echo "$result" | jq -r '.result.written // 0' 2>/dev/null || echo "0")
|
|
71
|
+
fi
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Tag heuristic:**
|
|
75
|
+
- Default tag is "general" (most learnings are broadly applicable)
|
|
76
|
+
- Tag as "repo" if the claim mentions "this codebase", "this repo", "this project", or contains repo-specific names
|
|
77
|
+
- The jq query uses a regex test for common repo-specific indicators
|
|
78
|
+
|
|
79
|
+
**Brief notice:** The consolidated wisdom summary (below) serves as the brief notice.
|
|
80
|
+
It only appears when entries are actually written or instincts are promoted. No notice for zero writes.
|
|
81
|
+
|
|
82
|
+
This step is NON-BLOCKING -- QUEEN.md write failures never block phase advancement.
|
|
83
|
+
The dedup check inside queen-write-learnings prevents duplicate entries.
|
|
84
|
+
|
|
85
|
+
### Wisdom Summary (PIPE-04)
|
|
86
|
+
|
|
87
|
+
After both queen-write-learnings and hive promotion complete, output a single consolidated wisdom line. This replaces the individual "Written N learning(s)" echo from Step 2.1.7 above.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# === Consolidated Wisdom Summary ===
|
|
91
|
+
# Build summary from both queen-write-learnings (Step 2.1.7) and hive promotion (Step 3d)
|
|
92
|
+
# Capture the hive_promoted_count passed from continue-advance.md
|
|
93
|
+
hive_promoted_count="${hive_promoted_count:-0}" # Default to 0 if Step 3d didn't run
|
|
94
|
+
|
|
95
|
+
wisdom_parts=""
|
|
96
|
+
[[ "$written" -gt 0 ]] && wisdom_parts="$written learning(s) recorded"
|
|
97
|
+
# Capture fallback_count from continue-advance.md Step 2.4
|
|
98
|
+
fallback_count="${fallback_count:-0}"
|
|
99
|
+
if [[ "$fallback_count" -gt 0 ]]; then
|
|
100
|
+
wisdom_parts="${wisdom_parts} ($fallback_count from fallback)"
|
|
101
|
+
fi
|
|
102
|
+
if [[ "$hive_promoted_count" -gt 0 ]]; then
|
|
103
|
+
[[ -n "$wisdom_parts" ]] && wisdom_parts="$wisdom_parts, "
|
|
104
|
+
wisdom_parts="$wisdom_parts$hive_promoted_count instinct(s) promoted to hive"
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
if [[ -n "$wisdom_parts" ]]; then
|
|
108
|
+
echo "$wisdom_parts"
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
# Warning for failures (non-blocking)
|
|
112
|
+
wisdom_failures=0
|
|
113
|
+
[[ "$queen_error" == "true" ]] && wisdom_failures=$((wisdom_failures + 1))
|
|
114
|
+
[[ "$hive_error" == "true" ]] && wisdom_failures=$((wisdom_failures + 1))
|
|
115
|
+
if [[ "$wisdom_failures" -gt 0 ]]; then
|
|
116
|
+
echo "Warning: $wisdom_failures wisdom write(s) failed"
|
|
117
|
+
fi
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Step 2.2: Update Handoff Document
|
|
121
|
+
|
|
122
|
+
After advancing the phase, update the handoff document with the new current state:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Determine if there's a next phase
|
|
126
|
+
next_phase_id=$((current_phase + 1))
|
|
127
|
+
has_next_phase=$(jq --arg next "$next_phase_id" '.plan.phases | map(select(.id == ($next | tonumber))) | length' .aether/data/COLONY_STATE.json)
|
|
128
|
+
|
|
129
|
+
# Write updated handoff
|
|
130
|
+
cat > .aether/HANDOFF.md << 'HANDOFF_EOF'
|
|
131
|
+
# Colony Session — Phase Advanced
|
|
132
|
+
|
|
133
|
+
## Quick Resume
|
|
134
|
+
Run `/ant:build {next_phase_id}` to start working on the current phase.
|
|
135
|
+
|
|
136
|
+
## State at Advancement
|
|
137
|
+
- Goal: "$(jq -r '.goal' .aether/data/COLONY_STATE.json)"
|
|
138
|
+
- Completed Phase: {completed_phase_id} — {completed_phase_name}
|
|
139
|
+
- Current Phase: {next_phase_id} — {next_phase_name}
|
|
140
|
+
- State: READY
|
|
141
|
+
- Updated: $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
142
|
+
|
|
143
|
+
## What Was Completed
|
|
144
|
+
- Phase {completed_phase_id} marked as completed
|
|
145
|
+
- Learnings extracted: {learning_count}
|
|
146
|
+
- Instincts updated: {instinct_count}
|
|
147
|
+
- Wisdom promoted to QUEEN.md: {promoted_count}
|
|
148
|
+
|
|
149
|
+
## Current Phase Tasks
|
|
150
|
+
$(jq -r '.plan.phases[] | select(.id == next_phase_id) | .tasks[] | "- [ ] \(.id): \(.description)"' .aether/data/COLONY_STATE.json)
|
|
151
|
+
|
|
152
|
+
## Next Steps
|
|
153
|
+
- Build current phase: `/ant:build {next_phase_id}`
|
|
154
|
+
- Review phase details: `/ant:phase {next_phase_id}`
|
|
155
|
+
- Pause colony: `/ant:pause-colony`
|
|
156
|
+
|
|
157
|
+
## Session Note
|
|
158
|
+
Phase advanced successfully. Colony is READY to build Phase {next_phase_id}.
|
|
159
|
+
HANDOFF_EOF
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
This handoff reflects the post-advancement state, allowing seamless resumption even if the session is lost.
|
|
163
|
+
|
|
164
|
+
### Step 2.3: Update Changelog
|
|
165
|
+
|
|
166
|
+
**MANDATORY: Append a changelog entry for the completed phase. This step is never skipped.**
|
|
167
|
+
|
|
168
|
+
If no `CHANGELOG.md` exists, `changelog-append` creates one automatically.
|
|
169
|
+
|
|
170
|
+
**Step 2.3.1: Collect plan data**
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
bash .aether/aether-utils.sh changelog-collect-plan-data "{phase_identifier}" "{plan_number}"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Parse the returned JSON to extract `files`, `decisions`, `worked`, and `requirements` arrays.
|
|
177
|
+
|
|
178
|
+
- `{phase_identifier}` is the full phase name (e.g., `36-memory-capture`)
|
|
179
|
+
- `{plan_number}` is the plan number (e.g., `01`)
|
|
180
|
+
|
|
181
|
+
If the command fails (e.g., no plan file found), fall back to collecting data manually:
|
|
182
|
+
- Files: from `git diff --stat` of the completed phase
|
|
183
|
+
- Decisions: from COLONY_STATE.json `memory.decisions` (last 5)
|
|
184
|
+
- Worked/requirements: leave empty
|
|
185
|
+
|
|
186
|
+
**Step 2.3.2: Append changelog entry**
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
bash .aether/aether-utils.sh changelog-append \
|
|
190
|
+
"$(date +%Y-%m-%d)" \
|
|
191
|
+
"{phase_identifier}" \
|
|
192
|
+
"{plan_number}" \
|
|
193
|
+
"{files_csv}" \
|
|
194
|
+
"{decisions_semicolon_separated}" \
|
|
195
|
+
"{worked_semicolon_separated}" \
|
|
196
|
+
"{requirements_csv}"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
This atomically writes the entry. If the project already has a Keep a Changelog format, it adds a "Colony Work Log" separator section to keep both formats clean.
|
|
200
|
+
|
|
201
|
+
**Error handling:** If `changelog-append` fails, log to midden and continue — changelog failure never blocks phase advancement.
|
|
202
|
+
|
|
203
|
+
### Step 2.4: Commit Suggestion (Optional)
|
|
204
|
+
|
|
205
|
+
**This step is non-blocking. Skipping does not affect phase advancement or any subsequent steps. Failure to commit has zero consequences.**
|
|
206
|
+
|
|
207
|
+
After the phase is advanced and changelog updated, suggest a commit to preserve the milestone.
|
|
208
|
+
|
|
209
|
+
#### Step 2.4.1: Capture AI Description
|
|
210
|
+
|
|
211
|
+
**As the AI, briefly describe what was accomplished in this phase.**
|
|
212
|
+
|
|
213
|
+
Look at:
|
|
214
|
+
1. The phase PLAN.md `<objective>` section (what we set out to do)
|
|
215
|
+
2. Tasks that were marked complete
|
|
216
|
+
3. Files that were modified (from git diff --stat)
|
|
217
|
+
4. Any patterns or decisions recorded
|
|
218
|
+
|
|
219
|
+
**Provide a brief, memorable description** (10-15 words, imperative mood):
|
|
220
|
+
- Good: "Implement task-based model routing with keyword detection and precedence chain"
|
|
221
|
+
- Good: "Fix build timing by removing background execution from worker spawns"
|
|
222
|
+
- Bad: "Phase complete" (too vague)
|
|
223
|
+
- Bad: "Modified files in bin/lib" (too mechanical)
|
|
224
|
+
|
|
225
|
+
Store this as `ai_description` for the commit message.
|
|
226
|
+
|
|
227
|
+
#### Step 2.4.2: Generate Enhanced Commit Message
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
bash .aether/aether-utils.sh generate-commit-message "contextual" {phase_id} "{phase_name}" "{ai_description}" {plan_number}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Parse the returned JSON to extract:
|
|
234
|
+
- `message` - the commit subject line
|
|
235
|
+
- `body` - structured metadata (Scope, Files)
|
|
236
|
+
- `files_changed` - file count
|
|
237
|
+
- `subsystem` - derived subsystem name
|
|
238
|
+
- `scope` - phase.plan format
|
|
239
|
+
|
|
240
|
+
**Check files changed:**
|
|
241
|
+
```bash
|
|
242
|
+
git diff --stat HEAD 2>/dev/null | tail -5
|
|
243
|
+
```
|
|
244
|
+
If not in a git repo or no changes detected, skip this step silently.
|
|
245
|
+
|
|
246
|
+
**Display the enhanced suggestion:**
|
|
247
|
+
```
|
|
248
|
+
──────────────────────────────────────────────────
|
|
249
|
+
Commit Suggestion
|
|
250
|
+
──────────────────────────────────────────────────
|
|
251
|
+
|
|
252
|
+
AI Description: {ai_description}
|
|
253
|
+
|
|
254
|
+
Formatted Message:
|
|
255
|
+
{message}
|
|
256
|
+
|
|
257
|
+
Metadata:
|
|
258
|
+
Scope: {scope}
|
|
259
|
+
Files: {files_changed} files changed
|
|
260
|
+
Preview: {first 5 lines of git diff --stat}
|
|
261
|
+
|
|
262
|
+
──────────────────────────────────────────────────
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Use AskUserQuestion:**
|
|
266
|
+
```
|
|
267
|
+
Commit this milestone?
|
|
268
|
+
|
|
269
|
+
1. Yes, commit with this message
|
|
270
|
+
2. Yes, but let me edit the description
|
|
271
|
+
3. No, I'll commit later
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**If option 1 ("Yes, commit with this message"):**
|
|
275
|
+
```bash
|
|
276
|
+
git add -A && git commit -m "{message}" -m "{body}"
|
|
277
|
+
```
|
|
278
|
+
Display: `Committed: {message} ({files_changed} files)`
|
|
279
|
+
|
|
280
|
+
**If option 2 ("Yes, but let me edit"):**
|
|
281
|
+
Use AskUserQuestion to get the user's custom description:
|
|
282
|
+
```
|
|
283
|
+
Enter your description (or press Enter to keep: '{ai_description}'):
|
|
284
|
+
```
|
|
285
|
+
Then regenerate the commit message with the new description and commit.
|
|
286
|
+
|
|
287
|
+
**If option 3 ("No, I'll commit later"):**
|
|
288
|
+
Display: `Skipped. Your changes are saved on disk but not committed.`
|
|
289
|
+
|
|
290
|
+
**Record the suggestion to prevent double-prompting:**
|
|
291
|
+
Set `last_commit_suggestion_phase` to `{phase_id}` in COLONY_STATE.json (add the field at the top level if it does not exist).
|
|
292
|
+
|
|
293
|
+
**Error handling:** If any git command fails (not a repo, merge conflict, pre-commit hook rejection), display the error output and continue to the next step. The commit suggestion is advisory only -- it never blocks the flow.
|
|
294
|
+
|
|
295
|
+
Continue to Step 2.5 (Context Clear Suggestion), then to Step 2.7 (Project Completion) or Step 3 (Display Result).
|
|
296
|
+
|
|
297
|
+
### Step 2.5: Context Clear Suggestion (Optional)
|
|
298
|
+
|
|
299
|
+
**This step is non-blocking. Skipping does not affect phase advancement.**
|
|
300
|
+
|
|
301
|
+
After committing (or skipping commit), suggest clearing context to refresh before the next phase.
|
|
302
|
+
|
|
303
|
+
1. **Display the suggestion:**
|
|
304
|
+
```
|
|
305
|
+
──────────────────────────────────────────────────
|
|
306
|
+
Context Refresh
|
|
307
|
+
──────────────────────────────────────────────────
|
|
308
|
+
|
|
309
|
+
State is fully persisted and committed.
|
|
310
|
+
Phase {next_id} is ready to build.
|
|
311
|
+
|
|
312
|
+
──────────────────────────────────────────────────
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
2. **Use AskUserQuestion:**
|
|
316
|
+
```
|
|
317
|
+
Clear context now?
|
|
318
|
+
|
|
319
|
+
1. Yes, clear context then run /ant:build {next_id}
|
|
320
|
+
2. No, continue in current context
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
3. **If option 1 ("Yes, clear context"):**
|
|
324
|
+
|
|
325
|
+
**IMPORTANT:** Claude Code does not support programmatic /clear. Display instructions:
|
|
326
|
+
```
|
|
327
|
+
Please type: /clear
|
|
328
|
+
|
|
329
|
+
Then run: /ant:build {next_id}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Record the suggestion: Set `context_clear_suggested` to `true` in COLONY_STATE.json.
|
|
333
|
+
|
|
334
|
+
4. **If option 2 ("No, continue in current context"):**
|
|
335
|
+
Display: `Continuing in current context. State is saved.`
|
|
336
|
+
|
|
337
|
+
Continue to Step 2.7 (Project Completion) or Step 3 (Display Result).
|
|
338
|
+
|
|
339
|
+
### Step 2.6: Update Context Document
|
|
340
|
+
|
|
341
|
+
After phase advancement is complete, update `.aether/CONTEXT.md`:
|
|
342
|
+
|
|
343
|
+
**Log the activity:**
|
|
344
|
+
```bash
|
|
345
|
+
bash .aether/aether-utils.sh context-update activity "continue" "Phase {prev_id} completed, advanced to {next_id}" "—"
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
**Update the phase:**
|
|
349
|
+
```bash
|
|
350
|
+
bash .aether/aether-utils.sh context-update update-phase {next_id} "{next_phase_name}" "YES" "Phase advanced, ready to build"
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**Log any decisions from this session:**
|
|
354
|
+
If any architectural decisions were made during verification, also run:
|
|
355
|
+
```bash
|
|
356
|
+
bash .aether/aether-utils.sh context-update decision "{decision_description}" "{rationale}" "Queen"
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
### Step 2.7: Project Completion
|
|
360
|
+
|
|
361
|
+
Runs ONLY when all phases complete.
|
|
362
|
+
|
|
363
|
+
1. Read activity.log and errors.records
|
|
364
|
+
2. Display tech debt report:
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
368
|
+
🎉 P R O J E C T C O M P L E T E 🎉
|
|
369
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
370
|
+
|
|
371
|
+
👑 Goal Achieved: {goal}
|
|
372
|
+
📍 Phases Completed: {total}
|
|
373
|
+
|
|
374
|
+
{if flagged_patterns:}
|
|
375
|
+
⚠️ Persistent Issues:
|
|
376
|
+
{list any flagged_patterns}
|
|
377
|
+
{end if}
|
|
378
|
+
|
|
379
|
+
🧠 Colony Learnings:
|
|
380
|
+
{condensed learnings from memory.phase_learnings}
|
|
381
|
+
|
|
382
|
+
👑 Wisdom Added to QUEEN.md:
|
|
383
|
+
{count} patterns/redirects/philosophies promoted across all phases
|
|
384
|
+
|
|
385
|
+
🐜 The colony rests. Well done!
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
3. Write summary to `.aether/data/completion-report.md`
|
|
389
|
+
4. Display next commands and stop.
|
|
390
|
+
|
|
391
|
+
### Step 3: Display Result
|
|
392
|
+
|
|
393
|
+
Output:
|
|
394
|
+
|
|
395
|
+
```
|
|
396
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
397
|
+
P H A S E A D V A N C E M E N T
|
|
398
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
399
|
+
|
|
400
|
+
✅ Phase {prev_id}: {prev_name} -- COMPLETED
|
|
401
|
+
|
|
402
|
+
🧠 Learnings Extracted:
|
|
403
|
+
{list learnings added}
|
|
404
|
+
|
|
405
|
+
👑 Wisdom Promoted to QUEEN.md:
|
|
406
|
+
{for each promoted learning:}
|
|
407
|
+
[{type}] {brief claim}
|
|
408
|
+
{end for}
|
|
409
|
+
|
|
410
|
+
🐜 Instincts Updated:
|
|
411
|
+
{for each instinct created or updated:}
|
|
412
|
+
[{confidence}] {domain}: {action}
|
|
413
|
+
{end for}
|
|
414
|
+
|
|
415
|
+
📝 QUEEN.md Updated:
|
|
416
|
+
Build learnings: {written_count} entries
|
|
417
|
+
Instincts promoted: {promoted_instinct_count} entries
|
|
418
|
+
|
|
419
|
+
─────────────────────────────────────────────────────
|
|
420
|
+
|
|
421
|
+
➡️ Advancing to Phase {next_id}: {next_name}
|
|
422
|
+
{next_description}
|
|
423
|
+
📋 Tasks: {task_count}
|
|
424
|
+
📊 State: READY
|
|
425
|
+
|
|
426
|
+
──────────────────────────────────────────────────
|
|
427
|
+
🐜 Next Up
|
|
428
|
+
──────────────────────────────────────────────────
|
|
429
|
+
/ant:build {next_id} 🔨 Build next phase
|
|
430
|
+
/ant:status 📊 Check progress
|
|
431
|
+
|
|
432
|
+
💾 State persisted — context clear suggested above
|
|
433
|
+
|
|
434
|
+
📋 Context document updated at `.aether/CONTEXT.md`
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**IMPORTANT:** In the "Next Steps" section above, substitute the actual phase number for `{next_id}` (calculated in Step 2 as `current_phase + 1`). For example, if advancing to phase 4, output `/ant:build 4` not `/ant:build {next_id}`.
|
|
438
|
+
|
|
439
|
+
### Step 4: Update Session
|
|
440
|
+
|
|
441
|
+
Update the session tracking file to enable `/ant:resume` after context clear:
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
bash .aether/aether-utils.sh session-update "/ant:continue" "/ant:build {next_id}" "Phase {prev_id} completed, advanced to Phase {next_id}"
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Run using the Bash tool with description "Saving session state...": `bash .aether/aether-utils.sh session-update "/ant:continue" "/ant:build {next_id}" "Phase {prev_id} completed, advanced to Phase {next_id}"`
|