aether-colony 1.1.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 (207) hide show
  1. package/.aether/CONTEXT.md +160 -0
  2. package/.aether/QUEEN.md +84 -0
  3. package/.aether/aether-utils.sh +7749 -0
  4. package/.aether/docs/QUEEN-SYSTEM.md +211 -0
  5. package/.aether/docs/README.md +68 -0
  6. package/.aether/docs/caste-system.md +48 -0
  7. package/.aether/docs/disciplines/DISCIPLINES.md +93 -0
  8. package/.aether/docs/disciplines/coding-standards.md +197 -0
  9. package/.aether/docs/disciplines/debugging.md +207 -0
  10. package/.aether/docs/disciplines/learning.md +254 -0
  11. package/.aether/docs/disciplines/tdd.md +257 -0
  12. package/.aether/docs/disciplines/verification-loop.md +167 -0
  13. package/.aether/docs/disciplines/verification.md +116 -0
  14. package/.aether/docs/error-codes.md +268 -0
  15. package/.aether/docs/known-issues.md +233 -0
  16. package/.aether/docs/pheromones.md +205 -0
  17. package/.aether/docs/queen-commands.md +97 -0
  18. package/.aether/exchange/colony-registry.xml +11 -0
  19. package/.aether/exchange/pheromone-xml.sh +575 -0
  20. package/.aether/exchange/pheromones.xml +87 -0
  21. package/.aether/exchange/queen-wisdom.xml +14 -0
  22. package/.aether/exchange/registry-xml.sh +273 -0
  23. package/.aether/exchange/wisdom-xml.sh +319 -0
  24. package/.aether/midden/approach-changes.md +5 -0
  25. package/.aether/midden/build-failures.md +5 -0
  26. package/.aether/midden/test-failures.md +5 -0
  27. package/.aether/model-profiles.yaml +100 -0
  28. package/.aether/rules/aether-colony.md +134 -0
  29. package/.aether/schemas/aether-types.xsd +255 -0
  30. package/.aether/schemas/colony-registry.xsd +309 -0
  31. package/.aether/schemas/example-prompt-builder.xml +234 -0
  32. package/.aether/schemas/pheromone.xsd +163 -0
  33. package/.aether/schemas/prompt.xsd +416 -0
  34. package/.aether/schemas/queen-wisdom.xsd +325 -0
  35. package/.aether/schemas/worker-priming.xsd +276 -0
  36. package/.aether/templates/QUEEN.md.template +79 -0
  37. package/.aether/templates/colony-state-reset.jq.template +22 -0
  38. package/.aether/templates/colony-state.template.json +35 -0
  39. package/.aether/templates/constraints.template.json +9 -0
  40. package/.aether/templates/crowned-anthill.template.md +36 -0
  41. package/.aether/templates/handoff-build-error.template.md +30 -0
  42. package/.aether/templates/handoff-build-success.template.md +39 -0
  43. package/.aether/templates/handoff.template.md +40 -0
  44. package/.aether/templates/learning-observations.template.json +6 -0
  45. package/.aether/templates/midden.template.json +7 -0
  46. package/.aether/templates/pheromones.template.json +6 -0
  47. package/.aether/templates/session.template.json +9 -0
  48. package/.aether/utils/atomic-write.sh +219 -0
  49. package/.aether/utils/chamber-compare.sh +193 -0
  50. package/.aether/utils/chamber-utils.sh +297 -0
  51. package/.aether/utils/colorize-log.sh +132 -0
  52. package/.aether/utils/error-handler.sh +212 -0
  53. package/.aether/utils/file-lock.sh +158 -0
  54. package/.aether/utils/queen-to-md.xsl +395 -0
  55. package/.aether/utils/semantic-cli.sh +413 -0
  56. package/.aether/utils/spawn-tree.sh +428 -0
  57. package/.aether/utils/spawn-with-model.sh +56 -0
  58. package/.aether/utils/state-loader.sh +215 -0
  59. package/.aether/utils/swarm-display.sh +268 -0
  60. package/.aether/utils/watch-spawn-tree.sh +253 -0
  61. package/.aether/utils/xml-compose.sh +253 -0
  62. package/.aether/utils/xml-convert.sh +273 -0
  63. package/.aether/utils/xml-core.sh +186 -0
  64. package/.aether/utils/xml-query.sh +201 -0
  65. package/.aether/utils/xml-utils.sh +110 -0
  66. package/.aether/workers.md +765 -0
  67. package/.claude/agents/ant/aether-ambassador.md +264 -0
  68. package/.claude/agents/ant/aether-archaeologist.md +322 -0
  69. package/.claude/agents/ant/aether-auditor.md +266 -0
  70. package/.claude/agents/ant/aether-builder.md +187 -0
  71. package/.claude/agents/ant/aether-chaos.md +268 -0
  72. package/.claude/agents/ant/aether-chronicler.md +304 -0
  73. package/.claude/agents/ant/aether-gatekeeper.md +325 -0
  74. package/.claude/agents/ant/aether-includer.md +373 -0
  75. package/.claude/agents/ant/aether-keeper.md +271 -0
  76. package/.claude/agents/ant/aether-measurer.md +317 -0
  77. package/.claude/agents/ant/aether-probe.md +210 -0
  78. package/.claude/agents/ant/aether-queen.md +325 -0
  79. package/.claude/agents/ant/aether-route-setter.md +173 -0
  80. package/.claude/agents/ant/aether-sage.md +353 -0
  81. package/.claude/agents/ant/aether-scout.md +142 -0
  82. package/.claude/agents/ant/aether-surveyor-disciplines.md +416 -0
  83. package/.claude/agents/ant/aether-surveyor-nest.md +354 -0
  84. package/.claude/agents/ant/aether-surveyor-pathogens.md +288 -0
  85. package/.claude/agents/ant/aether-surveyor-provisions.md +359 -0
  86. package/.claude/agents/ant/aether-tracker.md +265 -0
  87. package/.claude/agents/ant/aether-watcher.md +244 -0
  88. package/.claude/agents/ant/aether-weaver.md +247 -0
  89. package/.claude/commands/ant/archaeology.md +341 -0
  90. package/.claude/commands/ant/build.md +1160 -0
  91. package/.claude/commands/ant/chaos.md +349 -0
  92. package/.claude/commands/ant/colonize.md +270 -0
  93. package/.claude/commands/ant/continue.md +1070 -0
  94. package/.claude/commands/ant/council.md +309 -0
  95. package/.claude/commands/ant/dream.md +265 -0
  96. package/.claude/commands/ant/entomb.md +487 -0
  97. package/.claude/commands/ant/feedback.md +78 -0
  98. package/.claude/commands/ant/flag.md +139 -0
  99. package/.claude/commands/ant/flags.md +155 -0
  100. package/.claude/commands/ant/focus.md +58 -0
  101. package/.claude/commands/ant/help.md +122 -0
  102. package/.claude/commands/ant/history.md +137 -0
  103. package/.claude/commands/ant/init.md +409 -0
  104. package/.claude/commands/ant/interpret.md +267 -0
  105. package/.claude/commands/ant/lay-eggs.md +201 -0
  106. package/.claude/commands/ant/maturity.md +102 -0
  107. package/.claude/commands/ant/memory-details.md +77 -0
  108. package/.claude/commands/ant/migrate-state.md +165 -0
  109. package/.claude/commands/ant/oracle.md +387 -0
  110. package/.claude/commands/ant/organize.md +227 -0
  111. package/.claude/commands/ant/pause-colony.md +247 -0
  112. package/.claude/commands/ant/phase.md +126 -0
  113. package/.claude/commands/ant/plan.md +544 -0
  114. package/.claude/commands/ant/redirect.md +58 -0
  115. package/.claude/commands/ant/resume-colony.md +182 -0
  116. package/.claude/commands/ant/resume.md +363 -0
  117. package/.claude/commands/ant/seal.md +306 -0
  118. package/.claude/commands/ant/status.md +272 -0
  119. package/.claude/commands/ant/swarm.md +361 -0
  120. package/.claude/commands/ant/tunnels.md +425 -0
  121. package/.claude/commands/ant/update.md +209 -0
  122. package/.claude/commands/ant/verify-castes.md +95 -0
  123. package/.claude/commands/ant/watch.md +238 -0
  124. package/.opencode/agents/aether-ambassador.md +140 -0
  125. package/.opencode/agents/aether-archaeologist.md +108 -0
  126. package/.opencode/agents/aether-auditor.md +144 -0
  127. package/.opencode/agents/aether-builder.md +184 -0
  128. package/.opencode/agents/aether-chaos.md +115 -0
  129. package/.opencode/agents/aether-chronicler.md +122 -0
  130. package/.opencode/agents/aether-gatekeeper.md +116 -0
  131. package/.opencode/agents/aether-includer.md +117 -0
  132. package/.opencode/agents/aether-keeper.md +177 -0
  133. package/.opencode/agents/aether-measurer.md +128 -0
  134. package/.opencode/agents/aether-probe.md +133 -0
  135. package/.opencode/agents/aether-queen.md +286 -0
  136. package/.opencode/agents/aether-route-setter.md +130 -0
  137. package/.opencode/agents/aether-sage.md +106 -0
  138. package/.opencode/agents/aether-scout.md +101 -0
  139. package/.opencode/agents/aether-surveyor-disciplines.md +386 -0
  140. package/.opencode/agents/aether-surveyor-nest.md +324 -0
  141. package/.opencode/agents/aether-surveyor-pathogens.md +259 -0
  142. package/.opencode/agents/aether-surveyor-provisions.md +329 -0
  143. package/.opencode/agents/aether-tracker.md +137 -0
  144. package/.opencode/agents/aether-watcher.md +174 -0
  145. package/.opencode/agents/aether-weaver.md +130 -0
  146. package/.opencode/commands/ant/archaeology.md +338 -0
  147. package/.opencode/commands/ant/build.md +1200 -0
  148. package/.opencode/commands/ant/chaos.md +346 -0
  149. package/.opencode/commands/ant/colonize.md +202 -0
  150. package/.opencode/commands/ant/continue.md +938 -0
  151. package/.opencode/commands/ant/council.md +305 -0
  152. package/.opencode/commands/ant/dream.md +262 -0
  153. package/.opencode/commands/ant/entomb.md +367 -0
  154. package/.opencode/commands/ant/feedback.md +80 -0
  155. package/.opencode/commands/ant/flag.md +137 -0
  156. package/.opencode/commands/ant/flags.md +153 -0
  157. package/.opencode/commands/ant/focus.md +56 -0
  158. package/.opencode/commands/ant/help.md +124 -0
  159. package/.opencode/commands/ant/history.md +127 -0
  160. package/.opencode/commands/ant/init.md +337 -0
  161. package/.opencode/commands/ant/interpret.md +256 -0
  162. package/.opencode/commands/ant/lay-eggs.md +141 -0
  163. package/.opencode/commands/ant/maturity.md +92 -0
  164. package/.opencode/commands/ant/memory-details.md +77 -0
  165. package/.opencode/commands/ant/migrate-state.md +153 -0
  166. package/.opencode/commands/ant/oracle.md +338 -0
  167. package/.opencode/commands/ant/organize.md +224 -0
  168. package/.opencode/commands/ant/pause-colony.md +220 -0
  169. package/.opencode/commands/ant/phase.md +123 -0
  170. package/.opencode/commands/ant/plan.md +531 -0
  171. package/.opencode/commands/ant/redirect.md +67 -0
  172. package/.opencode/commands/ant/resume-colony.md +178 -0
  173. package/.opencode/commands/ant/resume.md +363 -0
  174. package/.opencode/commands/ant/seal.md +247 -0
  175. package/.opencode/commands/ant/status.md +272 -0
  176. package/.opencode/commands/ant/swarm.md +357 -0
  177. package/.opencode/commands/ant/tunnels.md +406 -0
  178. package/.opencode/commands/ant/update.md +191 -0
  179. package/.opencode/commands/ant/verify-castes.md +85 -0
  180. package/.opencode/commands/ant/watch.md +220 -0
  181. package/.opencode/opencode.json +3 -0
  182. package/CHANGELOG.md +325 -0
  183. package/DISCLAIMER.md +74 -0
  184. package/LICENSE +21 -0
  185. package/README.md +258 -0
  186. package/bin/cli.js +2436 -0
  187. package/bin/generate-commands.sh +291 -0
  188. package/bin/lib/caste-colors.js +57 -0
  189. package/bin/lib/colors.js +76 -0
  190. package/bin/lib/errors.js +255 -0
  191. package/bin/lib/event-types.js +190 -0
  192. package/bin/lib/file-lock.js +695 -0
  193. package/bin/lib/init.js +454 -0
  194. package/bin/lib/logger.js +242 -0
  195. package/bin/lib/model-profiles.js +445 -0
  196. package/bin/lib/model-verify.js +288 -0
  197. package/bin/lib/nestmate-loader.js +130 -0
  198. package/bin/lib/proxy-health.js +253 -0
  199. package/bin/lib/spawn-logger.js +266 -0
  200. package/bin/lib/state-guard.js +602 -0
  201. package/bin/lib/state-sync.js +516 -0
  202. package/bin/lib/telemetry.js +441 -0
  203. package/bin/lib/update-transaction.js +1454 -0
  204. package/bin/npx-install.js +178 -0
  205. package/bin/sync-to-runtime.sh +6 -0
  206. package/bin/validate-package.sh +88 -0
  207. package/package.json +70 -0
@@ -0,0 +1,211 @@
1
+ # QUEEN.md System
2
+
3
+ The QUEEN.md system is Aether's wisdom feedback loop - a mechanism for capturing, validating, and propagating learnings across colonies.
4
+
5
+ ## Overview
6
+
7
+ The Queen represents the accumulation of validated knowledge from all colonies. As colonies complete work, they promote significant patterns, decisions, and insights to QUEEN.md. Future colonies can then read this wisdom to benefit from previous experience.
8
+
9
+ ## File Location
10
+
11
+ ```
12
+ .aether/docs/QUEEN.md
13
+ ```
14
+
15
+ ## Structure
16
+
17
+ ### 📜 Philosophies
18
+
19
+ Core beliefs validated through repeated successful application across multiple colonies.
20
+
21
+ **Threshold:** 5 successful validations required for promotion
22
+
23
+ Example:
24
+ ```markdown
25
+ - **colony-name** (2026-02-15T13:08:24Z): Test-driven development ensures quality
26
+ ```
27
+
28
+ ### 🧭 Patterns
29
+
30
+ Validated approaches that consistently work. These represent discovered best practices.
31
+
32
+ **Threshold:** 3 successful validations required for promotion
33
+
34
+ Example:
35
+ ```markdown
36
+ - **colony-name** (2026-02-15T13:08:28Z): Always validate inputs
37
+ ```
38
+
39
+ ### ⚠️ Redirects
40
+
41
+ Anti-patterns to avoid. Approaches that have caused problems.
42
+
43
+ **Threshold:** 2 failed validations required for promotion
44
+
45
+ Example:
46
+ ```markdown
47
+ - **colony-name** (2026-02-15T13:08:31Z): Never skip security checks
48
+ ```
49
+
50
+ ### 🔧 Stack Wisdom
51
+
52
+ Technology-specific insights detected through codebase analysis.
53
+
54
+ **Threshold:** 1 validation required for promotion
55
+
56
+ Example:
57
+ ```markdown
58
+ - **colony-name** (2026-02-15T13:08:36Z): Use jq for JSON in bash
59
+ ```
60
+
61
+ ### 🏛️ Decrees
62
+
63
+ User-mandated rules that override other guidance.
64
+
65
+ **Threshold:** 0 validations required (immediate promotion)
66
+
67
+ Example:
68
+ ```markdown
69
+ - **colony-name** (2026-02-15T13:08:40Z): All code must have tests
70
+ ```
71
+
72
+ ### 📊 Evolution Log
73
+
74
+ Track how wisdom has evolved over time.
75
+
76
+ ## Commands
77
+
78
+ ### queen-init
79
+
80
+ Initialize QUEEN.md from template if it doesn't exist.
81
+
82
+ ```bash
83
+ bash .aether/aether-utils.sh queen-init
84
+ ```
85
+
86
+ **Returns:**
87
+ ```json
88
+ {"created": true, "path": ".aether/docs/QUEEN.md", "source": "~/.aether/system/templates/QUEEN.md.template"}
89
+ ```
90
+
91
+ ### queen-read
92
+
93
+ Read QUEEN.md and return wisdom as JSON for worker priming.
94
+
95
+ ```bash
96
+ bash .aether/aether-utils.sh queen-read
97
+ ```
98
+
99
+ **Returns:**
100
+ ```json
101
+ {
102
+ "metadata": {
103
+ "version": "1.0.0",
104
+ "last_evolved": "2026-02-15T13:08:40Z",
105
+ "colonies_contributed": ["colony-a"],
106
+ "promotion_thresholds": {...},
107
+ "stats": {...}
108
+ },
109
+ "wisdom": {
110
+ "philosophies": "...",
111
+ "patterns": "...",
112
+ "redirects": "...",
113
+ "stack_wisdom": "...",
114
+ "decrees": "..."
115
+ },
116
+ "priming": {
117
+ "has_philosophies": true,
118
+ "has_patterns": true,
119
+ ...
120
+ }
121
+ }
122
+ ```
123
+
124
+ ### queen-promote
125
+
126
+ Promote a learning to QUEEN.md wisdom.
127
+
128
+ ```bash
129
+ bash .aether/aether-utils.sh queen-promote <type> <content> <colony_name>
130
+ ```
131
+
132
+ **Types:** `philosophy`, `pattern`, `redirect`, `stack`, `decree`
133
+
134
+ **Example:**
135
+ ```bash
136
+ bash .aether/aether-utils.sh queen-promote pattern "Always validate inputs" "my-colony"
137
+ ```
138
+
139
+ ## Integration with Commands
140
+
141
+ ### init.md
142
+
143
+ Calls `queen-init` after bootstrap to ensure QUEEN.md exists for the colony.
144
+
145
+ ### build.md
146
+
147
+ Calls `queen-read` before spawning workers to inject wisdom into worker prompts.
148
+
149
+ ### continue.md
150
+
151
+ After verification, promotes validated learnings to QUEEN.md using `queen-promote`.
152
+
153
+ ### seal.md
154
+
155
+ Before archiving, promotes significant patterns and decisions to QUEEN.md.
156
+
157
+ ### entomb.md
158
+
159
+ Before creating the chamber, promotes validated learnings to QUEEN.md.
160
+
161
+ ## Promotion Thresholds
162
+
163
+ | Type | Threshold | Rationale |
164
+ |------|-----------|-----------|
165
+ | Philosophy | 5 | Core beliefs need strongest validation |
166
+ | Pattern | 3 | Best practices need multiple confirmations |
167
+ | Redirect | 2 | Anti-patterns need fewer failures to document |
168
+ | Stack | 1 | Tech insights are domain-specific |
169
+ | Decree | 0 | User mandates are immediate |
170
+
171
+ ## Metadata
172
+
173
+ The QUEEN.md file includes a METADATA block at the end:
174
+
175
+ ```html
176
+ <!-- METADATA
177
+ {
178
+ "version": "1.0.0",
179
+ "last_evolved": "2026-02-15T13:08:40Z",
180
+ "colonies_contributed": ["colony-a"],
181
+ "promotion_thresholds": {
182
+ "philosophy": 5,
183
+ "pattern": 3,
184
+ "redirect": 2,
185
+ "stack": 1,
186
+ "decree": 0
187
+ },
188
+ "stats": {
189
+ "total_philosophies": 1,
190
+ "total_patterns": 1,
191
+ ...
192
+ }
193
+ }
194
+ -->
195
+ ```
196
+
197
+ ## Best Practices
198
+
199
+ 1. **Don't manually edit QUEEN.md** - Use `queen-promote` to ensure proper formatting
200
+ 2. **Validate before promoting** - Only promote learnings that have been tested
201
+ 3. **Use descriptive colony names** - Helps track wisdom origins
202
+ 4. **Read wisdom at build start** - Workers benefit from accumulated knowledge
203
+ 5. **Review periodically** - Some wisdom may become outdated as the system evolves
204
+
205
+ ## See Also
206
+
207
+ - `/ant:init` - Initializes QUEEN.md for new colonies
208
+ - `/ant:build` - Reads QUEEN.md wisdom for worker priming
209
+ - `/ant:continue` - Promotes validated learnings
210
+ - `/ant:seal` - Promotes final colony wisdom
211
+ - `/ant:entomb` - Promotes wisdom before archiving
@@ -0,0 +1,68 @@
1
+ # Aether Documentation
2
+
3
+ This directory contains actively maintained documentation for the Aether colony system. 8 files total plus `disciplines/` subdirectory.
4
+
5
+ ---
6
+
7
+ ## User-Facing Docs
8
+
9
+ Distributed to target repos via `aether update` (update allowlist):
10
+
11
+ | File | Purpose |
12
+ |------|---------|
13
+ | `pheromones.md` | Pheromone system guide (FOCUS/REDIRECT/FEEDBACK signals) |
14
+
15
+ ---
16
+
17
+ ## Colony System Docs
18
+
19
+ Packaged in npm, available to all Aether installations:
20
+
21
+ | File | Purpose |
22
+ |------|---------|
23
+ | `caste-system.md` | Worker caste definitions and emoji assignments |
24
+ | `QUEEN-SYSTEM.md` | Queen wisdom promotion system |
25
+ | `queen-commands.md` | Queen command documentation |
26
+ | `QUEEN.md` | Generated Queen wisdom file (repo-specific, auto-updated) |
27
+ | `error-codes.md` | Error code reference (E_* constants) |
28
+
29
+ ---
30
+
31
+ ## Development Docs
32
+
33
+ Packaged in npm, documents active issues:
34
+
35
+ | File | Purpose |
36
+ |------|---------|
37
+ | `known-issues.md` | Active known issues and workarounds |
38
+
39
+ ---
40
+
41
+ ## Worker Disciplines
42
+
43
+ Training protocols that govern worker behavior (in `disciplines/` subdirectory):
44
+
45
+ | File | Purpose |
46
+ |------|---------|
47
+ | `disciplines/DISCIPLINES.md` | Discipline index and overview |
48
+ | `disciplines/verification.md` | No completion claims without evidence |
49
+ | `disciplines/verification-loop.md` | 6-phase quality gate before advancement |
50
+ | `disciplines/debugging.md` | Systematic root cause investigation |
51
+ | `disciplines/tdd.md` | Test-first development |
52
+ | `disciplines/learning.md` | Pattern detection with validation |
53
+ | `disciplines/coding-standards.md` | Universal code quality rules |
54
+
55
+ ---
56
+
57
+ ## Archived Docs
58
+
59
+ Historical documentation moved to `archive/` subdirectory:
60
+
61
+ - `QUEEN_ANT_ARCHITECTURE.md` - superseded by agent files
62
+ - `implementation-learnings.md` - historical findings
63
+ - `constraints.md` - content now in agent definitions
64
+ - `pathogen-schema.md` - specialized use case
65
+ - `pathogen-schema-example.json` - example for schema
66
+ - `progressive-disclosure.md` - design philosophy
67
+
68
+ Archived docs remain available for reference but are not actively maintained.
@@ -0,0 +1,48 @@
1
+ # Caste System Reference
2
+
3
+ This is the **canonical source** for Aether caste emoji definitions.
4
+
5
+ - All commands and documentation should reference this file
6
+ - The `get_caste_emoji()` function in `aether-utils.sh` implements these mappings
7
+ - To add a new caste: update this file AND the function
8
+
9
+ ## Display Format
10
+
11
+ Workers are displayed as: `{caste_emoji} {worker_name}`
12
+ Example: `🔨🐜 Hammer-42` (not "Hammer-42 (Builder)")
13
+
14
+ ## Caste Table
15
+
16
+ | Caste | Emoji | Role | Name Patterns |
17
+ |-------|-------|------|---------------|
18
+ | queen | 👑🐜 | Colony coordinator | Queen, QUEEN, queen |
19
+ | builder | 🔨🐜 | Implementation work | Builder, Bolt, Hammer, Forge, Mason, Brick, Anvil, Weld |
20
+ | watcher | 👁️🐜 | Monitoring, observation | Watcher, Vigil, Sentinel, Guard, Keen, Sharp, Hawk, Alert |
21
+ | scout | 🔍🐜 | Research, discovery | Scout, Swift, Dash, Ranger, Track, Seek, Path, Roam, Quest |
22
+ | colonizer | 🗺️🐜 | New project setup | Colonizer, Pioneer, Map, Chart, Venture, Explore, Compass, Atlas, Trek |
23
+ | surveyor | 📊🐜 | Measurement, assessment | Surveyor, Chart, Plot, Survey, Measure, Assess, Gauge, Sound, Fathom |
24
+ | architect | 🏛️🐜 | Planning, design (merged into Keeper — no dedicated agent file) | Architect, Blueprint, Draft, Design, Plan, Schema, Frame, Sketch, Model |
25
+ | chaos | 🎲🐜 | Edge case testing | Chaos, Probe, Stress, Shake, Twist, Snap, Breach, Surge, Jolt |
26
+ | archaeologist | 🏺🐜 | Git history excavation | Archaeologist, Relic, Fossil, Dig, Shard, Epoch, Strata, Lore, Glyph |
27
+ | oracle | 🔮🐜 | Deep research (RALF loop) | Oracle, Sage, Seer, Vision, Augur, Mystic, Sibyl, Delph, Pythia |
28
+ | route_setter | 📋🐜 | Direction setting | Route, route |
29
+ | ambassador | 🔌🐜 | Third-party API integration | Ambassador, Bridge, Connect, Link, Diplomat, Network, Protocol |
30
+ | auditor | 👥🐜 | Code review, quality audits | Auditor, Review, Inspect, Examine, Scrutin, Critical, Verify |
31
+ | chronicler | 📝🐜 | Documentation generation | Chronicler, Document, Record, Write, Chronicle, Archive, Scribe |
32
+ | gatekeeper | 📦🐜 | Dependency management | Gatekeeper, Guard, Protect, Secure, Shield, Depend, Supply |
33
+ | guardian | 🛡️🐜 | Security audits (merged into Auditor — no dedicated agent file) | Guardian, Defend, Patrol, Secure, Vigil, Watch, Safety, Security |
34
+ | includer | ♿🐜 | Accessibility audits | Includer, Access, Inclusive, A11y, WCAG, Barrier, Universal |
35
+ | keeper | 📚🐜 | Knowledge curation | Keeper, Archive, Store, Curate, Preserve, Knowledge, Wisdom, Pattern |
36
+ | measurer | ⚡🐜 | Performance profiling | Measurer, Metric, Benchmark, Profile, Optimize, Performance, Speed |
37
+ | probe | 🧪🐜 | Test generation | Probe, Test, Excavat, Uncover, Edge, Case, Mutant |
38
+ | tracker | 🐛🐜 | Bug investigation | Tracker, Debug, Trace, Follow, Bug, Hunt, Root |
39
+ | weaver | 🔄🐜 | Code refactoring | Weaver, Refactor, Restruct, Transform, Clean, Pattern, Weave |
40
+ | dreamer | 💭🐜 | Creative ideation | Dreamer, Muse, Imagine, Wonder, Ponder, Reverie |
41
+
42
+ ## Notes
43
+
44
+ - The global `get_caste_emoji()` function matches by **name pattern** (e.g., a worker named "Hammer-42" matches the builder caste)
45
+ - Castes without dedicated patterns fall back to the generic ant emoji `🐜`
46
+ - The `colonizer` canonical emoji is `🗺️🐜` — older references using `🌱🐜` should be updated
47
+ - The `route_setter` canonical emoji is `📋🐜` — older references using `🧭🐜` should be updated
48
+ - The `architect` and `guardian` castes are **merged**: their capabilities were absorbed by Keeper and Auditor respectively (Phase 25). The caste emoji rows remain because workers named after those patterns (e.g., "Blueprint-3", "Patrol-7") still resolve to the correct emojis via `get_caste_emoji()`. There are no longer dedicated agent files for these castes.
@@ -0,0 +1,93 @@
1
+ # Aether Colony Disciplines
2
+
3
+ **Updated:** 2025-02-07
4
+
5
+ ## Overview
6
+
7
+ The Aether ant colony system includes 8 integrated disciplines that govern worker behavior. These disciplines are infused directly into worker prompts and command execution.
8
+
9
+ ## Honest Execution Model
10
+
11
+ **What the colony provides:**
12
+ - Task organization and decomposition (real)
13
+ - State persistence across sessions (real)
14
+ - Parallel execution via Task tool (real, when explicitly used)
15
+ - Structured verification gates (real)
16
+
17
+ **What it does NOT provide:**
18
+ - Automatic parallel execution (must be explicitly spawned)
19
+ - Magic emergence (follows structured commands)
20
+ - Guaranteed correctness (verification catches issues)
21
+
22
+ ## Discipline Reference
23
+
24
+ ### Core Disciplines (All Workers)
25
+
26
+ | Discipline | File | Purpose |
27
+ |-----------|------|---------|
28
+ | Verification | `verification.md` | No completion claims without evidence |
29
+ | Verification Loop | `verification-loop.md` | 6-phase quality gate before advancement |
30
+ | Debugging | `debugging.md` | Systematic root cause investigation |
31
+ | TDD | `tdd.md` | Test-first development |
32
+ | Learning | `learning.md` | Pattern detection with validation |
33
+ | Coding Standards | `coding-standards.md` | Universal code quality rules |
34
+
35
+ ### Role-Specific Disciplines
36
+
37
+ | Discipline | File | Applies To |
38
+ |-----------|------|------------|
39
+ | Planning | `planning.md` | Route-Setter |
40
+
41
+ ## Learning Validation
42
+
43
+ Learnings are NOT automatically trusted. They follow a validation lifecycle:
44
+
45
+ ```
46
+ hypothesis → validated → (or) disproven
47
+ ```
48
+
49
+ - **hypothesis**: Recorded but not yet tested (default)
50
+ - **validated**: Tested and confirmed working
51
+ - **disproven**: Found to be incorrect
52
+
53
+ Instincts track success/failure counts and can be automatically disproven.
54
+
55
+ ## Verification Enforcement
56
+
57
+ `/ant:continue` enforces verification:
58
+ - Build must pass
59
+ - Tests must pass
60
+ - Success criteria must have evidence
61
+ - **Phase will NOT advance without passing verification**
62
+
63
+ No workarounds. Fix issues and re-run.
64
+
65
+ ## Command Integration
66
+
67
+ | Command | Key Behaviors |
68
+ |---------|---------------|
69
+ | `/ant:build` | Real parallelism via Task tool, honest logging |
70
+ | `/ant:continue` | Mandatory verification gate, learning extraction |
71
+ | `/ant:plan` | Bite-sized task planning |
72
+ | `/ant:status` | Colony state with instincts |
73
+
74
+ ## File Structure
75
+
76
+ ```
77
+ .aether/
78
+ ├── workers.md # Worker roles + honest execution model
79
+ ├── docs/disciplines/
80
+ │ ├── verification.md # Evidence before claims
81
+ │ ├── verification-loop.md # 6-phase quality gate
82
+ │ ├── debugging.md # Systematic debugging
83
+ │ ├── tdd.md # Test-driven development
84
+ │ ├── learning.md # Colony learning system
85
+ │ ├── coding-standards.md # Code quality rules
86
+ │ └── DISCIPLINES.md # This file
87
+ ```
88
+
89
+ ## Reinstall After Updates
90
+
91
+ ```bash
92
+ cd /Users/callumcowie/repos/Aether && npm run postinstall
93
+ ```
@@ -0,0 +1,197 @@
1
+ # Coding Standards Discipline
2
+
3
+ ## Purpose
4
+
5
+ Universal code quality rules that apply to all worker output. Code is read more than written - optimize for readability and maintainability.
6
+
7
+ ## Core Principles
8
+
9
+ ### 1. Readability First
10
+ - Clear variable and function names
11
+ - Self-documenting code preferred over comments
12
+ - Consistent formatting
13
+
14
+ ### 2. KISS (Keep It Simple, Stupid)
15
+ - Simplest solution that works
16
+ - No premature optimization
17
+ - Easy to understand > clever code
18
+
19
+ ### 3. DRY (Don't Repeat Yourself)
20
+ - Extract common logic into functions
21
+ - Create reusable components
22
+ - No copy-paste programming
23
+
24
+ ### 4. YAGNI (You Aren't Gonna Need It)
25
+ - Don't build features before needed
26
+ - Add complexity only when required
27
+ - Start simple, refactor when needed
28
+
29
+ ## Naming Conventions
30
+
31
+ ### Variables
32
+ ```
33
+ ✅ GOOD: Descriptive names
34
+ const marketSearchQuery = 'election'
35
+ const isUserAuthenticated = true
36
+
37
+ ❌ BAD: Unclear names
38
+ const q = 'election'
39
+ const flag = true
40
+ ```
41
+
42
+ ### Functions
43
+ ```
44
+ ✅ GOOD: Verb-noun pattern
45
+ function fetchMarketData(marketId: string) { }
46
+ function calculateSimilarity(a: number[], b: number[]) { }
47
+ function isValidEmail(email: string): boolean { }
48
+
49
+ ❌ BAD: Unclear or noun-only
50
+ function market(id: string) { }
51
+ function similarity(a, b) { }
52
+ ```
53
+
54
+ ## Critical Patterns
55
+
56
+ ### Immutability (ALWAYS)
57
+ ```
58
+ ✅ ALWAYS use spread operator
59
+ const updatedUser = { ...user, name: 'New Name' }
60
+ const updatedArray = [...items, newItem]
61
+
62
+ ❌ NEVER mutate directly
63
+ user.name = 'New Name' // BAD
64
+ items.push(newItem) // BAD
65
+ ```
66
+
67
+ ### Error Handling
68
+ ```
69
+ ✅ GOOD: Comprehensive
70
+ async function fetchData(url: string) {
71
+ try {
72
+ const response = await fetch(url)
73
+ if (!response.ok) {
74
+ throw new Error(`HTTP ${response.status}`)
75
+ }
76
+ return await response.json()
77
+ } catch (error) {
78
+ console.error('Fetch failed:', error)
79
+ throw new Error('Failed to fetch data')
80
+ }
81
+ }
82
+
83
+ ❌ BAD: No error handling
84
+ async function fetchData(url) {
85
+ const response = await fetch(url)
86
+ return response.json()
87
+ }
88
+ ```
89
+
90
+ ### Async/Await
91
+ ```
92
+ ✅ GOOD: Parallel when possible
93
+ const [users, markets] = await Promise.all([
94
+ fetchUsers(),
95
+ fetchMarkets()
96
+ ])
97
+
98
+ ❌ BAD: Sequential when unnecessary
99
+ const users = await fetchUsers()
100
+ const markets = await fetchMarkets()
101
+ ```
102
+
103
+ ### Type Safety
104
+ ```
105
+ ✅ GOOD: Proper types
106
+ function getMarket(id: string): Promise<Market> { }
107
+
108
+ ❌ BAD: Using 'any'
109
+ function getMarket(id: any): Promise<any> { }
110
+ ```
111
+
112
+ ## Code Smells to Avoid
113
+
114
+ ### Long Functions
115
+ ```
116
+ ❌ BAD: Function > 50 lines
117
+ ✅ GOOD: Split into smaller functions
118
+ ```
119
+
120
+ ### Deep Nesting
121
+ ```
122
+ ❌ BAD: 5+ levels of nesting
123
+ ✅ GOOD: Early returns
124
+ if (!user) return
125
+ if (!user.isAdmin) return
126
+ // Do something
127
+ ```
128
+
129
+ ### Magic Numbers
130
+ ```
131
+ ❌ BAD: Unexplained numbers
132
+ if (retryCount > 3) { }
133
+
134
+ ✅ GOOD: Named constants
135
+ const MAX_RETRIES = 3
136
+ if (retryCount > MAX_RETRIES) { }
137
+ ```
138
+
139
+ ## Comments
140
+
141
+ ### When to Comment
142
+ ```
143
+ ✅ GOOD: Explain WHY, not WHAT
144
+ // Use exponential backoff to avoid overwhelming the API
145
+ const delay = Math.min(1000 * Math.pow(2, retryCount), 30000)
146
+
147
+ ❌ BAD: Stating the obvious
148
+ // Increment counter by 1
149
+ count++
150
+ ```
151
+
152
+ ## Testing Standards
153
+
154
+ ### AAA Pattern
155
+ ```
156
+ test('calculates similarity correctly', () => {
157
+ // Arrange
158
+ const vector1 = [1, 0, 0]
159
+ const vector2 = [0, 1, 0]
160
+
161
+ // Act
162
+ const similarity = calculateCosineSimilarity(vector1, vector2)
163
+
164
+ // Assert
165
+ expect(similarity).toBe(0)
166
+ })
167
+ ```
168
+
169
+ ### Test Naming
170
+ ```
171
+ ✅ GOOD: Descriptive
172
+ test('returns empty array when no markets match query', () => { })
173
+ test('throws error when API key is missing', () => { })
174
+
175
+ ❌ BAD: Vague
176
+ test('works', () => { })
177
+ test('test search', () => { })
178
+ ```
179
+
180
+ ## Quick Checklist
181
+
182
+ Before completing any code:
183
+ - [ ] Names are clear and descriptive
184
+ - [ ] No deep nesting (use early returns)
185
+ - [ ] No magic numbers (use constants)
186
+ - [ ] Error handling is comprehensive
187
+ - [ ] Async operations parallelize where possible
188
+ - [ ] No `any` types
189
+ - [ ] Functions are < 50 lines
190
+ - [ ] Comments explain WHY, not WHAT
191
+
192
+ ## Why This Matters
193
+
194
+ - Clear code enables rapid development
195
+ - Maintainable code enables confident refactoring
196
+ - Quality code reduces debugging time
197
+ - Standards enable team collaboration