@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
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: onboard-me
3
+ description: >
4
+ Use when someone is new to the PROJECT and needs orientation — "onboard me", "I'm new here",
5
+ "project overview", "what should I know about this codebase". Questions about the project's
6
+ patterns and conventions, not about the agent's capabilities (use agent-guide for that).
7
+ ---
8
+
9
+ # Onboard Me — Instant Project Intelligence
10
+
11
+ Structured tour of everything the vault knows about this project. Decisions, patterns, anti-patterns, conventions — all in one walkthrough.
12
+
13
+ ## Steps
14
+
15
+ ### 1. Project Overview
16
+
17
+ ```
18
+ YOUR_AGENT_core op:identity
19
+ YOUR_AGENT_core op:project_get
20
+ YOUR_AGENT_core op:project_list_rules
21
+ YOUR_AGENT_core op:get_behavior_rules
22
+ ```
23
+
24
+ ### 2. Knowledge Landscape
25
+
26
+ ```
27
+ YOUR_AGENT_core op:vault_domains
28
+ YOUR_AGENT_core op:vault_tags
29
+ YOUR_AGENT_core op:admin_vault_size
30
+ ```
31
+
32
+ ### 3. Critical Knowledge
33
+
34
+ ```
35
+ YOUR_AGENT_core op:search
36
+ params: { severity: "critical" }
37
+ ```
38
+
39
+ ### 4. Key Decisions
40
+
41
+ ```
42
+ YOUR_AGENT_core op:search_intelligent
43
+ params: { query: "architectural decision design choice" }
44
+ ```
45
+
46
+ ### 5. Strongest Patterns
47
+
48
+ ```
49
+ YOUR_AGENT_core op:brain_strengths
50
+ ```
51
+
52
+ ### 6. Anti-Patterns to Avoid
53
+
54
+ ```
55
+ YOUR_AGENT_core op:search
56
+ params: { type: "anti-pattern" }
57
+ ```
58
+
59
+ ### 7. Cross-Project Context
60
+
61
+ ```
62
+ YOUR_AGENT_core op:project_linked_projects
63
+ YOUR_AGENT_core op:brain_global_patterns
64
+ ```
65
+
66
+ ### 8. Knowledge Gaps
67
+
68
+ ```
69
+ YOUR_AGENT_core op:admin_search_insights
70
+ YOUR_AGENT_core op:vault_age_report
71
+ ```
72
+
73
+ ## Presenting the Onboarding
74
+
75
+ ```
76
+ ## Welcome to [Project Name]
77
+
78
+ **Domains:** [list] | **Vault:** X entries across Y domains
79
+
80
+ ### Critical Rules (Must Follow)
81
+ [Non-negotiable conventions]
82
+
83
+ ### Key Decisions
84
+ [Top architectural decisions with rationale]
85
+
86
+ ### Proven Patterns (Do This)
87
+ [Brain-strength patterns]
88
+
89
+ ### Anti-Patterns (Don't Do This)
90
+ [Known mistakes]
91
+
92
+ ### Project Conventions
93
+ [Rules, naming conventions]
94
+
95
+ ### Related Projects
96
+ [Linked projects and shared patterns]
97
+
98
+ ### Knowledge Gaps
99
+ [Areas not well-documented — ask the team]
100
+ ```
101
+
102
+ **Tip:** Use vault-navigator to search topics as you work. Use second-opinion before architectural decisions.
103
+
104
+ ## Common Mistakes
105
+
106
+ - Dumping all vault entries instead of curating the most important ones
107
+ - Skipping anti-patterns (newcomers need to know what NOT to do)
108
+ - Not surfacing knowledge gaps (newcomers should know where documentation is thin)
109
+
110
+ ## Quick Reference
111
+
112
+ | Op | When to Use |
113
+ |----|-------------|
114
+ | `identity` / `project_get` | Project overview |
115
+ | `project_list_rules` / `get_behavior_rules` | Conventions |
116
+ | `vault_domains` / `vault_tags` | Knowledge landscape |
117
+ | `search` (severity/type filters) | Critical rules, anti-patterns |
118
+ | `search_intelligent` | Key decisions |
119
+ | `brain_strengths` | Proven patterns |
120
+ | `brain_global_patterns` | Cross-project patterns |
121
+ | `admin_search_insights` | Knowledge gaps |
@@ -0,0 +1,277 @@
1
+ ---
2
+ name: parallel-execute
3
+ description: >
4
+ Use when executing a plan where independent tasks can run concurrently. Triggers on "run in
5
+ parallel", "parallelize", "fan out", "concurrent execution", "run simultaneously", "at the
6
+ same time", "dispatch subagents", "batch execute", or when a plan has 3+ tasks with no
7
+ dependency overlap. For sequential task-by-task execution, use executing-plans instead.
8
+ ---
9
+
10
+ # Parallel Execute — Subagent-Driven Plan Execution
11
+
12
+ Execute plan tasks in parallel by dispatching independent tasks to separate subagents. The controller agent (you) never implements — you dispatch, review, and integrate.
13
+
14
+ **Announce at start:** "I'm using the parallel-execute skill to run independent tasks concurrently."
15
+
16
+ <HARD-GATE>
17
+ You MUST have an approved, split plan before using this skill. If no plan exists or it has no tasks, stop and use the writing-plans skill first.
18
+ </HARD-GATE>
19
+
20
+ ## When to Use
21
+
22
+ - Plan has 3+ tasks
23
+ - At least 2 tasks have no dependency overlap (can run simultaneously)
24
+ - Tasks touch different files/modules (low merge conflict risk)
25
+
26
+ **Do NOT use when:**
27
+ - All tasks are sequential (each depends on the previous)
28
+ - Tasks modify the same files (high conflict risk)
29
+ - Plan has fewer than 3 tasks (use executing-plans instead)
30
+
31
+ ## The Process
32
+
33
+ ### Step 1: Load Plan and Build Dependency Graph
34
+
35
+ ```
36
+ YOUR_AGENT_core op:get_plan
37
+ YOUR_AGENT_core op:plan_list_tasks params:{ planId: "<id>" }
38
+ ```
39
+
40
+ Map out which tasks are independent by checking `dependsOn` for each task. Group tasks into **waves** — sets of tasks that can run in parallel:
41
+
42
+ - **Wave 1**: All tasks with no dependencies (or whose dependencies are already complete)
43
+ - **Wave 2**: Tasks whose dependencies are all in Wave 1
44
+ - **Wave N**: Tasks whose dependencies are all in prior waves
45
+
46
+ Present the wave plan to the user before starting:
47
+
48
+ ```
49
+ ## Execution Waves
50
+
51
+ | Wave | Tasks | Parallel? |
52
+ |------|-------|-----------|
53
+ | 1 | task-1, task-3, task-5 | Yes (3 subagents) |
54
+ | 2 | task-2 (depends on task-1) | Solo |
55
+ | 3 | task-4 (depends on task-2, task-3) | Solo |
56
+ ```
57
+
58
+ ### Step 2: Dispatch a Wave
59
+
60
+ For each task in the current wave:
61
+
62
+ 1. Check readiness:
63
+ ```
64
+ YOUR_AGENT_core op:plan_dispatch params:{ planId: "<id>", taskId: "<taskId>" }
65
+ ```
66
+ Only dispatch tasks where `ready: true`.
67
+
68
+ 2. Mark as in_progress:
69
+ ```
70
+ YOUR_AGENT_core op:update_task params:{ planId: "<id>", taskIndex: <n>, status: "in_progress" }
71
+ ```
72
+
73
+ 3. Gather vault context for the task:
74
+ ```
75
+ YOUR_AGENT_core op:search params:{ query: "<task topic>", mode: "scan" }
76
+ ```
77
+
78
+ 4. **Launch all ready tasks as parallel Agent calls in a single message.** Each subagent gets:
79
+
80
+ ```
81
+ You are implementing a single task from a plan. Work autonomously.
82
+
83
+ ## Task
84
+ - **ID**: {taskId}
85
+ - **Title**: {title}
86
+ - **Description**: {description}
87
+ - **Acceptance Criteria**: {criteria}
88
+
89
+ ## Context
90
+ - **Plan Objective**: {planObjective}
91
+ - **Vault Patterns to Follow**: {relevantPatterns}
92
+ - **Files Likely Involved**: {fileHints}
93
+
94
+ ## Rules
95
+ - Implement ONLY this task — do not touch files outside your scope
96
+ - Run tests after implementation
97
+ - If blocked, report the blocker and stop — do not guess
98
+ - Do not commit — the controller handles commits
99
+ - When done, report: files changed, tests passing, any concerns
100
+
101
+ ## Self-Review Checklist
102
+ Before reporting completion, verify:
103
+ - [ ] All acceptance criteria met
104
+ - [ ] Tests pass
105
+ - [ ] No files modified outside task scope
106
+ - [ ] No console.log or debug code left behind
107
+ - [ ] No raw colors or hardcoded values (use semantic tokens)
108
+ ```
109
+
110
+ Use the Agent tool with `isolation: "worktree"` when tasks touch nearby files to prevent conflicts.
111
+
112
+ ### Step 3: Collect Results
113
+
114
+ As subagents complete, collect their results. For each completed task:
115
+
116
+ 1. **Run spec review** — spawn a reviewer subagent:
117
+ ```
118
+ YOUR_AGENT_core op:plan_review_spec params:{ planId: "<id>", taskId: "<taskId>" }
119
+ ```
120
+ Use the returned prompt to launch a spec-review Agent that reads the ACTUAL code changes (not the implementer's self-report).
121
+
122
+ 2. **Record spec review outcome:**
123
+ ```
124
+ YOUR_AGENT_core op:plan_review_outcome params:{
125
+ planId: "<id>", taskId: "<taskId>",
126
+ reviewType: "spec", reviewer: "spec-reviewer",
127
+ outcome: "approved|rejected|needs_changes",
128
+ comments: "<specific file:line references>"
129
+ }
130
+ ```
131
+
132
+ 3. **If spec passes, run quality review:**
133
+ ```
134
+ YOUR_AGENT_core op:plan_review_quality params:{ planId: "<id>", taskId: "<taskId>" }
135
+ ```
136
+ Launch a quality-review Agent with the returned prompt.
137
+
138
+ 4. **Record quality review outcome:**
139
+ ```
140
+ YOUR_AGENT_core op:plan_review_outcome params:{
141
+ planId: "<id>", taskId: "<taskId>",
142
+ reviewType: "quality", reviewer: "quality-reviewer",
143
+ outcome: "approved|rejected|needs_changes",
144
+ comments: "<severity-tagged feedback>"
145
+ }
146
+ ```
147
+
148
+ 5. **Handle outcomes:**
149
+
150
+ | Spec | Quality | Action |
151
+ |------|---------|--------|
152
+ | Pass | Pass | Mark task completed |
153
+ | Fail | — | Dispatch fix subagent with failure feedback (max 2 retries) |
154
+ | Pass | Critical issues | Dispatch targeted fix subagent (max 2 retries) |
155
+ | Pass | Minor issues only | Mark completed, note issues for later |
156
+
157
+ 6. **Mark completed:**
158
+ ```
159
+ YOUR_AGENT_core op:update_task params:{ planId: "<id>", taskIndex: <n>, status: "completed" }
160
+ ```
161
+
162
+ ### Step 4: Advance to Next Wave
163
+
164
+ After all tasks in a wave are complete (or failed after retries):
165
+
166
+ 1. Report wave results to the user:
167
+ ```
168
+ ## Wave N Complete
169
+
170
+ | Task | Status | Review | Notes |
171
+ |------|--------|--------|-------|
172
+ | task-1 | Completed | Spec: Pass, Quality: Pass | — |
173
+ | task-3 | Completed | Spec: Pass, Quality: Minor issues | Noted for cleanup |
174
+ | task-5 | Failed | Spec: Fail (2 retries exhausted) | Escalated |
175
+ ```
176
+
177
+ 2. **Wait for user acknowledgment** before proceeding to the next wave.
178
+
179
+ 3. Check which tasks in the next wave are now ready (dependencies met).
180
+
181
+ 4. Repeat from Step 2.
182
+
183
+ ### Step 5: Final Integration Review
184
+
185
+ After all waves complete:
186
+
187
+ 1. Spawn a final review subagent that checks cross-cutting concerns:
188
+ - Consistency across all task implementations
189
+ - Integration points between tasks
190
+ - No conflicting patterns or duplicate code
191
+ - Tests pass together (not just individually)
192
+
193
+ 2. Report to user with full execution summary.
194
+
195
+ ### Step 6: Complete Plan Lifecycle
196
+
197
+ Same as executing-plans — reconcile, capture knowledge, archive:
198
+
199
+ ```
200
+ YOUR_AGENT_core op:plan_reconcile params:{
201
+ planId: "<id>",
202
+ actualOutcome: "<what happened>",
203
+ driftItems: [{ type: "...", description: "...", impact: "...", rationale: "..." }]
204
+ }
205
+
206
+ YOUR_AGENT_core op:plan_complete_lifecycle params:{
207
+ planId: "<id>",
208
+ patterns: ["<patterns discovered>"],
209
+ antiPatterns: ["<anti-patterns discovered>"]
210
+ }
211
+
212
+ YOUR_AGENT_core op:session_capture params:{
213
+ summary: "<execution summary with parallel metrics>"
214
+ }
215
+ ```
216
+
217
+ ## Subagent Isolation Rules
218
+
219
+ | Situation | Isolation |
220
+ |-----------|-----------|
221
+ | Tasks touch completely different directories | No isolation needed |
222
+ | Tasks touch files in the same package | Use `isolation: "worktree"` |
223
+ | Tasks modify the same file | **Do NOT parallelize** — run sequentially |
224
+
225
+ When using worktree isolation, the controller must merge worktree changes back after review passes.
226
+
227
+ ## Failure Handling
228
+
229
+ | Failure | Response |
230
+ |---------|----------|
231
+ | Subagent reports blocker | Pause that task, continue others in the wave |
232
+ | Spec review fails | Dispatch fix subagent with feedback (retry 1/2) |
233
+ | Second retry fails | Mark task as `failed`, escalate to user |
234
+ | Merge conflict from worktree | Resolve manually, then re-run quality review |
235
+ | All tasks in wave fail | Stop execution, report to user |
236
+
237
+ ## Capture Learnings
238
+
239
+ During execution, capture insights about parallelization:
240
+
241
+ ```
242
+ YOUR_AGENT_core op:capture_quick params:{
243
+ title: "<what you learned about parallel execution>",
244
+ description: "<context: which tasks parallelized well, which conflicted>"
245
+ }
246
+ ```
247
+
248
+ ## When to Fall Back to Sequential
249
+
250
+ **Switch to executing-plans skill mid-execution when:**
251
+ - Subagents keep conflicting on shared files
252
+ - Merge resolution is taking longer than the parallelization saves
253
+ - User requests sequential execution
254
+
255
+ ## Agent Tools Reference
256
+
257
+ | Op | When to Use |
258
+ |----|-------------|
259
+ | `get_plan` | Load tracked plan |
260
+ | `plan_list_tasks` | List all tasks with dependencies |
261
+ | `plan_dispatch` | Check task readiness (dependencies met?) |
262
+ | `update_task` | Mark tasks in_progress / completed / failed |
263
+ | `plan_review_spec` | Generate spec compliance review prompt |
264
+ | `plan_review_quality` | Generate code quality review prompt |
265
+ | `plan_review_outcome` | Record review pass/fail result |
266
+ | `plan_reconcile` | Post-execution drift analysis |
267
+ | `plan_complete_lifecycle` | Extract knowledge, archive |
268
+ | `session_capture` | Save session context |
269
+ | `capture_quick` | Capture mid-execution learnings |
270
+ | `search` | Vault lookup for task context |
271
+
272
+ ## Integration
273
+
274
+ **Required skills:**
275
+ - writing-plans — Creates the plan this skill executes
276
+ - verification-before-completion — Verify work before claiming completion
277
+ - executing-plans — Fallback for sequential execution
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: retrospective
3
+ description: >
4
+ Use for time-bound reflection on recent WORK — "sprint retro", "weekly summary", "what went
5
+ well this week", "end of sprint", "monthly report". Reviews sessions and extracts actionable
6
+ improvements. For brain pattern intelligence and strength scores, use brain-debrief instead.
7
+ ---
8
+
9
+ # Retrospective — Learning Report From Real Data
10
+
11
+ Generate a data-driven retrospective from session data, vault captures, plan outcomes, and brain intelligence.
12
+
13
+ ## Steps
14
+
15
+ ### 1. Gather Data
16
+
17
+ ```
18
+ YOUR_AGENT_core op:brain_stats
19
+ YOUR_AGENT_core op:brain_stats params: { since: "<start of period>" }
20
+ YOUR_AGENT_core op:brain_strengths
21
+ YOUR_AGENT_core op:vault_recent
22
+ YOUR_AGENT_core op:memory_topics
23
+ YOUR_AGENT_core op:memory_stats
24
+ YOUR_AGENT_core op:plan_stats
25
+ YOUR_AGENT_core op:admin_search_insights
26
+ YOUR_AGENT_core op:admin_vault_analytics
27
+ ```
28
+
29
+ ### 2. Analyze Patterns
30
+
31
+ ```
32
+ YOUR_AGENT_core op:vault_age_report
33
+ YOUR_AGENT_core op:curator_detect_duplicates
34
+ YOUR_AGENT_core op:curator_contradictions
35
+ YOUR_AGENT_core op:curator_health_audit
36
+ ```
37
+
38
+ ### 3. Present the Retrospective
39
+
40
+ ```
41
+ ## Retrospective: [Period]
42
+
43
+ ### By the Numbers
44
+ | Metric | This Period | Previous | Trend |
45
+ |--------|-----------|----------|-------|
46
+ | Patterns captured | X | Y | up/down |
47
+ | Plans completed | X | Y | up/down |
48
+ | Brain strength (avg) | X | Y | up/down |
49
+ | Search misses | X | Y | up/down |
50
+
51
+ ### What Went Well
52
+ [High brain strength patterns, completed plans, growing domains]
53
+
54
+ ### What Didn't Go Well
55
+ [Recurring anti-patterns, failed plans, knowledge gaps]
56
+
57
+ ### Vault Health
58
+ Quality: X/100 | Duplicates: N | Contradictions: N | Stale: N
59
+
60
+ ### Recommendations
61
+ 1. [Data-driven action item]
62
+ 2. [Data-driven action item]
63
+ ```
64
+
65
+ ### 4. Capture the Retrospective
66
+
67
+ ```
68
+ YOUR_AGENT_core op:capture_knowledge
69
+ params: {
70
+ title: "Retrospective — [period]",
71
+ description: "<key findings and action items>",
72
+ type: "workflow",
73
+ category: "meta",
74
+ tags: ["retrospective"]
75
+ }
76
+ ```
77
+
78
+ ### 5. Clean Up (Optional)
79
+
80
+ If quality issues found: `op:curator_consolidate` then `op:brain_build_intelligence`.
81
+
82
+ ## Common Mistakes
83
+
84
+ - Presenting AI opinions instead of actual vault/brain metrics
85
+ - Not comparing periods (missing trends)
86
+ - Skipping the capture step (retrospective insights are lost)
87
+
88
+ ## Quick Reference
89
+
90
+ | Op | When to Use |
91
+ |----|-------------|
92
+ | `brain_stats` / `brain_strengths` | Metrics and patterns |
93
+ | `vault_recent` | Recent captures |
94
+ | `memory_topics` / `memory_stats` | Knowledge clusters |
95
+ | `plan_stats` | Plan completion |
96
+ | `admin_search_insights` | Search misses |
97
+ | `curator_health_audit` | Vault quality |
98
+ | `capture_knowledge` | Persist retrospective |
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: second-opinion
3
+ description: Use when facing a technical decision, comparing approaches, or needing an informed recommendation backed by vault knowledge, brain patterns, and web research.
4
+ ---
5
+
6
+ # Second Opinion — Decision Support From All Sources
7
+
8
+ Get an informed recommendation that synthesizes vault knowledge, brain patterns, cross-project experience, and web research before making any technical decision.
9
+
10
+ ## Steps
11
+
12
+ ### 1. Understand the Decision
13
+
14
+ ```
15
+ YOUR_AGENT_core op:route_intent
16
+ params: { prompt: "<user's question>" }
17
+ ```
18
+
19
+ ### 2. Search All Knowledge Sources
20
+
21
+ **Vault** — previous decisions, patterns, anti-patterns:
22
+ ```
23
+ YOUR_AGENT_core op:search_intelligent
24
+ params: { query: "<the decision or options>" }
25
+ ```
26
+
27
+ **Brain** — proven approaches:
28
+ ```
29
+ YOUR_AGENT_core op:brain_strengths
30
+ YOUR_AGENT_core op:brain_recommend
31
+ params: { projectName: "<current project>" }
32
+ ```
33
+
34
+ **Cross-project** — what other projects chose:
35
+ ```
36
+ YOUR_AGENT_core op:memory_cross_project_search
37
+ params: { query: "<topic>", crossProject: true }
38
+ ```
39
+
40
+ **Web** — community consensus, benchmarks, comparison articles.
41
+
42
+ ### 3. Synthesize and Present
43
+
44
+ ```
45
+ ## Decision: [Question]
46
+
47
+ ### What the Vault Says
48
+ [Existing decisions, patterns, anti-patterns]
49
+
50
+ ### What the Brain Recommends
51
+ [Proven patterns, cross-project insights]
52
+
53
+ ### What the Web Says
54
+ [Community consensus, benchmarks]
55
+
56
+ ### Options Analysis
57
+ | Criteria | Option A | Option B |
58
+ |----------|----------|----------|
59
+ | [criteria] | ... | ... |
60
+ | Vault support | [patterns?] | [patterns?] |
61
+
62
+ ### Recommendation
63
+ [Clear recommendation with reasoning]
64
+
65
+ ### Risks
66
+ [What could go wrong]
67
+ ```
68
+
69
+ ### 4. Capture the Decision
70
+
71
+ ```
72
+ YOUR_AGENT_core op:capture_knowledge
73
+ params: {
74
+ title: "<decision title>",
75
+ description: "<chosen option, rationale, rejected alternatives>",
76
+ type: "decision",
77
+ category: "<domain>",
78
+ tags: ["decision"]
79
+ }
80
+ ```
81
+
82
+ ## Common Mistakes
83
+
84
+ - Giving a generic AI opinion instead of searching vault/brain first
85
+ - Not capturing the final decision (next person faces the same question blind)
86
+ - Skipping cross-project search (another project may have solved this)
87
+
88
+ ## Quick Reference
89
+
90
+ | Op | When to Use |
91
+ |----|-------------|
92
+ | `route_intent` | Classify decision type |
93
+ | `search_intelligent` | Find previous decisions |
94
+ | `brain_strengths` / `brain_recommend` | Proven approaches |
95
+ | `memory_cross_project_search` | Other projects' choices |
96
+ | `memory_search` | Session context |
97
+ | `capture_knowledge` | Persist the decision |
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: systematic-debugging
3
+ description: >
4
+ Use as the FIRST response when something is broken — "bug", "failing test", "not working",
5
+ "debug this", "error", "crash", "unexpected behavior", "weird issue". Diagnoses root cause
6
+ before proposing fixes. After root cause is found, hand off to fix-and-learn for repair and
7
+ knowledge capture.
8
+ ---
9
+
10
+ # Systematic Debugging
11
+
12
+ **Core principle:** ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
13
+
14
+ ## Phase 0: Search Before Investigating
15
+
16
+ **BEFORE touching any code:**
17
+
18
+ ```
19
+ YOUR_AGENT_core op:search_intelligent
20
+ params: { query: "<bug or error message>" }
21
+ YOUR_AGENT_core op:brain_strengths
22
+ YOUR_AGENT_core op:memory_search
23
+ params: { query: "<error or symptom>" }
24
+ ```
25
+
26
+ If vault has a match — apply it directly. Then search web: exact error message, GitHub issues, Stack Overflow, official docs.
27
+
28
+ Only if vault and web produce no answer, proceed to Phase 1.
29
+
30
+ ## Start a Debug Loop
31
+
32
+ ```
33
+ YOUR_AGENT_core op:loop_start
34
+ params: { prompt: "Debug: <bug>", mode: "custom" }
35
+ ```
36
+
37
+ ## The Four Phases
38
+
39
+ ### Phase 1: Root Cause Investigation
40
+
41
+ 1. Read error messages carefully
42
+ 2. Reproduce consistently
43
+ 3. Check recent changes
44
+ 4. Gather evidence at component boundaries
45
+ 5. Trace data flow backward through call stack
46
+
47
+ Track each step with `op:loop_iterate`.
48
+
49
+ ### Phase 2: Pattern Analysis
50
+
51
+ Find working examples, compare against references (read completely), identify differences, understand dependencies. Use `op:search_intelligent` for comparison.
52
+
53
+ ### Phase 3: Hypothesis and Testing
54
+
55
+ Form single hypothesis, test minimally (one variable at a time), verify before continuing. If unsure — ask for help.
56
+
57
+ ### Phase 4: Implementation
58
+
59
+ 1. Create failing test (use test-driven-development skill)
60
+ 2. Implement single fix (root cause only)
61
+ 3. Verify fix
62
+ 4. If < 3 attempts failed, return to Phase 1. If >= 3, STOP — question architecture with human partner.
63
+
64
+ ## Phase 5: Capture the Learning
65
+
66
+ ```
67
+ YOUR_AGENT_core op:loop_complete
68
+ YOUR_AGENT_core op:capture_knowledge
69
+ params: {
70
+ title: "<bug>",
71
+ description: "<root cause, solution, what made it hard to find>",
72
+ type: "anti-pattern",
73
+ category: "<domain>",
74
+ tags: ["<relevant>"]
75
+ }
76
+ YOUR_AGENT_core op:session_capture
77
+ ```
78
+
79
+ ## Red Flags — STOP and Return to Phase 1
80
+
81
+ - "Quick fix for now" / "Just try changing X"
82
+ - Proposing solutions before tracing data flow
83
+ - "One more fix attempt" after 2+ failures
84
+ - Each fix reveals a new problem elsewhere
85
+
86
+ ## Common Mistakes
87
+
88
+ - Skipping vault search ("I know this one") — 30 seconds saves hours
89
+ - Making multiple changes at once (can't isolate what worked)
90
+ - Skipping the capture step (same bug will recur)
91
+
92
+ ## Quick Reference
93
+
94
+ | Phase | Key Activities | Tools |
95
+ |-------|---------------|-------|
96
+ | 0. Search | Vault, web, memory | `search_intelligent`, `brain_strengths`, `memory_search` |
97
+ | 1. Root Cause | Read errors, reproduce, trace | `loop_iterate` |
98
+ | 2. Pattern | Find working examples, compare | `search_intelligent` |
99
+ | 3. Hypothesis | Form theory, test minimally | `loop_iterate` |
100
+ | 4. Implementation | Test, fix, verify | `loop_iterate` |
101
+ | 5. Capture | Persist root cause | `capture_knowledge`, `loop_complete` |
102
+
103
+ **Related skills:** test-driven-development, verification-before-completion, fix-and-learn