shipwright-cli 3.1.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.
Files changed (283) hide show
  1. package/.claude/agents/code-reviewer.md +2 -0
  2. package/.claude/agents/devops-engineer.md +2 -0
  3. package/.claude/agents/doc-fleet-agent.md +2 -0
  4. package/.claude/agents/pipeline-agent.md +2 -0
  5. package/.claude/agents/shell-script-specialist.md +2 -0
  6. package/.claude/agents/test-specialist.md +2 -0
  7. package/.claude/hooks/agent-crash-capture.sh +32 -0
  8. package/.claude/hooks/post-tool-use.sh +3 -2
  9. package/.claude/hooks/pre-tool-use.sh +35 -3
  10. package/README.md +22 -8
  11. package/claude-code/hooks/config-change.sh +18 -0
  12. package/claude-code/hooks/instructions-reloaded.sh +7 -0
  13. package/claude-code/hooks/worktree-create.sh +25 -0
  14. package/claude-code/hooks/worktree-remove.sh +20 -0
  15. package/config/code-constitution.json +130 -0
  16. package/config/defaults.json +25 -2
  17. package/config/policy.json +1 -1
  18. package/dashboard/middleware/auth.ts +134 -0
  19. package/dashboard/middleware/constants.ts +21 -0
  20. package/dashboard/public/index.html +8 -6
  21. package/dashboard/public/styles.css +176 -97
  22. package/dashboard/routes/auth.ts +38 -0
  23. package/dashboard/server.ts +117 -25
  24. package/dashboard/services/config.ts +26 -0
  25. package/dashboard/services/db.ts +118 -0
  26. package/dashboard/src/canvas/pixel-agent.ts +298 -0
  27. package/dashboard/src/canvas/pixel-sprites.ts +440 -0
  28. package/dashboard/src/canvas/shipyard-effects.ts +367 -0
  29. package/dashboard/src/canvas/shipyard-scene.ts +616 -0
  30. package/dashboard/src/canvas/submarine-layout.ts +267 -0
  31. package/dashboard/src/components/header.ts +8 -7
  32. package/dashboard/src/core/api.ts +5 -0
  33. package/dashboard/src/core/router.ts +1 -0
  34. package/dashboard/src/design/submarine-theme.ts +253 -0
  35. package/dashboard/src/main.ts +2 -0
  36. package/dashboard/src/types/api.ts +12 -1
  37. package/dashboard/src/views/activity.ts +2 -1
  38. package/dashboard/src/views/metrics.ts +69 -1
  39. package/dashboard/src/views/shipyard.ts +39 -0
  40. package/dashboard/types/index.ts +166 -0
  41. package/docs/plans/2026-02-28-compound-audit-and-shipyard-design.md +186 -0
  42. package/docs/plans/2026-02-28-skipper-shipwright-implementation-plan.md +1182 -0
  43. package/docs/plans/2026-02-28-skipper-shipwright-integration-design.md +531 -0
  44. package/docs/plans/2026-03-01-ai-powered-skill-injection-design.md +298 -0
  45. package/docs/plans/2026-03-01-ai-powered-skill-injection-plan.md +1109 -0
  46. package/docs/plans/2026-03-01-capabilities-cleanup-plan.md +658 -0
  47. package/docs/plans/2026-03-01-clean-architecture-plan.md +924 -0
  48. package/docs/plans/2026-03-01-compound-audit-cascade-design.md +191 -0
  49. package/docs/plans/2026-03-01-compound-audit-cascade-plan.md +921 -0
  50. package/docs/plans/2026-03-01-deep-integration-plan.md +851 -0
  51. package/docs/plans/2026-03-01-pipeline-audit-trail-design.md +145 -0
  52. package/docs/plans/2026-03-01-pipeline-audit-trail-plan.md +770 -0
  53. package/docs/plans/2026-03-01-refined-depths-brand-design.md +382 -0
  54. package/docs/plans/2026-03-01-refined-depths-implementation.md +599 -0
  55. package/docs/plans/2026-03-01-skipper-kernel-integration-design.md +203 -0
  56. package/docs/plans/2026-03-01-unified-platform-design.md +272 -0
  57. package/docs/plans/2026-03-07-claude-code-feature-integration-design.md +189 -0
  58. package/docs/plans/2026-03-07-claude-code-feature-integration-plan.md +1165 -0
  59. package/docs/research/BACKLOG_QUICK_REFERENCE.md +352 -0
  60. package/docs/research/CUTTING_EDGE_RESEARCH_2026.md +546 -0
  61. package/docs/research/RESEARCH_INDEX.md +439 -0
  62. package/docs/research/RESEARCH_SOURCES.md +440 -0
  63. package/docs/research/RESEARCH_SUMMARY.txt +275 -0
  64. package/docs/superpowers/specs/2026-03-10-pipeline-quality-revolution-design.md +341 -0
  65. package/package.json +2 -2
  66. package/scripts/lib/adaptive-model.sh +427 -0
  67. package/scripts/lib/adaptive-timeout.sh +316 -0
  68. package/scripts/lib/audit-trail.sh +309 -0
  69. package/scripts/lib/auto-recovery.sh +471 -0
  70. package/scripts/lib/bandit-selector.sh +431 -0
  71. package/scripts/lib/bootstrap.sh +104 -2
  72. package/scripts/lib/causal-graph.sh +455 -0
  73. package/scripts/lib/compat.sh +126 -0
  74. package/scripts/lib/compound-audit.sh +337 -0
  75. package/scripts/lib/constitutional.sh +454 -0
  76. package/scripts/lib/context-budget.sh +359 -0
  77. package/scripts/lib/convergence.sh +594 -0
  78. package/scripts/lib/cost-optimizer.sh +634 -0
  79. package/scripts/lib/daemon-adaptive.sh +14 -2
  80. package/scripts/lib/daemon-dispatch.sh +106 -17
  81. package/scripts/lib/daemon-failure.sh +34 -4
  82. package/scripts/lib/daemon-patrol.sh +25 -4
  83. package/scripts/lib/daemon-poll-github.sh +361 -0
  84. package/scripts/lib/daemon-poll-health.sh +299 -0
  85. package/scripts/lib/daemon-poll.sh +27 -611
  86. package/scripts/lib/daemon-state.sh +119 -66
  87. package/scripts/lib/daemon-triage.sh +10 -0
  88. package/scripts/lib/dod-scorecard.sh +442 -0
  89. package/scripts/lib/error-actionability.sh +300 -0
  90. package/scripts/lib/formal-spec.sh +461 -0
  91. package/scripts/lib/helpers.sh +180 -5
  92. package/scripts/lib/intent-analysis.sh +409 -0
  93. package/scripts/lib/loop-convergence.sh +350 -0
  94. package/scripts/lib/loop-iteration.sh +682 -0
  95. package/scripts/lib/loop-progress.sh +48 -0
  96. package/scripts/lib/loop-restart.sh +185 -0
  97. package/scripts/lib/memory-effectiveness.sh +506 -0
  98. package/scripts/lib/mutation-executor.sh +352 -0
  99. package/scripts/lib/outcome-feedback.sh +521 -0
  100. package/scripts/lib/pipeline-cli.sh +336 -0
  101. package/scripts/lib/pipeline-commands.sh +1216 -0
  102. package/scripts/lib/pipeline-detection.sh +101 -3
  103. package/scripts/lib/pipeline-execution.sh +897 -0
  104. package/scripts/lib/pipeline-github.sh +28 -3
  105. package/scripts/lib/pipeline-intelligence-compound.sh +431 -0
  106. package/scripts/lib/pipeline-intelligence-scoring.sh +407 -0
  107. package/scripts/lib/pipeline-intelligence-skip.sh +181 -0
  108. package/scripts/lib/pipeline-intelligence.sh +104 -1138
  109. package/scripts/lib/pipeline-quality-bash-compat.sh +182 -0
  110. package/scripts/lib/pipeline-quality-checks.sh +17 -711
  111. package/scripts/lib/pipeline-quality-gates.sh +563 -0
  112. package/scripts/lib/pipeline-stages-build.sh +730 -0
  113. package/scripts/lib/pipeline-stages-delivery.sh +965 -0
  114. package/scripts/lib/pipeline-stages-intake.sh +1133 -0
  115. package/scripts/lib/pipeline-stages-monitor.sh +407 -0
  116. package/scripts/lib/pipeline-stages-review.sh +1022 -0
  117. package/scripts/lib/pipeline-stages.sh +161 -2901
  118. package/scripts/lib/pipeline-state.sh +36 -5
  119. package/scripts/lib/pipeline-util.sh +487 -0
  120. package/scripts/lib/policy-learner.sh +438 -0
  121. package/scripts/lib/process-reward.sh +493 -0
  122. package/scripts/lib/project-detect.sh +649 -0
  123. package/scripts/lib/quality-profile.sh +334 -0
  124. package/scripts/lib/recruit-commands.sh +885 -0
  125. package/scripts/lib/recruit-learning.sh +739 -0
  126. package/scripts/lib/recruit-roles.sh +648 -0
  127. package/scripts/lib/reward-aggregator.sh +458 -0
  128. package/scripts/lib/rl-optimizer.sh +362 -0
  129. package/scripts/lib/root-cause.sh +427 -0
  130. package/scripts/lib/scope-enforcement.sh +445 -0
  131. package/scripts/lib/session-restart.sh +493 -0
  132. package/scripts/lib/skill-memory.sh +300 -0
  133. package/scripts/lib/skill-registry.sh +775 -0
  134. package/scripts/lib/spec-driven.sh +476 -0
  135. package/scripts/lib/test-helpers.sh +18 -7
  136. package/scripts/lib/test-holdout.sh +429 -0
  137. package/scripts/lib/test-optimizer.sh +511 -0
  138. package/scripts/shipwright-file-suggest.sh +45 -0
  139. package/scripts/skills/adversarial-quality.md +61 -0
  140. package/scripts/skills/api-design.md +44 -0
  141. package/scripts/skills/architecture-design.md +50 -0
  142. package/scripts/skills/brainstorming.md +43 -0
  143. package/scripts/skills/data-pipeline.md +44 -0
  144. package/scripts/skills/deploy-safety.md +64 -0
  145. package/scripts/skills/documentation.md +38 -0
  146. package/scripts/skills/frontend-design.md +45 -0
  147. package/scripts/skills/generated/.gitkeep +0 -0
  148. package/scripts/skills/generated/_refinements/.gitkeep +0 -0
  149. package/scripts/skills/generated/_refinements/adversarial-quality.patch.md +3 -0
  150. package/scripts/skills/generated/_refinements/architecture-design.patch.md +3 -0
  151. package/scripts/skills/generated/_refinements/brainstorming.patch.md +3 -0
  152. package/scripts/skills/generated/cli-version-management.md +29 -0
  153. package/scripts/skills/generated/collection-system-validation.md +99 -0
  154. package/scripts/skills/generated/large-scale-c-refactoring-coordination.md +97 -0
  155. package/scripts/skills/generated/pattern-matching-similarity-scoring.md +195 -0
  156. package/scripts/skills/generated/test-parallelization-detection.md +65 -0
  157. package/scripts/skills/observability.md +79 -0
  158. package/scripts/skills/performance.md +48 -0
  159. package/scripts/skills/pr-quality.md +49 -0
  160. package/scripts/skills/product-thinking.md +43 -0
  161. package/scripts/skills/security-audit.md +49 -0
  162. package/scripts/skills/systematic-debugging.md +40 -0
  163. package/scripts/skills/testing-strategy.md +47 -0
  164. package/scripts/skills/two-stage-review.md +52 -0
  165. package/scripts/skills/validation-thoroughness.md +55 -0
  166. package/scripts/sw +9 -3
  167. package/scripts/sw-activity.sh +9 -8
  168. package/scripts/sw-adaptive.sh +8 -7
  169. package/scripts/sw-adversarial.sh +2 -1
  170. package/scripts/sw-architecture-enforcer.sh +3 -1
  171. package/scripts/sw-auth.sh +12 -2
  172. package/scripts/sw-autonomous.sh +5 -1
  173. package/scripts/sw-changelog.sh +4 -1
  174. package/scripts/sw-checkpoint.sh +2 -1
  175. package/scripts/sw-ci.sh +15 -6
  176. package/scripts/sw-cleanup.sh +4 -26
  177. package/scripts/sw-code-review.sh +45 -20
  178. package/scripts/sw-connect.sh +2 -1
  179. package/scripts/sw-context.sh +2 -1
  180. package/scripts/sw-cost.sh +107 -5
  181. package/scripts/sw-daemon.sh +71 -11
  182. package/scripts/sw-dashboard.sh +3 -1
  183. package/scripts/sw-db.sh +71 -20
  184. package/scripts/sw-decide.sh +8 -2
  185. package/scripts/sw-decompose.sh +360 -17
  186. package/scripts/sw-deps.sh +4 -1
  187. package/scripts/sw-developer-simulation.sh +4 -1
  188. package/scripts/sw-discovery.sh +378 -5
  189. package/scripts/sw-doc-fleet.sh +4 -1
  190. package/scripts/sw-docs-agent.sh +3 -1
  191. package/scripts/sw-docs.sh +2 -1
  192. package/scripts/sw-doctor.sh +453 -2
  193. package/scripts/sw-dora.sh +4 -1
  194. package/scripts/sw-durable.sh +12 -7
  195. package/scripts/sw-e2e-orchestrator.sh +17 -16
  196. package/scripts/sw-eventbus.sh +13 -4
  197. package/scripts/sw-evidence.sh +364 -12
  198. package/scripts/sw-feedback.sh +550 -9
  199. package/scripts/sw-fix.sh +20 -1
  200. package/scripts/sw-fleet-discover.sh +6 -2
  201. package/scripts/sw-fleet-viz.sh +9 -4
  202. package/scripts/sw-fleet.sh +5 -1
  203. package/scripts/sw-github-app.sh +18 -4
  204. package/scripts/sw-github-checks.sh +3 -2
  205. package/scripts/sw-github-deploy.sh +3 -2
  206. package/scripts/sw-github-graphql.sh +18 -7
  207. package/scripts/sw-guild.sh +5 -1
  208. package/scripts/sw-heartbeat.sh +5 -30
  209. package/scripts/sw-hello.sh +67 -0
  210. package/scripts/sw-hygiene.sh +10 -3
  211. package/scripts/sw-incident.sh +273 -5
  212. package/scripts/sw-init.sh +18 -2
  213. package/scripts/sw-instrument.sh +10 -2
  214. package/scripts/sw-intelligence.sh +44 -7
  215. package/scripts/sw-jira.sh +5 -1
  216. package/scripts/sw-launchd.sh +2 -1
  217. package/scripts/sw-linear.sh +4 -1
  218. package/scripts/sw-logs.sh +4 -1
  219. package/scripts/sw-loop.sh +436 -1076
  220. package/scripts/sw-memory.sh +357 -3
  221. package/scripts/sw-mission-control.sh +6 -1
  222. package/scripts/sw-model-router.sh +483 -27
  223. package/scripts/sw-otel.sh +15 -4
  224. package/scripts/sw-oversight.sh +14 -5
  225. package/scripts/sw-patrol-meta.sh +334 -0
  226. package/scripts/sw-pipeline-composer.sh +7 -1
  227. package/scripts/sw-pipeline-vitals.sh +12 -6
  228. package/scripts/sw-pipeline.sh +54 -2653
  229. package/scripts/sw-pm.sh +16 -8
  230. package/scripts/sw-pr-lifecycle.sh +2 -1
  231. package/scripts/sw-predictive.sh +17 -5
  232. package/scripts/sw-prep.sh +185 -2
  233. package/scripts/sw-ps.sh +5 -25
  234. package/scripts/sw-public-dashboard.sh +17 -4
  235. package/scripts/sw-quality.sh +14 -6
  236. package/scripts/sw-reaper.sh +8 -25
  237. package/scripts/sw-recruit.sh +156 -2303
  238. package/scripts/sw-regression.sh +19 -12
  239. package/scripts/sw-release-manager.sh +3 -1
  240. package/scripts/sw-release.sh +4 -1
  241. package/scripts/sw-remote.sh +3 -1
  242. package/scripts/sw-replay.sh +7 -1
  243. package/scripts/sw-retro.sh +158 -1
  244. package/scripts/sw-review-rerun.sh +3 -1
  245. package/scripts/sw-scale.sh +14 -5
  246. package/scripts/sw-security-audit.sh +6 -1
  247. package/scripts/sw-self-optimize.sh +173 -6
  248. package/scripts/sw-session.sh +9 -3
  249. package/scripts/sw-setup.sh +3 -1
  250. package/scripts/sw-stall-detector.sh +406 -0
  251. package/scripts/sw-standup.sh +15 -7
  252. package/scripts/sw-status.sh +3 -1
  253. package/scripts/sw-strategic.sh +14 -6
  254. package/scripts/sw-stream.sh +13 -4
  255. package/scripts/sw-swarm.sh +20 -7
  256. package/scripts/sw-team-stages.sh +13 -6
  257. package/scripts/sw-templates.sh +7 -31
  258. package/scripts/sw-testgen.sh +17 -6
  259. package/scripts/sw-tmux-pipeline.sh +4 -1
  260. package/scripts/sw-tmux-role-color.sh +2 -0
  261. package/scripts/sw-tmux-status.sh +1 -1
  262. package/scripts/sw-tmux.sh +37 -1
  263. package/scripts/sw-trace.sh +3 -1
  264. package/scripts/sw-tracker-github.sh +3 -0
  265. package/scripts/sw-tracker-jira.sh +3 -0
  266. package/scripts/sw-tracker-linear.sh +3 -0
  267. package/scripts/sw-tracker.sh +3 -1
  268. package/scripts/sw-triage.sh +3 -2
  269. package/scripts/sw-upgrade.sh +3 -1
  270. package/scripts/sw-ux.sh +5 -2
  271. package/scripts/sw-webhook.sh +5 -2
  272. package/scripts/sw-widgets.sh +9 -4
  273. package/scripts/sw-worktree.sh +15 -3
  274. package/scripts/test-skill-injection.sh +1233 -0
  275. package/templates/pipelines/autonomous.json +27 -3
  276. package/templates/pipelines/cost-aware.json +34 -8
  277. package/templates/pipelines/deployed.json +12 -0
  278. package/templates/pipelines/enterprise.json +12 -0
  279. package/templates/pipelines/fast.json +6 -0
  280. package/templates/pipelines/full.json +27 -3
  281. package/templates/pipelines/hotfix.json +6 -0
  282. package/templates/pipelines/standard.json +12 -0
  283. package/templates/pipelines/tdd.json +12 -0
@@ -0,0 +1,203 @@
1
+ # Skipper Kernel Integration Design — Hand-as-Toolbox
2
+
3
+ **Date:** 2026-03-01
4
+ **Status:** Approved
5
+ **Approach:** A — Hand-as-Toolbox (bundled Hand + custom Rust tools)
6
+
7
+ ## Context
8
+
9
+ The `skipper-shipwright` Rust crate (9 modules, 356 tests, zero clippy warnings) implements Shipwright's pipeline engine, decision engine, memory, fleet management, and intelligence layer. It needs to be wired into the Skipper kernel as a first-class Hand so that:
10
+
11
+ - Shipwright activates via `POST /api/hands/shipwright/activate`
12
+ - The Hand agent calls custom tools that delegate to the Rust crate
13
+ - Pipeline state, failure patterns, and decisions persist via kernel memory
14
+ - Events flow through the kernel event bus
15
+ - The whole system is proven working end-to-end
16
+
17
+ ## Architecture
18
+
19
+ ```
20
+ User / API
21
+
22
+
23
+ Skipper Kernel
24
+
25
+ ├── HandRegistry.activate("shipwright")
26
+ │ │
27
+ │ ▼
28
+ │ AgentManifest (from HAND.toml)
29
+ │ │
30
+ │ ▼
31
+ │ spawn_agent() → Shipwright Agent
32
+ │ │
33
+ │ ▼
34
+ │ Agent Loop (LLM ↔ Tools)
35
+ │ │
36
+ │ ▼
37
+ │ tool_runner::execute_tool()
38
+ │ │
39
+ │ ├── "shipwright_pipeline_start" → skipper_shipwright::tools::pipeline_start()
40
+ │ ├── "shipwright_pipeline_status" → skipper_shipwright::tools::pipeline_status()
41
+ │ ├── "shipwright_stage_advance" → skipper_shipwright::tools::stage_advance()
42
+ │ ├── "shipwright_decision_run" → skipper_shipwright::tools::decision_run()
43
+ │ ├── "shipwright_memory_search" → skipper_shipwright::tools::memory_search()
44
+ │ ├── "shipwright_memory_store" → skipper_shipwright::tools::memory_store_pattern()
45
+ │ ├── "shipwright_fleet_status" → skipper_shipwright::tools::fleet_status()
46
+ │ └── "shipwright_intelligence" → skipper_shipwright::tools::intelligence()
47
+ │ │
48
+ │ ▼
49
+ │ skipper-shipwright crate
50
+ │ (Pipeline, Decision, Memory, Fleet, Intelligence)
51
+ │ │
52
+ │ ▼
53
+ │ KernelHandle (memory_store, task_post, publish_event, spawn_agent)
54
+
55
+ └── MemorySubstrate (SQLite + vector search)
56
+ ```
57
+
58
+ ## Custom Tools
59
+
60
+ 8 tools registered as built-in (not MCP/skill) because Shipwright is a first-class bundled Hand:
61
+
62
+ | Tool Name | Purpose | Key Inputs |
63
+ | ---------------------------- | ------------------------------- | ----------------------------------------------- |
64
+ | `shipwright_pipeline_start` | Start a delivery pipeline | `goal` or `issue_number`, `template` |
65
+ | `shipwright_pipeline_status` | Get current pipeline state | `pipeline_id` (optional) |
66
+ | `shipwright_stage_advance` | Advance stage or report failure | `pipeline_id`, `outcome` |
67
+ | `shipwright_decision_run` | Run autonomous decision cycle | `dry_run`, `signal_filter` |
68
+ | `shipwright_memory_search` | Search failure patterns | `query`, `repo`, `limit` |
69
+ | `shipwright_memory_store` | Record a failure pattern | `error_class`, `signature`, `root_cause`, `fix` |
70
+ | `shipwright_fleet_status` | Fleet overview across repos | (none) |
71
+ | `shipwright_intelligence` | Run intelligence analysis | `repo_path`, `analysis_type` |
72
+
73
+ ### Tool Implementation Pattern
74
+
75
+ ```rust
76
+ // skipper-shipwright/src/tools.rs
77
+
78
+ pub fn tool_definitions() -> Vec<ToolDefinition> { /* 8 definitions */ }
79
+
80
+ pub async fn pipeline_start(
81
+ input: &serde_json::Value,
82
+ kernel: Option<&Arc<dyn KernelHandle>>,
83
+ ) -> ToolResult { /* ... */ }
84
+ ```
85
+
86
+ ### Dispatch Wiring
87
+
88
+ In `skipper-runtime/src/tool_runner.rs`:
89
+
90
+ ```rust
91
+ // In execute_tool() match block:
92
+ name if name.starts_with("shipwright_") => {
93
+ skipper_shipwright::tools::dispatch(tool_use_id, name, input, kernel).await
94
+ }
95
+
96
+ // In builtin_tool_definitions():
97
+ defs.extend(skipper_shipwright::tools::tool_definitions());
98
+ ```
99
+
100
+ ## HAND.toml
101
+
102
+ ```toml
103
+ id = "shipwright"
104
+ name = "Shipwright Hand"
105
+ description = "Autonomous delivery pipeline — turns issues into tested, reviewed PRs"
106
+ category = "engineering"
107
+ icon = "⚓"
108
+
109
+ tools = [
110
+ "shipwright_pipeline_start", "shipwright_pipeline_status",
111
+ "shipwright_stage_advance", "shipwright_decision_run",
112
+ "shipwright_memory_search", "shipwright_memory_store",
113
+ "shipwright_fleet_status", "shipwright_intelligence",
114
+ "shell_exec", "file_read", "file_write", "file_list",
115
+ "web_fetch", "memory_store", "memory_recall",
116
+ "knowledge_add_entity", "knowledge_add_relation",
117
+ "event_publish", "agent_spawn", "agent_send", "schedule_create",
118
+ ]
119
+
120
+ [[settings]]
121
+ key = "pipeline_template"
122
+ label = "Default Pipeline Template"
123
+ type = "select"
124
+ options = ["fast", "standard", "full", "hotfix", "autonomous", "cost-aware"]
125
+ default = "standard"
126
+
127
+ [[settings]]
128
+ key = "max_parallel"
129
+ label = "Max Parallel Pipelines"
130
+ type = "number"
131
+ default = "2"
132
+
133
+ [[settings]]
134
+ key = "auto_decide"
135
+ label = "Autonomous Decision Engine"
136
+ type = "boolean"
137
+ default = "false"
138
+
139
+ [agent]
140
+ name = "shipwright-hand"
141
+ module = "builtin:chat"
142
+ provider = "default"
143
+ model = "default"
144
+ max_iterations = 200
145
+ system_prompt = """You are Shipwright..."""
146
+
147
+ [dashboard]
148
+ title = "Shipwright Pipeline"
149
+
150
+ [[dashboard.metrics]]
151
+ key = "active_pipelines"
152
+ label = "Active Pipelines"
153
+ type = "gauge"
154
+
155
+ [[dashboard.metrics]]
156
+ key = "stages_completed"
157
+ label = "Stages Completed"
158
+ type = "counter"
159
+
160
+ [[dashboard.metrics]]
161
+ key = "success_rate"
162
+ label = "Success Rate"
163
+ type = "percentage"
164
+ ```
165
+
166
+ ## Memory Wiring
167
+
168
+ Adapter pattern — `KernelMemoryAdapter` wraps `KernelHandle` for the shipwright crate:
169
+
170
+ - **With kernel** (production): delegates to `KernelHandle::memory_store` / `memory_recall` (persistent SQLite + vector search)
171
+ - **Without kernel** (tests/standalone): uses existing in-memory `ShipwrightMemory`
172
+
173
+ Stored data:
174
+
175
+ - Pipeline state: `pipeline:{id}`
176
+ - Failure patterns: `failure:{repo}:{error_class}`
177
+ - Decision logs: `decision:{date}:{id}`
178
+ - Scoring weights: `weights:current`
179
+
180
+ ## Files to Create/Modify
181
+
182
+ | File | Action | Purpose |
183
+ | --------------------------------------------------------- | ------ | ---------------------------------------- |
184
+ | `crates/skipper-hands/bundled/shipwright/HAND.toml` | Create | Hand definition |
185
+ | `crates/skipper-hands/bundled/shipwright/SKILL.md` | Create | Domain knowledge (from fork) |
186
+ | `crates/skipper-shipwright/src/tools.rs` | Create | 8 tool handlers + definitions + dispatch |
187
+ | `crates/skipper-shipwright/src/memory/kernel_adapter.rs` | Create | KernelHandle memory bridge |
188
+ | `crates/skipper-shipwright/src/lib.rs` | Modify | Export tools module |
189
+ | `crates/skipper-hands/src/bundled.rs` | Modify | Register Shipwright in bundled_hands() |
190
+ | `crates/skipper-runtime/src/tool_runner.rs` | Modify | Wire dispatch + definitions |
191
+ | `crates/skipper-runtime/Cargo.toml` | Modify | Add skipper-shipwright dep |
192
+ | `crates/skipper-shipwright/Cargo.toml` | Modify | Add skipper-types dep |
193
+ | `crates/skipper-shipwright/tests/tool_tests.rs` | Create | Tool handler unit tests |
194
+
195
+ ## E2E Verification
196
+
197
+ 1. `cargo build --workspace --lib` — compiles
198
+ 2. `cargo test --workspace` — all tests pass
199
+ 3. `cargo clippy --workspace --all-targets -- -D warnings` — zero warnings
200
+ 4. Hand activation: `POST /api/hands/shipwright/activate` spawns agent
201
+ 5. Pipeline via agent: send message, agent calls `shipwright_pipeline_start`
202
+ 6. Memory persistence: store failure pattern, search it back
203
+ 7. Fleet status: `shipwright_fleet_status` returns data
@@ -0,0 +1,272 @@
1
+ # Unified Platform Strategy — Shipwright + Skipper
2
+
3
+ March 2026
4
+
5
+ ---
6
+
7
+ ## Vision
8
+
9
+ Skipper subsumes Shipwright. Long-term, Skipper's Rust kernel becomes the execution engine. Shipwright bash scripts become the reference implementation that Skipper agents call. Pipeline, daemon, fleet, memory all run through Skipper eventually.
10
+
11
+ ## Strategy: Parallel Streams
12
+
13
+ Three concurrent workstreams, each owning distinct files to avoid merge conflicts:
14
+
15
+ | Stream | Scope | File Ownership |
16
+ | ------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
17
+ | 1. Clean Architecture | Skipper Rust refactoring | `crates/skipper-api/src/`, `skipper-kernel/src/`, `skipper-cli/src/`, `skipper-types/src/`, `skipper-runtime/src/` |
18
+ | 2. Deep Integration | Shipwright → Skipper wiring | `crates/skipper-shipwright/`, `crates/skipper-hands/bundled/shipwright/`, new route files only |
19
+ | 3. Capabilities + Cleanup | Claude Code, bash cleanup, brand | `.claude/`, `scripts/`, `dashboard/`, `website/`, docs |
20
+
21
+ Each stream runs in its own worktree. Merge order: Stream 1 first (foundation), then Stream 2 (integration into clean modules), then Stream 3 (no Rust conflicts).
22
+
23
+ ---
24
+
25
+ ## Stream 1: Clean Architecture
26
+
27
+ ### Problem
28
+
29
+ Five god-files concentrate too much logic:
30
+
31
+ | File | Lines | Issue |
32
+ | ---------------- | ----- | ------------------------------------ |
33
+ | `routes.rs` | 8,983 | Every API endpoint in one file |
34
+ | `main.rs` (CLI) | 5,671 | Every CLI command in one file |
35
+ | `kernel.rs` | 5,177 | All kernel operations in one file |
36
+ | `tool_runner.rs` | 3,625 | All tool implementations in one file |
37
+ | `config.rs` | 3,579 | All config types in one file |
38
+
39
+ ### Solution
40
+
41
+ Decompose each into domain-oriented module trees.
42
+
43
+ #### routes.rs → routes/
44
+
45
+ ```
46
+ crates/skipper-api/src/routes/
47
+ ├── mod.rs (~100 lines — router builder, re-exports)
48
+ ├── agents.rs (~1,200 lines — CRUD, messaging, lifecycle)
49
+ ├── budget.rs (~400 lines — budget, cost, per-agent spend)
50
+ ├── channels.rs (~1,500 lines — channel CRUD, templates, bridge)
51
+ ├── hands.rs (~800 lines — hand registry, install, config)
52
+ ├── network.rs (~600 lines — OFP peers, A2A, federation)
53
+ ├── security.rs (~500 lines — security dashboard, audit)
54
+ ├── settings.rs (~400 lines — config read/write)
55
+ ├── triggers.rs (~600 lines — trigger CRUD, webhooks)
56
+ ├── skills.rs (~400 lines — skill registry)
57
+ ├── static_files.rs (~200 lines — HTML/asset serving)
58
+ └── health.rs (~100 lines — health, status)
59
+ ```
60
+
61
+ #### kernel.rs → kernel/
62
+
63
+ ```
64
+ crates/skipper-kernel/src/kernel/
65
+ ├── mod.rs (~500 lines — KernelBuilder, startup, shutdown)
66
+ ├── agents.rs (~1,200 lines — spawn, kill, list, lifecycle)
67
+ ├── workflows.rs (~1,000 lines — workflow engine, triggers)
68
+ ├── channels.rs (~800 lines — channel management)
69
+ ├── config.rs (~600 lines — runtime config management)
70
+ └── budget.rs (~400 lines — budget tracking, enforcement)
71
+ ```
72
+
73
+ #### main.rs → commands/
74
+
75
+ ```
76
+ crates/skipper-cli/src/
77
+ ├── main.rs (~200 lines — arg parsing, dispatcher)
78
+ ├── commands/
79
+ │ ├── mod.rs (~50 lines — re-exports)
80
+ │ ├── agent.rs (~800 lines — agent lifecycle)
81
+ │ ├── hand.rs (~600 lines — hand management)
82
+ │ ├── skill.rs (~400 lines — skill management)
83
+ │ ├── config.rs (~500 lines — config management)
84
+ │ ├── channel.rs (~400 lines — channel management)
85
+ │ ├── auth.rs (~300 lines — auth/login)
86
+ │ └── daemon.rs (~400 lines — daemon start/stop)
87
+ ```
88
+
89
+ #### tool_runner.rs → tools/
90
+
91
+ ```
92
+ crates/skipper-runtime/src/tools/
93
+ ├── mod.rs (~300 lines — dispatcher, tool definition registry)
94
+ ├── filesystem.rs (~500 lines — read, write, glob, grep)
95
+ ├── web.rs (~400 lines — web search, fetch)
96
+ ├── shell.rs (~400 lines — bash execution, sandbox)
97
+ ├── agents.rs (~300 lines — agent spawn/management)
98
+ ├── notebook.rs (~200 lines — jupyter tools)
99
+ └── shipwright.rs (~400 lines — feature-gated shipwright tools)
100
+ ```
101
+
102
+ #### config.rs → config/
103
+
104
+ ```
105
+ crates/skipper-types/src/config/
106
+ ├── mod.rs (~500 lines — core KernelConfig, top-level types)
107
+ ├── channels.rs (~1,000 lines — channel configs per provider)
108
+ ├── models.rs (~800 lines — model/provider configs)
109
+ ├── budget.rs (~400 lines — budget/cost config)
110
+ └── display.rs (~300 lines — Display impls, formatting)
111
+ ```
112
+
113
+ ### Principles
114
+
115
+ - **Thin routes:** Max ~20 lines per handler. Extract, validate, delegate, format.
116
+ - **Domain grouping:** Group by domain (agents, channels, budget), not by HTTP verb.
117
+ - **Error types:** One `ApiError` enum with `impl IntoResponse`. No `.unwrap()` in handlers.
118
+ - **No behavior changes:** Pure structural refactoring. Every test must continue to pass.
119
+
120
+ ### Verification
121
+
122
+ After each decomposition:
123
+
124
+ ```bash
125
+ cargo build --workspace --lib
126
+ cargo test --workspace
127
+ cargo clippy --workspace --all-targets -- -D warnings
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Stream 2: Deep Integration
133
+
134
+ ### Current State
135
+
136
+ The `skipper-shipwright` crate has 8 tools that manage pipeline state in-memory via `ShipwrightState`. The real Shipwright capabilities (bash scripts, daemon, memory, fleet) are not wired.
137
+
138
+ ### Target State
139
+
140
+ Skipper agents can do everything Shipwright CLI can, natively.
141
+
142
+ ### Tool Enhancements
143
+
144
+ | Tool | Current | Target |
145
+ | -------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------- |
146
+ | `shipwright_pipeline_start` | In-memory state | Spawns `sw-pipeline.sh` subprocess, streams stage progress, writes events to Skipper event store |
147
+ | `shipwright_pipeline_status` | In-memory read | Reads `.claude/pipeline-state.md` + subprocess status. Stage timing, iteration, test results |
148
+ | `shipwright_decision` | Stub scoring | Calls `sw-decide.sh` for template selection, risk scoring. Falls back to in-memory if unavailable |
149
+ | `shipwright_memory_store/recall` | In-memory HashMap | Reads/writes `~/.shipwright/memory/`. Syncs with Skipper memory store |
150
+ | `shipwright_fleet_status` | Stub | Reads `~/.shipwright/fleet-config.json`, daemon state, worker pool |
151
+ | `shipwright_intelligence` | Stub | Calls `sw-intelligence.sh analyze` with caching |
152
+ | `shipwright_cost` | Stub | Reads `~/.shipwright/costs.json` and `budget.json` |
153
+ | `shipwright_daemon` | Stub | Start/stop/configure daemon. Read daemon metrics |
154
+
155
+ ### New Files
156
+
157
+ ```
158
+ crates/skipper-shipwright/src/subprocess.rs (~300 lines — spawn/monitor bash scripts)
159
+ crates/skipper-shipwright/src/memory_bridge.rs (~200 lines — bridge to real memory files)
160
+ crates/skipper-shipwright/src/fleet_bridge.rs (~200 lines — read fleet/daemon state)
161
+ crates/skipper-api/src/routes/pipelines.rs (~400 lines — pipeline status API)
162
+ ```
163
+
164
+ ### Dashboard Integration
165
+
166
+ - **Pipelines tab:** Active/completed pipelines with stage progress bars
167
+ - **Fleet view:** Multi-repo fleet status, worker pool, per-repo queue depth
168
+ - **Unified memory:** Shipwright memory readable through Skipper dashboard
169
+
170
+ ---
171
+
172
+ ## Stream 3: Claude Code Capabilities + Bash Cleanup
173
+
174
+ ### Bash Cleanup
175
+
176
+ #### Decompose pipeline-stages.sh (3,225 lines)
177
+
178
+ ```
179
+ scripts/lib/
180
+ ├── pipeline-stages-intake.sh (~400 lines — intake, plan, design)
181
+ ├── pipeline-stages-build.sh (~800 lines — build, test)
182
+ ├── pipeline-stages-review.sh (~600 lines — review, compound_quality)
183
+ ├── pipeline-stages-delivery.sh (~500 lines — pr, merge, deploy)
184
+ ├── pipeline-stages-monitor.sh (~400 lines — validate, monitor)
185
+ └── pipeline-stages.sh (~100 lines — sources sub-files, exports stage list)
186
+ ```
187
+
188
+ #### Adopt shared test harness
189
+
190
+ Update 108 test scripts to `source "$SCRIPT_DIR/lib/test-helpers.sh"` instead of defining own helper functions. Estimated 15-20% code reduction.
191
+
192
+ #### Decompose sw-loop.sh (3,366 lines)
193
+
194
+ ```
195
+ scripts/lib/
196
+ ├── loop-iteration.sh (~600 lines — single iteration logic)
197
+ ├── loop-convergence.sh (~400 lines — convergence detection)
198
+ ├── loop-restart.sh (~300 lines — session restart logic)
199
+ ├── loop-progress.sh (~200 lines — progress.md management)
200
+ ```
201
+
202
+ ### Claude Code Capabilities
203
+
204
+ #### 1. Skipper MCP Server
205
+
206
+ Register Skipper's API as an MCP server for Claude Code:
207
+
208
+ ```json
209
+ {
210
+ "mcpServers": {
211
+ "skipper": {
212
+ "command": "curl",
213
+ "args": ["-s", "http://127.0.0.1:4200/mcp"],
214
+ "description": "Skipper Agent OS"
215
+ }
216
+ }
217
+ }
218
+ ```
219
+
220
+ Tools: `skipper_spawn_agent`, `skipper_list_agents`, `skipper_send_message`, `skipper_pipeline_status`, `skipper_fleet_status`.
221
+
222
+ #### 2. New Skills
223
+
224
+ ```
225
+ .claude/skills/
226
+ ├── pipeline-monitor.md — Check pipeline progress, surface blockers
227
+ ├── fleet-overview.md — Multi-repo fleet status
228
+ ├── agent-debug.md — Debug a stuck/failing Skipper agent
229
+ ├── cost-report.md — Token usage and cost analysis
230
+ ```
231
+
232
+ #### 3. Enhanced Hooks
233
+
234
+ Add a hook that detects Skipper agent crashes and auto-captures diagnostics to memory.
235
+
236
+ #### 4. Brand Implementation
237
+
238
+ Execute the Refined Depths plan (`docs/plans/2026-03-01-refined-depths-implementation.md`). Touches only dashboard CSS, HTML, docs.
239
+
240
+ ---
241
+
242
+ ## Merge Strategy
243
+
244
+ 1. **Stream 1 merges first** — Pure structural refactoring, no behavior changes
245
+ 2. **Stream 2 merges second** — Integration code lands in the newly clean module structure
246
+ 3. **Stream 3 merges last** — No Rust file conflicts, only bash/CSS/docs
247
+
248
+ If streams finish at different times, merge as they complete in this priority order. Stream 3 can merge independently at any time since it touches no Rust.
249
+
250
+ ---
251
+
252
+ ## Success Criteria
253
+
254
+ - All 5 god-files decomposed to <1,000 lines per module
255
+ - All 2,190+ existing tests pass
256
+ - Zero clippy warnings
257
+ - 8 Shipwright tools call real scripts (not stubs)
258
+ - Pipeline status visible in Skipper dashboard
259
+ - Shared test harness adopted by >90% of test scripts
260
+ - MCP server functional for Claude Code integration
261
+ - Refined Depths brand applied to both dashboards
262
+
263
+ ---
264
+
265
+ ## Risk Mitigations
266
+
267
+ | Risk | Mitigation |
268
+ | ------------------------------------------------------- | ----------------------------------------------------------------------------------- |
269
+ | Merge conflicts between streams | Strict file ownership boundaries. No stream touches another's files. |
270
+ | Decomposition breaks behavior | Pure structural moves, no logic changes. Run full test suite after every file move. |
271
+ | Integration subprocess spawning fails on some platforms | Graceful fallback to in-memory stubs when bash unavailable |
272
+ | Large PR size for Stream 1 | Decompose one god-file per PR (5 PRs total) |
@@ -0,0 +1,189 @@
1
+ # Claude Code Feature Integration into Shipwright
2
+
3
+ **Date:** 2026-03-07
4
+ **Status:** Approved
5
+ **Goal:** Integrate all new Claude Code features into Shipwright infrastructure and documentation
6
+
7
+ ## Problem
8
+
9
+ Shipwright documents many Claude Code features in its global CLAUDE.md but doesn't actually leverage them in its pipeline, daemon, or agent infrastructure. Key gaps include effort-level routing, fallback models, structured output schemas, HTTP/prompt/agent hooks, lifecycle hooks, and MCP configuration.
10
+
11
+ ## Design
12
+
13
+ ### 1. CLI Flags Integration
14
+
15
+ #### `--effort-level` (low/medium/high)
16
+
17
+ Add `--effort` flag to `sw-loop.sh`, `sw-pipeline.sh`, and `sw-fix.sh`.
18
+
19
+ Default routing by stage:
20
+
21
+ - `low`: intake, formatting, audit/haiku agents
22
+ - `medium`: standard builds, test execution
23
+ - `high`: design, review, compound_quality
24
+
25
+ Extend `select_adaptive_model()` to return effort level alongside model. The intelligence engine and self-optimizer can learn optimal effort levels per stage.
26
+
27
+ Pass through to Claude CLI as `--effort-level` on all `claude -p` invocations.
28
+
29
+ #### `--fallback-model`
30
+
31
+ Add `--fallback-model` flag to `sw-loop.sh` and `sw-pipeline.sh`, default `sonnet`.
32
+
33
+ Every `claude -p` invocation gets `--fallback-model` so agents auto-recover from rate limits without pipeline failure.
34
+
35
+ New `fallback_model` field in `daemon-config.json`, injected into spawned pipelines.
36
+
37
+ #### `--json-schema` for Structured Output
38
+
39
+ Create `schemas/` directory with reusable JSON Schema files:
40
+
41
+ | Schema | Purpose |
42
+ | ----------------------- | ------------------------------ |
43
+ | `iteration-result.json` | Loop iteration progress report |
44
+ | `audit-result.json` | Audit agent pass/fail/findings |
45
+ | `quality-gate.json` | Quality gate evaluation result |
46
+ | `stage-handoff.json` | Pipeline stage context handoff |
47
+
48
+ Use `--json-schema <file>` on Claude CLI invocations where structured output replaces free-text parsing (audit agents, quality gates, loop progress detection).
49
+
50
+ ### 2. Hook System Expansion
51
+
52
+ #### HTTP Hooks
53
+
54
+ Register HTTP hooks in `settings.json` that POST pipeline events to:
55
+
56
+ - Dashboard server (`http://localhost:PORT/api/events`) when running
57
+ - Configurable webhook URLs from `daemon-config.json` -> `webhooks[]`
58
+
59
+ Format: Same JSON payload as `events.jsonl`, sent as POST body.
60
+
61
+ Support `headers` with env var interpolation:
62
+
63
+ ```json
64
+ {
65
+ "type": "http",
66
+ "url": "https://hooks.slack.com/services/...",
67
+ "headers": {
68
+ "Authorization": "Bearer $SLACK_TOKEN"
69
+ }
70
+ }
71
+ ```
72
+
73
+ #### Prompt Hooks (LLM-evaluated gates)
74
+
75
+ Add prompt hooks for quality-sensitive events:
76
+
77
+ - `PostToolUse` on `Bash`: "Did the tests pass based on this output?"
78
+ - PR stage: "Is this PR description complete and accurate?"
79
+ - Uses Haiku by default (cheap, fast)
80
+
81
+ #### Agent Hooks (multi-turn verification)
82
+
83
+ For `compound_quality` stage: agent hook with tool access verifies codebase state matches claimed changes. Configure with `maxTurns: 10`, `timeout: 60`.
84
+
85
+ For deploy stage: agent hook runs smoke tests and verifies deployment.
86
+
87
+ #### Lifecycle Hooks
88
+
89
+ | Hook | Use |
90
+ | ------------------------------------------- | ---------------------------------------------------------------------------- |
91
+ | `WorktreeCreate` | Auto-copy `.claude/settings.json` and `daemon-config.json` into new worktree |
92
+ | `WorktreeRemove` | Clean up heartbeat files and stale state for removed worktree agents |
93
+ | `InstructionsLoaded` (matcher: `"compact"`) | Reload project rules after auto-compaction |
94
+ | `ConfigChange` | Daemon reacts to config changes without restart |
95
+
96
+ #### PreToolUse Input Modification
97
+
98
+ - Auto-inject `set -euo pipefail` reminder into Bash tool commands targeting `.sh` files (existing behavior, now also modifies input)
99
+ - Block `git push --no-verify` via exit code 2
100
+
101
+ ### 3. Environment & MCP Configuration
102
+
103
+ #### New env vars in settings.json
104
+
105
+ ```json
106
+ {
107
+ "env": {
108
+ "ENABLE_TOOL_SEARCH": "auto",
109
+ "MAX_MCP_OUTPUT_TOKENS": "50000",
110
+ "CLAUDE_CODE_EFFORT_LEVEL": "medium"
111
+ }
112
+ }
113
+ ```
114
+
115
+ `sw-init.sh` and `sw-prep.sh` set these during project setup. Pipeline stages override effort level per-stage via env.
116
+
117
+ #### Managed MCP (managed-mcp.json)
118
+
119
+ Generate template during `shipwright prep`:
120
+
121
+ - Allow project-relevant MCP servers
122
+ - Deny potentially dangerous servers in pipeline agents
123
+ - Configure `allowedMcpServers` / `deniedMcpServers` patterns
124
+ - Useful for fleet/daemon mode where agents shouldn't have unrestricted MCP access
125
+
126
+ #### File Suggestion (fileSuggestion)
127
+
128
+ Create `scripts/shipwright-file-suggest.sh` for custom `@` autocomplete:
129
+
130
+ - `pipeline-state.md`, `daemon-config.json`, `fleet-config.json`
131
+ - Agent definitions (`.claude/agents/*.md`)
132
+ - Loop state, schemas, pipeline artifacts
133
+
134
+ Register via `"fileSuggestion": "./scripts/shipwright-file-suggest.sh"` in settings.
135
+
136
+ ### 4. Documentation Updates
137
+
138
+ - `.claude/CLAUDE.md`: New sections for CLI flags, expanded hooks, MCP config, env vars
139
+ - `sw-init.sh`: Setup output mentions new features
140
+ - `sw-doctor.sh`: Validate new settings (effort level, fallback model, webhook URLs)
141
+ - `schemas/README.md`: Schema documentation
142
+
143
+ ## Implementation Order
144
+
145
+ 1. **PR 1: CLI Flags** — `--effort`, `--fallback-model`, `--json-schema` + schemas directory
146
+ 2. **PR 2: Hook System** — HTTP hooks, prompt/agent hooks, lifecycle hooks, input modification
147
+ 3. **PR 3: Environment & MCP** — env vars, managed-mcp.json, fileSuggestion
148
+ 4. **PR 4: Documentation** — CLAUDE.md updates, doctor checks, init output
149
+
150
+ ## Files Changed (by PR)
151
+
152
+ ### PR 1: CLI Flags
153
+
154
+ - `scripts/sw-loop.sh` — flag parsing, pass-through
155
+ - `scripts/sw-pipeline.sh` — per-stage effort routing
156
+ - `scripts/sw-fix.sh` — flag pass-through
157
+ - `scripts/lib/pipeline-stages-*.sh` — effort level in stage dispatch
158
+ - `scripts/lib/loop-iteration.sh` — structured output for iteration results
159
+ - New: `schemas/iteration-result.json`
160
+ - New: `schemas/audit-result.json`
161
+ - New: `schemas/quality-gate.json`
162
+ - New: `schemas/stage-handoff.json`
163
+ - `scripts/sw-loop-test.sh` — test new flags
164
+ - `scripts/sw-pipeline-test.sh` — test effort routing
165
+
166
+ ### PR 2: Hook System
167
+
168
+ - `.claude/settings.json` — register new hooks
169
+ - `scripts/sw-init.sh` — generate hook config
170
+ - `scripts/sw-prep.sh` — generate hook config
171
+ - New: `.claude/hooks/worktree-create.sh`
172
+ - New: `.claude/hooks/worktree-remove.sh`
173
+ - New: `.claude/hooks/instructions-reloaded.sh`
174
+ - New: `.claude/hooks/config-change.sh`
175
+ - `dashboard/server.ts` — accept HTTP hook POSTs on `/api/events`
176
+
177
+ ### PR 3: Environment & MCP
178
+
179
+ - `.claude/settings.json` — new env vars
180
+ - `scripts/sw-init.sh` — set env vars during setup
181
+ - `scripts/sw-prep.sh` — generate managed-mcp.json
182
+ - `scripts/sw-doctor.sh` — validate new settings
183
+ - New: `scripts/shipwright-file-suggest.sh`
184
+ - New: `.claude/managed-mcp.json` (template)
185
+
186
+ ### PR 4: Documentation
187
+
188
+ - `.claude/CLAUDE.md` — all new sections
189
+ - `README.md` — feature mentions