@soleri/forge 8.1.0 → 9.0.1
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.
- package/dist/agent-schema.d.ts +16 -18
- package/dist/agent-schema.js +6 -6
- package/dist/agent-schema.js.map +1 -1
- package/dist/scaffold-filetree.js +19 -3
- package/dist/scaffold-filetree.js.map +1 -1
- package/dist/scaffolder.js +0 -4
- package/dist/scaffolder.js.map +1 -1
- package/dist/skills/brain-debrief/SKILL.md +66 -0
- package/dist/skills/brainstorming/SKILL.md +85 -0
- package/dist/skills/code-patrol/SKILL.md +86 -0
- package/dist/skills/context-resume/SKILL.md +92 -0
- package/dist/skills/executing-plans/SKILL.md +87 -0
- package/dist/skills/fix-and-learn/SKILL.md +98 -0
- package/dist/skills/health-check/SKILL.md +131 -0
- package/dist/skills/knowledge-harvest/SKILL.md +93 -0
- package/dist/skills/onboard-me/SKILL.md +118 -0
- package/dist/skills/retrospective/SKILL.md +95 -0
- package/dist/skills/second-opinion/SKILL.md +97 -0
- package/dist/skills/systematic-debugging/SKILL.md +99 -0
- package/dist/skills/test-driven-development/SKILL.md +91 -0
- package/dist/skills/vault-capture/SKILL.md +82 -0
- package/dist/skills/vault-navigator/SKILL.md +80 -0
- package/dist/skills/verification-before-completion/SKILL.md +82 -0
- package/dist/skills/writing-plans/SKILL.md +105 -0
- package/dist/templates/agents-md.js +0 -1
- package/dist/templates/agents-md.js.map +1 -1
- package/dist/templates/claude-md-template.js +2 -2
- package/dist/templates/claude-md-template.js.map +1 -1
- package/dist/templates/entry-point.js +1 -1
- package/dist/templates/entry-point.js.map +1 -1
- package/dist/templates/shared-rules.js +19 -0
- package/dist/templates/shared-rules.js.map +1 -1
- package/dist/templates/test-facades.js +0 -11
- package/dist/templates/test-facades.js.map +1 -1
- package/dist/types.d.ts +20 -20
- package/dist/types.js +6 -6
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/scaffold-filetree.test.ts +0 -2
- package/src/agent-schema.ts +6 -6
- package/src/scaffold-filetree.ts +21 -2
- package/src/scaffolder.ts +0 -4
- package/src/skills/brain-debrief/SKILL.md +66 -0
- package/src/skills/brainstorming/SKILL.md +85 -0
- package/src/skills/code-patrol/SKILL.md +86 -0
- package/src/skills/context-resume/SKILL.md +92 -0
- package/src/skills/executing-plans/SKILL.md +87 -0
- package/src/skills/fix-and-learn/SKILL.md +98 -0
- package/src/skills/health-check/SKILL.md +131 -0
- package/src/skills/knowledge-harvest/SKILL.md +93 -0
- package/src/skills/onboard-me/SKILL.md +118 -0
- package/src/skills/retrospective/SKILL.md +95 -0
- package/src/skills/second-opinion/SKILL.md +97 -0
- package/src/skills/systematic-debugging/SKILL.md +99 -0
- package/src/skills/test-driven-development/SKILL.md +91 -0
- package/src/skills/vault-capture/SKILL.md +82 -0
- package/src/skills/vault-navigator/SKILL.md +80 -0
- package/src/skills/verification-before-completion/SKILL.md +82 -0
- package/src/skills/writing-plans/SKILL.md +105 -0
- package/src/templates/agents-md.ts +0 -1
- package/src/templates/claude-md-template.ts +1 -2
- package/src/templates/entry-point.ts +1 -1
- package/src/templates/shared-rules.ts +20 -0
- package/src/templates/test-facades.ts +0 -11
- package/src/types.ts +6 -6
- package/dist/skills/agent-dev.md +0 -122
- package/dist/skills/agent-guide.md +0 -110
- package/dist/skills/agent-persona.md +0 -66
- package/dist/skills/brain-debrief.md +0 -214
- package/dist/skills/brainstorming.md +0 -180
- package/dist/skills/code-patrol.md +0 -178
- package/dist/skills/context-resume.md +0 -146
- package/dist/skills/deliver-and-ship.md +0 -123
- package/dist/skills/env-setup.md +0 -151
- package/dist/skills/executing-plans.md +0 -216
- package/dist/skills/fix-and-learn.md +0 -167
- package/dist/skills/health-check.md +0 -231
- package/dist/skills/knowledge-harvest.md +0 -185
- package/dist/skills/onboard-me.md +0 -198
- package/dist/skills/retrospective.md +0 -205
- package/dist/skills/second-opinion.md +0 -149
- package/dist/skills/systematic-debugging.md +0 -241
- package/dist/skills/test-driven-development.md +0 -281
- package/dist/skills/vault-capture.md +0 -170
- package/dist/skills/vault-curate.md +0 -107
- package/dist/skills/vault-navigator.md +0 -140
- package/dist/skills/verification-before-completion.md +0 -182
- package/dist/skills/writing-plans.md +0 -215
- package/src/skills/agent-dev.md +0 -122
- package/src/skills/agent-guide.md +0 -110
- package/src/skills/agent-persona.md +0 -66
- package/src/skills/brain-debrief.md +0 -214
- package/src/skills/brainstorming.md +0 -180
- package/src/skills/code-patrol.md +0 -178
- package/src/skills/context-resume.md +0 -146
- package/src/skills/deliver-and-ship.md +0 -123
- package/src/skills/env-setup.md +0 -151
- package/src/skills/executing-plans.md +0 -216
- package/src/skills/fix-and-learn.md +0 -167
- package/src/skills/health-check.md +0 -231
- package/src/skills/knowledge-harvest.md +0 -185
- package/src/skills/onboard-me.md +0 -198
- package/src/skills/retrospective.md +0 -205
- package/src/skills/second-opinion.md +0 -149
- package/src/skills/systematic-debugging.md +0 -241
- package/src/skills/test-driven-development.md +0 -281
- package/src/skills/vault-capture.md +0 -170
- package/src/skills/vault-curate.md +0 -107
- package/src/skills/vault-navigator.md +0 -140
- package/src/skills/verification-before-completion.md +0 -182
- package/src/skills/writing-plans.md +0 -215
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: fix-and-learn
|
|
3
|
-
description: Use AFTER systematic-debugging completes to execute the fix and capture the learning in the vault. Invoke this skill when moving from diagnosis to repair for bugs, broken behavior, errors, regressions, or unexpected results. Chains with systematic-debugging — debugging finds root cause, this skill fixes and captures the anti-pattern.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Fix & Learn — Debug, Repair, Capture
|
|
7
|
-
|
|
8
|
-
Fix bugs through a structured recovery workflow, then capture the root cause as a reusable anti-pattern. The learning step is what makes fixes compound across sessions.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
Any time something is broken, behaving unexpectedly, or producing errors. This includes runtime bugs, visual regressions, type errors, and "it used to work" situations.
|
|
13
|
-
|
|
14
|
-
## The Search Order — MANDATORY
|
|
15
|
-
|
|
16
|
-
**Never jump to writing code.** Always follow this lookup order:
|
|
17
|
-
|
|
18
|
-
1. **Vault first** — has this been solved before?
|
|
19
|
-
2. **Web search** — is there a known solution or pattern?
|
|
20
|
-
3. **Plan the fix** — design the approach before touching code
|
|
21
|
-
4. **Implement** — only after steps 1-3
|
|
22
|
-
|
|
23
|
-
Skipping to implementation is the #1 cause of wasted time and recurring bugs.
|
|
24
|
-
|
|
25
|
-
## Orchestration Sequence
|
|
26
|
-
|
|
27
|
-
### Step 1: Classify and Route
|
|
28
|
-
|
|
29
|
-
Classify the intent to confirm this is a FIX and get routing context:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
YOUR_AGENT_core op:route_intent
|
|
33
|
-
params: { prompt: "<user's bug description>" }
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Step 2: Check Vault First
|
|
37
|
-
|
|
38
|
-
Search for this bug or similar issues:
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
YOUR_AGENT_core op:search_intelligent
|
|
42
|
-
params: { query: "<error message or bug description>" }
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Check memory for patterns across sessions:
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
YOUR_AGENT_core op:memory_search
|
|
49
|
-
params: { query: "<bug description>" }
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Check memory topics — are bugs clustering in a specific area?
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
YOUR_AGENT_core op:memory_topics
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Check memory stats to understand the debugging landscape:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
YOUR_AGENT_core op:memory_stats
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
If vault returns a match with high confidence — **use it**. Don't re-investigate what's already been solved.
|
|
65
|
-
|
|
66
|
-
### Step 3: Search the Web
|
|
67
|
-
|
|
68
|
-
If the vault has no answer, search for existing solutions before investigating from scratch:
|
|
69
|
-
|
|
70
|
-
- Known issues in the library/framework
|
|
71
|
-
- Stack Overflow answers for the exact error
|
|
72
|
-
- GitHub issues on relevant repos
|
|
73
|
-
- Official documentation for the API or feature involved
|
|
74
|
-
|
|
75
|
-
A 30-second web search can save hours of investigation.
|
|
76
|
-
|
|
77
|
-
### Step 4: Start Fix Loop
|
|
78
|
-
|
|
79
|
-
For complex bugs requiring multiple iterations, start a validation loop:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
YOUR_AGENT_core op:loop_start
|
|
83
|
-
params: { prompt: "Fix: <bug description>", mode: "custom" }
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Step 5: Diagnose and Fix
|
|
87
|
-
|
|
88
|
-
Only if Steps 2-3 didn't produce a solution, apply the systematic debugging approach (use systematic-debugging skill):
|
|
89
|
-
|
|
90
|
-
1. Reproduce the issue
|
|
91
|
-
2. Isolate the root cause
|
|
92
|
-
3. **Plan the fix before writing code** — even a one-line mental plan
|
|
93
|
-
4. Implement the fix
|
|
94
|
-
5. Verify the fix resolves the issue without regressions
|
|
95
|
-
|
|
96
|
-
Track each iteration:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
YOUR_AGENT_core op:loop_iterate
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Step 6: Validate the Fix
|
|
103
|
-
|
|
104
|
-
Run the project's test suite to ensure the fix didn't introduce regressions. Use the verification-before-completion skill to confirm all checks pass.
|
|
105
|
-
|
|
106
|
-
Complete the loop when validated:
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
YOUR_AGENT_core op:loop_complete
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Step 7: Capture the Learning
|
|
113
|
-
|
|
114
|
-
This step is critical — it's what makes the agent smarter over time.
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
YOUR_AGENT_core op:capture_knowledge
|
|
118
|
-
params: {
|
|
119
|
-
title: "<bug title>",
|
|
120
|
-
description: "<root cause, solution, what made it hard to find>",
|
|
121
|
-
type: "anti-pattern",
|
|
122
|
-
category: "<domain>",
|
|
123
|
-
tags: ["<error-type>", "<component>"]
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
For quick captures:
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
YOUR_AGENT_core op:capture_quick
|
|
131
|
-
params: { title: "<bug>", description: "<root cause and fix>" }
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Step 8: Post-Capture Quality
|
|
135
|
-
|
|
136
|
-
Run duplicate detection to ensure we didn't create redundant entries:
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
YOUR_AGENT_core op:curator_detect_duplicates
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Step 9: Verify Health
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
YOUR_AGENT_core op:admin_health
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
## Exit Criteria
|
|
149
|
-
|
|
150
|
-
Fix is complete when: the bug is resolved, tests pass (Step 6), and the root cause is captured in vault (Step 7). A fix without a capture is an incomplete fix.
|
|
151
|
-
|
|
152
|
-
## Agent Tools Reference
|
|
153
|
-
|
|
154
|
-
| Op | When to Use |
|
|
155
|
-
| --------------------------- | ------------------------------ |
|
|
156
|
-
| `route_intent` | Classify as FIX intent |
|
|
157
|
-
| `search_intelligent` | Check vault for known bugs |
|
|
158
|
-
| `memory_search` | Search across session memories |
|
|
159
|
-
| `memory_topics` | See if bugs cluster in an area |
|
|
160
|
-
| `memory_stats` | Understand debugging landscape |
|
|
161
|
-
| `loop_start` | Begin iterative fix cycle |
|
|
162
|
-
| `loop_iterate` | Track each fix attempt |
|
|
163
|
-
| `loop_complete` | Finish fix cycle |
|
|
164
|
-
| `capture_knowledge` | Full anti-pattern capture |
|
|
165
|
-
| `capture_quick` | Fast capture |
|
|
166
|
-
| `curator_detect_duplicates` | Prevent redundant entries |
|
|
167
|
-
| `admin_health` | Verify system health |
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: health-check
|
|
3
|
-
description: Use when the user asks "check health", "vault health", "knowledge quality", "clean up vault", "groom knowledge", "maintenance", "housekeeping", "deduplicate", "find contradictions", or wants to run a maintenance cycle on the knowledge base to keep it healthy and accurate.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Health Check — Knowledge Base Maintenance
|
|
7
|
-
|
|
8
|
-
Run a comprehensive maintenance cycle on the knowledge base. Finds stale entries, duplicates, contradictions, quality issues, and fixes them. Like a doctor's checkup for your knowledge.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
- Weekly/monthly maintenance ritual
|
|
13
|
-
- "Is my vault healthy?"
|
|
14
|
-
- "Clean up my knowledge base"
|
|
15
|
-
- Before a retrospective (clean data = better insights)
|
|
16
|
-
- After a knowledge harvest (post-ingest quality check)
|
|
17
|
-
|
|
18
|
-
## The Magic: Comprehensive Quality Audit
|
|
19
|
-
|
|
20
|
-
### Step 1: System Health
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
YOUR_AGENT_core op:admin_health
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
YOUR_AGENT_core op:admin_diagnostic
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Catches infrastructure issues — database corruption, stale caches, configuration problems.
|
|
31
|
-
|
|
32
|
-
### Step 2: Vault Metrics
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
YOUR_AGENT_core op:admin_vault_size
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
YOUR_AGENT_core op:admin_vault_analytics
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
YOUR_AGENT_core op:vault_domains
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
YOUR_AGENT_core op:vault_tags
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Shows the big picture: how many entries, which domains, tag distribution.
|
|
51
|
-
|
|
52
|
-
### Step 3: Quality Audit
|
|
53
|
-
|
|
54
|
-
Run the curator's health audit — the most comprehensive quality check:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
YOUR_AGENT_core op:curator_health_audit
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
This checks: tag normalization, description quality, severity distribution, domain coverage balance, and overall vault quality score.
|
|
61
|
-
|
|
62
|
-
### Step 4: Find Duplicates
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
YOUR_AGENT_core op:curator_detect_duplicates
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Present duplicates for review. Offer to merge or remove them.
|
|
69
|
-
|
|
70
|
-
### Step 5: Find Contradictions
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
YOUR_AGENT_core op:curator_contradictions
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Contradictions are entries that give conflicting advice. Present each pair for the user to resolve:
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
YOUR_AGENT_core op:curator_resolve_contradiction
|
|
80
|
-
params: { contradictionId: "<id>" }
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Step 6: Find Stale Entries
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
YOUR_AGENT_core op:vault_age_report
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Entries older than 30 days without updates are candidates for:
|
|
90
|
-
|
|
91
|
-
- Refresh (still relevant, needs updating)
|
|
92
|
-
- Archive (no longer relevant)
|
|
93
|
-
- Delete (incorrect or superseded)
|
|
94
|
-
|
|
95
|
-
### Step 7: Check Search Quality
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
YOUR_AGENT_core op:admin_search_insights
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Shows what people search for but don't find — these are knowledge gaps that should be filled.
|
|
102
|
-
|
|
103
|
-
### Step 8: Memory Health
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
YOUR_AGENT_core op:memory_stats
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
YOUR_AGENT_core op:memory_deduplicate
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Clean up duplicate memories.
|
|
114
|
-
|
|
115
|
-
### Step 9: Governance Queue
|
|
116
|
-
|
|
117
|
-
Check if any proposals are pending review:
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
YOUR_AGENT_core op:governance_proposals
|
|
121
|
-
params: { action: "list" }
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
YOUR_AGENT_core op:governance_stats
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Expire stale proposals:
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
YOUR_AGENT_core op:governance_expire
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Step 10: Fix Everything (Optional)
|
|
135
|
-
|
|
136
|
-
If the user approves, run the full cleanup:
|
|
137
|
-
|
|
138
|
-
**Groom all entries — normalize tags, fix metadata:**
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
YOUR_AGENT_core op:curator_groom_all
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**Full consolidation — deduplicate, normalize, quality-score:**
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
YOUR_AGENT_core op:curator_consolidate
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**Prune stale memory:**
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
YOUR_AGENT_core op:memory_prune
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
**Rebuild brain intelligence with clean data:**
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
YOUR_AGENT_core op:brain_build_intelligence
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Reset caches to pick up changes:**
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
YOUR_AGENT_core op:admin_reset_cache
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## Presenting the Health Report
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
## Knowledge Health Report
|
|
172
|
-
|
|
173
|
-
### System
|
|
174
|
-
| Check | Status |
|
|
175
|
-
|-------|--------|
|
|
176
|
-
| Infrastructure | OK / Issues |
|
|
177
|
-
| Database | OK / Issues |
|
|
178
|
-
| Cache | OK / Issues |
|
|
179
|
-
|
|
180
|
-
### Vault Quality
|
|
181
|
-
| Metric | Value | Status |
|
|
182
|
-
|--------|-------|--------|
|
|
183
|
-
| Total entries | X | — |
|
|
184
|
-
| Quality score | X/100 | Good/Warning/Critical |
|
|
185
|
-
| Domains | X | — |
|
|
186
|
-
| Tags | X | — |
|
|
187
|
-
|
|
188
|
-
### Issues Found
|
|
189
|
-
| Issue | Count | Action |
|
|
190
|
-
|-------|-------|--------|
|
|
191
|
-
| Duplicates | X | Merge |
|
|
192
|
-
| Contradictions | X | Resolve |
|
|
193
|
-
| Stale entries (>30d) | X | Review |
|
|
194
|
-
| Search misses | X | Fill gaps |
|
|
195
|
-
| Pending proposals | X | Review |
|
|
196
|
-
|
|
197
|
-
### Recommended Actions
|
|
198
|
-
1. [Most impactful fix]
|
|
199
|
-
2. [Second most impactful]
|
|
200
|
-
3. [Third most impactful]
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
## The Magic
|
|
204
|
-
|
|
205
|
-
This feels like magic because knowledge bases normally decay silently — duplicates accumulate, entries go stale, contradictions creep in, gaps grow. This skill makes decay visible and fixable in one command. It's like having a librarian who does a weekly audit of every book on every shelf.
|
|
206
|
-
|
|
207
|
-
## Agent Tools Reference
|
|
208
|
-
|
|
209
|
-
| Op | When to Use |
|
|
210
|
-
| ------------------------------- | ------------------------------- |
|
|
211
|
-
| `admin_health` | System health check |
|
|
212
|
-
| `admin_diagnostic` | Comprehensive system diagnostic |
|
|
213
|
-
| `admin_vault_size` | Vault storage metrics |
|
|
214
|
-
| `admin_vault_analytics` | Knowledge quality metrics |
|
|
215
|
-
| `admin_search_insights` | Search miss analysis |
|
|
216
|
-
| `admin_reset_cache` | Clear caches after cleanup |
|
|
217
|
-
| `vault_domains` / `vault_tags` | Knowledge landscape |
|
|
218
|
-
| `vault_age_report` | Stale entry detection |
|
|
219
|
-
| `curator_health_audit` | Quality score and audit |
|
|
220
|
-
| `curator_detect_duplicates` | Find duplicates |
|
|
221
|
-
| `curator_contradictions` | Find conflicting entries |
|
|
222
|
-
| `curator_resolve_contradiction` | Resolve conflicts |
|
|
223
|
-
| `curator_groom_all` | Batch tag normalization |
|
|
224
|
-
| `curator_consolidate` | Full cleanup pipeline |
|
|
225
|
-
| `memory_stats` | Memory health |
|
|
226
|
-
| `memory_deduplicate` | Remove duplicate memories |
|
|
227
|
-
| `memory_prune` | Remove stale memories |
|
|
228
|
-
| `governance_proposals` | Pending review queue |
|
|
229
|
-
| `governance_stats` | Governance metrics |
|
|
230
|
-
| `governance_expire` | Expire stale proposals |
|
|
231
|
-
| `brain_build_intelligence` | Rebuild after cleanup |
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: knowledge-harvest
|
|
3
|
-
description: Use when the user says "learn from this", "extract patterns", "harvest knowledge", "ingest this document", "read this and capture", "populate vault from", or points at code, docs, PRs, or any text and wants the agent to automatically extract and capture patterns, anti-patterns, and decisions into the vault.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Knowledge Harvest — Extract Patterns From Anything
|
|
7
|
-
|
|
8
|
-
Point at code, docs, PRs, architecture decisions, postmortems, or any text — the agent reads it, extracts every pattern, anti-pattern, decision, and principle, then captures them all to the vault. Zero-friction knowledge population.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
- "Learn from this file" / "Extract patterns from this codebase"
|
|
13
|
-
- "Read our architecture doc and capture everything"
|
|
14
|
-
- "Harvest knowledge from this PR"
|
|
15
|
-
- "Ingest this post-mortem"
|
|
16
|
-
- Populating a fresh vault with existing team knowledge
|
|
17
|
-
|
|
18
|
-
## The Magic: Automated Knowledge Extraction
|
|
19
|
-
|
|
20
|
-
### Step 1: Understand the Source
|
|
21
|
-
|
|
22
|
-
Read the target content (code, docs, etc.) and classify what type of knowledge it contains:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
YOUR_AGENT_core op:route_intent
|
|
26
|
-
params: { prompt: "Extract knowledge from: <source description>" }
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Step 2: Check What's Already Known
|
|
30
|
-
|
|
31
|
-
Before extracting, search the vault to avoid duplicates:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
YOUR_AGENT_core op:search_intelligent
|
|
35
|
-
params: { query: "<topic of the source material>" }
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
YOUR_AGENT_core op:vault_tags
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
YOUR_AGENT_core op:vault_domains
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
This tells you what the vault already covers — focus extraction on gaps.
|
|
47
|
-
|
|
48
|
-
### Step 3: Extract and Classify
|
|
49
|
-
|
|
50
|
-
Read through the source material and identify:
|
|
51
|
-
|
|
52
|
-
| Type | What to Look For |
|
|
53
|
-
| ---------------- | ------------------------------------------------------ |
|
|
54
|
-
| **pattern** | "We always do X because Y" — repeatable approaches |
|
|
55
|
-
| **anti-pattern** | "Don't do X because Y" — known mistakes |
|
|
56
|
-
| **decision** | "We chose X over Y because Z" — architectural choices |
|
|
57
|
-
| **principle** | "We believe X" — guiding rules |
|
|
58
|
-
| **workflow** | "The process for X is: step 1, step 2..." — procedures |
|
|
59
|
-
|
|
60
|
-
For each extracted item, determine:
|
|
61
|
-
|
|
62
|
-
- **Category**: Which domain it belongs to
|
|
63
|
-
- **Severity**: critical / warning / suggestion
|
|
64
|
-
- **Tags**: Searchable keywords
|
|
65
|
-
|
|
66
|
-
### Step 4: Batch Capture
|
|
67
|
-
|
|
68
|
-
For each extracted item, capture to the vault:
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
YOUR_AGENT_core op:capture_knowledge
|
|
72
|
-
params: {
|
|
73
|
-
title: "<clear, searchable name>",
|
|
74
|
-
description: "<what it is, when to apply, why it matters>",
|
|
75
|
-
type: "<pattern|anti-pattern|decision|principle|workflow>",
|
|
76
|
-
category: "<domain>",
|
|
77
|
-
tags: ["<tag1>", "<tag2>"],
|
|
78
|
-
severity: "<critical|warning|suggestion>",
|
|
79
|
-
example: "<code snippet or quote from source>",
|
|
80
|
-
why: "<reasoning>"
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Present each capture to the user as you go:
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
Captured: api-auth-jwt (pattern, critical)
|
|
88
|
-
→ "Use short-lived JWTs for authentication"
|
|
89
|
-
Auto-tags: auth, jwt, security
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Step 5: Post-Harvest Quality
|
|
93
|
-
|
|
94
|
-
After all items captured, run quality checks:
|
|
95
|
-
|
|
96
|
-
**Detect any duplicates created during harvest:**
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
YOUR_AGENT_core op:curator_detect_duplicates
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
**Groom all new entries — normalize tags, fix metadata:**
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
YOUR_AGENT_core op:curator_groom_all
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**Enrich entries with additional context:**
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
YOUR_AGENT_core op:curator_enrich
|
|
112
|
-
params: { entryId: "<id>" }
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**Check for contradictions with existing knowledge:**
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
YOUR_AGENT_core op:curator_contradictions
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### Step 6: Verify Harvest Results
|
|
122
|
-
|
|
123
|
-
Check vault health after the harvest:
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
YOUR_AGENT_core op:admin_health
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
YOUR_AGENT_core op:admin_vault_analytics
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Present a summary:
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
## Harvest Complete
|
|
137
|
-
|
|
138
|
-
Source: [file/doc name]
|
|
139
|
-
Extracted: X entries
|
|
140
|
-
- Y patterns
|
|
141
|
-
- Z anti-patterns
|
|
142
|
-
- W decisions
|
|
143
|
-
- V principles
|
|
144
|
-
|
|
145
|
-
Duplicates found: N (merged/skipped)
|
|
146
|
-
Contradictions found: N (flagged for review)
|
|
147
|
-
Vault health: OK
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### Step 7: Promote Universal Patterns (Optional)
|
|
151
|
-
|
|
152
|
-
If any extracted patterns apply across projects:
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
YOUR_AGENT_core op:memory_promote_to_global
|
|
156
|
-
params: { entryId: "<id>" }
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## The Magic
|
|
160
|
-
|
|
161
|
-
This feels like magic because the user points at a 50-page architecture doc and says "learn from this" — and 2 minutes later, the vault has 30 classified, tagged, searchable patterns that inform every future conversation. The agent didn't just read the doc — it understood it, classified it, deduplicated it, and made it permanent.
|
|
162
|
-
|
|
163
|
-
## Tips for Best Results
|
|
164
|
-
|
|
165
|
-
- **Start with your team's top 10 decisions** — the ones people keep asking about
|
|
166
|
-
- **Feed postmortems** — they're goldmines of anti-patterns
|
|
167
|
-
- **Feed architecture decision records (ADRs)** — pure decision captures
|
|
168
|
-
- **Feed code review comments** — patterns that reviewers enforce repeatedly
|
|
169
|
-
- **Feed onboarding docs** — principles that new team members need to learn
|
|
170
|
-
|
|
171
|
-
## Agent Tools Reference
|
|
172
|
-
|
|
173
|
-
| Op | When to Use |
|
|
174
|
-
| ------------------------------ | -------------------------------------- |
|
|
175
|
-
| `route_intent` | Classify the source material |
|
|
176
|
-
| `search_intelligent` | Check for existing knowledge |
|
|
177
|
-
| `vault_tags` / `vault_domains` | See what's already covered |
|
|
178
|
-
| `capture_knowledge` | Capture each extracted item |
|
|
179
|
-
| `curator_detect_duplicates` | Find duplicates post-harvest |
|
|
180
|
-
| `curator_groom_all` | Normalize all new entries |
|
|
181
|
-
| `curator_enrich` | LLM-enrich entries |
|
|
182
|
-
| `curator_contradictions` | Find conflicts with existing knowledge |
|
|
183
|
-
| `memory_promote_to_global` | Share universal patterns cross-project |
|
|
184
|
-
| `admin_health` | Post-harvest health check |
|
|
185
|
-
| `admin_vault_analytics` | Knowledge quality metrics |
|