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,286 +0,0 @@
1
- <!-- Generated from .aether/commands/skill-create.yaml - DO NOT EDIT DIRECTLY -->
2
- ---
3
- name: ant:skill-create
4
- description: "Create a custom domain skill using Oracle mini-research and a guided wizard"
5
- ---
6
-
7
- You are the **Builder**. Create a custom domain skill by researching best practices and guiding the user through a wizard.
8
-
9
- The user's input is: `$ARGUMENTS`
10
-
11
- ## Instructions
12
-
13
- ### Step 0: Parse Arguments
14
-
15
- Extract the topic from `$ARGUMENTS`.
16
-
17
- If `$ARGUMENTS` is empty, output:
18
-
19
- ```
20
- Skill Creator — Usage
21
-
22
- /ant:skill-create "topic"
23
-
24
- Examples:
25
- /ant:skill-create "kubernetes"
26
- /ant:skill-create "fastapi"
27
- /ant:skill-create "terraform"
28
-
29
- This will research the topic, ask a few questions, and generate
30
- a custom SKILL.md in ~/.aether/skills/domain/
31
- ```
32
-
33
- Stop here.
34
-
35
- Set `TOPIC` to the value of `$ARGUMENTS` (strip surrounding quotes).
36
- Derive `SKILL_NAME` by lowercasing `TOPIC`, replacing spaces with hyphens, and removing any non-alphanumeric/hyphen characters.
37
-
38
- Proceed to Step 1.
39
-
40
- ---
41
-
42
- ### Step 1: Oracle Mini-Research (5 iterations)
43
-
44
- Run a focused mini-research session on the topic. This is a self-contained research cycle -- it does not require an existing Oracle session.
45
-
46
- **1a. Web search for best practices**
47
-
48
- Use WebSearch to search for:
49
- - `"$TOPIC best practices 2025"`
50
- - `"$TOPIC common mistakes to avoid"`
51
- - `"$TOPIC project structure conventions"`
52
-
53
- Collect the top findings from each search (titles, key points, URLs).
54
-
55
- **1b. Codebase scan for existing usage**
56
-
57
- Use Grep and Glob to scan the current repository for patterns related to the topic:
58
- - Search for imports, config files, or dependencies matching `TOPIC`
59
- - Note any existing conventions or patterns in the codebase
60
-
61
- **1c. Compile findings into a research summary**
62
-
63
- After 5 iterations of searching and reading (web search results, codebase patterns), compile a structured summary:
64
-
65
- ```
66
- Research Summary: $TOPIC
67
-
68
- Key Best Practices:
69
- 1. ...
70
- 2. ...
71
- 3. ...
72
-
73
- Common Pitfalls:
74
- 1. ...
75
- 2. ...
76
-
77
- Project Structure Conventions:
78
- - ...
79
-
80
- Codebase Observations:
81
- - (what was found in the current repo, if anything)
82
-
83
- Sources:
84
- - ...
85
- ```
86
-
87
- Display this summary to the user before proceeding.
88
-
89
- ---
90
-
91
- ### Step 2: Wizard Questions
92
-
93
- Use AskUserQuestion to guide the user through skill customization. Ask each question one at a time.
94
-
95
- **Question 1: Focus Area**
96
-
97
- Based on the Oracle research findings, identify 2-4 distinct aspects of the topic. Present them as options:
98
-
99
- ```
100
- What aspect of $TOPIC should this skill focus on?
101
- ```
102
-
103
- Options (dynamically generated from research, for example):
104
- 1. **Core patterns and architecture** -- Fundamental design patterns and project structure
105
- 2. **Performance and optimization** -- Speed, caching, resource management
106
- 3. **Testing and quality** -- Test strategies, coverage, CI/CD integration
107
- 4. **Comprehensive guide** -- Cover all major aspects in a single skill
108
-
109
- (Adapt the options based on what the research actually found. Always include a "comprehensive" option as the last choice.)
110
-
111
- **Question 2: Experience Level**
112
-
113
- ```
114
- What experience level should this skill target?
115
- ```
116
-
117
- Options:
118
- 1. **Beginner** -- Explain fundamentals, include examples, avoid advanced patterns
119
- 2. **Intermediate** -- Assume basics, focus on best practices and common patterns
120
- 3. **Advanced** -- Expert-level patterns, performance tuning, edge cases
121
-
122
- **Question 3: Custom Rules or Constraints**
123
-
124
- ```
125
- Any specific rules or constraints to include? (e.g., "always use TypeScript", "prefer composition over inheritance", "no classes")
126
- ```
127
-
128
- Options:
129
- 1. **No specific rules** -- Use standard best practices from the research
130
- 2. **Yes, I have rules** -- I want to add custom constraints
131
-
132
- If the user selects option 2, ask a follow-up AskUserQuestion with free text:
133
-
134
- ```
135
- Enter your rules or constraints (free text):
136
- ```
137
-
138
- Capture the user's custom rules for inclusion in the skill.
139
-
140
- ---
141
-
142
- ### Step 3: Generate SKILL.md
143
-
144
- Based on the research findings and wizard answers, generate a complete skill file.
145
-
146
- **3a. Determine frontmatter values**
147
-
148
- - `name`: Use `SKILL_NAME` (the sanitized, lowercased topic)
149
- - `description`: Generate a concise description like "Use when the project uses $TOPIC" or "Best practices for $TOPIC development"
150
- - `type: domain`
151
- - `domains`: Infer 2-4 relevant domain tags from the research (e.g., `[frontend, components]` for React, `[backend, api]` for FastAPI)
152
- - `agent_roles: [builder]`
153
- - `detect_files`: Infer file patterns that indicate this technology is in use (e.g., `["*.py", "requirements.txt"]` for Python frameworks, `["Dockerfile", "docker-compose.yml"]` for Docker)
154
- - `detect_packages`: Infer package names that indicate this technology (e.g., `["fastapi"]`, `["terraform"]`)
155
- - `priority: normal`
156
- - `version: "1.0"`
157
-
158
- **3b. Generate the body content**
159
-
160
- Write a comprehensive best-practices guide structured as follows:
161
-
162
- ```markdown
163
- # $TOPIC Best Practices
164
-
165
- ## [Aspect heading based on focus area]
166
-
167
- [2-3 paragraphs of actionable guidance drawn from Oracle research]
168
- [Adapt depth and complexity to the selected experience level]
169
-
170
- ## [Next aspect heading]
171
-
172
- [More guidance...]
173
-
174
- ## Common Pitfalls
175
-
176
- [List of things to avoid, drawn from research]
177
-
178
- ## [Additional sections as appropriate for the topic]
179
-
180
- [Custom rules or constraints from wizard Question 3, if any, integrated naturally into the guide]
181
- ```
182
-
183
- Guidelines for body content:
184
- - Write in the same style as existing skills (direct, actionable, no fluff)
185
- - Reference the React SKILL.md at `.aether/skills/domain/react/SKILL.md` for tone and structure
186
- - Beginner level: include more explanation and examples
187
- - Intermediate level: focus on patterns and best practices
188
- - Advanced level: include edge cases, performance tuning, and expert techniques
189
- - If the user provided custom rules, weave them into the relevant sections rather than listing them separately
190
- - Keep total body length between 30-80 lines (matching existing skills)
191
-
192
- **3c. Assemble the full SKILL.md content**
193
-
194
- Combine the frontmatter and body into a single file:
195
-
196
- ```markdown
197
- ---
198
- name: {SKILL_NAME}
199
- description: {description}
200
- type: domain
201
- domains: [{domain1}, {domain2}]
202
- agent_roles: [builder]
203
- detect_files: ["{pattern1}", "{pattern2}"]
204
- detect_packages: ["{package1}"]
205
- priority: normal
206
- version: "1.0"
207
- ---
208
-
209
- {body content}
210
- ```
211
-
212
- ---
213
-
214
- ### Step 4: Write and Verify
215
-
216
- **4a. Create the skill directory and write the file**
217
-
218
- Run using the Bash tool with description "Creating skill directory...":
219
-
220
- ```bash
221
- mkdir -p ~/.aether/skills/domain/{SKILL_NAME}
222
- ```
223
-
224
- Use the Write tool to create `~/.aether/skills/domain/{SKILL_NAME}/SKILL.md` with the assembled content.
225
-
226
- **4b. Verify frontmatter parses correctly**
227
-
228
- Run using the Bash tool with description "Verifying skill frontmatter...":
229
-
230
- ```bash
231
- bash .aether/aether-utils.sh skill-parse-frontmatter ~/.aether/skills/domain/{SKILL_NAME}/SKILL.md
232
- ```
233
-
234
- Check the output. If the result contains `"ok": true` (or the parsed JSON shows the correct name and type), the skill is valid. If parsing fails, fix the frontmatter and retry once.
235
-
236
- **4c. Rebuild skill cache**
237
-
238
- Run using the Bash tool with description "Rebuilding skill cache...":
239
-
240
- ```bash
241
- bash .aether/aether-utils.sh skill-cache-rebuild
242
- ```
243
-
244
- **4d. Show the result**
245
-
246
- Display the generated skill to the user:
247
-
248
- ```
249
- Skill Created: {SKILL_NAME}
250
-
251
- Location: ~/.aether/skills/domain/{SKILL_NAME}/SKILL.md
252
- Type: domain
253
- Domains: {domains list}
254
- Detects: {detect_files and detect_packages}
255
- Level: {experience level}
256
- ```
257
-
258
- Then show the full content of the SKILL.md file.
259
-
260
- **4e. Offer adjustments**
261
-
262
- Use AskUserQuestion to ask:
263
-
264
- ```
265
- Happy with this skill, or want to adjust anything?
266
- ```
267
-
268
- Options:
269
- 1. **Looks good** -- Keep it as-is
270
- 2. **Adjust content** -- I want to change some of the guidance
271
- 3. **Regenerate** -- Start over with different options
272
-
273
- If the user selects option 2, ask what they want to change, make the edits, re-write the file, and re-run `skill-parse-frontmatter` and `skill-cache-rebuild`.
274
-
275
- If the user selects option 3, go back to Step 2.
276
-
277
- If the user selects option 1, output:
278
-
279
- ```
280
- Skill "{SKILL_NAME}" is ready. It will automatically activate in projects
281
- that match its detection patterns (files: {detect_files}, packages: {detect_packages}).
282
-
283
- You can also view all installed skills with: /ant:skill-list
284
- ```
285
-
286
- Stop here.
@@ -1,410 +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
- You are the **Queen**. Show colony status.
8
-
9
- ## Instructions
10
-
11
- ### Step 0: Version Check (Non-blocking)
12
-
13
- Run using the Bash tool with description "Checking colony version...": `bash .aether/aether-utils.sh version-check-cached 2>/dev/null || true`
14
-
15
- If the command succeeds and the JSON result contains a non-empty string, display it as a one-line notice. Proceed regardless of outcome.
16
-
17
- ### Step 1: Read State + Version Check
18
-
19
- Read `.aether/data/COLONY_STATE.json`.
20
-
21
- If file missing or `goal: null`:
22
- ```
23
- No colony initialized. Run /ant:init first.
24
- ```
25
- Stop here.
26
-
27
- **Auto-upgrade old state:**
28
- If `version` field is missing, "1.0", or "2.0":
29
- 1. Preserve: `goal`, `state`, `current_phase`, `plan.phases` (keep phase structure)
30
- 2. Write upgraded state:
31
- ```json
32
- {
33
- "version": "3.0",
34
- "goal": "<preserved>",
35
- "state": "<preserved or 'READY'>",
36
- "current_phase": <preserved or 0>,
37
- "session_id": "migrated_<timestamp>",
38
- "initialized_at": "<preserved or now>",
39
- "build_started_at": null,
40
- "plan": {
41
- "generated_at": "<preserved or null>",
42
- "confidence": null,
43
- "phases": <preserved or []>
44
- },
45
- "memory": { "phase_learnings": [], "decisions": [], "instincts": [] },
46
- "errors": { "records": [], "flagged_patterns": [] },
47
- "events": ["<now>|state_upgraded|system|Auto-upgraded from v<old> to v3.0"]
48
- }
49
- ```
50
- 3. Output: `State auto-upgraded to v3.0`
51
- 4. Continue with command.
52
-
53
- ### Step 1.5: Load State and Show Resumption Context
54
-
55
- Run using the Bash tool with description "Loading colony state...": `bash .aether/aether-utils.sh load-state`
56
-
57
- If successful and goal is not null:
58
- 1. Extract current_phase from state
59
- 2. Get phase name from plan.phases[current_phase - 1].name (or "(unnamed)")
60
- 3. Get last event timestamp from events array (last element)
61
- 4. Display extended resumption context:
62
- ```
63
- 🔄 Resuming: Phase X - Name
64
- Last activity: timestamp
65
- ```
66
-
67
- 5. Check for .aether/HANDOFF.md existence in the load-state output or via separate check
68
- 6. If .aether/HANDOFF.md exists:
69
- - Display: "Resuming from paused session"
70
- - Read .aether/HANDOFF.md content for additional context
71
- - Remove .aether/HANDOFF.md after displaying (cleanup)
72
-
73
- Run using the Bash tool with description "Releasing colony lock...": `bash .aether/aether-utils.sh unload-state` to release lock.
74
-
75
- ### Step 2: Compute Summary
76
-
77
- From state, extract:
78
-
79
- ### Step 2.4: Survey Freshness (Advisory)
80
-
81
- Run using the Bash tool with description "Checking survey freshness...":
82
- ```bash
83
- survey_docs=$(ls -1 .aether/data/survey/*.md 2>/dev/null | wc -l | tr -d ' ')
84
- survey_latest=$(ls -t .aether/data/survey/*.md 2>/dev/null | head -1)
85
- if [[ -n "$survey_latest" ]]; then
86
- now_epoch=$(date +%s)
87
- modified_epoch=$(stat -f %m "$survey_latest" 2>/dev/null || stat -c %Y "$survey_latest" 2>/dev/null || echo 0)
88
- survey_age_days=$(( (now_epoch - modified_epoch) / 86400 ))
89
- else
90
- survey_age_days=-1
91
- fi
92
- echo "survey_docs=$survey_docs"
93
- echo "survey_age_days=$survey_age_days"
94
- ```
95
-
96
- Interpretation:
97
- - If `survey_docs == 0`: `survey_status = "missing"`
98
- - If `survey_age_days > 14`: `survey_status = "stale"`
99
- - Otherwise: `survey_status = "fresh"`
100
-
101
- ### Step 2.5: Gather Dream Information
102
-
103
- Run using the Bash tool with description "Counting dream entries...": `ls -1 .aether/dreams/*.md 2>/dev/null | wc -l`
104
-
105
- Capture:
106
- - Dream count: number of .md files in .aether/dreams/
107
- - Latest dream: most recent file by name (files are timestamped: YYYY-MM-DD-HHMM.md)
108
-
109
- To get latest dream timestamp, Run using the Bash tool with description "Finding latest dream...":
110
- ```bash
111
- 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/'
112
- ```
113
-
114
- Format the timestamp as: YYYY-MM-DD HH:MM
115
-
116
-
117
- ### Step 2.5.5: Colony Depth
118
-
119
- Run using the Bash tool with description "Reading colony depth...":
120
- ```bash
121
- depth_result=$(bash .aether/aether-utils.sh colony-depth get 2>/dev/null || echo '{"ok":true,"result":{"depth":"standard","source":"default"}}')
122
- colony_depth=$(echo "$depth_result" | jq -r '.result.depth // "standard"')
123
- depth_source=$(echo "$depth_result" | jq -r '.result.source // "default"')
124
- echo "colony_depth=$colony_depth"
125
- echo "depth_source=$depth_source"
126
- ```
127
-
128
- Store `colony_depth` and `depth_source` for the dashboard display.
129
-
130
- Depth label mapping:
131
- - light -> "Builder only (fastest)"
132
- - standard -> "Builder + Scout (balanced)"
133
- - deep -> "Builder + Scout + Oracle (thorough)"
134
- - full -> "All agents (most thorough)"
135
-
136
- From state, extract:
137
-
138
-
139
- **Phase info:**
140
- - Current phase number: `current_phase`
141
- - Total phases: `plan.phases.length`
142
- - Phase name: `plan.phases[current_phase - 1].name` (if exists)
143
-
144
- **Task progress:**
145
- - If phases exist, count tasks in current phase
146
- - Completed: tasks with `status: "completed"`
147
- - Total: all tasks in current phase
148
-
149
- **Constraints:**
150
- Read `.aether/data/constraints.json` if exists:
151
- - Focus count: `focus.length`
152
- - Constraints count: `constraints.length`
153
-
154
- **Flags:**
155
- Run using the Bash tool with description "Checking for blockers...": `bash .aether/aether-utils.sh flag-check-blockers`
156
- Extract:
157
- - Blockers count (critical, block advancement)
158
- - Issues count (high, warnings)
159
- - Notes count (low, informational)
160
-
161
- **Escalation state:**
162
- Count escalated flags by checking for blocker flags with source "escalation":
163
-
164
- Run using the Bash tool with description "Checking escalation state...":
165
- ```bash
166
- 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")
167
- echo "escalated_count=$escalated_count"
168
- ```
169
-
170
- **Instincts:**
171
- From `memory.instincts`:
172
- - Total count: `instincts.length`
173
- - High confidence (≥0.7): count where confidence >= 0.7
174
- - Top 3: sorted by confidence descending
175
-
176
- **Colony state:**
177
- - `state` field (IDLE, READY, EXECUTING, PLANNING)
178
-
179
- **Milestone:**
180
- - `milestone` field (First Mound, Open Chambers, Brood Stable, Ventilated Nest, Sealed Chambers, Crowned Anthill)
181
- - `milestone_updated_at` field (timestamp of last milestone change)
182
-
183
- ### Step 2.6: Detect Milestone
184
-
185
- Run using the Bash tool with description "Detecting colony milestone...": `bash .aether/aether-utils.sh milestone-detect`
186
-
187
- Extract from JSON result:
188
- - `milestone`: Current milestone name
189
- - `version`: Computed version string
190
- - `phases_completed`: Number of completed phases
191
- - `total_phases`: Total phases in plan
192
-
193
- ### Step 2.8: Load Memory Health Metrics
194
-
195
- Run using the Bash tool with description "Loading memory health metrics...":
196
- ```bash
197
- bash .aether/aether-utils.sh memory-metrics
198
- ```
199
-
200
- Extract from JSON result:
201
- - wisdom.total
202
- - pending.total
203
- - recent_failures.count
204
- - last_activity.queen_md_updated
205
- - last_activity.learning_captured
206
-
207
- Format timestamps for display (YYYY-MM-DD HH:MM).
208
-
209
- ### Step 2.7: Generate Progress Bars
210
-
211
- Calculate progress metrics and generate visual bars.
212
-
213
- Run using the Bash tool with description "Computing phase progress...":
214
- ```bash
215
- current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
216
- total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
217
-
218
- # Calculate task progress in current phase
219
- if [[ "$current_phase" -gt 0 && "$current_phase" -le "$total_phases" ]]; then
220
- phase_idx=$((current_phase - 1))
221
- tasks_completed=$(jq -r ".plan.phases[$phase_idx].tasks // [] | map(select(.status == \"completed\")) | length" .aether/data/COLONY_STATE.json)
222
- tasks_total=$(jq -r ".plan.phases[$phase_idx].tasks // [] | length" .aether/data/COLONY_STATE.json)
223
- phase_name=$(jq -r ".plan.phases[$phase_idx].name // \"Unnamed\"" .aether/data/COLONY_STATE.json)
224
- else
225
- tasks_completed=0
226
- tasks_total=0
227
- phase_name="No plan created"
228
- fi
229
-
230
- # Generate progress bars
231
- phase_bar=$(bash .aether/aether-utils.sh generate-progress-bar "$current_phase" "$total_phases" 20)
232
- task_bar=$(bash .aether/aether-utils.sh generate-progress-bar "$tasks_completed" "$tasks_total" 20)
233
-
234
- echo "phase_bar=$phase_bar"
235
- echo "task_bar=$task_bar"
236
- echo "phase_name=$phase_name"
237
- ```
238
-
239
- Store `phase_bar`, `task_bar`, and `phase_name` values for display in Step 3.
240
-
241
- ### Step 3: Display
242
-
243
- Output format:
244
-
245
- ```
246
- .-.
247
- (o o) AETHER COLONY
248
- | O | Status Report
249
- `-`
250
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
251
-
252
- 👑 Goal: <goal (truncated to 60 chars)>
253
-
254
- 📍 Progress
255
- Phase: [████████░░░░░░░░░░░░] <N>/<M> phases
256
- Tasks: [████████████████░░░░] <completed>/<total> tasks in Phase <N>
257
-
258
- 🎯 Focus: <focus_count> areas | 🚫 Avoid: <constraints_count> patterns
259
- 🧠 Instincts: <total> learned (<high_confidence> strong)
260
- 🚩 Flags: <blockers> blockers | <issues> issues | <notes> notes
261
- {if escalated_count > 0:}
262
- ⚠️ Escalated: {escalated_count} task(s) awaiting your decision
263
- {end if}
264
- 🏆 Milestone: <milestone> (<version>)
265
-
266
- 🔬 Depth: {colony_depth} — {label}{if depth_source == "default": " (default)"}
267
-
268
- 💭 Dreams: <dream_count> recorded (latest: <latest_dream>)
269
- 🗺️ Survey: <survey_docs> docs (<survey_age_days>d old, <fresh|stale|missing>)
270
-
271
- 📚 Memory Health
272
- ┌─────────────────┬────────┬─────────────────────────────┐
273
- │ Metric │ Count │ Last Updated │
274
- ├─────────────────┼────────┼─────────────────────────────┤
275
- │ Wisdom Entries │ {wisdom_total:>6} │ {queen_updated} │
276
- │ Pending Promos │ {pending_total:>6} │ {learning_updated} │
277
- │ Recent Failures │ {failures_count:>6} │ {last_failure} │
278
- └─────────────────┴────────┴─────────────────────────────┘
279
-
280
- State: <state>
281
- ```
282
-
283
- Use the `phase_bar` and `task_bar` values computed in Step 2.7 for the actual bar characters and counts.
284
-
285
- **If instincts exist, also show top 3:**
286
- ```
287
- 🧠 Colony Instincts:
288
- [0.9] 🐜 testing: Always run tests before completion
289
- [0.8] 🐜 architecture: Use composition over inheritance
290
- [0.7] 🐜 debugging: Trace to root cause first
291
- ```
292
-
293
- **Dream display:**
294
- - If no dreams exist: `💭 Dreams: None recorded`
295
- - If dreams exist: `💭 Dreams: <count> recorded (latest: YYYY-MM-DD HH:MM)`
296
-
297
- **Memory Health display:**
298
- - If memory-metrics returns empty/null values, show:
299
- ```
300
- 📚 Memory Health
301
- No memory data available. Colony wisdom will accumulate as you complete phases.
302
- ```
303
-
304
-
305
- **Colony Vital Signs:**
306
- After the Memory Health table, run:
307
- ```bash
308
- bash .aether/aether-utils.sh colony-vital-signs
309
- ```
310
-
311
- Extract from JSON result:
312
- - build_velocity.phases_per_day and build_velocity.trend
313
- - error_rate.errors_per_day and error_rate.status
314
- - signal_health.active_count and signal_health.status
315
- - memory_pressure.instinct_count and memory_pressure.status
316
- - colony_age_hours
317
- - overall_health (0-100 score)
318
-
319
- Map overall_health score to a label:
320
- - 80-100: "Thriving"
321
- - 60-79: "Healthy"
322
- - 40-59: "Stable"
323
- - 20-39: "Struggling"
324
- - 0-19: "Critical"
325
-
326
- Display:
327
- ```
328
- 💓 Colony Vital Signs
329
- ┌─────────────────┬────────────┬─────────────────────────────┐
330
- │ Vital Sign │ Value │ Status │
331
- ├─────────────────┼────────────┼─────────────────────────────┤
332
- │ Build Velocity │ {phases_per_day}/d │ {trend} │
333
- │ Error Rate │ {errors_per_day}/d │ {error_status} │
334
- │ Signal Health │ {active_count} │ {signal_status} │
335
- │ Memory Pressure │ {instinct_count} │ {memory_status} │
336
- │ Colony Age │ {colony_age_hours}h │ │
337
- ├─────────────────┼────────────┼─────────────────────────────┤
338
- │ Overall Health │ {overall_health}% │ {health_label} │
339
- └─────────────────┴────────────┴─────────────────────────────┘
340
- ```
341
-
342
- If the command fails or returns no data, display:
343
- ```
344
- 💓 Colony Vital Signs: No data available
345
- ```
346
-
347
-
348
-
349
- **Data Safety:**
350
- After the Colony Vital Signs panel, run:
351
- ```bash
352
- bash .aether/aether-utils.sh data-safety-stats
353
- ```
354
-
355
- If the result contains non-zero counts, display:
356
- ```
357
- 🛡️ Data Safety
358
- Stale locks cleaned: {stale_locks_cleaned}
359
- JSON validation rejects: {json_validation_rejects}
360
- ```
361
-
362
- If all counts are 0 or the subcommand returns no data, display:
363
- ```
364
- 🛡️ Data Safety: No issues detected
365
- ```
366
-
367
- **Pheromone Summary:**
368
- After the Data Safety section, run:
369
- ```bash
370
- bash .aether/aether-utils.sh pheromone-count
371
- ```
372
-
373
- Display:
374
- ```
375
- 🎯 Active Pheromones
376
- ┌────────────┬───────┬──────────────────────────────────┐
377
- │ Type │ Count │ Strongest Signal │
378
- ├────────────┼───────┼──────────────────────────────────┤
379
- │ 🎯 FOCUS │ {n} │ {strongest_focus or "none"} │
380
- │ 🚫 REDIRECT│ {n} │ {strongest_redirect or "none"} │
381
- │ 💬 FEEDBACK│ {n} │ {strongest_feedback or "none"} │
382
- └────────────┴───────┴──────────────────────────────────┘
383
-
384
- Run /ant:pheromones for full details
385
- ```
386
-
387
- If all counts are 0:
388
- ```
389
- 🎯 Active Pheromones: None
390
- Use /ant:focus, /ant:redirect, or /ant:feedback to inject signals
391
- ```
392
-
393
-
394
- **Edge cases:**
395
- - No phases yet: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 phases`
396
- - No tasks in phase: show `[░░░░░░░░░░░░░░░░░░░░] 0/0 tasks in Phase 0`
397
- - No constraints file: "Constraints: 0 focus, 0 avoid"
398
-
399
- **At the end of the output, generate the Next Up block:**
400
-
401
- Run using the Bash tool with description "Generating next steps...":
402
- ```bash
403
- state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
404
- current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
405
- total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
406
-
407
- bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
408
- ```
409
-
410
- This auto-generates state-based recommendations (IDLE → init, READY → build, EXECUTING → continue, PLANNING → plan).