AGENT SKILL

implement

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

License 许可
MIT
最近更新
2026-08-20
Stars
★ 2
Forks
0

01 前言 Front Matter

name
implement
license
MIT
metadata
{ "owner": "web-development", "author": "Carinya Parc", "version": "2.0", "work_shape": "targeted-change", "output_class": "code-change" }
description
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).
allowed-tools
Read Write Edit Glob Grep Bash
argument-hint
<task-id>
compatibility
Requires git and the project's own validation toolchain (formatter, linter, typechecker, test runner).

03 SKILL.md 正文

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

  1. Read the design document and acceptance criteria thoroughly before touching any files.
  2. Confirm every acceptance criterion is understood — all must be covered.
  3. Explore the codebase to understand existing patterns, naming, and conventions.
  4. Create a branch: feat/{TASK_ID}-{short-description}.
  5. Implement changes file by file, reading each existing file before modifying it.
  6. Write tests that verify each acceptance criterion.
  7. 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.
  8. Review the full diff with git diff before committing.
  9. 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:

<example>

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

  1. a1b2c3d — feat(context): add ContextAssembler with token budget enforcement
  2. d4e5f6g — feat(context): add section extraction from markdown headings
  3. 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

</example>

04 同仓库更多 Skills

carinyadigital
carinyadigital/skills

skill-name

Replace with description of the skill and when the agent should use it.

★ 2
carinyadigital
carinyadigital/skills

validate

Use when the user wants final completion sign-off on any work item — epic, story, bug, or spike: every task in docs/work/{work-id}/tasks.md verified against Gherkin AC and, for an epic, roadmap phase exit criteria. Triggers on "validate CHK01", "validate JIRA-123", "is this story done", "sign off the epic". Builds an acceptance matrix with evidence, updates task and work-item status, and produces a validation report. Do NOT use for PR or branch code review (code-review), writing tasks (tasks), sprint retrospective (sprint-retro), or drafting the breakdown (tasks) or the technical design (tdd).

★ 2
carinyadigital
carinyadigital/skills

ux-design-review

Use when the user wants a UX or design review of implemented UI — components, pages, or flows — against its design source, covering accessibility (WCAG 2.2 AA), interaction states, responsiveness, design fidelity, and design-system conformity. Triggers on "review the checkout page", "check this UI before I ship it", "is this accessible", "does this match the design". Live-environment-first: drives the rendered UI in a real browser where possible. Works with any framework or design tooling. Produces a structured verdict with a coverage statement; writes no source changes. Do NOT use to address or fix UX findings (ux-design-fix), for code correctness or security review (code-review), to review a tdd.md document (docs-review), or to implement features (implement).

★ 2
carinyadigital
carinyadigital/skills

ux-design-fix

Use when the user wants to change how existing UI looks or behaves — fix spacing, colour, layout, states, responsiveness, or accessibility on a component, page, or flow. Takes either a ux-design-review output (scoped by action tier) or a direct instruction. Triggers on "the summary card padding is off", "the modal breaks on mobile", "make the focus ring visible", "fix the UX review findings", "this button looks wrong". Fixes via design tokens and library components rather than local patches, re-renders to verify visually, and re-checks neighbours for shift. Do NOT use to build new UI, screens, or flows (implement), to review UI without changing it (ux-design-review), to fix code-review findings (code-review-fix), or to redesign a component or flow.

★ 2
carinyadigital
carinyadigital/skills

tdd

Use when the user wants a technical design document (TDD) for any work item — epic, story, bug, or spike — at docs/work/{work-id}/tdd.md, in skeleton or full mode. Pass a work item ID (CHK01, or a Linear/Jira/GitHub key like JIRA-123). Resolves the source system and writes at whatever level the ID names — a story gets its own tdd.md beside its parent epic's, not nested inside it. Cite solution.md — do not re-narrate architecture. Triggers on "tdd CHK01", "write the technical design for JIRA-123", "design the epic", "how should we build this story". For reviewing an existing tdd.md, use docs-review instead. Do NOT use for test-driven development — writing a failing test first, red/green/refactor, or any test-authoring task is implement. Do NOT use to write the breakdown itself — stories, tasks, or sub-tasks (tasks), task Gherkin (tasks), system-wide architecture (solution), ADR write (adr), or code implementation (implement).

★ 2
carinyadigital
carinyadigital/skills

tasks

Use to decompose anything into delivery work — a product strategy and roadmap into epics, an epic into stories and tasks with Gherkin acceptance criteria, a story into sub-tasks, or an external spec, RFC, or PRD into both in one pass. Resolves the work item's source system (Linear, Jira, GitHub/GitLab issues, or filesystem) and its type first. Writes docs/product/backlog.md and docs/work/{work-id}/tasks.md, or the tracker directly when one is resolved. Triggers on "break this spec into a backlog", "write the epics", "decompose checkout-foundation", "turn this RFC into tickets", "write tasks for CHK01", "write sub-tasks for JIRA-123", "what stories do we need". EARS with --ears. Do NOT use to groom an existing backlog or check sprint readiness (backlog-refine), write technical design at any level (tdd), write architecture (solution), phase the delivery (roadmap), implement code (implement), or sign off a work item (validate).

★ 2