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

+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.