aether-colony 2.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.

Potentially problematic release.


This version of aether-colony might be problematic. Click here for more details.

Files changed (38) hide show
  1. package/.claude/commands/ant/ant.md +89 -0
  2. package/.claude/commands/ant/build.md +504 -0
  3. package/.claude/commands/ant/colonize.md +94 -0
  4. package/.claude/commands/ant/continue.md +674 -0
  5. package/.claude/commands/ant/feedback.md +65 -0
  6. package/.claude/commands/ant/flag.md +108 -0
  7. package/.claude/commands/ant/flags.md +139 -0
  8. package/.claude/commands/ant/focus.md +42 -0
  9. package/.claude/commands/ant/init.md +129 -0
  10. package/.claude/commands/ant/migrate-state.md +140 -0
  11. package/.claude/commands/ant/organize.md +210 -0
  12. package/.claude/commands/ant/pause-colony.md +87 -0
  13. package/.claude/commands/ant/phase.md +86 -0
  14. package/.claude/commands/ant/plan.md +409 -0
  15. package/.claude/commands/ant/redirect.md +53 -0
  16. package/.claude/commands/ant/resume-colony.md +83 -0
  17. package/.claude/commands/ant/status.md +122 -0
  18. package/.claude/commands/ant/watch.md +220 -0
  19. package/LICENSE +21 -0
  20. package/README.md +258 -0
  21. package/bin/cli.js +196 -0
  22. package/package.json +35 -0
  23. package/runtime/DISCIPLINES.md +93 -0
  24. package/runtime/QUEEN_ANT_ARCHITECTURE.md +347 -0
  25. package/runtime/aether-utils.sh +760 -0
  26. package/runtime/coding-standards.md +197 -0
  27. package/runtime/debugging.md +207 -0
  28. package/runtime/docs/pheromones.md +213 -0
  29. package/runtime/learning.md +254 -0
  30. package/runtime/planning.md +159 -0
  31. package/runtime/tdd.md +257 -0
  32. package/runtime/utils/atomic-write.sh +213 -0
  33. package/runtime/utils/colorize-log.sh +132 -0
  34. package/runtime/utils/file-lock.sh +122 -0
  35. package/runtime/utils/watch-spawn-tree.sh +185 -0
  36. package/runtime/verification-loop.md +159 -0
  37. package/runtime/verification.md +116 -0
  38. package/runtime/workers.md +671 -0
@@ -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
@@ -0,0 +1,207 @@
1
+ # Systematic Debugging Discipline
2
+
3
+ ## The Iron Law
4
+
5
+ ```
6
+ NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
7
+ ```
8
+
9
+ If you haven't completed Phase 1, you cannot propose fixes. Symptom fixes are failure.
10
+
11
+ ## When to Use
12
+
13
+ Use for ANY technical issue encountered during colony work:
14
+ - Test failures
15
+ - Build errors
16
+ - Unexpected behavior
17
+ - Performance problems
18
+ - Integration issues
19
+
20
+ **Use ESPECIALLY when:**
21
+ - Under time pressure (emergencies make guessing tempting)
22
+ - "Just one quick fix" seems obvious
23
+ - You've already tried multiple fixes
24
+ - Previous fix didn't work
25
+
26
+ ## The Four Phases
27
+
28
+ Complete each phase before proceeding to the next.
29
+
30
+ ### Phase 1: Root Cause Investigation
31
+
32
+ **BEFORE attempting ANY fix:**
33
+
34
+ 1. **Read Error Messages Carefully**
35
+ - Don't skip past errors or warnings
36
+ - Read stack traces completely
37
+ - Note line numbers, file paths, error codes
38
+
39
+ 2. **Reproduce Consistently**
40
+ - Can you trigger it reliably?
41
+ - What are the exact steps?
42
+ - If not reproducible → gather more data, don't guess
43
+
44
+ 3. **Check Recent Changes**
45
+ - What changed that could cause this?
46
+ - Git diff, recent commits
47
+ - New dependencies, config changes
48
+
49
+ 4. **Gather Evidence in Multi-Component Systems**
50
+ ```
51
+ For EACH component boundary:
52
+ - Log what data enters component
53
+ - Log what data exits component
54
+ - Verify environment/config propagation
55
+
56
+ Run once to gather evidence showing WHERE it breaks
57
+ THEN analyze to identify failing component
58
+ ```
59
+
60
+ 5. **Trace Data Flow (Root Cause Tracing)**
61
+
62
+ When error is deep in call stack:
63
+ - Where does bad value originate?
64
+ - What called this with bad value?
65
+ - Keep tracing UP until you find the source
66
+ - Fix at source, not at symptom
67
+
68
+ ```
69
+ Symptom → Immediate cause → What called this? → Keep tracing → Original trigger → FIX HERE
70
+ ```
71
+
72
+ ### Phase 2: Pattern Analysis
73
+
74
+ 1. **Find Working Examples**
75
+ - Locate similar working code in same codebase
76
+ - What works that's similar to what's broken?
77
+
78
+ 2. **Compare Against References**
79
+ - Read reference implementation COMPLETELY
80
+ - Don't skim - understand fully
81
+
82
+ 3. **Identify Differences**
83
+ - What's different between working and broken?
84
+ - List every difference, however small
85
+
86
+ ### Phase 3: Hypothesis and Testing
87
+
88
+ 1. **Form Single Hypothesis**
89
+ - State clearly: "I think X is the root cause because Y"
90
+ - Be specific, not vague
91
+
92
+ 2. **Test Minimally**
93
+ - Make SMALLEST possible change to test hypothesis
94
+ - One variable at a time
95
+ - Don't fix multiple things at once
96
+
97
+ 3. **Verify Before Continuing**
98
+ - Did it work? → Phase 4
99
+ - Didn't work? → Form NEW hypothesis
100
+ - DON'T add more fixes on top
101
+
102
+ ### Phase 4: Implementation
103
+
104
+ 1. **Create Failing Test Case**
105
+ - Simplest possible reproduction
106
+ - MUST have before fixing
107
+
108
+ 2. **Implement Single Fix**
109
+ - Address root cause identified
110
+ - ONE change at a time
111
+ - No "while I'm here" improvements
112
+
113
+ 3. **Verify Fix**
114
+ - Test passes now?
115
+ - No other tests broken?
116
+ - Issue actually resolved?
117
+
118
+ 4. **If Fix Doesn't Work**
119
+ - Count: How many fixes have you tried?
120
+ - If < 3: Return to Phase 1, re-analyze
121
+ - **If ≥ 3: STOP - question the architecture**
122
+
123
+ ## The 3-Fix Rule
124
+
125
+ **If 3+ fixes have failed:**
126
+
127
+ Pattern indicating architectural problem:
128
+ - Each fix reveals new problem in different place
129
+ - Fixes require "massive refactoring"
130
+ - Each fix creates new symptoms elsewhere
131
+
132
+ **STOP and question fundamentals:**
133
+ - Is this pattern fundamentally sound?
134
+ - Should we refactor architecture vs. continue fixing symptoms?
135
+
136
+ Report to parent/Queen with architectural concern before attempting more fixes.
137
+
138
+ ## Red Flags - STOP and Follow Process
139
+
140
+ If you catch yourself thinking:
141
+ - "Quick fix for now, investigate later"
142
+ - "Just try changing X and see if it works"
143
+ - "Add multiple changes, run tests"
144
+ - "It's probably X, let me fix that"
145
+ - "I don't fully understand but this might work"
146
+ - "One more fix attempt" (when already tried 2+)
147
+
148
+ **ALL of these mean: STOP. Return to Phase 1.**
149
+
150
+ ## Common Rationalizations
151
+
152
+ | Excuse | Reality |
153
+ |--------|---------|
154
+ | "Issue is simple, don't need process" | Simple issues have root causes too |
155
+ | "Emergency, no time for process" | Systematic is FASTER than thrashing |
156
+ | "Just try this first, then investigate" | First fix sets the pattern. Do it right. |
157
+ | "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
158
+ | "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause |
159
+
160
+ ## Quick Reference
161
+
162
+ | Phase | Key Activities | Exit Criteria |
163
+ |-------|---------------|---------------|
164
+ | **1. Root Cause** | Read errors, reproduce, trace data flow | Understand WHAT and WHY |
165
+ | **2. Pattern** | Find working examples, compare | Identify differences |
166
+ | **3. Hypothesis** | Form theory, test minimally | Confirmed or new hypothesis |
167
+ | **4. Implementation** | Create test, fix, verify | Bug resolved, tests pass |
168
+
169
+ ## Debugging Report Format
170
+
171
+ When reporting debugging work:
172
+
173
+ ```
174
+ 🔍 Debug Report
175
+ ===============
176
+
177
+ Issue: {what broke}
178
+
179
+ Phase 1 - Root Cause:
180
+ Error: {exact error message}
181
+ Reproduced: {yes/no, steps}
182
+ Trace: {call chain to source}
183
+ Root cause: {the actual source}
184
+
185
+ Phase 2 - Pattern:
186
+ Working example: {reference found}
187
+ Key difference: {what differs}
188
+
189
+ Phase 3 - Hypothesis:
190
+ Theory: {X causes Y because Z}
191
+ Test: {minimal change made}
192
+ Result: {confirmed/refuted}
193
+
194
+ Phase 4 - Fix:
195
+ Change: {what was changed}
196
+ Test: {failing test created}
197
+ Verified: {tests pass, issue resolved}
198
+
199
+ Fix count: {N}/3 max
200
+ ```
201
+
202
+ ## Real-World Impact
203
+
204
+ - Systematic approach: 15-30 minutes to fix
205
+ - Random fixes approach: 2-3 hours of thrashing
206
+ - First-time fix rate: 95% vs 40%
207
+ - New bugs introduced: Near zero vs common
@@ -0,0 +1,213 @@
1
+ # Pheromone Signals -- User Guide
2
+
3
+ Pheromones are how you communicate with the colony. Instead of micromanaging individual ants, you emit chemical signals that influence their behavior based on each caste's sensitivity. Signals decay over time, so the colony naturally returns to neutral behavior.
4
+
5
+ ## How Pheromones Work
6
+
7
+ - **You emit** signals using `/ant:focus`, `/ant:redirect`, `/ant:feedback`
8
+ - **The colony also emits** signals automatically after builds (FEEDBACK after every phase, REDIRECT when error patterns recur)
9
+ - **Signals decay** exponentially -- a FOCUS signal at strength 0.7 with a 1-hour half-life will be at ~0.35 after an hour
10
+ - **Each caste responds differently** -- builders are highly sensitive to FOCUS (0.9), while architects barely notice it (0.4)
11
+
12
+ Run `/ant:status` at any time to see all active pheromones and their current strength.
13
+
14
+ ## FOCUS -- Guide Attention
15
+
16
+ **Command:** `/ant:focus "<area>"`
17
+ **Strength:** 0.7 | **Half-life:** 1 hour | **Decays to noise in:** ~3-4 hours
18
+
19
+ **What it does:** Tells the colony "pay extra attention here." Workers with high FOCUS sensitivity will prioritize this area in their next task.
20
+
21
+ **Highest sensitivity:** Builder (0.9), Scout (0.9), Watcher (0.8)
22
+ **Lowest sensitivity:** Architect (0.4), Route-setter (0.5)
23
+
24
+ ### When to use FOCUS
25
+
26
+ **Scenario 1: Steering the next build phase**
27
+ You're about to run `/ant:build 3` and Phase 3 has tasks touching both the API layer and the database layer. You know the database schema is fragile and needs careful attention:
28
+
29
+ ```
30
+ /ant:focus "database schema -- handle migrations carefully"
31
+ /ant:build 3
32
+ ```
33
+
34
+ The builder-ant (sensitivity 0.9) will receive an effective signal of 0.63, crossing the PRIORITIZE threshold (>0.5). It will weight database-related tasks with extra care and thoroughness.
35
+
36
+ **Scenario 2: Post-build quality concern**
37
+ The watcher scored Phase 2 at 6/10 and flagged auth middleware issues. Before continuing to Phase 3:
38
+
39
+ ```
40
+ /ant:focus "auth middleware correctness"
41
+ /ant:continue
42
+ ```
43
+
44
+ The next phase's watcher (sensitivity 0.8) will scrutinize auth middleware more carefully during verification.
45
+
46
+ **Scenario 3: Directing colonization**
47
+ You're colonizing a new project and want the colonizer to pay special attention to the testing infrastructure:
48
+
49
+ ```
50
+ /ant:focus "test framework and coverage gaps"
51
+ /ant:colonize
52
+ ```
53
+
54
+ The colonizer (sensitivity 0.7) will weight test infrastructure discovery higher in its analysis.
55
+
56
+ ### When NOT to use FOCUS
57
+
58
+ - Don't stack 5+ FOCUS signals -- the colony can't prioritize everything (that's prioritizing nothing)
59
+ - Don't FOCUS on things the colony already handles (like "write good code") -- be specific
60
+ - Don't FOCUS after a phase completes if you're about to `/clear` context -- the signal persists in pheromones.json, but emit it fresh before the next build for strongest effect
61
+
62
+ ---
63
+
64
+ ## REDIRECT -- Warn Away
65
+
66
+ **Command:** `/ant:redirect "<pattern to avoid>"`
67
+ **Strength:** 0.9 | **Half-life:** 24 hours | **Decays to noise in:** ~3-4 days
68
+
69
+ **What it does:** Acts as a hard constraint. Workers with high REDIRECT sensitivity will actively avoid the specified pattern. This is the strongest, longest-lasting signal.
70
+
71
+ **Highest sensitivity:** Builder (0.9), Route-setter (0.8)
72
+ **Lowest sensitivity:** Architect (0.3), Colonizer (0.3)
73
+
74
+ ### When to use REDIRECT
75
+
76
+ **Scenario 1: Preventing a known bad approach**
77
+ Your project uses Next.js Edge Runtime, and you know `jsonwebtoken` doesn't work there (CommonJS issues). Before the colony builds auth:
78
+
79
+ ```
80
+ /ant:redirect "Don't use jsonwebtoken -- use jose library instead (Edge Runtime compatible)"
81
+ /ant:build 2
82
+ ```
83
+
84
+ The builder (sensitivity 0.9) receives effective signal 0.81 -- deep in PRIORITIZE territory. It will actively avoid jsonwebtoken and use jose instead.
85
+
86
+ **Scenario 2: Steering away from a previous failure**
87
+ Phase 1 tried to use synchronous file reads and caused performance issues (you saw this in the watcher report). Before Phase 2:
88
+
89
+ ```
90
+ /ant:redirect "No synchronous file I/O -- use async fs/promises"
91
+ ```
92
+
93
+ The route-setter (sensitivity 0.8) will exclude synchronous patterns from the task plan. The builder will avoid them in implementation.
94
+
95
+ **Scenario 3: Architectural constraint**
96
+ You want the colony to avoid global mutable state because the project might need server-side rendering:
97
+
98
+ ```
99
+ /ant:redirect "No global mutable state -- use request-scoped context"
100
+ ```
101
+
102
+ This signal persists for 24 hours (half-life), covering multiple build phases without re-emission.
103
+
104
+ ### When NOT to use REDIRECT
105
+
106
+ - Don't REDIRECT for preferences -- use it for hard constraints ("will break" not "I don't like")
107
+ - Don't REDIRECT on vague patterns ("don't write bad code") -- be specific about the approach to avoid and why
108
+ - Don't use REDIRECT when FOCUS would suffice -- if you want more attention on testing, FOCUS on testing rather than REDIRECT away from skipping tests
109
+
110
+ ---
111
+
112
+ ## FEEDBACK -- Adjust Course
113
+
114
+ **Command:** `/ant:feedback "<observation>"`
115
+ **Strength:** 0.5 | **Half-life:** 6 hours | **Decays to noise in:** ~20 hours
116
+
117
+ **What it does:** Provides gentle course correction. Unlike FOCUS (attention) or REDIRECT (avoidance), FEEDBACK adjusts the colony's approach based on your observations. The watcher is most sensitive to this signal.
118
+
119
+ **Highest sensitivity:** Watcher (0.9), Builder (0.7), Route-setter (0.7)
120
+ **Lowest sensitivity:** Architect (0.6), Colonizer (0.5), Scout (0.5)
121
+
122
+ ### When to use FEEDBACK
123
+
124
+ **Scenario 1: Mid-project course correction**
125
+ After building Phase 2, you review the output and notice the code is over-engineered -- too many abstractions for a simple feature:
126
+
127
+ ```
128
+ /ant:feedback "Code is too abstract -- prefer simple, direct implementations over clever abstractions"
129
+ ```
130
+
131
+ The builder (0.7) and watcher (0.9) both pick this up. The builder simplifies its approach in Phase 3. The watcher (effective signal 0.45 -- NOTE range) factors simplicity into its quality assessment.
132
+
133
+ **Scenario 2: Positive reinforcement**
134
+ Phase 3 produced clean, well-tested code. You want more of the same:
135
+
136
+ ```
137
+ /ant:feedback "Great test coverage in Phase 3 -- maintain this level of testing"
138
+ ```
139
+
140
+ The colony records this as a positive signal. The builder continues the pattern; the watcher validates against it.
141
+
142
+ **Scenario 3: Quality emphasis shift**
143
+ The watcher is scoring phases highly but you're noticing the code lacks error handling:
144
+
145
+ ```
146
+ /ant:feedback "Need more error handling -- happy path works but edge cases are unhandled"
147
+ ```
148
+
149
+ The watcher (sensitivity 0.9, effective 0.45) will increase scrutiny on error handling in its next verification pass.
150
+
151
+ ### When NOT to use FEEDBACK
152
+
153
+ - Don't use FEEDBACK for hard constraints -- that's REDIRECT's job
154
+ - Don't use FEEDBACK before the colony has produced anything -- it responds to observations, not predictions
155
+ - Don't emit multiple conflicting FEEDBACK signals ("more abstraction" + "keep it simple") -- the colony can't resolve contradictions
156
+
157
+ ---
158
+
159
+ ## Auto-Emitted Pheromones
160
+
161
+ The colony emits pheromones automatically during builds. You don't need to manage these:
162
+
163
+ - **FEEDBACK after every phase:** build.md (Step 7b) emits a FEEDBACK pheromone summarizing what worked and what failed. Source: `auto:build`
164
+ - **REDIRECT on error patterns:** If errors.json has recurring flagged patterns, build.md and continue.md auto-emit REDIRECT signals to steer future phases away from the problematic pattern. Source: `auto:build` or `auto:continue`
165
+ - **FEEDBACK from global learnings:** When colonizing a new project, colonize.md injects relevant global learnings as FEEDBACK pheromones. Source: `global:inject`
166
+
167
+ Auto-emitted signals have `"auto": true` in pheromones.json and are visible in `/ant:status`.
168
+
169
+ ---
170
+
171
+ ## Signal Combinations
172
+
173
+ Pheromones combine. Each worker's spec defines combination effects:
174
+
175
+ | Combination | Effect |
176
+ |-------------|--------|
177
+ | FOCUS + FEEDBACK | Workers concentrate on the focused area and adjust approach based on feedback |
178
+ | FOCUS + REDIRECT | Workers prioritize the focused area while avoiding the redirected pattern |
179
+ | FEEDBACK + REDIRECT | Workers adjust approach (feedback) and avoid specific patterns (redirect) |
180
+ | All three | Full steering: attention (FOCUS), avoidance (REDIRECT), and adjustment (FEEDBACK) |
181
+
182
+ **Effective signal formula:** `caste_sensitivity x current_strength`
183
+
184
+ Thresholds:
185
+ - **> 0.5 PRIORITIZE** -- worker restructures behavior around this signal
186
+ - **0.3-0.5 NOTE** -- worker is aware, factors into decisions
187
+ - **< 0.3 IGNORE** -- signal too weak to act on
188
+
189
+ ---
190
+
191
+ ## Quick Reference
192
+
193
+ | Signal | Command | Strength | Half-life | Use for |
194
+ |--------|---------|----------|-----------|---------|
195
+ | FOCUS | `/ant:focus "<area>"` | 0.7 | 1 hour | "Pay attention to this" |
196
+ | REDIRECT | `/ant:redirect "<avoid>"` | 0.9 | 24 hours | "Don't do this" |
197
+ | FEEDBACK | `/ant:feedback "<note>"` | 0.5 | 6 hours | "Adjust based on this" |
198
+
199
+ | | FOCUS | REDIRECT | FEEDBACK |
200
+ |---|---|---|---|
201
+ | Builder | 0.9 | 0.9 | 0.7 |
202
+ | Scout | 0.9 | 0.4 | 0.5 |
203
+ | Watcher | 0.8 | 0.5 | 0.9 |
204
+ | Colonizer | 0.7 | 0.3 | 0.5 |
205
+ | Route-setter | 0.5 | 0.8 | 0.7 |
206
+ | Architect | 0.4 | 0.3 | 0.6 |
207
+
208
+ **Rule of thumb:**
209
+ - Before a build: FOCUS + REDIRECT to steer
210
+ - After a build: FEEDBACK to adjust
211
+ - For hard constraints: REDIRECT (strongest signal, longest decay)
212
+ - For gentle nudges: FEEDBACK (moderate signal, medium decay)
213
+ - For attention: FOCUS (moderate signal, short decay -- re-emit if needed)