aether-colony 5.1.0 → 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.
- package/.aether/aether-utils.sh +157 -42
- package/.aether/agents/aether-ambassador.md +140 -0
- package/.aether/agents/aether-archaeologist.md +108 -0
- package/.aether/agents/aether-architect.md +133 -0
- package/.aether/agents/aether-auditor.md +144 -0
- package/.aether/agents/aether-builder.md +184 -0
- package/.aether/agents/aether-chaos.md +115 -0
- package/.aether/agents/aether-chronicler.md +122 -0
- package/.aether/agents/aether-gatekeeper.md +116 -0
- package/.aether/agents/aether-includer.md +117 -0
- package/.aether/agents/aether-keeper.md +177 -0
- package/.aether/agents/aether-measurer.md +128 -0
- package/.aether/agents/aether-oracle.md +137 -0
- package/.aether/agents/aether-probe.md +133 -0
- package/.aether/agents/aether-queen.md +286 -0
- package/.aether/agents/aether-route-setter.md +130 -0
- package/.aether/agents/aether-sage.md +106 -0
- package/.aether/agents/aether-scout.md +101 -0
- package/.aether/agents/aether-surveyor-disciplines.md +391 -0
- package/.aether/agents/aether-surveyor-nest.md +329 -0
- package/.aether/agents/aether-surveyor-pathogens.md +264 -0
- package/.aether/agents/aether-surveyor-provisions.md +334 -0
- package/.aether/agents/aether-tracker.md +137 -0
- package/.aether/agents/aether-watcher.md +174 -0
- package/.aether/agents/aether-weaver.md +130 -0
- package/.aether/commands/claude/archaeology.md +334 -0
- package/.aether/commands/claude/build.md +65 -0
- package/.aether/commands/claude/chaos.md +336 -0
- package/.aether/commands/claude/colonize.md +259 -0
- package/.aether/commands/claude/continue.md +60 -0
- package/.aether/commands/claude/council.md +507 -0
- package/.aether/commands/claude/data-clean.md +81 -0
- package/.aether/commands/claude/dream.md +268 -0
- package/.aether/commands/claude/entomb.md +498 -0
- package/.aether/commands/claude/export-signals.md +57 -0
- package/.aether/commands/claude/feedback.md +96 -0
- package/.aether/commands/claude/flag.md +151 -0
- package/.aether/commands/claude/flags.md +169 -0
- package/.aether/commands/claude/focus.md +76 -0
- package/.aether/commands/claude/help.md +154 -0
- package/.aether/commands/claude/history.md +140 -0
- package/.aether/commands/claude/import-signals.md +71 -0
- package/.aether/commands/claude/init.md +505 -0
- package/.aether/commands/claude/insert-phase.md +105 -0
- package/.aether/commands/claude/interpret.md +278 -0
- package/.aether/commands/claude/lay-eggs.md +210 -0
- package/.aether/commands/claude/maturity.md +113 -0
- package/.aether/commands/claude/memory-details.md +77 -0
- package/.aether/commands/claude/migrate-state.md +171 -0
- package/.aether/commands/claude/oracle.md +642 -0
- package/.aether/commands/claude/organize.md +232 -0
- package/.aether/commands/claude/patrol.md +620 -0
- package/.aether/commands/claude/pause-colony.md +233 -0
- package/.aether/commands/claude/phase.md +115 -0
- package/.aether/commands/claude/pheromones.md +156 -0
- package/.aether/commands/claude/plan.md +693 -0
- package/.aether/commands/claude/preferences.md +65 -0
- package/.aether/commands/claude/quick.md +100 -0
- package/.aether/commands/claude/redirect.md +76 -0
- package/.aether/commands/claude/resume-colony.md +197 -0
- package/.aether/commands/claude/resume.md +388 -0
- package/.aether/commands/claude/run.md +231 -0
- package/.aether/commands/claude/seal.md +774 -0
- package/.aether/commands/claude/skill-create.md +286 -0
- package/.aether/commands/claude/status.md +410 -0
- package/.aether/commands/claude/swarm.md +349 -0
- package/.aether/commands/claude/tunnels.md +426 -0
- package/.aether/commands/claude/update.md +132 -0
- package/.aether/commands/claude/verify-castes.md +143 -0
- package/.aether/commands/claude/watch.md +239 -0
- package/.aether/commands/colonize.yaml +4 -0
- package/.aether/commands/council.yaml +205 -0
- package/.aether/commands/init.yaml +46 -13
- package/.aether/commands/insert-phase.yaml +4 -0
- package/.aether/commands/opencode/archaeology.md +331 -0
- package/.aether/commands/opencode/build.md +1168 -0
- package/.aether/commands/opencode/chaos.md +329 -0
- package/.aether/commands/opencode/colonize.md +195 -0
- package/.aether/commands/opencode/continue.md +1436 -0
- package/.aether/commands/opencode/council.md +437 -0
- package/.aether/commands/opencode/data-clean.md +77 -0
- package/.aether/commands/opencode/dream.md +260 -0
- package/.aether/commands/opencode/entomb.md +377 -0
- package/.aether/commands/opencode/export-signals.md +54 -0
- package/.aether/commands/opencode/feedback.md +99 -0
- package/.aether/commands/opencode/flag.md +149 -0
- package/.aether/commands/opencode/flags.md +167 -0
- package/.aether/commands/opencode/focus.md +73 -0
- package/.aether/commands/opencode/help.md +157 -0
- package/.aether/commands/opencode/history.md +136 -0
- package/.aether/commands/opencode/import-signals.md +68 -0
- package/.aether/commands/opencode/init.md +518 -0
- package/.aether/commands/opencode/insert-phase.md +111 -0
- package/.aether/commands/opencode/interpret.md +272 -0
- package/.aether/commands/opencode/lay-eggs.md +213 -0
- package/.aether/commands/opencode/maturity.md +108 -0
- package/.aether/commands/opencode/memory-details.md +83 -0
- package/.aether/commands/opencode/migrate-state.md +165 -0
- package/.aether/commands/opencode/oracle.md +593 -0
- package/.aether/commands/opencode/organize.md +226 -0
- package/.aether/commands/opencode/patrol.md +626 -0
- package/.aether/commands/opencode/pause-colony.md +203 -0
- package/.aether/commands/opencode/phase.md +113 -0
- package/.aether/commands/opencode/pheromones.md +162 -0
- package/.aether/commands/opencode/plan.md +684 -0
- package/.aether/commands/opencode/preferences.md +71 -0
- package/.aether/commands/opencode/quick.md +91 -0
- package/.aether/commands/opencode/redirect.md +84 -0
- package/.aether/commands/opencode/resume-colony.md +190 -0
- package/.aether/commands/opencode/resume.md +394 -0
- package/.aether/commands/opencode/run.md +237 -0
- package/.aether/commands/opencode/seal.md +452 -0
- package/.aether/commands/opencode/skill-create.md +63 -0
- package/.aether/commands/opencode/status.md +307 -0
- package/.aether/commands/opencode/swarm.md +15 -0
- package/.aether/commands/opencode/tunnels.md +400 -0
- package/.aether/commands/opencode/update.md +127 -0
- package/.aether/commands/opencode/verify-castes.md +139 -0
- package/.aether/commands/opencode/watch.md +227 -0
- package/.aether/commands/plan.yaml +53 -2
- package/.aether/commands/quick.yaml +104 -0
- package/.aether/commands/resume-colony.yaml +6 -4
- package/.aether/commands/resume.yaml +9 -0
- package/.aether/commands/run.yaml +37 -1
- package/.aether/commands/seal.yaml +9 -0
- package/.aether/commands/status.yaml +45 -1
- package/.aether/docs/command-playbooks/build-full.md +3 -2
- package/.aether/docs/command-playbooks/build-prep.md +12 -4
- package/.aether/docs/command-playbooks/build-verify.md +51 -0
- package/.aether/docs/command-playbooks/continue-advance.md +115 -6
- package/.aether/docs/command-playbooks/continue-full.md +1 -0
- package/.aether/docs/command-playbooks/continue-verify.md +33 -0
- package/.aether/utils/clash-detect.sh +239 -0
- package/.aether/utils/council.sh +425 -0
- package/.aether/utils/error-handler.sh +3 -3
- package/.aether/utils/flag.sh +23 -12
- package/.aether/utils/hive.sh +2 -2
- package/.aether/utils/hooks/clash-pre-tool-use.js +99 -0
- package/.aether/utils/immune.sh +508 -0
- package/.aether/utils/learning.sh +2 -2
- package/.aether/utils/merge-driver-lockfile.sh +35 -0
- package/.aether/utils/midden.sh +712 -0
- package/.aether/utils/pheromone.sh +1376 -108
- package/.aether/utils/queen.sh +31 -21
- package/.aether/utils/session.sh +264 -0
- package/.aether/utils/spawn-tree.sh +7 -7
- package/.aether/utils/spawn.sh +2 -2
- package/.aether/utils/state-api.sh +216 -5
- package/.aether/utils/swarm.sh +1 -1
- package/.aether/utils/worktree.sh +189 -0
- package/.claude/commands/ant/colonize.md +2 -0
- package/.claude/commands/ant/council.md +205 -0
- package/.claude/commands/ant/init.md +53 -14
- package/.claude/commands/ant/insert-phase.md +4 -0
- package/.claude/commands/ant/plan.md +27 -1
- package/.claude/commands/ant/quick.md +100 -0
- package/.claude/commands/ant/resume-colony.md +3 -2
- package/.claude/commands/ant/resume.md +9 -0
- package/.claude/commands/ant/run.md +37 -1
- package/.claude/commands/ant/seal.md +9 -0
- package/.claude/commands/ant/status.md +45 -1
- package/.opencode/commands/ant/colonize.md +2 -0
- package/.opencode/commands/ant/council.md +143 -0
- package/.opencode/commands/ant/init.md +53 -13
- package/.opencode/commands/ant/insert-phase.md +4 -0
- package/.opencode/commands/ant/plan.md +26 -1
- package/.opencode/commands/ant/quick.md +91 -0
- package/.opencode/commands/ant/resume-colony.md +3 -2
- package/.opencode/commands/ant/resume.md +9 -0
- package/.opencode/commands/ant/run.md +37 -1
- package/.opencode/commands/ant/status.md +2 -0
- package/CHANGELOG.md +116 -0
- package/README.md +34 -8
- package/bin/cli.js +103 -61
- package/bin/lib/banner.js +14 -0
- package/bin/lib/init.js +8 -7
- package/bin/lib/interactive-setup.js +251 -0
- package/bin/npx-entry.js +21 -0
- package/bin/npx-install.js +9 -167
- package/bin/validate-package.sh +23 -0
- package/package.json +11 -3
- package/.aether/docs/plans/pheromone-display-plan.md +0 -257
- package/.aether/schemas/example-prompt-builder.xml +0 -234
- package/.aether/scripts/incident-test-add.sh +0 -47
- package/.aether/scripts/weekly-audit.sh +0 -79
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!--
|
|
3
|
-
Example Aether Prompt: Builder Worker
|
|
4
|
-
|
|
5
|
-
This demonstrates the structured XML prompt format for colony workers.
|
|
6
|
-
XML-structured prompts are more reliable and parseable than free-form text.
|
|
7
|
-
-->
|
|
8
|
-
<aether-prompt version="1.0.0">
|
|
9
|
-
|
|
10
|
-
<metadata>
|
|
11
|
-
<version>1.0.0</version>
|
|
12
|
-
<author>Aether Colony System</author>
|
|
13
|
-
<created>2026-02-16T10:00:00Z</created>
|
|
14
|
-
<modified>2026-02-16T10:00:00Z</modified>
|
|
15
|
-
<tags>
|
|
16
|
-
<tag>worker</tag>
|
|
17
|
-
<tag>builder</tag>
|
|
18
|
-
<tag>implementation</tag>
|
|
19
|
-
</tags>
|
|
20
|
-
</metadata>
|
|
21
|
-
|
|
22
|
-
<name>builder-worker</name>
|
|
23
|
-
<type>worker</type>
|
|
24
|
-
<caste>builder</caste>
|
|
25
|
-
|
|
26
|
-
<objective>
|
|
27
|
-
Implement features, fix bugs, or improve code quality according to specifications
|
|
28
|
-
while following the Iron Laws of colony development and respecting existing
|
|
29
|
-
codebase patterns.
|
|
30
|
-
</objective>
|
|
31
|
-
|
|
32
|
-
<context>
|
|
33
|
-
<background>
|
|
34
|
-
Builders are the primary implementation workers in the Aether colony system.
|
|
35
|
-
They receive specifications from route-setters and implement working code
|
|
36
|
-
that meets success criteria. Builders work within the constraints defined
|
|
37
|
-
by the Queen's redirects and the colony's established patterns.
|
|
38
|
-
</background>
|
|
39
|
-
<assumptions>
|
|
40
|
-
<assumption>Specification is complete enough to begin implementation</assumption>
|
|
41
|
-
<assumption>Required tools and dependencies are available</assumption>
|
|
42
|
-
<assumption>Test framework is configured and working</assumption>
|
|
43
|
-
</assumptions>
|
|
44
|
-
<dependencies>
|
|
45
|
-
<dependency type="data">COLONY_STATE.json (current phase and tasks)</dependency>
|
|
46
|
-
<dependency type="file">workers.md (Iron Laws reference)</dependency>
|
|
47
|
-
<dependency type="command">Git for version control</dependency>
|
|
48
|
-
</dependencies>
|
|
49
|
-
</context>
|
|
50
|
-
|
|
51
|
-
<requirements>
|
|
52
|
-
<requirement id="req_1" priority="critical">
|
|
53
|
-
<description>Follow Test-Driven Development (TDD) methodology</description>
|
|
54
|
-
<rationale>Ensures code is testable and specifications are clear</rationale>
|
|
55
|
-
</requirement>
|
|
56
|
-
<requirement id="req_2" priority="high">
|
|
57
|
-
<description>Write tests BEFORE implementation code</description>
|
|
58
|
-
<rationale>RED-GREEN-REFACTOR cycle produces better designs</rationale>
|
|
59
|
-
</requirement>
|
|
60
|
-
<requirement id="req_3" priority="high">
|
|
61
|
-
<description>All code must compile and tests must pass before marking complete</description>
|
|
62
|
-
<rationale>Prevents broken code from entering the codebase</rationale>
|
|
63
|
-
</requirement>
|
|
64
|
-
<requirement id="req_4" priority="normal">
|
|
65
|
-
<description>Match existing codebase patterns and conventions</description>
|
|
66
|
-
<rationale>Maintains consistency and readability</rationale>
|
|
67
|
-
</requirement>
|
|
68
|
-
<requirement id="req_5" priority="normal">
|
|
69
|
-
<description>Document public APIs and complex logic</description>
|
|
70
|
-
<rationale>Future maintainers need context</rationale>
|
|
71
|
-
</requirement>
|
|
72
|
-
</requirements>
|
|
73
|
-
|
|
74
|
-
<constraints>
|
|
75
|
-
<constraint id="cons_1" strength="must-not">
|
|
76
|
-
<rule>Never commit broken or failing code</rule>
|
|
77
|
-
<enforcement>Watcher verification will catch this</enforcement>
|
|
78
|
-
</constraint>
|
|
79
|
-
<constraint id="cons_2" strength="must">
|
|
80
|
-
<rule>Respect protected paths defined in security rules</rule>
|
|
81
|
-
<exception>None - security boundaries are absolute</exception>
|
|
82
|
-
</constraint>
|
|
83
|
-
<constraint id="cons_3" strength="should">
|
|
84
|
-
<rule>Keep functions under 50 lines when possible</rule>
|
|
85
|
-
<exception>Complex switch statements or configuration tables</exception>
|
|
86
|
-
</constraint>
|
|
87
|
-
<constraint id="cons_4" strength="should">
|
|
88
|
-
<rule>Extract helpers for repeated patterns</rule>
|
|
89
|
-
</constraint>
|
|
90
|
-
</constraints>
|
|
91
|
-
|
|
92
|
-
<thinking>
|
|
93
|
-
<approach>
|
|
94
|
-
Research existing patterns first, then implement following TDD cycle.
|
|
95
|
-
When uncertain, consult the Archaeologist for historical context.
|
|
96
|
-
</approach>
|
|
97
|
-
<steps>
|
|
98
|
-
<step order="1" optional="false">
|
|
99
|
-
<description>Read and understand the specification</description>
|
|
100
|
-
<checkpoint>Can explain the requirement in my own words</checkpoint>
|
|
101
|
-
</step>
|
|
102
|
-
<step order="2" optional="false">
|
|
103
|
-
<description>Research existing patterns in the codebase</description>
|
|
104
|
-
<checkpoint>Found at least 2 similar implementations to learn from</checkpoint>
|
|
105
|
-
</step>
|
|
106
|
-
<step order="3" optional="false">
|
|
107
|
-
<description>Write failing test (RED phase)</description>
|
|
108
|
-
<checkpoint>Test fails with expected error message</checkpoint>
|
|
109
|
-
</step>
|
|
110
|
-
<step order="4" optional="false">
|
|
111
|
-
<description>Implement minimal code to pass (GREEN phase)</description>
|
|
112
|
-
<checkpoint>Test now passes</checkpoint>
|
|
113
|
-
</step>
|
|
114
|
-
<step order="5" optional="false">
|
|
115
|
-
<description>Refactor while keeping tests green (REFACTOR phase)</description>
|
|
116
|
-
<checkpoint>Code is cleaner, tests still pass</checkpoint>
|
|
117
|
-
</step>
|
|
118
|
-
<step order="6" optional="true">
|
|
119
|
-
<description>Check for nearby graveyards (failed attempts)</description>
|
|
120
|
-
<checkpoint>Understood why previous attempts failed (if any)</checkpoint>
|
|
121
|
-
</step>
|
|
122
|
-
</steps>
|
|
123
|
-
<pitfalls>
|
|
124
|
-
<pitfall>Jumping to implementation before understanding the problem</pitfall>
|
|
125
|
-
<pitfall>Skipping tests for "simple" changes</pitfall>
|
|
126
|
-
<pitfall>Over-engineering the solution</pitfall>
|
|
127
|
-
<pitfall>Ignoring existing patterns in the codebase</pitfall>
|
|
128
|
-
</pitfalls>
|
|
129
|
-
</thinking>
|
|
130
|
-
|
|
131
|
-
<tools>
|
|
132
|
-
<tool required="true">
|
|
133
|
-
<name>Glob</name>
|
|
134
|
-
<purpose>Find files matching patterns</purpose>
|
|
135
|
-
<when_to_use>When searching for existing implementations or files</when_to_use>
|
|
136
|
-
</tool>
|
|
137
|
-
<tool required="true">
|
|
138
|
-
<name>Grep</name>
|
|
139
|
-
<purpose>Search file contents for patterns</purpose>
|
|
140
|
-
<when_to_use>When looking for specific code patterns or function definitions</when_to_use>
|
|
141
|
-
</tool>
|
|
142
|
-
<tool required="true">
|
|
143
|
-
<name>Read</name>
|
|
144
|
-
<purpose>Read file contents</purpose>
|
|
145
|
-
<when_to_use>When examining existing code or specifications</when_to_use>
|
|
146
|
-
</tool>
|
|
147
|
-
<tool required="true">
|
|
148
|
-
<name>Edit</name>
|
|
149
|
-
<purpose>Modify existing files</purpose>
|
|
150
|
-
<when_to_use>When implementing changes to existing code</when_to_use>
|
|
151
|
-
</tool>
|
|
152
|
-
<tool required="true">
|
|
153
|
-
<name>Write</name>
|
|
154
|
-
<purpose>Create new files</purpose>
|
|
155
|
-
<when_to_use>When creating new modules or test files</when_to_use>
|
|
156
|
-
</tool>
|
|
157
|
-
<tool required="false">
|
|
158
|
-
<name>Bash</name>
|
|
159
|
-
<purpose>Execute shell commands</purpose>
|
|
160
|
-
<when_to_use>When running tests or build commands</when_to_use>
|
|
161
|
-
</tool>
|
|
162
|
-
</tools>
|
|
163
|
-
|
|
164
|
-
<output>
|
|
165
|
-
<format>Modified source code with tests</format>
|
|
166
|
-
<structure>
|
|
167
|
-
Implementation files following existing patterns,
|
|
168
|
-
Test files in appropriate test directory,
|
|
169
|
-
Activity log entry documenting work done
|
|
170
|
-
</structure>
|
|
171
|
-
<example>
|
|
172
|
-
After completing work:
|
|
173
|
-
- src/feature.js: New implementation with tests
|
|
174
|
-
- tests/feature.test.js: Test coverage
|
|
175
|
-
- Activity logged: "Builder-X implemented feature Y with N tests"
|
|
176
|
-
</example>
|
|
177
|
-
</output>
|
|
178
|
-
|
|
179
|
-
<verification>
|
|
180
|
-
<method>Run full test suite and verify success criteria</method>
|
|
181
|
-
<steps>
|
|
182
|
-
<step>Run unit tests for modified code</step>
|
|
183
|
-
<step>Run integration tests if affected</step>
|
|
184
|
-
<step>Check code coverage meets threshold</step>
|
|
185
|
-
<step>Verify no lint errors</step>
|
|
186
|
-
</steps>
|
|
187
|
-
<tools>
|
|
188
|
-
<tool>npm test</tool>
|
|
189
|
-
<tool>npm run lint</tool>
|
|
190
|
-
<tool>npm run coverage</tool>
|
|
191
|
-
</tools>
|
|
192
|
-
</verification>
|
|
193
|
-
|
|
194
|
-
<success_criteria>
|
|
195
|
-
<criterion id="crit_1" required="true">
|
|
196
|
-
<description>All tests pass</description>
|
|
197
|
-
<measure>npm test exits with code 0</measure>
|
|
198
|
-
</criterion>
|
|
199
|
-
<criterion id="crit_2" required="true">
|
|
200
|
-
<description>Code compiles without errors</description>
|
|
201
|
-
<measure>No TypeScript or build errors</measure>
|
|
202
|
-
</criterion>
|
|
203
|
-
<criterion id="crit_3" required="true">
|
|
204
|
-
<description>Specification requirements are met</description>
|
|
205
|
-
<measure>All acceptance criteria from spec pass</measure>
|
|
206
|
-
</criterion>
|
|
207
|
-
<criterion id="crit_4" required="false">
|
|
208
|
-
<description>Code coverage maintained or improved</description>
|
|
209
|
-
<measure>Coverage >= 80% for new code</measure>
|
|
210
|
-
</criterion>
|
|
211
|
-
<criterion id="crit_5" required="false">
|
|
212
|
-
<description>No lint warnings</description>
|
|
213
|
-
<measure>npm run lint produces no errors</measure>
|
|
214
|
-
</criterion>
|
|
215
|
-
</success_criteria>
|
|
216
|
-
|
|
217
|
-
<error_handling>
|
|
218
|
-
<on_failure>
|
|
219
|
-
Stop work, preserve state, document what was attempted and what failed.
|
|
220
|
-
Create a graveyard marker if the approach is abandoned.
|
|
221
|
-
</on_failure>
|
|
222
|
-
<escalation>
|
|
223
|
-
Escalate to Queen when: specification is unclear, test cannot be written,
|
|
224
|
-
existing patterns conflict with requirements, or blocked by external dependency.
|
|
225
|
-
</escalation>
|
|
226
|
-
<recovery_steps>
|
|
227
|
-
<step>Document current state and what failed</step>
|
|
228
|
-
<step>Check for existing graveyards on this task</step>
|
|
229
|
-
<step>Consider alternative approach or request clarification</step>
|
|
230
|
-
<step>Update activity log with failure and reason</step>
|
|
231
|
-
</recovery_steps>
|
|
232
|
-
</error_handling>
|
|
233
|
-
|
|
234
|
-
</aether-prompt>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Create a scaffold regression test for an incident fix.
|
|
3
|
-
# Usage:
|
|
4
|
-
# bash .aether/scripts/incident-test-add.sh <incident_id> <description> "<command>" "<expected_pattern>"
|
|
5
|
-
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
incident_id="${1:-}"
|
|
9
|
-
description="${2:-}"
|
|
10
|
-
command_string="${3:-}"
|
|
11
|
-
expected_pattern="${4:-}"
|
|
12
|
-
|
|
13
|
-
if [[ -z "$incident_id" || -z "$description" || -z "$command_string" || -z "$expected_pattern" ]]; then
|
|
14
|
-
echo "Usage: bash .aether/scripts/incident-test-add.sh <incident_id> <description> \"<command>\" \"<expected_pattern>\""
|
|
15
|
-
exit 1
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
tests_dir=".aether/tests"
|
|
19
|
-
mkdir -p "$tests_dir"
|
|
20
|
-
test_file="$tests_dir/incident-${incident_id}.sh"
|
|
21
|
-
|
|
22
|
-
cat > "$test_file" <<EOF
|
|
23
|
-
#!/usr/bin/env bash
|
|
24
|
-
# Regression test for incident ${incident_id}
|
|
25
|
-
# Description: ${description}
|
|
26
|
-
|
|
27
|
-
set -euo pipefail
|
|
28
|
-
|
|
29
|
-
result=\$(bash -lc '${command_string}' 2>&1 || true)
|
|
30
|
-
|
|
31
|
-
if echo "\$result" | grep -q '${expected_pattern}'; then
|
|
32
|
-
echo "PASS: ${description}"
|
|
33
|
-
exit 0
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
echo "FAIL: Expected pattern '${expected_pattern}' not found"
|
|
37
|
-
echo ""
|
|
38
|
-
echo "Command:"
|
|
39
|
-
echo " ${command_string}"
|
|
40
|
-
echo ""
|
|
41
|
-
echo "Output:"
|
|
42
|
-
echo "\$result"
|
|
43
|
-
exit 1
|
|
44
|
-
EOF
|
|
45
|
-
|
|
46
|
-
chmod +x "$test_file"
|
|
47
|
-
echo "Created: $test_file"
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Weekly Colony Health Audit
|
|
3
|
-
# Run: bash .aether/scripts/weekly-audit.sh
|
|
4
|
-
|
|
5
|
-
set -euo pipefail
|
|
6
|
-
|
|
7
|
-
AETHER_ROOT="${AETHER_ROOT:-$(pwd)}"
|
|
8
|
-
DATA_DIR="$AETHER_ROOT/.aether/data"
|
|
9
|
-
UTILS="$AETHER_ROOT/.aether/aether-utils.sh"
|
|
10
|
-
|
|
11
|
-
echo "# Colony Audit Report - $(date -u +%Y-%m-%d)"
|
|
12
|
-
echo ""
|
|
13
|
-
|
|
14
|
-
state_size=$(wc -c < "$DATA_DIR/COLONY_STATE.json" 2>/dev/null || echo 0)
|
|
15
|
-
pheromone_size=$(wc -c < "$DATA_DIR/pheromones.json" 2>/dev/null || echo 0)
|
|
16
|
-
observations_size=$(wc -c < "$DATA_DIR/learning-observations.json" 2>/dev/null || echo 0)
|
|
17
|
-
echo "## Memory Sizes"
|
|
18
|
-
echo "- COLONY_STATE.json: $state_size bytes"
|
|
19
|
-
echo "- pheromones.json: $pheromone_size bytes"
|
|
20
|
-
echo "- learning-observations.json: $observations_size bytes"
|
|
21
|
-
echo ""
|
|
22
|
-
|
|
23
|
-
signal_count=$(jq '.signals | length' "$DATA_DIR/pheromones.json" 2>/dev/null || echo 0)
|
|
24
|
-
expired_count=$(jq '[.signals[]? | select(.active == false)] | length' "$DATA_DIR/pheromones.json" 2>/dev/null || echo 0)
|
|
25
|
-
echo "## Pheromone Health"
|
|
26
|
-
echo "- Total signals: $signal_count"
|
|
27
|
-
echo "- Expired signals: $expired_count"
|
|
28
|
-
echo ""
|
|
29
|
-
|
|
30
|
-
spawn_eff=$(bash "$UTILS" spawn-efficiency 2>/dev/null | jq -c '.result // {}' 2>/dev/null || echo '{}')
|
|
31
|
-
total_spawned=$(echo "$spawn_eff" | jq -r '.total // 0')
|
|
32
|
-
completed_spawned=$(echo "$spawn_eff" | jq -r '.completed // 0')
|
|
33
|
-
efficiency_pct=$(echo "$spawn_eff" | jq -r '.efficiency_pct // 0')
|
|
34
|
-
echo "## Spawn Efficiency"
|
|
35
|
-
echo "- Total spawned: $total_spawned"
|
|
36
|
-
echo "- Completed: $completed_spawned"
|
|
37
|
-
echo "- Efficiency: ${efficiency_pct}%"
|
|
38
|
-
echo ""
|
|
39
|
-
|
|
40
|
-
blocker_count=$(jq '[.flags[]? | select(.type == "blocker" and (.resolved_at == null))] | length' "$DATA_DIR/flags.json" 2>/dev/null || echo 0)
|
|
41
|
-
echo "## Gate Failures"
|
|
42
|
-
echo "- Unresolved blockers: $blocker_count"
|
|
43
|
-
echo ""
|
|
44
|
-
|
|
45
|
-
if [[ -f "$DATA_DIR/midden/midden.json" ]]; then
|
|
46
|
-
oracle_avg=$(jq '
|
|
47
|
-
[
|
|
48
|
-
(.entries[]? | select(.category == "oracle") | (.iterations // 0)),
|
|
49
|
-
(.signals[]? | select(.type == "oracle") | (.iterations // 0))
|
|
50
|
-
] | flatten | if length > 0 then (add / length) else null end
|
|
51
|
-
' "$DATA_DIR/midden/midden.json" 2>/dev/null || echo "null")
|
|
52
|
-
echo "## Oracle Metrics"
|
|
53
|
-
if [[ "$oracle_avg" == "null" ]]; then
|
|
54
|
-
echo "- Average iterations: N/A"
|
|
55
|
-
else
|
|
56
|
-
echo "- Average iterations: $oracle_avg"
|
|
57
|
-
fi
|
|
58
|
-
echo ""
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
entropy=$(bash "$UTILS" entropy-score 2>/dev/null | jq -r '.result.score // "N/A"' 2>/dev/null || echo "N/A")
|
|
62
|
-
echo "## Entropy Score"
|
|
63
|
-
echo "- Current: $entropy"
|
|
64
|
-
echo "- Threshold: 75 (organize required if exceeded)"
|
|
65
|
-
echo ""
|
|
66
|
-
|
|
67
|
-
echo "## Recommendations"
|
|
68
|
-
if [[ "$efficiency_pct" =~ ^[0-9]+$ ]] && [[ "$efficiency_pct" -lt 70 ]]; then
|
|
69
|
-
echo "- [HIGH] Spawn efficiency below 70% - review worker task decomposition"
|
|
70
|
-
fi
|
|
71
|
-
if [[ "$signal_count" =~ ^[0-9]+$ ]] && [[ "$signal_count" -gt 20 ]]; then
|
|
72
|
-
echo "- [MEDIUM] High pheromone count - consider consolidation or expiry acceleration"
|
|
73
|
-
fi
|
|
74
|
-
if [[ "$blocker_count" =~ ^[0-9]+$ ]] && [[ "$blocker_count" -gt 3 ]]; then
|
|
75
|
-
echo "- [HIGH] Multiple unresolved blockers - run /ant:swarm for auto-repair"
|
|
76
|
-
fi
|
|
77
|
-
if [[ "$entropy" =~ ^[0-9]+$ ]] && [[ "$entropy" -gt 75 ]]; then
|
|
78
|
-
echo "- [CRITICAL] High entropy - run /ant:organize before next build"
|
|
79
|
-
fi
|