Skip to content

Pipeline Plan 56

Seth Ford edited this page Feb 14, 2026 · 2 revisions

The plan has been written to .claude/pipeline-artifacts/plan.md. Here's the summary:

Implementation Plan: Multi-Model Orchestration (Issue #56)

10 files to modify, 10 implementation tasks, across 4 core scripts + 4 templates + 2 test files.

Key Changes

  1. sw-intelligence.sh — Two new functions:

    • intelligence_stage_defaults(stage, complexity) — maps stage × complexity band → model (haiku/sonnet/opus)
    • escalate_model(current) — chain: haiku→sonnet→opus
  2. sw-pipeline.sh — Two modifications:

    • run_stage_with_retry() (~L6755): escalate model on each retry attempt
    • run_pipeline() (~L7267): invert A/B gate — intelligent routing becomes default (80%), opus becomes control group (20%)
  3. sw-loop.sh (~L2150) — When CONSECUTIVE_FAILURES >= 2, escalate model (e.g., sonnet→opus)

  4. sw-cost.sh — New cost_pipeline_summary() reads model-routing.log + costs.json for per-stage cost breakdown

  5. 4 pipeline templates (standard, full, autonomous, deployed) — Add per-stage config.model defaults (intake→haiku, plan→opus, build→sonnet, etc.)

  6. Tests — Unit tests in sw-intelligence-test.sh + smoke tests in sw-e2e-smoke-test.sh

Execution Order

Tasks 1-2 (intelligence functions) → Tasks 3-5 (pipeline/loop integration) → Task 6 (cost summary) → Task 7 (templates) → Tasks 8-9 (tests) → Task 10 (full suite validation)

Clone this wiki locally