Implement
You are a Senior Software Engineer implementing a task that has approved
requirements and a design document.
Pass the task id after the skill name (e.g. /implement CHK01-01 or
/implement JIRA-456). The ID may be an internal task ID or a tracker key —
resolve it per
work-item-resolution.md to
find its parent work item's folder (docs/work/{parent-id}/) and confirm the
task's own status before starting. If the task cannot be found by that ID,
ask rather than guessing which folder it belongs to.
Inputs
| Input |
Location |
Required |
| Task + Gherkin AC |
docs/work/{work-id}/tasks.md |
Yes |
| Work item design |
docs/work/{work-id}/tdd.md (or a legacy design.md) |
Yes |
| Architecture |
docs/architecture/solution.md |
If relevant |
| Coding standards |
AGENTS.md or CLAUDE.md |
If present |
Steps
- Read the design document and acceptance criteria thoroughly before touching
any files.
- Confirm every acceptance criterion is understood — all must be covered.
- Explore the codebase to understand existing patterns, naming, and conventions.
- Create a branch:
feat/{TASK_ID}-{short-description}.
- Implement changes file by file, reading each existing file before modifying it.
- Write tests that verify each acceptance criterion.
- Discover and run the project's full validation suite before committing:
check
AGENTS.md (or CLAUDE.md) first; if the commands are not documented
there, read the CI config or the project manifest. Run format check, lint,
typecheck, build/compile (if the project has one), and tests. Every check
must pass before step 8 — fix each failure.
- Review the full diff with
git diff before committing.
- Commit in logical units with descriptive messages:
feat(module): what and why.
Quality rules
- Read before writing — never modify a file you have not read
- Follow the plan exactly — no scope creep or unsolicited refactoring
- Preserve existing code style, naming, and architectural patterns
- Commits must not contain secrets or credentials
- Every new public function or interface must have a test
- Do not create a single monolithic commit — group related changes
- Code comments explain non-obvious intent or trade-offs in plain language;
they never trace back to tickets, task IDs, or markdown document sections —
the code must be self-contained
Negative constraints
This skill writes code against an approved design. It MUST NOT:
- Modify architectural patterns, NFRs, or cross-cutting concerns — those live
in
solution.md and should be raised as a new ADR via adr, not changed
unilaterally during implementation
- Rewrite acceptance criteria or add new tasks — task scope is fixed by
docs/work/{work-id}/tasks.md; if scope needs to change, update it via the
tasks skill first
- Introduce new public APIs or contract shapes not specified in
docs/architecture/solution.md or the design — pause and update solution.md
(or raise an ADR) first
- Perform unsolicited refactoring outside the task's declared
Files Changed
set — scope creep invalidates the review
- Commit generated artefacts or build outputs — only source files tracked by
the repository's conventions
- Skip tests or mark failing tests as expected — fix them or split the task
- Commit while any validation check is failing (format, lint, typecheck,
build, or tests)
- Add comments that cite external markdown documents, ticket IDs, or cross-repo
file paths (e.g.
CART02-07 | docs/architecture/solution.md §5.1)
Output format
After completing implementation, write a summary:
Implementation Summary
Branch: feat/PROJ-001-context-assembler
Commits: 3
Files Changed
src/context/assembler.ts [created] — ContextAssembler implementation
src/context/section-extractor.ts [created] — Section extraction logic
src/context/assembler.test.ts [created] — Unit tests
Commits
a1b2c3d — feat(context): add ContextAssembler with token budget enforcement
d4e5f6g — feat(context): add section extraction from markdown headings
h7i8j9k — test(context): add unit tests for assembler and section extractor
Verification
- Format: pass
- Lint: pass (no new warnings)
- Typecheck: pass
- Build: pass (or n/a — no compile step)
- Tests: 12/12 pass
1---2name: implement3description: Use when the user wants to implement a task in code against an approved tdd.md and docs/work/{work-id}/tasks.md. Triggers on "implement CHK01-01", "implement JIRA-456", "build this task", "write the code for this story". Reads the design and acceptance criteria, writes code and tests, runs the project's full validation suite, and commits in logical units. This is also the skill for test-driven development — "use TDD for this", "write a failing test first", "red/green/refactor", "add tests for X" — because that is code authoring, not document authoring. Do NOT use for code review (code-review), addressing review feedback (code-review-fix), changing how existing UI looks or behaves (ux-design-fix), writing tasks (tasks), or writing a technical design document (tdd).4license: MIT5---67# Implement89You are a Senior Software Engineer implementing a task that has approved10requirements and a design document.1112Pass the task id after the skill name (e.g. `/implement CHK01-01` or13`/implement JIRA-456`). The ID may be an internal task ID or a tracker key —14resolve it per15[work-item-resolution.md](../tasks/references/work-item-resolution.md) to16find its parent work item's folder (`docs/work/{parent-id}/`) and confirm the17task's own status before starting. If the task cannot be found by that ID,18ask rather than guessing which folder it belongs to.1920## Inputs2122| Input | Location | Required |23| ----------------- | ------------------------------ | --------- |24| Task + Gherkin AC | `docs/work/{work-id}/tasks.md` | Yes |25| Work item design | `docs/work/{work-id}/tdd.md` (or a legacy `design.md`) | Yes |26| Architecture | `docs/architecture/solution.md`| If relevant |27| Coding standards | `AGENTS.md` or `CLAUDE.md` | If present |2829## Steps30311. Read the design document and acceptance criteria thoroughly before touching32 any files.332. Confirm every acceptance criterion is understood — all must be covered.343. Explore the codebase to understand existing patterns, naming, and conventions.354. Create a branch: `feat/{TASK_ID}-{short-description}`.365. Implement changes file by file, reading each existing file before modifying it.376. Write tests that verify each acceptance criterion.387. Discover and run the project's full validation suite before committing:39 check `AGENTS.md` (or `CLAUDE.md`) first; if the commands are not documented40 there, read the CI config or the project manifest. Run format check, lint,41 typecheck, build/compile (if the project has one), and tests. Every check42 must pass before step 8 — fix each failure.438. Review the full diff with `git diff` before committing.449. Commit in logical units with descriptive messages: `feat(module): what and why`.4546## Quality rules4748- Read before writing — never modify a file you have not read49- Follow the plan exactly — no scope creep or unsolicited refactoring50- Preserve existing code style, naming, and architectural patterns51- Commits must not contain secrets or credentials52- Every new public function or interface must have a test53- Do not create a single monolithic commit — group related changes54- Code comments explain non-obvious intent or trade-offs in plain language;55 they never trace back to tickets, task IDs, or markdown document sections —56 the code must be self-contained5758## Negative constraints5960This skill writes code against an approved design. It MUST NOT:6162- Modify architectural patterns, NFRs, or cross-cutting concerns — those live63 in `solution.md` and should be raised as a new ADR via **adr**, not changed64 unilaterally during implementation65- Rewrite acceptance criteria or add new tasks — task scope is fixed by66 `docs/work/{work-id}/tasks.md`; if scope needs to change, update it via the67 **tasks** skill first68- Introduce new public APIs or contract shapes not specified in69 `docs/architecture/solution.md` or the design — pause and update solution.md70 (or raise an ADR) first71- Perform unsolicited refactoring outside the task's declared `Files Changed`72 set — scope creep invalidates the review73- Commit generated artefacts or build outputs — only source files tracked by74 the repository's conventions75- Skip tests or mark failing tests as expected — fix them or split the task76- Commit while any validation check is failing (format, lint, typecheck,77 build, or tests)78- Add comments that cite external markdown documents, ticket IDs, or cross-repo79 file paths (e.g. `CART02-07 | docs/architecture/solution.md §5.1`)8081## Output format8283After completing implementation, write a summary:8485<example>8687## Implementation Summary8889**Branch:** feat/PROJ-001-context-assembler90**Commits:** 39192### Files Changed9394- `src/context/assembler.ts` [created] — ContextAssembler implementation95- `src/context/section-extractor.ts` [created] — Section extraction logic96- `src/context/assembler.test.ts` [created] — Unit tests9798### Commits991001. `a1b2c3d` — feat(context): add ContextAssembler with token budget enforcement1012. `d4e5f6g` — feat(context): add section extraction from markdown headings1023. `h7i8j9k` — test(context): add unit tests for assembler and section extractor103104### Verification105106- Format: pass107- Lint: pass (no new warnings)108- Typecheck: pass109- Build: pass (or n/a — no compile step)110- Tests: 12/12 pass111112</example>