@soleri/forge 9.0.0 → 9.2.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 (110) hide show
  1. package/dist/compose-claude-md.js +1 -1
  2. package/dist/compose-claude-md.js.map +1 -1
  3. package/dist/scaffold-filetree.js +10 -1
  4. package/dist/scaffold-filetree.js.map +1 -1
  5. package/dist/skills/brain-debrief/SKILL.md +70 -0
  6. package/dist/skills/brainstorming/SKILL.md +89 -0
  7. package/dist/skills/code-patrol/SKILL.md +86 -0
  8. package/dist/skills/context-resume/SKILL.md +95 -0
  9. package/dist/skills/deep-review/SKILL.md +186 -0
  10. package/dist/skills/executing-plans/SKILL.md +91 -0
  11. package/dist/skills/fix-and-learn/SKILL.md +102 -0
  12. package/dist/skills/health-check/SKILL.md +135 -0
  13. package/dist/skills/knowledge-harvest/SKILL.md +97 -0
  14. package/dist/skills/onboard-me/SKILL.md +121 -0
  15. package/dist/skills/parallel-execute/SKILL.md +277 -0
  16. package/dist/skills/retrospective/SKILL.md +98 -0
  17. package/dist/skills/second-opinion/SKILL.md +97 -0
  18. package/dist/skills/systematic-debugging/SKILL.md +103 -0
  19. package/dist/skills/test-driven-development/SKILL.md +91 -0
  20. package/dist/skills/vault-capture/SKILL.md +86 -0
  21. package/dist/skills/vault-navigator/SKILL.md +84 -0
  22. package/dist/skills/vault-smells/SKILL.md +251 -0
  23. package/dist/skills/verification-before-completion/SKILL.md +85 -0
  24. package/dist/skills/writing-plans/SKILL.md +108 -0
  25. package/dist/templates/agents-md.js +2 -2
  26. package/dist/templates/agents-md.js.map +1 -1
  27. package/dist/templates/claude-md-template.js +2 -2
  28. package/dist/templates/claude-md-template.js.map +1 -1
  29. package/dist/templates/shared-rules.js +35 -1
  30. package/dist/templates/shared-rules.js.map +1 -1
  31. package/dist/templates/skills.js +28 -6
  32. package/dist/templates/skills.js.map +1 -1
  33. package/dist/types.d.ts +1 -1
  34. package/dist/types.js +6 -2
  35. package/dist/types.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/__tests__/scaffolder.test.ts +17 -35
  38. package/src/compose-claude-md.ts +1 -1
  39. package/src/scaffold-filetree.ts +12 -1
  40. package/src/skills/brain-debrief/SKILL.md +70 -0
  41. package/src/skills/brainstorming/SKILL.md +89 -0
  42. package/src/skills/code-patrol/SKILL.md +86 -0
  43. package/src/skills/context-resume/SKILL.md +95 -0
  44. package/src/skills/deep-review/SKILL.md +186 -0
  45. package/src/skills/executing-plans/SKILL.md +91 -0
  46. package/src/skills/fix-and-learn/SKILL.md +102 -0
  47. package/src/skills/health-check/SKILL.md +135 -0
  48. package/src/skills/knowledge-harvest/SKILL.md +97 -0
  49. package/src/skills/onboard-me/SKILL.md +121 -0
  50. package/src/skills/parallel-execute/SKILL.md +277 -0
  51. package/src/skills/retrospective/SKILL.md +98 -0
  52. package/src/skills/second-opinion/SKILL.md +97 -0
  53. package/src/skills/systematic-debugging/SKILL.md +103 -0
  54. package/src/skills/test-driven-development/SKILL.md +91 -0
  55. package/src/skills/vault-capture/SKILL.md +86 -0
  56. package/src/skills/vault-navigator/SKILL.md +84 -0
  57. package/src/skills/vault-smells/SKILL.md +251 -0
  58. package/src/skills/verification-before-completion/SKILL.md +85 -0
  59. package/src/skills/writing-plans/SKILL.md +108 -0
  60. package/src/templates/agents-md.ts +2 -2
  61. package/src/templates/claude-md-template.ts +2 -2
  62. package/src/templates/shared-rules.ts +36 -1
  63. package/src/templates/skills.ts +27 -6
  64. package/src/types.ts +7 -2
  65. package/dist/skills/agent-dev.md +0 -122
  66. package/dist/skills/agent-guide.md +0 -110
  67. package/dist/skills/agent-persona.md +0 -66
  68. package/dist/skills/brain-debrief.md +0 -214
  69. package/dist/skills/brainstorming.md +0 -180
  70. package/dist/skills/code-patrol.md +0 -178
  71. package/dist/skills/context-resume.md +0 -146
  72. package/dist/skills/deliver-and-ship.md +0 -123
  73. package/dist/skills/env-setup.md +0 -151
  74. package/dist/skills/executing-plans.md +0 -216
  75. package/dist/skills/fix-and-learn.md +0 -167
  76. package/dist/skills/health-check.md +0 -231
  77. package/dist/skills/knowledge-harvest.md +0 -185
  78. package/dist/skills/onboard-me.md +0 -198
  79. package/dist/skills/retrospective.md +0 -205
  80. package/dist/skills/second-opinion.md +0 -149
  81. package/dist/skills/systematic-debugging.md +0 -241
  82. package/dist/skills/test-driven-development.md +0 -281
  83. package/dist/skills/vault-capture.md +0 -170
  84. package/dist/skills/vault-curate.md +0 -107
  85. package/dist/skills/vault-navigator.md +0 -140
  86. package/dist/skills/verification-before-completion.md +0 -182
  87. package/dist/skills/writing-plans.md +0 -215
  88. package/src/skills/agent-dev.md +0 -122
  89. package/src/skills/agent-guide.md +0 -110
  90. package/src/skills/agent-persona.md +0 -66
  91. package/src/skills/brain-debrief.md +0 -214
  92. package/src/skills/brainstorming.md +0 -180
  93. package/src/skills/code-patrol.md +0 -178
  94. package/src/skills/context-resume.md +0 -146
  95. package/src/skills/deliver-and-ship.md +0 -123
  96. package/src/skills/env-setup.md +0 -151
  97. package/src/skills/executing-plans.md +0 -216
  98. package/src/skills/fix-and-learn.md +0 -167
  99. package/src/skills/health-check.md +0 -231
  100. package/src/skills/knowledge-harvest.md +0 -185
  101. package/src/skills/onboard-me.md +0 -198
  102. package/src/skills/retrospective.md +0 -205
  103. package/src/skills/second-opinion.md +0 -149
  104. package/src/skills/systematic-debugging.md +0 -241
  105. package/src/skills/test-driven-development.md +0 -281
  106. package/src/skills/vault-capture.md +0 -170
  107. package/src/skills/vault-curate.md +0 -107
  108. package/src/skills/vault-navigator.md +0 -140
  109. package/src/skills/verification-before-completion.md +0 -182
  110. package/src/skills/writing-plans.md +0 -215
@@ -1,241 +0,0 @@
1
- ---
2
- name: systematic-debugging
3
- description: Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
4
- ---
5
-
6
- <!-- Adapted from superpowers (MIT License) -->
7
-
8
- # Systematic Debugging
9
-
10
- ## Overview
11
-
12
- Random fixes waste time and create new bugs. Quick patches mask underlying issues.
13
-
14
- **Core principle:** ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
15
-
16
- **Violating the letter of this process is violating the spirit of debugging.**
17
-
18
- ## The Iron Law
19
-
20
- ```
21
- NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
22
- ```
23
-
24
- If you haven't completed Phase 1, you cannot propose fixes.
25
-
26
- ## When to Use
27
-
28
- Use for ANY technical issue:
29
-
30
- - Test failures
31
- - Bugs in production
32
- - Unexpected behavior
33
- - Performance problems
34
- - Build failures
35
- - Integration issues
36
-
37
- **Use this ESPECIALLY when:**
38
-
39
- - Under time pressure (emergencies make guessing tempting)
40
- - "Just one quick fix" seems obvious
41
- - You've already tried multiple fixes
42
- - Previous fix didn't work
43
- - You don't fully understand the issue
44
-
45
- ## Phase 0: Search Before Investigating
46
-
47
- **BEFORE touching any code**, search for existing solutions. Follow this order:
48
-
49
- ### Vault First
50
-
51
- ```
52
- YOUR_AGENT_core op:search_intelligent
53
- params: { query: "<description of the bug or error message>" }
54
- ```
55
-
56
- If the vault has a matching anti-pattern or previous fix, it likely contains the root cause and solution — apply it directly. This can save hours of investigation.
57
-
58
- Also check brain strengths for relevant debugging patterns:
59
-
60
- ```
61
- YOUR_AGENT_core op:brain_strengths
62
- ```
63
-
64
- Check memory for similar bugs across sessions:
65
-
66
- ```
67
- YOUR_AGENT_core op:memory_search
68
- params: { query: "<error or symptom>" }
69
- ```
70
-
71
- ### Web Search Second
72
-
73
- If the vault has nothing, search the web before investigating from scratch:
74
-
75
- - **Paste the exact error message** — someone likely hit this before
76
- - **Check GitHub issues** on relevant libraries
77
- - **Check Stack Overflow** for the error + framework/library combination
78
- - **Check official docs** — is this a known limitation or misconfiguration?
79
-
80
- A 30-second search that finds "this is a known issue in v3.2, upgrade to v3.3" saves hours of root cause investigation.
81
-
82
- ### Then Investigate
83
-
84
- Only if vault and web search produce no answer, proceed to Phase 1.
85
-
86
- ## Start a Debug Loop
87
-
88
- For complex bugs, start a validation loop to track investigation iterations:
89
-
90
- ```
91
- YOUR_AGENT_core op:loop_start
92
- params: { prompt: "Debug: <bug description>", mode: "custom" }
93
- ```
94
-
95
- ## The Four Phases
96
-
97
- You MUST complete each phase before proceeding to the next.
98
-
99
- ### Phase 1: Root Cause Investigation
100
-
101
- **BEFORE attempting ANY fix:**
102
-
103
- 1. Read Error Messages Carefully
104
- 2. Reproduce Consistently
105
- 3. Check Recent Changes
106
- 4. Gather Evidence in Multi-Component Systems (add diagnostic instrumentation at each component boundary)
107
- 5. Trace Data Flow backward through call stack
108
-
109
- Track each investigation step:
110
-
111
- ```
112
- YOUR_AGENT_core op:loop_iterate
113
- ```
114
-
115
- ### Phase 2: Pattern Analysis
116
-
117
- 1. Find Working Examples
118
- 2. Compare Against References (read completely, don't skim)
119
- 3. Identify Differences
120
- 4. Understand Dependencies
121
-
122
- Search vault for working patterns to compare against:
123
-
124
- ```
125
- YOUR_AGENT_core op:search_intelligent
126
- params: { query: "<working feature similar to broken one>" }
127
- ```
128
-
129
- ### Phase 3: Hypothesis and Testing
130
-
131
- 1. Form Single Hypothesis ("I think X is the root cause because Y")
132
- 2. Test Minimally (one variable at a time)
133
- 3. Verify Before Continuing
134
- 4. When You Don't Know — say so, ask for help
135
-
136
- ### Phase 4: Implementation
137
-
138
- 1. Create Failing Test Case (use test-driven-development skill)
139
- 2. Implement Single Fix (root cause only, one change at a time)
140
- 3. Verify Fix
141
- 4. If Fix Doesn't Work: count attempts. If < 3, return to Phase 1. If >= 3, STOP and question architecture.
142
- 5. If 3+ Fixes Failed: Question Architecture — discuss with human partner before attempting more fixes.
143
-
144
- ## Phase 5: Capture the Learning
145
-
146
- Complete the debug loop:
147
-
148
- ```
149
- YOUR_AGENT_core op:loop_complete
150
- ```
151
-
152
- **MANDATORY after every resolved bug.** A fix without a capture is an incomplete fix.
153
-
154
- ```
155
- YOUR_AGENT_core op:capture_knowledge
156
- params: {
157
- title: "<short bug description>",
158
- description: "<root cause, solution, and what made it hard to find>",
159
- type: "anti-pattern",
160
- category: "<relevant domain>",
161
- tags: ["<relevant>", "<tags>"]
162
- }
163
- ```
164
-
165
- For quick captures when the fix is straightforward:
166
-
167
- ```
168
- YOUR_AGENT_core op:capture_quick
169
- params: {
170
- title: "<bug description>",
171
- description: "<root cause and fix>"
172
- }
173
- ```
174
-
175
- Capture a session summary:
176
-
177
- ```
178
- YOUR_AGENT_core op:session_capture
179
- params: { summary: "<bug, root cause, fix, files modified>" }
180
- ```
181
-
182
- This is what makes the agent smarter over time. Next time someone hits a similar bug, Phase 0 vault search will surface your solution immediately.
183
-
184
- ## Red Flags - STOP and Follow Process
185
-
186
- - "Quick fix for now, investigate later"
187
- - "Just try changing X and see if it works"
188
- - "Add multiple changes, run tests"
189
- - "Skip the test, I'll manually verify"
190
- - "It's probably X, let me fix that"
191
- - "I don't fully understand but this might work"
192
- - Proposing solutions before tracing data flow
193
- - "One more fix attempt" (when already tried 2+)
194
- - Each fix reveals new problem in different place
195
-
196
- **ALL of these mean: STOP. Return to Phase 1.**
197
-
198
- ## Common Rationalizations
199
-
200
- | Excuse | Reality |
201
- | -------------------------------------------- | ----------------------------------------------------------------------- |
202
- | "Issue is simple, don't need process" | Simple issues have root causes too. |
203
- | "Emergency, no time for process" | Systematic is FASTER than guess-and-check thrashing. |
204
- | "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
205
- | "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it. |
206
- | "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
207
- | "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. Read it completely. |
208
- | "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
209
- | "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question pattern, don't fix again. |
210
- | "Skip the vault, I know this one" | The vault may know it better. 30 seconds to check saves hours. |
211
-
212
- ## Quick Reference
213
-
214
- | Phase | Key Activities | Agent Tools |
215
- | --------------------- | -------------------------------- | -------------------------------------------------------- |
216
- | **0. Search First** | Vault search, web search, memory | `search_intelligent`, `brain_strengths`, `memory_search` |
217
- | **1. Root Cause** | Read errors, reproduce, trace | `loop_iterate` |
218
- | **2. Pattern** | Find working examples, compare | `search_intelligent` |
219
- | **3. Hypothesis** | Form theory, test minimally | `loop_iterate` |
220
- | **4. Implementation** | Create test, fix, verify | `loop_iterate` |
221
- | **5. Capture** | Persist root cause, close loop | `capture_knowledge`, `loop_complete`, `session_capture` |
222
-
223
- ## Agent Tools Reference
224
-
225
- | Op | When to Use |
226
- | -------------------- | ---------------------------------------- |
227
- | `search_intelligent` | Search vault for known bugs and patterns |
228
- | `brain_strengths` | Check proven debugging patterns |
229
- | `memory_search` | Search across session memories |
230
- | `loop_start` | Begin iterative debug cycle |
231
- | `loop_iterate` | Track each investigation/fix attempt |
232
- | `loop_complete` | Finish debug cycle |
233
- | `capture_knowledge` | Full anti-pattern capture |
234
- | `capture_quick` | Fast capture for simple fixes |
235
- | `session_capture` | Persist session context |
236
-
237
- **Related skills:**
238
-
239
- - test-driven-development
240
- - verification-before-completion
241
- - fix-and-learn (combines debugging + capture in one workflow)
@@ -1,281 +0,0 @@
1
- ---
2
- name: test-driven-development
3
- description: Use when implementing any feature or bugfix, before writing implementation code
4
- ---
5
-
6
- <!-- Adapted from superpowers (MIT License) -->
7
-
8
- # Test-Driven Development (TDD)
9
-
10
- ## Overview
11
-
12
- Write the test first. Watch it fail. Write minimal code to pass.
13
-
14
- **Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.
15
-
16
- **Violating the letter of the rules is violating the spirit of the rules.**
17
-
18
- ## When to Use
19
-
20
- **Always:**
21
-
22
- - New features
23
- - Bug fixes
24
- - Refactoring
25
- - Behavior changes
26
-
27
- **Exceptions (ask your human partner):**
28
-
29
- - Throwaway prototypes
30
- - Generated code
31
- - Configuration files
32
-
33
- Thinking "skip TDD just this once"? Stop. That's rationalization.
34
-
35
- ## Before You Start — Search First, Code Second
36
-
37
- **Never start writing tests blind.** Follow this lookup order:
38
-
39
- ### 1. Vault First
40
-
41
- Check for existing testing patterns in the knowledge base:
42
-
43
- ```
44
- YOUR_AGENT_core op:search_intelligent
45
- params: { query: "<what you're about to test>" }
46
- ```
47
-
48
- Look for:
49
-
50
- - **Testing patterns** for similar features (how were they tested before?)
51
- - **Anti-patterns** — common testing mistakes in this domain
52
- - **Proven approaches** from brain strengths:
53
-
54
- ```
55
- YOUR_AGENT_core op:brain_strengths
56
- ```
57
-
58
- If the vault has testing guidance for this domain, follow it. Don't reinvent test strategies that have already been validated.
59
-
60
- ### 2. Web Search
61
-
62
- If the vault has no relevant patterns, search the web for established testing approaches:
63
-
64
- - Library-specific testing patterns (e.g., how to test React hooks, Express middleware)
65
- - Best practices for the specific type of test (integration, e2e, unit)
66
- - Known gotchas in the testing framework being used
67
-
68
- ### 3. Then Write the Test
69
-
70
- Only after consulting vault and web, proceed to write the failing test. You'll write better tests when informed by existing knowledge.
71
-
72
- ## Start a TDD Loop
73
-
74
- For multi-test TDD cycles, start a validation loop to track iterations:
75
-
76
- ```
77
- YOUR_AGENT_core op:loop_start
78
- params: { prompt: "TDD: <feature being implemented>", mode: "custom" }
79
- ```
80
-
81
- ## The Iron Law
82
-
83
- ```
84
- NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
85
- ```
86
-
87
- Write code before the test? Delete it. Start over.
88
-
89
- **No exceptions:**
90
-
91
- - Don't keep it as "reference"
92
- - Don't "adapt" it while writing tests
93
- - Don't look at it
94
- - Delete means delete
95
-
96
- Implement fresh from tests. Period.
97
-
98
- ## Red-Green-Refactor
99
-
100
- ### RED - Write Failing Test
101
-
102
- Write one minimal test showing what should happen.
103
-
104
- Good: clear name, tests real behavior, one thing
105
- Bad: vague name, tests mock not code
106
-
107
- **Requirements:**
108
-
109
- - One behavior
110
- - Clear name
111
- - Real code (no mocks unless unavoidable)
112
-
113
- ### Verify RED - Watch It Fail
114
-
115
- **MANDATORY. Never skip.**
116
-
117
- Run: `npm test path/to/test.test.ts`
118
-
119
- Confirm:
120
-
121
- - Test fails (not errors)
122
- - Failure message is expected
123
- - Fails because feature missing (not typos)
124
-
125
- **Test passes?** You're testing existing behavior. Fix test.
126
- **Test errors?** Fix error, re-run until it fails correctly.
127
-
128
- Track the iteration:
129
-
130
- ```
131
- YOUR_AGENT_core op:loop_iterate
132
- ```
133
-
134
- ### GREEN - Minimal Code
135
-
136
- Write simplest code to pass the test. Don't add features, refactor other code, or "improve" beyond the test.
137
-
138
- ### Verify GREEN - Watch It Pass
139
-
140
- **MANDATORY.**
141
-
142
- Run: `npm test path/to/test.test.ts`
143
-
144
- Confirm:
145
-
146
- - Test passes
147
- - Other tests still pass
148
- - Output pristine (no errors, warnings)
149
-
150
- **Test fails?** Fix code, not test.
151
- **Other tests fail?** Fix now.
152
-
153
- Track the iteration:
154
-
155
- ```
156
- YOUR_AGENT_core op:loop_iterate
157
- ```
158
-
159
- ### REFACTOR - Clean Up
160
-
161
- After green only:
162
-
163
- - Remove duplication
164
- - Improve names
165
- - Extract helpers
166
-
167
- Keep tests green. Don't add behavior.
168
-
169
- ### Repeat
170
-
171
- Next failing test for next feature.
172
-
173
- ## Good Tests
174
-
175
- | Quality | Good | Bad |
176
- | ---------------- | ----------------------------------- | --------------------------------------------------- |
177
- | **Minimal** | One thing. "and" in name? Split it. | `test('validates email and domain and whitespace')` |
178
- | **Clear** | Name describes behavior | `test('test1')` |
179
- | **Shows intent** | Demonstrates desired API | Obscures what code should do |
180
-
181
- ## Why Order Matters
182
-
183
- Tests written after code pass immediately — proving nothing. Test-first forces you to watch the test fail, proving it actually tests something.
184
-
185
- ## Common Rationalizations
186
-
187
- | Excuse | Reality |
188
- | -------------------------------------- | ----------------------------------------------------------------------- |
189
- | "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
190
- | "I'll test after" | Tests passing immediately prove nothing. |
191
- | "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
192
- | "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
193
- | "Deleting X hours is wasteful" | Sunk cost fallacy. Keeping unverified code is technical debt. |
194
- | "Keep as reference, write tests first" | You'll adapt it. That's testing after. Delete means delete. |
195
- | "Need to explore first" | Fine. Throw away exploration, start with TDD. |
196
- | "Test hard = design unclear" | Listen to test. Hard to test = hard to use. |
197
- | "TDD will slow me down" | TDD faster than debugging. Pragmatic = test-first. |
198
- | "Manual test faster" | Manual doesn't prove edge cases. You'll re-test every change. |
199
- | "Existing code has no tests" | You're improving it. Add tests for existing code. |
200
-
201
- ## Red Flags - STOP and Start Over
202
-
203
- - Code before test
204
- - Test after implementation
205
- - Test passes immediately
206
- - Can't explain why test failed
207
- - Tests added "later"
208
- - Rationalizing "just this once"
209
- - "I already manually tested it"
210
- - "Tests after achieve the same purpose"
211
- - "It's about spirit not ritual"
212
- - "Keep as reference" or "adapt existing code"
213
- - "Already spent X hours, deleting is wasteful"
214
- - "TDD is dogmatic, I'm being pragmatic"
215
- - "This is different because..."
216
-
217
- **All of these mean: Delete code. Start over with TDD.**
218
-
219
- ## Verification Checklist
220
-
221
- Before marking work complete:
222
-
223
- - [ ] Every new function/method has a test
224
- - [ ] Watched each test fail before implementing
225
- - [ ] Each test failed for expected reason (feature missing, not typo)
226
- - [ ] Wrote minimal code to pass each test
227
- - [ ] All tests pass
228
- - [ ] Output pristine (no errors, warnings)
229
- - [ ] Tests use real code (mocks only if unavoidable)
230
- - [ ] Edge cases and errors covered
231
-
232
- Can't check all boxes? You skipped TDD. Start over.
233
-
234
- ## After TDD — Capture and Complete
235
-
236
- Complete the loop:
237
-
238
- ```
239
- YOUR_AGENT_core op:loop_complete
240
- ```
241
-
242
- If you discovered a new testing pattern, edge case, or anti-pattern during the TDD cycle, capture it:
243
-
244
- ```
245
- YOUR_AGENT_core op:capture_quick
246
- params: {
247
- title: "<testing pattern or anti-pattern>",
248
- description: "<what you learned, when it applies, why it matters>"
249
- }
250
- ```
251
-
252
- This compounds across sessions — next time someone works on similar code, the vault will surface your testing insight.
253
-
254
- ## When Stuck
255
-
256
- | Problem | Solution |
257
- | ---------------------- | -------------------------------------------------------------------- |
258
- | Don't know how to test | Write wished-for API. Write assertion first. Ask your human partner. |
259
- | Test too complicated | Design too complicated. Simplify interface. |
260
- | Must mock everything | Code too coupled. Use dependency injection. |
261
- | Test setup huge | Extract helpers. Still complex? Simplify design. |
262
-
263
- ## Final Rule
264
-
265
- ```
266
- Production code → test exists and failed first
267
- Otherwise → not TDD
268
- ```
269
-
270
- No exceptions without your human partner's permission.
271
-
272
- ## Agent Tools Reference
273
-
274
- | Op | When to Use |
275
- | -------------------- | ------------------------------------- |
276
- | `search_intelligent` | Find testing patterns before starting |
277
- | `brain_strengths` | Check proven testing approaches |
278
- | `loop_start` | Begin TDD validation loop |
279
- | `loop_iterate` | Track each red-green cycle |
280
- | `loop_complete` | Finish TDD loop |
281
- | `capture_quick` | Capture new testing patterns |
@@ -1,170 +0,0 @@
1
- ---
2
- name: vault-capture
3
- description: Use when the user says "capture this", "save to vault", "remember this pattern", "log this anti-pattern", "store this knowledge", "add to vault", "capture what we learned", or wants to persist a pattern, anti-pattern, workflow, or principle to the knowledge base.
4
- ---
5
-
6
- # Vault Capture — Persist Knowledge
7
-
8
- Capture patterns, anti-patterns, workflows, and principles to the vault. Captured knowledge compounds — it informs future vault searches, brain recommendations, and team reviews.
9
-
10
- ## When to Use
11
-
12
- After discovering something worth remembering: a solution that worked, a mistake to avoid, a workflow that proved effective, or a principle that should guide future work.
13
-
14
- ## Orchestration Sequence
15
-
16
- ### Step 1: Check for Duplicates
17
-
18
- Call `YOUR_AGENT_core op:search_intelligent` with the knowledge title or description. If a similar entry exists, consider updating it instead of creating a duplicate.
19
-
20
- ```
21
- YOUR_AGENT_core op:search_intelligent
22
- params: { query: "<knowledge title or description>" }
23
- ```
24
-
25
- Also run duplicate detection explicitly:
26
-
27
- ```
28
- YOUR_AGENT_core op:curator_detect_duplicates
29
- ```
30
-
31
- If duplicates are found, decide: update the existing entry or merge them.
32
-
33
- ### Step 2: Classify the Knowledge
34
-
35
- Determine the entry type:
36
-
37
- - **pattern** — Something that works and should be repeated
38
- - **anti-pattern** — Something that fails and should be avoided
39
- - **workflow** — A sequence of steps for a specific task
40
- - **principle** — A guiding rule or heuristic
41
- - **decision** — An architectural or design choice with rationale
42
-
43
- Use intent routing to help classify:
44
-
45
- ```
46
- YOUR_AGENT_core op:route_intent
47
- params: { prompt: "<description of the knowledge>" }
48
- ```
49
-
50
- ### Step 3: Capture
51
-
52
- For quick, single-entry captures:
53
- Call `YOUR_AGENT_core op:capture_knowledge` with:
54
-
55
- - **title**: Clear, searchable name
56
- - **description**: What it is and when it applies
57
- - **type**: From Step 2 classification
58
- - **category**: Domain area (e.g., "component-patterns", "api-design", "infrastructure")
59
- - **tags**: Searchable keywords
60
- - **example**: Code snippet or before/after if applicable
61
- - **why**: The reasoning — this is what makes the entry actionable
62
-
63
- ```
64
- YOUR_AGENT_core op:capture_knowledge
65
- params: {
66
- title: "<clear, searchable name>",
67
- description: "<what it is and when it applies>",
68
- type: "<pattern|anti-pattern|workflow|principle|decision>",
69
- category: "<domain area>",
70
- tags: ["<tag1>", "<tag2>"],
71
- example: "<code or before/after>",
72
- why: "<reasoning>"
73
- }
74
- ```
75
-
76
- For quick captures:
77
-
78
- ```
79
- YOUR_AGENT_core op:capture_quick
80
- params: { title: "<name>", description: "<details>" }
81
- ```
82
-
83
- ### Step 4: Post-Capture Quality
84
-
85
- After capturing, run the curator to ensure quality:
86
-
87
- **Groom the entry** — normalize tags, fix metadata:
88
-
89
- ```
90
- YOUR_AGENT_core op:curator_groom
91
- params: { entryId: "<captured entry id>" }
92
- ```
93
-
94
- **Enrich the entry** — use LLM to add context, improve description:
95
-
96
- ```
97
- YOUR_AGENT_core op:curator_enrich
98
- params: { entryId: "<captured entry id>" }
99
- ```
100
-
101
- **Check for contradictions** — does this conflict with existing knowledge?
102
-
103
- ```
104
- YOUR_AGENT_core op:curator_contradictions
105
- ```
106
-
107
- If contradictions found, resolve them:
108
-
109
- ```
110
- YOUR_AGENT_core op:curator_resolve_contradiction
111
- params: { contradictionId: "<id>" }
112
- ```
113
-
114
- ### Step 5: Handle Governance (if enabled)
115
-
116
- If governance policy requires review, the capture returns a `proposalId`. The entry is queued for approval.
117
-
118
- ```
119
- YOUR_AGENT_core op:governance_proposals
120
- params: { action: "list" }
121
- ```
122
-
123
- Present pending proposals to the user for approval.
124
-
125
- ### Step 6: Promote to Global (Optional)
126
-
127
- If the knowledge applies across projects (not project-specific):
128
-
129
- ```
130
- YOUR_AGENT_core op:memory_promote_to_global
131
- params: { entryId: "<entry id>" }
132
- ```
133
-
134
- This makes it available in cross-project searches and brain recommendations.
135
-
136
- ### Step 7: Verify Health
137
-
138
- Confirm the capture was stored and vault health is maintained:
139
-
140
- ```
141
- YOUR_AGENT_core op:admin_health
142
- ```
143
-
144
- Check vault analytics for overall knowledge quality:
145
-
146
- ```
147
- YOUR_AGENT_core op:admin_vault_analytics
148
- ```
149
-
150
- ## Exit Criteria
151
-
152
- Capture is complete when: the entry is stored (or queued for review), categorized, tagged, groomed, and vault health confirmed. If promoted to global, cross-project availability is verified.
153
-
154
- ## Agent Tools Reference
155
-
156
- | Op | When to Use |
157
- | ------------------------------- | ----------------------------------- |
158
- | `search_intelligent` | Check for duplicates before capture |
159
- | `curator_detect_duplicates` | Explicit duplicate detection |
160
- | `route_intent` | Help classify knowledge type |
161
- | `capture_knowledge` | Full-metadata capture |
162
- | `capture_quick` | Fast capture for simple entries |
163
- | `curator_groom` | Normalize tags and metadata |
164
- | `curator_enrich` | LLM-powered metadata enrichment |
165
- | `curator_contradictions` | Find conflicting entries |
166
- | `curator_resolve_contradiction` | Resolve conflicts |
167
- | `governance_proposals` | Check/manage approval queue |
168
- | `memory_promote_to_global` | Share across projects |
169
- | `admin_health` | Verify system health |
170
- | `admin_vault_analytics` | Overall knowledge quality metrics |