chore: scaffold @haylan/opencode-pocock package

This commit is contained in:
haylan committed 2026-10-14 11:55:12 +02:00
1 parent 03e8e0391a
commit 23fc465701
9 files changed
+4209

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
node_modules/
dist/
.release/
package.tgz
*.tgz
+9
View File
@@ -0,0 +1,9 @@
node_modules/
dist/
.release/
package.tgz
upstream/
skills/
docs/skill-mapping.md
CHANGELOG.md
package-lock.json
+4
View File
@@ -0,0 +1,4 @@
{
"semi": false,
"printWidth": 100
}
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 haylan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+17
View File
@@ -0,0 +1,17 @@
This package vendors and redistributes third-party material:
- skills/ (except agents/*.md system prompts written for this package) is a verbatim snapshot of
the skills from Matt Pocock's "skills" repository (https://github.com/mattpocock/skills),
Copyright (c) Matt Pocock, licensed under the MIT License. The upstream revision is recorded in
upstream/UPSTREAM.json and .opencode/state/upstream.json. All engineering discipline in the
skills is Matt Pocock's work.
- The `pr` skill incorporates material from Dex Horthy's "show-me" skill
(https://github.com/humanlayer/skills), attributed in the skill's frontmatter
(metadata.credits) and CREDITS.md, preserved verbatim.
- The orchestrator/worker agent design is adapted from mcdays94/pocock-agents
(https://github.com/mcdays94/pocock-agents), Copyright (c) mcdays94, MIT License.
- The Gitea npm registry release scripts are adapted from haylan/fastcrw-opencode-websearch,
Apache-2.0.
+94
View File
@@ -0,0 +1,94 @@
# @haylan/opencode-pocock
[OpenCode](https://opencode.ai) v2 integration for [Matt Pocock's skills](https://github.com/mattpocock/skills):
the upstream skills injected verbatim as OpenCode skills, plus generated agents that run his
skill-driven engineering flow — grill an idea, turn it into a spec and tickets, build test-first
with parallel workers in isolated git worktrees, review, retro.
All engineering discipline is Matt Pocock's; this package only supplies the OpenCode v2 wiring.
Upstream is synced nightly and the package republished on change (see `CHANGELOG.md` for the
upstream revision each release carries).
## Install
1. Add the plugin (from the Gitea registry, or npm once published there):
```jsonc
// opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["@haylan/opencode-pocock"]
}
```
The plugin injects all skills at startup — no files copied into your repo.
2. Install the agents (OpenCode discovers agents only as markdown files, and plugins cannot
register them, so this one copy step is required):
```bash
npx @haylan/opencode-pocock init # project: .opencode/agents/
npx @haylan/opencode-pocock init -g # or global: ~/.config/opencode/agents/
```
3. Once per repo, run `/setup-matt-pocock-skills` in OpenCode. It configures the issue tracker,
triage labels and domain docs that `to-spec`, `to-tickets`, `triage`, `implement`,
`implement-spec`, `code-review` and `wayfinder` depend on.
## Usage
Start OpenCode with the `pocock` agent selected and describe what you want to build:
```bash
opencode --agent pocock
```
| Agent | Role |
| --- | --- |
| `pocock` | Primary orchestrator. Routes with `ask-matt`, walks grill → spec → tickets → build → review → retro, proposes before each user-invoked step, runs `implement-spec` with one git worktree per ticket and parallel `pocock-worker` subagents. |
| `pocock-worker` | Subagent. Builds one ticket test-first (`tdd` at the spec's seams) inside its worktree, merges the integration tip, reports. Never pushes. |
| `pocock-reviewer` | Subagent. Read-only executor of one `code-review` axis (Standards or Spec). |
23 of the 31 vendored skills are user-invoked upstream (`disable-model-invocation: true`);
OpenCode v2 honors that natively — they stay out of the model's auto-selection and are run by you
as slash commands (`/to-spec`, `/retro`, ...).
Both agents may create worktrees under `/tmp/pocock-workers`. If you use subagents that write
there (exploration notes), consider a global permission rule:
```json
{ "permission": { "external_directory": { "/tmp/pocock-workers/*": "allow" } } }
```
## Plugin options
```jsonc
{
"plugins": [
{
"package": "@haylan/opencode-pocock",
// Ports skills/misc/git-guardrails-claude-code to OpenCode: blocks dangerous git
// commands (push --force, reset --hard, clean -f, branch -D, ...) before execution.
"options": { "guardrails": true }
}
]
}
```
## Development
- `npm run sync` — update `upstream/` snapshot from mattpocock/skills (script-only; never
hand-edit `upstream/` or `skills/`).
- `npm run generate` — regenerate `skills/` + `manifest.json` from `upstream/` and
`.opencode/state/classification.json`.
- `npm test` / `npm run check` / `npm run build` — unit + integration tests (`node --test` on TS),
prettier + tsc gate, build.
- `npm run smoke` — boots `opencode serve` against a fixture and verifies plugin/skills/agents
over the HTTP API (needs a local `opencode` binary; no model calls).
Design and rationale: [`docs/architecture.md`](docs/architecture.md).
Per-skill classification: [`docs/skill-mapping.md`](docs/skill-mapping.md).
## License
MIT — see [`LICENSE`](LICENSE) and [`NOTICE`](NOTICE) for upstream attributions.
+3997
View File
File diff suppressed because it is too large. Load diff
+47
View File
@@ -0,0 +1,47 @@
{
"name": "@haylan/opencode-pocock",
"version": "0.0.0-dev",
"description": "OpenCode v2 plugin and agents running Matt Pocock's skill-driven engineering flow: skills injected verbatim, orchestrator/worker/reviewer agents, nightly upstream sync",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"bin": {
"opencode-pocock": "./dist/init.js"
},
"files": [
"dist",
"skills",
"agents",
"manifest.json",
"NOTICE"
],
"engines": {
"node": ">=22.18"
},
"scripts": {
"build": "tsc",
"format": "prettier --write .",
"check": "prettier --check . && tsc --noEmit",
"test": "node --test test/",
"sync": "node scripts/sync-upstream.ts",
"generate": "node scripts/generate.ts",
"smoke": "node scripts/smoke.ts"
},
"repository": {
"type": "git",
"url": "https://git.arthurerlich.de/haylan/mattpocock-skills-opencode.git"
},
"license": "MIT",
"dependencies": {
"@opencode/plugin": "^2.0.29"
},
"devDependencies": {
"@types/node": "^26.6.4",
"prettier": "^3.9.9",
"typescript": "^7.0.2"
}
}
+15
View File
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"declaration": true,
"outDir": "dist",
"rootDir": "src",
"types": ["node"],
"skipLibCheck": true,
"rewriteRelativeImportExtensions": true
},
"include": ["src"]
}