aether-colony 3.1.17 → 5.0.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/{runtime → .aether}/CONTEXT.md +1 -1
- package/{runtime → .aether}/aether-utils.sh +1772 -98
- package/.aether/docs/QUEEN-SYSTEM.md +211 -0
- package/.aether/docs/QUEEN.md +84 -0
- package/.aether/docs/README.md +68 -0
- package/.aether/docs/caste-system.md +48 -0
- package/{runtime → .aether/docs/disciplines}/DISCIPLINES.md +8 -8
- package/.aether/docs/error-codes.md +268 -0
- package/{runtime → .aether}/docs/known-issues.md +42 -26
- package/.aether/docs/queen-commands.md +97 -0
- package/.aether/exchange/colony-registry.xml +11 -0
- package/{runtime → .aether}/exchange/pheromone-xml.sh +2 -1
- package/.aether/exchange/pheromones.xml +87 -0
- package/.aether/exchange/queen-wisdom.xml +14 -0
- package/{runtime → .aether}/exchange/registry-xml.sh +7 -3
- package/{runtime → .aether}/exchange/wisdom-xml.sh +11 -4
- package/.aether/rules/aether-colony.md +134 -0
- package/.aether/schemas/example-prompt-builder.xml +234 -0
- package/.aether/templates/colony-state-reset.jq.template +22 -0
- package/.aether/templates/colony-state.template.json +35 -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/{runtime → .aether}/utils/atomic-write.sh +5 -5
- package/{runtime → .aether}/utils/chamber-compare.sh +23 -10
- package/{runtime → .aether}/utils/chamber-utils.sh +32 -20
- package/{runtime → .aether}/utils/error-handler.sh +13 -1
- package/{runtime → .aether}/utils/file-lock.sh +49 -13
- package/.aether/utils/semantic-cli.sh +413 -0
- package/{runtime → .aether}/utils/xml-compose.sh +7 -1
- package/.aether/utils/xml-convert.sh +273 -0
- package/.aether/utils/xml-query.sh +201 -0
- package/.aether/utils/xml-utils.sh +110 -0
- package/{runtime → .aether}/workers.md +14 -17
- package/.claude/agents/ant/aether-ambassador.md +264 -0
- package/.claude/agents/ant/aether-archaeologist.md +322 -0
- package/.claude/agents/ant/aether-auditor.md +266 -0
- package/.claude/agents/ant/aether-builder.md +187 -0
- package/.claude/agents/ant/aether-chaos.md +268 -0
- package/.claude/agents/ant/aether-chronicler.md +304 -0
- package/.claude/agents/ant/aether-gatekeeper.md +325 -0
- package/.claude/agents/ant/aether-includer.md +373 -0
- package/.claude/agents/ant/aether-keeper.md +271 -0
- package/.claude/agents/ant/aether-measurer.md +317 -0
- package/.claude/agents/ant/aether-probe.md +210 -0
- package/.claude/agents/ant/aether-queen.md +325 -0
- package/.claude/agents/ant/aether-route-setter.md +173 -0
- package/.claude/agents/ant/aether-sage.md +353 -0
- package/.claude/agents/ant/aether-scout.md +142 -0
- package/.claude/agents/ant/aether-surveyor-disciplines.md +416 -0
- package/.claude/agents/ant/aether-surveyor-nest.md +354 -0
- package/.claude/agents/ant/aether-surveyor-pathogens.md +288 -0
- package/.claude/agents/ant/aether-surveyor-provisions.md +359 -0
- package/.claude/agents/ant/aether-tracker.md +265 -0
- package/.claude/agents/ant/aether-watcher.md +244 -0
- package/.claude/agents/ant/aether-weaver.md +247 -0
- package/.claude/commands/ant/archaeology.md +16 -7
- package/.claude/commands/ant/build.md +415 -284
- package/.claude/commands/ant/chaos.md +19 -10
- package/.claude/commands/ant/colonize.md +58 -24
- package/.claude/commands/ant/continue.md +155 -145
- package/.claude/commands/ant/council.md +15 -5
- package/.claude/commands/ant/dream.md +16 -7
- package/.claude/commands/ant/entomb.md +274 -157
- package/.claude/commands/ant/feedback.md +33 -29
- package/.claude/commands/ant/flag.md +18 -10
- package/.claude/commands/ant/flags.md +14 -6
- package/.claude/commands/ant/focus.md +29 -21
- package/.claude/commands/ant/help.md +11 -1
- package/.claude/commands/ant/history.md +10 -0
- package/.claude/commands/ant/init.md +91 -65
- package/.claude/commands/ant/interpret.md +15 -4
- package/.claude/commands/ant/lay-eggs.md +55 -7
- package/.claude/commands/ant/maturity.md +11 -1
- package/.claude/commands/ant/migrate-state.md +14 -2
- package/.claude/commands/ant/oracle.md +23 -15
- package/.claude/commands/ant/organize.md +29 -20
- package/.claude/commands/ant/pause-colony.md +17 -7
- package/.claude/commands/ant/phase.md +17 -8
- package/.claude/commands/ant/plan.md +20 -9
- package/.claude/commands/ant/redirect.md +29 -32
- package/.claude/commands/ant/resume-colony.md +19 -9
- package/.claude/commands/ant/resume.md +272 -96
- package/.claude/commands/ant/seal.md +201 -191
- package/.claude/commands/ant/status.md +71 -32
- package/.claude/commands/ant/swarm.md +26 -44
- package/.claude/commands/ant/tunnels.md +279 -105
- package/.claude/commands/ant/update.md +81 -20
- package/.claude/commands/ant/verify-castes.md +14 -4
- package/.claude/commands/ant/watch.md +13 -12
- package/.opencode/agents/aether-ambassador.md +63 -20
- package/.opencode/agents/aether-archaeologist.md +29 -12
- package/.opencode/agents/aether-auditor.md +51 -18
- package/.opencode/agents/aether-builder.md +69 -19
- 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-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 +27 -19
- package/.opencode/agents/aether-surveyor-disciplines.md +53 -1
- package/.opencode/agents/aether-surveyor-nest.md +53 -1
- package/.opencode/agents/aether-surveyor-pathogens.md +51 -1
- package/.opencode/agents/aether-surveyor-provisions.md +53 -1
- 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/build.md +406 -192
- package/.opencode/commands/ant/continue.md +66 -76
- package/.opencode/commands/ant/entomb.md +106 -45
- package/.opencode/commands/ant/init.md +46 -48
- package/.opencode/commands/ant/organize.md +5 -5
- package/.opencode/commands/ant/resume.md +334 -0
- package/.opencode/commands/ant/seal.md +33 -24
- package/.opencode/commands/ant/status.md +11 -0
- package/.opencode/commands/ant/tunnels.md +149 -0
- package/.opencode/commands/ant/update.md +59 -16
- package/CHANGELOG.md +79 -0
- package/README.md +135 -353
- package/bin/cli.js +243 -122
- package/bin/generate-commands.sh +2 -2
- package/bin/lib/init.js +13 -3
- package/bin/lib/update-transaction.js +119 -117
- package/bin/sync-to-runtime.sh +5 -137
- package/bin/validate-package.sh +84 -0
- package/package.json +9 -6
- package/.opencode/agents/aether-architect.md +0 -66
- package/.opencode/agents/aether-guardian.md +0 -107
- package/.opencode/agents/workers.md +0 -1034
- package/runtime/QUEEN_ANT_ARCHITECTURE.md +0 -402
- 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/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/planning.md +0 -159
- package/runtime/recover.sh +0 -136
- 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}/docs/pheromones.md +0 -0
- /package/{runtime → .aether}/model-profiles.yaml +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}/templates/QUEEN.md.template +0 -0
- /package/{runtime → .aether}/utils/colorize-log.sh +0 -0
- /package/{runtime → .aether}/utils/queen-to-md.xsl +0 -0
- /package/{runtime → .aether}/utils/spawn-tree.sh +0 -0
- /package/{runtime → .aether}/utils/spawn-with-model.sh +0 -0
- /package/{runtime → .aether}/utils/state-loader.sh +0 -0
- /package/{runtime → .aether}/utils/swarm-display.sh +0 -0
- /package/{runtime → .aether}/utils/watch-spawn-tree.sh +0 -0
- /package/{runtime → .aether}/utils/xml-core.sh +0 -0
|
@@ -13,7 +13,7 @@ Parse `$ARGUMENTS`:
|
|
|
13
13
|
|
|
14
14
|
### Step 0: Initialize Visual Mode (if enabled)
|
|
15
15
|
|
|
16
|
-
If `visual_mode` is true:
|
|
16
|
+
If `visual_mode` is true, run using the Bash tool with description "Initializing resume display...":
|
|
17
17
|
```bash
|
|
18
18
|
# Generate session ID
|
|
19
19
|
resume_id="resume-$(date +%s)"
|
|
@@ -25,13 +25,13 @@ bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "excavating" "
|
|
|
25
25
|
|
|
26
26
|
### Step 0.5: Version Check (Non-blocking)
|
|
27
27
|
|
|
28
|
-
Run using the Bash tool: `bash .aether/aether-utils.sh version-check 2>/dev/null || true`
|
|
28
|
+
Run using the Bash tool with description "Checking colony version...": `bash .aether/aether-utils.sh version-check-cached 2>/dev/null || true`
|
|
29
29
|
|
|
30
30
|
If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
|
|
31
31
|
|
|
32
32
|
### Step 1: Load State and Validate
|
|
33
33
|
|
|
34
|
-
Run using Bash tool: `bash .aether/aether-utils.sh load-state`
|
|
34
|
+
Run using the Bash tool with description "Restoring colony session...": `bash .aether/aether-utils.sh load-state`
|
|
35
35
|
|
|
36
36
|
If successful:
|
|
37
37
|
1. Parse state from result
|
|
@@ -58,9 +58,9 @@ If `signals` array is empty or all expired, treat as "no active pheromones."
|
|
|
58
58
|
Output header:
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
🚦➡️🐜💨💨
|
|
61
|
+
🚦➡️🐜💨💨 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
62
62
|
C O L O N Y R E S U M E D
|
|
63
|
-
|
|
63
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🚦➡️🐜💨💨
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
Read the .aether/HANDOFF.md for context about what was happening, then display:
|
|
@@ -93,10 +93,10 @@ CONTEXT FROM HANDOFF
|
|
|
93
93
|
NEXT ACTIONS
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
**If visual_mode is true, render final swarm display
|
|
96
|
+
**If visual_mode is true, render final swarm display** by running using the Bash tool with description "Updating resume display...":
|
|
97
97
|
```bash
|
|
98
98
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony resumed" "Colony" '{"read":3,"grep":0,"edit":2,"bash":1}' 100 "fungus_garden" 100
|
|
99
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
99
|
+
bash .aether/aether-utils.sh swarm-display-text "$resume_id"
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
Route to next action based on state:
|
|
@@ -113,9 +113,19 @@ Use Write tool to update COLONY_STATE.json:
|
|
|
113
113
|
- Update last_updated timestamp
|
|
114
114
|
- Add event: `{timestamp, type: "colony_resumed", worker: "resume", details: "Session resumed"}`
|
|
115
115
|
|
|
116
|
-
Use Bash tool to remove HANDOFF.md: `rm -f .aether/HANDOFF.md`
|
|
116
|
+
Use Bash tool with description "Cleaning up handoff file..." to remove HANDOFF.md: `rm -f .aether/HANDOFF.md`
|
|
117
117
|
|
|
118
|
-
Run: `bash .aether/aether-utils.sh unload-state` to release lock.
|
|
118
|
+
Run using the Bash tool with description "Releasing colony lock...": `bash .aether/aether-utils.sh unload-state` to release lock.
|
|
119
|
+
|
|
120
|
+
### Step 7: Next Up
|
|
121
|
+
|
|
122
|
+
Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
|
|
123
|
+
```bash
|
|
124
|
+
state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
|
|
125
|
+
current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
|
|
126
|
+
total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
|
|
127
|
+
bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
|
|
128
|
+
```
|
|
119
129
|
|
|
120
130
|
---
|
|
121
131
|
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Resume
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
---
|
|
2
|
+
name: resume
|
|
3
|
+
description: "Resume Previous Session"
|
|
4
|
+
symbol: refresh
|
|
5
|
+
---
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- When opening a new Claude Code session with existing colony state
|
|
9
|
-
- To check what you were working on and pick up where you left off
|
|
10
|
-
|
|
11
|
-
## What It Does
|
|
7
|
+
# /ant:resume — Resume Previous Session
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
2. Reads `COLONY_STATE.json` to verify colony status
|
|
15
|
-
3. Checks `TO-DOs.md` for relevant pending work
|
|
16
|
-
4. Presents a summary and asks if you want to resume
|
|
17
|
-
5. If yes: Restores context and suggests next step
|
|
18
|
-
6. If no: Offers to start fresh with `/ant:init`
|
|
9
|
+
Resume work after `/clear` or in a new session. Reads colony state, detects codebase drift, and gives you a clear "do this next" recommendation.
|
|
19
10
|
|
|
20
11
|
## Usage
|
|
21
12
|
|
|
@@ -23,137 +14,322 @@ Resume work from where you left off after a context clear or new session start.
|
|
|
23
14
|
/ant:resume
|
|
24
15
|
```
|
|
25
16
|
|
|
26
|
-
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Implementation
|
|
20
|
+
|
|
21
|
+
Execute the following steps in order when the user runs `/ant:resume`.
|
|
22
|
+
|
|
23
|
+
---
|
|
27
24
|
|
|
28
|
-
### Step 1:
|
|
25
|
+
### Step 1: Read Session State
|
|
29
26
|
|
|
27
|
+
Run using the Bash tool with description "Restoring colony session...":
|
|
30
28
|
```bash
|
|
31
29
|
bash .aether/aether-utils.sh session-read
|
|
32
30
|
```
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
Parse the JSON result.
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
- If `exists` is `false`: display the following and **stop**:
|
|
37
35
|
|
|
38
|
-
Display:
|
|
39
36
|
```
|
|
40
|
-
|
|
37
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
38
|
+
RESUME SESSION
|
|
41
39
|
|
|
42
40
|
No previous session found.
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
3. View existing colonies with /ant:history
|
|
42
|
+
Start fresh: /ant:init "your goal"
|
|
43
|
+
Or check: /ant:status
|
|
44
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
48
45
|
```
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
- If `exists` is `true`: extract from the session data:
|
|
48
|
+
- `colony_goal`
|
|
49
|
+
- `current_phase`
|
|
50
|
+
- `last_command`
|
|
51
|
+
- `suggested_next`
|
|
52
|
+
- `baseline_commit`
|
|
53
|
+
- `session_id`
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
---
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
### Step 2: Read COLONY_STATE.json (Authoritative Source)
|
|
58
|
+
|
|
59
|
+
Use the Read tool to read `.aether/data/COLONY_STATE.json`.
|
|
60
|
+
|
|
61
|
+
COLONY_STATE.json is the authoritative source for goal and state (session.json may be stale). Extract:
|
|
62
|
+
- `goal` (use this as authoritative, overriding session.json colony_goal)
|
|
63
|
+
- `state` (READY, PLANNING, EXECUTING, PAUSED)
|
|
64
|
+
- `current_phase`
|
|
65
|
+
- `plan.phases` (array with id, name, status for each phase)
|
|
66
|
+
- `plan.generated_at`
|
|
67
|
+
- `memory.decisions` (flat list — do NOT distinguish user vs Claude origin)
|
|
68
|
+
- `events` (last 5 for recent activity context)
|
|
69
|
+
|
|
70
|
+
If the file is missing or the JSON cannot be parsed, **stop immediately** and display:
|
|
55
71
|
|
|
56
72
|
```
|
|
57
|
-
|
|
73
|
+
State file missing or corrupted.
|
|
58
74
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
75
|
+
Options:
|
|
76
|
+
1. Start fresh with /ant:init "goal"
|
|
77
|
+
2. Try to recover (I'll look for backup files)
|
|
78
|
+
|
|
79
|
+
What would you like to do?
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Do NOT proceed with stale or fabricated data.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### Step 3: Read Pheromone Signals
|
|
64
87
|
|
|
65
|
-
|
|
66
|
-
- {todo1}
|
|
67
|
-
- {todo2}
|
|
88
|
+
Use the Read tool to read `.aether/data/constraints.json`.
|
|
68
89
|
|
|
69
|
-
|
|
90
|
+
Extract the following top-level keys:
|
|
91
|
+
- `focus` array — active focus signals (if key missing, treat as empty array)
|
|
92
|
+
- `constraints` array — active redirect/constraint signals (if key missing, treat as empty array)
|
|
93
|
+
|
|
94
|
+
If the file is missing: skip silently (no pheromones active).
|
|
95
|
+
|
|
96
|
+
Pheromones persist until explicitly cleared — no decay.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### Step 4: Read CONTEXT.md
|
|
101
|
+
|
|
102
|
+
Use the Read tool to read `.aether/CONTEXT.md` if it exists.
|
|
103
|
+
|
|
104
|
+
If missing: fall back to COLONY_STATE.json for narrative context. Note: "Context document not found — reconstructing from state."
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### Step 5: Drift Detection
|
|
109
|
+
|
|
110
|
+
Extract `baseline_commit` from the session.json data read in Step 1.
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
current_commit=$(git rev-parse HEAD 2>/dev/null || echo "")
|
|
70
114
|
```
|
|
71
115
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
116
|
+
If `baseline_commit` is non-empty and differs from `current_commit`:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
commit_count=$(git rev-list --count "$baseline_commit..HEAD" 2>/dev/null || echo "0")
|
|
120
|
+
changed_count=$(git diff --stat "$baseline_commit" HEAD 2>/dev/null | tail -1 | grep -oE '[0-9]+ file' | grep -oE '[0-9]+' || echo "0")
|
|
121
|
+
```
|
|
76
122
|
|
|
77
|
-
|
|
123
|
+
Store `drift_detected=true`, `commit_count`, `changed_count` for dashboard rendering.
|
|
78
124
|
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
bash .aether/aether-utils.sh session-mark-resumed
|
|
82
|
-
```
|
|
125
|
+
If `baseline_commit` is empty or matches `current_commit`: set `drift_detected=false`.
|
|
83
126
|
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
🔄 Resuming Session
|
|
127
|
+
Restore identically regardless of time elapsed — no warnings about session age.
|
|
87
128
|
|
|
88
|
-
|
|
89
|
-
Phase: {phase} - {milestone}
|
|
90
|
-
Context restored.
|
|
129
|
+
---
|
|
91
130
|
|
|
92
|
-
|
|
93
|
-
```
|
|
131
|
+
### Step 6: Compute Workflow Position and Next-Step Guidance
|
|
94
132
|
|
|
95
|
-
|
|
133
|
+
Compute `suggested_next` dynamically from COLONY_STATE.json data. Do not use the static value from session.json.
|
|
96
134
|
|
|
97
|
-
|
|
135
|
+
Use this decision tree:
|
|
98
136
|
|
|
99
|
-
Display:
|
|
100
137
|
```
|
|
101
|
-
|
|
138
|
+
Case 1 — No plan created yet:
|
|
139
|
+
Check: plan.phases is empty AND plan.generated_at is null
|
|
140
|
+
recommended = "/ant:plan"
|
|
141
|
+
reason = "No plan created yet"
|
|
142
|
+
alternatives = ["/ant:colonize — analyze codebase first"]
|
|
143
|
+
|
|
144
|
+
Case 2 — Plan ready, first phase not started:
|
|
145
|
+
Check: plan.phases is not empty AND state == "READY" AND current_phase == 0
|
|
146
|
+
recommended = "/ant:build 1"
|
|
147
|
+
reason = "Plan ready, first phase not started"
|
|
148
|
+
alternatives = ["/ant:plan — review or regenerate plan"]
|
|
149
|
+
|
|
150
|
+
Case 3 — Build in progress:
|
|
151
|
+
Check: state == "EXECUTING"
|
|
152
|
+
recommended = "/ant:continue"
|
|
153
|
+
reason = "Build in progress"
|
|
154
|
+
alternatives = ["/ant:build {current_phase} — rebuild current phase", "/ant:flags — check for blockers"]
|
|
155
|
+
|
|
156
|
+
Case 4 — Phase complete, next phase available:
|
|
157
|
+
Check: state == "READY" AND current_phase > 0 AND current_phase < plan.phases.length
|
|
158
|
+
next = current_phase + 1
|
|
159
|
+
recommended = "/ant:build {next}"
|
|
160
|
+
reason = "Phase {current_phase} complete, ready for next"
|
|
161
|
+
alternatives = ["/ant:plan — regenerate plan", "/ant:phase {next} — preview next phase"]
|
|
162
|
+
|
|
163
|
+
Case 5 — All phases complete:
|
|
164
|
+
Check: state == "READY" AND current_phase > 0 AND current_phase >= plan.phases.length
|
|
165
|
+
recommended = "/ant:seal"
|
|
166
|
+
reason = "All phases complete"
|
|
167
|
+
alternatives = ["/ant:status — view final state"]
|
|
168
|
+
|
|
169
|
+
Case 6 — Colony paused:
|
|
170
|
+
Check: state == "PAUSED"
|
|
171
|
+
recommended = "/ant:resume-colony"
|
|
172
|
+
reason = "Colony is paused"
|
|
173
|
+
alternatives = ["/ant:status — check state first"]
|
|
174
|
+
|
|
175
|
+
Default:
|
|
176
|
+
recommended = "/ant:status"
|
|
177
|
+
reason = "Check colony status"
|
|
178
|
+
alternatives = []
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
### Step 7: Workflow-Step Blocking (Early-Return Guards)
|
|
184
|
+
|
|
185
|
+
Run these guards BEFORE rendering the dashboard. If a blocking condition is detected, output the block message and STOP. Do not render the dashboard. Do not offer alternative commands.
|
|
102
186
|
|
|
187
|
+
**BLOCK CONDITION 1: No plan exists**
|
|
188
|
+
|
|
189
|
+
Check: plan.phases is empty AND plan.generated_at is null
|
|
190
|
+
|
|
191
|
+
Output and STOP:
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
BLOCKED: No plan exists yet.
|
|
195
|
+
Required: Run /ant:plan to create a build plan.
|
|
103
196
|
Goal: {goal}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Stop here — do not continue to Step 8 or render the dashboard.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
**BLOCK CONDITION 2: Plan attempted but failed**
|
|
107
204
|
|
|
108
|
-
|
|
109
|
-
{last 5 entries}
|
|
205
|
+
Check: plan.phases is empty AND plan.generated_at is not null
|
|
110
206
|
|
|
111
|
-
|
|
112
|
-
{todos}
|
|
207
|
+
Output and STOP:
|
|
113
208
|
|
|
114
|
-
|
|
209
|
+
```
|
|
210
|
+
BLOCKED: Plan was attempted but has no phases.
|
|
211
|
+
Required: Run /ant:plan to regenerate the plan.
|
|
212
|
+
Goal: {goal}
|
|
115
213
|
```
|
|
116
214
|
|
|
117
|
-
|
|
215
|
+
Stop here — do not continue to Step 8 or render the dashboard.
|
|
118
216
|
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
bash .aether/aether-utils.sh session-clear
|
|
122
|
-
```
|
|
217
|
+
---
|
|
123
218
|
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
Session cleared.
|
|
219
|
+
**BLOCK CONDITION 3: Build interrupted**
|
|
127
220
|
|
|
128
|
-
|
|
129
|
-
- /ant:init "your new goal"
|
|
130
|
-
- /ant:status (to check other colonies)
|
|
131
|
-
```
|
|
221
|
+
Check: state == "EXECUTING" AND the last 3 events show no recent build activity
|
|
132
222
|
|
|
133
|
-
|
|
223
|
+
Output and STOP:
|
|
134
224
|
|
|
135
|
-
|
|
225
|
+
```
|
|
226
|
+
BLOCKED: Build may have been interrupted.
|
|
227
|
+
Required: Run /ant:continue to check and advance.
|
|
228
|
+
Goal: {goal}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Stop here — do not continue to Step 8 or render the dashboard.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
### Step 8: Render Dashboard
|
|
236
|
+
|
|
237
|
+
Lead with the next-step recommendation. Context follows underneath ("straight to action" ordering).
|
|
136
238
|
|
|
137
|
-
```bash
|
|
138
|
-
# Example: After /ant:build completes
|
|
139
|
-
bash .aether/aether-utils.sh session-update "/ant:build $phase" "/ant:continue" "Completed phase $phase"
|
|
140
239
|
```
|
|
240
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
241
|
+
RESUME SESSION
|
|
141
242
|
|
|
142
|
-
|
|
243
|
+
Next: {recommended}
|
|
244
|
+
{reason}
|
|
245
|
+
{if alternatives exist:}
|
|
246
|
+
Also: {alternatives, comma-separated}
|
|
247
|
+
{end}
|
|
143
248
|
|
|
144
|
-
|
|
249
|
+
{if drift_detected:}
|
|
250
|
+
Note: Codebase changed since last session ({commit_count} commit(s), {changed_count} file(s) modified)
|
|
251
|
+
{end}
|
|
145
252
|
|
|
146
|
-
|
|
253
|
+
Goal: {goal}
|
|
254
|
+
State: {state}
|
|
255
|
+
Phase: {current_phase}/{total_phases}
|
|
147
256
|
|
|
148
|
-
|
|
257
|
+
Phase Progress:
|
|
258
|
+
{for each phase in plan.phases:}
|
|
259
|
+
[{status_icon}] Phase {id}: {name}
|
|
260
|
+
{end}
|
|
261
|
+
```
|
|
149
262
|
|
|
150
|
-
|
|
263
|
+
Status icons:
|
|
264
|
+
- completed: `v` (checkmark)
|
|
265
|
+
- in_progress: `~` (tilde)
|
|
266
|
+
- pending: ` ` (space)
|
|
151
267
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
268
|
+
```
|
|
269
|
+
{if memory.decisions is not empty:}
|
|
270
|
+
Recent Decisions:
|
|
271
|
+
{for each of the last 5 decisions:}
|
|
272
|
+
- {decision text}
|
|
273
|
+
{end}
|
|
274
|
+
{end}
|
|
275
|
+
|
|
276
|
+
{if focus array or constraints array is not empty:}
|
|
277
|
+
Active Signals:
|
|
278
|
+
{for each focus signal:}
|
|
279
|
+
FOCUS: {focus text}
|
|
280
|
+
{end}
|
|
281
|
+
{for each constraint signal:}
|
|
282
|
+
REDIRECT: {constraint text}
|
|
283
|
+
{end}
|
|
284
|
+
{end}
|
|
156
285
|
|
|
157
|
-
|
|
286
|
+
Last Command: {last_command}
|
|
287
|
+
Session: {session_id}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### Step 9: Mark Session Resumed
|
|
293
|
+
|
|
294
|
+
Run using the Bash tool with description "Marking session as resumed...":
|
|
295
|
+
```bash
|
|
296
|
+
bash .aether/aether-utils.sh session-mark-resumed
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Step 10: Next Up
|
|
300
|
+
|
|
301
|
+
Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
|
|
302
|
+
```bash
|
|
303
|
+
state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
|
|
304
|
+
current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
|
|
305
|
+
total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
|
|
306
|
+
bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
|
|
307
|
+
```
|
|
158
308
|
|
|
159
|
-
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Error Handling Reference
|
|
312
|
+
|
|
313
|
+
| Condition | Response |
|
|
314
|
+
|-----------|----------|
|
|
315
|
+
| session.json missing (exists=false) | "No previous session found" — offer /ant:init and /ant:status |
|
|
316
|
+
| COLONY_STATE.json missing or corrupted | Pause, ask user: start fresh or recover |
|
|
317
|
+
| constraints.json missing | Skip silently (no pheromones) |
|
|
318
|
+
| CONTEXT.md missing | Fall back to COLONY_STATE.json narrative |
|
|
319
|
+
| No plan phases, no generated_at | BLOCK — redirect to /ant:plan |
|
|
320
|
+
| Plan attempted but no phases | BLOCK — redirect to /ant:plan |
|
|
321
|
+
| State EXECUTING, events show no activity | BLOCK — redirect to /ant:continue |
|
|
322
|
+
| baseline_commit matches current HEAD | No drift warning shown |
|
|
323
|
+
| baseline_commit differs from current HEAD | Show informational drift note |
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Key Constraints
|
|
328
|
+
|
|
329
|
+
- Use Read tool for COLONY_STATE.json and constraints.json (not bash cat/jq)
|
|
330
|
+
- Use Bash tool only for aether-utils.sh commands and git commands
|
|
331
|
+
- Handle ALL missing/corrupted file cases gracefully
|
|
332
|
+
- Time-agnostic: restore identically regardless of how long ago the session was
|
|
333
|
+
- Decisions shown as flat list — no user vs Claude distinction
|
|
334
|
+
- Blocking guards run BEFORE dashboard rendering (early-return pattern)
|
|
335
|
+
- Drift detection is informational only — not alarming, not a blocker
|