AgentSkillsCN

documentation

适用于编写或梳理软件规格、需求文档以及架构决策记录。涵盖 PRD、TRD、BRD、ADR、RFC 以及可执行规格格式。 适用场景:选择需求文档类型、文档编写策略、规格模板、将书面规格与可执行测试相结合、架构决策文档化。 不适用场景:特定的文档格式(应使用 PRD、TRD、BRD、ADR、RFC、Gherkin、Gauge 子技能)、图表绘制(应使用图表子技能)。

SKILL.md
--- frontmatter
name: documentation
description: |
    Use when writing or structuring software specifications, requirements documents, and architecture decision records. Covers PRDs, TRDs, BRDs, ADRs, RFCs, and executable spec formats.
    USE FOR: choosing requirements document types, documentation strategy, specification templates, combining written specs with executable tests, architecture decision documentation
    DO NOT USE FOR: specific document formats (use prd, trd, brd, adr, rfc, gherkin, gauge sub-skills), diagramming (use diagramming sub-skills)
license: MIT
metadata:
  displayName: "Documentation & Requirements"
  author: "Tyler-R-Kendrick"
compatibility: claude, copilot, cursor

Documentation & Requirements

Overview

Software specifications capture the "what" and "why" before implementation addresses the "how." Well-structured requirements documents, architecture decisions, and executable specs reduce ambiguity, align stakeholders, and create verifiable acceptance criteria.

Document Types

Requirements Documents

TypeAudienceFocus
PRD (Product Requirements)Product + EngineeringFeatures, user stories, success metrics
TRD (Technical Requirements)EngineeringArchitecture, APIs, data models, constraints
BRD (Business Requirements)Business + LeadershipROI, market need, business objectives

Architecture Documents

TypeAudienceFocus
ADR (Architecture Decision Record)EngineeringSingle decision with context and consequences
RFC (Request for Comments)Engineering + StakeholdersProposed change seeking feedback

Executable Specifications

TypeAudienceFocus
Gherkin (Given/When/Then)QA + Product + EngineeringAcceptance criteria as executable tests
Gauge (Markdown specs)QA + EngineeringFree-form test specifications in Markdown

Document Flow

code
Business Need
    │
    ▼
  BRD ──► "Should we build this?"
    │
    ▼
  PRD ──► "What are we building?"
    │
    ├──► ADR ──► "Why did we choose X over Y?"
    │
    ▼
  TRD ──► "How do we build it?"
    │
    ├──► RFC ──► "Proposing approach Z for feedback"
    │
    ▼
  Gherkin / Gauge ──► "How do we verify it works?"
    │
    ▼
  Implementation + Automated Tests

Best Practices

  • Write the PRD before the TRD — define what you're building before deciding how to build it.
  • Use ADRs for every significant architecture decision — they're short, structured, and invaluable for future developers.
  • Make specifications executable where possible — Gherkin and Gauge connect written specs directly to automated tests.
  • Keep documents close to the code in the same repository so they evolve together.
  • Use lightweight templates rather than heavyweight processes — a short, focused ADR beats a 50-page design doc nobody reads.
  • Review specs before implementation, not after — specifications are cheapest to change when they're still text.