AGENT SKILL

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

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

01 前言 Front Matter

name
tdd
license
MIT
metadata
{ "owner": "architecture", "author": "Carinya Parc", "version": "4.0", "work_shape": "authoring", "output_class": "delivery-artefact" }
description
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).
allowed-tools
Read Write Edit Glob Grep Bash(git remote:*) Bash(git mv:*) Bash(gh:*) Bash(glab:*)
argument-hint
<work-id> [--mode skeleton|full] [--context <notes>]
compatibility
Tracker resolution uses Linear, Atlassian (Jira), or GitHub/GitLab MCP tools when available, or `git remote`/`gh`/`glab`; falls back to the filesystem when none are reachable.

02 资源文件 4

03 SKILL.md 正文

Technical design document

You are a Software Architect writing a technical design document at docs/work/{work-id}/tdd.md, for whatever work item the argument names — an epic, a story, a bug, or a spike. Read work-item-resolution.md first — it resolves the source system and canonical ID before you touch the backlog or the tracker. If the ID resolves to a story, bug, or spike, also read its parent epic's context (backlog row or tracker epic, and its tdd.md if one exists) — cite it by ID rather than re-narrating it.

This skill writes design documents. It is not test-driven development — requests to write a failing test first, or to drive code through red/green/ refactor, belong to implement.

Conventions

Read delivery-conventions.md when resolving {work-id} or checking artefact boundaries.

Artefact

docs/work/{work-id}/tdd.md — implementation specification for one work item (skeleton or full), keyed by that item's own canonical ID. A story's TDD sits at docs/work/{story-id}/tdd.md, alongside its parent epic's folder, not inside it.

Path resolution

Default: docs/work/{work-id}/tdd.md. User-named paths under docs/work/ override.

Repos written before this skill was renamed from design hold the same artefact at docs/work/{work-id}/design.md. When that file exists and tdd.md does not, say so, git mv it to tdd.md, and update it in place — never leave two copies of the same design side by side.

Mode (--mode)

  • skeleton — walking skeleton, Phase 0, 2–4 pages
  • full — Sprint 2+, 5–10 pages

Negative constraints

Do NOT put in tdd.md:

  • Architecture-wide patterns already in solution.md — cite solution.md §{N.M}
  • Business strategy → docs/product/product.md
  • Phase sequencing → docs/product/roadmap.md
  • Task-level Gherkin → docs/work/{work-id}/tasks.md via tasks

Context

[Work item row in backlog.md or the tracker, solution.md, parent epic's tdd.md if this is a story/bug/spike, existing tdd.md (or legacy design.md) if updating, codebase]

Steps (skeleton)

  1. Read solution.md and the work item's row (backlog.md or the tracker); if it is a story, bug, or spike, also read its parent epic's tdd.md
  2. Draft §1–§6 per template
  3. §4 must list what this work item did not ship

Steps (full)

  1. Read all context
  2. Draft §1–§12 per template

Pre-save validation

  • [ ] Work item resolved per work-item-resolution.md — asked the user on any ambiguity in source system or ID
  • [ ] Path is docs/work/{work-id}/tdd.md keyed by this item's own canonical ID (filesystem-only: correct slug, ≤2 words, not the internal ID)
  • [ ] A legacy design.md for this work item was moved, not duplicated
  • [ ] A story/bug/spike TDD cites its parent epic by ID rather than duplicating its tdd.md
  • [ ] Solution cited by section; no duplicated architecture narrative
  • [ ] No Gherkin task scenarios (gates/slice only)
  • [ ] Mode-appropriate sections only (skeleton vs full)
  • [ ] DRAFTING AIDE block removed

Output format

Save to docs/work/{work-id}/tdd.md. Use assets/tdd.template.md.

Gotchas

  • Do not copy solution.md — cite solution.md §{N.M} instead.
  • Task Gherkin belongs in tasks.md, not the TDD (gates/slice scope only).
  • skeleton is 2–4 pages; full is 5–10 — do not mix section sets.
  • §4 Out of scope must list what this work item explicitly did not ship.

ADR candidates

Decisions recorded in tdd.md do not reach the architecture register on their own. After the work item ships, run adr plan <work-id> to harvest them — it triages each candidate into promote, inline, or defer, and hands the promoted ones to adr write.

Supporting files

Related skills

  • tasks, solution, adr
  • implement — test-driven development, i.e. actually writing the tests and code
  • docs-review — review or critique an existing tdd.md

04 同仓库更多 Skills

carinyadigital
carinyadigital/skills

skill-name

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

Skill与智能体开发
★ 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).

设计师视觉设计Skill与智能体开发
★ 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.

开发工程师设计师视觉设计Skill与智能体开发
★ 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).

产品经理Skill与智能体开发
★ 2
carinyadigital
carinyadigital/skills

sprint-retro

Use when the user wants to run a retrospective after a sprint ends — compare what was committed in plan.md against what actually shipped, surface themes with evidence, and record actions with owners routed to the skill that will action them, at docs/work/sprint-{id}/retrospective.md. Triggers on "run the retro", "sprint retrospective", "what went wrong last sprint", "how did sprint 3 go". Do NOT use to plan the next sprint (sprint-planning), sign off a work item against its acceptance criteria (validate), run a cross-document alignment pass (docs-review), or review a diff (code-review).

★ 2