opencode-ship 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +117 -7
- package/README.md +35 -4
- package/THIRD_PARTY_NOTICES.md +1 -13
- package/assets/agents/ship-controller.md +4 -0
- package/assets/commands/setup-ship-workflow.md +173 -0
- package/assets/commands/ship-deliver.md +77 -24
- package/assets/skills/delivery-workflow/SKILL.md +3 -1
- package/assets/skills/engineering-workflow/SKILL.md +5 -4
- package/assets/skills/planning-research-checkpoint/SKILL.md +18 -14
- package/assets/skills/setup-engineering-workflow/SKILL.md +121 -72
- package/assets/skills/skill-discovery/SKILL.md +104 -0
- package/dist/cli.js +199 -81
- package/dist/core.js +1 -1
- package/dist/plugin.js +18 -34
- package/docs/release/1.0.0-execution-plan.md +126 -35
- package/package.json +1 -1
- package/schema/ship-config.schema.json +5 -29
- package/vendor/sources.json +0 -198
|
@@ -1,125 +1,174 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: setup-
|
|
3
|
-
description:
|
|
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.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Setup
|
|
7
|
+
# Setup Ship Workflow
|
|
8
8
|
|
|
9
|
-
|
|
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.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
- **Triage labels** — the strings used for the five canonical triage roles
|
|
13
|
-
- **Domain docs** — where `CONTEXT.md` and ADRs live, and the consumer rules for reading them
|
|
11
|
+
## When you trigger
|
|
14
12
|
|
|
15
|
-
|
|
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.
|
|
15
|
+
|
|
16
|
+
Do **not** trigger on a normal planning or delivery request.
|
|
16
17
|
|
|
17
18
|
## Process
|
|
18
19
|
|
|
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.
|
|
21
|
+
|
|
19
22
|
### 1. Explore
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
```bash
|
|
25
|
+
git remote -v
|
|
26
|
+
git status --short
|
|
27
|
+
ls -la AGENTS.md CLAUDE.md docs/ .opencode/ 2>/dev/null || true
|
|
28
|
+
cat .opencode/opencode.json 2>/dev/null || true
|
|
29
|
+
cat .opencode/ship.config.json 2>/dev/null || true
|
|
30
|
+
cat .opencode/ship.lock.json 2>/dev/null || true
|
|
31
|
+
opencode providers list 2>/dev/null || true
|
|
32
|
+
```
|
|
22
33
|
|
|
23
|
-
|
|
24
|
-
- `AGENTS.md` and `CLAUDE.md` at the repo root — does either exist? Is there already an `## Agent skills` section in either?
|
|
25
|
-
- `CONTEXT.md` and `CONTEXT-MAP.md` at the repo root
|
|
26
|
-
- `docs/adr/` and any `src/*/docs/adr/` directories
|
|
27
|
-
- `docs/agents/` — does this skill's prior output already exist?
|
|
28
|
-
- `.scratch/` — sign that a local-markdown issue tracker convention is already in use
|
|
29
|
-
- Is the `triage` skill installed? (a `triage` skill folder alongside this one, or `triage` in your available skills.) This decides whether Section B runs at all.
|
|
30
|
-
- Monorepo signals — a `pnpm-workspace.yaml`, a `workspaces` field in `package.json`, or a populated `packages/*` with its own `src/`. Present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo.
|
|
34
|
+
Also check:
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
- is `.opencode/ship.setup-pending.json` present? (it makes this run mandatory)
|
|
37
|
+
- is the `triage` skill installed? (decides whether Section B runs)
|
|
38
|
+
- monorepo signals (`pnpm-workspace.yaml`, `packages/*`)
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
### 2. Section A — Issue tracker
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
Default: GitHub (the most common case). If `git remote` points at GitLab, propose GitLab. Otherwise offer:
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
- GitHub (uses `gh`)
|
|
45
|
+
- GitLab (uses `glab`)
|
|
46
|
+
- Local markdown (writes under `.scratch/<feature>/`)
|
|
47
|
+
- Other (Jira, Linear, etc.) — describe in one paragraph
|
|
39
48
|
|
|
40
|
-
|
|
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.
|
|
41
50
|
|
|
42
|
-
|
|
51
|
+
### 3. Section B — Triage labels
|
|
43
52
|
|
|
44
|
-
|
|
45
|
-
- **GitLab** — issues live in the repo's GitLab Issues (uses the [`glab`](https://gitlab.com/gitlab-org/cli) CLI)
|
|
46
|
-
- **Local markdown** — issues live as files under `.scratch/<feature>/` in this repo (good for solo projects or repos without a remote)
|
|
47
|
-
- **Other** (Jira, Linear, etc.) — ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
|
|
53
|
+
Only if the `triage` skill is installed. Ask one question:
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
> Keep the default triage labels? (recommended: yes)
|
|
56
|
+
> Defaults: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`.
|
|
50
57
|
|
|
51
|
-
**
|
|
58
|
+
On **no**, capture the user's overrides so `triage` reuses existing labels instead of creating duplicates.
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
Write `docs/agents/triage-labels.md`.
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
### 4. Section C — Domain docs
|
|
56
63
|
|
|
57
|
-
|
|
64
|
+
Default: **single-context** — one `CONTEXT.md` + `docs/adr/` at the repo root. Skip the question unless monorepo signals were found.
|
|
58
65
|
|
|
59
|
-
|
|
66
|
+
Write `docs/agents/domain.md`.
|
|
60
67
|
|
|
61
|
-
|
|
68
|
+
### 5. Section D — AI model roles
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
Three questions, one at a time. Default to `openai/gpt-5.6-sol` and `minimax/MiniMax-M3`; offer alternative families below.
|
|
64
71
|
|
|
65
|
-
|
|
72
|
+
| Role | Default | Suggestion |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| planner | `openai/gpt-5.6-sol` | strong model for plan writing |
|
|
75
|
+
| builder | `minimax/MiniMax-M3` | cheap/fast model for code |
|
|
76
|
+
| finalReviewer | `openai/gpt-5.6-sol` | strong model for final Standards + Spec review |
|
|
66
77
|
|
|
67
|
-
|
|
68
|
-
- The contents of `docs/agents/issue-tracker.md`, `docs/agents/domain.md`, and `docs/agents/triage-labels.md` (the last only when `triage` is installed)
|
|
78
|
+
Alternatives to mention if the user has no OpenAI/MiniMax:
|
|
69
79
|
|
|
70
|
-
|
|
80
|
+
- Anthropic: `anthropic/claude-opus-4.1`, `anthropic/claude-sonnet-4.5`
|
|
81
|
+
- Google: `google/gemini-2.5-pro`, `google/gemini-2.5-flash`
|
|
82
|
+
- Or any `<provider>/<model>` string the user has credentials for
|
|
71
83
|
|
|
72
|
-
|
|
84
|
+
After the user answers, **update `.opencode/ship.config.json`** so workflow looks like:
|
|
73
85
|
|
|
74
|
-
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"schemaVersion": 2,
|
|
89
|
+
"profile": "engineering",
|
|
90
|
+
"project": { ... },
|
|
91
|
+
"delivery": { ... },
|
|
92
|
+
"workflow": {
|
|
93
|
+
"models": {
|
|
94
|
+
"planner": "<answer>",
|
|
95
|
+
"builder": "<answer>",
|
|
96
|
+
"finalReviewer": "<answer>"
|
|
97
|
+
},
|
|
98
|
+
"approval": { "mirrorToIssue": true, "maxFailedRounds": 3 }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
75
102
|
|
|
76
|
-
|
|
77
|
-
- Else if `AGENTS.md` exists, edit it.
|
|
78
|
-
- If neither exists, ask the user which one to create — don't pick for them.
|
|
103
|
+
Then run `opencode-ship update` to write the change with full transactional coverage.
|
|
79
104
|
|
|
80
|
-
|
|
105
|
+
### 6. Section E — Provider auth probe
|
|
81
106
|
|
|
82
|
-
|
|
107
|
+
```bash
|
|
108
|
+
opencode providers list
|
|
109
|
+
```
|
|
83
110
|
|
|
84
|
-
|
|
111
|
+
If the planner/builder/finalReviewer names are missing credentials, surface a warning and tell the user how to log in:
|
|
85
112
|
|
|
86
|
-
```
|
|
87
|
-
|
|
113
|
+
```bash
|
|
114
|
+
opencode providers login openai
|
|
115
|
+
opencode providers login minimax
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Do not invent credentials. Do not retry.
|
|
88
119
|
|
|
89
|
-
###
|
|
120
|
+
### 7. Section F — Permissions sanity
|
|
90
121
|
|
|
91
|
-
|
|
122
|
+
Run `opencode-ship doctor`. If any pointer is missing, prompt the user to run:
|
|
92
123
|
|
|
93
|
-
|
|
124
|
+
```bash
|
|
125
|
+
opencode-ship update --force-root-config
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Do not auto-rewrite root configs without consent.
|
|
129
|
+
|
|
130
|
+
### 8. Section G — AGENTS.md / CLAUDE.md
|
|
131
|
+
|
|
132
|
+
Pick the file to edit:
|
|
133
|
+
|
|
134
|
+
- If `CLAUDE.md` exists, edit it.
|
|
135
|
+
- Else if `AGENTS.md` exists, edit it.
|
|
136
|
+
- If neither, ask the user to pick one — never create both.
|
|
94
137
|
|
|
95
|
-
|
|
138
|
+
If an `## Ship workflow` block exists, update in place. Otherwise append:
|
|
96
139
|
|
|
97
|
-
|
|
140
|
+
```markdown
|
|
141
|
+
## Ship workflow
|
|
98
142
|
|
|
99
|
-
|
|
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`.
|
|
144
|
+
|
|
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.
|
|
100
146
|
```
|
|
101
147
|
|
|
102
|
-
Include the `### Triage labels` sub-block
|
|
148
|
+
Include the `### Triage labels` sub-block only when the `triage` skill is installed.
|
|
103
149
|
|
|
104
|
-
|
|
150
|
+
### 9. Done
|
|
105
151
|
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
- [triage-labels.md](./triage-labels.md) — label mapping (only if `triage` is installed)
|
|
110
|
-
- [domain.md](./domain.md) — domain doc consumer rules + layout
|
|
152
|
+
- Delete `.opencode/ship.setup-pending.json`.
|
|
153
|
+
- 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.
|
|
111
155
|
|
|
112
|
-
|
|
156
|
+
## Next steps (always print)
|
|
113
157
|
|
|
114
|
-
|
|
158
|
+
```text
|
|
159
|
+
Setup complete.
|
|
115
160
|
|
|
116
|
-
|
|
161
|
+
Next:
|
|
162
|
+
1. Restart OpenCode in this repo (if you haven't already).
|
|
163
|
+
2. Try: Ship issue 1 (or any issue number)
|
|
164
|
+
3. The controller will: plan -> ask approve -> implement -> review -> ready -> wait for "merge it"
|
|
165
|
+
```
|
|
117
166
|
|
|
118
|
-
##
|
|
167
|
+
## Hard rules
|
|
119
168
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
169
|
+
- One question per turn. Never batch.
|
|
170
|
+
- Re-run safe: skip sections already settled by existing config or docs.
|
|
171
|
+
- 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.
|
|
174
|
+
- Never hide step failures. If a write fails, surface the error and stop.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-discovery
|
|
3
|
+
description: Discover and conditionally install skills from the open agent skills ecosystem before non-trivial work. Use when the parent agent is starting a new task and wants to ensure the most relevant public skills (React, testing, deployment, etc.) are available to the cheap builder.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# skill-discovery
|
|
7
|
+
|
|
8
|
+
Discover skills from the open agent skills ecosystem (`npx skills`) that match the current task objective, then install the trusted ones locally. The hard rule is that this skill is **suggest-first, install-conditionally**: trusted sources may auto-install; everything else must be approved by the user.
|
|
9
|
+
|
|
10
|
+
## When you trigger
|
|
11
|
+
|
|
12
|
+
- The parent agent (typically `ship-deliver` or `ship-task-builder`) is about to dispatch a new task.
|
|
13
|
+
- The task objective references a domain where a public skill likely exists (web frameworks, testing, deployment, design, etc.).
|
|
14
|
+
- The user has not yet opted out of skill discovery for this session.
|
|
15
|
+
|
|
16
|
+
Do **not** trigger on:
|
|
17
|
+
|
|
18
|
+
- Trivial edits, doc rewrites, single-line fixes
|
|
19
|
+
- Tasks that are already covered by a vendored skill from the engineering catalog
|
|
20
|
+
|
|
21
|
+
## Procedure
|
|
22
|
+
|
|
23
|
+
### 1. Extract a discovery query
|
|
24
|
+
|
|
25
|
+
From the current task brief (interfaces, files, technology stack), build one short query string (2–5 words). Example: `react testing`, `docker deploy`, `postgres migrations`, `tailwind components`.
|
|
26
|
+
|
|
27
|
+
### 2. Search the skills ecosystem
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx skills find "<query>"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The CLI returns candidates with source repo, install count, and skill name. Parse the output, do not transcribe it.
|
|
34
|
+
|
|
35
|
+
### 3. Score and filter
|
|
36
|
+
|
|
37
|
+
The install allowlist and quality threshold live in `ship.config.json` under `skillDiscovery`:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"skillDiscovery": {
|
|
42
|
+
"trustedOwners": [
|
|
43
|
+
"vercel-labs",
|
|
44
|
+
"anthropics",
|
|
45
|
+
"obra",
|
|
46
|
+
"mattpocock",
|
|
47
|
+
"ComposioHQ"
|
|
48
|
+
],
|
|
49
|
+
"minInstalls": 1000,
|
|
50
|
+
"blocklist": ["known-bad-owner/example"]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Auto-install** is allowed only if all of the following are true:
|
|
56
|
+
|
|
57
|
+
- source owner is in `trustedOwners`
|
|
58
|
+
- install count >= `minInstalls` (default 1000)
|
|
59
|
+
- skill name does not conflict with a managed `opencode-ship` skill
|
|
60
|
+
- the user has not previously blocked this skill in this repo
|
|
61
|
+
|
|
62
|
+
Otherwise:
|
|
63
|
+
|
|
64
|
+
- If the source is untrusted but the skill looks relevant, present 1–3 candidates to the user and wait for a yes/no.
|
|
65
|
+
- If no candidates match, continue without installation.
|
|
66
|
+
|
|
67
|
+
### 4. Install project-locally
|
|
68
|
+
|
|
69
|
+
Auto-approved candidates install to `.opencode/skills/<skill>/SKILL.md` (project-local). The typed tool `ship_skill_install` records every install in the run ledger so `doctor` and `uninstall` can audit it.
|
|
70
|
+
|
|
71
|
+
Manual install if the user prefers global:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx skills add <owner/repo@skill> -g -y
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Prefer project-local unless the user explicitly asks for global.
|
|
78
|
+
|
|
79
|
+
### 5. Report
|
|
80
|
+
|
|
81
|
+
After discovery, emit a one-line summary in the run:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
Skill discovery: <n> candidates, <m> installed (<owner/skill list>).
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If 0 installed, say `Skill discovery: 0 installed, continuing with catalog skills only.`
|
|
88
|
+
|
|
89
|
+
## Hard rules
|
|
90
|
+
|
|
91
|
+
- Never run `npx skills add` for an untrusted source without explicit user approval.
|
|
92
|
+
- Never install a skill that shadows a managed opencode-ship skill (name collision).
|
|
93
|
+
- Never run discovery when offline or when the registry is unreachable. Warn and continue.
|
|
94
|
+
- Never install more than 5 skills in one discovery pass.
|
|
95
|
+
- Never persist discovery results to `ship.config.json`. The discovery is per-task, not per-repo.
|
|
96
|
+
|
|
97
|
+
## Permissions
|
|
98
|
+
|
|
99
|
+
This skill expects the following bash allowances on the host (configured in `ship-controller` frontmatter):
|
|
100
|
+
|
|
101
|
+
- `npx skills find *`
|
|
102
|
+
- `npx skills add *`
|
|
103
|
+
- `ls .opencode/skills`
|
|
104
|
+
- `cat .opencode/skills/*/SKILL.md`
|