aether-colony 5.3.2 → 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 +22 -9
- 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,71 +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
|
-
### Step -1: Normalize Arguments
|
|
8
|
-
|
|
9
|
-
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
10
|
-
|
|
11
|
-
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
12
|
-
|
|
13
|
-
You are the **Queen**. Manage user preferences in the hub `~/.aether/QUEEN.md`.
|
|
14
|
-
|
|
15
|
-
## Instructions
|
|
16
|
-
|
|
17
|
-
The input is: `$normalized_args`
|
|
18
|
-
|
|
19
|
-
### Step 1: Validate
|
|
20
|
-
|
|
21
|
-
If `$normalized_args` empty -> show usage: `/ant:preferences "preference text"` or `/ant:preferences --list`, stop.
|
|
22
|
-
|
|
23
|
-
### Step 2: Route
|
|
24
|
-
|
|
25
|
-
- `$normalized_args` is `--list` -> **List mode**
|
|
26
|
-
- Otherwise -> **Add mode**
|
|
27
|
-
|
|
28
|
-
### List Mode
|
|
29
|
-
|
|
30
|
-
Read `~/.aether/QUEEN.md`. If missing -> "No hub QUEEN.md found. Run /ant:init to create one.", stop.
|
|
31
|
-
|
|
32
|
-
Find the `## User Preferences` section (with or without emoji). Extract bullet lines (`- ...`) between that heading and the next `---`.
|
|
33
|
-
|
|
34
|
-
If user-added bullets exist, output each. Otherwise:
|
|
35
|
-
```
|
|
36
|
-
No user preferences set yet.
|
|
37
|
-
Add one with: /ant:preferences "your preference"
|
|
38
|
-
```
|
|
39
|
-
Stop.
|
|
40
|
-
|
|
41
|
-
### Add Mode
|
|
42
|
-
|
|
43
|
-
Set `PREF` to `$normalized_args` (strip surrounding quotes).
|
|
44
|
-
If length > 500 chars -> "Preference too long (max 500 chars)", stop.
|
|
45
|
-
|
|
46
|
-
Read `~/.aether/QUEEN.md`. If missing -> "No hub QUEEN.md found. Run /ant:init to create one.", stop.
|
|
47
|
-
|
|
48
|
-
**If `## User Preferences` section exists** (with or without emoji):
|
|
49
|
-
1. Remove `*No user preferences recorded yet.*` placeholder if present
|
|
50
|
-
2. Append `- $PREF` at end of section (before next `---`)
|
|
51
|
-
|
|
52
|
-
**If section missing** (migration case):
|
|
53
|
-
1. Insert before `## Evolution Log` (with or without emoji):
|
|
54
|
-
```
|
|
55
|
-
## User Preferences
|
|
56
|
-
|
|
57
|
-
- $PREF
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Update METADATA comment: increment `stats.total_user_prefs` by 1.
|
|
64
|
-
|
|
65
|
-
### Confirm
|
|
66
|
-
|
|
67
|
-
Output (2 lines, no banners):
|
|
68
|
-
```
|
|
69
|
-
Preference saved to hub QUEEN.md
|
|
70
|
-
"$PREF"
|
|
71
|
-
```
|
|
@@ -1,91 +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
|
-
### Step -1: Normalize Arguments
|
|
8
|
-
|
|
9
|
-
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
10
|
-
|
|
11
|
-
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
12
|
-
|
|
13
|
-
You are the **Queen**. Execute `/ant:quick` — a lightweight scout mission.
|
|
14
|
-
|
|
15
|
-
The query is: `$normalized_args`
|
|
16
|
-
|
|
17
|
-
## Purpose
|
|
18
|
-
|
|
19
|
-
Quick, focused answers to questions about the codebase, patterns, or implementation
|
|
20
|
-
details. No build ceremony, no state changes, no verification waves.
|
|
21
|
-
|
|
22
|
-
## Instructions
|
|
23
|
-
|
|
24
|
-
### Step 1: Validate Arguments
|
|
25
|
-
|
|
26
|
-
If `$normalized_args` is empty:
|
|
27
|
-
```
|
|
28
|
-
Usage: /ant:quick "<question>"
|
|
29
|
-
|
|
30
|
-
Examples:
|
|
31
|
-
/ant:quick "how does the pheromone system work?"
|
|
32
|
-
/ant:quick "find all uses of acquire_lock"
|
|
33
|
-
/ant:quick "what tests cover midden-write?"
|
|
34
|
-
/ant:quick "show me the colony-prime token budget logic"
|
|
35
|
-
```
|
|
36
|
-
Stop here.
|
|
37
|
-
|
|
38
|
-
### Step 2: Generate Scout Name
|
|
39
|
-
|
|
40
|
-
Run:
|
|
41
|
-
```bash
|
|
42
|
-
bash .aether/aether-utils.sh generate-ant-name "scout"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Capture the output as `scout_name`.
|
|
46
|
-
|
|
47
|
-
### Step 3: Spawn Scout
|
|
48
|
-
|
|
49
|
-
Display:
|
|
50
|
-
```
|
|
51
|
-
━━━ Quick Scout ━━━
|
|
52
|
-
Spawning {scout_name} — {query truncated to 50 chars}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Run:
|
|
56
|
-
```bash
|
|
57
|
-
bash .aether/aether-utils.sh spawn-log "Queen" "scout" "{scout_name}" "Quick query: {query}"
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Investigate the query directly using available tools (Grep, Glob, Read).
|
|
63
|
-
Search the codebase and provide a clear, focused answer with file paths and line numbers for key findings.
|
|
64
|
-
Keep your answer concise and actionable.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
### Step 4: Display Results
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Display your findings directly to the user.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Run:
|
|
75
|
-
```bash
|
|
76
|
-
bash .aether/aether-utils.sh spawn-complete "{scout_name}" "completed" "Quick query answered"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Step 5: Update Session (lightweight)
|
|
80
|
-
|
|
81
|
-
Run:
|
|
82
|
-
```bash
|
|
83
|
-
bash .aether/aether-utils.sh session-update "/ant:quick" "" "Quick query: {query truncated to 60 chars}" 2>/dev/null || true
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
**NOTE:** This command does NOT:
|
|
87
|
-
- Modify COLONY_STATE.json
|
|
88
|
-
- Advance phases
|
|
89
|
-
- Create checkpoints
|
|
90
|
-
- Spawn watchers or chaos ants
|
|
91
|
-
- Run verification
|
|
@@ -1,84 +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
|
-
### Step -1: Normalize Arguments
|
|
8
|
-
|
|
9
|
-
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
10
|
-
|
|
11
|
-
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
You are the **Queen**. Add an AVOID constraint.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## Instructions
|
|
19
|
-
|
|
20
|
-
The pattern to avoid is: `$normalized_args`
|
|
21
|
-
|
|
22
|
-
### Step 1: Validate
|
|
23
|
-
|
|
24
|
-
If `$normalized_args` empty -> show usage: `/ant:redirect <pattern to avoid>`, stop.
|
|
25
|
-
If content > 500 chars -> "Redirect content too long (max 500 chars)", stop.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### Step 2: Write Signal
|
|
30
|
-
|
|
31
|
-
Read `.aether/data/COLONY_STATE.json`.
|
|
32
|
-
If `goal: null` -> "No colony initialized.", stop.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Read `.aether/data/constraints.json`. If file doesn't exist, create it with:
|
|
37
|
-
```json
|
|
38
|
-
{"version": "1.0", "focus": [], "constraints": []}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Generate constraint ID: `c_<unix_timestamp_ms>`
|
|
42
|
-
|
|
43
|
-
Append to `constraints` array:
|
|
44
|
-
```json
|
|
45
|
-
{
|
|
46
|
-
"id": "<generated_id>",
|
|
47
|
-
"type": "AVOID",
|
|
48
|
-
"content": "<pattern to avoid>",
|
|
49
|
-
"source": "user:redirect",
|
|
50
|
-
"created_at": "<ISO-8601 timestamp>"
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
If `constraints` array exceeds 10 entries, remove the oldest entries to keep only 10.
|
|
55
|
-
|
|
56
|
-
Write constraints.json.
|
|
57
|
-
|
|
58
|
-
**Write pheromone signal and update context:**
|
|
59
|
-
```bash
|
|
60
|
-
bash .aether/aether-utils.sh pheromone-write REDIRECT "$normalized_args" --strength 0.9 --reason "User warned colony away from pattern" 2>/dev/null || true
|
|
61
|
-
bash .aether/aether-utils.sh context-update constraint redirect "$normalized_args" "user" 2>/dev/null || true
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Step 3: Confirm
|
|
65
|
-
|
|
66
|
-
Output header:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
⚠️🐜🚧🐜⚠️ ═══════════════════════════════════════════════════
|
|
70
|
-
R E D I R E C T S I G N A L
|
|
71
|
-
═══════════════════════════════════════════════════ ⚠️🐜🚧🐜⚠️
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Then output:
|
|
75
|
-
```
|
|
76
|
-
🚫 REDIRECT signal emitted
|
|
77
|
-
|
|
78
|
-
Avoid: "{content preview}"
|
|
79
|
-
|
|
80
|
-
🐜 Colony warned away from this pattern.
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
@@ -1,190 +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
|
-
### Step -1: Normalize Arguments
|
|
8
|
-
|
|
9
|
-
Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
|
|
10
|
-
|
|
11
|
-
This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
|
|
12
|
-
|
|
13
|
-
You are the **Queen Ant Colony**. Restore state from a paused session.
|
|
14
|
-
|
|
15
|
-
## Instructions
|
|
16
|
-
|
|
17
|
-
Parse `$normalized_args`:
|
|
18
|
-
- If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
|
|
19
|
-
- Otherwise: set `visual_mode = true`
|
|
20
|
-
|
|
21
|
-
### Step 0.5: Version Check (Non-blocking)
|
|
22
|
-
|
|
23
|
-
Run using the Bash tool: `bash .aether/aether-utils.sh version-check 2>/dev/null || true`
|
|
24
|
-
|
|
25
|
-
If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
|
|
26
|
-
|
|
27
|
-
### Step 1: Load State and Validate
|
|
28
|
-
|
|
29
|
-
Run using Bash tool: `bash .aether/aether-utils.sh load-state`
|
|
30
|
-
|
|
31
|
-
If successful:
|
|
32
|
-
1. Parse state from result
|
|
33
|
-
2. If goal is null: Show "No colony state found..." message and stop
|
|
34
|
-
3. If `milestone` == `"Crowned Anthill"`: Show "This colony has been sealed. Start a new colony with `/ant:init \"new goal\"`." and stop
|
|
35
|
-
4. Check if paused flag is true - if not, note "Colony was not paused, but resuming anyway"
|
|
36
|
-
5. Extract all state fields for display
|
|
37
|
-
|
|
38
|
-
Keep state loaded (don't unload yet) - we'll need it for the full display.
|
|
39
|
-
|
|
40
|
-
### Step 2: Compute Active Signals
|
|
41
|
-
|
|
42
|
-
Run using the Bash tool:
|
|
43
|
-
```bash
|
|
44
|
-
bash .aether/aether-utils.sh pheromone-read
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Use `.result.signals` as the active signal list (already decay-filtered by runtime logic).
|
|
48
|
-
If empty, treat as "no active pheromones."
|
|
49
|
-
|
|
50
|
-
### Step 2.5: Load Survey Context (Advisory)
|
|
51
|
-
|
|
52
|
-
Run:
|
|
53
|
-
```bash
|
|
54
|
-
survey_docs=$(ls -1 .aether/data/survey/*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
55
|
-
survey_latest=$(ls -t .aether/data/survey/*.md 2>/dev/null | head -1)
|
|
56
|
-
if [[ -n "$survey_latest" ]]; then
|
|
57
|
-
now_epoch=$(date +%s)
|
|
58
|
-
modified_epoch=$(stat -f %m "$survey_latest" 2>/dev/null || stat -c %Y "$survey_latest" 2>/dev/null || echo 0)
|
|
59
|
-
survey_age_days=$(( (now_epoch - modified_epoch) / 86400 ))
|
|
60
|
-
else
|
|
61
|
-
survey_age_days=-1
|
|
62
|
-
fi
|
|
63
|
-
echo "survey_docs=$survey_docs"
|
|
64
|
-
echo "survey_age_days=$survey_age_days"
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Interpretation:
|
|
68
|
-
- `survey_docs == 0` => survey missing
|
|
69
|
-
- `survey_age_days > 14` => survey stale
|
|
70
|
-
- otherwise survey fresh
|
|
71
|
-
|
|
72
|
-
### Step 3: Display Restored State
|
|
73
|
-
|
|
74
|
-
**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.
|
|
75
|
-
|
|
76
|
-
Output header:
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
🚦➡️🐜💨💨 ═══════════════════════════════════════════════════
|
|
80
|
-
C O L O N Y R E S U M E D
|
|
81
|
-
═══════════════════════════════════════════════════ 🚦➡️🐜💨💨
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Read the .aether/HANDOFF.md for context about what was happening, then display:
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
+=====================================================+
|
|
88
|
-
| AETHER COLONY :: RESUMED |
|
|
89
|
-
+=====================================================+
|
|
90
|
-
|
|
91
|
-
Goal: "<goal>"
|
|
92
|
-
State: <state>
|
|
93
|
-
Session: <session_id>
|
|
94
|
-
Phase: <current_phase>
|
|
95
|
-
|
|
96
|
-
ACTIVE PHEROMONES
|
|
97
|
-
{TYPE padded to 10 chars} [{bar of 20 chars using filled/empty}] {current_strength:.2f}
|
|
98
|
-
"{content}"
|
|
99
|
-
|
|
100
|
-
Where the bar uses round(current_strength * 20) filled characters and spaces for the remainder.
|
|
101
|
-
|
|
102
|
-
If no active signals: (no active pheromones)
|
|
103
|
-
|
|
104
|
-
PHASE PROGRESS
|
|
105
|
-
Phase <id>: <name> [<status>]
|
|
106
|
-
(list all phases from plan.phases)
|
|
107
|
-
|
|
108
|
-
SURVEY CONTEXT
|
|
109
|
-
Docs: <survey_docs>
|
|
110
|
-
Age: <survey_age_days> days
|
|
111
|
-
Status: <fresh|stale|missing>
|
|
112
|
-
Recommendation: <if missing or stale, suggest /ant:colonize --force-resurvey>
|
|
113
|
-
|
|
114
|
-
CONTEXT FROM HANDOFF
|
|
115
|
-
<summarize what was happening from .aether/HANDOFF.md>
|
|
116
|
-
|
|
117
|
-
NEXT ACTIONS
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Route to next action based on state:
|
|
121
|
-
- If state is `READY` and there's a pending phase -> suggest `/ant:build <phase>`
|
|
122
|
-
- If state is `EXECUTING` -> note that a build was interrupted, suggest restarting with `/ant:build <phase>`
|
|
123
|
-
- If state is `PLANNING` -> note that planning was interrupted, suggest `/ant:plan`
|
|
124
|
-
- Otherwise -> suggest `/ant:status` for full overview
|
|
125
|
-
|
|
126
|
-
### Step 6: Clear Paused State and Cleanup
|
|
127
|
-
|
|
128
|
-
Use Write tool to update COLONY_STATE.json:
|
|
129
|
-
- Remove or set to false: `"paused": false`
|
|
130
|
-
- Remove: `"paused_at"` field
|
|
131
|
-
- Update last_updated timestamp
|
|
132
|
-
- Add event: `{timestamp, type: "colony_resumed", worker: "resume", details: "Session resumed"}`
|
|
133
|
-
|
|
134
|
-
Use Bash tool to remove HANDOFF.md: `rm -f .aether/HANDOFF.md`
|
|
135
|
-
|
|
136
|
-
Run: `bash .aether/aether-utils.sh unload-state` to release lock.
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Auto-Recovery Pattern Reference
|
|
141
|
-
|
|
142
|
-
The colony uses a tiered auto-recovery pattern to maintain context across session boundaries:
|
|
143
|
-
|
|
144
|
-
### Format Tiers
|
|
145
|
-
|
|
146
|
-
| Context | Format | When Used |
|
|
147
|
-
|---------|--------|-----------|
|
|
148
|
-
| Brief | `🔄 Resuming: Phase X - Name` | Action commands (build, plan, continue) |
|
|
149
|
-
| Extended | Brief + last activity timestamp | Status command |
|
|
150
|
-
| Full | Complete state with pheromones, workers, context | resume-colony command |
|
|
151
|
-
|
|
152
|
-
### Brief Format (Action Commands)
|
|
153
|
-
|
|
154
|
-
Used by `/ant:build`, `/ant:plan`, `/ant:continue`:
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
🔄 Resuming: Phase <current_phase> - <phase_name>
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Provides minimal orientation before executing the command's primary function.
|
|
161
|
-
|
|
162
|
-
### Extended Format (Status Command)
|
|
163
|
-
|
|
164
|
-
Used by `/ant:status` Step 1.5:
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
🔄 Resuming: Phase <current_phase> - <phase_name>
|
|
168
|
-
Last activity: <last_event_timestamp>
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
Adds temporal context to help gauge session staleness.
|
|
172
|
-
|
|
173
|
-
### Full Format (Resume-Colony)
|
|
174
|
-
|
|
175
|
-
Used by `/ant:resume-colony`:
|
|
176
|
-
|
|
177
|
-
- Complete header with ASCII art
|
|
178
|
-
- Goal, state, session ID, phase
|
|
179
|
-
- Active pheromones with strength bars
|
|
180
|
-
- Worker status by caste
|
|
181
|
-
- Phase progress for all phases
|
|
182
|
-
- Handoff context summary
|
|
183
|
-
- Next action routing
|
|
184
|
-
|
|
185
|
-
### Implementation Notes
|
|
186
|
-
|
|
187
|
-
1. **State Source:** All formats read from `.aether/data/COLONY_STATE.json`
|
|
188
|
-
2. **Phase Name:** Extracted from `plan.phases[current_phase - 1].name`
|
|
189
|
-
3. **Last Activity:** Parsed from the last entry in `events` array
|
|
190
|
-
4. **Edge Cases:** Handle missing phase names, empty events, phase 0
|