@soleri/forge 9.0.1 → 9.3.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 (64) 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 +9 -14
  4. package/dist/scaffold-filetree.js.map +1 -1
  5. package/dist/skills/brain-debrief/SKILL.md +28 -24
  6. package/dist/skills/brainstorming/SKILL.md +16 -12
  7. package/dist/skills/code-patrol/SKILL.md +22 -22
  8. package/dist/skills/context-resume/SKILL.md +22 -19
  9. package/dist/skills/deep-review/SKILL.md +197 -0
  10. package/dist/skills/executing-plans/SKILL.md +23 -18
  11. package/dist/skills/fix-and-learn/SKILL.md +20 -16
  12. package/dist/skills/health-check/SKILL.md +32 -28
  13. package/dist/skills/knowledge-harvest/SKILL.md +27 -23
  14. package/dist/skills/onboard-me/SKILL.md +29 -26
  15. package/dist/skills/parallel-execute/SKILL.md +291 -0
  16. package/dist/skills/retrospective/SKILL.md +27 -24
  17. package/dist/skills/second-opinion/SKILL.md +17 -14
  18. package/dist/skills/systematic-debugging/SKILL.md +20 -16
  19. package/dist/skills/test-driven-development/SKILL.md +16 -16
  20. package/dist/skills/vault-capture/SKILL.md +24 -20
  21. package/dist/skills/vault-navigator/SKILL.md +24 -20
  22. package/dist/skills/vault-smells/SKILL.md +259 -0
  23. package/dist/skills/verification-before-completion/SKILL.md +26 -23
  24. package/dist/skills/writing-plans/SKILL.md +23 -20
  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 +10 -14
  40. package/src/skills/brain-debrief/SKILL.md +28 -24
  41. package/src/skills/brainstorming/SKILL.md +16 -12
  42. package/src/skills/code-patrol/SKILL.md +22 -22
  43. package/src/skills/context-resume/SKILL.md +22 -19
  44. package/src/skills/deep-review/SKILL.md +197 -0
  45. package/src/skills/executing-plans/SKILL.md +23 -18
  46. package/src/skills/fix-and-learn/SKILL.md +20 -16
  47. package/src/skills/health-check/SKILL.md +32 -28
  48. package/src/skills/knowledge-harvest/SKILL.md +27 -23
  49. package/src/skills/onboard-me/SKILL.md +29 -26
  50. package/src/skills/parallel-execute/SKILL.md +291 -0
  51. package/src/skills/retrospective/SKILL.md +27 -24
  52. package/src/skills/second-opinion/SKILL.md +17 -14
  53. package/src/skills/systematic-debugging/SKILL.md +20 -16
  54. package/src/skills/test-driven-development/SKILL.md +16 -16
  55. package/src/skills/vault-capture/SKILL.md +24 -20
  56. package/src/skills/vault-navigator/SKILL.md +24 -20
  57. package/src/skills/vault-smells/SKILL.md +259 -0
  58. package/src/skills/verification-before-completion/SKILL.md +26 -23
  59. package/src/skills/writing-plans/SKILL.md +23 -20
  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
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: vault-navigator
3
- description: Use when querying the knowledge base for existing solutions, patterns, best practices, or prior art before building something new.
3
+ description: >
4
+ Use when the user asks "search the vault", "find patterns for", "have we seen this before",
5
+ "what does the vault say about", "best practice for", "check vault", "vault search", or wants
6
+ to query the knowledge base for existing solutions and prior art. For saving a new entry, use
7
+ vault-capture instead.
4
8
  ---
5
9
 
6
10
  # Vault Navigator — Knowledge Oracle
@@ -12,7 +16,7 @@ Navigate the vault intelligently. Picks the right search strategy based on what
12
16
  ### "Have we seen this?" / "Best practice for X"
13
17
 
14
18
  ```
15
- ernesto_core op:search_intelligent
19
+ YOUR_AGENT_core op:search_intelligent
16
20
  params: { query: "<question>" }
17
21
  ```
18
22
 
@@ -21,30 +25,30 @@ If results are weak, fall back to `op:search` with explicit filters (type, categ
21
25
  ### "Show me everything about X" (Exploration)
22
26
 
23
27
  ```
24
- ernesto_core op:vault_tags
25
- ernesto_core op:vault_domains
26
- ernesto_core op:vault_recent
28
+ YOUR_AGENT_core op:vault_tags
29
+ YOUR_AGENT_core op:vault_domains
30
+ YOUR_AGENT_core op:vault_recent
27
31
  ```
28
32
 
29
33
  ### "What's stale?" / "What needs updating?"
30
34
 
31
35
  ```
32
- ernesto_core op:vault_age_report
36
+ YOUR_AGENT_core op:vault_age_report
33
37
  ```
34
38
 
35
39
  ### "What do other projects do?"
36
40
 
37
41
  ```
38
- ernesto_core op:memory_cross_project_search
42
+ YOUR_AGENT_core op:memory_cross_project_search
39
43
  params: { query: "<topic>", crossProject: true }
40
- ernesto_core op:project_linked_projects
44
+ YOUR_AGENT_core op:project_linked_projects
41
45
  ```
42
46
 
43
47
  ### "Has brain learned about X?"
44
48
 
45
49
  ```
46
- ernesto_core op:brain_strengths
47
- ernesto_core op:brain_global_patterns
50
+ YOUR_AGENT_core op:brain_strengths
51
+ YOUR_AGENT_core op:brain_global_patterns
48
52
  params: { domain: "<domain>" }
49
53
  ```
50
54
 
@@ -68,13 +72,13 @@ If all vault strategies return nothing, search the web. If web finds something u
68
72
 
69
73
  ## Quick Reference
70
74
 
71
- | Op | When to Use |
72
- |----|-------------|
73
- | `search_intelligent` | Default semantic search |
74
- | `search` | Structured search with filters |
75
- | `vault_tags` / `vault_domains` | Browse knowledge landscape |
76
- | `vault_recent` | Recently modified entries |
77
- | `vault_age_report` | Stale entries |
78
- | `memory_cross_project_search` | Cross-project search |
79
- | `brain_strengths` / `brain_global_patterns` | Proven patterns |
80
- | `capture_quick` | Capture web findings |
75
+ | Op | When to Use |
76
+ | ------------------------------------------- | ------------------------------ |
77
+ | `search_intelligent` | Default semantic search |
78
+ | `search` | Structured search with filters |
79
+ | `vault_tags` / `vault_domains` | Browse knowledge landscape |
80
+ | `vault_recent` | Recently modified entries |
81
+ | `vault_age_report` | Stale entries |
82
+ | `memory_cross_project_search` | Cross-project search |
83
+ | `brain_strengths` / `brain_global_patterns` | Proven patterns |
84
+ | `capture_quick` | Capture web findings |
@@ -0,0 +1,259 @@
1
+ ---
2
+ name: vault-smells
3
+ description: >
4
+ Use for deep knowledge quality analysis — finding contradictions, stale patterns, orphaned entries,
5
+ weak links, knowledge decay, and structural issues in the vault. Triggers on "vault smells",
6
+ "knowledge quality", "vault analysis", "find contradictions", "stale patterns", "knowledge debt",
7
+ "vault deep check", "is my vault healthy". Goes deeper than health-check (which is operational).
8
+ For code review, use deep-review instead.
9
+ ---
10
+
11
+ # Vault Smells — Knowledge Quality Deep Analysis
12
+
13
+ Detects structural problems in the knowledge base that degrade decision quality over time. Goes beyond operational health (is the DB up?) into knowledge integrity (is the knowledge trustworthy?).
14
+
15
+ ## Smell Categories
16
+
17
+ ### 1. Contradiction Smells
18
+
19
+ Entries that give conflicting guidance. The most dangerous smell — leads to inconsistent decisions.
20
+
21
+ ```
22
+ YOUR_AGENT_core op:curator_contradictions
23
+ ```
24
+
25
+ **What to look for:**
26
+
27
+ - Two patterns that recommend opposite approaches for the same situation
28
+ - An anti-pattern that contradicts an active pattern
29
+ - Entries from different time periods with conflicting advice (the older one may be stale)
30
+
31
+ **Resolution:** Present contradictions to user. One must win — archive the loser or scope them to different contexts.
32
+
33
+ ### 2. Staleness Smells
34
+
35
+ Knowledge that was true once but may not be anymore.
36
+
37
+ ```
38
+ YOUR_AGENT_core op:vault_age_report
39
+ ```
40
+
41
+ **Indicators:**
42
+
43
+ - Entries >60 days without access or update
44
+ - Patterns referencing APIs, libraries, or versions that have changed
45
+ - Entries tagged with technologies the project no longer uses
46
+ - Confidence scores that haven't been reinforced by brain feedback
47
+
48
+ **Action:** Flag for review. Don't auto-delete — stale doesn't mean wrong.
49
+
50
+ ### 3. Orphan Smells
51
+
52
+ Entries with no connections to the rest of the knowledge graph.
53
+
54
+ ```
55
+ YOUR_AGENT_core op:admin_vault_analytics
56
+ YOUR_AGENT_core op:curator_detect_duplicates
57
+ ```
58
+
59
+ **Indicators:**
60
+
61
+ - Entries with zero inbound or outbound links
62
+ - Entries never returned in search results (check search insights)
63
+ - Entries with no tags or only generic tags
64
+ - Entries that were captured but never groomed
65
+
66
+ **Why it matters:** Orphans don't surface when needed. They're knowledge that exists but can't be found. In a Zettelkasten, an unlinked note is a dead note.
67
+
68
+ **Action:** Link, merge, or archive. Every entry should connect to at least one other.
69
+
70
+ ### 4. Duplication Smells
71
+
72
+ Multiple entries covering the same ground with slight variations.
73
+
74
+ ```
75
+ YOUR_AGENT_core op:curator_detect_duplicates
76
+ ```
77
+
78
+ **Indicators:**
79
+
80
+ - High similarity scores between entries
81
+ - Same tags and category but different titles
82
+ - Entries captured in different sessions about the same topic
83
+ - Parallel entries — one as pattern, one as anti-pattern for the same concept
84
+
85
+ **Action:** Merge the best parts into one authoritative entry. Archive the rest.
86
+
87
+ ### 5. Shallow Entry Smells
88
+
89
+ Entries that exist but lack substance — captured in a hurry, never enriched.
90
+
91
+ ```
92
+ YOUR_AGENT_core op:curator_health_audit
93
+ ```
94
+
95
+ **Indicators:**
96
+
97
+ - Description under 50 characters
98
+ - No examples or context
99
+ - Missing "why" — only states "what" without rationale
100
+ - No tags beyond the auto-generated ones
101
+ - Quality score below 40
102
+
103
+ **Action:** Enrich with context, examples, and rationale — or archive if no longer relevant.
104
+
105
+ ### 6. Category Drift Smells
106
+
107
+ The taxonomy has grown inconsistent over time.
108
+
109
+ ```
110
+ YOUR_AGENT_core op:vault_domains
111
+ YOUR_AGENT_core op:vault_tags
112
+ ```
113
+
114
+ **Indicators:**
115
+
116
+ - Near-duplicate categories (e.g., "error-handling" and "errors" and "exception-handling")
117
+ - Categories with only 1-2 entries (too granular)
118
+ - Tags used inconsistently (same concept, different tag names)
119
+ - Entries miscategorized (architecture pattern filed under "testing")
120
+
121
+ **Action:** Normalize with `op:curator_groom_all`. Merge overlapping categories.
122
+
123
+ ### 7. Confidence Decay Smells
124
+
125
+ Brain patterns losing strength without reinforcement.
126
+
127
+ ```
128
+ YOUR_AGENT_core op:brain_strengths
129
+ ```
130
+
131
+ **Indicators:**
132
+
133
+ - Patterns with high initial strength that have decayed below 0.3
134
+ - Patterns that were strong but haven't received positive feedback in >30 days
135
+ - Patterns with mixed feedback (both positive and negative) — unresolved
136
+
137
+ **Action:** Review with user. Reinforce valid patterns, retire invalid ones.
138
+
139
+ ### 8. Knowledge Gap Smells
140
+
141
+ Areas where the vault _should_ have knowledge but doesn't.
142
+
143
+ ```
144
+ YOUR_AGENT_core op:admin_search_insights
145
+ ```
146
+
147
+ **Indicators:**
148
+
149
+ - Repeated search queries that return no results
150
+ - Domains the project uses but vault has no entries for
151
+ - Anti-patterns captured without corresponding patterns (what to do instead?)
152
+ - Patterns without linked anti-patterns (what to avoid?)
153
+
154
+ **Action:** Create targeted entries to fill gaps. Use knowledge-harvest skill on relevant docs/code.
155
+
156
+ ## Running the Analysis
157
+
158
+ ### Step 1: Gather Data
159
+
160
+ ```
161
+ YOUR_AGENT_core op:admin_health
162
+ YOUR_AGENT_core op:admin_vault_analytics
163
+ YOUR_AGENT_core op:curator_health_audit
164
+ YOUR_AGENT_core op:curator_contradictions
165
+ YOUR_AGENT_core op:curator_detect_duplicates
166
+ YOUR_AGENT_core op:vault_age_report
167
+ YOUR_AGENT_core op:vault_domains
168
+ YOUR_AGENT_core op:vault_tags
169
+ YOUR_AGENT_core op:brain_strengths
170
+ YOUR_AGENT_core op:admin_search_insights
171
+ ```
172
+
173
+ ### Step 2: Classify Smells
174
+
175
+ For each smell category, assess severity:
176
+
177
+ | Severity | Meaning |
178
+ | ----------- | ------------------------------------------ |
179
+ | 🟢 Clean | No issues in this category |
180
+ | 🟡 Minor | 1-3 instances, low impact |
181
+ | 🟠 Moderate | Multiple instances, degrading quality |
182
+ | 🔴 Critical | Widespread, actively causing bad decisions |
183
+
184
+ ### Step 3: Present the Report
185
+
186
+ ```
187
+ ## Vault Smell Report
188
+
189
+ ### Overview
190
+ | Metric | Value |
191
+ |--------|-------|
192
+ | Total entries | X |
193
+ | Overall health score | X/100 |
194
+ | Smells found | X across Y categories |
195
+
196
+ ### Smell Summary
197
+ | Category | Severity | Count | Impact |
198
+ |----------|----------|-------|--------|
199
+ | Contradictions | 🔴/🟠/🟡/🟢 | X | Inconsistent decisions |
200
+ | Staleness | 🔴/🟠/🟡/🟢 | X | Outdated guidance |
201
+ | Orphans | 🔴/🟠/🟡/🟢 | X | Unfindable knowledge |
202
+ | Duplicates | 🔴/🟠/🟡/🟢 | X | Noise, conflicting versions |
203
+ | Shallow entries | 🔴/🟠/🟡/🟢 | X | Low-value knowledge |
204
+ | Category drift | 🔴/🟠/🟡/🟢 | X | Poor discoverability |
205
+ | Confidence decay | 🔴/🟠/🟡/🟢 | X | Unreliable recommendations |
206
+ | Knowledge gaps | 🔴/🟠/🟡/🟢 | X | Blind spots |
207
+
208
+ ### Critical Findings
209
+ [Top 3 most impactful issues with specific entries/examples]
210
+
211
+ ### Recommended Actions
212
+ | Priority | Action | Effort | Impact |
213
+ |----------|--------|--------|--------|
214
+ | 1 | [most impactful fix] | Low/Med/High | High |
215
+ | 2 | [second] | Low/Med/High | Med |
216
+ | 3 | [third] | Low/Med/High | Med |
217
+
218
+ ### Trend (if prior reports exist)
219
+ | Metric | Last Check | Now | Direction |
220
+ |--------|-----------|-----|-----------|
221
+ | Health score | X | Y | ↑/↓/→ |
222
+ | Smell count | X | Y | ↑/↓/→ |
223
+ ```
224
+
225
+ ### Step 4: Fix (with user approval)
226
+
227
+ Do NOT auto-fix. Present findings, get approval, then:
228
+
229
+ - Contradictions → `op:curator_resolve_contradiction`
230
+ - Duplicates → `op:curator_groom` (merge)
231
+ - Orphans → link or archive
232
+ - Shallow entries → enrich or archive
233
+ - Category drift → `op:curator_groom_all` (normalize)
234
+ - Gaps → `op:capture_knowledge` (fill)
235
+
236
+ After fixes: `op:brain_build_intelligence` to rebuild with clean data.
237
+
238
+ ## Common Mistakes
239
+
240
+ - Auto-fixing without presenting findings first (user may disagree)
241
+ - Treating all smells as equally urgent (contradictions >> orphans)
242
+ - Deleting stale entries without checking if they're still valid
243
+ - Running this too frequently (monthly is usually enough)
244
+ - Not rebuilding brain intelligence after major cleanup
245
+
246
+ ## Quick Reference
247
+
248
+ | Smell | Detection Op | Fix Op |
249
+ | ---------------- | ------------------------------ | ------------------------------- |
250
+ | Contradictions | `curator_contradictions` | `curator_resolve_contradiction` |
251
+ | Staleness | `vault_age_report` | Review + archive/update |
252
+ | Orphans | `admin_vault_analytics` | Link or archive |
253
+ | Duplicates | `curator_detect_duplicates` | `curator_groom` (merge) |
254
+ | Shallow entries | `curator_health_audit` | Enrich or archive |
255
+ | Category drift | `vault_domains` + `vault_tags` | `curator_groom_all` |
256
+ | Confidence decay | `brain_strengths` | Reinforce or retire |
257
+ | Knowledge gaps | `admin_search_insights` | `capture_knowledge` |
258
+
259
+ **Related skills:** health-check (operational status), vault-curate (active cleanup), knowledge-harvest (fill gaps)
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: verification-before-completion
3
- description: Use when about to claim work is complete, fixed, or passing — before committing, creating PRs, or moving to the next task.
3
+ description: >
4
+ Use as an internal quality gate before claiming any task is done — run tests, check output,
5
+ verify behavior. This is a mid-workflow checkpoint, not a shipping gate. For actual deployment
6
+ and release workflows, use deliver-and-ship instead.
4
7
  ---
5
8
 
6
9
  # Verification Before Completion
@@ -32,20 +35,20 @@ If you haven't run the verification command in this message, you cannot claim it
32
35
 
33
36
  After passing verification commands:
34
37
 
35
- - `ernesto_core op:admin_health` — catches vault corruption, stale caches
36
- - `ernesto_core op:admin_diagnostic` — module status, database integrity, config validity
37
- - `ernesto_core op:admin_vault_analytics` — knowledge quality metrics
38
+ - `YOUR_AGENT_core op:admin_health` — catches vault corruption, stale caches
39
+ - `YOUR_AGENT_core op:admin_diagnostic` — module status, database integrity, config validity
40
+ - `YOUR_AGENT_core op:admin_vault_analytics` — knowledge quality metrics
38
41
 
39
42
  If any check reports problems, address before claiming completion.
40
43
 
41
44
  ## Common Failures
42
45
 
43
- | Claim | Requires | Not Sufficient |
44
- |-------|----------|----------------|
45
- | Tests pass | Test output: 0 failures | Previous run, "should pass" |
46
- | Build succeeds | Build command: exit 0 | Linter passing |
47
- | Bug fixed | Original symptom passes | "Code changed, assumed fixed" |
48
- | Requirements met | Line-by-line checklist | Tests passing alone |
46
+ | Claim | Requires | Not Sufficient |
47
+ | ---------------- | ----------------------- | ----------------------------- |
48
+ | Tests pass | Test output: 0 failures | Previous run, "should pass" |
49
+ | Build succeeds | Build command: exit 0 | Linter passing |
50
+ | Bug fixed | Original symptom passes | "Code changed, assumed fixed" |
51
+ | Requirements met | Line-by-line checklist | Tests passing alone |
49
52
 
50
53
  ## Red Flags — STOP
51
54
 
@@ -54,16 +57,16 @@ If any check reports problems, address before claiming completion.
54
57
  - About to commit/push/PR without verification
55
58
  - Relying on partial verification
56
59
 
57
- | Excuse | Reality |
58
- |--------|---------|
59
- | "Should work now" | RUN the verification |
60
- | "I'm confident" | Confidence is not evidence |
61
- | "Just this once" | No exceptions |
62
- | "Partial check is enough" | Partial proves nothing |
60
+ | Excuse | Reality |
61
+ | ------------------------- | -------------------------- |
62
+ | "Should work now" | RUN the verification |
63
+ | "I'm confident" | Confidence is not evidence |
64
+ | "Just this once" | No exceptions |
65
+ | "Partial check is enough" | Partial proves nothing |
63
66
 
64
67
  ## After Verification
65
68
 
66
- Capture session summary: `ernesto_core op:session_capture params: { summary: "<what was accomplished>" }`
69
+ Capture session summary: `YOUR_AGENT_core op:session_capture params: { summary: "<what was accomplished>" }`
67
70
 
68
71
  ## Common Mistakes
69
72
 
@@ -74,9 +77,9 @@ Capture session summary: `ernesto_core op:session_capture params: { summary: "<w
74
77
 
75
78
  ## Quick Reference
76
79
 
77
- | Op | When to Use |
78
- |----|-------------|
79
- | `admin_health` | Quick system health check |
80
- | `admin_diagnostic` | Comprehensive diagnostic |
81
- | `admin_vault_analytics` | Knowledge quality metrics |
82
- | `session_capture` | Persist verified completion context |
80
+ | Op | When to Use |
81
+ | ----------------------- | ----------------------------------- |
82
+ | `admin_health` | Quick system health check |
83
+ | `admin_diagnostic` | Comprehensive diagnostic |
84
+ | `admin_vault_analytics` | Knowledge quality metrics |
85
+ | `session_capture` | Persist verified completion context |
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: writing-plans
3
- description: Use when there is a spec or requirements for a multi-step task and an implementation plan needs to be written before touching code.
3
+ description: >
4
+ Use when the user has clear requirements or a spec and needs a structured implementation plan —
5
+ "create a plan", "break this down", "plan the implementation". Requirements are already known.
6
+ For open-ended exploration when requirements are unclear, use brainstorming instead.
4
7
  ---
5
8
 
6
9
  # Writing Plans
@@ -16,11 +19,11 @@ Write implementation plans assuming the engineer has zero codebase context. Docu
16
19
  ### 1. Vault First
17
20
 
18
21
  ```
19
- ernesto_core op:search_intelligent
22
+ YOUR_AGENT_core op:search_intelligent
20
23
  params: { query: "<feature being planned>" }
21
- ernesto_core op:brain_strengths
22
- ernesto_core op:vault_domains
23
- ernesto_core op:vault_tags
24
+ YOUR_AGENT_core op:brain_strengths
25
+ YOUR_AGENT_core op:vault_domains
26
+ YOUR_AGENT_core op:vault_tags
24
27
  ```
25
28
 
26
29
  ### 2. Web Search Second
@@ -34,7 +37,7 @@ Incorporate vault insights and web findings. Reference specific entries.
34
37
  ## Create a Tracked Plan
35
38
 
36
39
  ```
37
- ernesto_core op:create_plan
40
+ YOUR_AGENT_core op:create_plan
38
41
  params: {
39
42
  objective: "<one-sentence goal>",
40
43
  scope: { included: [...], excluded: [...] },
@@ -45,16 +48,16 @@ ernesto_core op:create_plan
45
48
  ## Grade and Improve
46
49
 
47
50
  ```
48
- ernesto_core op:plan_grade params: { planId: "<id>" }
49
- ernesto_core op:plan_auto_improve params: { planId: "<id>" }
50
- ernesto_core op:plan_meets_grade params: { planId: "<id>", targetGrade: "A" }
51
+ YOUR_AGENT_core op:plan_grade params: { planId: "<id>" }
52
+ YOUR_AGENT_core op:plan_auto_improve params: { planId: "<id>" }
53
+ YOUR_AGENT_core op:plan_meets_grade params: { planId: "<id>", targetGrade: "A" }
51
54
  ```
52
55
 
53
56
  Iterate with: `op:plan_iterate params: { planId: "<id>", feedback: "<improvement>" }`
54
57
 
55
58
  ## Split into Tasks
56
59
 
57
- After approval: `ernesto_core op:plan_split params: { planId: "<id>" }`
60
+ After approval: `YOUR_AGENT_core op:plan_split params: { planId: "<id>" }`
58
61
 
59
62
  ## Task Granularity
60
63
 
@@ -80,7 +83,7 @@ Each step is one action (2-5 minutes): write failing test, run it, implement, ru
80
83
  ## After Approval
81
84
 
82
85
  ```
83
- ernesto_core op:approve_plan params: { planId: "<id>" }
86
+ YOUR_AGENT_core op:approve_plan params: { planId: "<id>" }
84
87
  ```
85
88
 
86
89
  Offer execution choice: subagent-driven (this session) or parallel session with executing-plans.
@@ -94,12 +97,12 @@ Offer execution choice: subagent-driven (this session) or parallel session with
94
97
 
95
98
  ## Quick Reference
96
99
 
97
- | Op | When to Use |
98
- |----|-------------|
99
- | `search_intelligent` | Find patterns before planning |
100
- | `brain_strengths` | Proven approaches |
101
- | `create_plan` | Create tracked plan |
102
- | `plan_grade` / `plan_auto_improve` | Grade and improve |
103
- | `plan_iterate` | Iterate with feedback |
104
- | `plan_split` | Split into tasks |
105
- | `approve_plan` | Lock in approved plan |
100
+ | Op | When to Use |
101
+ | ---------------------------------- | ----------------------------- |
102
+ | `search_intelligent` | Find patterns before planning |
103
+ | `brain_strengths` | Proven approaches |
104
+ | `create_plan` | Create tracked plan |
105
+ | `plan_grade` / `plan_auto_improve` | Grade and improve |
106
+ | `plan_iterate` | Iterate with feedback |
107
+ | `plan_split` | Split into tasks |
108
+ | `approve_plan` | Lock in approved plan |
@@ -61,13 +61,13 @@ When the user asks about your capabilities or you need to check what you've lear
61
61
  ## Session Start
62
62
 
63
63
  Do NOT call any tools automatically on session start. Just greet the user in character.
64
- Only call ${bt}${tp}_orchestrate op:register${bt} or ${bt}${tp}_core op:activate${bt} when you actually need project context or capability discovery — not on every message.
64
+ Only call ${bt}${tp}_orchestrate op:session_start${bt} or ${bt}${tp}_core op:activate${bt} when you actually need project context or capability discovery — not on every message.
65
65
 
66
66
  ## Essential Tools
67
67
 
68
68
  | Facade | Key Ops |
69
69
  |--------|---------|
70
- | ${bt}${tp}_core${bt} | ${bt}health${bt}, ${bt}search${bt}, ${bt}identity${bt}, ${bt}register${bt}, ${bt}activate${bt} |
70
+ | ${bt}${tp}_core${bt} | ${bt}health${bt}, ${bt}search${bt}, ${bt}identity${bt}, ${bt}session_start${bt}, ${bt}activate${bt} |
71
71
  ${domainRows}
72
72
  | ${bt}${tp}_vault${bt} | ${bt}search_intelligent${bt}, ${bt}capture_knowledge${bt}, ${bt}capture_quick${bt}, ${bt}search_feedback${bt} |
73
73
  | ${bt}${tp}_vault${bt} (keeper) | ${bt}knowledge_audit${bt}, ${bt}knowledge_health${bt}, ${bt}knowledge_merge${bt}, ${bt}knowledge_reorganize${bt} |
@@ -66,7 +66,7 @@ export function generateClaudeMdTemplate(config: AgentConfig): string {
66
66
  // ─── Session Start ─────────────────────────────────────
67
67
  '## Session Start',
68
68
  '',
69
- `On every new session: ${bt}${toolPrefix}_orchestrate op:register params:{ projectPath: "." }${bt}`,
69
+ `On every new session: ${bt}${toolPrefix}_orchestrate op:session_start params:{ projectPath: "." }${bt}`,
70
70
  '',
71
71
  ];
72
72
 
@@ -77,7 +77,7 @@ export function generateClaudeMdTemplate(config: AgentConfig): string {
77
77
  '',
78
78
  '| Facade | Key Ops |',
79
79
  '|--------|---------|',
80
- `| ${bt}${toolPrefix}_core${bt} | ${bt}health${bt}, ${bt}search${bt}, ${bt}identity${bt}, ${bt}register${bt}, ${bt}activate${bt} |`,
80
+ `| ${bt}${toolPrefix}_core${bt} | ${bt}health${bt}, ${bt}search${bt}, ${bt}identity${bt}, ${bt}session_start${bt}, ${bt}activate${bt} |`,
81
81
  );
82
82
 
83
83
  // Domain facades — one row per domain
@@ -119,6 +119,7 @@ const ENGINE_RULES_LINES: string[] = [
119
119
  '## Planning',
120
120
  '<!-- soleri:planning -->',
121
121
  '',
122
+ '- **MANDATORY**: Create a formal plan (`op:create_plan`) for every work task. Memory and vault knowledge alone are not sufficient — plans must be persisted and graded.',
122
123
  '- Use `op:create_plan` before writing ANY code. Show the plan, wait for approval.',
123
124
  '- Two-gate approval: Gate 1 (`op:approve_plan`), Gate 2 (`op:plan_split`). Never skip either.',
124
125
  '- Wait for explicit "yes" / "approve" before proceeding past each gate.',
@@ -127,6 +128,15 @@ const ENGINE_RULES_LINES: string[] = [
127
128
  '- On session start: check for plans in `executing`/`reconciling` state and remind.',
128
129
  '- Exceptions: read-only operations, user says "just do it", single-line fixes.',
129
130
  '',
131
+ '### Grade Gate',
132
+ '',
133
+ '**MANDATORY**: Plans must grade **A or higher** before approval. The engine enforces this programmatically.',
134
+ '',
135
+ '- `op:approve_plan` will **reject** any plan with a latest grade below A (score < 90).',
136
+ '- If rejected, iterate on the plan (`op:create_plan`) to address the gaps, then re-grade (`op:plan_grade`) before approving.',
137
+ '- The threshold is configurable per-agent via `engine.minGradeForApproval` in `agent.yaml` (default: `A`).',
138
+ '- Plans with no grade check are allowed through for backward compatibility.',
139
+ '',
130
140
  '### Lifecycle States',
131
141
  '',
132
142
  '| State | Expires | Next Action |',
@@ -339,7 +349,7 @@ const ENGINE_RULES_LINES: string[] = [
339
349
  '### Session Start Protocol',
340
350
  '',
341
351
  'Do NOT call tools automatically on session start — just greet the user in character.',
342
- 'Call `op:register` only when you need project context for a task (not on every message).',
352
+ 'Call `op:session_start` only when you need project context for a task (not on every message).',
343
353
  'Call `op:activate` only when checking evolved capabilities or recovering session state.',
344
354
  '',
345
355
  '### Context Compaction',
@@ -418,5 +428,30 @@ const ENGINE_RULES_LINES: string[] = [
418
428
  '| Template drift suspected | `soleri agent diff` to see what changed |',
419
429
  '',
420
430
 
431
+ // ─── Verification Protocol ─────────────────────────────────
432
+ '## Verification Protocol',
433
+ '<!-- soleri:verification-protocol -->',
434
+ '',
435
+ '**MANDATORY** when modifying existing code: prove before you fix.',
436
+ '',
437
+ '### The Rule',
438
+ '',
439
+ '1. **Find** — identify the issue in existing code',
440
+ '2. **Prove** — reproduce the issue (test case, error log, stack trace)',
441
+ '3. **Fix** — only after the issue is proven reproducible',
442
+ '',
443
+ '### Anti-pattern',
444
+ '',
445
+ '- Fixing code "just in case" or for aesthetics without a proven issue',
446
+ '- Claiming a bug exists without reproduction evidence',
447
+ '- Refactoring working code under the guise of a bug fix',
448
+ '',
449
+ '### Scope',
450
+ '',
451
+ '- Applies ONLY to tasks that modify existing code',
452
+ '- Does NOT apply to new code, new files, or greenfield features',
453
+ '- Advisory only — flags warnings, never blocks execution',
454
+ '',
455
+
421
456
  `<!-- /${ENGINE_MARKER} -->`,
422
457
  ];