implement-spec
Use when the user wants the result of /to-spec and /to-tickets implemented in code.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- implement-spec
- metadata
- { "upstream": "mattpocock/skills" }
- description
- Use when the user wants the result of /to-spec and /to-tickets implemented in code.
02 资源文件 1
- 参考文档agents/openai.yaml168 B
03 SKILL.md 正文
You have been provided a spec. This spec should have tickets associated with it, describing how to implement the spec.
The issue tracker should have been provided to you. If not, tell the user to run /setup-matt-pocock-skills.
The goal is the entire spec implemented on a single integration branch, with every ticket resolved the way the issue tracker closes work.
The tickets are not a list of steps. They are a task graph with blocking relationships between them. This means there is always a frontier of tickets which are ready to be grabbed.
Start every subagent with a fresh context window.
Communication to and from subagents should be sparse. Communicate primarily through context pointers: to the spec, tickets, research notes, and previous commits. Don't duplicate information already available via pointers.
Implementer subagents should be run in the background where possible for maximum concurrency.
Steps
-
Read the spec and tickets to understand the task graph.
-
(optional) Use an exploration subagent to conduct any exploration required by the tickets - relevant codebase files or external documentation. Ensure the exploration subagent can save files - it should save its markdown notes in a directory outside the repo, accessible by all future subagents. This lets implementer subagents focus on implementation rather than exploration.
-
Create the integration branch and record its base commit. Open a draft PR only when the user asked for one, after the first merge in step 5 (a branch with no commits ahead of main can't open one), marked as closing the spec and tickets. Otherwise the PR opens at step 8.
-
Use a fresh implementer subagent for each ticket, each in its own worktree on its own branch. Each prompt names the integration branch and its base commit, because isolated worktrees start from the default branch. Per-ticket gates are typecheck, lint and the tests in the files the ticket touched, plus
test:pgonly when it changes SQL or stored data; the full suites run once on the integration head in step 8, because on a linear graph per-ticket full suites add up serially. Implementers that do run full local test suites run at most two at a time on one workstation (through a host lock such asheavywhere one exists), and each commits its slice before the next starts: a harness restart kills background subagents and their uncommitted work. Each implementer subagent:- confirms its worktree is based on the integration branch before starting, and resets onto it if not;
- calls the Skill tool with
tddto build the ticket; - before each commit, reads each touched package's
lintscript in package.json and runs every command in it (through./node_modules/.bin/<tool>in a linked worktree), checking an exit status per command; a workaround for one broken check is not the list of checks; - merges the integration branch tip into its own branch before reporting done
- runs the typecheck the brief names, which is
tsc -p <tsconfig> --noEmitfor each referenced config, nevertsc -bor a baretsc --noEmiton a solution tsconfig (files: []checks nothing); where worktrees linknode_modulesfrom the main checkout, incremental output and workspace links resolve to another branch's state, so it counts as unproven until the CI image build confirms it - reproduces any intermittent failure in a test file the branch touched by running the touched files together in one process, in each order, before calling it pre-existing or flaky (a shared mock under
isolate: falseleaks this way)
-
Once an implementer subagent completes, verify
git merge-base --is-ancestor <base> <branch>, then merge its work to the integration branch. When the ticket tip descends from the integration branch, fast-forward it yourself; use a merger subagent only when the merge has conflicts to resolve. -
If this changes the frontier of available tickets, kick off more implementer subagents to work on the new tickets. This allows for maximum concurrency. A frontier ticket that depends on a precondition a still-running sibling changes (auth required, a signature, a shared data shape) stacks on that sibling's branch instead of the integration branch.
-
Once all tickets are complete, call the Skill tool with
code-reviewon the integration branch. Start it earlier, on the merged prefix, as soon as the remaining frontier is one small ticket, and review that ticket's diff in the fix round. Fix all issues raised by the code review in a single fresh implementer subagent. -
Read the repo's CI entry point (its CI workflow,
make cior the equivalent) and run each of its steps locally, or list the ones skipped and why. This is where the full test suites run, once, on the integration head; done means they pass. A containerised target that mounts the checkout fails from a worktree, whose.gitfile points outside the mount: run it from agit clone --branch <integration>, and delete the clone through the same container user. A PR that closes several tickets writes one closing keyword per ticket ("Closes #1. Closes #2."); confirm withgh pr view --json closingIssuesReferences. Then, if a draft PR exists, mark it ready for review; otherwise open the PR, or resolve each ticket the way the issue tracker closes work, and report the integration branch. For a product with a user-facing UI, the done report says whether visual design was done and shows one screenshot. -
Clean up all implementer subagent worktrees. Delete a ticket branch only after
git merge-base --is-ancestor <branch> <integration>succeeds, then withgit branch -D(-drefuses branches merged by squash or rebase).
04 同仓库更多 Skills
tdd
Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
task-observer
Use when the user asks to log a skill observation, review the observation log, run a skill review, or discuss skill taxonomy, or says "One Skill to Rule Them All". Not for a subagent dispatched by a session already running it: that subagent puts its findings in its report.
software-factory
Use when designing a software factory, choosing the services it plugs into, or defining the tasks it runs.
no-comments
Use when the user wants scoped code comments reviewed, accepted findings fixed, or claimed constraints encoded as enforceable checks.
no-ai-slop
Use when the user wants a draft edited to read clearer, more direct, more opinionated, or less AI-sounding, wants AI-slop patterns flagged without a rewrite, or asks whether writing reads as AI.
merged
Use when a pull request has merged and the local repo should be cleaned up for the next piece of work, whether the user says so, runs /merged, or wait_merged.sh exits 0.