Strategic Improvement
Build a CLI command shipwright investigate [pipeline-id] that launches an interactive Claude Code session pre-loaded with failure context (error logs, stage state, file changes, memory patterns) and offers guided debugging — suggest root cause hypotheses, propose fixes, allow user to replay stages or test fixes interactively. Complements #596 (replay) with human-in-the-loop exploration.
Acceptance Criteria
- Command
shipwright investigate <pipeline-id> launches Claude Code session with failure context injected
- Context includes: error-log.jsonl, pipeline-state.md, file diffs from failed stage, similar past failures from memory
- Interactive prompt offers: root cause hypotheses (top 3), proposed fix commands, ability to replay stage with modifications
- User can apply suggested fixes and re-run validation without full pipeline restart
- Session transcript saved to .claude/investigations// for future reference
- Test suite validates context assembly, prompt construction, and session launch
Context
- Priority: P1
- Complexity: fast
- Generated by: Strategic Intelligence Agent
- Strategy alignment: P1: Developer Experience
Strategic Improvement
Build a CLI command
shipwright investigate [pipeline-id]that launches an interactive Claude Code session pre-loaded with failure context (error logs, stage state, file changes, memory patterns) and offers guided debugging — suggest root cause hypotheses, propose fixes, allow user to replay stages or test fixes interactively. Complements #596 (replay) with human-in-the-loop exploration.Acceptance Criteria
shipwright investigate <pipeline-id>launches Claude Code session with failure context injectedContext