opencode-ship 1.1.2-rc.2 → 1.1.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +96 -1
  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/dist/cli.js +2274 -362
  13. package/dist/core.js +794 -10
  14. package/dist/plugin.js +3487 -1795
  15. package/package.json +9 -4
  16. package/tests/plugin/expected-tools.mjs +2 -2
  17. package/tests/plugin/plugin-load.test.mjs +8 -3
  18. package/assets/_archive/issue-tracker-gitlab.md +0 -46
  19. package/assets/_archive/issue-tracker-local.md +0 -30
  20. package/docs/adr/0001-opencode-ship-redesign.md +0 -168
  21. package/docs/release/1.0.0-execution-plan.md +0 -1063
  22. package/docs/release/1.1.1-stabilization-plan.md +0 -655
  23. package/vendor/upstreams/mattpocock/skills/engineering/code-review/SKILL.md +0 -89
  24. package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/DEEPENING.md +0 -37
  25. package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/DESIGN-IT-TWICE.md +0 -44
  26. package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/SKILL.md +0 -114
  27. package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/ADR-FORMAT.md +0 -47
  28. package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/CONTEXT-FORMAT.md +0 -60
  29. package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/SKILL.md +0 -74
  30. package/vendor/upstreams/mattpocock/skills/engineering/grill-with-docs/SKILL.md +0 -7
  31. package/vendor/upstreams/mattpocock/skills/engineering/prototype/LOGIC.md +0 -79
  32. package/vendor/upstreams/mattpocock/skills/engineering/prototype/SKILL.md +0 -26
  33. package/vendor/upstreams/mattpocock/skills/engineering/prototype/UI.md +0 -112
  34. package/vendor/upstreams/mattpocock/skills/engineering/research/SKILL.md +0 -12
  35. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/SKILL.md +0 -116
  36. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/domain.md +0 -51
  37. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
  38. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
  39. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
  40. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/triage-labels.md +0 -15
  41. package/vendor/upstreams/mattpocock/skills/engineering/to-spec/SKILL.md +0 -75
  42. package/vendor/upstreams/mattpocock/skills/engineering/to-tickets/SKILL.md +0 -105
  43. package/vendor/upstreams/mattpocock/skills/engineering/triage/AGENT-BRIEF.md +0 -207
  44. package/vendor/upstreams/mattpocock/skills/engineering/triage/OUT-OF-SCOPE.md +0 -105
  45. package/vendor/upstreams/mattpocock/skills/engineering/triage/SKILL.md +0 -112
  46. package/vendor/upstreams/mattpocock/skills/engineering/wayfinder/SKILL.md +0 -128
  47. package/vendor/upstreams/mattpocock/skills/productivity/grilling/SKILL.md +0 -12
  48. package/vendor/upstreams/mattpocock/skills/productivity/handoff/SKILL.md +0 -16
  49. package/vendor/upstreams/obra/skills/brainstorming/SKILL.md +0 -151
  50. package/vendor/upstreams/obra/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
  51. package/vendor/upstreams/obra/skills/brainstorming/visual-companion.md +0 -298
  52. package/vendor/upstreams/obra/skills/dispatching-parallel-agents/SKILL.md +0 -167
  53. package/vendor/upstreams/obra/skills/executing-plans/SKILL.md +0 -64
  54. package/vendor/upstreams/obra/skills/receiving-code-review/SKILL.md +0 -205
  55. package/vendor/upstreams/obra/skills/requesting-code-review/SKILL.md +0 -95
  56. package/vendor/upstreams/obra/skills/requesting-code-review/code-reviewer.md +0 -172
  57. package/vendor/upstreams/obra/skills/subagent-driven-development/SKILL.md +0 -503
  58. package/vendor/upstreams/obra/skills/subagent-driven-development/implementer-prompt.md +0 -142
  59. package/vendor/upstreams/obra/skills/subagent-driven-development/re-review-prompt.md +0 -106
  60. package/vendor/upstreams/obra/skills/subagent-driven-development/task-reviewer-prompt.md +0 -185
  61. package/vendor/upstreams/obra/skills/systematic-debugging/CREATION-LOG.md +0 -119
  62. package/vendor/upstreams/obra/skills/systematic-debugging/SKILL.md +0 -283
  63. package/vendor/upstreams/obra/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
  64. package/vendor/upstreams/obra/skills/systematic-debugging/condition-based-waiting.md +0 -115
  65. package/vendor/upstreams/obra/skills/systematic-debugging/defense-in-depth.md +0 -122
  66. package/vendor/upstreams/obra/skills/systematic-debugging/find-polluter.sh +0 -72
  67. package/vendor/upstreams/obra/skills/systematic-debugging/root-cause-tracing.md +0 -169
  68. package/vendor/upstreams/obra/skills/systematic-debugging/test-academic.md +0 -14
  69. package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-1.md +0 -58
  70. package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-2.md +0 -68
  71. package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-3.md +0 -69
  72. package/vendor/upstreams/obra/skills/test-driven-development/SKILL.md +0 -320
  73. package/vendor/upstreams/obra/skills/test-driven-development/writing-good-tests.md +0 -198
  74. package/vendor/upstreams/obra/skills/verification-before-completion/SKILL.md +0 -120
  75. package/vendor/upstreams/obra/skills/writing-plans/SKILL.md +0 -168
  76. package/vendor/upstreams/obra/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-ship",
3
- "version": "1.1.2-rc.2",
3
+ "version": "1.1.2",
4
4
  "private": false,
5
5
  "description": "npm-distributed OpenCode installer that materializes the delivery plugin, reviewer/verifier agents, skills, ship config and lock into any consumer repository.",
6
6
  "license": "MIT",
@@ -44,10 +44,14 @@
44
44
  },
45
45
  "files": [
46
46
  "dist",
47
- "assets",
47
+ "assets/agents",
48
+ "assets/commands",
49
+ "assets/skills",
48
50
  "schema",
49
- "docs",
50
- "vendor",
51
+ "vendor/sources.json",
52
+ "vendor/mattpocock/LICENSE",
53
+ "vendor/superpowers/LICENSE",
54
+ "vendor/obra/LICENSE",
51
55
  "tests/plugin/plugin-load.test.mjs",
52
56
  "tests/plugin/expected-tools.mjs",
53
57
  "THIRD_PARTY_NOTICES.md",
@@ -72,6 +76,7 @@
72
76
  "@opencode-ai/plugin": "1.18.10",
73
77
  "@types/node": "^22.10.2",
74
78
  "esbuild": "^0.25.0",
79
+ "jsonc-parser": "3.3.1",
75
80
  "tsx": "^4.23.1",
76
81
  "typescript": "^5.9.3"
77
82
  }
@@ -2,7 +2,7 @@
2
2
  * Canonical opencode-ship tool set.
3
3
  *
4
4
  * The bundled plugin registers exactly 32 typed tools (16
5
- * delivery + 4 control-plane + 12 ship). This module is the
5
+ * delivery + 16 ship). This module is the
6
6
  * single source of truth for the expected set so:
7
7
  *
8
8
  * - the in-process plugin-load test asserts the contract at the
@@ -34,7 +34,7 @@ export const EXPECTED_OPENCODE_SHIP_TOOLS = Object.freeze([
34
34
  "delivery_sync",
35
35
  "delivery_verify",
36
36
  "delivery_worktree",
37
- // 12 ship tools
37
+ // 16 ship tools
38
38
  "ship_final_review",
39
39
  "ship_plan_approve",
40
40
  "ship_plan_start",
@@ -5,10 +5,10 @@
5
5
  * runtime types without booting OpenCode. It verifies:
6
6
  * - the bundled plugin is the default-exported function
7
7
  * - calling it returns an object with a `tool` key
8
- * - the `tool` object exposes exactly the 24 named tool
9
- * definitions (9 delivery + 7 control-plane + 8 workflow)
8
+ * - the `tool` object exposes exactly the 32 named tool
9
+ * definitions (16 delivery + 16 workflow)
10
10
  *
11
- * The canonical 24-tool set is imported from
11
+ * The canonical 32-tool set is imported from
12
12
  * `tests/plugin/expected-tools.mjs`, the single source of truth
13
13
  * shared with the opencode-discovery smoke test.
14
14
  */
@@ -29,6 +29,11 @@ test("plugin: default export is a function", async () => {
29
29
  assert.equal(typeof mod.ShipPlugin, "function");
30
30
  });
31
31
 
32
+ test("plugin: bundle exports only plugin entry functions", async () => {
33
+ const mod = await import(pluginPath);
34
+ assert.deepEqual(Object.keys(mod).sort(), ["ShipPlugin", "default"]);
35
+ });
36
+
32
37
  test("plugin: registers exactly 32 tools", async () => {
33
38
  const mod = await import(pluginPath);
34
39
  const fakeCtx = {
@@ -1,46 +0,0 @@
1
- # Issue tracker: GitLab
2
-
3
- Issues and PRDs for this repo live as GitLab issues. Use the [`glab`](https://gitlab.com/gitlab-org/cli) CLI for all operations.
4
-
5
- ## Conventions
6
-
7
- - **Create an issue**: `glab issue create --title "..." --description "..."`. Use a heredoc for multi-line descriptions. Pass `--description -` to open an editor.
8
- - **Read an issue**: `glab issue view <number> --comments`. Use `-F json` for machine-readable output.
9
- - **List issues**: `glab issue list -F json` with appropriate `--label` filters.
10
- - **Comment on an issue**: `glab issue note <number> --message "..."`. GitLab calls comments "notes".
11
- - **Apply / remove labels**: `glab issue update <number> --label "..."` / `--unlabel "..."`. Multiple labels can be comma-separated or by repeating the flag.
12
- - **Close**: `glab issue close <number>`. `glab issue close` does not accept a closing comment, so post the explanation first with `glab issue note <number> --message "..."`, then close.
13
- - **Merge requests**: GitLab calls PRs "merge requests". Use `glab mr create`, `glab mr view`, `glab mr note`, etc. — the same shape as `gh pr ...` with `mr` in place of `pr` and `note`/`--message` in place of `comment`/`--body`.
14
-
15
- Infer the repo from `git remote -v` — `glab` does this automatically when run inside a clone.
16
-
17
- ## Merge requests as a triage surface
18
-
19
- **MRs as a request surface: no.** _(Set to `yes` if this repo treats external merge requests as feature requests; `/triage` reads this flag.)_
20
-
21
- When set to `yes`, MRs run through the same labels and states as issues, using the `glab mr` equivalents:
22
-
23
- - **Read an MR**: `glab mr view <number> --comments` and `glab mr diff <number>` for the diff.
24
- - **List external MRs for triage**: `glab mr list -F json`, then keep only MRs whose author is not a project member/owner (a contributor's MR, not a maintainer's in-flight work).
25
- - **Comment / label / close**: `glab mr note`, `glab mr update --label`/`--unlabel`, `glab mr close`.
26
-
27
- Unlike GitHub, GitLab numbers issues and MRs separately, so `#42` is unambiguous once you know which surface the maintainer means.
28
-
29
- ## When a skill says "publish to the issue tracker"
30
-
31
- Create a GitLab issue.
32
-
33
- ## When a skill says "fetch the relevant ticket"
34
-
35
- Run `glab issue view <number> --comments`.
36
-
37
- ## Wayfinding operations
38
-
39
- Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
40
-
41
- - **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `glab issue create --label wayfinder:map`. (On GitLab tiers with native epics, an epic may hold the map instead; a labelled issue works everywhere.)
42
- - **Child ticket**: an issue carrying `Part of #<map>` at the top of its description and labels `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
43
- - **Blocking**: GitLab's **native blocking link** — the canonical, UI-visible representation. Add it with the `/blocked_by #<n>` quick action, posted as a note (`glab issue note <child> --message "/blocked_by #<blocker>"`). Native blocking links are a Premium/Ultimate feature; on the free tier (or where unavailable) fall back to a `Blocked by: #<n>, #<n>` line at the top of the description. A ticket is unblocked when every blocker is closed.
44
- - **Frontier query**: `glab issue list -F json` scoped to the map's children, drop any with an open blocker — a native `blocked_by` link to an open issue (`glab api projects/:id/issues/:iid/links`), or an open issue in the `Blocked by` line — or an assignee; first in map order wins.
45
- - **Claim**: `glab issue update <n> --assignee @me` — the session's first write.
46
- - **Resolve**: `glab issue note <n> --message "<answer>"`, then `glab issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
@@ -1,30 +0,0 @@
1
- # Issue tracker: Local Markdown
2
-
3
- Issues and specs (you may know a spec as a PRD) for this repo live as markdown files in `.scratch/`.
4
-
5
- ## Conventions
6
-
7
- - One feature per directory: `.scratch/<feature-slug>/`
8
- - The spec is `.scratch/<feature-slug>/spec.md`
9
- - Implementation issues are one file per ticket at `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01` — never a single combined tickets file
10
- - Triage state is recorded as a `Status:` line near the top of each issue file (see `triage-labels.md` for the role strings)
11
- - Comments and conversation history append to the bottom of the file under a `## Comments` heading
12
-
13
- ## When a skill says "publish to the issue tracker"
14
-
15
- Create a new file under `.scratch/<feature-slug>/` (creating the directory if needed).
16
-
17
- ## When a skill says "fetch the relevant ticket"
18
-
19
- Read the file at the referenced path. The user will normally pass the path or the issue number directly.
20
-
21
- ## Wayfinding operations
22
-
23
- Used by `/wayfinder`. The **map** is a file with one **child** file per ticket.
24
-
25
- - **Map**: `.scratch/<effort>/map.md` — the Notes / Decisions-so-far / Fog body.
26
- - **Child ticket**: `.scratch/<effort>/issues/NN-<slug>.md`, numbered from `01`, with the question in the body. A `Type:` line records the ticket type (`research`/`prototype`/`grilling`/`task`); a `Status:` line records `claimed`/`resolved`.
27
- - **Blocking**: a `Blocked by: NN, NN` line near the top. A ticket is unblocked when every file it lists is `resolved`.
28
- - **Frontier**: scan `.scratch/<effort>/issues/` for files that are open, unblocked, and unclaimed; first by number wins.
29
- - **Claim**: set `Status: claimed` and save before any work.
30
- - **Resolve**: append the answer under an `## Answer` heading, set `Status: resolved`, then append a context pointer (gist + link) to the map's Decisions-so-far in `map.md`.
@@ -1,168 +0,0 @@
1
- # ADR 0001 — `opencode-ship`: npm-distributed, single-command installer
2
-
3
- Status: Accepted
4
-
5
- ## Context
6
-
7
- The current package, `opencode-delivery`, is a private source-level ESM
8
- core library. Consumer projects adopt it by copying a project plugin
9
- shim into `opencode.json` and pinning a Git commit hash. Each new
10
- release is a manual PR into every consumer repo. There is no CLI, no
11
- generated plugin bundle, no managed-file policy, and no upgrade path
12
- short of consumer-side edits.
13
-
14
- Consumer pain observed in the wild:
15
-
16
- - Every onboarding requires editing `opencode.json`, copying the shim,
17
- copying the two agents, copying the two skills, copying the
18
- `delivery.json` adapter, copying the workflow lock, and remembering to
19
- rename the plugin when the package moves.
20
- - Updates require a Git ref ping and a manual diff; tooling cannot
21
- reason about who owns which file.
22
- - Cleanup is only triggered manually and silently fails when the local
23
- branch head SHA drifts from the manifest.
24
-
25
- ## Decision
26
-
27
- Re-establish the package as `opencode-ship`, a publishable npm module
28
- with three surfaces:
29
-
30
- 1. A self-contained compiled ESM OpenCode plugin at the package root
31
- (`opencode-ship`) that registers the canonical nine `delivery_*`
32
- tools and removes the need for any consumer-side plugin wrapper.
33
- 2. A first-class CLI (`opencode-ship` binary) materialising every
34
- required asset in the consumer repo through five idempotent commands.
35
- 3. A `opencode-ship/core` subpath that preserves the existing library
36
- surface so consumer scripts that already import from the package can
37
- migrate at their own pace.
38
-
39
- ### Managed-file policy
40
-
41
- Five output classes are installer-managed and recorded in the lock:
42
-
43
- - `.opencode/plugins/opencode-ship.js` — the bundled plugin.
44
- - `.opencode/agents/delivery-reviewer.md`,
45
- `.opencode/agents/delivery-verifier.md`.
46
- - `.opencode/skills/delivery-workflow/SKILL.md`,
47
- `.opencode/skills/planning-research-checkpoint/SKILL.md`.
48
- - `.opencode/ship.config.json` — user-owned, written only on the
49
- first `init` if missing.
50
- - `.opencode/ship.lock.json` — installer-managed.
51
-
52
- Root `opencode.json` / `opencode.jsonc` is a shared document. The
53
- installer owns only the Build-agent delivery permissions and the
54
- delivery subagent delegation allow-list; everything else stays.
55
-
56
- `update` only replaces managed files whose hashes still match the
57
- previous manifest. Modified managed files are refused with a precise
58
- conflict report; the user either restores the upstream bytes (the
59
- preferred repair) or opts into `--replace-managed`. We never silently
60
- overwrite.
61
-
62
- ### Reconciliation algorithm
63
-
64
- For each managed target, three hashes are computed:
65
-
66
- - `B` = the SHA-256 stored in the previous lock for that path.
67
- - `C` = the SHA-256 of the bytes currently on disk.
68
- - `D` = the SHA-256 of the bytes we want to install.
69
-
70
- The combination determines the action:
71
-
72
- | Condition | Plan |
73
- | --- | --- |
74
- | No lock, target absent | `create` |
75
- | No lock, target present | `report` (unowned collision) |
76
- | `C == B == D` | `noop` |
77
- | `C == B`, `D != B` | `update` |
78
- | `C == D`, `C != B` | `converge` (refresh lock only) |
79
- | `C != B`, `C != D` | `conflict` (refuse) |
80
- | Target removed, `C == B` | `delete` |
81
- | Target removed, `C != B` | `conflict` |
82
-
83
- Conflict semantics are uniform across `init`, `update`, and `uninstall`.
84
-
85
- ### Transactions
86
-
87
- Multi-file updates are recoverable but not truly atomic. The transaction
88
- layer:
89
-
90
- 1. Acquires an exclusive repository lock file under `.git/opencode-ship/`.
91
- 2. Re-reads and re-hashes every target before staging.
92
- 3. Stages each target as a sibling temporary file and `fsync`s it.
93
- 4. Writes a journal recording original paths, backup paths, hashes,
94
- and operation order.
95
- 5. Renames each managed target to a backup, then promotes the staged
96
- copy into place, then `fsync`s the parent directory.
97
- 6. Promotes the new lock last as the commit marker.
98
- 7. Removes backups and journal after commit.
99
-
100
- Pre-commit failures roll back in reverse order. Post-commit failure
101
- treats the plan as committed and surfaces a degraded-cleanup warning;
102
- the journal is cleaned on the next mutating command.
103
-
104
- ### CLI surface
105
-
106
- ```
107
- opencode-ship init [--root <path>] [--config <path>] [--force-config]
108
- opencode-ship diff [--root <path>] [--json] [--config <path>]
109
- opencode-ship update [--root <path>] [--json] [--replace-managed]
110
- opencode-ship doctor [--root <path>] [--json]
111
- opencode-ship uninstall [--root <path>] [--json] [--purge-config]
112
- opencode-ship --version
113
- ```
114
-
115
- Exit codes:
116
-
117
- - `0` success / no-op
118
- - `1` expected negative result (`diff` saw changes; `doctor` unhealthy)
119
- - `2` invalid input, unsupported project, ambiguous detection
120
- - `3` ownership/hash/structural conflict
121
- - `4` filesystem, staging, rollback, or transaction failure
122
- - `5` unsupported lock/config schema
123
-
124
- ### Plugin + cleanup hardening
125
-
126
- The bundled plugin no longer assumes `minimax/MiniMax-M3`; model
127
- inheritance is the default. The verifier agent gains explicit denials
128
- for the other eight tools so isolation is symmetric to the reviewer.
129
- The Build agent gains explicit denials for `delivery_review` and
130
- `delivery_verify`, plus an `ask` rule for `delivery_merge`. The
131
- GitHub driver replaces the unsupported `gh pr view --json merged` field
132
- with a typed `gh pr view ... --json state,mergedAt`.
133
-
134
- Post-merge cleanup moves to immediate, atomic-enough execution after
135
- an explicit user-authorised merge: validate the preconditions, persist
136
- `cleanup-pending`, perform the worktree removal and CAS-style branch
137
- deletion, seal the manifest, retry on the next delivery task if any
138
- step failed. No force removal and no OpenCode restart.
139
-
140
- ### Compatibility strategy
141
-
142
- Legacy `.opencode/delivery.json`, `.opencode/delivery.lock.json`, the
143
- two agents, the two skills, and the generic `delivery.ts` wrapper
144
- shape are recognised. Migration is opt-in by running `init` from a
145
- checkout that already has those files. The consumer keeps the
146
- existing manifest directory (`opencode-delivery/` under the Git common
147
- dir) untouched to avoid stranding in-flight deliveries.
148
-
149
- ## Consequences
150
-
151
- - Consumer repo touches only `.opencode/` and root
152
- `opencode.json`/`.jsonc`. Initial onboarding becomes
153
- `pnpm dlx opencode-ship init`.
154
- - Upgrades become `opencode-ship update`, with conflicts surfaced
155
- instead of overwritten.
156
- - The library surface stays public through `opencode-ship/core`.
157
- - v0.1.x becomes a legacy package; v0.2.0 is the first npm-distributed
158
- release.
159
- - The lock introduces a migration concern that the installer's
160
- `doctor` must surface if the lock format is too old.
161
- - A `cleanupPending` schedule runs only on consumer demand (the next
162
- delivery start), never on package installation.
163
-
164
- ## Non-goals
165
-
166
- - Publishing to a registry is deferred until this PR is approved.
167
- - Migrating Leo into `opencode-ship` consumers is a separate follow-up.
168
- - Changing the lifecycle state machine semantics.