@soleri/forge 9.3.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.
@@ -109,8 +109,7 @@ const ENGINE_RULES_LINES = [
109
109
  '## Planning',
110
110
  '<!-- soleri:planning -->',
111
111
  '',
112
- '- **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.',
113
- '- Use `op:create_plan` before writing ANY code. Show the plan, wait for approval.',
112
+ '- For complex tasks, use `op:create_plan` before writing code. Simple tasks can execute directlybut always run `op:orchestrate_complete`.',
114
113
  '- Two-gate approval: Gate 1 (`op:approve_plan`), Gate 2 (`op:plan_split`). Never skip either.',
115
114
  '- Wait for explicit "yes" / "approve" before proceeding past each gate.',
116
115
  '- After execution: `op:plan_reconcile` (drift report) then `op:plan_complete_lifecycle` (knowledge capture, archive).',
@@ -118,6 +117,26 @@ const ENGINE_RULES_LINES = [
118
117
  '- On session start: check for plans in `executing`/`reconciling` state and remind.',
119
118
  '- Exceptions: read-only operations, user says "just do it", single-line fixes.',
120
119
  '',
120
+ '### Task Auto-Assessment',
121
+ '',
122
+ '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.',
123
+ '',
124
+ '| Signal | Classification | Action |',
125
+ '|--------|---------------|--------|',
126
+ '| Single file, clear acceptance criteria | **Simple** | Execute directly |',
127
+ '| Approach already described in parent plan | **Simple** | Execute directly |',
128
+ '| Touches 3+ files or has cross-cutting concerns | **Complex** | Create scoped plan |',
129
+ '| Unresolved design decisions not in parent plan | **Complex** | Create scoped plan |',
130
+ '| New dependencies or architectural choices needed | **Complex** | Create scoped plan |',
131
+ '',
132
+ '**Simple task flow:** Vault search (quick) → execute → `op:orchestrate_complete` (captures knowledge).',
133
+ '',
134
+ '**Complex task flow:** Vault search → create lightweight scoped plan → two-gate approval → execute → reconcile → complete.',
135
+ '',
136
+ '**Key rule:** Knowledge gets captured either way via `op:orchestrate_complete`. Planning ceremony is for *decision-making*, not record-keeping.',
137
+ '',
138
+ '**Anti-pattern:** Creating a full graded plan for trivial tasks (add a CSS class, rename a variable, single-line fix).',
139
+ '',
121
140
  '### Grade Gate',
122
141
  '',
123
142
  '**MANDATORY**: Plans must grade **A or higher** before approval. The engine enforces this programmatically.',
@@ -242,12 +261,40 @@ const ENGINE_RULES_LINES = [
242
261
  '## Work Task Routing',
243
262
  '<!-- soleri:task-routing -->',
244
263
  '',
245
- 'Use the orchestration layer for ALL work tasks:',
246
- '- `op:orchestrate_plan` → vault + brain + structured plan.',
247
- '- `op:orchestrate_execute` → execution tracking.',
248
- '- `op:orchestrate_complete` → epilogue (vault, session).',
264
+ 'On every work task, assess complexity then route:',
265
+ '',
266
+ '### Auto-Assessment',
267
+ '',
268
+ 'Evaluate these signals before deciding the execution path:',
269
+ '',
270
+ '| Signal | Simple (< 40) | Complex (≥ 40) |',
271
+ '|--------|---------------|----------------|',
272
+ '| Files touched | 1-2 | 3+ |',
273
+ '| Cross-cutting concerns | No | Yes |',
274
+ '| New dependencies | None | Yes |',
275
+ '| Design decisions | Already decided | Unresolved |',
276
+ '| Approach described | In parent plan/issue | Not yet |',
277
+ '',
278
+ '### Routing',
279
+ '',
280
+ '- **Simple tasks** → execute directly → `op:orchestrate_complete` (always)',
281
+ '- **Complex tasks** → `op:orchestrate_plan` → approve → execute → `op:orchestrate_complete` (always)',
282
+ '',
283
+ '### The Non-Negotiable Rule',
249
284
  '',
250
- 'The orchestrator handles vault lookup, brain recommendations, and knowledge capture automatically.',
285
+ '`op:orchestrate_complete` runs for EVERY task simple or complex. This captures:',
286
+ '- Knowledge to vault (patterns learned, decisions made)',
287
+ '- Session summary (what was done, files changed)',
288
+ '- Brain feedback (what worked, what didn\'t)',
289
+ '',
290
+ 'Without completion, the knowledge trail is lost. The code is in git, but the WHY disappears.',
291
+ '',
292
+ '### Exceptions (skip assessment, execute directly)',
293
+ '',
294
+ '- Read-only operations (search, status, health check)',
295
+ '- User explicitly says "just do it"',
296
+ '- Single-line fixes (typo, rename, one-liner)',
297
+ '- Questions and explanations',
251
298
  '',
252
299
  // ─── Intent Detection ────────────────────────────────────
253
300
  '## Intent Detection',
@@ -322,15 +369,55 @@ const ENGINE_RULES_LINES = [
322
369
  '',
323
370
  '**Do NOT suggest tools when:** the user is having a conversation (not a task), already declined, or explicitly says "just tell me".',
324
371
  '',
372
+ // ─── Overlay Mode ─────────────────────────────────────────
373
+ '## Overlay Mode — Active Agent Protocol',
374
+ '<!-- soleri:overlay-mode -->',
375
+ '',
376
+ '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.',
377
+ '',
378
+ '### Tool-First Routing (MANDATORY when active)',
379
+ '',
380
+ 'On every user request:',
381
+ '1. **Discover capabilities** — call `op:admin_tool_list` on first request of the session (or after context compaction resets your state)',
382
+ '2. **Parse intent** — what does the user want? Use semantic-first analysis.',
383
+ '3. **Route through agent tools** — always prefer your MCP tools over raw Claude reasoning:',
384
+ ' - **Knowledge questions** → vault search before answering from training data',
385
+ ' - **Recommendations** → brain recommend before proposing approaches',
386
+ ' - **Work tasks** → orchestrate plan before writing code',
387
+ ' - **Quality checks** → curator or admin health before manual inspection',
388
+ ' - **Learning moments** → capture to vault, don\'t just say "I\'ll remember"',
389
+ '4. **Fall back only when no tool fits** — file read/write/edit, git operations, shell commands, casual conversation',
390
+ '',
391
+ '### Self-Healing Discovery',
392
+ '',
393
+ '- After activation or context compaction, call `op:admin_tool_list` to refresh your capability inventory',
394
+ '- Do NOT rely on memorized tool lists from earlier in the conversation',
395
+ '- The tool list adapts when packs are installed — always discover dynamically',
396
+ '',
397
+ '### Character Persistence',
398
+ '',
399
+ '- All communication flows through your persona\'s voice — tone, vocabulary, opinions',
400
+ '- Stay in character until explicitly deactivated',
401
+ '- Context compaction does not change who you are — these rules persist in CLAUDE.md',
402
+ '- If you notice yourself dropping character, re-read your activation context',
403
+ '',
404
+ '### What NOT to Route Through Tools',
405
+ '',
406
+ '- Pure file read/write/edit operations (use Read, Edit, Write tools directly)',
407
+ '- Git operations (commit, push, branch, status)',
408
+ '- Shell commands the user explicitly requests',
409
+ '- Casual conversation, greetings, explanations',
410
+ '- One-line fixes where planning overhead exceeds the work',
411
+ '',
325
412
  // ─── Session Lifecycle ───────────────────────────────────
326
413
  '## Session Lifecycle',
327
414
  '<!-- soleri:session -->',
328
415
  '',
329
416
  '### Session Start Protocol',
330
417
  '',
331
- 'Do NOT call tools automatically on session start just greet the user in character.',
332
- 'Call `op:session_start` only when you need project context for a task (not on every message).',
418
+ 'On activation, discover capabilities via `op:admin_tool_list`. Call `op:register` when project context is needed for a task.',
333
419
  'Call `op:activate` only when checking evolved capabilities or recovering session state.',
420
+ 'After context compaction, re-discover capabilities — do not assume your tool inventory is still cached.',
334
421
  '',
335
422
  '### Context Compaction',
336
423
  '',
@@ -1 +1 @@
1
- {"version":3,"file":"shared-rules.js","sourceRoot":"","sources":["../../src/templates/shared-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAE5C,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,qBAAqB;IACnC,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,kBAAkB,GAAa;IACnC,QAAQ,aAAa,MAAM;IAC3B,EAAE;IACF,uBAAuB;IACvB,EAAE;IACF,qGAAqG;IACrG,EAAE;IAEF,2DAA2D;IAC3D,mBAAmB;IACnB,gCAAgC;IAChC,EAAE;IACF,2MAA2M;IAC3M,EAAE;IACF,kIAAkI;IAClI,qHAAqH;IACrH,iFAAiF;IACjF,iGAAiG;IACjG,8GAA8G;IAC9G,EAAE;IACF,uBAAuB;IACvB,EAAE;IACF,2EAA2E;IAC3E,EAAE;IACF,4EAA4E;IAC5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,EAAE;IACF,kCAAkC;IAClC,EAAE;IACF,2BAA2B;IAC3B,2BAA2B;IAC3B,4FAA4F;IAC5F,6FAA6F;IAC7F,oFAAoF;IACpF,wCAAwC;IACxC,wEAAwE;IACxE,EAAE;IAEF,8DAA8D;IAC9D,0BAA0B;IAC1B,uCAAuC;IACvC,EAAE;IACF,mEAAmE;IACnE,EAAE;IACF,cAAc;IACd,EAAE;IACF,mDAAmD;IACnD,wEAAwE;IACxE,0DAA0D;IAC1D,EAAE;IACF,kBAAkB;IAClB,EAAE;IACF,uEAAuE;IACvE,uDAAuD;IACvD,yDAAyD;IACzD,EAAE;IACF,WAAW;IACX,EAAE;IACF,mDAAmD;IACnD,iEAAiE;IACjE,0DAA0D;IAC1D,EAAE;IAEF,SAAS,aAAa,MAAM;CAC7B,CAAC"}
1
+ {"version":3,"file":"shared-rules.js","sourceRoot":"","sources":["../../src/templates/shared-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAE5C,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,qBAAqB;IACnC,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,kBAAkB,GAAa;IACnC,QAAQ,aAAa,MAAM;IAC3B,EAAE;IACF,uBAAuB;IACvB,EAAE;IACF,qGAAqG;IACrG,EAAE;IAEF,2DAA2D;IAC3D,mBAAmB;IACnB,gCAAgC;IAChC,EAAE;IACF,2MAA2M;IAC3M,EAAE;IACF,kIAAkI;IAClI,qHAAqH;IACrH,iFAAiF;IACjF,iGAAiG;IACjG,8GAA8G;IAC9G,EAAE;IACF,uBAAuB;IACvB,EAAE;IACF,2EAA2E;IAC3E,EAAE;IACF,4EAA4E;IAC5E,2DAA2D;IAC3D,qDAAqD;IACrD,gFAAgF;IAChF,gEAAgE;IAChE,EAAE;IAC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F;IACpF,wCAAwC;IACxC,wEAAwE;IACxE,EAAE;IAEF,8DAA8D;IAC9D,0BAA0B;IAC1B,uCAAuC;IACvC,EAAE;IACF,mEAAmE;IACnE,EAAE;IACF,cAAc;IACd,EAAE;IACF,mDAAmD;IACnD,wEAAwE;IACxE,0DAA0D;IAC1D,EAAE;IACF,kBAAkB;IAClB,EAAE;IACF,uEAAuE;IACvE,uDAAuD;IACvD,yDAAyD;IACzD,EAAE;IACF,WAAW;IACX,EAAE;IACF,mDAAmD;IACnD,iEAAiE;IACjE,0DAA0D;IAC1D,EAAE;IAEF,SAAS,aAAa,MAAM;CAC7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleri/forge",
3
- "version": "9.3.0",
3
+ "version": "9.3.1",
4
4
  "description": "Scaffold AI agents that learn, remember, and grow with you.",
5
5
  "keywords": [
6
6
  "agent",
@@ -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
  '',