/engineering:implement
/implement — Implement an Epic as Stacked PRs
Implement an existing epic as a chain of stacked PRs, one per sub-issue, in order. Use when user wants to implement an epic, build out a planned feature, or execute on a `/spec`-produced plan. Pairs with `/spec` (planning) and `/review` (PR comment handling).
<epic issue number> Takes an existing epic (created by `/spec`) and implements each sub-issue in a stacked branch, opening one stacked PR per sub-issue. Does NOT create or modify GitHub issues — that is `/spec`'s job.
Full skill instructions
This is the same file the agent loads when the skill triggers. Source: plugins/engineering/skills/implement/SKILL.md.
Instructions
When the user runs /implement <epic-issue-number>, follow this workflow:
Phase 1: Read the Epic
- Fetch the parent issue and all linked sub-issues:
gh issue view <epic-number> - List the sub-issues in order and confirm the implementation sequence with the user before writing any code.
Phase 2: Implement in Stacked Branches
For each sub-issue, in order:
Create the branch — stacked on the previous (first branch is from
main):git checkout -b <branch-name>Branch naming: mirror the sub-issue title slug, e.g.
refactor/proto-rename-action-type-think,feat/llm-inference-interface.Implement the code changes for this sub-issue only. Do not include changes belonging to later sub-issues.
Build and test before committing:
go build ./... && make testCommit with Conventional Commits + issue reference:
type(scope): description <summary of what changed and why> Closes #<sub-issue>Push the branch:
git push origin <branch-name>
Phase 3: Create Stacked PRs
For each branch, create a PR targeting the previous branch (not main), except the first which targets main:
gh pr create \
--base <previous-branch-or-main> \
--head <this-branch> \
--title "type(scope): description" \
--body "..."
Every PR body must contain:
Closes #<sub-issue>— wires the sub-issue to auto-close on mergePart of #<parent-epic>— links back to the epicStacked on #<previous-PR>— for PRs 2 and beyond
Phase 4: Update the Parent Issue
Edit the parent issue body to mark each step as done with its sub-issue and PR numbers:
gh issue edit <epic-number> --body "..."
Checklist format:
- [x] #<sub-issue-1> — type(scope): description → PR #<pr-1>
- [x] #<sub-issue-2> — type(scope): description → PR #<pr-2>
Rules
- Do NOT create or edit sub-issues — those already exist from
/spec - One branch = one commit = one PR = one sub-issue; never combine steps
- Always build and test before committing each branch
- Stacked PRs must NOT target
mainexcept the first — targetingmainbreaks the stack - Confirm the implementation plan with the user before writing any code