Skip to content

Pipeline Plan 212

Seth Ford edited this page Mar 7, 2026 · 1 revision

Implementation plan written to docs/plans/2026-03-07-adaptive-stage-timeout-engine-design.md.

Summary

Architecture: New shared library scripts/lib/stage-timeout.sh (follows existing lib/*.sh pattern) sourced by sw-pipeline.sh for enforcement and sw-adaptive.sh for CLI dashboard.

Key design decisions:

  • Library approach over inline or standalone script — minimal blast radius, testable in isolation
  • Cached JSON (stage-timeouts.json) with 7-day staleness check — avoids DB query on every stage
  • Priority chain: manual override > adaptive P95×1.2 > per-stage defaults
  • Process group kill for timeout enforcement — handles claude sessions with child processes
  • Feature flag via stage_timeouts.enabled in daemon-config — safe rollback

11 tasks covering: core library (tasks 1-6), pipeline integration (task 7), CLI dashboard (task 8), template updates (task 9), tests (task 10), docs (task 11).

Files changed: 2 new (lib/stage-timeout.sh, sw-stage-timeout-test.sh), 5 modified (sw-pipeline.sh, sw-adaptive.sh, sw-adaptive-test.sh, autonomous.json, CLAUDE.md).

Clone this wiki locally