opencode-ship 1.1.2-rc.1 → 1.1.2-rc.4

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 (78) hide show
  1. package/CHANGELOG.md +132 -37
  2. package/README.md +2 -2
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/assets/agents/delivery-reviewer.md +1 -0
  5. package/assets/agents/delivery-verifier.md +1 -0
  6. package/assets/agents/ship-controller.md +20 -7
  7. package/assets/agents/ship-final-spec-reviewer.md +5 -3
  8. package/assets/agents/ship-final-standards-reviewer.md +5 -3
  9. package/assets/agents/ship-planner.md +1 -0
  10. package/assets/agents/ship-task-builder.md +1 -0
  11. package/assets/agents/ship-task-reviewer.md +1 -0
  12. package/assets/commands/setup-ship-workflow.md +9 -167
  13. package/assets/skills/setup-ship-workflow/SKILL.md +78 -31
  14. package/dist/cli.js +2274 -362
  15. package/dist/core.js +794 -10
  16. package/dist/plugin.js +3487 -1795
  17. package/package.json +9 -4
  18. package/tests/plugin/expected-tools.mjs +2 -2
  19. package/tests/plugin/plugin-load.test.mjs +8 -3
  20. package/assets/skills/setup-ship-workflow/issue-tracker-gitlab.md +0 -46
  21. package/assets/skills/setup-ship-workflow/issue-tracker-local.md +0 -30
  22. package/docs/adr/0001-opencode-ship-redesign.md +0 -168
  23. package/docs/release/1.0.0-execution-plan.md +0 -1063
  24. package/docs/release/1.1.1-stabilization-plan.md +0 -655
  25. package/vendor/upstreams/mattpocock/skills/engineering/code-review/SKILL.md +0 -89
  26. package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/DEEPENING.md +0 -37
  27. package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/DESIGN-IT-TWICE.md +0 -44
  28. package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/SKILL.md +0 -114
  29. package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/ADR-FORMAT.md +0 -47
  30. package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/CONTEXT-FORMAT.md +0 -60
  31. package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/SKILL.md +0 -74
  32. package/vendor/upstreams/mattpocock/skills/engineering/grill-with-docs/SKILL.md +0 -7
  33. package/vendor/upstreams/mattpocock/skills/engineering/prototype/LOGIC.md +0 -79
  34. package/vendor/upstreams/mattpocock/skills/engineering/prototype/SKILL.md +0 -26
  35. package/vendor/upstreams/mattpocock/skills/engineering/prototype/UI.md +0 -112
  36. package/vendor/upstreams/mattpocock/skills/engineering/research/SKILL.md +0 -12
  37. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/SKILL.md +0 -116
  38. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/domain.md +0 -51
  39. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
  40. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
  41. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
  42. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/triage-labels.md +0 -15
  43. package/vendor/upstreams/mattpocock/skills/engineering/to-spec/SKILL.md +0 -75
  44. package/vendor/upstreams/mattpocock/skills/engineering/to-tickets/SKILL.md +0 -105
  45. package/vendor/upstreams/mattpocock/skills/engineering/triage/AGENT-BRIEF.md +0 -207
  46. package/vendor/upstreams/mattpocock/skills/engineering/triage/OUT-OF-SCOPE.md +0 -105
  47. package/vendor/upstreams/mattpocock/skills/engineering/triage/SKILL.md +0 -112
  48. package/vendor/upstreams/mattpocock/skills/engineering/wayfinder/SKILL.md +0 -128
  49. package/vendor/upstreams/mattpocock/skills/productivity/grilling/SKILL.md +0 -12
  50. package/vendor/upstreams/mattpocock/skills/productivity/handoff/SKILL.md +0 -16
  51. package/vendor/upstreams/obra/skills/brainstorming/SKILL.md +0 -151
  52. package/vendor/upstreams/obra/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
  53. package/vendor/upstreams/obra/skills/brainstorming/visual-companion.md +0 -298
  54. package/vendor/upstreams/obra/skills/dispatching-parallel-agents/SKILL.md +0 -167
  55. package/vendor/upstreams/obra/skills/executing-plans/SKILL.md +0 -64
  56. package/vendor/upstreams/obra/skills/receiving-code-review/SKILL.md +0 -205
  57. package/vendor/upstreams/obra/skills/requesting-code-review/SKILL.md +0 -95
  58. package/vendor/upstreams/obra/skills/requesting-code-review/code-reviewer.md +0 -172
  59. package/vendor/upstreams/obra/skills/subagent-driven-development/SKILL.md +0 -503
  60. package/vendor/upstreams/obra/skills/subagent-driven-development/implementer-prompt.md +0 -142
  61. package/vendor/upstreams/obra/skills/subagent-driven-development/re-review-prompt.md +0 -106
  62. package/vendor/upstreams/obra/skills/subagent-driven-development/task-reviewer-prompt.md +0 -185
  63. package/vendor/upstreams/obra/skills/systematic-debugging/CREATION-LOG.md +0 -119
  64. package/vendor/upstreams/obra/skills/systematic-debugging/SKILL.md +0 -283
  65. package/vendor/upstreams/obra/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
  66. package/vendor/upstreams/obra/skills/systematic-debugging/condition-based-waiting.md +0 -115
  67. package/vendor/upstreams/obra/skills/systematic-debugging/defense-in-depth.md +0 -122
  68. package/vendor/upstreams/obra/skills/systematic-debugging/find-polluter.sh +0 -72
  69. package/vendor/upstreams/obra/skills/systematic-debugging/root-cause-tracing.md +0 -169
  70. package/vendor/upstreams/obra/skills/systematic-debugging/test-academic.md +0 -14
  71. package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-1.md +0 -58
  72. package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-2.md +0 -68
  73. package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-3.md +0 -69
  74. package/vendor/upstreams/obra/skills/test-driven-development/SKILL.md +0 -320
  75. package/vendor/upstreams/obra/skills/test-driven-development/writing-good-tests.md +0 -198
  76. package/vendor/upstreams/obra/skills/verification-before-completion/SKILL.md +0 -120
  77. package/vendor/upstreams/obra/skills/writing-plans/SKILL.md +0 -168
  78. package/vendor/upstreams/obra/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
package/CHANGELOG.md CHANGED
@@ -2,54 +2,149 @@
2
2
 
3
3
  All notable changes to `opencode-ship` are recorded here.
4
4
 
5
- ## 1.1.2-rc.1Complete contract correction
5
+ ## 1.1.2-rc.4Plan Mode write access
6
+
7
+ > Branch: `release/1.1.2-rc.4`.
8
+
9
+ - **Plan Mode write access for brainstorming / writing-plans products.**
10
+ The installer now owns two leaf pointers under
11
+ `agent.plan.permission` so OpenCode's Plan mode can write its
12
+ brainstorming / writing-plans / wayfinder output:
13
+
14
+ - `/agent/plan/permission/edit/docs/superpowers/**` = `allow`
15
+ - `/agent/plan/permission/edit/.git/opencode-ship/plans/**` = `allow`
16
+
17
+ The whole `/agent/plan/permission` block is still consumer-owned;
18
+ the installer only owns these two glob leaves. When the consumer
19
+ previously declared `agent.plan.permission.edit` as a scalar
20
+ string (e.g. `"deny"`), the installer promotes it to
21
+ `{ "*": <scalar>, ... }` on install and records the previous
22
+ scalar so uninstall can restore it byte-for-byte. A consumer
23
+ that explicitly sets `docs/superpowers/**: "deny"` is a
24
+ fail-closed conflict.
25
+
26
+ ## 1.1.2-rc.3 — Complete contract correction (round 2)
27
+
28
+ > Branch: `fix/1.1.2-rc.3-contract`.
29
+ > Tracker: https://github.com/Viktorxyz/opencode-ship/issues/56.
30
+
31
+ `1.1.2-rc.2` shipped green CI but its CHANGELOG claimed more than the
32
+ codebase delivered: the B2 dispatch work stayed on an unmerged branch,
33
+ the B4 matrix was wired but the per-leaf pointer records were not
34
+ written by `init`, the B5 setup-complete command cleared the
35
+ setup-pending marker BEFORE validating the artifacts (so a failed
36
+ validation lost the marker with no compensating lock write), and the
37
+ B7 trusted-skill install wrote a placeholder `SKILL.md` whose hash
38
+ matched the inventory by construction.
39
+
40
+ This release corrects those gaps and ships only what is true at the
41
+ byte level:
42
+
43
+ - **`ship_skill_install`** materialises real bytes via the public
44
+ `skills` CLI pinned to a known version, copies them through a
45
+ staging directory, hashes every installed file, and verifies the
46
+ on-disk bytes match the staged bytes before appending to the
47
+ inventory. The tool fails closed when the CLI is unavailable; no
48
+ placeholder `SKILL.md` is ever written.
49
+ - The inventory is now append-only schema v2 with a hash-chained
50
+ event log. Install events carry per-file sha256 + provenance
51
+ (registry snapshot, cli package, registryId); uninstall events
52
+ append a tombstone that references the install hash and never
53
+ splices the chain.
54
+ - `ship_skill_install` validates the destination worktree via
55
+ `git worktree list --porcelain -z`. It refuses the main checkout,
56
+ unregistered paths, symlink traversal, and any destination whose
57
+ ancestor is a symlink. Paths that lexically contain `..` or
58
+ absolute segments are refused at append time.
59
+ - The root permission matrix is the single source of truth.
60
+ `desiredPointersForProfile("engineering")` derives its pointer
61
+ list from `rootPermissionMatrix()` (no parallel `POINTER_ENTRIES`
62
+ list); the wildcard `*` default is never serialised as a literal
63
+ pointer, and bash policy is left to the OpenCode runtime instead
64
+ of being installer-owned state. Empty intermediate containers
65
+ (`agent.<name>.permission: {}`) are pruned on install/uninstall so
66
+ byte-identical restoration holds for empty consumer configs.
67
+ - `setup-complete` validates lock, models, docs, and AGENTS.md
68
+ BEFORE any writes. The setup-pending marker is no longer part of
69
+ the gate (it is a chat-time signal, not an artifact). When the
70
+ gate passes, the lock is written with `setupComplete: true` and
71
+ the marker is cleared as part of the same commit. When validation
72
+ fails, no state changes.
73
+ - The 32-tool public surface is unchanged. The eight new tools
74
+ (`ship_task_start`, `ship_task_commit`, `ship_task_complete`,
75
+ `ship_final_review`, `ship_skill_discover`, `ship_skill_install`,
76
+ `ship_skill_audit`, `ship_skill_uninstall`) are still first-class.
77
+ - Regressions covered by new test suites: `tests/skills/install.test.mjs`,
78
+ `tests/skills/inventory.test.mjs`, `tests/skills/worktree.test.mjs`,
79
+ `tests/installer/root-permission-matrix.test.mjs`,
80
+ `tests/installer/setup-pending.test.mjs` (extended).
81
+
82
+ ## 1.1.2-rc.2 — Rejected, incomplete
83
+
84
+ `1.1.2-rc.2` is published on npm `next` but is rejected as an
85
+ incomplete candidate. The CHANGELOG for that release claimed
86
+ behavior the source tree did not contain: the B2 dispatch work
87
+ lived only on the unmerged branch `fix/1.1.2-rc.2-contract`, the
88
+ root permission matrix was dead-code (POINTER_ENTRIES was the
89
+ active source), the setup-complete command cleared the marker
90
+ before validating, and `ship_skill_install` wrote a placeholder
91
+ `SKILL.md` whose hash matched the inventory by construction. The
92
+ published `1.1.2-rc.2` tarball is byte-equivalent to this rejected
93
+ release.
6
94
 
7
95
  > Active stabilization branch: `fix/1.1.2-self-hosting`.
8
96
  > Parent tracker: https://github.com/Viktorxyz/opencode-ship/issues/56.
97
+ > Authoritative plan: docs/release/1.1.2-correction-plan.md.
9
98
 
10
- `1.1.1` shipped a partial contract: 24 of the 32 promised tools, an
11
- executor that conflated "all three model fields populated" with
12
- "setup workflow completed", a setup skill that left consumers
13
- without `docs/agents/**` or an `AGENTS.md` Ship workflow block, and
14
- root permissions that still used the legacy 11-pointer list with
15
- no controller delegation.
99
+ `1.1.1` and `1.1.2-rc.1` shipped partial contracts: 24 of the 32
100
+ promised tools, no real OpenCode dispatch, an executor that conflated
101
+ "all three model fields populated" with "setup workflow completed",
102
+ a setup skill that left consumers without `docs/agents/**` or an
103
+ `AGENTS.md` Ship workflow block, and root permissions that still used
104
+ a duplicated pointer list.
16
105
 
17
106
  This release corrects every one of those gaps:
18
107
 
19
108
  - 32 typed tools are registered. The previously missing
20
109
  `ship_task_start`, `ship_task_commit`, `ship_task_complete`,
21
110
  `ship_final_review`, `ship_skill_discover`, `ship_skill_install`,
22
- `ship_skill_audit`, and `ship_skill_uninstall` are now first-class.
111
+ `ship_skill_audit`, and `ship_skill_uninstall` are first-class.
112
+ - The workflow agents are dispatched through real OpenCode
113
+ sessions via `client.session.create` and `client.session.promptAsync`.
114
+ The controller session id is persisted in dispatch records so
115
+ plan/task/final-review tools can authorize the caller from the
116
+ ToolContext, not from a caller-supplied `submittedBy` string.
23
117
  - `ship_task_review` authorizes against the configured builder
24
- model (the task reviewer is rendered with the builder model),
25
- not the final reviewer. The factory now passes the config so
26
- the tool can resolve model roles.
27
- - New `opencode-ship setup-complete` command is the sole writer
28
- of `lock.manager.setupComplete: true`. The lock flip requires
29
- all three model roles populated AND the install-owned docs
30
- (`docs/agents/{issue-tracker,domain,triage-labels}.md`) AND
31
- the `AGENTS.md` "Ship workflow" block AND the setup-pending
32
- marker absent. The five predicates are deterministic from
33
- on-disk artifacts.
34
- - `update` no longer auto-clears the setup-pending marker.
35
- Marker removal is exclusively the setup-complete command's
36
- responsibility.
37
- - Executor refuses to set `setupComplete: true` on `init` or
38
- `update`; the flag is only ever passed through
39
- `commitInstall(..., { fullSetupComplete: true })`.
40
- - Doctor reports setup-complete state as informational so
41
- already-installed neutral consumers do not regress.
42
- - Root permission matrix wires `subagent_depth: 2` and the
43
- Build ship-controller delegation. The legacy 11-pointer
44
- list is augmented with the depth and delegation surfaces.
45
- - Lock schema v4 (`schema/ship-lock.schema.json`) now accepts
46
- `manager.setupComplete` and the `support` file kind, and
47
- explicitly drops `cleanupPending` (it lives under the Git
48
- common directory).
49
- - New `src/skills/{policy,registry,inventory}.js` modules
50
- back the four `ship_skill_*` tools. The inventory is
51
- hash-chained and recorded in `.opencode/ship.skills.lock.json`
52
- under the consumer repo.
118
+ model (the task reviewer is rendered with the builder model).
119
+ `ship_final_review` requires the configured finalReviewer model.
120
+ Both gate on the controller session id.
121
+ - The setup-complete command is the sole writer of
122
+ `lock.manager.setupComplete: true`. It validates models + docs +
123
+ AGENTS.md + lock BEFORE the lock write, then removes the
124
+ setup-pending marker in the same critical section. A failed
125
+ validation leaves the marker untouched.
126
+ - The root permission matrix is the single source of truth. The
127
+ legacy `POINTER_ENTRIES` list is replaced by `rootPermissionMatrix()`.
128
+ `subagent_depth: 2` and the Build ship-controller delegation
129
+ are wired so the deep plan / build / review chain works without
130
+ manual permission patching.
131
+ - JSONC reads and writes use `jsonc-parser`. The apply step merges
132
+ sibling section insertions into a single JSONC edit insert so the
133
+ `applyEdits` call does not throw on overlapping ranges. Plain
134
+ JSON files are preserved key-by-key by the same matrix.
135
+ - The `setup-ship-workflow` skill is GitHub-only. The 1.1.2
136
+ controller's delivery tool belt is GitHub-bound; the skill
137
+ refuses to drive GitLab, Jira, Linear, or local markdown.
138
+ The command is a thin wrapper that just invokes the skill.
139
+ - Lock schema v4 explicitly accepts `manager.setupComplete` and
140
+ the `support` file kind, and drops `cleanupPending` (its state
141
+ lives under the Git common directory).
142
+
143
+ ## 1.1.2-rc.1 (incomplete) placeholder
144
+
145
+ The 1.1.2-rc.1 release shipped with a partial contract and is
146
+ deprecated as soon as 1.1.2 stable is published. Upgrade to
147
+ 1.1.2-rc.2 or later.
53
148
 
54
149
  ## 1.1.1 — Stabilization + first self-hosting release (UNRELEASED)
55
150
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > npm-distributed OpenCode installer and delivery plugin: a single command materialises the lifecycle plugin, reviewer/verifier agents, and skills into any consumer repository, with a recoverable lock and never silently overwrites managed files.
4
4
  >
5
- > **Status:** `1.1.0` is on `npm dist-tag latest`. The `1.1.x` stabilization line (parent issue #40) is in progress on the `fix/1.1.1-stabilization` branch. When `1.1.1` ships it becomes the first self-hosting release and `1.1.0` is deprecated. The `release/1.1.0-engineering-only` branch ships the engineering profile directly without a separate `core` profile. The `1.1.0` tag is immutable; consumers should use `opencode-ship@1.1.0` today and switch to `opencode-ship@1.1.1` once it is promoted to `latest`. See `docs/release/1.1.1-stabilization-plan.md` for the authoritative plan and issue #40 for the bounded evidence ledger.
5
+ > **Status:** `1.1.1` is on `npm dist-tag latest`. The `1.1.2` stabilization line is in progress on the `release/1.1.2-rc.4` branch of the `1.1.2 stabilization`. `1.1.2-rc.1`, `1.1.2-rc.2`, and `1.1.2-rc.3` are published on `next` but are rejected, incomplete candidates; the next candidate is `1.1.2-rc.4`, adding the Plan Mode write access required by the brainstorming / writing-plans / wayfinder skills. Once `1.1.2` ships it becomes the first fully self-hosting release and `1.1.1` is deprecated. The `1.1.0` tag is immutable. See `docs/release/1.1.2-correction-plan.md` for the authoritative plan and issue #56 for the bounded evidence ledger.
6
6
  >
7
7
  > Consumers should use `opencode-ship@1.1.0` (or `@latest`) until `1.1.1` ships. The previous `1.0.0` is on `next`; consumers who pinned to `1.0.x` will continue to receive updates on that channel.
8
8
 
@@ -145,7 +145,7 @@ Existing consumers of `opencode-delivery@0.1.x` (commit-pinned shim) can run `pn
145
145
 
146
146
  ## Development
147
147
 
148
- `npm run verify` runs `format:check`, `lint`, `typecheck`, `build`, and the auto-discovered test suite. The tests cover the installer CLI, the lock and root-config planners, the catalog validator, the schema validator, agents, the packed-artifact smoke check, the transaction-recovery contract, the profile-resolution precedence chain, the catalog profile filter, the order-preserving root-config merge, the engineering↔core transition, the durable plan artifact, the Plan Mode permission integration, the M3 task loop contract (run store + task brief + Spec/Quality verdicts + 3-round breaker + commit binding + compaction context), the Ready gate (parallel GPT Standards/Spec + verifier + CI on one HEAD; Build cannot self-record), the transition matrix smoke (core omits engineering, engineering adds engineering, lock tracks the active profile), the static release-policy tests (Node matrix wiring, prerelease metadata, runtime-source digest wiring, 1.0 promotion policy), the runtime-source digest algorithm tests (deterministic across clean checkouts; ignores version and release-metadata changes; tracks every runtime-source modification), and the OpenCode live-server discovery smoke (24-tool canonical set exposed via `/experimental/tool/ids` on a real `opencode serve` instance for both `core` and `engineering` profiles). The suite count and per-test count are derived from the test runner at qualification time; this README intentionally does not lock in a specific test-count baseline.
148
+ `npm run verify` runs `format:check`, `lint`, `typecheck`, `build`, and the auto-discovered test suite. The tests cover the installer CLI, the lock and root-config planners, the catalog validator, the schema validator, agents, the packed-artifact smoke check, the transaction-recovery contract, the profile-resolution precedence chain, the catalog profile filter, the order-preserving root-config merge, the engineering↔core transition, the durable plan artifact, the Plan Mode permission integration, the M3 task loop contract (run store + task brief + Spec/Quality verdicts + 3-round breaker + commit binding + compaction context), the Ready gate (parallel GPT Standards/Spec + verifier + CI on one HEAD; Build cannot self-record), the transition matrix smoke (core omits engineering, engineering adds engineering, lock tracks the active profile), the static release-policy tests (Node matrix wiring, prerelease metadata, runtime-source digest wiring, 1.0 promotion policy), the runtime-source digest algorithm tests (deterministic across clean checkouts; ignores version and release-metadata changes; tracks every runtime-source modification), and the OpenCode live-server discovery smoke (32-tool canonical set exposed via `/experimental/tool/ids` on a real `opencode serve` instance for both `core` and `engineering` fixtures). The suite count and per-test count are derived from the test runner at qualification time; this README intentionally does not lock in a specific test-count baseline.
149
149
 
150
150
  ```
151
151
  npm ci
@@ -1,6 +1,6 @@
1
1
  # Third-Party Notices
2
2
 
3
- `opencode-ship@1.1.2-rc.1` ships the complete Matt Pocock and Superpowers
3
+ `opencode-ship@1.1.2-rc.4` ships the complete Matt Pocock and Superpowers
4
4
  methodology under the MIT license, plus the Ship-owned installer,
5
5
  plugin, agents, and skills. The complete immutable pin list is in
6
6
  `vendor/sources.json`; the upstream snapshots are under
@@ -4,6 +4,7 @@ mode: subagent
4
4
  temperature: 0.2
5
5
  steps: 8
6
6
  permission:
7
+ "*": deny
7
8
  edit: deny
8
9
  external_directory: deny
9
10
  webfetch: deny
@@ -4,6 +4,7 @@ mode: subagent
4
4
  temperature: 0.1
5
5
  steps: 8
6
6
  permission:
7
+ "*": deny
7
8
  edit: deny
8
9
  bash: deny
9
10
  external_directory: deny
@@ -5,6 +5,7 @@ temperature: 0.1
5
5
  model: <model-from-config>
6
6
  steps: 12
7
7
  permission:
8
+ "*": deny
8
9
  edit: deny
9
10
  external_directory: deny
10
11
  webfetch: deny
@@ -53,34 +54,46 @@ permission:
53
54
  "pnpm test *": allow
54
55
  "pnpm run verify *": allow
55
56
  task:
56
- "*": allow
57
+ "*": deny
58
+ ship-planner: allow
59
+ ship-task-builder: allow
60
+ ship-task-reviewer: allow
61
+ ship-final-standards-reviewer: allow
62
+ ship-final-spec-reviewer: allow
63
+ delivery-verifier: allow
57
64
  delivery_inspect: allow
58
65
  delivery_issue: allow
59
66
  delivery_worktree: allow
60
- delivery_verify: allow
67
+ delivery_verify: deny
61
68
  delivery_review: deny
62
69
  delivery_pr: allow
63
70
  delivery_ready: allow
64
- delivery_merge: deny
71
+ delivery_merge: ask
65
72
  delivery_cleanup: allow
66
73
  delivery_github_read: allow
67
74
  delivery_issue_comment: allow
68
75
  delivery_issue_labels: allow
69
76
  delivery_issue_link: allow
70
- delivery_issue_close: deny
77
+ delivery_issue_close: ask
71
78
  delivery_sync: allow
72
- delivery_publish: deny
79
+ delivery_publish: allow
73
80
  ship_plan_start: allow
74
- ship_plan_submit: allow
75
- ship_plan_approve: deny
81
+ ship_plan_submit: deny
82
+ ship_plan_approve: ask
76
83
  ship_run_start: allow
84
+ ship_task_start: allow
85
+ ship_task_commit: allow
86
+ ship_task_complete: allow
77
87
  ship_task_report: deny
78
88
  ship_task_review: deny
89
+ ship_final_review: deny
79
90
  ship_resume: allow
80
91
  ship_status: allow
81
92
  ship_deliver: allow
82
93
  ship_skill_discover: allow
83
94
  ship_skill_install: allow
95
+ ship_skill_audit: allow
96
+ ship_skill_uninstall: allow
84
97
  ---
85
98
 
86
99
  # ship-controller
@@ -1,10 +1,11 @@
1
1
  ---
2
- description: Strong Spec final reviewer. Records the Spec axis of the final review through `delivery_review` with `axis: spec`. Independent of the Standards reviewer and the controller.
2
+ description: Strong Spec final reviewer. Records the Spec axis through `ship_final_review`. Independent of the Standards reviewer and the controller.
3
3
  mode: subagent
4
4
  temperature: 0.2
5
5
  model: <model-from-config>
6
6
  steps: 10
7
7
  permission:
8
+ "*": deny
8
9
  edit: deny
9
10
  external_directory: deny
10
11
  webfetch: deny
@@ -26,7 +27,7 @@ permission:
26
27
  delivery_issue: deny
27
28
  delivery_worktree: deny
28
29
  delivery_verify: deny
29
- delivery_review: allow
30
+ delivery_review: deny
30
31
  delivery_pr: deny
31
32
  delivery_ready: deny
32
33
  delivery_merge: deny
@@ -37,6 +38,7 @@ permission:
37
38
  ship_run_start: deny
38
39
  ship_task_report: deny
39
40
  ship_task_review: deny
41
+ ship_final_review: allow
40
42
  ship_resume: deny
41
43
  ship_status: deny
42
44
  ship_deliver: deny
@@ -70,7 +72,7 @@ refuses to mark Ready if either axis is missing or fails.
70
72
  2. Score the Spec axis against the contract above. Every
71
73
  acceptance criterion the plan promised must be
72
74
  demonstrable from the final HEAD.
73
- 3. Call `delivery_review` exactly once with
75
+ 3. Call `ship_final_review` exactly once with
74
76
  `axis: "spec"`, the merge-base SHA, the HEAD SHA, the
75
77
  package hash, and a single verdict. The verdict is
76
78
  `pass` only when every Spec criterion is met; any
@@ -1,10 +1,11 @@
1
1
  ---
2
- description: Strong Standards final reviewer. Records the Standards axis of the final review through `delivery_review` with `axis: standards`. Independent of the Spec reviewer and the controller.
2
+ description: Strong Standards final reviewer. Records the Standards axis through `ship_final_review`. Independent of the Spec reviewer and the controller.
3
3
  mode: subagent
4
4
  temperature: 0.2
5
5
  model: <model-from-config>
6
6
  steps: 10
7
7
  permission:
8
+ "*": deny
8
9
  edit: deny
9
10
  external_directory: deny
10
11
  webfetch: deny
@@ -26,7 +27,7 @@ permission:
26
27
  delivery_issue: deny
27
28
  delivery_worktree: deny
28
29
  delivery_verify: deny
29
- delivery_review: allow
30
+ delivery_review: deny
30
31
  delivery_pr: deny
31
32
  delivery_ready: deny
32
33
  delivery_merge: deny
@@ -37,6 +38,7 @@ permission:
37
38
  ship_run_start: deny
38
39
  ship_task_report: deny
39
40
  ship_task_review: deny
41
+ ship_final_review: allow
40
42
  ship_resume: deny
41
43
  ship_status: deny
42
44
  ship_deliver: deny
@@ -66,7 +68,7 @@ to mark Ready if either axis is missing or fails.
66
68
  you. The package includes the task-by-task commits, the
67
69
  verification report, the CI report, and the manifest.
68
70
  2. Score the Standards axis against the contract above.
69
- 3. Call `delivery_review` exactly once with
71
+ 3. Call `ship_final_review` exactly once with
70
72
  `axis: "standards"`, the merge-base SHA, the HEAD SHA,
71
73
  the package hash, and a single verdict. The verdict is
72
74
  `pass` only when every Standards criterion is met; any
@@ -5,6 +5,7 @@ temperature: 0.3
5
5
  model: <model-from-config>
6
6
  steps: 10
7
7
  permission:
8
+ "*": deny
8
9
  edit: deny
9
10
  external_directory: deny
10
11
  webfetch: deny
@@ -5,6 +5,7 @@ temperature: 0.2
5
5
  model: <model-from-config>
6
6
  steps: 8
7
7
  permission:
8
+ "*": deny
8
9
  edit: allow
9
10
  external_directory: deny
10
11
  webfetch: deny
@@ -5,6 +5,7 @@ temperature: 0.2
5
5
  model: <model-from-config>
6
6
  steps: 8
7
7
  permission:
8
+ "*": deny
8
9
  edit: deny
9
10
  external_directory: deny
10
11
  webfetch: deny
@@ -1,173 +1,15 @@
1
1
  ---
2
- description: Configure the opencode-ship workflow for this repo: issue tracker, triage labels, domain docs, and AI model roles. Run once after `init` with /setup-ship-workflow.
2
+ description: Configure the opencode-ship workflow for this repo: GitHub tracker, triage labels, domain docs, and AI model roles. Run once after `init` with /setup-ship-workflow.
3
3
  ---
4
4
 
5
5
  # Setup Ship Workflow
6
6
 
7
- First-run setup for `opencode-ship@1.1`. Run this exactly once after `init` and before any `ship-deliver`. It is prompt-driven, idempotent, and refuses to return until every step is committed or explicitly skipped.
7
+ This command is a thin wrapper around the canonical
8
+ `setup-ship-workflow` skill. OpenCode will load the skill
9
+ and follow its procedure.
8
10
 
9
- ## When you trigger
10
-
11
- - The user runs `/setup-ship-workflow` or types "set up ship" / "continue ship setup".
12
- - The installer creates `.opencode/ship.setup-pending.json` after `init`; the controller also routes `ship-deliver` here until this skill has cleared the marker.
13
-
14
- Do **not** trigger on a normal planning or delivery request.
15
-
16
- ## Process
17
-
18
- Take the sections in order. Lead every question with a recommended default so the user can accept in one word. Skip a section only when exploration already settled it.
19
-
20
- ### 1. Explore
21
-
22
- ```bash
23
- git remote -v
24
- git status --short
25
- ls -la AGENTS.md CLAUDE.md docs/ .opencode/ 2>/dev/null || true
26
- cat .opencode/opencode.json 2>/dev/null || true
27
- cat .opencode/ship.config.json 2>/dev/null || true
28
- cat .opencode/ship.lock.json 2>/dev/null || true
29
- cat .opencode/ship.setup-pending.json 2>/dev/null || true
30
- opencode providers list 2>/dev/null || true
31
- ```
32
-
33
- Also check:
34
-
35
- - is `.opencode/ship.setup-pending.json` present? (it makes this run mandatory)
36
- - is the `triage` skill installed? (decides whether Section B runs)
37
- - monorepo signals (`pnpm-workspace.yaml`, `packages/*`)
38
-
39
- ### 2. Section A — Issue tracker
40
-
41
- Default: GitHub (the most common case). If `git remote` points at GitLab, propose GitLab. Otherwise offer:
42
-
43
- - GitHub (uses `gh`)
44
- - GitLab (uses `glab`)
45
- - Local markdown (writes under `.scratch/<feature>/`)
46
- - Other (Jira, Linear, etc.) — describe in one paragraph
47
-
48
- Write the choice to `docs/agents/issue-tracker.md`. Use the seed template in `assets/skills/setup-engineering-workflow/issue-tracker-<choice>.md` as the starting point.
49
-
50
- ### 3. Section B — Triage labels
51
-
52
- Only if the `triage` skill is installed. Ask one question:
53
-
54
- > Keep the default triage labels? (recommended: yes)
55
- > Defaults: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`.
56
-
57
- On **no**, capture the user's overrides so `triage` reuses existing labels instead of creating duplicates.
58
-
59
- Write `docs/agents/triage-labels.md`.
60
-
61
- ### 4. Section C — Domain docs
62
-
63
- Default: **single-context** — one `CONTEXT.md` + `docs/adr/` at the repo root. Skip the question unless monorepo signals were found.
64
-
65
- Write `docs/agents/domain.md`.
66
-
67
- ### 5. Section D — AI model roles
68
-
69
- Three questions, one at a time. Default to `openai/gpt-5.6-sol` and `minimax/MiniMax-M3`; offer alternative families below.
70
-
71
- | Role | Default | Suggestion |
72
- |---|---|---|
73
- | planner | `openai/gpt-5.6-sol` | strong model for plan writing |
74
- | builder | `minimax/MiniMax-M3` | cheap/fast model for code |
75
- | finalReviewer | `openai/gpt-5.6-sol` | strong model for final Standards + Spec review |
76
-
77
- Alternatives to mention if the user has no OpenAI/MiniMax:
78
-
79
- - Anthropic: `anthropic/claude-opus-4.1`, `anthropic/claude-sonnet-4.5`
80
- - Google: `google/gemini-2.5-pro`, `google/gemini-2.5-flash`
81
- - Or any `<provider>/<model>` string the user has credentials for
82
-
83
- After the user answers, **update `.opencode/ship.config.json`** so it looks like:
84
-
85
- ```json
86
- {
87
- "schemaVersion": 2,
88
- "profile": "engineering",
89
- "project": { ... },
90
- "delivery": { ... },
91
- "workflow": {
92
- "models": {
93
- "planner": "<answer>",
94
- "builder": "<answer>",
95
- "finalReviewer": "<answer>"
96
- },
97
- "approval": { "mirrorToIssue": true, "maxFailedRounds": 3 }
98
- }
99
- }
100
- ```
101
-
102
- Then run `opencode-ship update` to write the change with full transactional coverage.
103
-
104
- ### 6. Section E — Provider auth probe
105
-
106
- ```bash
107
- opencode providers list
108
- ```
109
-
110
- If the planner/builder/finalReviewer names are missing credentials, surface a warning and tell the user how to log in:
111
-
112
- ```bash
113
- opencode providers login openai
114
- opencode providers login minimax
115
- ```
116
-
117
- Do not invent credentials. Do not retry.
118
-
119
- ### 7. Section F — Permissions sanity
120
-
121
- Run `opencode-ship doctor`. If any pointer is missing, prompt the user to run:
122
-
123
- ```bash
124
- opencode-ship update --force-root-config
125
- ```
126
-
127
- Do not auto-rewrite root configs without consent.
128
-
129
- ### 8. Section G — AGENTS.md / CLAUDE.md
130
-
131
- Pick the file to edit:
132
-
133
- - If `CLAUDE.md` exists, edit it.
134
- - Else if `AGENTS.md` exists, edit it.
135
- - If neither, ask the user to pick one — never create both.
136
-
137
- If an `## Ship workflow` block exists, update in place. Otherwise append:
138
-
139
- ```markdown
140
- ## Ship workflow
141
-
142
- This repo uses opencode-ship. Read `.opencode/ship.config.json` for the active model roles and approval policy. Issues live in [tracker]. See `docs/agents/issue-tracker.md`. Triage labels are documented in `docs/agents/triage-labels.md`.
143
-
144
- For a single-issue delivery, the user invokes `/setup-ship-workflow` once, then `ship-deliver <issue-number>` (or types "Ship issue N"). The controller dispatches the planner, builder, and reviewers; no further user action is required until Ready.
145
- ```
146
-
147
- Include the `### Triage labels` sub-block only when the `triage` skill is installed.
148
-
149
- ### 9. Done
150
-
151
- - Delete `.opencode/ship.setup-pending.json`.
152
- - Print the next-step block below.
153
- - Tell the user they can edit `docs/agents/*.md` directly; re-running this skill is only necessary to switch trackers or re-configure models.
154
-
155
- ## Next steps (always print)
156
-
157
- ```text
158
- Setup complete.
159
-
160
- Next:
161
- 1. Restart OpenCode in this repo (if you haven't already).
162
- 2. Try: Ship issue 1 (or any issue number)
163
- 3. The controller will: plan -> ask approve -> implement -> review -> ready -> wait for "merge it"
164
- ```
165
-
166
- ## Hard rules
167
-
168
- - One question per turn. Never batch.
169
- - Re-run safe: skip sections already settled by existing config or docs.
170
- - Never edit the same `docs/agents/*.md` twice in one run.
171
- - Never silently overwrite a user-owned value in `ship.config.json`; always show the diff first.
172
- - Never tell the user to "merge it" automatically. The merge step is the only autonomy break.
173
- - Never hide step failures. If a write fails, surface the error and stop.
11
+ To run the skill from this command, the user types
12
+ `/setup-ship-workflow` in OpenCode. The CLI's
13
+ `setup-complete` command is the transactional gate that
14
+ commits the lock flip and clears the marker once the skill
15
+ has produced every artifact.