aether-colony 5.3.1 → 5.3.3
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 +181 -5
- package/.aether/commands/build.yaml +35 -0
- package/.aether/commands/entomb.yaml +1 -1
- package/.aether/commands/init.yaml +29 -12
- package/.aether/commands/oracle.yaml +70 -0
- package/.aether/commands/patrol.yaml +2 -2
- package/.aether/commands/run.yaml +3 -3
- package/.aether/commands/swarm.yaml +1 -1
- package/.aether/docs/command-playbooks/build-complete.md +41 -8
- package/.aether/docs/command-playbooks/build-full.md +7 -7
- package/.aether/docs/command-playbooks/build-prep.md +1 -1
- package/.aether/docs/command-playbooks/continue-advance.md +33 -0
- package/.aether/docs/command-playbooks/continue-finalize.md +15 -1
- package/.aether/docs/command-playbooks/continue-full.md +15 -1
- package/.aether/docs/source-of-truth-map.md +10 -10
- package/.aether/docs/structural-learning-stack.md +283 -0
- package/.aether/utils/consolidation-seal.sh +196 -0
- package/.aether/utils/consolidation.sh +127 -0
- package/.aether/utils/curation-ants/archivist.sh +97 -0
- package/.aether/utils/curation-ants/critic.sh +214 -0
- package/.aether/utils/curation-ants/herald.sh +102 -0
- package/.aether/utils/curation-ants/janitor.sh +121 -0
- package/.aether/utils/curation-ants/librarian.sh +99 -0
- package/.aether/utils/curation-ants/nurse.sh +153 -0
- package/.aether/utils/curation-ants/orchestrator.sh +181 -0
- package/.aether/utils/curation-ants/scribe.sh +164 -0
- package/.aether/utils/curation-ants/sentinel.sh +119 -0
- package/.aether/utils/event-bus.sh +301 -0
- package/.aether/utils/graph.sh +559 -0
- package/.aether/utils/instinct-store.sh +401 -0
- package/.aether/utils/learning.sh +79 -7
- package/.aether/utils/session.sh +13 -0
- package/.aether/utils/state-api.sh +1 -1
- package/.aether/utils/trust-scoring.sh +347 -0
- package/.aether/utils/worktree.sh +97 -0
- package/.claude/commands/ant/entomb.md +1 -1
- package/.claude/commands/ant/init.md +29 -12
- package/.claude/commands/ant/oracle.md +35 -0
- package/.claude/commands/ant/patrol.md +2 -2
- package/.claude/commands/ant/run.md +3 -3
- package/.claude/commands/ant/swarm.md +1 -1
- package/.opencode/commands/ant/build.md +35 -0
- package/.opencode/commands/ant/init.md +29 -12
- package/.opencode/commands/ant/oracle.md +35 -0
- package/.opencode/commands/ant/patrol.md +2 -2
- package/.opencode/commands/ant/run.md +3 -3
- package/CHANGELOG.md +83 -0
- package/README.md +34 -37
- package/bin/lib/update-transaction.js +8 -3
- package/bin/npx-entry.js +0 -0
- package/package.json +1 -1
- package/.aether/agents/aether-ambassador.md +0 -140
- package/.aether/agents/aether-archaeologist.md +0 -108
- package/.aether/agents/aether-architect.md +0 -133
- package/.aether/agents/aether-auditor.md +0 -144
- package/.aether/agents/aether-builder.md +0 -184
- package/.aether/agents/aether-chaos.md +0 -115
- package/.aether/agents/aether-chronicler.md +0 -122
- package/.aether/agents/aether-gatekeeper.md +0 -116
- package/.aether/agents/aether-includer.md +0 -117
- package/.aether/agents/aether-keeper.md +0 -177
- package/.aether/agents/aether-measurer.md +0 -128
- package/.aether/agents/aether-oracle.md +0 -137
- package/.aether/agents/aether-probe.md +0 -133
- package/.aether/agents/aether-queen.md +0 -286
- package/.aether/agents/aether-route-setter.md +0 -130
- package/.aether/agents/aether-sage.md +0 -106
- package/.aether/agents/aether-scout.md +0 -101
- package/.aether/agents/aether-surveyor-disciplines.md +0 -391
- package/.aether/agents/aether-surveyor-nest.md +0 -329
- package/.aether/agents/aether-surveyor-pathogens.md +0 -264
- package/.aether/agents/aether-surveyor-provisions.md +0 -334
- package/.aether/agents/aether-tracker.md +0 -137
- package/.aether/agents/aether-watcher.md +0 -174
- package/.aether/agents/aether-weaver.md +0 -130
- package/.aether/commands/claude/archaeology.md +0 -334
- package/.aether/commands/claude/build.md +0 -65
- package/.aether/commands/claude/chaos.md +0 -336
- package/.aether/commands/claude/colonize.md +0 -259
- package/.aether/commands/claude/continue.md +0 -60
- package/.aether/commands/claude/council.md +0 -507
- package/.aether/commands/claude/data-clean.md +0 -81
- package/.aether/commands/claude/dream.md +0 -268
- package/.aether/commands/claude/entomb.md +0 -498
- package/.aether/commands/claude/export-signals.md +0 -57
- package/.aether/commands/claude/feedback.md +0 -96
- package/.aether/commands/claude/flag.md +0 -151
- package/.aether/commands/claude/flags.md +0 -169
- package/.aether/commands/claude/focus.md +0 -76
- package/.aether/commands/claude/help.md +0 -154
- package/.aether/commands/claude/history.md +0 -140
- package/.aether/commands/claude/import-signals.md +0 -71
- package/.aether/commands/claude/init.md +0 -505
- package/.aether/commands/claude/insert-phase.md +0 -105
- package/.aether/commands/claude/interpret.md +0 -278
- package/.aether/commands/claude/lay-eggs.md +0 -210
- package/.aether/commands/claude/maturity.md +0 -113
- package/.aether/commands/claude/memory-details.md +0 -77
- package/.aether/commands/claude/migrate-state.md +0 -171
- package/.aether/commands/claude/oracle.md +0 -642
- package/.aether/commands/claude/organize.md +0 -232
- package/.aether/commands/claude/patrol.md +0 -620
- package/.aether/commands/claude/pause-colony.md +0 -233
- package/.aether/commands/claude/phase.md +0 -115
- package/.aether/commands/claude/pheromones.md +0 -156
- package/.aether/commands/claude/plan.md +0 -693
- package/.aether/commands/claude/preferences.md +0 -65
- package/.aether/commands/claude/quick.md +0 -100
- package/.aether/commands/claude/redirect.md +0 -76
- package/.aether/commands/claude/resume-colony.md +0 -197
- package/.aether/commands/claude/resume.md +0 -388
- package/.aether/commands/claude/run.md +0 -231
- package/.aether/commands/claude/seal.md +0 -774
- package/.aether/commands/claude/skill-create.md +0 -286
- package/.aether/commands/claude/status.md +0 -410
- package/.aether/commands/claude/swarm.md +0 -349
- package/.aether/commands/claude/tunnels.md +0 -426
- package/.aether/commands/claude/update.md +0 -132
- package/.aether/commands/claude/verify-castes.md +0 -143
- package/.aether/commands/claude/watch.md +0 -239
- package/.aether/commands/opencode/archaeology.md +0 -331
- package/.aether/commands/opencode/build.md +0 -1168
- package/.aether/commands/opencode/chaos.md +0 -329
- package/.aether/commands/opencode/colonize.md +0 -195
- package/.aether/commands/opencode/continue.md +0 -1436
- package/.aether/commands/opencode/council.md +0 -437
- package/.aether/commands/opencode/data-clean.md +0 -77
- package/.aether/commands/opencode/dream.md +0 -260
- package/.aether/commands/opencode/entomb.md +0 -377
- package/.aether/commands/opencode/export-signals.md +0 -54
- package/.aether/commands/opencode/feedback.md +0 -99
- package/.aether/commands/opencode/flag.md +0 -149
- package/.aether/commands/opencode/flags.md +0 -167
- package/.aether/commands/opencode/focus.md +0 -73
- package/.aether/commands/opencode/help.md +0 -157
- package/.aether/commands/opencode/history.md +0 -136
- package/.aether/commands/opencode/import-signals.md +0 -68
- package/.aether/commands/opencode/init.md +0 -518
- package/.aether/commands/opencode/insert-phase.md +0 -111
- package/.aether/commands/opencode/interpret.md +0 -272
- package/.aether/commands/opencode/lay-eggs.md +0 -213
- package/.aether/commands/opencode/maturity.md +0 -108
- package/.aether/commands/opencode/memory-details.md +0 -83
- package/.aether/commands/opencode/migrate-state.md +0 -165
- package/.aether/commands/opencode/oracle.md +0 -593
- package/.aether/commands/opencode/organize.md +0 -226
- package/.aether/commands/opencode/patrol.md +0 -626
- package/.aether/commands/opencode/pause-colony.md +0 -203
- package/.aether/commands/opencode/phase.md +0 -113
- package/.aether/commands/opencode/pheromones.md +0 -162
- package/.aether/commands/opencode/plan.md +0 -684
- package/.aether/commands/opencode/preferences.md +0 -71
- package/.aether/commands/opencode/quick.md +0 -91
- package/.aether/commands/opencode/redirect.md +0 -84
- package/.aether/commands/opencode/resume-colony.md +0 -190
- package/.aether/commands/opencode/resume.md +0 -394
- package/.aether/commands/opencode/run.md +0 -237
- package/.aether/commands/opencode/seal.md +0 -452
- package/.aether/commands/opencode/skill-create.md +0 -63
- package/.aether/commands/opencode/status.md +0 -307
- package/.aether/commands/opencode/swarm.md +0 -15
- package/.aether/commands/opencode/tunnels.md +0 -400
- package/.aether/commands/opencode/update.md +0 -127
- package/.aether/commands/opencode/verify-castes.md +0 -139
- package/.aether/commands/opencode/watch.md +0 -227
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<!-- Generated from .aether/commands/preferences.yaml - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
---
|
|
3
|
-
name: ant:preferences
|
|
4
|
-
description: "Add or list user preferences in hub QUEEN.md"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are the **Queen**. Manage user preferences in the hub `~/.aether/QUEEN.md`.
|
|
8
|
-
|
|
9
|
-
## Instructions
|
|
10
|
-
|
|
11
|
-
The input is: `$ARGUMENTS`
|
|
12
|
-
|
|
13
|
-
### Step 1: Validate
|
|
14
|
-
|
|
15
|
-
If `$ARGUMENTS` empty -> show usage: `/ant:preferences "preference text"` or `/ant:preferences --list`, stop.
|
|
16
|
-
|
|
17
|
-
### Step 2: Route
|
|
18
|
-
|
|
19
|
-
- `$ARGUMENTS` is `--list` -> **List mode**
|
|
20
|
-
- Otherwise -> **Add mode**
|
|
21
|
-
|
|
22
|
-
### List Mode
|
|
23
|
-
|
|
24
|
-
Read `~/.aether/QUEEN.md`. If missing -> "No hub QUEEN.md found. Run /ant:init to create one.", stop.
|
|
25
|
-
|
|
26
|
-
Find the `## User Preferences` section (with or without emoji). Extract bullet lines (`- ...`) between that heading and the next `---`.
|
|
27
|
-
|
|
28
|
-
If user-added bullets exist, output each. Otherwise:
|
|
29
|
-
```
|
|
30
|
-
No user preferences set yet.
|
|
31
|
-
Add one with: /ant:preferences "your preference"
|
|
32
|
-
```
|
|
33
|
-
Stop.
|
|
34
|
-
|
|
35
|
-
### Add Mode
|
|
36
|
-
|
|
37
|
-
Set `PREF` to `$ARGUMENTS` (strip surrounding quotes).
|
|
38
|
-
If length > 500 chars -> "Preference too long (max 500 chars)", stop.
|
|
39
|
-
|
|
40
|
-
Read `~/.aether/QUEEN.md`. If missing -> "No hub QUEEN.md found. Run /ant:init to create one.", stop.
|
|
41
|
-
|
|
42
|
-
**If `## User Preferences` section exists** (with or without emoji):
|
|
43
|
-
1. Remove `*No user preferences recorded yet.*` placeholder if present
|
|
44
|
-
2. Append `- $PREF` at end of section (before next `---`)
|
|
45
|
-
|
|
46
|
-
**If section missing** (migration case):
|
|
47
|
-
1. Insert before `## Evolution Log` (with or without emoji):
|
|
48
|
-
```
|
|
49
|
-
## User Preferences
|
|
50
|
-
|
|
51
|
-
- $PREF
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Update METADATA comment: increment `stats.total_user_prefs` by 1.
|
|
58
|
-
|
|
59
|
-
### Confirm
|
|
60
|
-
|
|
61
|
-
Output (2 lines, no banners):
|
|
62
|
-
```
|
|
63
|
-
Preference saved to hub QUEEN.md
|
|
64
|
-
"$PREF"
|
|
65
|
-
```
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
<!-- Generated from .aether/commands/quick.yaml - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
---
|
|
3
|
-
name: ant:quick
|
|
4
|
-
description: "Quick scout query — fast answers without build ceremony"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are the **Queen**. Execute `/ant:quick` — a lightweight scout mission.
|
|
8
|
-
|
|
9
|
-
The query is: `$ARGUMENTS`
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Quick, focused answers to questions about the codebase, patterns, or implementation
|
|
14
|
-
details. No build ceremony, no state changes, no verification waves.
|
|
15
|
-
|
|
16
|
-
## Instructions
|
|
17
|
-
|
|
18
|
-
### Step 1: Validate Arguments
|
|
19
|
-
|
|
20
|
-
If `$ARGUMENTS` is empty:
|
|
21
|
-
```
|
|
22
|
-
Usage: /ant:quick "<question>"
|
|
23
|
-
|
|
24
|
-
Examples:
|
|
25
|
-
/ant:quick "how does the pheromone system work?"
|
|
26
|
-
/ant:quick "find all uses of acquire_lock"
|
|
27
|
-
/ant:quick "what tests cover midden-write?"
|
|
28
|
-
/ant:quick "show me the colony-prime token budget logic"
|
|
29
|
-
```
|
|
30
|
-
Stop here.
|
|
31
|
-
|
|
32
|
-
### Step 2: Generate Scout Name
|
|
33
|
-
|
|
34
|
-
Run using the Bash tool with description "Naming scout...":
|
|
35
|
-
```bash
|
|
36
|
-
bash .aether/aether-utils.sh generate-ant-name "scout"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Capture the output as `scout_name`.
|
|
40
|
-
|
|
41
|
-
### Step 3: Spawn Scout
|
|
42
|
-
|
|
43
|
-
Display:
|
|
44
|
-
```
|
|
45
|
-
━━━ Quick Scout ━━━
|
|
46
|
-
Spawning {scout_name} — {query truncated to 50 chars}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Run using the Bash tool with description "Dispatching scout...":
|
|
50
|
-
```bash
|
|
51
|
-
bash .aether/aether-utils.sh spawn-log "Queen" "scout" "{scout_name}" "Quick query: {query}"
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Spawn a Scout agent (using Task tool with subagent_type="aether-scout") with this prompt:
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
You are {scout_name}, a Scout Ant on a quick mission.
|
|
59
|
-
|
|
60
|
-
Query: {query from ARGUMENTS}
|
|
61
|
-
|
|
62
|
-
Work:
|
|
63
|
-
1. Search the codebase to answer the query
|
|
64
|
-
2. Use Grep, Glob, and Read tools to find relevant code
|
|
65
|
-
3. Provide a clear, focused answer
|
|
66
|
-
4. Include file paths and line numbers for key findings
|
|
67
|
-
|
|
68
|
-
Keep your answer concise and actionable. This is a quick mission —
|
|
69
|
-
don't explore exhaustively, focus on the most relevant answer.
|
|
70
|
-
|
|
71
|
-
Return your findings as a clear text answer (not JSON).
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
### Step 4: Display Results
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
Display the Scout's answer directly to the user.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Run using the Bash tool with description "Recording scout completion...":
|
|
84
|
-
```bash
|
|
85
|
-
bash .aether/aether-utils.sh spawn-complete "{scout_name}" "completed" "Quick query answered"
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Step 5: Update Session (lightweight)
|
|
89
|
-
|
|
90
|
-
Run using the Bash tool with description "Updating session...":
|
|
91
|
-
```bash
|
|
92
|
-
bash .aether/aether-utils.sh session-update "/ant:quick" "" "Quick query: {query truncated to 60 chars}" 2>/dev/null || true
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**NOTE:** This command does NOT:
|
|
96
|
-
- Modify COLONY_STATE.json
|
|
97
|
-
- Advance phases
|
|
98
|
-
- Create checkpoints
|
|
99
|
-
- Spawn watchers or chaos ants
|
|
100
|
-
- Run verification
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<!-- Generated from .aether/commands/redirect.yaml - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
---
|
|
3
|
-
name: ant:redirect
|
|
4
|
-
description: "Emit REDIRECT signal to warn colony away from patterns"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
You are the **Queen**. Emit a REDIRECT pheromone signal.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Instructions
|
|
13
|
-
|
|
14
|
-
The pattern to avoid is: `$ARGUMENTS`
|
|
15
|
-
|
|
16
|
-
### Step 1: Validate
|
|
17
|
-
|
|
18
|
-
If `$ARGUMENTS` empty -> show usage: `/ant:redirect <pattern to avoid>`, stop.
|
|
19
|
-
If content > 500 chars -> "Redirect content too long (max 500 chars)", stop.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Parse optional flags from `$ARGUMENTS`:
|
|
23
|
-
- `--ttl <value>`: signal lifetime (e.g., `2h`, `1d`, `7d`). Default: `phase_end`.
|
|
24
|
-
- Strip flags from content before using it as the pattern.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
### Step 2: Write Signal
|
|
28
|
-
|
|
29
|
-
Read `.aether/data/COLONY_STATE.json`.
|
|
30
|
-
If `goal: null` -> "No colony initialized.", stop.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Run using the Bash tool with description "Setting colony redirect...":
|
|
34
|
-
```bash
|
|
35
|
-
bash .aether/aether-utils.sh pheromone-write REDIRECT "<content>" --strength 0.9 --reason "User warned colony away from pattern" --ttl <ttl>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Parse the returned JSON for the signal ID.
|
|
39
|
-
|
|
40
|
-
### Step 2.5: Update Context Document
|
|
41
|
-
|
|
42
|
-
Run using the Bash tool with description "Updating context document...":
|
|
43
|
-
```bash
|
|
44
|
-
bash .aether/aether-utils.sh context-update constraint redirect "<content>" "user" 2>/dev/null || true
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Step 3: Get Active Counts
|
|
48
|
-
|
|
49
|
-
Run using the Bash tool with description "Counting active signals...":
|
|
50
|
-
```bash
|
|
51
|
-
bash .aether/aether-utils.sh pheromone-count
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Step 4: Confirm
|
|
55
|
-
|
|
56
|
-
Output (3-4 lines, no banners):
|
|
57
|
-
```
|
|
58
|
-
REDIRECT signal emitted
|
|
59
|
-
Avoid: "<content truncated to 60 chars>"
|
|
60
|
-
Strength: 0.9 | Expires: <phase end or ttl value>
|
|
61
|
-
Active signals: <focus_count> FOCUS, <redirect_count> REDIRECT, <feedback_count> FEEDBACK
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
### Step 5: Next Up
|
|
68
|
-
|
|
69
|
-
Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
|
|
70
|
-
```bash
|
|
71
|
-
state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
|
|
72
|
-
current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
|
|
73
|
-
total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
|
|
74
|
-
bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
|
|
75
|
-
```
|
|
76
|
-
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
<!-- Generated from .aether/commands/resume-colony.yaml - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
---
|
|
3
|
-
name: ant:resume-colony
|
|
4
|
-
description: "🚦➡️🐜💨💨 Resume colony from saved session - restores all state"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are the **Queen Ant Colony**. Restore state from a paused session.
|
|
8
|
-
|
|
9
|
-
## Instructions
|
|
10
|
-
|
|
11
|
-
Parse `$ARGUMENTS`:
|
|
12
|
-
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
13
|
-
- Otherwise: set `visual_mode = true`
|
|
14
|
-
|
|
15
|
-
### Step 0: Initialize Visual Mode (if enabled)
|
|
16
|
-
|
|
17
|
-
If `visual_mode` is true, run using the Bash tool with description "Initializing resume display...":
|
|
18
|
-
### Step 0.5: Version Check (Non-blocking)
|
|
19
|
-
|
|
20
|
-
Run using the Bash tool with description "Checking colony version...": `bash .aether/aether-utils.sh version-check-cached 2>/dev/null || true`
|
|
21
|
-
|
|
22
|
-
If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
|
|
23
|
-
|
|
24
|
-
### Step 1: Load State and Validate
|
|
25
|
-
|
|
26
|
-
Run using the Bash tool with description "Restoring colony session...": `bash .aether/aether-utils.sh load-state`
|
|
27
|
-
|
|
28
|
-
If successful:
|
|
29
|
-
1. Parse state from result
|
|
30
|
-
2. If goal is null: Show "No colony state found..." message and stop
|
|
31
|
-
3. If `milestone` == `"Crowned Anthill"`: Show "This colony has been sealed. Start a new colony with `/ant:init \"new goal\"`." and stop
|
|
32
|
-
4. Check if paused flag is true - if not, note "Colony was not paused, but resuming anyway"
|
|
33
|
-
5. Extract all state fields for display
|
|
34
|
-
|
|
35
|
-
Keep state loaded (don't unload yet) - we'll need it for the full display.
|
|
36
|
-
|
|
37
|
-
### Step 2: Compute Active Signals
|
|
38
|
-
|
|
39
|
-
Run using the Bash tool with description "Loading active pheromones...":
|
|
40
|
-
```bash
|
|
41
|
-
bash .aether/aether-utils.sh pheromone-read
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Use `.result.signals` as the active signal list (already decay-filtered by runtime logic).
|
|
45
|
-
If empty, treat as "no active pheromones."
|
|
46
|
-
|
|
47
|
-
### Step 2.5: Load Survey Context (Advisory)
|
|
48
|
-
|
|
49
|
-
Run using the Bash tool with description "Loading survey context...":
|
|
50
|
-
```bash
|
|
51
|
-
survey_docs=$(ls -1 .aether/data/survey/*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
52
|
-
survey_latest=$(ls -t .aether/data/survey/*.md 2>/dev/null | head -1)
|
|
53
|
-
if [[ -n "$survey_latest" ]]; then
|
|
54
|
-
now_epoch=$(date +%s)
|
|
55
|
-
modified_epoch=$(stat -f %m "$survey_latest" 2>/dev/null || stat -c %Y "$survey_latest" 2>/dev/null || echo 0)
|
|
56
|
-
survey_age_days=$(( (now_epoch - modified_epoch) / 86400 ))
|
|
57
|
-
else
|
|
58
|
-
survey_age_days=-1
|
|
59
|
-
fi
|
|
60
|
-
echo "survey_docs=$survey_docs"
|
|
61
|
-
echo "survey_age_days=$survey_age_days"
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Interpretation:
|
|
65
|
-
- `survey_docs == 0` => survey missing
|
|
66
|
-
- `survey_age_days > 14` => survey stale
|
|
67
|
-
- otherwise survey fresh
|
|
68
|
-
|
|
69
|
-
### Step 3: Display Restored State
|
|
70
|
-
|
|
71
|
-
**Note:** Other ant commands (`/ant:status`, `/ant:build`, `/ant:plan`, `/ant:continue`) also show brief resumption context automatically. This full resume provides complete state restoration for explicit session recovery.
|
|
72
|
-
|
|
73
|
-
Output header:
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
🚦➡️🐜💨💨 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
77
|
-
C O L O N Y R E S U M E D
|
|
78
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🚦➡️🐜💨💨
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Read the .aether/HANDOFF.md for context about what was happening, then display:
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
+=====================================================+
|
|
85
|
-
| AETHER COLONY :: RESUMED |
|
|
86
|
-
+=====================================================+
|
|
87
|
-
|
|
88
|
-
Goal: "<goal>"
|
|
89
|
-
State: <state>
|
|
90
|
-
Session: <session_id>
|
|
91
|
-
Phase: <current_phase>
|
|
92
|
-
|
|
93
|
-
ACTIVE PHEROMONES
|
|
94
|
-
{TYPE padded to 10 chars} [{bar of 20 chars using filled/empty}] {current_strength:.2f}
|
|
95
|
-
"{content}"
|
|
96
|
-
|
|
97
|
-
Where the bar uses round(current_strength * 20) filled characters and spaces for the remainder.
|
|
98
|
-
|
|
99
|
-
If no active signals: (no active pheromones)
|
|
100
|
-
|
|
101
|
-
PHASE PROGRESS
|
|
102
|
-
Phase <id>: <name> [<status>]
|
|
103
|
-
(list all phases from plan.phases)
|
|
104
|
-
|
|
105
|
-
SURVEY CONTEXT
|
|
106
|
-
Docs: <survey_docs>
|
|
107
|
-
Age: <survey_age_days> days
|
|
108
|
-
Status: <fresh|stale|missing>
|
|
109
|
-
Recommendation: <if missing or stale, suggest /ant:colonize --force-resurvey>
|
|
110
|
-
|
|
111
|
-
CONTEXT FROM HANDOFF
|
|
112
|
-
<summarize what was happening from .aether/HANDOFF.md>
|
|
113
|
-
|
|
114
|
-
NEXT ACTIONS
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Route to next action based on state:
|
|
118
|
-
- If state is `READY` and there's a pending phase -> suggest `/ant:build <phase>`
|
|
119
|
-
- If state is `EXECUTING` -> note that a build was interrupted, suggest restarting with `/ant:build <phase>`
|
|
120
|
-
- If state is `PLANNING` -> note that planning was interrupted, suggest `/ant:plan`
|
|
121
|
-
- Otherwise -> suggest `/ant:status` for full overview
|
|
122
|
-
|
|
123
|
-
### Step 6: Clear Paused State and Cleanup
|
|
124
|
-
|
|
125
|
-
Use Write tool to update COLONY_STATE.json:
|
|
126
|
-
- Remove or set to false: `"paused": false`
|
|
127
|
-
- Remove: `"paused_at"` field
|
|
128
|
-
- Update last_updated timestamp
|
|
129
|
-
- Add event: `{timestamp, type: "colony_resumed", worker: "resume", details: "Session resumed"}`
|
|
130
|
-
|
|
131
|
-
Use Bash tool with description "Cleaning up handoff file..." to remove HANDOFF.md: `rm -f .aether/HANDOFF.md`
|
|
132
|
-
|
|
133
|
-
Run using the Bash tool with description "Releasing colony lock...": `bash .aether/aether-utils.sh unload-state` to release lock.
|
|
134
|
-
|
|
135
|
-
### Step 7: Next Up
|
|
136
|
-
|
|
137
|
-
Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
|
|
138
|
-
```bash
|
|
139
|
-
state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
|
|
140
|
-
current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
|
|
141
|
-
total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
|
|
142
|
-
bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## Auto-Recovery Pattern Reference
|
|
148
|
-
|
|
149
|
-
The colony uses a tiered auto-recovery pattern to maintain context across session boundaries:
|
|
150
|
-
|
|
151
|
-
### Format Tiers
|
|
152
|
-
|
|
153
|
-
| Context | Format | When Used |
|
|
154
|
-
|---------|--------|-----------|
|
|
155
|
-
| Brief | `🔄 Resuming: Phase X - Name` | Action commands (build, plan, continue) |
|
|
156
|
-
| Extended | Brief + last activity timestamp | Status command |
|
|
157
|
-
| Full | Complete state with pheromones, workers, context | resume-colony command |
|
|
158
|
-
|
|
159
|
-
### Brief Format (Action Commands)
|
|
160
|
-
|
|
161
|
-
Used by `/ant:build`, `/ant:plan`, `/ant:continue`:
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
🔄 Resuming: Phase <current_phase> - <phase_name>
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Provides minimal orientation before executing the command's primary function.
|
|
168
|
-
|
|
169
|
-
### Extended Format (Status Command)
|
|
170
|
-
|
|
171
|
-
Used by `/ant:status` Step 1.5:
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
🔄 Resuming: Phase <current_phase> - <phase_name>
|
|
175
|
-
Last activity: <last_event_timestamp>
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
Adds temporal context to help gauge session staleness.
|
|
179
|
-
|
|
180
|
-
### Full Format (Resume-Colony)
|
|
181
|
-
|
|
182
|
-
Used by `/ant:resume-colony`:
|
|
183
|
-
|
|
184
|
-
- Complete header with ASCII art
|
|
185
|
-
- Goal, state, session ID, phase
|
|
186
|
-
- Active pheromones with strength bars
|
|
187
|
-
- Worker status by caste
|
|
188
|
-
- Phase progress for all phases
|
|
189
|
-
- Handoff context summary
|
|
190
|
-
- Next action routing
|
|
191
|
-
|
|
192
|
-
### Implementation Notes
|
|
193
|
-
|
|
194
|
-
1. **State Source:** All formats read from `.aether/data/COLONY_STATE.json`
|
|
195
|
-
2. **Phase Name:** Extracted from `plan.phases[current_phase - 1].name`
|
|
196
|
-
3. **Last Activity:** Parsed from the last entry in `events` array
|
|
197
|
-
4. **Edge Cases:** Handle missing phase names, empty events, phase 0
|