@soleri/forge 5.5.0 → 5.7.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.
- package/dist/facades/forge.facade.js +4 -3
- package/dist/facades/forge.facade.js.map +1 -1
- package/dist/scaffolder.js +122 -8
- package/dist/scaffolder.js.map +1 -1
- package/dist/skills/skills/brain-debrief.md +214 -0
- package/dist/skills/skills/brainstorming.md +180 -0
- package/dist/skills/skills/code-patrol.md +178 -0
- package/dist/skills/skills/context-resume.md +146 -0
- package/dist/skills/skills/executing-plans.md +216 -0
- package/dist/skills/skills/fix-and-learn.md +167 -0
- package/dist/skills/skills/health-check.md +231 -0
- package/dist/skills/skills/knowledge-harvest.md +185 -0
- package/dist/skills/skills/onboard-me.md +198 -0
- package/dist/skills/skills/retrospective.md +205 -0
- package/dist/skills/skills/second-opinion.md +149 -0
- package/dist/skills/skills/systematic-debugging.md +241 -0
- package/dist/skills/skills/test-driven-development.md +281 -0
- package/dist/skills/skills/vault-capture.md +170 -0
- package/dist/skills/skills/vault-navigator.md +140 -0
- package/dist/skills/skills/verification-before-completion.md +182 -0
- package/dist/skills/skills/writing-plans.md +215 -0
- package/dist/templates/entry-point.js +8 -0
- package/dist/templates/entry-point.js.map +1 -1
- package/dist/templates/test-facades.js +35 -6
- package/dist/templates/test-facades.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/scaffolder.test.ts +2 -2
- package/src/facades/forge.facade.ts +4 -3
- package/src/scaffolder.ts +120 -10
- package/src/skills/brain-debrief.md +47 -19
- package/src/skills/brainstorming.md +19 -9
- package/src/skills/code-patrol.md +21 -19
- package/src/skills/context-resume.md +14 -11
- package/src/skills/executing-plans.md +30 -15
- package/src/skills/fix-and-learn.md +17 -14
- package/src/skills/health-check.md +29 -23
- package/src/skills/knowledge-harvest.md +27 -20
- package/src/skills/onboard-me.md +16 -15
- package/src/skills/retrospective.md +34 -18
- package/src/skills/second-opinion.md +16 -9
- package/src/skills/systematic-debugging.md +40 -29
- package/src/skills/test-driven-development.md +45 -30
- package/src/skills/vault-capture.md +31 -15
- package/src/skills/vault-navigator.md +24 -13
- package/src/skills/verification-before-completion.md +38 -26
- package/src/skills/writing-plans.md +21 -13
- package/src/templates/entry-point.ts +8 -0
- package/src/templates/test-facades.ts +35 -6
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: executing-plans
|
|
3
|
+
description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Adapted from superpowers (MIT License) -->
|
|
7
|
+
|
|
8
|
+
# Executing Plans
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Load plan, review critically, execute tasks in batches, report for review between batches.
|
|
13
|
+
|
|
14
|
+
**Core principle:** Batch execution with checkpoints for architect review.
|
|
15
|
+
|
|
16
|
+
**Announce at start:** "I'm using the executing-plans skill to implement this plan."
|
|
17
|
+
|
|
18
|
+
## The Process
|
|
19
|
+
|
|
20
|
+
### Step 1: Load and Review Plan
|
|
21
|
+
|
|
22
|
+
First, load the tracked plan from the agent:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
YOUR_AGENT_core op:get_plan
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
List all tasks to understand scope:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
YOUR_AGENT_core op:plan_list_tasks
|
|
32
|
+
params: { planId: "<id>" }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Check plan stats for an overview:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
YOUR_AGENT_core op:plan_stats
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If no tracked plan exists, read the plan file from `docs/plans/`.
|
|
42
|
+
|
|
43
|
+
Review critically — identify any questions or concerns about the plan.
|
|
44
|
+
|
|
45
|
+
- If concerns: Raise them with your human partner before starting
|
|
46
|
+
- If no concerns: Create TodoWrite and proceed
|
|
47
|
+
|
|
48
|
+
### Step 2: Start Execution Loop
|
|
49
|
+
|
|
50
|
+
For iterative tasks, start a validation loop:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
YOUR_AGENT_core op:loop_start
|
|
54
|
+
params: { prompt: "<plan objective>", mode: "custom" }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The loop tracks iterations and validates progress automatically.
|
|
58
|
+
|
|
59
|
+
### Step 3: Execute Batch
|
|
60
|
+
|
|
61
|
+
**Default: First 3 tasks**
|
|
62
|
+
|
|
63
|
+
For each task:
|
|
64
|
+
|
|
65
|
+
1. Mark as in_progress:
|
|
66
|
+
```
|
|
67
|
+
YOUR_AGENT_core op:update_task
|
|
68
|
+
params: { planId: "<id>", taskIndex: <n>, status: "in_progress" }
|
|
69
|
+
```
|
|
70
|
+
2. Follow each step exactly (plan has bite-sized steps)
|
|
71
|
+
3. Run verifications as specified
|
|
72
|
+
4. Mark as completed:
|
|
73
|
+
```
|
|
74
|
+
YOUR_AGENT_core op:update_task
|
|
75
|
+
params: { planId: "<id>", taskIndex: <n>, status: "completed" }
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
After each task, iterate the loop:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
YOUR_AGENT_core op:loop_iterate
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 4: Report
|
|
85
|
+
|
|
86
|
+
When batch complete:
|
|
87
|
+
|
|
88
|
+
- Show what was implemented
|
|
89
|
+
- Show verification output
|
|
90
|
+
- Check loop status:
|
|
91
|
+
```
|
|
92
|
+
YOUR_AGENT_core op:loop_status
|
|
93
|
+
```
|
|
94
|
+
- Say: "Ready for feedback."
|
|
95
|
+
|
|
96
|
+
### Step 5: Continue
|
|
97
|
+
|
|
98
|
+
Based on feedback:
|
|
99
|
+
|
|
100
|
+
- Apply changes if needed
|
|
101
|
+
- Execute next batch
|
|
102
|
+
- Repeat until complete
|
|
103
|
+
|
|
104
|
+
### Step 6: Complete Development
|
|
105
|
+
|
|
106
|
+
After all tasks complete and verified:
|
|
107
|
+
|
|
108
|
+
1. Run final verification (use verification-before-completion skill)
|
|
109
|
+
|
|
110
|
+
2. Complete the validation loop:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
YOUR_AGENT_core op:loop_complete
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
3. Reconcile plan — compare what was planned vs what actually happened:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
YOUR_AGENT_core op:plan_reconcile
|
|
120
|
+
params: {
|
|
121
|
+
planId: "<id>",
|
|
122
|
+
actualSteps: "<description of what was actually done>",
|
|
123
|
+
driftNotes: "<what differed from the plan>"
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
4. Complete plan lifecycle — extract knowledge and archive:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
YOUR_AGENT_core op:plan_complete_lifecycle
|
|
131
|
+
params: { planId: "<id>" }
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
5. Archive the plan for historical reference:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
YOUR_AGENT_core op:plan_archive
|
|
138
|
+
params: { planId: "<id>" }
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
6. Capture a session summary:
|
|
142
|
+
```
|
|
143
|
+
YOUR_AGENT_core op:session_capture
|
|
144
|
+
params: { summary: "<what was built, key decisions, files modified>" }
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Capture Learnings During Execution
|
|
148
|
+
|
|
149
|
+
If you discover something worth remembering during execution (a gotcha, a better approach, an anti-pattern):
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
YOUR_AGENT_core op:capture_quick
|
|
153
|
+
params: {
|
|
154
|
+
title: "<what you learned>",
|
|
155
|
+
description: "<context, why it matters, when it applies>"
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Don't wait until the end — capture insights as they happen.
|
|
160
|
+
|
|
161
|
+
## When to Stop and Ask for Help
|
|
162
|
+
|
|
163
|
+
**STOP executing immediately when:**
|
|
164
|
+
|
|
165
|
+
- Hit a blocker mid-batch (missing dependency, test fails, instruction unclear)
|
|
166
|
+
- Plan has critical gaps preventing starting
|
|
167
|
+
- You don't understand an instruction
|
|
168
|
+
- Verification fails repeatedly
|
|
169
|
+
|
|
170
|
+
**Ask for clarification rather than guessing.**
|
|
171
|
+
|
|
172
|
+
## When to Revisit Earlier Steps
|
|
173
|
+
|
|
174
|
+
**Return to Review (Step 1) when:**
|
|
175
|
+
|
|
176
|
+
- Partner updates the plan based on your feedback
|
|
177
|
+
- Fundamental approach needs rethinking
|
|
178
|
+
|
|
179
|
+
**Don't force through blockers** - stop and ask.
|
|
180
|
+
|
|
181
|
+
## Remember
|
|
182
|
+
|
|
183
|
+
- Review plan critically first
|
|
184
|
+
- Follow plan steps exactly
|
|
185
|
+
- Don't skip verifications
|
|
186
|
+
- Between batches: just report and wait
|
|
187
|
+
- Stop when blocked, don't guess
|
|
188
|
+
- Capture learnings as you go, not just at the end
|
|
189
|
+
- Always reconcile the plan after execution — drift data makes future plans better
|
|
190
|
+
- Never start implementation on main/master branch without explicit user consent
|
|
191
|
+
|
|
192
|
+
## Agent Tools Reference
|
|
193
|
+
|
|
194
|
+
| Op | When to Use |
|
|
195
|
+
| ------------------------- | --------------------------------------------- |
|
|
196
|
+
| `get_plan` | Load tracked plan |
|
|
197
|
+
| `plan_list_tasks` | List all tasks in the plan |
|
|
198
|
+
| `plan_stats` | Plan overview and metrics |
|
|
199
|
+
| `update_task` | Mark tasks in_progress / completed |
|
|
200
|
+
| `loop_start` | Begin validation loop for iterative execution |
|
|
201
|
+
| `loop_iterate` | Track each iteration |
|
|
202
|
+
| `loop_status` | Check loop progress |
|
|
203
|
+
| `loop_complete` | Finish validation loop |
|
|
204
|
+
| `plan_reconcile` | Compare planned vs actual (post-execution) |
|
|
205
|
+
| `plan_complete_lifecycle` | Extract knowledge from execution |
|
|
206
|
+
| `plan_archive` | Archive plan for history |
|
|
207
|
+
| `session_capture` | Save session context |
|
|
208
|
+
| `capture_quick` | Capture mid-execution learnings |
|
|
209
|
+
|
|
210
|
+
## Integration
|
|
211
|
+
|
|
212
|
+
**Required workflow skills:**
|
|
213
|
+
|
|
214
|
+
- writing-plans — Creates the plan this skill executes
|
|
215
|
+
- verification-before-completion — Verify work before claiming completion
|
|
216
|
+
- test-driven-development — Follow TDD for each implementation step
|
|
@@ -0,0 +1,167 @@
|
|
|
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 |
|
|
@@ -0,0 +1,231 @@
|
|
|
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 |
|