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.
Files changed (165) hide show
  1. package/.aether/aether-utils.sh +181 -5
  2. package/.aether/commands/build.yaml +35 -0
  3. package/.aether/commands/entomb.yaml +1 -1
  4. package/.aether/commands/init.yaml +29 -12
  5. package/.aether/commands/oracle.yaml +70 -0
  6. package/.aether/commands/patrol.yaml +2 -2
  7. package/.aether/commands/run.yaml +3 -3
  8. package/.aether/commands/swarm.yaml +1 -1
  9. package/.aether/docs/command-playbooks/build-complete.md +41 -8
  10. package/.aether/docs/command-playbooks/build-full.md +7 -7
  11. package/.aether/docs/command-playbooks/build-prep.md +1 -1
  12. package/.aether/docs/command-playbooks/continue-advance.md +33 -0
  13. package/.aether/docs/command-playbooks/continue-finalize.md +15 -1
  14. package/.aether/docs/command-playbooks/continue-full.md +15 -1
  15. package/.aether/docs/source-of-truth-map.md +10 -10
  16. package/.aether/docs/structural-learning-stack.md +283 -0
  17. package/.aether/utils/consolidation-seal.sh +196 -0
  18. package/.aether/utils/consolidation.sh +127 -0
  19. package/.aether/utils/curation-ants/archivist.sh +97 -0
  20. package/.aether/utils/curation-ants/critic.sh +214 -0
  21. package/.aether/utils/curation-ants/herald.sh +102 -0
  22. package/.aether/utils/curation-ants/janitor.sh +121 -0
  23. package/.aether/utils/curation-ants/librarian.sh +99 -0
  24. package/.aether/utils/curation-ants/nurse.sh +153 -0
  25. package/.aether/utils/curation-ants/orchestrator.sh +181 -0
  26. package/.aether/utils/curation-ants/scribe.sh +164 -0
  27. package/.aether/utils/curation-ants/sentinel.sh +119 -0
  28. package/.aether/utils/event-bus.sh +301 -0
  29. package/.aether/utils/graph.sh +559 -0
  30. package/.aether/utils/instinct-store.sh +401 -0
  31. package/.aether/utils/learning.sh +79 -7
  32. package/.aether/utils/session.sh +13 -0
  33. package/.aether/utils/state-api.sh +1 -1
  34. package/.aether/utils/trust-scoring.sh +347 -0
  35. package/.aether/utils/worktree.sh +97 -0
  36. package/.claude/commands/ant/entomb.md +1 -1
  37. package/.claude/commands/ant/init.md +29 -12
  38. package/.claude/commands/ant/oracle.md +35 -0
  39. package/.claude/commands/ant/patrol.md +2 -2
  40. package/.claude/commands/ant/run.md +3 -3
  41. package/.claude/commands/ant/swarm.md +1 -1
  42. package/.opencode/commands/ant/build.md +35 -0
  43. package/.opencode/commands/ant/init.md +29 -12
  44. package/.opencode/commands/ant/oracle.md +35 -0
  45. package/.opencode/commands/ant/patrol.md +2 -2
  46. package/.opencode/commands/ant/run.md +3 -3
  47. package/CHANGELOG.md +83 -0
  48. package/README.md +34 -37
  49. package/bin/lib/update-transaction.js +8 -3
  50. package/bin/npx-entry.js +0 -0
  51. package/package.json +1 -1
  52. package/.aether/agents/aether-ambassador.md +0 -140
  53. package/.aether/agents/aether-archaeologist.md +0 -108
  54. package/.aether/agents/aether-architect.md +0 -133
  55. package/.aether/agents/aether-auditor.md +0 -144
  56. package/.aether/agents/aether-builder.md +0 -184
  57. package/.aether/agents/aether-chaos.md +0 -115
  58. package/.aether/agents/aether-chronicler.md +0 -122
  59. package/.aether/agents/aether-gatekeeper.md +0 -116
  60. package/.aether/agents/aether-includer.md +0 -117
  61. package/.aether/agents/aether-keeper.md +0 -177
  62. package/.aether/agents/aether-measurer.md +0 -128
  63. package/.aether/agents/aether-oracle.md +0 -137
  64. package/.aether/agents/aether-probe.md +0 -133
  65. package/.aether/agents/aether-queen.md +0 -286
  66. package/.aether/agents/aether-route-setter.md +0 -130
  67. package/.aether/agents/aether-sage.md +0 -106
  68. package/.aether/agents/aether-scout.md +0 -101
  69. package/.aether/agents/aether-surveyor-disciplines.md +0 -391
  70. package/.aether/agents/aether-surveyor-nest.md +0 -329
  71. package/.aether/agents/aether-surveyor-pathogens.md +0 -264
  72. package/.aether/agents/aether-surveyor-provisions.md +0 -334
  73. package/.aether/agents/aether-tracker.md +0 -137
  74. package/.aether/agents/aether-watcher.md +0 -174
  75. package/.aether/agents/aether-weaver.md +0 -130
  76. package/.aether/commands/claude/archaeology.md +0 -334
  77. package/.aether/commands/claude/build.md +0 -65
  78. package/.aether/commands/claude/chaos.md +0 -336
  79. package/.aether/commands/claude/colonize.md +0 -259
  80. package/.aether/commands/claude/continue.md +0 -60
  81. package/.aether/commands/claude/council.md +0 -507
  82. package/.aether/commands/claude/data-clean.md +0 -81
  83. package/.aether/commands/claude/dream.md +0 -268
  84. package/.aether/commands/claude/entomb.md +0 -498
  85. package/.aether/commands/claude/export-signals.md +0 -57
  86. package/.aether/commands/claude/feedback.md +0 -96
  87. package/.aether/commands/claude/flag.md +0 -151
  88. package/.aether/commands/claude/flags.md +0 -169
  89. package/.aether/commands/claude/focus.md +0 -76
  90. package/.aether/commands/claude/help.md +0 -154
  91. package/.aether/commands/claude/history.md +0 -140
  92. package/.aether/commands/claude/import-signals.md +0 -71
  93. package/.aether/commands/claude/init.md +0 -505
  94. package/.aether/commands/claude/insert-phase.md +0 -105
  95. package/.aether/commands/claude/interpret.md +0 -278
  96. package/.aether/commands/claude/lay-eggs.md +0 -210
  97. package/.aether/commands/claude/maturity.md +0 -113
  98. package/.aether/commands/claude/memory-details.md +0 -77
  99. package/.aether/commands/claude/migrate-state.md +0 -171
  100. package/.aether/commands/claude/oracle.md +0 -642
  101. package/.aether/commands/claude/organize.md +0 -232
  102. package/.aether/commands/claude/patrol.md +0 -620
  103. package/.aether/commands/claude/pause-colony.md +0 -233
  104. package/.aether/commands/claude/phase.md +0 -115
  105. package/.aether/commands/claude/pheromones.md +0 -156
  106. package/.aether/commands/claude/plan.md +0 -693
  107. package/.aether/commands/claude/preferences.md +0 -65
  108. package/.aether/commands/claude/quick.md +0 -100
  109. package/.aether/commands/claude/redirect.md +0 -76
  110. package/.aether/commands/claude/resume-colony.md +0 -197
  111. package/.aether/commands/claude/resume.md +0 -388
  112. package/.aether/commands/claude/run.md +0 -231
  113. package/.aether/commands/claude/seal.md +0 -774
  114. package/.aether/commands/claude/skill-create.md +0 -286
  115. package/.aether/commands/claude/status.md +0 -410
  116. package/.aether/commands/claude/swarm.md +0 -349
  117. package/.aether/commands/claude/tunnels.md +0 -426
  118. package/.aether/commands/claude/update.md +0 -132
  119. package/.aether/commands/claude/verify-castes.md +0 -143
  120. package/.aether/commands/claude/watch.md +0 -239
  121. package/.aether/commands/opencode/archaeology.md +0 -331
  122. package/.aether/commands/opencode/build.md +0 -1168
  123. package/.aether/commands/opencode/chaos.md +0 -329
  124. package/.aether/commands/opencode/colonize.md +0 -195
  125. package/.aether/commands/opencode/continue.md +0 -1436
  126. package/.aether/commands/opencode/council.md +0 -437
  127. package/.aether/commands/opencode/data-clean.md +0 -77
  128. package/.aether/commands/opencode/dream.md +0 -260
  129. package/.aether/commands/opencode/entomb.md +0 -377
  130. package/.aether/commands/opencode/export-signals.md +0 -54
  131. package/.aether/commands/opencode/feedback.md +0 -99
  132. package/.aether/commands/opencode/flag.md +0 -149
  133. package/.aether/commands/opencode/flags.md +0 -167
  134. package/.aether/commands/opencode/focus.md +0 -73
  135. package/.aether/commands/opencode/help.md +0 -157
  136. package/.aether/commands/opencode/history.md +0 -136
  137. package/.aether/commands/opencode/import-signals.md +0 -68
  138. package/.aether/commands/opencode/init.md +0 -518
  139. package/.aether/commands/opencode/insert-phase.md +0 -111
  140. package/.aether/commands/opencode/interpret.md +0 -272
  141. package/.aether/commands/opencode/lay-eggs.md +0 -213
  142. package/.aether/commands/opencode/maturity.md +0 -108
  143. package/.aether/commands/opencode/memory-details.md +0 -83
  144. package/.aether/commands/opencode/migrate-state.md +0 -165
  145. package/.aether/commands/opencode/oracle.md +0 -593
  146. package/.aether/commands/opencode/organize.md +0 -226
  147. package/.aether/commands/opencode/patrol.md +0 -626
  148. package/.aether/commands/opencode/pause-colony.md +0 -203
  149. package/.aether/commands/opencode/phase.md +0 -113
  150. package/.aether/commands/opencode/pheromones.md +0 -162
  151. package/.aether/commands/opencode/plan.md +0 -684
  152. package/.aether/commands/opencode/preferences.md +0 -71
  153. package/.aether/commands/opencode/quick.md +0 -91
  154. package/.aether/commands/opencode/redirect.md +0 -84
  155. package/.aether/commands/opencode/resume-colony.md +0 -190
  156. package/.aether/commands/opencode/resume.md +0 -394
  157. package/.aether/commands/opencode/run.md +0 -237
  158. package/.aether/commands/opencode/seal.md +0 -452
  159. package/.aether/commands/opencode/skill-create.md +0 -63
  160. package/.aether/commands/opencode/status.md +0 -307
  161. package/.aether/commands/opencode/swarm.md +0 -15
  162. package/.aether/commands/opencode/tunnels.md +0 -400
  163. package/.aether/commands/opencode/update.md +0 -127
  164. package/.aether/commands/opencode/verify-castes.md +0 -139
  165. package/.aether/commands/opencode/watch.md +0 -227
@@ -1,307 +0,0 @@
1
- <!-- Generated from .aether/commands/status.yaml - DO NOT EDIT DIRECTLY -->
2
- ---
3
- name: ant:status
4
- description: "📈🐜🏘️🐜📈 Show colony status at a glance"
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**. Show colony status.
14
-
15
- ## Instructions
16
-
17
- ### Step 0: Version Check (Non-blocking)
18
-
19
- Run: `bash .aether/aether-utils.sh version-check-cached 2>/dev/null || true`
20
-
21
- If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
22
-
23
- ### Step 1: Read State + Version Check
24
-
25
- Read `.aether/data/COLONY_STATE.json`.
26
-
27
- If file missing or `goal: null`:
28
- ```
29
- No colony initialized. Run /ant:init first.
30
- ```
31
- Stop here.
32
-
33
- **Auto-upgrade old state:**
34
- If `version` field is missing, "1.0", or "2.0":
35
- 1. Preserve: `goal`, `state`, `current_phase`, `plan.phases` (keep phase structure)
36
- 2. Write upgraded state:
37
- ```json
38
- {
39
- "version": "3.0",
40
- "goal": "<preserved>",
41
- "state": "<preserved or 'READY'>",
42
- "current_phase": <preserved or 0>,
43
- "session_id": "migrated_<timestamp>",
44
- "initialized_at": "<preserved or now>",
45
- "build_started_at": null,
46
- "plan": {
47
- "generated_at": "<preserved or null>",
48
- "confidence": null,
49
- "phases": <preserved or []>
50
- },
51
- "memory": { "phase_learnings": [], "decisions": [], "instincts": [] },
52
- "errors": { "records": [], "flagged_patterns": [] },
53
- "events": ["<now>|state_upgraded|system|Auto-upgraded from v<old> to v3.0"]
54
- }
55
- ```
56
- 3. Output: `State auto-upgraded to v3.0`
57
- 4. Continue with command.
58
-
59
- ### Step 1.5: Load State and Show Resumption Context
60
-
61
- Run: `bash .aether/aether-utils.sh load-state`
62
-
63
- If successful and goal is not null:
64
- 1. Extract current_phase from state
65
- 2. Get phase name from plan.phases[current_phase - 1].name (or "(unnamed)")
66
- 3. Get last event timestamp from events array (last element)
67
- 4. Display extended resumption context:
68
- ```
69
- 🔄 Resuming: Phase X - Name
70
- Last activity: timestamp
71
- ```
72
-
73
- 5. Check for .aether/HANDOFF.md existence in the load-state output or via separate check
74
- 6. If .aether/HANDOFF.md exists:
75
- - Display: "Resuming from paused session"
76
- - Read .aether/HANDOFF.md content for additional context
77
- - Remove .aether/HANDOFF.md after displaying (cleanup)
78
-
79
- Run: `bash .aether/aether-utils.sh unload-state` to release lock.
80
-
81
- ### Step 2: Compute Summary
82
-
83
- From state, extract:
84
-
85
- ### Step 2.4: Survey Freshness (Advisory)
86
-
87
- Run:
88
- ```bash
89
- survey_docs=$(ls -1 .aether/data/survey/*.md 2>/dev/null | wc -l | tr -d ' ')
90
- survey_latest=$(ls -t .aether/data/survey/*.md 2>/dev/null | head -1)
91
- if [[ -n "$survey_latest" ]]; then
92
- now_epoch=$(date +%s)
93
- modified_epoch=$(stat -f %m "$survey_latest" 2>/dev/null || stat -c %Y "$survey_latest" 2>/dev/null || echo 0)
94
- survey_age_days=$(( (now_epoch - modified_epoch) / 86400 ))
95
- else
96
- survey_age_days=-1
97
- fi
98
- echo "survey_docs=$survey_docs"
99
- echo "survey_age_days=$survey_age_days"
100
- ```
101
-
102
- Interpretation:
103
- - If `survey_docs == 0`: `survey_status = "missing"`
104
- - If `survey_age_days > 14`: `survey_status = "stale"`
105
- - Otherwise: `survey_status = "fresh"`
106
-
107
- ### Step 2.5: Gather Dream Information
108
-
109
- Run: `ls -1 .aether/dreams/*.md 2>/dev/null | wc -l`
110
-
111
- Capture:
112
- - Dream count: number of .md files in .aether/dreams/
113
- - Latest dream: most recent file by name (files are timestamped: YYYY-MM-DD-HHMM.md)
114
-
115
- To get latest dream timestamp, Run:
116
- ```bash
117
- ls -1 .aether/dreams/*.md 2>/dev/null | sort | tail -1 | sed 's/.*\/\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\)-\([0-9]\{4\}\).*/\1 \2/'
118
- ```
119
-
120
- Format the timestamp as: YYYY-MM-DD HH:MM
121
-
122
-
123
-
124
- **Phase info:**
125
- - Current phase number: `current_phase`
126
- - Total phases: `plan.phases.length`
127
- - Phase name: `plan.phases[current_phase - 1].name` (if exists)
128
-
129
- **Task progress:**
130
- - If phases exist, count tasks in current phase
131
- - Completed: tasks with `status: "completed"`
132
- - Total: all tasks in current phase
133
-
134
- **Constraints:**
135
- Read `.aether/data/constraints.json` if exists:
136
- - Focus count: `focus.length`
137
- - Constraints count: `constraints.length`
138
-
139
- **Flags:**
140
- Run: `bash .aether/aether-utils.sh flag-check-blockers`
141
- Extract:
142
- - Blockers count (critical, block advancement)
143
- - Issues count (high, warnings)
144
- - Notes count (low, informational)
145
-
146
- **Escalation state:**
147
- Count escalated flags by checking for blocker flags with source "escalation":
148
-
149
- Run:
150
- ```bash
151
- escalated_count=$(bash .aether/aether-utils.sh flag-list --type blocker 2>/dev/null | jq '[.result.flags[] | select(.source == "escalation")] | length' 2>/dev/null || echo "0")
152
- echo "escalated_count=$escalated_count"
153
- ```
154
-
155
- **Instincts:**
156
- From `memory.instincts`:
157
- - Total count: `instincts.length`
158
- - High confidence (≥0.7): count where confidence >= 0.7
159
- - Top 3: sorted by confidence descending
160
-
161
- **Colony state:**
162
- - `state` field (IDLE, READY, EXECUTING, PLANNING)
163
-
164
- **Milestone:**
165
- - `milestone` field (First Mound, Open Chambers, Brood Stable, Ventilated Nest, Sealed Chambers, Crowned Anthill)
166
- - `milestone_updated_at` field (timestamp of last milestone change)
167
-
168
- ### Step 2.6: Detect Milestone
169
-
170
- Run: `bash .aether/aether-utils.sh milestone-detect`
171
-
172
- Extract from JSON result:
173
- - `milestone`: Current milestone name
174
- - `version`: Computed version string
175
- - `phases_completed`: Number of completed phases
176
- - `total_phases`: Total phases in plan
177
-
178
- ### Step 2.8: Load Memory Health Metrics
179
-
180
- Run:
181
- ```bash
182
- bash .aether/aether-utils.sh memory-metrics
183
- ```
184
-
185
- Extract from JSON result:
186
- - wisdom.total
187
- - pending.total
188
- - recent_failures.count
189
- - last_activity.queen_md_updated
190
- - last_activity.learning_captured
191
-
192
- Format timestamps for display (YYYY-MM-DD HH:MM).
193
-
194
- ### Step 2.7: Generate Progress Bars
195
-
196
- Calculate progress metrics and generate visual bars.
197
-
198
- Run:
199
- ```bash
200
- current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
201
- total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
202
-
203
- # Calculate task progress in current phase
204
- if [[ "$current_phase" -gt 0 && "$current_phase" -le "$total_phases" ]]; then
205
- phase_idx=$((current_phase - 1))
206
- tasks_completed=$(jq -r ".plan.phases[$phase_idx].tasks // [] | map(select(.status == \"completed\")) | length" .aether/data/COLONY_STATE.json)
207
- tasks_total=$(jq -r ".plan.phases[$phase_idx].tasks // [] | length" .aether/data/COLONY_STATE.json)
208
- phase_name=$(jq -r ".plan.phases[$phase_idx].name // \"Unnamed\"" .aether/data/COLONY_STATE.json)
209
- else
210
- tasks_completed=0
211
- tasks_total=0
212
- phase_name="No plan created"
213
- fi
214
-
215
- # Generate progress bars
216
- phase_bar=$(bash .aether/aether-utils.sh generate-progress-bar "$current_phase" "$total_phases" 20)
217
- task_bar=$(bash .aether/aether-utils.sh generate-progress-bar "$tasks_completed" "$tasks_total" 20)
218
-
219
- echo "phase_bar=$phase_bar"
220
- echo "task_bar=$task_bar"
221
- echo "phase_name=$phase_name"
222
- ```
223
-
224
- Store `phase_bar`, `task_bar`, and `phase_name` values for display in Step 3.
225
-
226
- ### Step 3: Display
227
-
228
- Output format:
229
-
230
- ```
231
- .-.
232
- (o o) AETHER COLONY
233
- | O | Status Report
234
- `-`
235
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
236
-
237
- 👑 Goal: <goal (truncated to 60 chars)>
238
-
239
- 📍 Progress
240
- Phase: [████████░░░░░░░░░░░░] <N>/<M> phases
241
- Tasks: [████████████████░░░░] <completed>/<total> tasks in Phase <N>
242
-
243
- 🎯 Focus: <focus_count> areas | 🚫 Avoid: <constraints_count> patterns
244
- 🧠 Instincts: <total> learned (<high_confidence> strong)
245
- 🚩 Flags: <blockers> blockers | <issues> issues | <notes> notes
246
- {if escalated_count > 0:}
247
- ⚠️ Escalated: {escalated_count} task(s) awaiting your decision
248
- {end if}
249
- 🏆 Milestone: <milestone> (<version>)
250
-
251
- 💭 Dreams: <dream_count> recorded (latest: <latest_dream>)
252
- 🗺️ Survey: <survey_docs> docs (<survey_age_days>d old, <fresh|stale|missing>)
253
-
254
- 📚 Memory Health
255
- ┌─────────────────┬────────┬─────────────────────────────┐
256
- │ Metric │ Count │ Last Updated │
257
- ├─────────────────┼────────┼─────────────────────────────┤
258
- │ Wisdom Entries │ {wisdom_total:>6} │ {queen_updated} │
259
- │ Pending Promos │ {pending_total:>6} │ {learning_updated} │
260
- │ Recent Failures │ {failures_count:>6} │ {last_failure} │
261
- └─────────────────┴────────┴─────────────────────────────┘
262
-
263
- State: <state>
264
- ```
265
-
266
- Use the `phase_bar` and `task_bar` values computed in Step 2.7 for the actual bar characters and counts.
267
-
268
- **If instincts exist, also show top 3:**
269
- ```
270
- 🧠 Colony Instincts:
271
- [0.9] 🐜 testing: Always run tests before completion
272
- [0.8] 🐜 architecture: Use composition over inheritance
273
- [0.7] 🐜 debugging: Trace to root cause first
274
- ```
275
-
276
- **Dream display:**
277
- - If no dreams exist: `💭 Dreams: None recorded`
278
- - If dreams exist: `💭 Dreams: <count> recorded (latest: YYYY-MM-DD HH:MM)`
279
-
280
- **Memory Health display:**
281
- - If memory-metrics returns empty/null values, show:
282
- ```
283
- 📚 Memory Health
284
- No memory data available. Colony wisdom will accumulate as you complete phases.
285
- ```
286
-
287
-
288
-
289
-
290
-
291
- **Edge cases:**
292
- - No phases yet: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 phases`
293
- - No tasks in phase: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 tasks in Phase 0`
294
- - No constraints file: "Constraints: 0 focus, 0 avoid"
295
-
296
- **At the end of the output, generate the Next Up block:**
297
-
298
- Run:
299
- ```bash
300
- state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
301
- current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
302
- total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
303
-
304
- bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
305
- ```
306
-
307
- This auto-generates state-based recommendations (IDLE → init, READY → build, EXECUTING → continue, PLANNING → plan).
@@ -1,15 +0,0 @@
1
- <!-- Generated from .aether/commands/swarm.yaml - DO NOT EDIT DIRECTLY -->
2
- ---
3
- name: ant:swarm
4
- description: "🔥🐜🗡️🐜🔥 Real-time colony swarm display + stubborn bug destroyer"
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**. Deploy the swarm to destroy a stubborn bug or view real-time colony activity.
14
-
15
- ## Instructions