Strategic Improvement
Current cost tracking is aggregate only. Add per-pipeline cost attribution with stage-level breakdown, model usage distribution, and budget forecasting. Enable users to see "this pipeline cost $8.40" with drill-down into which stages and models consumed the budget. This makes cost optimization actionable and helps hit the <$5 per pipeline target. Complements #580's cost optimizer by providing the data foundation.
Acceptance Criteria
- Per-pipeline cost logged to
.claude/pipeline-artifacts/cost.json after each run
- Cost breakdown by stage (intake: $0.12, build: $6.20, review: $1.80, etc.)
- Model usage distribution (haiku: 45%, sonnet: 40%, opus: 15%)
shipwright cost show --pipeline <issue> displays cost breakdown
- Dashboard shows cost trends: per-pipeline average over time, by template
- Budget forecasting: "at current rate, $X remaining budget covers Y more pipelines"
- Intelligence layer input: cost per stage informs adaptive timeouts and model routing
Context
- Priority: P3
- Complexity: standard
- Generated by: Strategic Intelligence Agent
- Strategy alignment: P3: Cost Efficiency
Strategic Improvement
Current cost tracking is aggregate only. Add per-pipeline cost attribution with stage-level breakdown, model usage distribution, and budget forecasting. Enable users to see "this pipeline cost $8.40" with drill-down into which stages and models consumed the budget. This makes cost optimization actionable and helps hit the <$5 per pipeline target. Complements #580's cost optimizer by providing the data foundation.
Acceptance Criteria
.claude/pipeline-artifacts/cost.jsonafter each runshipwright cost show --pipeline <issue>displays cost breakdownContext