aether-colony 5.2.1 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/.aether/aether-utils.sh +35 -0
  2. package/.aether/agents/aether-ambassador.md +140 -0
  3. package/.aether/agents/aether-archaeologist.md +108 -0
  4. package/.aether/agents/aether-architect.md +133 -0
  5. package/.aether/agents/aether-auditor.md +144 -0
  6. package/.aether/agents/aether-builder.md +184 -0
  7. package/.aether/agents/aether-chaos.md +115 -0
  8. package/.aether/agents/aether-chronicler.md +122 -0
  9. package/.aether/agents/aether-gatekeeper.md +116 -0
  10. package/.aether/agents/aether-includer.md +117 -0
  11. package/.aether/agents/aether-keeper.md +177 -0
  12. package/.aether/agents/aether-measurer.md +128 -0
  13. package/.aether/agents/aether-oracle.md +137 -0
  14. package/.aether/agents/aether-probe.md +133 -0
  15. package/.aether/agents/aether-queen.md +286 -0
  16. package/.aether/agents/aether-route-setter.md +130 -0
  17. package/.aether/agents/aether-sage.md +106 -0
  18. package/.aether/agents/aether-scout.md +101 -0
  19. package/.aether/agents/aether-surveyor-disciplines.md +391 -0
  20. package/.aether/agents/aether-surveyor-nest.md +329 -0
  21. package/.aether/agents/aether-surveyor-pathogens.md +264 -0
  22. package/.aether/agents/aether-surveyor-provisions.md +334 -0
  23. package/.aether/agents/aether-tracker.md +137 -0
  24. package/.aether/agents/aether-watcher.md +174 -0
  25. package/.aether/agents/aether-weaver.md +130 -0
  26. package/.aether/commands/claude/archaeology.md +334 -0
  27. package/.aether/commands/claude/build.md +65 -0
  28. package/.aether/commands/claude/chaos.md +336 -0
  29. package/.aether/commands/claude/colonize.md +259 -0
  30. package/.aether/commands/claude/continue.md +60 -0
  31. package/.aether/commands/claude/council.md +507 -0
  32. package/.aether/commands/claude/data-clean.md +81 -0
  33. package/.aether/commands/claude/dream.md +268 -0
  34. package/.aether/commands/claude/entomb.md +498 -0
  35. package/.aether/commands/claude/export-signals.md +57 -0
  36. package/.aether/commands/claude/feedback.md +96 -0
  37. package/.aether/commands/claude/flag.md +151 -0
  38. package/.aether/commands/claude/flags.md +169 -0
  39. package/.aether/commands/claude/focus.md +76 -0
  40. package/.aether/commands/claude/help.md +154 -0
  41. package/.aether/commands/claude/history.md +140 -0
  42. package/.aether/commands/claude/import-signals.md +71 -0
  43. package/.aether/commands/claude/init.md +505 -0
  44. package/.aether/commands/claude/insert-phase.md +105 -0
  45. package/.aether/commands/claude/interpret.md +278 -0
  46. package/.aether/commands/claude/lay-eggs.md +210 -0
  47. package/.aether/commands/claude/maturity.md +113 -0
  48. package/.aether/commands/claude/memory-details.md +77 -0
  49. package/.aether/commands/claude/migrate-state.md +171 -0
  50. package/.aether/commands/claude/oracle.md +642 -0
  51. package/.aether/commands/claude/organize.md +232 -0
  52. package/.aether/commands/claude/patrol.md +620 -0
  53. package/.aether/commands/claude/pause-colony.md +233 -0
  54. package/.aether/commands/claude/phase.md +115 -0
  55. package/.aether/commands/claude/pheromones.md +156 -0
  56. package/.aether/commands/claude/plan.md +693 -0
  57. package/.aether/commands/claude/preferences.md +65 -0
  58. package/.aether/commands/claude/quick.md +100 -0
  59. package/.aether/commands/claude/redirect.md +76 -0
  60. package/.aether/commands/claude/resume-colony.md +197 -0
  61. package/.aether/commands/claude/resume.md +388 -0
  62. package/.aether/commands/claude/run.md +231 -0
  63. package/.aether/commands/claude/seal.md +774 -0
  64. package/.aether/commands/claude/skill-create.md +286 -0
  65. package/.aether/commands/claude/status.md +410 -0
  66. package/.aether/commands/claude/swarm.md +349 -0
  67. package/.aether/commands/claude/tunnels.md +426 -0
  68. package/.aether/commands/claude/update.md +132 -0
  69. package/.aether/commands/claude/verify-castes.md +143 -0
  70. package/.aether/commands/claude/watch.md +239 -0
  71. package/.aether/commands/opencode/archaeology.md +331 -0
  72. package/.aether/commands/opencode/build.md +1168 -0
  73. package/.aether/commands/opencode/chaos.md +329 -0
  74. package/.aether/commands/opencode/colonize.md +195 -0
  75. package/.aether/commands/opencode/continue.md +1436 -0
  76. package/.aether/commands/opencode/council.md +437 -0
  77. package/.aether/commands/opencode/data-clean.md +77 -0
  78. package/.aether/commands/opencode/dream.md +260 -0
  79. package/.aether/commands/opencode/entomb.md +377 -0
  80. package/.aether/commands/opencode/export-signals.md +54 -0
  81. package/.aether/commands/opencode/feedback.md +99 -0
  82. package/.aether/commands/opencode/flag.md +149 -0
  83. package/.aether/commands/opencode/flags.md +167 -0
  84. package/.aether/commands/opencode/focus.md +73 -0
  85. package/.aether/commands/opencode/help.md +157 -0
  86. package/.aether/commands/opencode/history.md +136 -0
  87. package/.aether/commands/opencode/import-signals.md +68 -0
  88. package/.aether/commands/opencode/init.md +518 -0
  89. package/.aether/commands/opencode/insert-phase.md +111 -0
  90. package/.aether/commands/opencode/interpret.md +272 -0
  91. package/.aether/commands/opencode/lay-eggs.md +213 -0
  92. package/.aether/commands/opencode/maturity.md +108 -0
  93. package/.aether/commands/opencode/memory-details.md +83 -0
  94. package/.aether/commands/opencode/migrate-state.md +165 -0
  95. package/.aether/commands/opencode/oracle.md +593 -0
  96. package/.aether/commands/opencode/organize.md +226 -0
  97. package/.aether/commands/opencode/patrol.md +626 -0
  98. package/.aether/commands/opencode/pause-colony.md +203 -0
  99. package/.aether/commands/opencode/phase.md +113 -0
  100. package/.aether/commands/opencode/pheromones.md +162 -0
  101. package/.aether/commands/opencode/plan.md +684 -0
  102. package/.aether/commands/opencode/preferences.md +71 -0
  103. package/.aether/commands/opencode/quick.md +91 -0
  104. package/.aether/commands/opencode/redirect.md +84 -0
  105. package/.aether/commands/opencode/resume-colony.md +190 -0
  106. package/.aether/commands/opencode/resume.md +394 -0
  107. package/.aether/commands/opencode/run.md +237 -0
  108. package/.aether/commands/opencode/seal.md +452 -0
  109. package/.aether/commands/opencode/skill-create.md +63 -0
  110. package/.aether/commands/opencode/status.md +307 -0
  111. package/.aether/commands/opencode/swarm.md +15 -0
  112. package/.aether/commands/opencode/tunnels.md +400 -0
  113. package/.aether/commands/opencode/update.md +127 -0
  114. package/.aether/commands/opencode/verify-castes.md +139 -0
  115. package/.aether/commands/opencode/watch.md +227 -0
  116. package/.aether/docs/command-playbooks/build-full.md +1 -1
  117. package/.aether/docs/command-playbooks/build-prep.md +10 -3
  118. package/.aether/docs/command-playbooks/build-verify.md +51 -0
  119. package/.aether/docs/command-playbooks/continue-advance.md +115 -6
  120. package/.aether/docs/command-playbooks/continue-verify.md +32 -0
  121. package/.aether/utils/clash-detect.sh +239 -0
  122. package/.aether/utils/hooks/clash-pre-tool-use.js +99 -0
  123. package/.aether/utils/merge-driver-lockfile.sh +35 -0
  124. package/.aether/utils/midden.sh +534 -0
  125. package/.aether/utils/pheromone.sh +1376 -108
  126. package/.aether/utils/queen.sh +2 -4
  127. package/.aether/utils/state-api.sh +25 -4
  128. package/.aether/utils/swarm.sh +1 -1
  129. package/.aether/utils/worktree.sh +189 -0
  130. package/.claude/commands/ant/init.md +9 -3
  131. package/.opencode/commands/ant/init.md +9 -2
  132. package/CHANGELOG.md +26 -0
  133. package/README.md +11 -8
  134. package/bin/cli.js +103 -61
  135. package/bin/lib/banner.js +14 -0
  136. package/bin/lib/init.js +8 -7
  137. package/bin/lib/interactive-setup.js +251 -0
  138. package/bin/npx-entry.js +21 -0
  139. package/bin/npx-install.js +9 -167
  140. package/bin/validate-package.sh +23 -0
  141. package/package.json +2 -2
  142. package/.aether/docs/plans/pheromone-display-plan.md +0 -257
  143. package/.aether/schemas/example-prompt-builder.xml +0 -234
  144. package/.aether/scripts/incident-test-add.sh +0 -47
  145. package/.aether/scripts/weekly-audit.sh +0 -79
@@ -0,0 +1,232 @@
1
+ <!-- Generated from .aether/commands/organize.yaml - DO NOT EDIT DIRECTLY -->
2
+ ---
3
+ name: ant:organize
4
+ description: "🧹🐜🏛️🐜🧹 Run codebase hygiene report - archivist ant scans for stale files, dead code, orphaned configs (report-only)"
5
+ ---
6
+
7
+ You are the **Queen Ant Colony**. Spawn an archivist to analyze codebase hygiene.
8
+
9
+ > **Note:** `$ARGUMENTS` is unused. Future extensions could accept a path scope argument.
10
+
11
+ ## Instructions
12
+
13
+ Parse `$ARGUMENTS`:
14
+ - If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
15
+ - Otherwise: set `visual_mode = true`
16
+
17
+ ### Step 1: Read State
18
+
19
+ Use the Read tool to read these files (in parallel):
20
+ - `.aether/data/COLONY_STATE.json`
21
+ - `.aether/data/activity.log`
22
+
23
+ From COLONY_STATE.json, extract:
24
+ - `goal` from top level
25
+ - `plan.phases` for phase data
26
+ - `errors.records` for error patterns
27
+ - `memory` for decisions/learnings
28
+ - `events` for activity
29
+
30
+ **Validate:** If `COLONY_STATE.json` has `goal: null`, output `No colony initialized. Run /ant:init first.` and stop.
31
+
32
+ ### Step 2: Compute Active Pheromones
33
+
34
+ Run using the Bash tool with description "Loading active pheromones...":
35
+ ```bash
36
+ bash .aether/aether-utils.sh pheromone-read
37
+ ```
38
+
39
+ Use `.result.signals` as the active signal list (already decay-filtered by runtime logic).
40
+
41
+ Format as the standard ACTIVE PHEROMONES block:
42
+ ```
43
+ ACTIVE PHEROMONES:
44
+ {TYPE padded to 10 chars}: "{content}"
45
+ ```
46
+
47
+ If no active signals after filtering:
48
+ ```
49
+ (no active pheromones)
50
+ ```
51
+
52
+ ### Step 3: Spawn Archivist (Keeper-Ant)
53
+
54
+ Read `.aether/workers.md` and extract the `## Keeper` section.
55
+
56
+ Spawn via **Task tool** with `subagent_type="aether-keeper"`:
57
+ # FALLBACK: If "Agent type not found", use general-purpose and inject role: "You are a Keeper Ant - curates knowledge and synthesizes patterns."
58
+
59
+ ```
60
+ --- WORKER SPEC ---
61
+ {Architect section from .aether/workers.md}
62
+
63
+ --- ACTIVE PHEROMONES ---
64
+ {pheromone block from Step 2}
65
+
66
+ --- TASK ---
67
+ You are being spawned as an ARCHIVIST ANT (codebase hygiene analyzer).
68
+
69
+ Your mission: Produce a structured HYGIENE REPORT. You are REPORT-ONLY.
70
+ You MUST NOT delete, modify, move, or create any project files.
71
+ You may ONLY read files and produce a report.
72
+
73
+ Colony goal: "{goal from COLONY_STATE.json}"
74
+ Colony mode: {mode from COLONY_STATE.json}
75
+ Current phase: {current_phase from COLONY_STATE.json}
76
+
77
+ --- COLONY DATA ---
78
+
79
+ PROJECT PLAN:
80
+ {plan.phases from COLONY_STATE.json -- phases, tasks, their statuses}
81
+
82
+ ERROR HISTORY:
83
+ {errors.records and errors.flagged_patterns from COLONY_STATE.json}
84
+
85
+ MEMORY:
86
+ {memory.phase_learnings and memory.decisions from COLONY_STATE.json}
87
+
88
+ ACTIVITY LOG (last 50 lines):
89
+ {tail of activity.log}
90
+
91
+ --- SCAN INSTRUCTIONS ---
92
+
93
+ Analyze the codebase for hygiene issues in three categories. For each finding,
94
+ assign a confidence level: HIGH (strong evidence), MEDIUM (likely but uncertain),
95
+ or LOW (speculative). Only HIGH confidence items should be presented as actionable.
96
+
97
+ **Category 1: Stale Files**
98
+ Check for files that may no longer be needed:
99
+ - Files referenced in completed tasks that might have been scaffolding/temporary
100
+ - Look at the project structure (use Glob tool to scan key directories)
101
+ - Check for TODO/FIXME/HACK comments that reference completed phases
102
+ - Check for test fixtures or mock data that reference completed features
103
+ - Look for empty files or stub implementations
104
+
105
+ **Category 2: Dead Code Patterns**
106
+ Use colony data to identify dead code signals:
107
+ - Recurring error patterns from COLONY_STATE.json errors.flagged_patterns (code that keeps breaking may be vestigial)
108
+ - Error categories with high counts concentrated in specific files
109
+ - Imports or dependencies referenced in errors but possibly no longer needed
110
+ - Read key source files and look for commented-out code blocks, unused exports, unreachable branches
111
+
112
+ **Category 3: Orphaned Configs**
113
+ Check for configuration that may not be connected:
114
+ - .aether/data/ files that have empty or default-only content
115
+ - Environment variables referenced in code but not in any .env example
116
+ - Config files that reference features/paths that don't exist
117
+ - Package.json scripts (if exists) that reference missing files
118
+
119
+ --- OUTPUT FORMAT ---
120
+
121
+ Produce your report in this exact structure:
122
+
123
+ CODEBASE HYGIENE REPORT
124
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
125
+
126
+ Project: {goal}
127
+ Scanned: {timestamp}
128
+ Confidence threshold: HIGH findings are actionable, MEDIUM/LOW are informational
129
+
130
+ HIGH CONFIDENCE FINDINGS
131
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
132
+ {For each HIGH confidence finding:}
133
+ [{category}] {description}
134
+ Evidence: {what data/observation supports this}
135
+ Location: {file path(s)}
136
+
137
+ {If no HIGH findings: "No high-confidence hygiene issues detected."}
138
+
139
+ MEDIUM CONFIDENCE OBSERVATIONS
140
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
141
+ {For each MEDIUM confidence finding:}
142
+ [{category}] {description}
143
+ Evidence: {what data/observation supports this}
144
+ Location: {file path(s)}
145
+
146
+ {If no MEDIUM findings: "No medium-confidence observations."}
147
+
148
+ LOW CONFIDENCE NOTES
149
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
150
+ {For each LOW confidence finding:}
151
+ [{category}] {description}
152
+
153
+ {If no LOW findings: "No low-confidence notes."}
154
+
155
+ SUMMARY
156
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
157
+ High: {count} actionable findings
158
+ Medium: {count} observations
159
+ Low: {count} notes
160
+
161
+ Health: {CLEAN if 0 HIGH findings, MINOR ISSUES if 1-3 HIGH, NEEDS ATTENTION if 4+ HIGH}
162
+
163
+ CONSTRAINTS:
164
+ - Be CONSERVATIVE. When in doubt, classify as LOW confidence.
165
+ - Do NOT flag standard framework files (package.json, tsconfig.json, etc.) as orphaned.
166
+ - Do NOT flag .aether/ internal data files as stale (they are managed by the colony).
167
+ - Do NOT flag .claude/ command files as stale (they are the colony's brain).
168
+ - Aim for a useful report, not an exhaustive one. 5-15 findings is ideal.
169
+ ```
170
+
171
+ ### Step 4: Display Report
172
+
173
+ After the keeper-ant returns, display header:
174
+
175
+ ```
176
+ 🧹🐜🏛️🐜🧹 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
177
+ C O D E B A S E H Y G I E N E R E P O R T
178
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🧹🐜🏛️🐜🧹
179
+ ```
180
+
181
+ Then display using Bash tool with description "Displaying hygiene report header...":
182
+ ```bash
183
+ bash -c 'printf "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n"'
184
+ bash -c 'printf " C O D E B A S E H Y G I E N E R E P O R T\n"'
185
+ bash -c 'printf "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n"'
186
+ ```
187
+
188
+ Then display the keeper-ant's full report verbatim.
189
+
190
+ ### Step 5: Persist Report
191
+
192
+ Use the Write tool to write the full report to `.aether/data/hygiene-report.md` (overwriting any previous report).
193
+
194
+ Display:
195
+
196
+ ```
197
+ ---
198
+ Report saved: .aether/data/hygiene-report.md
199
+
200
+ This report is advisory only. No files were modified.
201
+
202
+ Next:
203
+ /ant:status View colony status
204
+ /ant:build <phase> Continue building
205
+ /ant:focus "<area>" Focus colony on a hygiene area
206
+ ```
207
+
208
+ ### Step 6: Log Activity
209
+
210
+ Use the Bash tool with description "Logging hygiene activity..." to run:
211
+ ```
212
+ bash .aether/aether-utils.sh activity-log "COMPLETE" "queen" "Hygiene report generated"
213
+ ```
214
+
215
+ Display persistence confirmation:
216
+
217
+ ```
218
+ ---
219
+ All state persisted. Safe to /clear context if needed.
220
+ Report: .aether/data/hygiene-report.md
221
+ Resume: /ant:resume-colony
222
+ ```
223
+
224
+ ### Step 7: Next Up
225
+
226
+ Generate the state-based Next Up block by running using the Bash tool with description "Generating Next Up suggestions...":
227
+ ```bash
228
+ state=$(jq -r '.state // "IDLE"' .aether/data/COLONY_STATE.json)
229
+ current_phase=$(jq -r '.current_phase // 0' .aether/data/COLONY_STATE.json)
230
+ total_phases=$(jq -r '.plan.phases | length' .aether/data/COLONY_STATE.json)
231
+ bash .aether/aether-utils.sh print-next-up "$state" "$current_phase" "$total_phases"
232
+ ```