@soleri/forge 9.2.0 → 9.3.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.
Files changed (46) hide show
  1. package/dist/scaffold-filetree.js +1 -1
  2. package/dist/skills/brain-debrief/SKILL.md +12 -12
  3. package/dist/skills/brainstorming/SKILL.md +7 -7
  4. package/dist/skills/code-patrol/SKILL.md +15 -15
  5. package/dist/skills/context-resume/SKILL.md +8 -8
  6. package/dist/skills/deep-review/SKILL.md +22 -11
  7. package/dist/skills/executing-plans/SKILL.md +10 -9
  8. package/dist/skills/fix-and-learn/SKILL.md +8 -8
  9. package/dist/skills/health-check/SKILL.md +11 -11
  10. package/dist/skills/knowledge-harvest/SKILL.md +17 -17
  11. package/dist/skills/onboard-me/SKILL.md +10 -10
  12. package/dist/skills/parallel-execute/SKILL.md +46 -32
  13. package/dist/skills/retrospective/SKILL.md +9 -9
  14. package/dist/skills/second-opinion/SKILL.md +11 -8
  15. package/dist/skills/systematic-debugging/SKILL.md +8 -8
  16. package/dist/skills/test-driven-development/SKILL.md +11 -11
  17. package/dist/skills/vault-capture/SKILL.md +15 -15
  18. package/dist/skills/vault-navigator/SKILL.md +10 -10
  19. package/dist/skills/vault-smells/SKILL.md +24 -16
  20. package/dist/skills/verification-before-completion/SKILL.md +18 -18
  21. package/dist/skills/writing-plans/SKILL.md +9 -9
  22. package/dist/templates/shared-rules.js +96 -9
  23. package/dist/templates/shared-rules.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/scaffold-filetree.ts +1 -1
  26. package/src/skills/brain-debrief/SKILL.md +12 -12
  27. package/src/skills/brainstorming/SKILL.md +7 -7
  28. package/src/skills/code-patrol/SKILL.md +15 -15
  29. package/src/skills/context-resume/SKILL.md +8 -8
  30. package/src/skills/deep-review/SKILL.md +22 -11
  31. package/src/skills/executing-plans/SKILL.md +10 -9
  32. package/src/skills/fix-and-learn/SKILL.md +8 -8
  33. package/src/skills/health-check/SKILL.md +11 -11
  34. package/src/skills/knowledge-harvest/SKILL.md +17 -17
  35. package/src/skills/onboard-me/SKILL.md +10 -10
  36. package/src/skills/parallel-execute/SKILL.md +46 -32
  37. package/src/skills/retrospective/SKILL.md +9 -9
  38. package/src/skills/second-opinion/SKILL.md +11 -8
  39. package/src/skills/systematic-debugging/SKILL.md +8 -8
  40. package/src/skills/test-driven-development/SKILL.md +11 -11
  41. package/src/skills/vault-capture/SKILL.md +15 -15
  42. package/src/skills/vault-navigator/SKILL.md +10 -10
  43. package/src/skills/vault-smells/SKILL.md +24 -16
  44. package/src/skills/verification-before-completion/SKILL.md +18 -18
  45. package/src/skills/writing-plans/SKILL.md +9 -9
  46. package/src/templates/shared-rules.ts +97 -9
@@ -23,6 +23,7 @@ YOUR_AGENT_core op:curator_contradictions
23
23
  ```
24
24
 
25
25
  **What to look for:**
26
+
26
27
  - Two patterns that recommend opposite approaches for the same situation
27
28
  - An anti-pattern that contradicts an active pattern
28
29
  - Entries from different time periods with conflicting advice (the older one may be stale)
@@ -38,6 +39,7 @@ YOUR_AGENT_core op:vault_age_report
38
39
  ```
39
40
 
40
41
  **Indicators:**
42
+
41
43
  - Entries >60 days without access or update
42
44
  - Patterns referencing APIs, libraries, or versions that have changed
43
45
  - Entries tagged with technologies the project no longer uses
@@ -55,6 +57,7 @@ YOUR_AGENT_core op:curator_detect_duplicates
55
57
  ```
56
58
 
57
59
  **Indicators:**
60
+
58
61
  - Entries with zero inbound or outbound links
59
62
  - Entries never returned in search results (check search insights)
60
63
  - Entries with no tags or only generic tags
@@ -73,6 +76,7 @@ YOUR_AGENT_core op:curator_detect_duplicates
73
76
  ```
74
77
 
75
78
  **Indicators:**
79
+
76
80
  - High similarity scores between entries
77
81
  - Same tags and category but different titles
78
82
  - Entries captured in different sessions about the same topic
@@ -89,6 +93,7 @@ YOUR_AGENT_core op:curator_health_audit
89
93
  ```
90
94
 
91
95
  **Indicators:**
96
+
92
97
  - Description under 50 characters
93
98
  - No examples or context
94
99
  - Missing "why" — only states "what" without rationale
@@ -107,6 +112,7 @@ YOUR_AGENT_core op:vault_tags
107
112
  ```
108
113
 
109
114
  **Indicators:**
115
+
110
116
  - Near-duplicate categories (e.g., "error-handling" and "errors" and "exception-handling")
111
117
  - Categories with only 1-2 entries (too granular)
112
118
  - Tags used inconsistently (same concept, different tag names)
@@ -123,6 +129,7 @@ YOUR_AGENT_core op:brain_strengths
123
129
  ```
124
130
 
125
131
  **Indicators:**
132
+
126
133
  - Patterns with high initial strength that have decayed below 0.3
127
134
  - Patterns that were strong but haven't received positive feedback in >30 days
128
135
  - Patterns with mixed feedback (both positive and negative) — unresolved
@@ -131,13 +138,14 @@ YOUR_AGENT_core op:brain_strengths
131
138
 
132
139
  ### 8. Knowledge Gap Smells
133
140
 
134
- Areas where the vault *should* have knowledge but doesn't.
141
+ Areas where the vault _should_ have knowledge but doesn't.
135
142
 
136
143
  ```
137
144
  YOUR_AGENT_core op:admin_search_insights
138
145
  ```
139
146
 
140
147
  **Indicators:**
148
+
141
149
  - Repeated search queries that return no results
142
150
  - Domains the project uses but vault has no entries for
143
151
  - Anti-patterns captured without corresponding patterns (what to do instead?)
@@ -166,11 +174,11 @@ YOUR_AGENT_core op:admin_search_insights
166
174
 
167
175
  For each smell category, assess severity:
168
176
 
169
- | Severity | Meaning |
170
- |----------|---------|
171
- | 🟢 Clean | No issues in this category |
172
- | 🟡 Minor | 1-3 instances, low impact |
173
- | 🟠 Moderate | Multiple instances, degrading quality |
177
+ | Severity | Meaning |
178
+ | ----------- | ------------------------------------------ |
179
+ | 🟢 Clean | No issues in this category |
180
+ | 🟡 Minor | 1-3 instances, low impact |
181
+ | 🟠 Moderate | Multiple instances, degrading quality |
174
182
  | 🔴 Critical | Widespread, actively causing bad decisions |
175
183
 
176
184
  ### Step 3: Present the Report
@@ -237,15 +245,15 @@ After fixes: `op:brain_build_intelligence` to rebuild with clean data.
237
245
 
238
246
  ## Quick Reference
239
247
 
240
- | Smell | Detection Op | Fix Op |
241
- |-------|-------------|--------|
242
- | Contradictions | `curator_contradictions` | `curator_resolve_contradiction` |
243
- | Staleness | `vault_age_report` | Review + archive/update |
244
- | Orphans | `admin_vault_analytics` | Link or archive |
245
- | Duplicates | `curator_detect_duplicates` | `curator_groom` (merge) |
246
- | Shallow entries | `curator_health_audit` | Enrich or archive |
247
- | Category drift | `vault_domains` + `vault_tags` | `curator_groom_all` |
248
- | Confidence decay | `brain_strengths` | Reinforce or retire |
249
- | Knowledge gaps | `admin_search_insights` | `capture_knowledge` |
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` |
250
258
 
251
259
  **Related skills:** health-check (operational status), vault-curate (active cleanup), knowledge-harvest (fill gaps)
@@ -43,12 +43,12 @@ If any check reports problems, address before claiming completion.
43
43
 
44
44
  ## Common Failures
45
45
 
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 |
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 |
52
52
 
53
53
  ## Red Flags — STOP
54
54
 
@@ -57,12 +57,12 @@ If any check reports problems, address before claiming completion.
57
57
  - About to commit/push/PR without verification
58
58
  - Relying on partial verification
59
59
 
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 |
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 |
66
66
 
67
67
  ## After Verification
68
68
 
@@ -77,9 +77,9 @@ Capture session summary: `YOUR_AGENT_core op:session_capture params: { summary:
77
77
 
78
78
  ## Quick Reference
79
79
 
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 |
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 |
@@ -97,12 +97,12 @@ Offer execution choice: subagent-driven (this session) or parallel session with
97
97
 
98
98
  ## Quick Reference
99
99
 
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 |
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 |
@@ -119,8 +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.',
123
- '- Use `op:create_plan` before writing ANY code. Show the plan, wait for approval.',
122
+ '- For complex tasks, use `op:create_plan` before writing code. Simple tasks can execute directlybut always run `op:orchestrate_complete`.',
124
123
  '- Two-gate approval: Gate 1 (`op:approve_plan`), Gate 2 (`op:plan_split`). Never skip either.',
125
124
  '- Wait for explicit "yes" / "approve" before proceeding past each gate.',
126
125
  '- After execution: `op:plan_reconcile` (drift report) then `op:plan_complete_lifecycle` (knowledge capture, archive).',
@@ -128,6 +127,26 @@ const ENGINE_RULES_LINES: string[] = [
128
127
  '- On session start: check for plans in `executing`/`reconciling` state and remind.',
129
128
  '- Exceptions: read-only operations, user says "just do it", single-line fixes.',
130
129
  '',
130
+ '### Task Auto-Assessment',
131
+ '',
132
+ 'When picking up a work task (including GH issues decomposed from a parent plan), autonomously assess complexity — do NOT ask the user whether to create a plan.',
133
+ '',
134
+ '| Signal | Classification | Action |',
135
+ '|--------|---------------|--------|',
136
+ '| Single file, clear acceptance criteria | **Simple** | Execute directly |',
137
+ '| Approach already described in parent plan | **Simple** | Execute directly |',
138
+ '| Touches 3+ files or has cross-cutting concerns | **Complex** | Create scoped plan |',
139
+ '| Unresolved design decisions not in parent plan | **Complex** | Create scoped plan |',
140
+ '| New dependencies or architectural choices needed | **Complex** | Create scoped plan |',
141
+ '',
142
+ '**Simple task flow:** Vault search (quick) → execute → `op:orchestrate_complete` (captures knowledge).',
143
+ '',
144
+ '**Complex task flow:** Vault search → create lightweight scoped plan → two-gate approval → execute → reconcile → complete.',
145
+ '',
146
+ '**Key rule:** Knowledge gets captured either way via `op:orchestrate_complete`. Planning ceremony is for *decision-making*, not record-keeping.',
147
+ '',
148
+ '**Anti-pattern:** Creating a full graded plan for trivial tasks (add a CSS class, rename a variable, single-line fix).',
149
+ '',
131
150
  '### Grade Gate',
132
151
  '',
133
152
  '**MANDATORY**: Plans must grade **A or higher** before approval. The engine enforces this programmatically.',
@@ -256,12 +275,40 @@ const ENGINE_RULES_LINES: string[] = [
256
275
  '## Work Task Routing',
257
276
  '<!-- soleri:task-routing -->',
258
277
  '',
259
- 'Use the orchestration layer for ALL work tasks:',
260
- '- `op:orchestrate_plan` → vault + brain + structured plan.',
261
- '- `op:orchestrate_execute` → execution tracking.',
262
- '- `op:orchestrate_complete` → epilogue (vault, session).',
278
+ 'On every work task, assess complexity then route:',
279
+ '',
280
+ '### Auto-Assessment',
281
+ '',
282
+ 'Evaluate these signals before deciding the execution path:',
283
+ '',
284
+ '| Signal | Simple (< 40) | Complex (≥ 40) |',
285
+ '|--------|---------------|----------------|',
286
+ '| Files touched | 1-2 | 3+ |',
287
+ '| Cross-cutting concerns | No | Yes |',
288
+ '| New dependencies | None | Yes |',
289
+ '| Design decisions | Already decided | Unresolved |',
290
+ '| Approach described | In parent plan/issue | Not yet |',
291
+ '',
292
+ '### Routing',
293
+ '',
294
+ '- **Simple tasks** → execute directly → `op:orchestrate_complete` (always)',
295
+ '- **Complex tasks** → `op:orchestrate_plan` → approve → execute → `op:orchestrate_complete` (always)',
296
+ '',
297
+ '### The Non-Negotiable Rule',
298
+ '',
299
+ '`op:orchestrate_complete` runs for EVERY task — simple or complex. This captures:',
300
+ '- Knowledge to vault (patterns learned, decisions made)',
301
+ '- Session summary (what was done, files changed)',
302
+ '- Brain feedback (what worked, what didn\'t)',
263
303
  '',
264
- 'The orchestrator handles vault lookup, brain recommendations, and knowledge capture automatically.',
304
+ 'Without completion, the knowledge trail is lost. The code is in git, but the WHY disappears.',
305
+ '',
306
+ '### Exceptions (skip assessment, execute directly)',
307
+ '',
308
+ '- Read-only operations (search, status, health check)',
309
+ '- User explicitly says "just do it"',
310
+ '- Single-line fixes (typo, rename, one-liner)',
311
+ '- Questions and explanations',
265
312
  '',
266
313
 
267
314
  // ─── Intent Detection ────────────────────────────────────
@@ -342,15 +389,56 @@ const ENGINE_RULES_LINES: string[] = [
342
389
  '**Do NOT suggest tools when:** the user is having a conversation (not a task), already declined, or explicitly says "just tell me".',
343
390
  '',
344
391
 
392
+ // ─── Overlay Mode ─────────────────────────────────────────
393
+ '## Overlay Mode — Active Agent Protocol',
394
+ '<!-- soleri:overlay-mode -->',
395
+ '',
396
+ 'When you are activated as an agent (via greeting or activation command), you ARE this agent — not Claude with tools on the side. You drive the full cycle through your toolset.',
397
+ '',
398
+ '### Tool-First Routing (MANDATORY when active)',
399
+ '',
400
+ 'On every user request:',
401
+ '1. **Discover capabilities** — call `op:admin_tool_list` on first request of the session (or after context compaction resets your state)',
402
+ '2. **Parse intent** — what does the user want? Use semantic-first analysis.',
403
+ '3. **Route through agent tools** — always prefer your MCP tools over raw Claude reasoning:',
404
+ ' - **Knowledge questions** → vault search before answering from training data',
405
+ ' - **Recommendations** → brain recommend before proposing approaches',
406
+ ' - **Work tasks** → orchestrate plan before writing code',
407
+ ' - **Quality checks** → curator or admin health before manual inspection',
408
+ ' - **Learning moments** → capture to vault, don\'t just say "I\'ll remember"',
409
+ '4. **Fall back only when no tool fits** — file read/write/edit, git operations, shell commands, casual conversation',
410
+ '',
411
+ '### Self-Healing Discovery',
412
+ '',
413
+ '- After activation or context compaction, call `op:admin_tool_list` to refresh your capability inventory',
414
+ '- Do NOT rely on memorized tool lists from earlier in the conversation',
415
+ '- The tool list adapts when packs are installed — always discover dynamically',
416
+ '',
417
+ '### Character Persistence',
418
+ '',
419
+ '- All communication flows through your persona\'s voice — tone, vocabulary, opinions',
420
+ '- Stay in character until explicitly deactivated',
421
+ '- Context compaction does not change who you are — these rules persist in CLAUDE.md',
422
+ '- If you notice yourself dropping character, re-read your activation context',
423
+ '',
424
+ '### What NOT to Route Through Tools',
425
+ '',
426
+ '- Pure file read/write/edit operations (use Read, Edit, Write tools directly)',
427
+ '- Git operations (commit, push, branch, status)',
428
+ '- Shell commands the user explicitly requests',
429
+ '- Casual conversation, greetings, explanations',
430
+ '- One-line fixes where planning overhead exceeds the work',
431
+ '',
432
+
345
433
  // ─── Session Lifecycle ───────────────────────────────────
346
434
  '## Session Lifecycle',
347
435
  '<!-- soleri:session -->',
348
436
  '',
349
437
  '### Session Start Protocol',
350
438
  '',
351
- 'Do NOT call tools automatically on session start just greet the user in character.',
352
- 'Call `op:session_start` only when you need project context for a task (not on every message).',
439
+ 'On activation, discover capabilities via `op:admin_tool_list`. Call `op:register` when project context is needed for a task.',
353
440
  'Call `op:activate` only when checking evolved capabilities or recovering session state.',
441
+ 'After context compaction, re-discover capabilities — do not assume your tool inventory is still cached.',
354
442
  '',
355
443
  '### Context Compaction',
356
444
  '',