opencode-ship 1.1.1 → 1.1.2-rc.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,62 @@
2
2
 
3
3
  All notable changes to `opencode-ship` are recorded here.
4
4
 
5
+ ## 1.1.2-rc.2 — Complete contract correction
6
+
7
+ > Active stabilization branch: `fix/1.1.2-self-hosting`.
8
+ > Parent tracker: https://github.com/Viktorxyz/opencode-ship/issues/56.
9
+ > Authoritative plan: docs/release/1.1.2-correction-plan.md.
10
+
11
+ `1.1.1` and `1.1.2-rc.1` shipped partial contracts: 24 of the 32
12
+ promised tools, no real OpenCode dispatch, an executor that conflated
13
+ "all three model fields populated" with "setup workflow completed",
14
+ a setup skill that left consumers without `docs/agents/**` or an
15
+ `AGENTS.md` Ship workflow block, and root permissions that still used
16
+ a duplicated pointer list.
17
+
18
+ This release corrects every one of those gaps:
19
+
20
+ - 32 typed tools are registered. The previously missing
21
+ `ship_task_start`, `ship_task_commit`, `ship_task_complete`,
22
+ `ship_final_review`, `ship_skill_discover`, `ship_skill_install`,
23
+ `ship_skill_audit`, and `ship_skill_uninstall` are first-class.
24
+ - The workflow agents are dispatched through real OpenCode
25
+ sessions via `client.session.create` and `client.session.promptAsync`.
26
+ The controller session id is persisted in dispatch records so
27
+ plan/task/final-review tools can authorize the caller from the
28
+ ToolContext, not from a caller-supplied `submittedBy` string.
29
+ - `ship_task_review` authorizes against the configured builder
30
+ model (the task reviewer is rendered with the builder model).
31
+ `ship_final_review` requires the configured finalReviewer model.
32
+ Both gate on the controller session id.
33
+ - The setup-complete command is the sole writer of
34
+ `lock.manager.setupComplete: true`. It validates models + docs +
35
+ AGENTS.md + lock BEFORE the lock write, then removes the
36
+ setup-pending marker in the same critical section. A failed
37
+ validation leaves the marker untouched.
38
+ - The root permission matrix is the single source of truth. The
39
+ legacy `POINTER_ENTRIES` list is replaced by `rootPermissionMatrix()`.
40
+ `subagent_depth: 2` and the Build → ship-controller delegation
41
+ are wired so the deep plan / build / review chain works without
42
+ manual permission patching.
43
+ - JSONC reads and writes use `jsonc-parser`. The apply step merges
44
+ sibling section insertions into a single JSONC edit insert so the
45
+ `applyEdits` call does not throw on overlapping ranges. Plain
46
+ JSON files are preserved key-by-key by the same matrix.
47
+ - The `setup-ship-workflow` skill is GitHub-only. The 1.1.2
48
+ controller's delivery tool belt is GitHub-bound; the skill
49
+ refuses to drive GitLab, Jira, Linear, or local markdown.
50
+ The command is a thin wrapper that just invokes the skill.
51
+ - Lock schema v4 explicitly accepts `manager.setupComplete` and
52
+ the `support` file kind, and drops `cleanupPending` (its state
53
+ lives under the Git common directory).
54
+
55
+ ## 1.1.2-rc.1 — (incomplete) placeholder
56
+
57
+ The 1.1.2-rc.1 release shipped with a partial contract and is
58
+ deprecated as soon as 1.1.2 stable is published. Upgrade to
59
+ 1.1.2-rc.2 or later.
60
+
5
61
  ## 1.1.1 — Stabilization + first self-hosting release (UNRELEASED)
6
62
 
7
63
  > Active stabilization branch: `fix/1.1.1-stabilization`.
@@ -1,6 +1,6 @@
1
1
  # Third-Party Notices
2
2
 
3
- `opencode-ship@1.1.1` ships the complete Matt Pocock and Superpowers
3
+ `opencode-ship@1.1.2-rc.2` 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
@@ -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.
@@ -1,52 +1,78 @@
1
1
  ---
2
2
  name: setup-ship-workflow
3
- description: First-run setup of opencode-ship. Walks the user through issue tracker, triage labels, domain docs, and AI model roles. Run once after `init` with /setup-ship-workflow.
3
+ description: First-run setup of opencode-ship. Walks the user through GitHub configuration, triage labels, domain docs, and AI model roles. Run once after `init` with /setup-ship-workflow.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
7
  # Setup Ship Workflow
8
8
 
9
- 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.
9
+ First-run setup for `opencode-ship@1.1.2`. Run this exactly once after `init`
10
+ and before any `ship-deliver`. It is prompt-driven, idempotent, and refuses
11
+ to return until every step is committed or explicitly skipped.
12
+
13
+ The setup contract is GitHub-only. The skill refuses to drive GitLab,
14
+ Jira, Linear, or local markdown because the controller's own delivery
15
+ tool belt is GitHub-bound. A team that needs a different tracker should
16
+ hold off on `opencode-ship@1.1.2` until 1.2 ships the next tracker.
10
17
 
11
18
  ## When you trigger
12
19
 
13
- - The user runs `/setup-ship-workflow` or types "set up ship" / "continue ship setup".
14
- - The installer creates `.opencode/ship.setup-pending.json` after `init`; the controller also routes `ship-deliver` here until this skill has cleared the marker.
20
+ - The user runs `/setup-ship-workflow` or types "set up ship" / "continue setup".
21
+ - The installer creates `.opencode/ship.setup-pending.json` after `init`.
22
+ - The controller also routes `ship-deliver` to this skill until the marker is cleared.
15
23
 
16
24
  Do **not** trigger on a normal planning or delivery request.
17
25
 
18
26
  ## Process
19
27
 
20
- 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.
28
+ Take the sections in order. Lead every question with a recommended default so
29
+ the user can accept in one word. Skip a section only when exploration already
30
+ settled it.
21
31
 
22
32
  ### 1. Explore
23
33
 
24
34
  ```bash
25
35
  git remote -v
36
+ gh auth status
26
37
  git status --short
27
38
  ls -la AGENTS.md CLAUDE.md docs/ .opencode/ 2>/dev/null || true
28
39
  cat .opencode/opencode.json 2>/dev/null || true
29
40
  cat .opencode/ship.config.json 2>/dev/null || true
30
41
  cat .opencode/ship.lock.json 2>/dev/null || true
31
- opencode providers list 2>/dev/null || true
42
+ opencode models 2>/dev/null || true
32
43
  ```
33
44
 
34
45
  Also check:
35
46
 
36
47
  - is `.opencode/ship.setup-pending.json` present? (it makes this run mandatory)
37
48
  - is the `triage` skill installed? (decides whether Section B runs)
38
- - monorepo signals (`pnpm-workspace.yaml`, `packages/*`)
49
+ - is the issue tracker a GitHub repo? If not, refuse with the
50
+ GitHub-only contract and stop.
51
+
52
+ ### 2. Section A — GitHub repository
53
+
54
+ The default is the GitHub repository that owns `git remote`. Confirm the
55
+ detected `owner/repo` slug against the user's answer. If the user has
56
+ multiple remotes, ask which one is the ship target.
39
57
 
40
- ### 2. Section A Issue tracker
58
+ Write `docs/agents/issue-tracker.md` with the resolved `owner/repo`,
59
+ `default branch`, and the canonical `gh` commands:
60
+
61
+ ```bash
62
+ gh issue list --label needs-triage
63
+ gh issue view <number>
64
+ gh pr create --base <default-branch> --draft --title <title> --body <body>
65
+ gh pr view <number>
66
+ gh pr merge <number> --squash --delete-branch
67
+ ```
41
68
 
42
- Default: GitHub (the most common case). If `git remote` points at GitLab, propose GitLab. Otherwise offer:
69
+ If the consumer is not on GitHub, refuse with:
43
70
 
44
- - GitHub (uses `gh`)
45
- - GitLab (uses `glab`)
46
- - Local markdown (writes under `.scratch/<feature>/`)
47
- - Other (Jira, Linear, etc.) — describe in one paragraph
71
+ > opencode-ship@1.1.2 is GitHub-only. Re-run on a GitHub repo, or wait
72
+ > for 1.2.
48
73
 
49
- 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.
74
+ Stop the skill. Do not write a `docs/agents/issue-tracker.md` for a
75
+ non-GitHub consumer.
50
76
 
51
77
  ### 3. Section B — Triage labels
52
78
 
@@ -55,19 +81,23 @@ Only if the `triage` skill is installed. Ask one question:
55
81
  > Keep the default triage labels? (recommended: yes)
56
82
  > Defaults: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`.
57
83
 
58
- On **no**, capture the user's overrides so `triage` reuses existing labels instead of creating duplicates.
84
+ On **no**, capture the user's overrides so `triage` reuses existing labels
85
+ instead of creating duplicates.
59
86
 
60
87
  Write `docs/agents/triage-labels.md`.
61
88
 
62
89
  ### 4. Section C — Domain docs
63
90
 
64
- Default: **single-context** — one `CONTEXT.md` + `docs/adr/` at the repo root. Skip the question unless monorepo signals were found.
91
+ Default: **single-context** — one `CONTEXT.md` + `docs/adr/` at the repo root.
92
+ Skip the question unless monorepo signals were found.
65
93
 
66
94
  Write `docs/agents/domain.md`.
67
95
 
68
96
  ### 5. Section D — AI model roles
69
97
 
70
- Three questions, one at a time. Default to `openai/gpt-5.6-sol` and `minimax/MiniMax-M3`; offer alternative families below.
98
+ Three questions, one at a time. Default to `openai/gpt-5.6-sol` and
99
+ `minimax/MiniMax-M3`; offer alternative families only when the user
100
+ explicitly states they have no credentials for the defaults.
71
101
 
72
102
  | Role | Default | Suggestion |
73
103
  |---|---|---|
@@ -81,7 +111,7 @@ Alternatives to mention if the user has no OpenAI/MiniMax:
81
111
  - Google: `google/gemini-2.5-pro`, `google/gemini-2.5-flash`
82
112
  - Or any `<provider>/<model>` string the user has credentials for
83
113
 
84
- After the user answers, **update `.opencode/ship.config.json`** so workflow looks like:
114
+ After the user answers, update `.opencode/ship.config.json`:
85
115
 
86
116
  ```json
87
117
  {
@@ -100,26 +130,32 @@ After the user answers, **update `.opencode/ship.config.json`** so workflow look
100
130
  }
101
131
  ```
102
132
 
103
- Then run `opencode-ship update` to write the change with full transactional coverage.
133
+ Then run `opencode-ship update --planner-model <a> --builder-model <b>
134
+ --final-reviewer-model <c> --force-config` to write the change with full
135
+ transactional coverage.
104
136
 
105
137
  ### 6. Section E — Provider auth probe
106
138
 
107
139
  ```bash
108
- opencode providers list
140
+ opencode auth list
141
+ opencode models openai
142
+ opencode models minimax
109
143
  ```
110
144
 
111
- If the planner/builder/finalReviewer names are missing credentials, surface a warning and tell the user how to log in:
145
+ If the planner/builder/finalReviewer names are missing credentials, surface
146
+ a warning and tell the user how to log in:
112
147
 
113
148
  ```bash
114
- opencode providers login openai
115
- opencode providers login minimax
149
+ opencode auth login openai
150
+ opencode auth login minimax
116
151
  ```
117
152
 
118
153
  Do not invent credentials. Do not retry.
119
154
 
120
155
  ### 7. Section F — Permissions sanity
121
156
 
122
- Run `opencode-ship doctor`. If any pointer is missing, prompt the user to run:
157
+ Run `opencode-ship doctor`. If any pointer is missing, prompt the user to
158
+ run:
123
159
 
124
160
  ```bash
125
161
  opencode-ship update --force-root-config
@@ -140,18 +176,26 @@ If an `## Ship workflow` block exists, update in place. Otherwise append:
140
176
  ```markdown
141
177
  ## Ship workflow
142
178
 
143
- 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`.
179
+ This repo uses opencode-ship. Read `.opencode/ship.config.json` for the
180
+ active model roles and approval policy. Issues live in GitHub.
181
+ See `docs/agents/issue-tracker.md`. Triage labels are documented in
182
+ `docs/agents/triage-labels.md`.
144
183
 
145
- 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.
184
+ For a single-issue delivery, the user invokes `/setup-ship-workflow`
185
+ once, then `ship-deliver <issue-number>` (or types "Ship issue N"). The
186
+ controller dispatches the planner, builder, and reviewers; no further
187
+ user action is required until Ready.
146
188
  ```
147
189
 
148
- Include the `### Triage labels` sub-block only when the `triage` skill is installed.
190
+ Include the `### Triage labels` sub-block only when the `triage` skill is
191
+ installed.
149
192
 
150
193
  ### 9. Done
151
194
 
152
- - Delete `.opencode/ship.setup-pending.json`.
195
+ - Run `opencode-ship setup-complete` to commit the lock and clear the
196
+ marker in one transaction.
197
+ - Tell the user that everything is ready.
153
198
  - Print the next-step block below.
154
- - Tell the user they can edit `docs/agents/*.md` directly; re-running this skill is only necessary to switch trackers or re-configure models.
155
199
 
156
200
  ## Next steps (always print)
157
201
 
@@ -169,6 +213,9 @@ Next:
169
213
  - One question per turn. Never batch.
170
214
  - Re-run safe: skip sections already settled by existing config or docs.
171
215
  - Never edit the same `docs/agents/*.md` twice in one run.
172
- - Never silently overwrite a user-owned value in `ship.config.json`; always show the diff first.
173
- - Never tell the user to "merge it" automatically. The merge step is the only autonomy break.
216
+ - Never silently overwrite a user-owned value in `ship.config.json`; always
217
+ show the diff first.
218
+ - Never tell the user to "merge it" automatically. The merge step is the
219
+ only autonomy break.
174
220
  - Never hide step failures. If a write fails, surface the error and stop.
221
+ - Do not write any non-GitHub tracker docs. The contract is GitHub-only.