shipwright-cli 3.2.0 → 3.3.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.
- package/.claude/agents/code-reviewer.md +2 -0
- package/.claude/agents/devops-engineer.md +2 -0
- package/.claude/agents/doc-fleet-agent.md +2 -0
- package/.claude/agents/pipeline-agent.md +2 -0
- package/.claude/agents/shell-script-specialist.md +2 -0
- package/.claude/agents/test-specialist.md +2 -0
- package/.claude/hooks/agent-crash-capture.sh +32 -0
- package/.claude/hooks/post-tool-use.sh +3 -2
- package/.claude/hooks/pre-tool-use.sh +35 -3
- package/README.md +4 -4
- package/claude-code/hooks/config-change.sh +18 -0
- package/claude-code/hooks/instructions-reloaded.sh +7 -0
- package/claude-code/hooks/worktree-create.sh +25 -0
- package/claude-code/hooks/worktree-remove.sh +20 -0
- package/config/code-constitution.json +130 -0
- package/dashboard/middleware/auth.ts +134 -0
- package/dashboard/middleware/constants.ts +21 -0
- package/dashboard/public/index.html +2 -6
- package/dashboard/public/styles.css +100 -97
- package/dashboard/routes/auth.ts +38 -0
- package/dashboard/server.ts +66 -25
- package/dashboard/services/config.ts +26 -0
- package/dashboard/services/db.ts +118 -0
- package/dashboard/src/canvas/pixel-agent.ts +298 -0
- package/dashboard/src/canvas/pixel-sprites.ts +440 -0
- package/dashboard/src/canvas/shipyard-effects.ts +367 -0
- package/dashboard/src/canvas/shipyard-scene.ts +616 -0
- package/dashboard/src/canvas/submarine-layout.ts +267 -0
- package/dashboard/src/components/header.ts +8 -7
- package/dashboard/src/core/router.ts +1 -0
- package/dashboard/src/design/submarine-theme.ts +253 -0
- package/dashboard/src/main.ts +2 -0
- package/dashboard/src/types/api.ts +2 -1
- package/dashboard/src/views/activity.ts +2 -1
- package/dashboard/src/views/shipyard.ts +39 -0
- package/dashboard/types/index.ts +166 -0
- package/docs/plans/2026-02-28-compound-audit-and-shipyard-design.md +186 -0
- package/docs/plans/2026-02-28-skipper-shipwright-implementation-plan.md +1182 -0
- package/docs/plans/2026-02-28-skipper-shipwright-integration-design.md +531 -0
- package/docs/plans/2026-03-01-ai-powered-skill-injection-design.md +298 -0
- package/docs/plans/2026-03-01-ai-powered-skill-injection-plan.md +1109 -0
- package/docs/plans/2026-03-01-capabilities-cleanup-plan.md +658 -0
- package/docs/plans/2026-03-01-clean-architecture-plan.md +924 -0
- package/docs/plans/2026-03-01-compound-audit-cascade-design.md +191 -0
- package/docs/plans/2026-03-01-compound-audit-cascade-plan.md +921 -0
- package/docs/plans/2026-03-01-deep-integration-plan.md +851 -0
- package/docs/plans/2026-03-01-pipeline-audit-trail-design.md +145 -0
- package/docs/plans/2026-03-01-pipeline-audit-trail-plan.md +770 -0
- package/docs/plans/2026-03-01-refined-depths-brand-design.md +382 -0
- package/docs/plans/2026-03-01-refined-depths-implementation.md +599 -0
- package/docs/plans/2026-03-01-skipper-kernel-integration-design.md +203 -0
- package/docs/plans/2026-03-01-unified-platform-design.md +272 -0
- package/docs/plans/2026-03-07-claude-code-feature-integration-design.md +189 -0
- package/docs/plans/2026-03-07-claude-code-feature-integration-plan.md +1165 -0
- package/docs/research/BACKLOG_QUICK_REFERENCE.md +352 -0
- package/docs/research/CUTTING_EDGE_RESEARCH_2026.md +546 -0
- package/docs/research/RESEARCH_INDEX.md +439 -0
- package/docs/research/RESEARCH_SOURCES.md +440 -0
- package/docs/research/RESEARCH_SUMMARY.txt +275 -0
- package/docs/superpowers/specs/2026-03-10-pipeline-quality-revolution-design.md +341 -0
- package/package.json +2 -2
- package/scripts/lib/adaptive-model.sh +427 -0
- package/scripts/lib/adaptive-timeout.sh +316 -0
- package/scripts/lib/audit-trail.sh +309 -0
- package/scripts/lib/auto-recovery.sh +471 -0
- package/scripts/lib/bandit-selector.sh +431 -0
- package/scripts/lib/bootstrap.sh +104 -2
- package/scripts/lib/causal-graph.sh +455 -0
- package/scripts/lib/compat.sh +126 -0
- package/scripts/lib/compound-audit.sh +337 -0
- package/scripts/lib/constitutional.sh +454 -0
- package/scripts/lib/context-budget.sh +359 -0
- package/scripts/lib/convergence.sh +594 -0
- package/scripts/lib/cost-optimizer.sh +634 -0
- package/scripts/lib/daemon-adaptive.sh +10 -0
- package/scripts/lib/daemon-dispatch.sh +106 -17
- package/scripts/lib/daemon-failure.sh +34 -4
- package/scripts/lib/daemon-patrol.sh +23 -2
- package/scripts/lib/daemon-poll-github.sh +361 -0
- package/scripts/lib/daemon-poll-health.sh +299 -0
- package/scripts/lib/daemon-poll.sh +27 -611
- package/scripts/lib/daemon-state.sh +112 -66
- package/scripts/lib/daemon-triage.sh +10 -0
- package/scripts/lib/dod-scorecard.sh +442 -0
- package/scripts/lib/error-actionability.sh +300 -0
- package/scripts/lib/formal-spec.sh +461 -0
- package/scripts/lib/helpers.sh +177 -4
- package/scripts/lib/intent-analysis.sh +409 -0
- package/scripts/lib/loop-convergence.sh +350 -0
- package/scripts/lib/loop-iteration.sh +682 -0
- package/scripts/lib/loop-progress.sh +48 -0
- package/scripts/lib/loop-restart.sh +185 -0
- package/scripts/lib/memory-effectiveness.sh +506 -0
- package/scripts/lib/mutation-executor.sh +352 -0
- package/scripts/lib/outcome-feedback.sh +521 -0
- package/scripts/lib/pipeline-cli.sh +336 -0
- package/scripts/lib/pipeline-commands.sh +1216 -0
- package/scripts/lib/pipeline-detection.sh +100 -2
- package/scripts/lib/pipeline-execution.sh +897 -0
- package/scripts/lib/pipeline-github.sh +28 -3
- package/scripts/lib/pipeline-intelligence-compound.sh +431 -0
- package/scripts/lib/pipeline-intelligence-scoring.sh +407 -0
- package/scripts/lib/pipeline-intelligence-skip.sh +181 -0
- package/scripts/lib/pipeline-intelligence.sh +100 -1136
- package/scripts/lib/pipeline-quality-bash-compat.sh +182 -0
- package/scripts/lib/pipeline-quality-checks.sh +17 -715
- package/scripts/lib/pipeline-quality-gates.sh +563 -0
- package/scripts/lib/pipeline-stages-build.sh +730 -0
- package/scripts/lib/pipeline-stages-delivery.sh +965 -0
- package/scripts/lib/pipeline-stages-intake.sh +1133 -0
- package/scripts/lib/pipeline-stages-monitor.sh +407 -0
- package/scripts/lib/pipeline-stages-review.sh +1022 -0
- package/scripts/lib/pipeline-stages.sh +59 -2929
- package/scripts/lib/pipeline-state.sh +36 -5
- package/scripts/lib/pipeline-util.sh +487 -0
- package/scripts/lib/policy-learner.sh +438 -0
- package/scripts/lib/process-reward.sh +493 -0
- package/scripts/lib/project-detect.sh +649 -0
- package/scripts/lib/quality-profile.sh +334 -0
- package/scripts/lib/recruit-commands.sh +885 -0
- package/scripts/lib/recruit-learning.sh +739 -0
- package/scripts/lib/recruit-roles.sh +648 -0
- package/scripts/lib/reward-aggregator.sh +458 -0
- package/scripts/lib/rl-optimizer.sh +362 -0
- package/scripts/lib/root-cause.sh +427 -0
- package/scripts/lib/scope-enforcement.sh +445 -0
- package/scripts/lib/session-restart.sh +493 -0
- package/scripts/lib/skill-memory.sh +300 -0
- package/scripts/lib/skill-registry.sh +775 -0
- package/scripts/lib/spec-driven.sh +476 -0
- package/scripts/lib/test-helpers.sh +18 -7
- package/scripts/lib/test-holdout.sh +429 -0
- package/scripts/lib/test-optimizer.sh +511 -0
- package/scripts/shipwright-file-suggest.sh +45 -0
- package/scripts/skills/adversarial-quality.md +61 -0
- package/scripts/skills/api-design.md +44 -0
- package/scripts/skills/architecture-design.md +50 -0
- package/scripts/skills/brainstorming.md +43 -0
- package/scripts/skills/data-pipeline.md +44 -0
- package/scripts/skills/deploy-safety.md +64 -0
- package/scripts/skills/documentation.md +38 -0
- package/scripts/skills/frontend-design.md +45 -0
- package/scripts/skills/generated/.gitkeep +0 -0
- package/scripts/skills/generated/_refinements/.gitkeep +0 -0
- package/scripts/skills/generated/_refinements/adversarial-quality.patch.md +3 -0
- package/scripts/skills/generated/_refinements/architecture-design.patch.md +3 -0
- package/scripts/skills/generated/_refinements/brainstorming.patch.md +3 -0
- package/scripts/skills/generated/cli-version-management.md +29 -0
- package/scripts/skills/generated/collection-system-validation.md +99 -0
- package/scripts/skills/generated/large-scale-c-refactoring-coordination.md +97 -0
- package/scripts/skills/generated/pattern-matching-similarity-scoring.md +195 -0
- package/scripts/skills/generated/test-parallelization-detection.md +65 -0
- package/scripts/skills/observability.md +79 -0
- package/scripts/skills/performance.md +48 -0
- package/scripts/skills/pr-quality.md +49 -0
- package/scripts/skills/product-thinking.md +43 -0
- package/scripts/skills/security-audit.md +49 -0
- package/scripts/skills/systematic-debugging.md +40 -0
- package/scripts/skills/testing-strategy.md +47 -0
- package/scripts/skills/two-stage-review.md +52 -0
- package/scripts/skills/validation-thoroughness.md +55 -0
- package/scripts/sw +9 -3
- package/scripts/sw-activity.sh +9 -2
- package/scripts/sw-adaptive.sh +2 -1
- package/scripts/sw-adversarial.sh +2 -1
- package/scripts/sw-architecture-enforcer.sh +3 -1
- package/scripts/sw-auth.sh +12 -2
- package/scripts/sw-autonomous.sh +5 -1
- package/scripts/sw-changelog.sh +4 -1
- package/scripts/sw-checkpoint.sh +2 -1
- package/scripts/sw-ci.sh +5 -1
- package/scripts/sw-cleanup.sh +4 -26
- package/scripts/sw-code-review.sh +10 -4
- package/scripts/sw-connect.sh +2 -1
- package/scripts/sw-context.sh +2 -1
- package/scripts/sw-cost.sh +48 -3
- package/scripts/sw-daemon.sh +66 -9
- package/scripts/sw-dashboard.sh +3 -1
- package/scripts/sw-db.sh +59 -16
- package/scripts/sw-decide.sh +8 -2
- package/scripts/sw-decompose.sh +360 -17
- package/scripts/sw-deps.sh +4 -1
- package/scripts/sw-developer-simulation.sh +4 -1
- package/scripts/sw-discovery.sh +325 -2
- package/scripts/sw-doc-fleet.sh +4 -1
- package/scripts/sw-docs-agent.sh +3 -1
- package/scripts/sw-docs.sh +2 -1
- package/scripts/sw-doctor.sh +453 -2
- package/scripts/sw-dora.sh +4 -1
- package/scripts/sw-durable.sh +4 -3
- package/scripts/sw-e2e-orchestrator.sh +17 -16
- package/scripts/sw-eventbus.sh +7 -1
- package/scripts/sw-evidence.sh +364 -12
- package/scripts/sw-feedback.sh +550 -9
- package/scripts/sw-fix.sh +20 -1
- package/scripts/sw-fleet-discover.sh +6 -2
- package/scripts/sw-fleet-viz.sh +4 -1
- package/scripts/sw-fleet.sh +5 -1
- package/scripts/sw-github-app.sh +16 -3
- package/scripts/sw-github-checks.sh +3 -2
- package/scripts/sw-github-deploy.sh +3 -2
- package/scripts/sw-github-graphql.sh +18 -7
- package/scripts/sw-guild.sh +5 -1
- package/scripts/sw-heartbeat.sh +5 -30
- package/scripts/sw-hello.sh +67 -0
- package/scripts/sw-hygiene.sh +6 -1
- package/scripts/sw-incident.sh +265 -1
- package/scripts/sw-init.sh +18 -2
- package/scripts/sw-instrument.sh +10 -2
- package/scripts/sw-intelligence.sh +42 -6
- package/scripts/sw-jira.sh +5 -1
- package/scripts/sw-launchd.sh +2 -1
- package/scripts/sw-linear.sh +4 -1
- package/scripts/sw-logs.sh +4 -1
- package/scripts/sw-loop.sh +432 -1128
- package/scripts/sw-memory.sh +356 -2
- package/scripts/sw-mission-control.sh +6 -1
- package/scripts/sw-model-router.sh +481 -26
- package/scripts/sw-otel.sh +13 -4
- package/scripts/sw-oversight.sh +14 -5
- package/scripts/sw-patrol-meta.sh +334 -0
- package/scripts/sw-pipeline-composer.sh +5 -1
- package/scripts/sw-pipeline-vitals.sh +2 -1
- package/scripts/sw-pipeline.sh +53 -2664
- package/scripts/sw-pm.sh +12 -5
- package/scripts/sw-pr-lifecycle.sh +2 -1
- package/scripts/sw-predictive.sh +7 -1
- package/scripts/sw-prep.sh +185 -2
- package/scripts/sw-ps.sh +5 -25
- package/scripts/sw-public-dashboard.sh +15 -3
- package/scripts/sw-quality.sh +2 -1
- package/scripts/sw-reaper.sh +8 -25
- package/scripts/sw-recruit.sh +156 -2303
- package/scripts/sw-regression.sh +19 -12
- package/scripts/sw-release-manager.sh +3 -1
- package/scripts/sw-release.sh +4 -1
- package/scripts/sw-remote.sh +3 -1
- package/scripts/sw-replay.sh +7 -1
- package/scripts/sw-retro.sh +158 -1
- package/scripts/sw-review-rerun.sh +3 -1
- package/scripts/sw-scale.sh +10 -3
- package/scripts/sw-security-audit.sh +6 -1
- package/scripts/sw-self-optimize.sh +6 -3
- package/scripts/sw-session.sh +9 -3
- package/scripts/sw-setup.sh +3 -1
- package/scripts/sw-stall-detector.sh +406 -0
- package/scripts/sw-standup.sh +15 -7
- package/scripts/sw-status.sh +3 -1
- package/scripts/sw-strategic.sh +4 -1
- package/scripts/sw-stream.sh +7 -1
- package/scripts/sw-swarm.sh +18 -6
- package/scripts/sw-team-stages.sh +13 -6
- package/scripts/sw-templates.sh +5 -29
- package/scripts/sw-testgen.sh +7 -1
- package/scripts/sw-tmux-pipeline.sh +4 -1
- package/scripts/sw-tmux-role-color.sh +2 -0
- package/scripts/sw-tmux-status.sh +1 -1
- package/scripts/sw-tmux.sh +3 -1
- package/scripts/sw-trace.sh +3 -1
- package/scripts/sw-tracker-github.sh +3 -0
- package/scripts/sw-tracker-jira.sh +3 -0
- package/scripts/sw-tracker-linear.sh +3 -0
- package/scripts/sw-tracker.sh +3 -1
- package/scripts/sw-triage.sh +2 -1
- package/scripts/sw-upgrade.sh +3 -1
- package/scripts/sw-ux.sh +5 -2
- package/scripts/sw-webhook.sh +3 -1
- package/scripts/sw-widgets.sh +3 -1
- package/scripts/sw-worktree.sh +15 -3
- package/scripts/test-skill-injection.sh +1233 -0
- package/templates/pipelines/autonomous.json +27 -3
- package/templates/pipelines/cost-aware.json +34 -8
- package/templates/pipelines/deployed.json +12 -0
- package/templates/pipelines/enterprise.json +12 -0
- package/templates/pipelines/fast.json +6 -0
- package/templates/pipelines/full.json +27 -3
- package/templates/pipelines/hotfix.json +6 -0
- package/templates/pipelines/standard.json +12 -0
- package/templates/pipelines/tdd.json +12 -0
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
# Stream 3: Capabilities + Cleanup Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Read plan format notes at the bottom before starting.
|
|
4
|
+
|
|
5
|
+
**Goal:** Decompose 2 bash god-files (6,591 lines total), adopt shared test harness, add Claude Code MCP server + 4 skills + 1 enhanced hook.
|
|
6
|
+
|
|
7
|
+
**Architecture:**
|
|
8
|
+
|
|
9
|
+
- **Bash Decomposition:** Modular source pattern (source sub-files from main, export all functions). No behavior change, pure structural reorganization.
|
|
10
|
+
- **Test Harness:** Central `test-helpers.sh` exists (100+ lines). Standardize all 128 test scripts to source it instead of defining helpers locally.
|
|
11
|
+
- **MCP Server:** Lightweight HTTP wrapper around Skipper API at `http://127.0.0.1:4200/mcp`. Register in `.claude/settings.json` as MCP server.
|
|
12
|
+
- **Skills:** Four new markdown files in `.claude/skills/` implementing /pipeline-monitor, /fleet-overview, /agent-debug, /cost-report (inline Claude Code calls).
|
|
13
|
+
- **Hooks:** New hook fires on Skipper agent crash, captures diagnostics to memory system.
|
|
14
|
+
|
|
15
|
+
**Tech Stack:** Bash 3.2, Claude Code skills/hooks, MCP protocol, Shipper API
|
|
16
|
+
|
|
17
|
+
**Estimated Scope:** 22 tasks, ~3-4 days parallel execution with small team (2-3 agents)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Phase 1: Bash Cleanup Foundation (6 tasks)
|
|
22
|
+
|
|
23
|
+
### Task 1.1: Decompose pipeline-stages.sh — Part A (intake, plan, design)
|
|
24
|
+
|
|
25
|
+
**Objective:** Extract `stage_intake()`, `stage_plan()`, `stage_design()` (first 950 lines) into new file.
|
|
26
|
+
|
|
27
|
+
**Files:**
|
|
28
|
+
|
|
29
|
+
- Create: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages-intake.sh`
|
|
30
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages.sh`
|
|
31
|
+
|
|
32
|
+
**Steps:**
|
|
33
|
+
|
|
34
|
+
1. Read pipeline-stages.sh lines 1-950 (headers, helpers, first 3 stage functions)
|
|
35
|
+
2. Extract lines 1-163 (file header + helper functions: `prune_context_section()`, `guard_prompt_size()`, `_safe_base_log()`, `_safe_base_diff()`, `show_stage_preview()`) to new file with module guard
|
|
36
|
+
3. Extract lines 164-730 (stage_intake function) to new file
|
|
37
|
+
4. Extract lines 731-951 (stage_plan, stage_design functions) to new file
|
|
38
|
+
5. In original pipeline-stages.sh, replace extracted content with: `source "${SCRIPT_DIR}/lib/pipeline-stages-intake.sh"`
|
|
39
|
+
6. Add guard at top: `[[ -n "${_PIPELINE_STAGES_INTAKE_LOADED:-}" ]] && return 0; _PIPELINE_STAGES_INTAKE_LOADED=1`
|
|
40
|
+
7. Run: `bash -n scripts/lib/pipeline-stages-intake.sh` (syntax check)
|
|
41
|
+
8. Commit: `git add scripts/lib/pipeline-stages-intake.sh scripts/lib/pipeline-stages.sh && git commit -m "refactor(pipeline): decompose intake, plan, design stages into pipeline-stages-intake.sh"`
|
|
42
|
+
|
|
43
|
+
**Notes:**
|
|
44
|
+
|
|
45
|
+
- Don't remove from original yet—we'll update the main file in a separate task
|
|
46
|
+
- Extract helpers as well (they're shared but we'll consolidate later)
|
|
47
|
+
- Module guard pattern: `[[ -n "${_PIPELINE_STAGES_INTAKE_LOADED:-}" ]] && return 0; _PIPELINE_STAGES_INTAKE_LOADED=1`
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### Task 1.2: Decompose pipeline-stages.sh — Part B (build, test)
|
|
52
|
+
|
|
53
|
+
**Objective:** Extract `stage_test_first()`, `stage_build()`, `stage_test()` (~800 lines) into new file.
|
|
54
|
+
|
|
55
|
+
**Files:**
|
|
56
|
+
|
|
57
|
+
- Create: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages-build.sh`
|
|
58
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages.sh`
|
|
59
|
+
|
|
60
|
+
**Steps:**
|
|
61
|
+
|
|
62
|
+
1. Read pipeline-stages.sh lines 952-1458 (stage_test_first, stage_build, stage_test)
|
|
63
|
+
2. Create new file with module guard
|
|
64
|
+
3. Copy only the three stage functions (no duplicate helpers)
|
|
65
|
+
4. Source helper functions from pipeline-stages-intake.sh at top: `source "${SCRIPT_DIR}/lib/pipeline-stages-intake.sh"`
|
|
66
|
+
5. Update main pipeline-stages.sh to source this file
|
|
67
|
+
6. Run syntax check
|
|
68
|
+
7. Commit: `git add scripts/lib/pipeline-stages-build.sh scripts/lib/pipeline-stages.sh && git commit -m "refactor(pipeline): decompose build, test stages into pipeline-stages-build.sh"`
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### Task 1.3: Decompose pipeline-stages.sh — Part C (review, compound_quality)
|
|
73
|
+
|
|
74
|
+
**Objective:** Extract `stage_review()`, `stage_compound_quality()`, `stage_audit()` (~400 lines) into new file.
|
|
75
|
+
|
|
76
|
+
**Files:**
|
|
77
|
+
|
|
78
|
+
- Create: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages-review.sh`
|
|
79
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages.sh`
|
|
80
|
+
|
|
81
|
+
**Steps:**
|
|
82
|
+
|
|
83
|
+
1. Read pipeline-stages.sh lines 1459-1961 (stage_review, stage_compound_quality, stage_audit)
|
|
84
|
+
2. Create new file with module guard
|
|
85
|
+
3. Copy the three stage functions
|
|
86
|
+
4. Source helpers from intake file
|
|
87
|
+
5. Update main pipeline-stages.sh to source this file
|
|
88
|
+
6. Run syntax check
|
|
89
|
+
7. Commit: `git add scripts/lib/pipeline-stages-review.sh scripts/lib/pipeline-stages.sh && git commit -m "refactor(pipeline): decompose review, compound_quality, audit stages into pipeline-stages-review.sh"`
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### Task 1.4: Decompose pipeline-stages.sh — Part D (pr, merge, deploy)
|
|
94
|
+
|
|
95
|
+
**Objective:** Extract `stage_pr()`, `stage_merge()`, `stage_deploy()` (~1,100 lines) into new file.
|
|
96
|
+
|
|
97
|
+
**Files:**
|
|
98
|
+
|
|
99
|
+
- Create: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages-delivery.sh`
|
|
100
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages.sh`
|
|
101
|
+
|
|
102
|
+
**Steps:**
|
|
103
|
+
|
|
104
|
+
1. Read pipeline-stages.sh lines 1962-2853 (stage_pr, stage_merge, stage_deploy)
|
|
105
|
+
2. Create new file with module guard
|
|
106
|
+
3. Copy the three stage functions
|
|
107
|
+
4. Source helpers from intake file
|
|
108
|
+
5. Update main pipeline-stages.sh to source this file
|
|
109
|
+
6. Run syntax check
|
|
110
|
+
7. Commit: `git add scripts/lib/pipeline-stages-delivery.sh scripts/lib/pipeline-stages.sh && git commit -m "refactor(pipeline): decompose pr, merge, deploy stages into pipeline-stages-delivery.sh"`
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
### Task 1.5: Decompose pipeline-stages.sh — Part E (validate, monitor)
|
|
115
|
+
|
|
116
|
+
**Objective:** Extract `stage_validate()`, `stage_monitor()` (~300 lines) into new file.
|
|
117
|
+
|
|
118
|
+
**Files:**
|
|
119
|
+
|
|
120
|
+
- Create: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages-monitor.sh`
|
|
121
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages.sh`
|
|
122
|
+
|
|
123
|
+
**Steps:**
|
|
124
|
+
|
|
125
|
+
1. Read pipeline-stages.sh lines 2854-end (stage_validate, stage_monitor)
|
|
126
|
+
2. Create new file with module guard
|
|
127
|
+
3. Copy the two stage functions
|
|
128
|
+
4. Source helpers from intake file
|
|
129
|
+
5. Update main pipeline-stages.sh to source this file
|
|
130
|
+
6. Run syntax check
|
|
131
|
+
7. Commit: `git add scripts/lib/pipeline-stages-monitor.sh scripts/lib/pipeline-stages.sh && git commit -m "refactor(pipeline): decompose validate, monitor stages into pipeline-stages-monitor.sh"`
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### Task 1.6: Finalize pipeline-stages.sh
|
|
136
|
+
|
|
137
|
+
**Objective:** Reduce pipeline-stages.sh to ~100 lines (loader + exports).
|
|
138
|
+
|
|
139
|
+
**Files:**
|
|
140
|
+
|
|
141
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/lib/pipeline-stages.sh`
|
|
142
|
+
|
|
143
|
+
**Steps:**
|
|
144
|
+
|
|
145
|
+
1. Read current pipeline-stages.sh
|
|
146
|
+
2. Keep file header, module guard, defaults section
|
|
147
|
+
3. Delete all duplicated helpers (keep only in intake sub-file)
|
|
148
|
+
4. Add five source statements at bottom (for the five stage files)
|
|
149
|
+
5. Add final section exporting stage function list:
|
|
150
|
+
```bash
|
|
151
|
+
# Export all available stages
|
|
152
|
+
export PIPELINE_STAGES="intake plan design test_first build test review compound_quality audit pr merge deploy validate monitor"
|
|
153
|
+
```
|
|
154
|
+
6. Final file should be ~100-120 lines
|
|
155
|
+
7. Run: `bash -n scripts/lib/pipeline-stages.sh` (syntax check)
|
|
156
|
+
8. Verify by running sw-pipeline-test.sh (should pass without changes)
|
|
157
|
+
9. Commit: `git add scripts/lib/pipeline-stages.sh && git commit -m "refactor(pipeline): consolidate pipeline-stages.sh to loader (100 lines)"`
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Phase 2: Loop Decomposition (4 tasks)
|
|
162
|
+
|
|
163
|
+
### Task 2.1: Decompose sw-loop.sh — Part A (loop-iteration.sh)
|
|
164
|
+
|
|
165
|
+
**Objective:** Extract single-iteration logic (~600 lines).
|
|
166
|
+
|
|
167
|
+
**Files:**
|
|
168
|
+
|
|
169
|
+
- Create: `/Users/sethford/Documents/shipwright/scripts/lib/loop-iteration.sh`
|
|
170
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/sw-loop.sh`
|
|
171
|
+
|
|
172
|
+
**Steps:**
|
|
173
|
+
|
|
174
|
+
1. Read sw-loop.sh, identify functions for single iteration:
|
|
175
|
+
- `select_adaptive_model()`
|
|
176
|
+
- `select_audit_model()`
|
|
177
|
+
- `accumulate_loop_tokens()`
|
|
178
|
+
- `write_loop_tokens()`
|
|
179
|
+
- `validate_claude_output()`
|
|
180
|
+
- `check_fatal_error()`
|
|
181
|
+
- `check_progress()`
|
|
182
|
+
- `check_completion()`
|
|
183
|
+
- `run_test_gate()`
|
|
184
|
+
- `write_error_summary()`
|
|
185
|
+
- `run_audit_agent()`
|
|
186
|
+
- `run_quality_gates()`
|
|
187
|
+
- `compose_prompt()`
|
|
188
|
+
- Full iteration loop logic from main function
|
|
189
|
+
2. Create new file with module guard `_LOOP_ITERATION_LOADED`
|
|
190
|
+
3. Copy listed functions to new file
|
|
191
|
+
4. Source helpers in sw-loop.sh: `source "${SCRIPT_DIR}/lib/loop-iteration.sh"`
|
|
192
|
+
5. Replace iteration logic in sw-loop.sh main loop with call to extracted function
|
|
193
|
+
6. Syntax check both files
|
|
194
|
+
7. Commit: `git add scripts/lib/loop-iteration.sh scripts/sw-loop.sh && git commit -m "refactor(loop): extract single-iteration logic into loop-iteration.sh"`
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
### Task 2.2: Decompose sw-loop.sh — Part B (loop-convergence.sh)
|
|
199
|
+
|
|
200
|
+
**Objective:** Extract convergence detection logic (~400 lines).
|
|
201
|
+
|
|
202
|
+
**Files:**
|
|
203
|
+
|
|
204
|
+
- Create: `/Users/sethford/Documents/shipwright/scripts/lib/loop-convergence.sh`
|
|
205
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/sw-loop.sh`
|
|
206
|
+
|
|
207
|
+
**Steps:**
|
|
208
|
+
|
|
209
|
+
1. Extract convergence-related functions:
|
|
210
|
+
- `check_circuit_breaker()`
|
|
211
|
+
- `check_max_iterations()`
|
|
212
|
+
- `diagnose_failure()`
|
|
213
|
+
- `detect_stuckness()`
|
|
214
|
+
- `record_iteration_stuckness_data()`
|
|
215
|
+
- `compose_audit_section()`
|
|
216
|
+
- `check_definition_of_done()`
|
|
217
|
+
- `track_iteration_velocity()`
|
|
218
|
+
- `compute_velocity_avg()`
|
|
219
|
+
2. Create new file with module guard `_LOOP_CONVERGENCE_LOADED`
|
|
220
|
+
3. Copy functions
|
|
221
|
+
4. Source in sw-loop.sh
|
|
222
|
+
5. Syntax check
|
|
223
|
+
6. Commit: `git add scripts/lib/loop-convergence.sh scripts/sw-loop.sh && git commit -m "refactor(loop): extract convergence detection into loop-convergence.sh"`
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
### Task 2.3: Decompose sw-loop.sh — Part C (loop-restart.sh)
|
|
228
|
+
|
|
229
|
+
**Objective:** Extract session restart logic (~300 lines).
|
|
230
|
+
|
|
231
|
+
**Files:**
|
|
232
|
+
|
|
233
|
+
- Create: `/Users/sethford/Documents/shipwright/scripts/lib/loop-restart.sh`
|
|
234
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/sw-loop.sh`
|
|
235
|
+
|
|
236
|
+
**Steps:**
|
|
237
|
+
|
|
238
|
+
1. Extract session restart functions:
|
|
239
|
+
- `initialize_state()`
|
|
240
|
+
- `resume_state()`
|
|
241
|
+
- `write_state()`
|
|
242
|
+
- `append_log_entry()`
|
|
243
|
+
- Logic for session restart after exhaustion
|
|
244
|
+
2. Create new file with module guard `_LOOP_RESTART_LOADED`
|
|
245
|
+
3. Copy functions
|
|
246
|
+
4. Source in sw-loop.sh
|
|
247
|
+
5. Syntax check
|
|
248
|
+
6. Commit: `git add scripts/lib/loop-restart.sh scripts/sw-loop.sh && git commit -m "refactor(loop): extract session restart logic into loop-restart.sh"`
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### Task 2.4: Decompose sw-loop.sh — Part D (loop-progress.sh)
|
|
253
|
+
|
|
254
|
+
**Objective:** Extract progress.md management (~200 lines).
|
|
255
|
+
|
|
256
|
+
**Files:**
|
|
257
|
+
|
|
258
|
+
- Create: `/Users/sethford/Documents/shipwright/scripts/lib/loop-progress.sh`
|
|
259
|
+
- Edit: `/Users/sethford/Documents/shipwright/scripts/sw-loop.sh`
|
|
260
|
+
|
|
261
|
+
**Steps:**
|
|
262
|
+
|
|
263
|
+
1. Extract progress tracking functions:
|
|
264
|
+
- `write_progress()`
|
|
265
|
+
- `manage_context_window()`
|
|
266
|
+
- `git_commit_count()`, `git_recent_log()`, `git_diff_stat()`, `git_auto_commit()`
|
|
267
|
+
- Progress file write logic
|
|
268
|
+
2. Create new file with module guard `_LOOP_PROGRESS_LOADED`
|
|
269
|
+
3. Copy functions
|
|
270
|
+
4. Source in sw-loop.sh
|
|
271
|
+
5. Syntax check
|
|
272
|
+
6. Commit: `git add scripts/lib/loop-progress.sh scripts/sw-loop.sh && git commit -m "refactor(loop): extract progress tracking into loop-progress.sh"`
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Phase 3: Test Harness Adoption (1 task + 3 parallel)
|
|
277
|
+
|
|
278
|
+
### Task 3.1: Verify test-helpers.sh completeness
|
|
279
|
+
|
|
280
|
+
**Objective:** Ensure test-helpers.sh has all common assertion/setup patterns.
|
|
281
|
+
|
|
282
|
+
**Files:**
|
|
283
|
+
|
|
284
|
+
- Read: `/Users/sethford/Documents/shipwright/scripts/lib/test-helpers.sh`
|
|
285
|
+
|
|
286
|
+
**Steps:**
|
|
287
|
+
|
|
288
|
+
1. Read full test-helpers.sh to see what's exported
|
|
289
|
+
2. Verify it has: colors, counters, assert_pass/fail/eq/contains/contains_regex/gt/json_key, setup_test_env, cleanup_test_env, print_test_header, print_test_results, mock helpers
|
|
290
|
+
3. If any missing patterns found, add them to test-helpers.sh
|
|
291
|
+
4. Commit if changes: `git add scripts/lib/test-helpers.sh && git commit -m "refactor(tests): ensure test-helpers.sh has all common patterns"`
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### Task 3.2: Adopt test harness — Batch A (scripts/\*-test.sh [A-H])
|
|
296
|
+
|
|
297
|
+
**Objective:** Update first 32 test scripts to source test-helpers.sh.
|
|
298
|
+
|
|
299
|
+
**Files:**
|
|
300
|
+
|
|
301
|
+
- Edit: All test scripts matching pattern `scripts/sw-*-test.sh` where name starts with A-H (32 files)
|
|
302
|
+
|
|
303
|
+
**Steps:**
|
|
304
|
+
|
|
305
|
+
1. For each test script:
|
|
306
|
+
a. Read first 50 lines
|
|
307
|
+
b. If it defines its own `assert_pass()`, `assert_fail()`, etc., mark for replacement
|
|
308
|
+
c. Add at top (after shebang and after `SCRIPT_DIR=...`): `source "$SCRIPT_DIR/lib/test-helpers.sh"`
|
|
309
|
+
d. Remove duplicate helper function definitions (keep custom ones if unique)
|
|
310
|
+
e. Syntax check: `bash -n <file>`
|
|
311
|
+
2. Bulk commit: `git add scripts/sw-*-test.sh && git commit -m "refactor(tests): adopt test-helpers.sh in batch A (32 scripts)"`
|
|
312
|
+
|
|
313
|
+
**Note:** Can be done in parallel with next batches. Each batch can be a separate agent.
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
### Task 3.3: Adopt test harness — Batch B (scripts/\*-test.sh [I-P])
|
|
318
|
+
|
|
319
|
+
**Objective:** Update next 32 test scripts to source test-helpers.sh.
|
|
320
|
+
|
|
321
|
+
**Files:**
|
|
322
|
+
|
|
323
|
+
- Edit: All test scripts starting with I-P (32 files)
|
|
324
|
+
|
|
325
|
+
**Steps:**
|
|
326
|
+
|
|
327
|
+
1. Same as Task 3.2
|
|
328
|
+
2. Bulk commit: `git add scripts/sw-*-test.sh && git commit -m "refactor(tests): adopt test-helpers.sh in batch B (32 scripts)"`
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
### Task 3.4: Adopt test harness — Batch C (scripts/\*-test.sh [Q-Z])
|
|
333
|
+
|
|
334
|
+
**Objective:** Update remaining test scripts to source test-helpers.sh.
|
|
335
|
+
|
|
336
|
+
**Files:**
|
|
337
|
+
|
|
338
|
+
- Edit: All remaining test scripts (64 files)
|
|
339
|
+
|
|
340
|
+
**Steps:**
|
|
341
|
+
|
|
342
|
+
1. Same as Task 3.2
|
|
343
|
+
2. Bulk commit: `git add scripts/sw-*-test.sh && git commit -m "refactor(tests): adopt test-helpers.sh in batch C (64 scripts)"`
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Phase 4: Claude Code Capabilities (7 tasks)
|
|
348
|
+
|
|
349
|
+
### Task 4.1: Create MCP server wrapper
|
|
350
|
+
|
|
351
|
+
**Objective:** Register Skipper API as MCP server for Claude Code.
|
|
352
|
+
|
|
353
|
+
**Files:**
|
|
354
|
+
|
|
355
|
+
- Create: `/Users/sethford/Documents/shipwright/.claude/mcp/skipper-server.sh`
|
|
356
|
+
- Edit: `/Users/sethford/Documents/shipwright/.claude/settings.json`
|
|
357
|
+
|
|
358
|
+
**Steps:**
|
|
359
|
+
|
|
360
|
+
1. Create wrapper script that:
|
|
361
|
+
- Checks if `http://127.0.0.1:4200` is reachable
|
|
362
|
+
- Translates MCP tool calls to HTTP POST to `/mcp` endpoint
|
|
363
|
+
- Returns tool responses
|
|
364
|
+
2. Add minimal bash script that acts as MCP bridge (see MCP protocol docs for format)
|
|
365
|
+
3. In settings.json, add under `mcpServers`:
|
|
366
|
+
```json
|
|
367
|
+
"skipper": {
|
|
368
|
+
"command": "bash",
|
|
369
|
+
"args": [".claude/mcp/skipper-server.sh"],
|
|
370
|
+
"description": "Skipper Agent OS API"
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
4. Test: Try calling a tool from Claude Code terminal
|
|
374
|
+
5. Commit: `git add .claude/mcp/skipper-server.sh .claude/settings.json && git commit -m "feat(mcp): register Skipper API as MCP server for Claude Code"`
|
|
375
|
+
|
|
376
|
+
**Notes:**
|
|
377
|
+
|
|
378
|
+
- If Skipper is not running, server should gracefully fail with helpful message
|
|
379
|
+
- See MCP protocol in Skipper docs for exact message format
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
### Task 4.2: Create pipeline-monitor skill
|
|
384
|
+
|
|
385
|
+
**Objective:** /pipeline-monitor — check pipeline progress, surface blockers.
|
|
386
|
+
|
|
387
|
+
**Files:**
|
|
388
|
+
|
|
389
|
+
- Create: `/Users/sethford/Documents/shipwright/.claude/skills/pipeline-monitor.md`
|
|
390
|
+
|
|
391
|
+
**Steps:**
|
|
392
|
+
|
|
393
|
+
1. Create skill file with:
|
|
394
|
+
- Heading: `# Pipeline Monitor`
|
|
395
|
+
- Description: "Real-time pipeline progress tracking and blocker detection"
|
|
396
|
+
- Implementation that:
|
|
397
|
+
- Calls `shipwright status --json` to get current pipeline state
|
|
398
|
+
- Reads `.claude/pipeline-state.md` for detailed stage info
|
|
399
|
+
- Checks for blockers (failed stages, hung iterations)
|
|
400
|
+
- Displays in user-friendly format with progress bars
|
|
401
|
+
2. Include inline Claude Code that uses bash to run shipwright commands
|
|
402
|
+
3. Commit: `git add .claude/skills/pipeline-monitor.md && git commit -m "feat(skills): add pipeline-monitor skill"`
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
406
|
+
### Task 4.3: Create fleet-overview skill
|
|
407
|
+
|
|
408
|
+
**Objective:** /fleet-overview — multi-repo fleet status.
|
|
409
|
+
|
|
410
|
+
**Files:**
|
|
411
|
+
|
|
412
|
+
- Create: `/Users/sethford/Documents/shipwright/.claude/skills/fleet-overview.md`
|
|
413
|
+
|
|
414
|
+
**Steps:**
|
|
415
|
+
|
|
416
|
+
1. Create skill file with:
|
|
417
|
+
- Heading: `# Fleet Overview`
|
|
418
|
+
- Description: "Multi-repo fleet status, worker pool, per-repo queue"
|
|
419
|
+
- Implementation that:
|
|
420
|
+
- Reads fleet-config.json
|
|
421
|
+
- Calls `shipwright fleet` status command
|
|
422
|
+
- Shows per-repo pipeline queue depth
|
|
423
|
+
- Shows worker pool utilization
|
|
424
|
+
2. Commit: `git add .claude/skills/fleet-overview.md && git commit -m "feat(skills): add fleet-overview skill"`
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
### Task 4.4: Create agent-debug skill
|
|
429
|
+
|
|
430
|
+
**Objective:** /agent-debug — debug stuck/failing Skipper agent.
|
|
431
|
+
|
|
432
|
+
**Files:**
|
|
433
|
+
|
|
434
|
+
- Create: `/Users/sethford/Documents/shipwright/.claude/skills/agent-debug.md`
|
|
435
|
+
|
|
436
|
+
**Steps:**
|
|
437
|
+
|
|
438
|
+
1. Create skill file with:
|
|
439
|
+
- Heading: `# Agent Debug`
|
|
440
|
+
- Description: "Diagnose stuck or failing Skipper agents"
|
|
441
|
+
- Implementation that:
|
|
442
|
+
- Takes agent ID as input
|
|
443
|
+
- Calls Skipper API to fetch agent logs
|
|
444
|
+
- Reads memory system for failure patterns
|
|
445
|
+
- Checks heartbeat status
|
|
446
|
+
- Suggests recovery steps
|
|
447
|
+
2. Commit: `git add .claude/skills/agent-debug.md && git commit -m "feat(skills): add agent-debug skill"`
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
### Task 4.5: Create cost-report skill
|
|
452
|
+
|
|
453
|
+
**Objective:** /cost-report — token usage and cost analysis.
|
|
454
|
+
|
|
455
|
+
**Files:**
|
|
456
|
+
|
|
457
|
+
- Create: `/Users/sethford/Documents/shipwright/.claude/skills/cost-report.md`
|
|
458
|
+
|
|
459
|
+
**Steps:**
|
|
460
|
+
|
|
461
|
+
1. Create skill file with:
|
|
462
|
+
- Heading: `# Cost Report`
|
|
463
|
+
- Description: "Token usage and cost analysis for pipelines"
|
|
464
|
+
- Implementation that:
|
|
465
|
+
- Calls `shipwright cost show` for current state
|
|
466
|
+
- Reads cost tracking files
|
|
467
|
+
- Shows breakdown by pipeline/stage
|
|
468
|
+
- Alerts if approaching budget
|
|
469
|
+
2. Commit: `git add .claude/skills/cost-report.md && git commit -m "feat(skills): add cost-report skill"`
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
### Task 4.6: Create agent-crash detection hook
|
|
474
|
+
|
|
475
|
+
**Objective:** Auto-capture diagnostics when Skipper agent crashes.
|
|
476
|
+
|
|
477
|
+
**Files:**
|
|
478
|
+
|
|
479
|
+
- Create: `/Users/sethford/Documents/shipwright/.claude/hooks/agent-crash-capture.sh`
|
|
480
|
+
- Edit: `/Users/sethford/Documents/shipwright/.claude/settings.json`
|
|
481
|
+
|
|
482
|
+
**Steps:**
|
|
483
|
+
|
|
484
|
+
1. Create hook script that:
|
|
485
|
+
- Monitors heartbeat files in `~/.shipwright/heartbeats/`
|
|
486
|
+
- Detects when an agent heartbeat file goes stale (>2 minutes old)
|
|
487
|
+
- Captures:
|
|
488
|
+
- Agent logs (last 50 lines)
|
|
489
|
+
- Last iteration output
|
|
490
|
+
- Error summary
|
|
491
|
+
- System state (memory, CPU)
|
|
492
|
+
- Writes diagnostic bundle to memory system: `~/.shipwright/memory/<repo>/<agent-id>.crash-dump.json`
|
|
493
|
+
- Emits event: `agent_crash` with agent_id, reason
|
|
494
|
+
2. In settings.json, register hook for new event type or use periodic check
|
|
495
|
+
3. Test: Kill an agent, verify diagnostics captured
|
|
496
|
+
4. Commit: `git add .claude/hooks/agent-crash-capture.sh .claude/settings.json && git commit -m "feat(hooks): add agent-crash-capture diagnostics hook"`
|
|
497
|
+
|
|
498
|
+
**Notes:**
|
|
499
|
+
|
|
500
|
+
- Graceful fallback if heartbeat files not found
|
|
501
|
+
- Don't block agent execution, run async
|
|
502
|
+
- Compress old crash dumps to avoid disk bloat
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
### Task 4.7: Wire Refined Depths brand implementation
|
|
507
|
+
|
|
508
|
+
**Objective:** Execute Refined Depths plan (dashboard + docs styling).
|
|
509
|
+
|
|
510
|
+
**Files:**
|
|
511
|
+
|
|
512
|
+
- Edit: All dashboard HTML/CSS files (in `dashboard/public/`)
|
|
513
|
+
- Edit: All documentation files (in `docs/`)
|
|
514
|
+
|
|
515
|
+
**Steps:**
|
|
516
|
+
|
|
517
|
+
1. Read: `docs/plans/2026-03-01-refined-depths-implementation.md` (separate doc)
|
|
518
|
+
2. Apply color scheme changes to dashboard CSS/HTML
|
|
519
|
+
3. Apply typography and spacing updates
|
|
520
|
+
4. Update documentation site styling
|
|
521
|
+
5. Commit all changes: `git add dashboard/ docs/ && git commit -m "brand: apply Refined Depths design system"`
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## Phase 5: Verification & Integration (4 tasks)
|
|
526
|
+
|
|
527
|
+
### Task 5.1: Run full test suite on decomposed pipeline-stages
|
|
528
|
+
|
|
529
|
+
**Objective:** Verify all 19 stages work correctly after decomposition.
|
|
530
|
+
|
|
531
|
+
**Files:**
|
|
532
|
+
|
|
533
|
+
- Run: `bash scripts/sw-lib-pipeline-stages-test.sh`
|
|
534
|
+
- Run: `bash scripts/sw-pipeline-test.sh`
|
|
535
|
+
|
|
536
|
+
**Steps:**
|
|
537
|
+
|
|
538
|
+
1. Run existing stage test suite: `bash scripts/sw-lib-pipeline-stages-test.sh`
|
|
539
|
+
2. Run full pipeline e2e test: `bash scripts/sw-pipeline-test.sh`
|
|
540
|
+
3. If failures, debug and fix (likely just import issues)
|
|
541
|
+
4. Commit any fixes: `git add ... && git commit -m "fix(pipeline): correct stage decomposition imports"`
|
|
542
|
+
|
|
543
|
+
---
|
|
544
|
+
|
|
545
|
+
### Task 5.2: Run full test suite on decomposed loop
|
|
546
|
+
|
|
547
|
+
**Objective:** Verify loop iteration, convergence, restart, progress all work.
|
|
548
|
+
|
|
549
|
+
**Files:**
|
|
550
|
+
|
|
551
|
+
- Run: `bash scripts/sw-loop-test.sh`
|
|
552
|
+
|
|
553
|
+
**Steps:**
|
|
554
|
+
|
|
555
|
+
1. Run loop test suite: `bash scripts/sw-loop-test.sh`
|
|
556
|
+
2. If failures, fix imports/sourcing
|
|
557
|
+
3. Commit fixes if needed
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
561
|
+
### Task 5.3: Run full test suite on test-harness adoption
|
|
562
|
+
|
|
563
|
+
**Objective:** Verify all 128 test scripts still pass with shared harness.
|
|
564
|
+
|
|
565
|
+
**Files:**
|
|
566
|
+
|
|
567
|
+
- Run: `npm test` (runs all test suites)
|
|
568
|
+
|
|
569
|
+
**Steps:**
|
|
570
|
+
|
|
571
|
+
1. Run full test suite: `npm test`
|
|
572
|
+
2. Should see ~95+ tests pass
|
|
573
|
+
3. If failures, likely missing helpers — add to test-helpers.sh
|
|
574
|
+
4. Commit fixes
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
### Task 5.4: Integration test — MCP server + skills
|
|
579
|
+
|
|
580
|
+
**Objective:** Verify new Claude Code features work end-to-end.
|
|
581
|
+
|
|
582
|
+
**Files:**
|
|
583
|
+
|
|
584
|
+
- Manual: Test in Claude Code terminal
|
|
585
|
+
|
|
586
|
+
**Steps:**
|
|
587
|
+
|
|
588
|
+
1. Start Skipper locally: `skipper start` (if available)
|
|
589
|
+
2. In Claude Code, try invoking skill: `/pipeline-monitor`
|
|
590
|
+
3. Verify skill executes and returns output
|
|
591
|
+
4. Try other skills: `/fleet-overview`, `/agent-debug`, `/cost-report`
|
|
592
|
+
5. If issues, debug hook/skill implementations
|
|
593
|
+
6. Document any limitations in .claude/CLAUDE.md
|
|
594
|
+
|
|
595
|
+
---
|
|
596
|
+
|
|
597
|
+
## Phase 6: Documentation & Final (1 task)
|
|
598
|
+
|
|
599
|
+
### Task 6.1: Update .claude/CLAUDE.md with new capabilities
|
|
600
|
+
|
|
601
|
+
**Objective:** Document new skills, hooks, and MCP server.
|
|
602
|
+
|
|
603
|
+
**Files:**
|
|
604
|
+
|
|
605
|
+
- Edit: `/Users/sethford/Documents/shipwright/.claude/CLAUDE.md`
|
|
606
|
+
|
|
607
|
+
**Steps:**
|
|
608
|
+
|
|
609
|
+
1. Add section "Claude Code Skills" listing new skills: pipeline-monitor, fleet-overview, agent-debug, cost-report
|
|
610
|
+
2. Add MCP server info: "Skipper API available via MCP server at 127.0.0.1:4200"
|
|
611
|
+
3. Add Hook info: "Agent crash detection hook auto-captures diagnostics"
|
|
612
|
+
4. Update architecture table if pipeline-stages decomposition changes line counts
|
|
613
|
+
5. Commit: `git add .claude/CLAUDE.md && git commit -m "docs: add Stream 3 capabilities to CLAUDE.md"`
|
|
614
|
+
|
|
615
|
+
---
|
|
616
|
+
|
|
617
|
+
## Parallel Execution Strategy
|
|
618
|
+
|
|
619
|
+
**Recommended team composition:** 3 agents
|
|
620
|
+
|
|
621
|
+
- **Agent 1 (Pipeline Decomposer):** Tasks 1.1–1.6 (bash cleanup for pipeline-stages)
|
|
622
|
+
- **Agent 2 (Loop Decomposer):** Tasks 2.1–2.4 (bash cleanup for sw-loop)
|
|
623
|
+
- **Agent 3 (Capabilities):** Tasks 3.1–4.7 (test harness + MCP + skills + hooks in parallel with Agents 1–2)
|
|
624
|
+
|
|
625
|
+
**Merge safety:** Each phase uses different files, no conflicts expected.
|
|
626
|
+
|
|
627
|
+
**Verification order:**
|
|
628
|
+
|
|
629
|
+
1. Phases 1–2 complete → Run Task 5.1–5.2
|
|
630
|
+
2. Phase 3 complete → Run Task 5.3
|
|
631
|
+
3. Phase 4 complete → Run Task 5.4
|
|
632
|
+
4. All phases complete → Run Task 6.1
|
|
633
|
+
|
|
634
|
+
---
|
|
635
|
+
|
|
636
|
+
## Success Criteria
|
|
637
|
+
|
|
638
|
+
- [ ] pipeline-stages.sh reduced to ~100 lines (loader only)
|
|
639
|
+
- [ ] 5 new stage sub-files created and working (pipeline-stages-intake/build/review/delivery/monitor.sh)
|
|
640
|
+
- [ ] sw-loop.sh reduced by ~50% (4 sub-files handling iteration/convergence/restart/progress)
|
|
641
|
+
- [ ] All 128 test scripts source test-helpers.sh
|
|
642
|
+
- [ ] MCP server registered and functional
|
|
643
|
+
- [ ] 4 new skills created and callable from Claude Code
|
|
644
|
+
- [ ] Agent crash hook implemented and tested
|
|
645
|
+
- [ ] All existing tests pass (no regression)
|
|
646
|
+
- [ ] Refined Depths brand applied to dashboard + docs
|
|
647
|
+
|
|
648
|
+
---
|
|
649
|
+
|
|
650
|
+
## Plan Format Notes
|
|
651
|
+
|
|
652
|
+
- **File paths:** All absolute paths (`/Users/sethford/Documents/shipwright/...`)
|
|
653
|
+
- **Commits:** One per logical chunk, frequent (every task or subtask)
|
|
654
|
+
- **Testing:** After each phase, run relevant test suite
|
|
655
|
+
- **Bash 3.2:** No bashisms in new files (no `declare -A`, no `readarray`, etc.)
|
|
656
|
+
- **Sourcing pattern:** Use `source "${SCRIPT_DIR}/lib/file.sh"` with guard `[[ -n "${_FILE_LOADED:-}" ]] && return 0; _FILE_LOADED=1`
|
|
657
|
+
- **No new behavior:** Decomposition is pure structural, all tests should pass unchanged
|
|
658
|
+
- **Tasks can run in parallel:** Phases 1, 2, 3 touch different files. Use `--worktree` if needed for true isolation.
|