@soleri/forge 9.4.0 → 9.5.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.
@@ -426,6 +426,24 @@ const ENGINE_RULES_LINES: string[] = [
426
426
  '- Duplicate feedback for the same entry in the same task',
427
427
  '',
428
428
 
429
+ // ─── Model Routing Guidance ─────────────────────────────
430
+ '## Model Routing Guidance',
431
+ '<!-- soleri:model-routing -->',
432
+ '',
433
+ 'Different workflow stages benefit from different model strengths. Use this as a default when multiple models are available.',
434
+ '',
435
+ '| Stage | Recommended Model | Why |',
436
+ '|-------|------------------|-----|',
437
+ '| Research / Exploration | Opus | Cross-file reasoning, broad context synthesis |',
438
+ '| Planning / Architecture | Opus | Complex tradeoff analysis, alternative evaluation |',
439
+ '| Implementation | Sonnet | Speed, cost-efficiency for focused coding |',
440
+ '| Code Review / Verification | Opus | Deep analysis, false-positive filtering |',
441
+ '| Validation Gates | Haiku | Fast, cheap pass/fail checks |',
442
+ '| Knowledge Capture | Sonnet | Structured extraction, good enough quality |',
443
+ '',
444
+ 'This is guidance, not enforcement. Use the best model available. When only one model is available, use it for all stages.',
445
+ '',
446
+
429
447
  // ─── Cross-Project Memory ────────────────────────────────
430
448
  '## Cross-Project Memory',
431
449
  '<!-- soleri:cross-project -->',
@@ -536,6 +554,21 @@ const ENGINE_RULES_LINES: string[] = [
536
554
  'A PreCompact hook calls `op:session_capture` before context compaction.',
537
555
  'Manual capture: `op:session_capture params:{ summary: "..." }`',
538
556
  '',
557
+ '### Handoff Protocol',
558
+ '',
559
+ 'Before crossing a context window boundary (`/clear`, context compaction, or switching tasks), generate a handoff document:',
560
+ '',
561
+ '1. **Before transition**: `op:handoff_generate` — produces a structured markdown document with active plan state, recent decisions, and pending tasks.',
562
+ '2. **After restart**: Reference the handoff document to restore context. It contains plan IDs, task status, decisions, and next actions.',
563
+ '',
564
+ 'Handoff documents are **ephemeral** — they are returned as markdown, not persisted to vault or memory. They are a snapshot for context transfer only.',
565
+ '',
566
+ '| Trigger | Action |',
567
+ '|---------|--------|',
568
+ '| `/clear` or manual reset | `op:handoff_generate` before clearing |',
569
+ '| Context compaction warning | `op:handoff_generate` (alongside `op:session_capture`) |',
570
+ '| Switching to a different task mid-plan | `op:handoff_generate` to bookmark state |',
571
+ '',
539
572
 
540
573
  // ─── Soleri CLI ─────────────────────────────────────────
541
574
  '## Soleri CLI',