aether-colony 3.1.17 → 5.0.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 (183) hide show
  1. package/{runtime → .aether}/CONTEXT.md +1 -1
  2. package/{runtime → .aether}/aether-utils.sh +1772 -98
  3. package/.aether/docs/QUEEN-SYSTEM.md +211 -0
  4. package/.aether/docs/QUEEN.md +84 -0
  5. package/.aether/docs/README.md +68 -0
  6. package/.aether/docs/caste-system.md +48 -0
  7. package/{runtime → .aether/docs/disciplines}/DISCIPLINES.md +8 -8
  8. package/.aether/docs/error-codes.md +268 -0
  9. package/{runtime → .aether}/docs/known-issues.md +42 -26
  10. package/.aether/docs/queen-commands.md +97 -0
  11. package/.aether/exchange/colony-registry.xml +11 -0
  12. package/{runtime → .aether}/exchange/pheromone-xml.sh +2 -1
  13. package/.aether/exchange/pheromones.xml +87 -0
  14. package/.aether/exchange/queen-wisdom.xml +14 -0
  15. package/{runtime → .aether}/exchange/registry-xml.sh +7 -3
  16. package/{runtime → .aether}/exchange/wisdom-xml.sh +11 -4
  17. package/.aether/rules/aether-colony.md +134 -0
  18. package/.aether/schemas/example-prompt-builder.xml +234 -0
  19. package/.aether/templates/colony-state-reset.jq.template +22 -0
  20. package/.aether/templates/colony-state.template.json +35 -0
  21. package/.aether/templates/constraints.template.json +9 -0
  22. package/.aether/templates/crowned-anthill.template.md +36 -0
  23. package/.aether/templates/handoff-build-error.template.md +30 -0
  24. package/.aether/templates/handoff-build-success.template.md +39 -0
  25. package/.aether/templates/handoff.template.md +40 -0
  26. package/{runtime → .aether}/utils/atomic-write.sh +5 -5
  27. package/{runtime → .aether}/utils/chamber-compare.sh +23 -10
  28. package/{runtime → .aether}/utils/chamber-utils.sh +32 -20
  29. package/{runtime → .aether}/utils/error-handler.sh +13 -1
  30. package/{runtime → .aether}/utils/file-lock.sh +49 -13
  31. package/.aether/utils/semantic-cli.sh +413 -0
  32. package/{runtime → .aether}/utils/xml-compose.sh +7 -1
  33. package/.aether/utils/xml-convert.sh +273 -0
  34. package/.aether/utils/xml-query.sh +201 -0
  35. package/.aether/utils/xml-utils.sh +110 -0
  36. package/{runtime → .aether}/workers.md +14 -17
  37. package/.claude/agents/ant/aether-ambassador.md +264 -0
  38. package/.claude/agents/ant/aether-archaeologist.md +322 -0
  39. package/.claude/agents/ant/aether-auditor.md +266 -0
  40. package/.claude/agents/ant/aether-builder.md +187 -0
  41. package/.claude/agents/ant/aether-chaos.md +268 -0
  42. package/.claude/agents/ant/aether-chronicler.md +304 -0
  43. package/.claude/agents/ant/aether-gatekeeper.md +325 -0
  44. package/.claude/agents/ant/aether-includer.md +373 -0
  45. package/.claude/agents/ant/aether-keeper.md +271 -0
  46. package/.claude/agents/ant/aether-measurer.md +317 -0
  47. package/.claude/agents/ant/aether-probe.md +210 -0
  48. package/.claude/agents/ant/aether-queen.md +325 -0
  49. package/.claude/agents/ant/aether-route-setter.md +173 -0
  50. package/.claude/agents/ant/aether-sage.md +353 -0
  51. package/.claude/agents/ant/aether-scout.md +142 -0
  52. package/.claude/agents/ant/aether-surveyor-disciplines.md +416 -0
  53. package/.claude/agents/ant/aether-surveyor-nest.md +354 -0
  54. package/.claude/agents/ant/aether-surveyor-pathogens.md +288 -0
  55. package/.claude/agents/ant/aether-surveyor-provisions.md +359 -0
  56. package/.claude/agents/ant/aether-tracker.md +265 -0
  57. package/.claude/agents/ant/aether-watcher.md +244 -0
  58. package/.claude/agents/ant/aether-weaver.md +247 -0
  59. package/.claude/commands/ant/archaeology.md +16 -7
  60. package/.claude/commands/ant/build.md +415 -284
  61. package/.claude/commands/ant/chaos.md +19 -10
  62. package/.claude/commands/ant/colonize.md +58 -24
  63. package/.claude/commands/ant/continue.md +155 -145
  64. package/.claude/commands/ant/council.md +15 -5
  65. package/.claude/commands/ant/dream.md +16 -7
  66. package/.claude/commands/ant/entomb.md +274 -157
  67. package/.claude/commands/ant/feedback.md +33 -29
  68. package/.claude/commands/ant/flag.md +18 -10
  69. package/.claude/commands/ant/flags.md +14 -6
  70. package/.claude/commands/ant/focus.md +29 -21
  71. package/.claude/commands/ant/help.md +11 -1
  72. package/.claude/commands/ant/history.md +10 -0
  73. package/.claude/commands/ant/init.md +91 -65
  74. package/.claude/commands/ant/interpret.md +15 -4
  75. package/.claude/commands/ant/lay-eggs.md +55 -7
  76. package/.claude/commands/ant/maturity.md +11 -1
  77. package/.claude/commands/ant/migrate-state.md +14 -2
  78. package/.claude/commands/ant/oracle.md +23 -15
  79. package/.claude/commands/ant/organize.md +29 -20
  80. package/.claude/commands/ant/pause-colony.md +17 -7
  81. package/.claude/commands/ant/phase.md +17 -8
  82. package/.claude/commands/ant/plan.md +20 -9
  83. package/.claude/commands/ant/redirect.md +29 -32
  84. package/.claude/commands/ant/resume-colony.md +19 -9
  85. package/.claude/commands/ant/resume.md +272 -96
  86. package/.claude/commands/ant/seal.md +201 -191
  87. package/.claude/commands/ant/status.md +71 -32
  88. package/.claude/commands/ant/swarm.md +26 -44
  89. package/.claude/commands/ant/tunnels.md +279 -105
  90. package/.claude/commands/ant/update.md +81 -20
  91. package/.claude/commands/ant/verify-castes.md +14 -4
  92. package/.claude/commands/ant/watch.md +13 -12
  93. package/.opencode/agents/aether-ambassador.md +63 -20
  94. package/.opencode/agents/aether-archaeologist.md +29 -12
  95. package/.opencode/agents/aether-auditor.md +51 -18
  96. package/.opencode/agents/aether-builder.md +69 -19
  97. package/.opencode/agents/aether-chaos.md +29 -12
  98. package/.opencode/agents/aether-chronicler.md +60 -18
  99. package/.opencode/agents/aether-gatekeeper.md +27 -18
  100. package/.opencode/agents/aether-includer.md +27 -18
  101. package/.opencode/agents/aether-keeper.md +89 -18
  102. package/.opencode/agents/aether-measurer.md +27 -18
  103. package/.opencode/agents/aether-probe.md +60 -18
  104. package/.opencode/agents/aether-queen.md +172 -24
  105. package/.opencode/agents/aether-route-setter.md +57 -12
  106. package/.opencode/agents/aether-sage.md +26 -18
  107. package/.opencode/agents/aether-scout.md +27 -19
  108. package/.opencode/agents/aether-surveyor-disciplines.md +53 -1
  109. package/.opencode/agents/aether-surveyor-nest.md +53 -1
  110. package/.opencode/agents/aether-surveyor-pathogens.md +51 -1
  111. package/.opencode/agents/aether-surveyor-provisions.md +53 -1
  112. package/.opencode/agents/aether-tracker.md +64 -18
  113. package/.opencode/agents/aether-watcher.md +66 -19
  114. package/.opencode/agents/aether-weaver.md +61 -18
  115. package/.opencode/commands/ant/build.md +406 -192
  116. package/.opencode/commands/ant/continue.md +66 -76
  117. package/.opencode/commands/ant/entomb.md +106 -45
  118. package/.opencode/commands/ant/init.md +46 -48
  119. package/.opencode/commands/ant/organize.md +5 -5
  120. package/.opencode/commands/ant/resume.md +334 -0
  121. package/.opencode/commands/ant/seal.md +33 -24
  122. package/.opencode/commands/ant/status.md +11 -0
  123. package/.opencode/commands/ant/tunnels.md +149 -0
  124. package/.opencode/commands/ant/update.md +59 -16
  125. package/CHANGELOG.md +79 -0
  126. package/README.md +135 -353
  127. package/bin/cli.js +243 -122
  128. package/bin/generate-commands.sh +2 -2
  129. package/bin/lib/init.js +13 -3
  130. package/bin/lib/update-transaction.js +119 -117
  131. package/bin/sync-to-runtime.sh +5 -137
  132. package/bin/validate-package.sh +84 -0
  133. package/package.json +9 -6
  134. package/.opencode/agents/aether-architect.md +0 -66
  135. package/.opencode/agents/aether-guardian.md +0 -107
  136. package/.opencode/agents/workers.md +0 -1034
  137. package/runtime/QUEEN_ANT_ARCHITECTURE.md +0 -402
  138. package/runtime/data/signatures.json +0 -41
  139. package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +0 -1343
  140. package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +0 -2642
  141. package/runtime/docs/PHEROMONE-INJECTION.md +0 -240
  142. package/runtime/docs/PHEROMONE-INTEGRATION.md +0 -192
  143. package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +0 -426
  144. package/runtime/docs/README.md +0 -94
  145. package/runtime/docs/VISUAL-OUTPUT-SPEC.md +0 -219
  146. package/runtime/docs/biological-reference.md +0 -272
  147. package/runtime/docs/codebase-review.md +0 -399
  148. package/runtime/docs/command-sync.md +0 -164
  149. package/runtime/docs/constraints.md +0 -116
  150. package/runtime/docs/implementation-learnings.md +0 -89
  151. package/runtime/docs/namespace.md +0 -148
  152. package/runtime/docs/pathogen-schema-example.json +0 -36
  153. package/runtime/docs/pathogen-schema.md +0 -111
  154. package/runtime/docs/planning-discipline.md +0 -159
  155. package/runtime/docs/progressive-disclosure.md +0 -184
  156. package/runtime/lib/queen-utils.sh +0 -729
  157. package/runtime/planning.md +0 -159
  158. package/runtime/recover.sh +0 -136
  159. package/runtime/utils/xml-utils.sh +0 -2196
  160. package/runtime/workers-new-castes.md +0 -516
  161. /package/{runtime → .aether/docs/disciplines}/coding-standards.md +0 -0
  162. /package/{runtime → .aether/docs/disciplines}/debugging.md +0 -0
  163. /package/{runtime → .aether/docs/disciplines}/learning.md +0 -0
  164. /package/{runtime → .aether/docs/disciplines}/tdd.md +0 -0
  165. /package/{runtime → .aether/docs/disciplines}/verification-loop.md +0 -0
  166. /package/{runtime → .aether/docs/disciplines}/verification.md +0 -0
  167. /package/{runtime → .aether}/docs/pheromones.md +0 -0
  168. /package/{runtime → .aether}/model-profiles.yaml +0 -0
  169. /package/{runtime → .aether}/schemas/aether-types.xsd +0 -0
  170. /package/{runtime → .aether}/schemas/colony-registry.xsd +0 -0
  171. /package/{runtime → .aether}/schemas/pheromone.xsd +0 -0
  172. /package/{runtime → .aether}/schemas/prompt.xsd +0 -0
  173. /package/{runtime → .aether}/schemas/queen-wisdom.xsd +0 -0
  174. /package/{runtime → .aether}/schemas/worker-priming.xsd +0 -0
  175. /package/{runtime → .aether}/templates/QUEEN.md.template +0 -0
  176. /package/{runtime → .aether}/utils/colorize-log.sh +0 -0
  177. /package/{runtime → .aether}/utils/queen-to-md.xsl +0 -0
  178. /package/{runtime → .aether}/utils/spawn-tree.sh +0 -0
  179. /package/{runtime → .aether}/utils/spawn-with-model.sh +0 -0
  180. /package/{runtime → .aether}/utils/state-loader.sh +0 -0
  181. /package/{runtime → .aether}/utils/swarm-display.sh +0 -0
  182. /package/{runtime → .aether}/utils/watch-spawn-tree.sh +0 -0
  183. /package/{runtime → .aether}/utils/xml-core.sh +0 -0
@@ -1,2642 +0,0 @@
1
- # Aether Pheromone & Multi-Colony System
2
- ## Master Implementation Specification
3
-
4
- **Version:** 1.1
5
- **Status:** Design Complete → Implementation Ready
6
- **Created:** 2026-02-15
7
- **Updated:** 2026-02-15
8
- **Purpose:** Cross-agent implementation guide for the complete Aether pheromone memory and multi-colony architecture
9
-
10
- ---
11
-
12
- ## CONSOLIDATION NOTE
13
-
14
- This document consolidates all previous pheromone and multi-colony design notes:
15
- - `PHEROMONE-SYSTEM-DESIGN.md` → Core philosophy, taxonomy, phases
16
- - `PHEROMONE-INJECTION.md` → Injection timing, queue system, UX flows
17
- - `PHEROMONE-INTEGRATION.md` → Command integration patterns
18
- - `MULTI-COLONY-ARCHITECTURE.md` → Registry, lineage, switching
19
-
20
- **This is the single source of truth. Previous documents are archived references.**
21
-
22
- ---
23
-
24
- ## Document Purpose
25
-
26
- This is the **single source of truth** for implementing the Aether Pheromone System and Multi-Colony Architecture. Multiple agents will work from this document across different phases. Each section includes:
27
- - Clear specifications
28
- - Implementation details
29
- - Agent assignment markers
30
- - Dependencies
31
- - Verification criteria
32
-
33
- **For Agents Reading This:**
34
- - Look for `AGENT ASSIGNMENT` markers to find your work
35
- - Check `DEPENDENCIES` before starting
36
- - Verify against `ACCEPTANCE CRITERIA` before marking complete
37
- - Update `STATUS` as you progress
38
-
39
- ---
40
-
41
- ## Table of Contents
42
-
43
- 1. [Executive Summary](#1-executive-summary)
44
- 2. [Core Philosophy](#2-core-philosophy)
45
- 3. [Pheromone Taxonomy](#3-pheromone-taxonomy)
46
- - 3.1 Type Reference
47
- - 3.2 Strength & Decay
48
- - 3.3 JSON Schema
49
- - 3.4 Injection Timing & Critical Points
50
- - 3.5 Mid-Work Injection System
51
- - 3.6 Worker Spawn-Time Priming
52
- - 3.7 Biological Patterns
53
- 4. [Multi-Colony Architecture](#4-multi-colony-architecture)
54
- - 4.1 Directory Structure
55
- - 4.2 Colony Registry
56
- - 4.3 Colony Lifecycle
57
- - 4.4 Lineage & Inheritance
58
- - 4.5 Concurrent Colony Execution
59
- 5. [Phase 1: Foundation](#5-phase-1-foundation)
60
- 6. [Phase 2: Integration](#6-phase-2-integration)
61
- 7. [Phase 3: Learning](#7-phase-3-learning)
62
- 8. [Phase 4: Colonize](#8-phase-4-colonize)
63
- 9. [Phase 5: Lineage](#9-phase-5-lineage)
64
- 10. [Command Specifications](#10-command-specifications)
65
- - 10.1 Command Matrix
66
- - 10.2 Detailed Specs
67
- - 10.3 Complete UX Flows
68
- 11. [File Specifications](#11-file-specifications)
69
- 12. [Testing Strategy](#12-testing-strategy)
70
- 13. [Appendices](#13-appendices)
71
- 14. [Advanced Multi-Colony Concepts](#14-advanced-multi-colony-concepts)
72
- - 14.1 Colony Networks & Swarms
73
- - 14.2 Colony Templates
74
- - 14.3 Colony Forking
75
- - 14.4 Colony Merging
76
- 15. [Hook System](#15-hook-system)
77
- - 15.1 Event Hooks
78
- - 15.2 Hook Configuration
79
- - 15.3 Webhook Integration
80
- 16. [Plugin Architecture](#16-plugin-architecture)
81
- - 16.1 Plugin System Design
82
- - 16.2 Plugin Hooks
83
- - 16.3 Plugin Commands
84
- 17. [Custom Agent Design](#17-custom-agent-design)
85
- - 17.1 Agent Definition Framework
86
- - 17.2 Agent Inheritance
87
- - 17.3 Agent Swarming
88
- 18. [Best Practices & Patterns](#18-best-practices--patterns)
89
- - 18.1 Anti-Patterns
90
- - 18.2 Best Practices
91
- - 18.3 Colony Sizing Guidelines
92
- 19. [Emergent Behaviors Philosophy](#19-emergent-behaviors-philosophy)
93
- - 19.1 From Control to Emergence
94
- - 19.2 Stigmergy in Code
95
- - 19.3 Trophallaxis
96
- - 19.4 Midden Pile
97
- - 19.5 Quorum Sensing
98
- 20. [Future Possibilities](#20-future-possibilities)
99
- - 20.1 AI-Native Features
100
- - 20.2 Integration Ideas
101
- - 20.3 Visualization Enhancements
102
- - 20.4 Advanced Agent Concepts
103
- 21. [Implementation Roadmap (Extended)](#21-implementation-roadmap-extended)
104
- 22. [Quick Start Recipes](#22-quick-start-recipes)
105
- - Appendix A: Quick Reference
106
- - Appendix B: Migration Guide
107
- - Appendix C: Troubleshooting
108
- - Appendix D: Glossary
109
-
110
- ---
111
-
112
- ## 1. Executive Summary
113
-
114
- ### 1.1 What We're Building
115
-
116
- The Aether Pheromone System transforms the colony from a single-session tool into a **learning organism** that:
117
- - Remembers patterns across colonies
118
- - Guides workers through invisible scent trails
119
- - Evolves through biological metaphors (stimulus-driven, trophallaxis, midden)
120
- - Supports multiple coordinated colonies per repository
121
-
122
- ### 1.2 System Components
123
-
124
- ```
125
- ┌─────────────────────────────────────────────────────────────────┐
126
- │ AETHER ECOSYSTEM │
127
- ├─────────────────────────────────────────────────────────────────┤
128
- │ │
129
- │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
130
- │ │ Colony A │◄──►│ Eternal Mem │◄──►│ Colony B │ │
131
- │ │ (Bug Fixes) │ │ (~/.aether) │ │(Pheromone │ │
132
- │ │ │ │ │ │ Foundation) │ │
133
- │ └──────────────┘ └──────────────┘ └──────────────┘ │
134
- │ ▲ ▲ │
135
- │ │ ┌──────────────┐ │ │
136
- │ └────────►│ Pheromone │◄──────────┘ │
137
- │ │ Trails │ │
138
- │ │ │ │
139
- │ │ • FOCUS │ │
140
- │ │ • REDIRECT │ │
141
- │ │ • PATTERN │ │
142
- │ │ • PHILOSOPHY │ │
143
- │ │ • STACK │ │
144
- │ │ • DECREE │ │
145
- │ └──────────────┘ │
146
- │ │
147
- └─────────────────────────────────────────────────────────────────┘
148
- ```
149
-
150
- ### 1.3 Five Implementation Phases
151
-
152
- | Phase | Name | Duration | Key Deliverable | Status |
153
- |-------|------|----------|-----------------|--------|
154
- | 1 | Foundation | 1-2 days | Eternal memory structure, basic auto-deposition | 🟡 PLANNED |
155
- | 2 | Integration | 2-3 days | Queue system, command enhancements, visibility | 🟡 PLANNED |
156
- | 3 | Learning | 3-4 days | Pattern detection, milestone wisdom extraction | 🟡 PLANNED |
157
- | 4 | Colonize | 2-3 days | Deep codebase analysis, stack profiles | 🟡 PLANNED |
158
- | 5 | Lineage | 2-3 days | Cross-colony inheritance, mentor system | 🟡 PLANNED |
159
-
160
- **Total Estimated Time:** 10-15 days with parallel work
161
-
162
- ### 1.4 Agent Coordination
163
-
164
- ```
165
- AGENT COORDINATION MAP
166
- ======================
167
-
168
- Phase 1 (Foundation)
169
- ├── Agent A: Eternal directory structure
170
- ├── Agent B: Pheromone JSON schema
171
- └── Agent C: Auto-deposition in /ant:init
172
-
173
- Phase 2 (Integration) - STARTS AFTER Phase 1 complete
174
- ├── Agent D: Queue system
175
- ├── Agent E: Command enhancements
176
- └── Agent F: Status visibility
177
-
178
- Phase 3 (Learning) - STARTS AFTER Phase 2 complete
179
- ├── Agent G: Pattern detection
180
- └── Agent H: Milestone extraction
181
-
182
- Phase 4 (Colonize) - CAN PARALLEL with Phase 3
183
- └── Agent I: /ant:colonize command
184
-
185
- Phase 5 (Lineage) - STARTS AFTER Phase 3 & 4 complete
186
- └── Agent J: Cross-colony system
187
- ```
188
-
189
- ---
190
-
191
- ## 2. Core Philosophy
192
-
193
- ### 2.1 The Metaphor
194
-
195
- Real ant colonies communicate through **pheromones**—chemical trails that:
196
- - Persist in the environment
197
- - Fade over time (decay)
198
- - Guide behavior without central control
199
- - Create emergent intelligence
200
-
201
- Our system replicates this:
202
- - **FOCUS** pheromones attract attention to important areas
203
- - **REDIRECT** pheromones warn away from anti-patterns
204
- - **PATTERN** pheromones mark validated best practices
205
- - **PHILOSOPHY** pheromones encode core beliefs (never decay)
206
- - **STACK** pheromones capture tech constraints
207
- - **DECREE** pheromones record explicit commands
208
-
209
- ### 2.2 Design Principles
210
-
211
- 1. **Emergence over Orchestration**
212
- - Don't tell workers what to do—let them follow scent trails
213
- - System learns from behavior, not explicit programming
214
-
215
- 2. **Invisibility**
216
- - Pheromones operate in the background
217
- - Visible only when relevant or requested
218
- - No new commands for basic operation
219
-
220
- 3. **Decay & Renewal**
221
- - Old patterns fade (configurable decay)
222
- - Validated patterns strengthen
223
- - Failed patterns go to midden (archive)
224
-
225
- 4. **Cross-Colony Memory**
226
- - What Colony A learns, Colony B can smell
227
- - Eternal memory persists beyond any single colony
228
- - Lineage creates inheritance chains
229
-
230
- 5. **Mid-Work Injection**
231
- - Pheromones can be added while workers are active
232
- - Queue system prevents interruption
233
- - Workers pick up new scents at natural breakpoints
234
-
235
- ### 2.3 User Experience
236
-
237
- **First Colony:**
238
- ```
239
- 🐜 FIRST COLONY DETECTED
240
- ═══════════════════════════════════════════════════════
241
-
242
- Your Queen's scent is being established.
243
-
244
- Auto-deposited:
245
- ✓ PHILOSOPHY[emergence-over-orchestration]
246
- ✓ PHILOSOPHY[minimal-change]
247
-
248
- These guide all workers.
249
-
250
- 💡 Tip: Adjust mid-flight: /ant:focus "security"
251
- ═══════════════════════════════════════════════════════
252
- ```
253
-
254
- **Mid-Work Pheromone:**
255
- ```
256
- 🐜 FOCUS TRAIL LAID
257
- ═══════════════════════════════════════════════════════
258
-
259
- Queued for active workers.
260
- Next checkpoint: workers will detect.
261
-
262
- Queued: FOCUS[error-handling, 0.9]
263
- Active: FOCUS[auth, 0.9] REDIRECT[regex, 0.7]
264
- ═══════════════════════════════════════════════════════
265
- ```
266
-
267
- **Milestone Completion:**
268
- ```
269
- 🐜 WISDOM ARCHIVED
270
- ═══════════════════════════════════════════════════════
271
-
272
- Patterns validated:
273
- • PATTERN[prefer-joi-over-zod] (validated 5x)
274
- • PATTERN[bash-for-file-ops] (used 12x)
275
- • REDIRECT[avoid-sync-fs] (failed once)
276
-
277
- Preserved in eternal memory for future colonies.
278
- ═══════════════════════════════════════════════════════
279
- ```
280
-
281
- ---
282
-
283
- ## 3. Pheromone Taxonomy
284
-
285
- ### 3.1 Complete Type Reference
286
-
287
- | Type | Source | Decay | Strength Range | Purpose | Example |
288
- |------|--------|-------|----------------|---------|---------|
289
- | **FOCUS** | `/ant:focus`, planning | 30 days | 0.1 - 1.0 | What to pay attention to | FOCUS[authentication] |
290
- | **REDIRECT** | `/ant:redirect`, errors | 60 days | 0.1 - 1.0 | Patterns to avoid | REDIRECT[regex-parsing] |
291
- | **PHILOSOPHY** | Queen's Will, Eternal | Never | 0.5 - 1.0 | Core beliefs | PHILOSOPHY[emergence-over-orchestration] |
292
- | **STACK** | `/ant:colonize`, detection | When stack changes | 0.7 - 1.0 | Tech constraints | STACK[nodejs-bash-jq] |
293
- | **PATTERN** | Milestones, workers | 90 days | 0.3 - 1.0 | Discovered best practices | PATTERN[bash-for-file-ops] |
294
- | **DECREE** | User override | Never | 1.0 | Explicit commands | DECREE[no-force-push] |
295
-
296
- ### 3.2 Strength Interpretation
297
-
298
- ```
299
- 0.9 - 1.0 : Overwhelming scent - workers will strongly follow
300
- 0.7 - 0.8 : Strong trail - workers will likely follow
301
- 0.5 - 0.6 : Moderate scent - workers will consider
302
- 0.3 - 0.4 : Faint trail - workers may notice
303
- 0.1 - 0.2 : Barely perceptible - background influence
304
- ```
305
-
306
- ### 3.3 Decay Mechanics
307
-
308
- ```python
309
- # Pseudocode for decay calculation
310
- def calculate_current_strength(pheromone):
311
- age = now - pheromone.deposited_at
312
- decay_rate = pheromone.decay # e.g., "30d"
313
-
314
- # Linear decay to 0
315
- decayed = pheromone.strength * (1 - (age / decay_rate))
316
- return max(0, decayed)
317
-
318
- # Daily decay job (runs on /ant:status or /ant:init)
319
- def apply_decay():
320
- for pheromone in pheromones:
321
- current = calculate_current_strength(pheromone)
322
- if current < 0.1:
323
- move_to_midden(pheromone) # Archive, don't delete
324
- ```
325
-
326
- ### 3.4 Pheromone JSON Schema
327
-
328
- ```json
329
- {
330
- "$schema": "pheromone-v1.0",
331
- "trails": [
332
- {
333
- "id": "phem_{uuid}",
334
- "type": "FOCUS|REDIRECT|PHILOSOPHY|STACK|PATTERN|DECREE",
335
- "substance": "string-identifier",
336
- "strength": 0.0-1.0,
337
- "source": {
338
- "type": "user:focus|user:redirect|milestone|worker:error|worker:success|decree",
339
- "colony_id": "colony-uuid",
340
- "phase": 3,
341
- "command": "/ant:focus"
342
- },
343
- "deposited_at": "ISO-8601",
344
- "decay": "30d|60d|90d|never",
345
- "decays_at": "ISO-8601",
346
- "context": {
347
- "description": "Human-readable explanation",
348
- "evidence": ["list", "of", "supporting", "facts"],
349
- "applies_to": ["file patterns", "or", "domains"]
350
- }
351
- }
352
- ],
353
- "metadata": {
354
- "version": "1.0",
355
- "last_decay_check": "ISO-8601",
356
- "total_deposited": 47,
357
- "active_count": 12
358
- }
359
- }
360
- ```
361
-
362
- ---
363
-
364
- ### 3.5 Detailed Injection Timing & Critical Points
365
-
366
- **Pheromones are deposited at 7 critical moments:**
367
-
368
- | Moment | Auto-Pheromone | Signal to User | Purpose |
369
- |--------|---------------|----------------|---------|
370
- | `/ant:init` completes | PHILOSOPHY[emergence-over-orchestration] | "🐜 Queen's scent laid: Emergence" | Foundation |
371
- | First `/ant:plan` starts | PHILOSOPHY[minimal-planning-maximum-doing] | "🐜 Trail: Plan just enough, build soon" | Planning bias |
372
- | Worker encounters error | REDIRECT[error-pattern] | "🐜 Warning pheromone deposited: {pattern}" | Learn from failure |
373
- | Phase completes | PATTERN[what-worked] | "🐜 Success trail: {pattern} (strength: {n})" | Reinforce success |
374
- | `/ant:seal` invoked | PHILOSOPHY[maturity-{milestone}] + PATTERN[sealed-conventions] | "🐜 Colony wisdom archived to eternal memory" | Lineage |
375
- | `/ant:swarm` fixes bug | PATTERN[fix-strategy] + REDIRECT[what-failed] | "🐜 Swarm left trail: {solution-type}" | Bug immunity |
376
- | User overrides worker | DECREE[override-reason] | "🐜 Decree recorded: {reason}" | Authority |
377
-
378
- **Signal Batching Rules:**
379
- - Batch notifications every 30 seconds if multiple deposited
380
- - Priority: DECREE > REDIRECT > FOCUS > PATTERN > PHILOSOPHY
381
- - Show immediately if strength >= 0.8
382
-
383
- **User Signaling Format:**
384
- ```
385
- ═══════════════════════════════════════════════════════
386
- 🐜 PHEROMONE DEPOSITED
387
- ═══════════════════════════════════════════════════════
388
-
389
- Type: PATTERN
390
- Substance: prefer-bash-over-node-for-file-ops
391
- Strength: 0.7
392
- Source: milestone:phase-3-complete
393
- Why: Workers used bash 5x more than node for file ops
394
-
395
- This trail guides future workers.
396
- To see all active trails: /ant:sniff
397
-
398
- ═══════════════════════════════════════════════════════
399
- ```
400
-
401
- ---
402
-
403
- ### 3.6 Mid-Work Injection System (Queue + Checkpoints)
404
-
405
- **The Challenge:** User wants to inject pheromone while workers are active, without interrupting flow.
406
-
407
- **Solution: Pheromone Queue + Checkpoint Polling**
408
-
409
- ```
410
- User: /ant:emit FOCUS "error-handling" (while workers building)
411
-
412
- System:
413
- 1. Deposit pheromone immediately to .aether/data/pheromone-queue.json
414
- 2. Display: "🐜 Pheromone queued - workers will detect at next checkpoint"
415
- 3. Worker flow continues uninterrupted
416
-
417
- Workers:
418
- - Poll for queue at natural breakpoints
419
- - Pick up without breaking context
420
- - Log: "[Worker] New scent: FOCUS[error-handling]"
421
- ```
422
-
423
- **Queue Structure:**
424
- ```json
425
- {
426
- "version": "1.0",
427
- "queue": [
428
- {
429
- "id": "phem_queued_123",
430
- "type": "FOCUS",
431
- "substance": "error-handling",
432
- "strength": 0.9,
433
- "deposited_at": "2026-02-15T10:30:00Z",
434
- "deposited_by": "user:queen",
435
- "status": "queued|picked_up|applied",
436
- "picked_up_by": null,
437
- "picked_up_at": null
438
- }
439
- ]
440
- }
441
- ```
442
-
443
- **Worker Checkpoint Protocol:**
444
- Natural breakpoints for pheromone detection:
445
- - After completing a task
446
- - Before spawning a sub-worker
447
- - After tool use (Read/Edit/Bash)
448
- - Every 5 minutes of continuous work
449
-
450
- **Worker Prompt Addition:**
451
- ```markdown
452
- Check for new pheromones at each checkpoint:
453
- ```bash
454
- bash .aether/aether-utils.sh pheromone-poll "{worker_name}"
455
- ```
456
-
457
- If new scents detected, announce:
458
- "🐜 [Worker-Name] New scent detected: FOCUS[error-handling]"
459
- ```
460
-
461
- ---
462
-
463
- ### 3.7 Worker Spawn-Time Priming
464
-
465
- Every worker, at spawn:
466
-
467
- 1. **Inhales the eternal** - Reads `~/.aether/eternal/queen-will.md`
468
- 2. **Checks active trails** - Loads `.aether/data/pheromones.json`
469
- 3. **Smells the stack** - Loads relevant stack-profile
470
- 4. **Polls queue** - Checks for queued pheromones
471
- 5. **Begins work** - Carries context, may deposit new trails
472
-
473
- **Example spawn log:**
474
- ```
475
- [Prime Worker] Spawned for Phase 7
476
- [Prime Worker] Inhaling Queen's Will... (emergence, minimal-change)
477
- [Prime Worker] Trails: FOCUS[security,0.9] REDIRECT[force-push,0.8]
478
- [Prime Worker] Stack: nodejs-bash-jq (matches eternal profile)
479
- [Prime Worker] Ready to coordinate
480
- ```
481
-
482
- **Worker Context Header (condensed):**
483
- ```
484
- [Pheromones: FOCUS(auth,0.9) REDIRECT(regex,0.7) PATTERN(bash-files,0.8)]
485
- [Stack: nodejs-bash-jq]
486
- [Queen's Will: emergence, minimal-change]
487
- ```
488
-
489
- ---
490
-
491
- ### 3.8 Biological Patterns to Implement
492
-
493
- Real ant colonies exhibit behaviors we replicate in software:
494
-
495
- #### Stimulus-Driven Worker Assignment
496
- Workers check pheromone gradients before spawning specialists:
497
- - High REDIRECT[regex-parsing] → spawn Parser Specialist
498
- - High FOCUS[performance] → spawn Watcher before Builder
499
- - PATTERN[error-recovery] detected → Chaos ant joins automatically
500
-
501
- ```
502
- Queen spawning workers for Phase 3:
503
-
504
- Checks pheromone gradients:
505
- REDIRECT[regex-parsing]: 0.8 (HIGH)
506
- → Spawn Parser Specialist alongside Builder
507
-
508
- FOCUS[performance]: 0.9 (HIGH)
509
- → Spawn Watcher before Builder
510
-
511
- No error patterns detected
512
- → Chaos ant not needed yet
513
- ```
514
-
515
- #### Trophallaxis (Food Sharing)
516
- Senior workers pass "digested learnings" to new workers:
517
- - `/ant:mentor` - Explicitly share chamber wisdom to new colony
518
- - Auto-mentoring: New colonies inherit from sealed chambers
519
- - Workers in same colony share patterns via activity log
520
-
521
- ```
522
- [Colony A - Sealed]
523
- ↓ (extract pheromones)
524
- [PATTERN[auth-pattern]] → Eternal Memory
525
- ↓ (inherit)
526
- [Colony B - New]
527
- [Worker] Inhaling: PATTERN[auth-pattern] from Colony A
528
- ```
529
-
530
- #### Midden Piles (Waste Management)
531
- Failed patterns go to `.aether/data/midden/`:
532
- - Not deleted, just marked as "don't go here"
533
- - REDIRECT pheromones point to midden
534
- - Historical record of what didn't work
535
-
536
- ```
537
- Failed Pattern Archive (Midden)
538
- ═══════════════════════════════════════════════════════
539
-
540
- REDIRECT[sync-fs-ops] (strength: 0.9)
541
- Why: Caused race conditions in 3 colonies
542
- First failed: 2026-01-15
543
- Last attempted: 2026-02-10
544
-
545
- REDIRECT[nested-callbacks] (strength: 0.7)
546
- Why: Created unreadable code
547
- Recommendation: Use promises/async-await
548
-
549
- ═══════════════════════════════════════════════════════
550
- ```
551
-
552
- #### Trail Following
553
- Workers follow strongest pheromone trails:
554
- - FOCUS trails attract attention
555
- - REDIRECT trails create avoidance zones
556
- - PATTERN trails create preferred paths
557
-
558
- ```
559
- Worker navigating codebase:
560
-
561
- [Auth Module]
562
- ↑ FOCUS[authentication, 0.9] - Strong trail
563
- → Enter module
564
-
565
- [Database Layer]
566
- ⚠️ REDIRECT[sync-queries, 0.8] - Avoid zone
567
- → Route around, use async
568
-
569
- [Utils]
570
- ↗ PATTERN[bash-for-file-ops, 0.8] - Preferred path
571
- → Use bash instead of node
572
- ```
573
-
574
- ---
575
-
576
- ## 4. Multi-Colony Architecture
577
-
578
- ### 4.1 Directory Structure
579
-
580
- ```
581
- Repository Root
582
- ├── .aether/
583
- │ ├── colonies/ # NEW: All colony states
584
- │ │ ├── registry.json # Master colony index
585
- │ │ ├── colony-{id}-{slug}/ # Individual colony
586
- │ │ │ ├── COLONY_STATE.json
587
- │ │ │ ├── activity.log
588
- │ │ │ ├── constraints.json # Colony-local pheromones
589
- │ │ │ ├── pheromones.json # Colony-specific trails
590
- │ │ │ ├── completion-report.md
591
- │ │ │ └── events/
592
- │ │ │ └── {timestamp}-{type}.json
593
- │ │ └── colony-{id}-{slug}/ # Another colony
594
- │ │ └── ...
595
- │ ├── data/ # Legacy (symlink to active)
596
- │ │ └── COLONY_STATE.json ─────────────┐
597
- │ ├── eternal/ # NEW: Cross-colony memory
598
- │ │ ├── queen-will.md # Core philosophies
599
- │ │ ├── pheromones.json # Active eternal pheromones
600
- │ │ ├── stack-profile/ # Tech fingerprints
601
- │ │ │ ├── nodejs.md
602
- │ │ │ └── python.md
603
- │ │ ├── patterns/ # Validated patterns
604
- │ │ │ └── emergence.md
605
- │ │ └── lineage/ # Inheritable chambers
606
- │ │ └── colony-{id}/
607
- │ │ ├── decisions.md
608
- │ │ ├── lessons.md
609
- │ │ └── pheromones.json
610
- │ └── ... # Other existing files
611
- └── ...
612
- ```
613
-
614
- ### 4.2 Colony Registry Format
615
-
616
- ```json
617
- {
618
- "version": "1.0",
619
- "repository": "/absolute/path/to/repo",
620
- "current_colony": "20260215-pheromone-foundation-x2m4",
621
- "last_updated": "ISO-8601",
622
- "colonies": [
623
- {
624
- "id": "20260215-fix-loop-bugs-a7k9",
625
- "slug": "fix-loop-bugs",
626
- "goal": "v1.1 Bug Fixes & Update System Repair",
627
- "status": "sealed",
628
- "mound": "aether-v1.1",
629
- "created_at": "2026-02-13T20:40:00Z",
630
- "sealed_at": "2026-02-14T02:39:00Z",
631
- "phases_completed": 7,
632
- "lineage": {
633
- "parent": null,
634
- "children": ["20260215-pheromone-foundation-x2m4"],
635
- "siblings": []
636
- },
637
- "pheromones": {
638
- "extracted": 12,
639
- "philosophy": ["emergence", "minimal-change"],
640
- "patterns": ["hash-comparison", "sync-verification"]
641
- },
642
- "path": ".aether/colonies/20260215-fix-loop-bugs-a7k9/"
643
- },
644
- {
645
- "id": "20260215-pheromone-foundation-x2m4",
646
- "slug": "pheromone-foundation",
647
- "goal": "Phase 1: Foundation — Eternal memory structure",
648
- "status": "active",
649
- "mound": "pheromone-system",
650
- "created_at": "2026-02-15T10:30:00Z",
651
- "sealed_at": null,
652
- "phases_completed": 0,
653
- "lineage": {
654
- "parent": "20260215-fix-loop-bugs-a7k9",
655
- "children": [],
656
- "siblings": []
657
- },
658
- "pheromones": {
659
- "inherited": ["emergence", "minimal-change"]
660
- },
661
- "path": ".aether/colonies/20260215-pheromone-foundation-x2m4/"
662
- }
663
- ],
664
- "mounds": [
665
- {
666
- "name": "aether-v1.1",
667
- "description": "Bug fixes and update system repair",
668
- "colonies": ["20260215-fix-loop-bugs-a7k9"]
669
- },
670
- {
671
- "name": "pheromone-system",
672
- "description": "Complete pheromone memory implementation",
673
- "colonies": [
674
- "20260215-pheromone-foundation-x2m4",
675
- "(future: integration)",
676
- "(future: learning)",
677
- "(future: colonize)",
678
- "(future: lineage)"
679
- ]
680
- }
681
- ]
682
- }
683
- ```
684
-
685
- ### 4.3 Colony Lifecycle
686
-
687
- ```
688
- COLONY LIFECYCLE
689
- ================
690
-
691
- 1. PLAN (/ant:lay-eggs)
692
- User defines master goal spanning multiple colonies
693
- Creates MOUND.md with colony specifications
694
- Status: PLANNED
695
-
696
- 2. INITIALIZE (/ant:init)
697
- Archive current colony (if active)
698
- Create new colony directory
699
- Inherit from parent (if specified)
700
- Link as active
701
- Status: ACTIVE
702
-
703
- 3. EXECUTE (/ant:plan, /ant:build)
704
- Normal colony operations
705
- Deposit pheromones
706
- Status: ACTIVE
707
-
708
- 4. COMPLETE (/ant:continue, /ant:seal)
709
- Extract patterns → pheromones
710
- Generate completion report
711
- Move to sealed state
712
- Status: SEALED
713
-
714
- 5. ARCHIVE (/ant:entomb)
715
- Full archival
716
- Extract wisdom for lineage
717
- Preserve in eternal memory
718
- Status: ENTOMBED
719
- ```
720
-
721
- ### 4.4 Lineage & Inheritance
722
-
723
- ```
724
- LINEAGE EXAMPLE
725
- ===============
726
-
727
- ┌─────────────────┐
728
- │ Colony A │
729
- │ (Bug Fixes) │
730
- │ SEALED │
731
- └────────┬────────┘
732
-
733
- ┌──────────────┼──────────────┐
734
- │ │ │
735
- ▼ ▼ ▼
736
- ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
737
- │ Colony B │ │ Colony C │ │ Colony D │
738
- │ Foundation │ │ Integration │ │ Learning │
739
- │ ACTIVE │ │ PLANNED │ │ PLANNED │
740
- └──────────────┘ └──────────────┘ └──────────────┘
741
-
742
- Inheritance Flow:
743
- 1. Colony A seals → extracts pheromones
744
- 2. Colony B, C, D initialized
745
- 3. Each inhales Colony A's pheromones
746
- 4. Colony B adds new patterns
747
- 5. Colony C inherits from A + B
748
- ```
749
-
750
- ---
751
-
752
- ### 4.5 Concurrent Colony Execution (CRITICAL)
753
-
754
- **The Problem with Single Colony State:**
755
- - Current system: One `COLONY_STATE.json` per repo
756
- - Cannot work on multiple features simultaneously
757
- - No isolation between different work streams
758
-
759
- **Solution: Multiple Active Colonies with Fast Switching**
760
-
761
- ```
762
- CONCURRENT COLONY MODEL
763
- =======================
764
-
765
- Repository: MyProject
766
-
767
- Colony A (Auth Refactor) Colony B (Bug Fixes)
768
- ├─ State: ACTIVE ├─ State: ACTIVE
769
- ├─ Phase: 2/5 ├─ Phase: 1/3
770
- ├─ Workers: 3 running ├─ Workers: 0 (paused)
771
- └─ Files: src/auth/* └─ Files: src/utils/*
772
-
773
- Colony C (Performance) Colony D (Docs)
774
- ├─ State: SEALED ├─ State: PLANNED
775
- ├─ Completion: 100% ├─ Ready to start
776
- └─ Pheromones: extracted └─ Parent: Colony A
777
- ```
778
-
779
- **Switching Between Colonies:**
780
-
781
- ```bash
782
- # Current colony
783
- /ant:status
784
- > Active Colony: Colony A (Auth Refactor)
785
- > Phase: 2/5
786
-
787
- # Switch to Colony B
788
- /ant:tunnels --switch colony-B-bugfixes
789
- > Switched to Colony B
790
- > Resumed from paused state
791
-
792
- # Work on Colony B
793
- /ant:build
794
- ...
795
-
796
- # Switch back
797
- /ant:tunnels --switch colony-A-auth
798
- > Switched to Colony A
799
- > Resumed Phase 2
800
- ```
801
-
802
- **Isolation Strategy:**
803
-
804
- 1. **State Isolation**
805
- - Each colony has own `COLONY_STATE.json`
806
- - Each colony has own `activity.log`
807
- - Each colony has own `pheromones.json`
808
-
809
- 2. **File Change Isolation**
810
- - Colonies track different file sets
811
- - Git branches can be per-colony (optional)
812
- - Changes isolated until colony completes
813
-
814
- 3. **Worker Isolation**
815
- - Workers spawned in one colony don't affect others
816
- - Colony switch pauses active workers (gracefully)
817
- - Resume picks up where left off
818
-
819
- **Implementation:**
820
-
821
- ```json
822
- // Registry tracks multiple ACTIVE colonies
823
- {
824
- "current_colony": "colony-A-auth",
825
- "active_colonies": [
826
- {
827
- "id": "colony-A-auth",
828
- "status": "active",
829
- "last_active": "2026-02-15T10:00:00Z",
830
- "workers_running": 3
831
- },
832
- {
833
- "id": "colony-B-bugfixes",
834
- "status": "paused",
835
- "last_active": "2026-02-15T09:30:00Z",
836
- "workers_running": 0
837
- }
838
- ]
839
- }
840
- ```
841
-
842
- **Command: `/ant:tunnels --switch <colony-id>`**
843
-
844
- ```markdown
845
- ## Switch Process:
846
-
847
- 1. Save current colony state
848
- - Set status: paused
849
- - Record timestamp
850
- - Preserve worker context
851
-
852
- 2. Update symlink to new colony
853
- ```bash
854
- rm .aether/data/COLONY_STATE.json
855
- ln -s ../colonies/{new-id}/COLONY_STATE.json .aether/data/
856
- ```
857
-
858
- 3. Load new colony state
859
- - Set status: active
860
- - Display resume context
861
-
862
- 4. Output:
863
- ```
864
- 🕳️🐜🕳️ COLONY SWITCH
865
- ═══════════════════════════════════════════════════════
866
-
867
- From: Colony A (Auth Refactor) - Paused
868
- To: Colony B (Bug Fixes) - Resumed
869
-
870
- Colony B Status:
871
- 📍 Phase: 1/3
872
- 📋 Tasks: 2 completed, 1 in progress
873
- ⏸️ Resumed from: 2026-02-15 09:30
874
-
875
- Active pheromones:
876
- 🎯 FOCUS: error-handling
877
-
878
- ═══════════════════════════════════════════════════════
879
- ```
880
- ```
881
-
882
- **Benefits:**
883
- - Work on multiple features simultaneously
884
- - Context switch without losing state
885
- - Isolate experimental work
886
- - Parallel development tracks
887
- - Each colony learns independently
888
- - Cross-colony learning via eternal memory
889
-
890
- ---
891
-
892
- ## 5. Phase 1: Foundation
893
-
894
- **STATUS:** 🟡 PLANNED
895
- **DURATION:** 1-2 days
896
- **AGENTS:** 3 parallel tracks
897
- **DELIVERABLE:** Working eternal memory with auto-deposition
898
-
899
- ### 5.1 Overview
900
-
901
- Build the infrastructure for eternal memory and basic pheromone auto-deposition. This is the bedrock everything else builds on.
902
-
903
- ### 5.2 Agent Assignments
904
-
905
- #### AGENT A: Eternal Directory Structure
906
- **TASK:** Create `~/.aether/eternal/` and all subdirectories
907
-
908
- **Files to Create:**
909
- ```
910
- ~/.aether/
911
- ├── eternal/
912
- │ ├── queen-will.md
913
- │ ├── pheromones.json
914
- │ ├── stack-profile/
915
- │ ├── patterns/
916
- │ └── lineage/
917
- ```
918
-
919
- **Content Specifications:**
920
-
921
- `queen-will.md`:
922
- ```markdown
923
- # Queen's Will - Core Philosophies
924
-
925
- ## Emergence Over Orchestration
926
- Workers follow scent trails, not explicit commands.
927
- Let the colony learn. Let patterns emerge.
928
- Trust the pheromones.
929
-
930
- ## Minimal Change
931
- Prefer small, focused changes.
932
- No refactoring "while you're there".
933
- Change only what advances the goal.
934
-
935
- ## Documentation Through Action
936
- Don't write documentation that will rot.
937
- Write pheromones that guide future workers.
938
- Let the code speak, but scent the path.
939
-
940
- ## Biological Fidelity
941
- We are ants, not robots.
942
- We forget (decay).
943
- We follow trails (pheromones).
944
- We learn from failure (midden).
945
- We inherit wisdom (lineage).
946
- ```
947
-
948
- `pheromones.json`:
949
- ```json
950
- {
951
- "version": "1.0",
952
- "last_updated": "ISO-8601",
953
- "trails": [],
954
- "metadata": {
955
- "total_deposited": 0,
956
- "active_count": 0
957
- }
958
- }
959
- ```
960
-
961
- **ACCEPTANCE CRITERIA:**
962
- - [ ] Directory structure exists
963
- - [ ] Files have correct initial content
964
- - [ ] Permissions allow read/write
965
- - [ ] Validation passes
966
-
967
- **DEPENDENCIES:** None
968
-
969
- ---
970
-
971
- #### AGENT B: Pheromone JSON Schema
972
- **TASK:** Define and validate pheromone data structures
973
-
974
- **Files:**
975
- - `.aether/schemas/pheromone-v1.0.json` (JSON Schema)
976
- - `.aether/lib/pheromone-utils.sh` (validation functions)
977
-
978
- **Functions to Implement:**
979
- ```bash
980
- # pheromone-utils.sh
981
-
982
- pheromone_validate() {
983
- # Validate JSON against schema
984
- # Return: {"valid": true} or {"valid": false, "errors": []}
985
- }
986
-
987
- pheromone_create() {
988
- # Create new pheromone
989
- # Args: type, substance, strength, source, decay
990
- # Return: pheromone object
991
- }
992
-
993
- pheromone_decay() {
994
- # Calculate current strength
995
- # Args: pheromone, current_time
996
- # Return: decayed_strength
997
- }
998
-
999
- pheromone_purge_weak() {
1000
- # Move < 0.1 strength to midden
1001
- # Args: pheromones.json path
1002
- # Return: count moved
1003
- }
1004
-
1005
- pheromone_merge() {
1006
- # Merge two pheromone sources
1007
- # Args: existing, new
1008
- # Logic: strengthen if same substance
1009
- # Return: merged pheromone
1010
- }
1011
- ```
1012
-
1013
- **ACCEPTANCE CRITERIA:**
1014
- - [ ] JSON Schema validates all 6 pheromone types
1015
- - [ ] All utility functions work correctly
1016
- - [ ] Decay calculation accurate
1017
- - [ ] Tested with sample data
1018
-
1019
- **DEPENDENCIES:** Agent A (directory structure)
1020
-
1021
- ---
1022
-
1023
- #### AGENT C: Auto-Deposition in /ant:init
1024
- **TASK:** Modify init command to auto-deposit foundation pheromones
1025
-
1026
- **File:** `.claude/commands/ant/init.md`
1027
-
1028
- **Modifications:**
1029
-
1030
- Add to Step 3 (Write Colony State):
1031
- ```markdown
1032
- ### Step 3.5: Deposit Foundation Pheromones
1033
-
1034
- After writing COLONY_STATE.json, deposit initial pheromones:
1035
-
1036
- ```bash
1037
- # Create foundation pheromones
1038
- bash .aether/aether-utils.sh pheromone-deposit \
1039
- "PHILOSOPHY" \
1040
- "emergence-over-orchestration" \
1041
- 1.0 \
1042
- "queen:init" \
1043
- "never"
1044
-
1045
- bash .aether/aether-utils.sh pheromone-deposit \
1046
- "PHILOSOPHY" \
1047
- "minimal-change" \
1048
- 1.0 \
1049
- "queen:init" \
1050
- "never"
1051
-
1052
- # Display to user
1053
- ```
1054
- 🐜 Queen's scent established:
1055
- • PHILOSOPHY[emergence-over-orchestration]
1056
- • PHILOSOPHY[minimal-change]
1057
-
1058
- These guide all workers.
1059
- ```
1060
- ```
1061
-
1062
- **ACCEPTANCE CRITERIA:**
1063
- - [ ] /ant:init deposits 2 PHILOSOPHY pheromones
1064
- - [ ] User sees confirmation message
1065
- - [ ] Pheromones appear in eternal/pheromones.json
1066
- - [ ] Works on first colony (no parent)
1067
- - [ ] Works on subsequent colonies (with parent)
1068
-
1069
- **DEPENDENCIES:** Agent A (structure), Agent B (utils)
1070
-
1071
- ---
1072
-
1073
- ### 5.3 Phase 1 Integration Testing
1074
-
1075
- ```bash
1076
- # Test script for Phase 1
1077
-
1078
- echo "=== Phase 1: Foundation Tests ==="
1079
-
1080
- # Test 1: Directory structure
1081
- ls -la ~/.aether/eternal/ || exit 1
1082
-
1083
- # Test 2: Schema validation
1084
- bash .aether/lib/pheromone-utils.sh validate < test-pheromone.json || exit 1
1085
-
1086
- # Test 3: Auto-deposition
1087
- /ant:init "Test Colony"
1088
- grep -q "emergence" ~/.aether/eternal/pheromones.json || exit 1
1089
-
1090
- echo "=== Phase 1: ALL TESTS PASS ==="
1091
- ```
1092
-
1093
- ---
1094
-
1095
- ## 6. Phase 2: Integration
1096
-
1097
- **STATUS:** 🟡 PLANNED
1098
- **DURATION:** 2-3 days
1099
- **AGENTS:** 3 parallel tracks
1100
- **DELIVERABLE:** Queue system, enhanced commands, visibility
1101
-
1102
- ### 6.1 Overview
1103
-
1104
- Connect pheromones to the existing command system. Workers can receive pheromones mid-work. Users can see active trails.
1105
-
1106
- ### 6.2 Agent Assignments
1107
-
1108
- #### AGENT D: Pheromone Queue System
1109
- **TASK:** Implement mid-work injection without interrupting workers
1110
-
1111
- **Files:**
1112
- - `.aether/lib/pheromone-queue.sh`
1113
- - `.aether/data/pheromone-queue.json` (per colony)
1114
-
1115
- **Data Structure:**
1116
- ```json
1117
- {
1118
- "version": "1.0",
1119
- "queue": [
1120
- {
1121
- "id": "phem_queued_123",
1122
- "type": "FOCUS",
1123
- "substance": "error-handling",
1124
- "strength": 0.9,
1125
- "deposited_at": "ISO-8601",
1126
- "status": "queued|picked_up|applied",
1127
- "picked_up_by": "worker-name",
1128
- "picked_up_at": "ISO-8601"
1129
- }
1130
- ]
1131
- }
1132
- ```
1133
-
1134
- **Functions:**
1135
- ```bash
1136
- pheromone_queue_add() {
1137
- # Add pheromone to queue
1138
- # Args: type, substance, strength
1139
- }
1140
-
1141
- pheromone_queue_poll() {
1142
- # Check for queued pheromones
1143
- # Args: worker_name
1144
- # Return: array of pending pheromones
1145
- # Side effect: marks as picked_up
1146
- }
1147
-
1148
- pheromone_queue_apply() {
1149
- # Mark as applied after worker uses it
1150
- # Args: pheromone_id, worker_name
1151
- }
1152
-
1153
- pheromone_queue_cleanup() {
1154
- # Remove old applied entries
1155
- # Run periodically
1156
- }
1157
- ```
1158
-
1159
- **Worker Integration:**
1160
- Add to all worker prompts (build.md, swarm.md, etc.):
1161
- ```markdown
1162
- Check for new pheromones:
1163
- ```bash
1164
- bash .aether/aether-utils.sh pheromone-poll "{worker_name}"
1165
- ```
1166
-
1167
- If new scents detected, announce:
1168
- "🐜 [Worker-Name] New scent: FOCUS[error-handling]"
1169
- ```
1170
-
1171
- **ACCEPTANCE CRITERIA:**
1172
- - [ ] Can queue pheromone while workers active
1173
- - [ ] Workers detect at natural breakpoints
1174
- - [ ] No interruption to work flow
1175
- - [ ] Queue properly cleaned up
1176
-
1177
- **DEPENDENCIES:** Phase 1 complete
1178
-
1179
- ---
1180
-
1181
- #### AGENT E: Command Enhancements
1182
- **TASK:** Enhance /ant:focus, /ant:redirect, add pheromone visibility
1183
-
1184
- **Files Modified:**
1185
- - `.claude/commands/ant/focus.md`
1186
- - `.claude/commands/ant/redirect.md`
1187
- - `.claude/commands/ant/status.md`
1188
-
1189
- **/ant:focus Enhancement:**
1190
- ```markdown
1191
- Old: Just add to constraints.json
1192
- New:
1193
- 1. If workers active: queue pheromone
1194
- 2. If no workers: deposit immediately
1195
- 3. Display pheromone confirmation
1196
- 4. Update constraints.json (legacy)
1197
- ```
1198
-
1199
- **New Output:**
1200
- ```
1201
- 🐜 FOCUS TRAIL LAID
1202
- ═══════════════════════════════════════════════════════
1203
-
1204
- Type: FOCUS
1205
- Substance: authentication
1206
- Strength: 0.9
1207
- Decay: 30 days
1208
-
1209
- Status: queued for active workers
1210
- Active workers will detect at next checkpoint.
1211
-
1212
- All active trails:
1213
- 🎯 FOCUS: authentication (0.9)
1214
- 🎯 FOCUS: error-handling (0.7)
1215
- ⚠️ REDIRECT: regex-parsing (0.8)
1216
- ═══════════════════════════════════════════════
1217
- ```
1218
-
1219
- **/ant/status Enhancement:**
1220
- Add section:
1221
- ```markdown
1222
- ### Pheromone Status Display
1223
-
1224
- ```
1225
- Active Pheromone Trails:
1226
- 🎯 FOCUS: authentication (0.9) [12d remaining]
1227
- 🎯 FOCUS: error-handling (0.7) [8d remaining]
1228
- ⚠️ REDIRECT: regex-parsing (0.8) [45d remaining]
1229
- 📚 PATTERN: bash-for-file-ops (0.8) [82d remaining]
1230
- 💭 PHILOSOPHY: emergence (1.0) [eternal]
1231
-
1232
- Queued for workers: 1
1233
- Recent deposits: 3 (last 24h)
1234
- ```
1235
- ```
1236
-
1237
- **ACCEPTANCE CRITERIA:**
1238
- - [ ] /ant:focus queues or deposits correctly
1239
- - [ ] /ant:redirect queues or deposits correctly
1240
- - [ ] /ant:status shows pheromones
1241
- - [ ] Display matches specification
1242
-
1243
- **DEPENDENCIES:** Agent D (queue system)
1244
-
1245
- ---
1246
-
1247
- #### AGENT F: Worker Spawn-Time Priming
1248
- **TASK:** Workers inhale pheromones at spawn
1249
-
1250
- **Files Modified:**
1251
- - `.aether/workers.md` (update spawn protocol)
1252
- - `.claude/commands/ant/build.md` (worker prompts)
1253
- - `.claude/commands/ant/swarm.md` (scout prompts)
1254
-
1255
- **Worker Prompt Addition:**
1256
- ```markdown
1257
- **Spawn-Time Priming:**
1258
-
1259
- You are {Name}, a {emoji} {Caste} Ant.
1260
-
1261
- Inhale the colony's scent:
1262
- ```bash
1263
- # Read eternal memory
1264
- bash .aether/aether-utils.sh pheromone-inhale
1265
- ```
1266
-
1267
- This gives you:
1268
- - Queen's Will (core philosophies)
1269
- - Active FOCUS trails (what to prioritize)
1270
- - REDIRECT trails (what to avoid)
1271
- - Validated PATTERNs (best practices)
1272
-
1273
- Carry this context in your work.
1274
- ```
1275
-
1276
- **ACCEPTANCE CRITERIA:**
1277
- - [ ] Workers read eternal memory at spawn
1278
- - [ ] Workers receive active pheromones
1279
- - [ ] Output shows what was inhaled
1280
- - [ ] Context affects worker behavior
1281
-
1282
- **DEPENDENCIES:** Phase 1 complete
1283
-
1284
- ---
1285
-
1286
- ## 7. Phase 3: Learning
1287
-
1288
- **STATUS:** 🟡 PLANNED
1289
- **DURATION:** 3-4 days
1290
- **AGENTS:** 2 parallel tracks
1291
- **DELIVERABLE:** Pattern detection, milestone wisdom extraction
1292
-
1293
- ### 7.1 Overview
1294
-
1295
- The colony learns from its own behavior. Successful patterns become PHEROMONEs. Failed attempts go to midden.
1296
-
1297
- ### 7.2 Agent Assignments
1298
-
1299
- #### AGENT G: Pattern Detection
1300
- **TASK:** Detect patterns in worker behavior and deposit as PATTERN pheromones
1301
-
1302
- **Files:**
1303
- - `.aether/lib/pattern-detector.sh`
1304
- - `.aether/lib/learning-engine.sh`
1305
-
1306
- **Detection Rules:**
1307
- ```bash
1308
- # Pattern detection triggers
1309
-
1310
- # Rule 1: Tool preference
1311
- if [ $bash_count -gt 5 ] && [ $node_count -lt 2 ]; then
1312
- deposit_pattern "bash-for-file-ops" 0.7
1313
- fi
1314
-
1315
- # Rule 2: Validation success
1316
- if [ $validation_passed -eq 3 ]; then
1317
- strengthen_pattern "prefer-joi-over-zod" 0.1
1318
- fi
1319
-
1320
- # Rule 3: Error recovery
1321
- if [ $error_occurred ] && [ $recovery_successful ]; then
1322
- deposit_pattern "error-recovery-strategy" 0.6
1323
- fi
1324
-
1325
- # Rule 4: File organization
1326
- if [ $files_in_correct_dirs -gt 0.8 ]; then
1327
- deposit_pattern "directory-conventions" 0.7
1328
- fi
1329
- ```
1330
-
1331
- **Auto-Deposit at Milestones:**
1332
- ```bash
1333
- # After phase completion
1334
- pattern_detector_analyze_phase() {
1335
- phase_activity_log=$1
1336
-
1337
- # Count tool usage
1338
- # Identify repeated patterns
1339
- # Calculate confidence
1340
- # Deposit PATTERN pheromones
1341
- }
1342
- ```
1343
-
1344
- **ACCEPTANCE CRITERIA:**
1345
- - [ ] Detects tool preferences
1346
- - [ ] Detects validation patterns
1347
- - [ ] Deposits with appropriate strength
1348
- - [ ] Triggers at phase completion
1349
-
1350
- **DEPENDENCIES:** Phase 2 complete
1351
-
1352
- ---
1353
-
1354
- #### AGENT H: Milestone Wisdom Extraction
1355
- **TASK:** Extract and archive wisdom when sealing colony
1356
-
1357
- **File:** `.claude/commands/ant/seal.md` (enhanced)
1358
-
1359
- **Enhancement:**
1360
- ```markdown
1361
- ### Step X: Extract Pheromones
1362
-
1363
- Before sealing, analyze colony history:
1364
-
1365
- ```bash
1366
- # Extract patterns
1367
- bash .aether/lib/pattern-detector.sh extract \
1368
- --colony-id {id} \
1369
- --output .aether/data/extracted-pheromones.json
1370
-
1371
- # Deposit to eternal memory
1372
- for pheromone in extracted; do
1373
- bash .aether/aether-utils.sh pheromone-deposit \
1374
- "PATTERN" \
1375
- "$pheromone.substance" \
1376
- $pheromone.strength \
1377
- "milestone:phase-$phase" \
1378
- "90d"
1379
- done
1380
-
1381
- # Display
1382
- ```
1383
- 🐜 Wisdom archived: N patterns extracted
1384
- • PATTERN[...] (validated X times)
1385
- ...
1386
- ```
1387
- ```
1388
-
1389
- **ACCEPTANCE CRITERIA:**
1390
- - [ ] Analyzes entire colony activity
1391
- - [ ] Extracts meaningful patterns
1392
- - [ ] Deposits to eternal memory
1393
- - [ ] Shows user what was learned
1394
-
1395
- **DEPENDENCIES:** Agent G (pattern detection)
1396
-
1397
- ---
1398
-
1399
- ## 8. Phase 4: Colonize
1400
-
1401
- **STATUS:** 🟡 PLANNED
1402
- **DURATION:** 2-3 days
1403
- **AGENTS:** 1 focused track
1404
- **DELIVERABLE:** Deep codebase analysis command
1405
-
1406
- ### 8.1 Overview
1407
-
1408
- Create the `/ant:colonize` command for deep codebase mapping that deposits STACK and PATTERN pheromones.
1409
-
1410
- ### 8.2 Agent Assignments
1411
-
1412
- #### AGENT I: /ant:colonize Command
1413
- **TASK:** Implement deep codebase analysis
1414
-
1415
- **New File:** `.claude/commands/ant/colonize.md`
1416
-
1417
- **Full Command Specification:**
1418
- ```markdown
1419
- ---
1420
- name: ant:colonize
1421
- description: "🔍🐜🗺️ Deep codebase analysis - scouts map codebase and deposit pheromone trails"
1422
- ---
1423
-
1424
- ## Overview
1425
-
1426
- Send scouts to deeply analyze the codebase:
1427
- - Map directory structure
1428
- - Identify tech stack
1429
- - Extract conventions
1430
- - Find concerns (TODO/FIXME)
1431
- - Deposit STACK and PATTERN pheromones
1432
-
1433
- ## Scouts Deployed
1434
-
1435
- 1. **Structure Scout** - Directory mapping
1436
- 2. **Stack Scout** - Technology detection
1437
- 3. **Convention Scout** - Pattern analysis
1438
- 4. **Concern Scout** - Issue mining
1439
-
1440
- ## Output Files
1441
-
1442
- - `.aether/colony/stack.md`
1443
- - `.aether/colony/conventions.md`
1444
- - `.aether/colony/concerns.md`
1445
- - Updated `~/.aether/eternal/stack-profile/{detected}.md`
1446
- - Deposited pheromones
1447
-
1448
- ## Usage
1449
-
1450
- ```
1451
- /ant:colonize # Full analysis
1452
- /ant:colonize --quick # Surface scan only
1453
- /ant:colonize --deep # Include git history
1454
- ```
1455
- ```
1456
-
1457
- **Implementation Steps:**
1458
- 1. Deploy 4 scouts in parallel
1459
- 2. Collect findings
1460
- 3. Write analysis files
1461
- 4. Detect stack (nodejs, python, rust, etc.)
1462
- 5. Update stack-profile
1463
- 6. Deposit STACK pheromone
1464
- 7. Deposit discovered PATTERNs
1465
-
1466
- **ACCEPTANCE CRITERIA:**
1467
- - [ ] 4 scouts deployed correctly
1468
- - [ ] All output files created
1469
- - [ ] Stack detection accurate
1470
- - [ ] Pheromones deposited
1471
- - [ ] Integrates with eternal memory
1472
-
1473
- **DEPENDENCIES:** Phase 2 complete (can parallel with Phase 3)
1474
-
1475
- ---
1476
-
1477
- ## 9. Phase 5: Lineage
1478
-
1479
- **STATUS:** 🟡 PLANNED
1480
- **DURATION:** 2-3 days
1481
- **AGENTS:** 1 focused track
1482
- **DELIVERABLE:** Cross-colony inheritance system
1483
-
1484
- ### 9.1 Overview
1485
-
1486
- Enable colonies to inherit from prior colonies. Create the multi-colony architecture.
1487
-
1488
- ### 9.2 Agent Assignments
1489
-
1490
- #### AGENT J: Multi-Colony & Lineage System
1491
- **TASK:** Implement full multi-colony architecture
1492
-
1493
- **Files:**
1494
- - `.claude/commands/ant/lay-eggs.md` (NEW)
1495
- - `.claude/commands/ant/tunnels.md` (ENHANCED)
1496
- - `.claude/commands/ant/init.md` (ENHANCED - lineage)
1497
- - `.claude/commands/ant/entomb.md` (ENHANCED)
1498
- - `.aether/lib/colony-registry.sh`
1499
-
1500
- **Implementation:**
1501
-
1502
- 1. **Registry System**
1503
- - Create `.aether/colonies/registry.json`
1504
- - Implement CRUD operations
1505
- - Handle active colony symlink
1506
-
1507
- 2. **Colony Directory Migration**
1508
- - Move existing colony to `colonies/{id}/`
1509
- - Create symlink
1510
- - Preserve backward compatibility
1511
-
1512
- 3. **Lineage Tracking**
1513
- - Parent-child relationships
1514
- - Inheritance at init
1515
- - Pheromone copying
1516
-
1517
- 4. **Command Enhancements**
1518
- - `/ant:lay-eggs` - Create master plan
1519
- - `/ant:tunnels --switch` - Colony switching
1520
- - `/ant:entomb` - Proper archival
1521
-
1522
- **ACCEPTANCE CRITERIA:**
1523
- - [ ] Multiple colonies per repo
1524
- - [ ] Colony switching works
1525
- - [ ] Inheritance extracts pheromones
1526
- - [ ] Registry maintained correctly
1527
- - [ ] Backward compatibility preserved
1528
-
1529
- **DEPENDENCIES:** Phase 3 & 4 complete
1530
-
1531
- ---
1532
-
1533
- ## 10. Command Specifications
1534
-
1535
- ### 10.1 Command Matrix
1536
-
1537
- | Command | Modified | Purpose | Phase |
1538
- |---------|----------|---------|-------|
1539
- | `/ant:init` | ✅ Enhanced | Initialize with pheromone deposition | 1 |
1540
- | `/ant:focus` | ✅ Enhanced | Deposit FOCUS pheromone | 2 |
1541
- | `/ant:redirect` | ✅ Enhanced | Deposit REDIRECT pheromone | 2 |
1542
- | `/ant:status` | ✅ Enhanced | Show pheromone trails | 2 |
1543
- | `/ant:seal` | ✅ Enhanced | Extract wisdom on completion | 3 |
1544
- | `/ant:colonize` | 🆕 New | Deep analysis, deposit STACK | 4 |
1545
- | `/ant:lay-eggs` | 🆕 New | Multi-colony master plan | 5 |
1546
- | `/ant:tunnels` | ✅ Enhanced | Colony switching | 5 |
1547
- | `/ant:entomb` | ✅ Enhanced | Proper archival | 5 |
1548
-
1549
- ### 10.2 Detailed Command Specs
1550
-
1551
- [Each command gets 1-2 page detailed specification here including:
1552
- - Full prompt text
1553
- - All steps
1554
- - Error handling
1555
- - Output format
1556
- - Testing procedures]
1557
-
1558
- ---
1559
-
1560
- ### 10.3 Complete UX Flows
1561
-
1562
- **User Experience Scenarios**
1563
-
1564
- #### Scenario 1: First Colony Experience (Onboarding)
1565
-
1566
- ```
1567
- User: /ant:init "Build auth system"
1568
-
1569
- System:
1570
- [Standard init flow...]
1571
-
1572
- 🐜 FIRST COLONY DETECTED
1573
- ═══════════════════════════════════════════════════════
1574
-
1575
- Your Queen's scent is being established.
1576
-
1577
- Auto-deposited pheromones:
1578
- ✓ PHILOSOPHY[emergence-over-orchestration]
1579
- ✓ PHILOSOPHY[minimal-change]
1580
-
1581
- These guide all future workers in this colony.
1582
-
1583
- 💡 Tip: You can adjust worker behavior mid-flight:
1584
- /ant:focus "security" --strength 0.9
1585
-
1586
- ═══════════════════════════════════════════════════════
1587
-
1588
- 🌱🐜🆕🐜🌱 ═══════════════════════════════════════════════════
1589
- A E T H E R C O L O N Y
1590
- ═══════════════════════════════════════════════════ 🌱🐜🆕🐜🌱
1591
-
1592
- 👑 Queen has set the colony's intention
1593
-
1594
- "Build auth system"
1595
-
1596
- 🏠 Colony Status: READY
1597
- 📋 Session: session_1234567890_abc123
1598
-
1599
- 🐜 The colony awaits your command:
1600
-
1601
- /ant:plan 📋 Generate project plan
1602
- /ant:colonize 🗺️ Analyze existing codebase first
1603
- /ant:watch 👁️ Set up live visibility
1604
-
1605
- 💾 State persisted — safe to /clear, then run /ant:plan
1606
- ```
1607
-
1608
- ---
1609
-
1610
- #### Scenario 2: Mid-Work Pheromone Injection
1611
-
1612
- ```
1613
- [Workers actively building Phase 2...]
1614
-
1615
- User: /ant:focus "error-handling"
1616
-
1617
- System:
1618
- 🐜 FOCUSTRAIL LAID
1619
- ═══════════════════════════════════════════════════════
1620
-
1621
- Type: FOCUS
1622
- Substance: error-handling
1623
- Strength: 0.9
1624
- Status: queued for active workers
1625
-
1626
- Current workers: 3 active
1627
- Next checkpoint: within 60 seconds
1628
-
1629
- ═══════════════════════════════════════════════════════
1630
-
1631
- [30 seconds later, Prime Worker completes task]
1632
-
1633
- Prime Worker: "Checkpoint reached - checking for new scents..."
1634
- Prime Worker: "New scent detected: FOCUS[error-handling]"
1635
- Prime Worker: "Adjusting priorities..."
1636
- Prime Worker: [Continues work with new focus on error handling]
1637
- ```
1638
-
1639
- ---
1640
-
1641
- #### Scenario 3: Pattern Learning
1642
-
1643
- ```
1644
- [Worker completed 3 similar tasks]
1645
-
1646
- System:
1647
- 💡 PATTERN DETECTED
1648
- ═══════════════════════════════════════════════════════
1649
-
1650
- Workers consistently used: "check-file-exists-before-write"
1651
-
1652
- Suggested pheromone:
1653
- PATTERN[check-exists-before-write]
1654
- Confidence: 0.8 (based on 3 repetitions)
1655
-
1656
- Deposit this for future colonies? [Y/n/help]
1657
-
1658
- ═══════════════════════════════════════════════════════
1659
-
1660
- User: Y
1661
-
1662
- System:
1663
- 🐜 PHEROMONE DEPOSITED
1664
- ═══════════════════════════════════════════════════════
1665
-
1666
- Type: PATTERN
1667
- Substance: check-exists-before-write
1668
- Strength: 0.8
1669
- Source: worker:pattern-detection
1670
- Why: Detected 3 times in this phase
1671
-
1672
- This trail will guide future workers.
1673
- View all: /ant:status
1674
- ═══════════════════════════════════════════════════════
1675
- ```
1676
-
1677
- ---
1678
-
1679
- #### Scenario 4: Colony Completion & Wisdom Extraction
1680
-
1681
- ```
1682
- User: /ant:seal
1683
-
1684
- System:
1685
- 🏺 Colony Sealed - Crowned Anthill
1686
- ═══════════════════════════════════════════════════════
1687
-
1688
- 3 phases completed, 47 tasks done
1689
-
1690
- 🐜 Wisdom extracted and archived:
1691
-
1692
- PATTERNS (validated):
1693
- • PATTERN[prefer-joi-over-zod] (validated 5x)
1694
- • PATTERN[bash-for-file-ops] (used 12x)
1695
- • PATTERN[auth-middleware-pattern] (validated 3x)
1696
-
1697
- REDIRECTS (learned from failures):
1698
- • REDIRECT[avoid-sync-fs] (failed once, fixed)
1699
- • REDIRECT[no-deep-nesting] (caused issues)
1700
-
1701
- PHILOSOPHIES (milestone):
1702
- • PHILOSOPHY[auth-system-completed]
1703
-
1704
- Preserved in eternal memory for future colonies.
1705
- ═══════════════════════════════════════════════════════
1706
-
1707
- Next:
1708
- /ant:lay-eggs "Next feature" Start new colony with lineage
1709
- /ant:tunnels View all colonies
1710
- ```
1711
-
1712
- ---
1713
-
1714
- #### Scenario 5: Swarm Bug Fix & Immunity
1715
-
1716
- ```
1717
- User: /ant:swarm "Auth middleware failing intermittently"
1718
-
1719
- System:
1720
- [Swarm deploys 4 scouts...]
1721
- [Scouts investigate...]
1722
- [Fix applied...]
1723
-
1724
- 🔥 Swarm Resolved
1725
- ═══════════════════════════════════════════════════════
1726
-
1727
- Applied: Null check with early return
1728
- Files modified: src/auth/middleware.ts
1729
-
1730
- 🐜 Immunity deposited: REDIRECT[unchecked-null-access]
1731
- Future workers will guard against this pattern.
1732
-
1733
- Pattern archived in midden for reference.
1734
- ═══════════════════════════════════════════════════════
1735
- ```
1736
-
1737
- ---
1738
-
1739
- #### Scenario 6: Multi-Colony Switching
1740
-
1741
- ```
1742
- User: /ant:tunnels
1743
-
1744
- System:
1745
- 🕳️🐜🕳️ ═══════════════════════════════════════════════
1746
- C O L O N Y T U N N E L S
1747
- ═══════════════════════════════════════════════ 🕳️🐜🕳️
1748
-
1749
- Active Colonies:
1750
- # ID Goal
1751
- 1 20260215-auth-system-x2m4 Build auth system ← ACTIVE
1752
- 2 20260215-bugfixes-a7k9 Fix critical bugs (paused)
1753
- 3 20260215-performance-tuning-p9q1 Optimize queries (sealed)
1754
-
1755
- Commands:
1756
- /ant:tunnels --switch 2 Resume work on bug fixes
1757
- /ant:tunnels --archive Seal current colony
1758
- /ant:tunnels --compare 1 2 See differences
1759
-
1760
- ═══════════════════════════════════════════════════════
1761
-
1762
- User: /ant:tunnels --switch 2
1763
-
1764
- System:
1765
- 🕳️🐜🕳️ COLONY SWITCH
1766
- ═══════════════════════════════════════════════════════
1767
-
1768
- From: Colony 1 (Auth System) - Paused
1769
- To: Colony 2 (Bug Fixes) - Resumed
1770
-
1771
- Colony 2 Status:
1772
- 📍 Phase: 1/3
1773
- 📋 Tasks: 2 completed, 1 in progress
1774
- ⏸️ Resumed from: 2026-02-15 09:30
1775
-
1776
- Active pheromones:
1777
- 🎯 FOCUS: error-handling
1778
-
1779
- Ready to continue work.
1780
- ═══════════════════════════════════════════════════════
1781
- ```
1782
-
1783
- ---
1784
-
1785
- #### Scenario 7: Viewing Active Trails (/ant:sniff)
1786
-
1787
- ```
1788
- User: /ant:sniff
1789
-
1790
- System:
1791
- 🐜 ACTIVE PHEROMONE TRAILS
1792
- ═══════════════════════════════════════════════════════
1793
-
1794
- ETERNAL (never decay):
1795
- PHILOSOPHY[emergence-over-orchestration] ████████░░ 0.8
1796
- PHILOSOPHY[minimal-change] ████████░░ 0.8
1797
- DECREE[no-force-push] █████████░ 0.9
1798
-
1799
- FOCUS (decay: 30 days):
1800
- FOCUS[authentication-flow] █████████░ 0.9 (12 days left)
1801
- FOCUS[performance-optimization] ██████░░░░ 0.6 (5 days left)
1802
-
1803
- REDIRECT (decay: 60 days):
1804
- REDIRECT[regex-parsing] ███████░░░ 0.7 (45 days left)
1805
-
1806
- PATTERN (decay: 90 days):
1807
- PATTERN[bash-for-file-ops] ████████░░ 0.8 (78 days left)
1808
-
1809
- Queued for pickup:
1810
- FOCUS[error-handling] █████████░ 0.9 (waiting)
1811
-
1812
- ═══════════════════════════════════════════════════════
1813
- To emit: /ant:focus "<substance>" [--strength N]
1814
- ```
1815
-
1816
- ---
1817
-
1818
- ## 11. File Specifications
1819
-
1820
- ### 11.1 Complete File Inventory
1821
-
1822
- **NEW FILES (27 total):**
1823
- ```
1824
- ~/.aether/eternal/
1825
- ├── queen-will.md
1826
- ├── pheromones.json
1827
- ├── stack-profile/
1828
- │ ├── nodejs.md
1829
- │ ├── python.md
1830
- │ ├── rust.md
1831
- │ └── go.md
1832
- ├── patterns/
1833
- │ └── (emergent)
1834
- └── lineage/
1835
- └── colony-{id}/
1836
- ├── decisions.md
1837
- ├── lessons.md
1838
- └── pheromones.json
1839
-
1840
- .aether/
1841
- ├── colonies/
1842
- │ ├── registry.json
1843
- │ └── colony-{id}/
1844
- │ ├── COLONY_STATE.json
1845
- │ ├── activity.log
1846
- │ ├── constraints.json
1847
- │ ├── pheromones.json
1848
- │ ├── completion-report.md
1849
- │ └── events/
1850
- ├── schemas/
1851
- │ └── pheromone-v1.0.json
1852
- ├── lib/
1853
- │ ├── pheromone-utils.sh
1854
- │ ├── pheromone-queue.sh
1855
- │ ├── pattern-detector.sh
1856
- │ ├── learning-engine.sh
1857
- │ └── colony-registry.sh
1858
- └── colony/ (from /ant:colonize)
1859
- ├── stack.md
1860
- ├── conventions.md
1861
- └── concerns.md
1862
- ```
1863
-
1864
- **MODIFIED FILES (8 total):**
1865
- ```
1866
- .claude/commands/ant/
1867
- ├── init.md
1868
- ├── focus.md
1869
- ├── redirect.md
1870
- ├── status.md
1871
- ├── seal.md
1872
- ├── tunnels.md
1873
- ├── entomb.md
1874
- └── colonize.md (new)
1875
- └── lay-eggs.md (new)
1876
- ```
1877
-
1878
- ---
1879
-
1880
- ## 12. Testing Strategy
1881
-
1882
- ### 12.1 Test Categories
1883
-
1884
- 1. **Unit Tests** - Individual functions
1885
- 2. **Integration Tests** - Command workflows
1886
- 3. **End-to-End Tests** - Full colony lifecycle
1887
- 4. **Multi-Agent Tests** - Parallel coordination
1888
-
1889
- ### 12.2 Test Scenarios
1890
-
1891
- **Scenario 1: First Colony**
1892
- ```
1893
- 1. /ant:init "Test Goal"
1894
- 2. Verify PHILOSOPHY pheromones deposited
1895
- 3. Verify workers inhale at spawn
1896
- 4. Complete phase
1897
- 5. Verify PATTERN extraction
1898
- ```
1899
-
1900
- **Scenario 2: Mid-Work Pheromone**
1901
- ```
1902
- 1. Start /ant:build
1903
- 2. While workers active: /ant:focus "security"
1904
- 3. Verify queued
1905
- 4. Verify workers detect
1906
- 5. Verify behavior change
1907
- ```
1908
-
1909
- **Scenario 3: Lineage**
1910
- ```
1911
- 1. Seal Colony A
1912
- 2. /ant:init "Colony B" (should inherit)
1913
- 3. Verify pheromones copied
1914
- 4. Verify workers get parent context
1915
- ```
1916
-
1917
- ---
1918
-
1919
- ## 13. Appendices
1920
-
1921
- ### Appendix A: Quick Reference
1922
-
1923
- **Pheromone Types:** FOCUS, REDIRECT, PHILOSOPHY, STACK, PATTERN, DECREE
1924
-
1925
- **Decay Periods:** 30d, 60d, 90d, never
1926
-
1927
- **Key Commands:** init, focus, redirect, status, seal, colonize, lay-eggs, tunnels
1928
-
1929
- **File Locations:** ~/.aether/eternal/, .aether/colonies/, .aether/data/
1930
-
1931
- ### Appendix B: Migration Guide
1932
-
1933
- **From Single Colony:**
1934
- 1. Create registry
1935
- 2. Move current state to colonies/
1936
- 3. Create symlink
1937
- 4. Update all commands
1938
-
1939
- ### Appendix C: Troubleshooting
1940
-
1941
- **Issue:** Pheromones not decaying
1942
- **Fix:** Check decay job running
1943
-
1944
- **Issue:** Workers not detecting queue
1945
- **Fix:** Verify checkpoint polling
1946
-
1947
- **Issue:** Colony switch failed
1948
- **Fix:** Check symlink, registry integrity
1949
-
1950
- ---
1951
-
1952
- ## Document Control
1953
-
1954
- **Version:** 1.0
1955
- **Last Updated:** 2026-02-15
1956
- **Author:** Aether Design Team
1957
- **Reviewers:** (awaiting)
1958
- **Status:** Ready for Implementation
1959
-
1960
- **Change Log:**
1961
- - v1.0 (2026-02-15): Initial comprehensive specification
1962
-
1963
- ---
1964
-
1965
- ## 14. Advanced Multi-Colony Concepts
1966
-
1967
- ### 14.1 Colony Networks & Swarms
1968
-
1969
- **Concept:** Multiple colonies can form a "swarm"—coordinated colonies working on different aspects of the same large goal.
1970
-
1971
- ```
1972
- SWARM: "Rebuild Platform"
1973
- ├── Colony A: "Auth System Rewrite" (active)
1974
- ├── Colony B: "Database Migration" (active)
1975
- ├── Colony C: "API Modernization" (planning)
1976
- └── Colony D: "Frontend Refactor" (sealed)
1977
-
1978
- Shared Mound: platform-v2.0
1979
- ```
1980
-
1981
- **Swarm Behavior:**
1982
- - Colonies share eternal memory
1983
- - Cross-colony pheromone alerts (e.g., Colony A warns Colony B about auth breaking change)
1984
- - Swarm-wide status via `/ant:swarm --network`
1985
-
1986
- **Implementation:**
1987
- ```json
1988
- // .aether/colonies/swarm-config.json
1989
- {
1990
- "swarm_id": "platform-v2-rebuild",
1991
- "mound": "platform-v2.0",
1992
- "colonies": [
1993
- "20260215-auth-rewrite-x1a2",
1994
- "20260215-db-migration-b3c4",
1995
- "20260215-api-modern-d5e6"
1996
- ],
1997
- "shared_pheromones": true,
1998
- "cross_alerts": true
1999
- }
2000
- ```
2001
-
2002
- ### 14.2 Colony Templates
2003
-
2004
- **Concept:** Pre-configured colony blueprints for common project types.
2005
-
2006
- ```
2007
- Template: "web-api"
2008
- ├── PHILOSOPHY: rest-over-rpc
2009
- ├── PHILOSOPHY: test-driven-development
2010
- ├── FOCUS: validation
2011
- ├── STACK: nodejs-express
2012
- └── CASTE_ASSIGNMENTS:
2013
- ├── Builder: 3 ants
2014
- ├── Watcher: 1 ant
2015
- └── Scout: 1 ant
2016
-
2017
- Template: "react-frontend"
2018
- ├── PHILOSOPHY: component-first
2019
- ├── PHILOSOPHY: minimal-state
2020
- ├── FOCUS: accessibility
2021
- ├── STACK: react-typescript
2022
- └── CASTE_ASSIGNMENTS:
2023
- ├── Builder: 2 ants
2024
- ├── Watcher: 2 ants
2025
- └── Chaos: 1 ant
2026
- ```
2027
-
2028
- **Usage:**
2029
- ```bash
2030
- /ant:init --template web-api "Build user API"
2031
- ```
2032
-
2033
- ### 14.3 Colony Forking
2034
-
2035
- **Concept:** Create a child colony that diverges from parent to explore alternative approaches.
2036
-
2037
- ```
2038
- Colony A (main approach)
2039
- └── Fork: Colony A-experimental
2040
- └── Goal: "Same auth system but with JWT instead of sessions"
2041
- └── Inherits: All patterns from Colony A
2042
- └── Diverges: On auth implementation
2043
- └── Outcome: Compare, merge best approach
2044
- ```
2045
-
2046
- **Use Cases:**
2047
- - A/B testing implementation approaches
2048
- - Experimental refactoring
2049
- - Parallel exploration of solutions
2050
-
2051
- ### 14.4 Colony Merging
2052
-
2053
- **Concept:** When two colonies working on related features finish, their learnings merge.
2054
-
2055
- ```
2056
- Colony A: "User authentication"
2057
- Colony B: "Admin authentication"
2058
-
2059
- Merge creates:
2060
- ├── Unified auth patterns
2061
- ├── Combined pheromones (strength averaged)
2062
- ├── Cross-cutting concerns identified
2063
- └── New PHILOSOPHY: auth-consistency
2064
- ```
2065
-
2066
- ---
2067
-
2068
- ## 15. Hook System
2069
-
2070
- ### 15.1 Event Hooks
2071
-
2072
- **Concept:** User-defined scripts that run at key colony lifecycle moments.
2073
-
2074
- ```
2075
- .aether/hooks/
2076
- ├── pre-init.sh # Before colony initialization
2077
- ├── post-init.sh # After colony initialization
2078
- ├── pre-phase.sh # Before each phase starts
2079
- ├── post-phase.sh # After each phase completes
2080
- ├── on-error.sh # When errors occur
2081
- ├── on-pheromone.sh # When pheromones deposited
2082
- └── pre-seal.sh # Before colony sealed
2083
- ```
2084
-
2085
- **Example Hook (post-phase.sh):**
2086
- ```bash
2087
- #!/bin/bash
2088
- # Send notification when phase completes
2089
- PHASE=$1
2090
- STATUS=$2
2091
-
2092
- if [ "$STATUS" = "completed" ]; then
2093
- echo "✅ Phase $PHASE complete" | notify-send "Aether Colony"
2094
- fi
2095
-
2096
- # Auto-commit on phase complete
2097
- if [ "$STATUS" = "completed" ]; then
2098
- git add .
2099
- git commit -m "Phase $PHASE complete"
2100
- fi
2101
- ```
2102
-
2103
- ### 15.2 Hook Configuration
2104
-
2105
- ```json
2106
- // .aether/hooks/config.json
2107
- {
2108
- "enabled": {
2109
- "pre-init": true,
2110
- "post-phase": true,
2111
- "on-error": true,
2112
- "on-pheromone": false
2113
- },
2114
- "timeout_seconds": 30,
2115
- "fail_on_error": false
2116
- }
2117
- ```
2118
-
2119
- ### 15.3 Webhook Integration
2120
-
2121
- **Concept:** HTTP webhooks for external system integration.
2122
-
2123
- ```json
2124
- // .aeter/webhooks.json
2125
- {
2126
- "webhooks": [
2127
- {
2128
- "url": "https://api.slack.com/webhooks/colony",
2129
- "events": ["colony.initialized", "phase.completed", "colony.sealed"],
2130
- "headers": {
2131
- "Authorization": "Bearer ${SLACK_TOKEN}"
2132
- }
2133
- },
2134
- {
2135
- "url": "https://api.github.com/repos/user/repo/statuses/${SHA}",
2136
- "events": ["phase.completed"],
2137
- "condition": "phase_number >= 3"
2138
- }
2139
- ]
2140
- }
2141
- ```
2142
-
2143
- ---
2144
-
2145
- ## 16. Plugin Architecture
2146
-
2147
- ### 16.1 Plugin System Design
2148
-
2149
- **Concept:** Third-party extensions that add new capabilities to the colony.
2150
-
2151
- ```
2152
- .aether/plugins/
2153
- ├── plugin-coverage/ # Code coverage integration
2154
- │ ├── manifest.json
2155
- │ ├── hooks/
2156
- │ └── commands/
2157
- ├── plugin-deploy/ # Deployment automation
2158
- │ ├── manifest.json
2159
- │ └── lib/
2160
- └── plugin-metrics/ # Custom metrics collection
2161
- ├── manifest.json
2162
- └── collectors/
2163
- ```
2164
-
2165
- **Plugin Manifest:**
2166
- ```json
2167
- {
2168
- "name": "coverage",
2169
- "version": "1.0.0",
2170
- "description": "Track test coverage across colonies",
2171
- "author": "user",
2172
- "hooks": ["post-phase", "pre-seal"],
2173
- "commands": ["coverage:report", "coverage:compare"],
2174
- "dependencies": {
2175
- "aether": ">=3.0.0",
2176
- "tools": ["nyc", "c8"]
2177
- },
2178
- "config": {
2179
- "threshold": 80,
2180
- "report_format": "html"
2181
- }
2182
- }
2183
- ```
2184
-
2185
- ### 16.2 Plugin Hooks
2186
-
2187
- Plugins can register for colony events:
2188
-
2189
- ```javascript
2190
- // plugin-coverage/hooks/post-phase.js
2191
- module.exports = async (context) => {
2192
- const { phase, colony, results } = context;
2193
-
2194
- // Run coverage check
2195
- const coverage = await runCoverageCheck();
2196
-
2197
- // Deposit as PATTERN if threshold met
2198
- if (coverage.percent >= context.config.threshold) {
2199
- await colony.depositPheromone({
2200
- type: 'PATTERN',
2201
- substance: 'coverage-maintained',
2202
- strength: coverage.percent / 100,
2203
- evidence: [`Phase ${phase.number}: ${coverage.percent}% coverage`]
2204
- });
2205
- }
2206
-
2207
- // Store metrics
2208
- await colony.storeMetric('coverage', phase.number, coverage);
2209
- };
2210
- ```
2211
-
2212
- ### 16.3 Plugin Commands
2213
-
2214
- Plugins can add new slash commands:
2215
-
2216
- ```yaml
2217
- # plugin-coverage/commands/report.md
2218
- ---
2219
- name: coverage:report
2220
- description: Generate coverage report for current colony
2221
- ---
2222
-
2223
- Generate test coverage report:
2224
-
2225
- 1. Run coverage tool
2226
- 2. Compare to colony baseline
2227
- 3. Display trend
2228
- 4. Suggest improvements
2229
- ```
2230
-
2231
- ---
2232
-
2233
- ## 17. Custom Agent Design
2234
-
2235
- ### 17.1 Agent Definition Framework
2236
-
2237
- **Concept:** Users can define custom agent types beyond built-in castes.
2238
-
2239
- ```yaml
2240
- # .aether/agents/security-auditor.yaml
2241
- name: security-auditor
2242
- emoji: 🔒
2243
- color: red
2244
- description: Specialized agent for security reviews
2245
-
2246
- capabilities:
2247
- - static-analysis
2248
- - dependency-scanning
2249
- - pattern-matching
2250
- - owasp-checks
2251
-
2252
- triggers:
2253
- - on: pheromone
2254
- type: FOCUS
2255
- substance: security
2256
- - on: command
2257
- name: /ant:audit --security
2258
-
2259
- workflow:
2260
- 1: Scan dependencies for vulnerabilities
2261
- 2: Check for hardcoded secrets
2262
- 3: Validate input sanitization
2263
- 4: Review authentication flows
2264
- 5: Generate security report
2265
-
2266
- output_format: |
2267
- 🔒 {name} Security Report
2268
- =========================
2269
- Critical: {critical_count}
2270
- Warning: {warning_count}
2271
- Info: {info_count}
2272
-
2273
- Findings:
2274
- {findings}
2275
- ```
2276
-
2277
- ### 17.2 Agent Inheritance
2278
-
2279
- Agents can extend base castes:
2280
-
2281
- ```yaml
2282
- # .aether/agents/react-specialist.yaml
2283
- extends: builder
2284
- name: react-specialist
2285
- emoji: ⚛️
2286
-
2287
- specializations:
2288
- - react-hooks
2289
- - component-patterns
2290
- - state-management
2291
- - performance-optimization
2292
-
2293
- pheromone_sensitivity:
2294
- FOCUS[react]: 1.5x # Stronger response
2295
- FOCUS[vue]: 0.0x # Ignore
2296
- REDIRECT[class-components]: 2.0x # Strong avoidance
2297
- ```
2298
-
2299
- ### 17.3 Agent Swarming
2300
-
2301
- Multiple agents of same type coordinating:
2302
-
2303
- ```
2304
- Security Audit Swarm:
2305
- ├── 🔒 Security-1 Dependency scanning
2306
- ├── 🔒 Security-2 Static analysis
2307
- ├── 🔒 Security-3 Secret detection
2308
- └── 🔒 Security-4 OWASP validation
2309
-
2310
- Results aggregated by Queen
2311
- ```
2312
-
2313
- ---
2314
-
2315
- ## 18. Best Practices & Patterns
2316
-
2317
- ### 18.1 Anti-Patterns (REDIRECT these)
2318
-
2319
- ```
2320
- REDIRECT[colony-too-broad]
2321
- Why: Colonies with goals like "Fix everything" fail
2322
- Better: Specific, bounded goals
2323
-
2324
- REDIRECT[skip-validation]
2325
- Why: Assuming Phase N is correct without verification
2326
- Better: Always validate before seal
2327
-
2328
- REDIRECT[ignore-pheromones]
2329
- Why: Workers not checking eternal memory
2330
- Better: Spawn-time priming mandatory
2331
-
2332
- REDIRECT[over-engineer]
2333
- Why: Complex solutions for simple problems
2334
- Better: Minimal viable change
2335
-
2336
- REDIRECT[no-checkpoints]
2337
- Why: Long phases without save points
2338
- Better: Checkpoint every 30 mins
2339
- ```
2340
-
2341
- ### 18.2 Best Practices (PATTERN these)
2342
-
2343
- ```
2344
- PATTERN[small-phases]
2345
- Description: Keep phases under 2 hours of work
2346
- Rationale: Easier to validate, less risk
2347
-
2348
- PATTERN[pheromone-rich]
2349
- Description: Deposit pheromones liberally
2350
- Rationale: More guidance for future workers
2351
-
2352
- PATTERN[validate-early]
2353
- Description: Verify assumptions in Phase 1
2354
- Rationale: Catch issues before they compound
2355
-
2356
- PATTERN[document-decisions]
2357
- Description: Record why, not just what
2358
- Rationale: Future colonies understand context
2359
-
2360
- PATTERN[colony-focus]
2361
- Description: One colony per major concern
2362
- Rationale: Clear boundaries, clean inheritance
2363
- ```
2364
-
2365
- ### 18.3 Colony Sizing Guidelines
2366
-
2367
- ```
2368
- Micro Colony (< 1 day):
2369
- ├── Goal: Single feature or bug fix
2370
- ├── Phases: 1-2
2371
- ├── Workers: 2-3
2372
- └── Use case: Quick iterations
2373
-
2374
- Standard Colony (1-3 days):
2375
- ├── Goal: Feature set or refactoring
2376
- ├── Phases: 3-7
2377
- ├── Workers: 3-5
2378
- └── Use case: Most development work
2379
-
2380
- Mega Colony (1-2 weeks):
2381
- ├── Goal: Major initiative
2382
- ├── Phases: 8-15
2383
- ├── Workers: 5-8
2384
- └── Use case: Version releases, rewrites
2385
-
2386
- Swarm (multiple colonies):
2387
- ├── Goal: Cross-cutting changes
2388
- ├── Colonies: 3-6
2389
- ├── Coordination: Shared mound
2390
- └── Use case: Platform rebuilds
2391
- ```
2392
-
2393
- ---
2394
-
2395
- ## 19. Emergent Behaviors Philosophy
2396
-
2397
- ### 19.1 From Control to Emergence
2398
-
2399
- **Traditional Approach:**
2400
- ```
2401
- User → Detailed Instructions → AI → Output
2402
- (Explicit control)
2403
- ```
2404
-
2405
- **Emergent Approach:**
2406
- ```
2407
- User → Intent + Pheromones → Colony → Self-Organization → Output
2408
- (Guided emergence)
2409
- ```
2410
-
2411
- ### 19.2 Stigmergy in Code
2412
-
2413
- Stigmergy: Communication through environmental modification.
2414
-
2415
- ```
2416
- Real ants:
2417
- Ant A drops pheromone → Environment changed →
2418
- Ant B detects pheromone → Behavior modified
2419
-
2420
- Code ants:
2421
- Worker A deposits FOCUS[testing] → Eternal memory changed →
2422
- Worker B detects at spawn → Prioritizes test coverage
2423
- ```
2424
-
2425
- ### 19.3 Trophallaxis (Food Sharing)
2426
-
2427
- **Concept:** Knowledge transfer between workers.
2428
-
2429
- ```
2430
- Worker A (Builder) learns pattern:
2431
- "Use bash for file operations"
2432
-
2433
- Deposits PATTERN pheromone
2434
-
2435
- Worker B (Scout) inhales at spawn:
2436
- "I smell that bash is preferred"
2437
-
2438
- Worker B uses bash instead of node
2439
-
2440
- Pattern reinforced
2441
- ```
2442
-
2443
- ### 19.4 Midden Pile (Waste Management)
2444
-
2445
- Failed experiments aren't deleted—they're archived.
2446
-
2447
- ```
2448
- Colony attempts approach X → Fails →
2449
- Deposits to midden (with reason) →
2450
- Future colonies smell midden →
2451
- Avoid approach X
2452
- ```
2453
-
2454
- ### 19.5 Quorum Sensing
2455
-
2456
- **Concept:** Colony-wide decision making.
2457
-
2458
- ```
2459
- Multiple workers detect same issue:
2460
- ├── Worker A flags concern
2461
- ├── Worker B confirms concern
2462
- └── Worker C confirms concern
2463
-
2464
- Quorum reached → Colony behavior shifts
2465
- → REDIRECT deposited automatically
2466
- ```
2467
-
2468
- ---
2469
-
2470
- ## 20. Future Possibilities
2471
-
2472
- ### 20.1 AI-Native Features
2473
-
2474
- **Conceptual ideas not yet designed:**
2475
-
2476
- 1. **Predictive Pheromones**
2477
- - System predicts what patterns you'll need
2478
- - Pre-deposits based on code analysis
2479
-
2480
- 2. **Auto-Colonization**
2481
- - AI detects codebase needs
2482
- - Auto-spawns appropriate colonies
2483
-
2484
- 3. **Pheromone Evolution**
2485
- - Patterns mutate and compete
2486
- - Successful patterns reproduce
2487
- - Unsuccessful patterns die out
2488
-
2489
- 4. **Cross-Repository Learning**
2490
- - Patterns from Repo A apply to Repo B
2491
- - Global pattern database
2492
- - Community-contributed pheromones
2493
-
2494
- ### 20.2 Integration Ideas
2495
-
2496
- **Potential external integrations:**
2497
-
2498
- - **GitHub Actions:** CI/CD colony coordination
2499
- - **Linear/Jira:** Issue-driven colony spawning
2500
- - **Sentry:** Error-driven pattern detection
2501
- - **Figma:** Design-to-code colony pipelines
2502
- - **Notion:** Documentation-aware colonies
2503
-
2504
- ### 20.3 Visualization Enhancements
2505
-
2506
- **Future visual concepts:**
2507
-
2508
- - **3D Ant Hill:** VR/3D colony visualization
2509
- - **Pheromone Heatmap:** Visual trail intensity
2510
- - **Colony Timeline:** Gantt-style phase view
2511
- - **Pattern Network:** Graph of pattern relationships
2512
- - **Swarm View:** Multi-colony coordination map
2513
-
2514
- ### 20.4 Advanced Agent Concepts
2515
-
2516
- **Experimental agent types:**
2517
-
2518
- - **Alate (Winged Ant):** Explores new tech/stacks
2519
- - **Super-Major:** Heavy-lifter for complex refactors
2520
- - **Replete:** Storage specialist for large migrations
2521
- - **Nurse:** Onboards new agents, transfers knowledge
2522
- - **Soldier:** Guards against regressions
2523
-
2524
- ---
2525
-
2526
- ## 21. Implementation Roadmap (Extended)
2527
-
2528
- ### Phase 6: Ecosystem (Future)
2529
- - Plugin marketplace
2530
- - Community pheromone sharing
2531
- - Template repository
2532
- - Hook library
2533
-
2534
- ### Phase 7: Intelligence (Future)
2535
- - ML-based pattern detection
2536
- - Predictive colony spawning
2537
- - Auto-pheromone optimization
2538
- - Cross-repo learning
2539
-
2540
- ### Phase 8: Scale (Future)
2541
- - Distributed colonies
2542
- - Cloud-based eternal memory
2543
- - Team coordination
2544
- - Organization-wide patterns
2545
-
2546
- ---
2547
-
2548
- ## 22. Quick Start Recipes
2549
-
2550
- ### Recipe 1: Bug Fix Colony
2551
- ```bash
2552
- # Initialize focused colony
2553
- /ant:init "Fix login redirect bug"
2554
-
2555
- # Deposit context
2556
- /ant:focus "authentication"
2557
- /ant:focus "redirect-handling"
2558
-
2559
- # Build with tight feedback
2560
- /ant:build --castes builder,watcher
2561
-
2562
- # Seal when done
2563
- /ant:seal
2564
- ```
2565
-
2566
- ### Recipe 2: Feature Colony
2567
- ```bash
2568
- # Initialize with plan
2569
- /ant:init "Add password reset feature"
2570
-
2571
- # Analyze existing auth
2572
- /ant:colonize --focus auth
2573
-
2574
- # Lay eggs for multi-phase
2575
- /ant:lay-eggs "Password reset with email, token, UI"
2576
-
2577
- # Build each phase
2578
- /ant:build --phase 1
2579
- /ant:build --phase 2
2580
-
2581
- # Final seal
2582
- /ant:seal
2583
- ```
2584
-
2585
- ### Recipe 3: Refactoring Swarm
2586
- ```bash
2587
- # Create swarm config
2588
- echo '{"swarm_id": "backend-refactor", "colonies": []}' > .aether/swarm.json
2589
-
2590
- # Colony A: Database layer
2591
- /ant:init --swarm backend-refactor "Refactor DB layer"
2592
-
2593
- # Colony B: Service layer (parallel)
2594
- /ant:init --swarm backend-refactor "Refactor service layer"
2595
-
2596
- # Monitor swarm
2597
- /ant:swarm --network
2598
-
2599
- # Merge when complete
2600
- /ant:tunnels --merge A B
2601
- ```
2602
-
2603
- ---
2604
-
2605
- ## Appendix D: Glossary
2606
-
2607
- **Alate:** Winged ant capable of founding new colonies
2608
- **Castes:** Specialized worker types (Builder, Watcher, etc.)
2609
- **Chamber:** Archived colony state
2610
- **Colony:** Execution context with goal and phases
2611
- **Decay:** Pheromone strength reduction over time
2612
- **Eternal Memory:** Cross-colony persistent storage (~/.aether/eternal/)
2613
- **Focus:** Pheromone attracting attention to area
2614
- **Graveyard:** Failed attempt archive
2615
- **Lineage:** Parent-child colony relationships
2616
- **Midden:** Waste/archive pile for failed approaches
2617
- **Mound:** Master roadmap spanning multiple colonies
2618
- **Pheromone:** Persistent signal guiding behavior
2619
- **Queen:** User/colony initiator
2620
- **Redirect:** Pheromone warning away from anti-pattern
2621
- **Seal:** Complete and archive colony
2622
- **Stigmergy:** Indirect coordination through environment
2623
- **Trophallaxis:** Food/knowledge sharing between ants
2624
- **Worker:** AI agent performing tasks
2625
-
2626
- ---
2627
-
2628
- ## Document Control
2629
-
2630
- **Version:** 1.1
2631
- **Last Updated:** 2026-02-15
2632
- **Author:** Aether Design Team
2633
- **Reviewers:** (awaiting)
2634
- **Status:** Comprehensive Specification Ready
2635
-
2636
- **Change Log:**
2637
- - v1.1 (2026-02-15): Added Sections 14-22, hooks, plugins, custom agents, best practices
2638
- - v1.0 (2026-02-15): Initial comprehensive specification
2639
-
2640
- ---
2641
-
2642
- *The colony remembers. The colony learns. The colony evolves.*