Agent Skillsshinpr/claude-code-workflows › documentation-criteria

documentation-criteria

GitHub

定义PRD、ADR、UI Spec等文档的创建标准与路由决策,指导不同规模变更所需的文档范围及存储位置。

dev-workflows-fullstack/skills/documentation-criteria/SKILL.md shinpr/claude-code-workflows

Trigger Scenarios

决定技术文档范围 创建或审查技术文档

Install

npx skills add shinpr/claude-code-workflows --skill documentation-criteria -g -y
More Options

Non-standard path

npx skills add https://github.com/shinpr/claude-code-workflows/tree/main/dev-workflows-fullstack/skills/documentation-criteria -g -y

Use without installing

npx skills use shinpr/claude-code-workflows@documentation-criteria

指定 Agent (Claude Code)

npx skills add shinpr/claude-code-workflows --skill documentation-criteria -a claude-code -g -y

安装 repo 全部 skill

npx skills add shinpr/claude-code-workflows --all -g -y

预览 repo 内 skill

npx skills add shinpr/claude-code-workflows --list

SKILL.md

Frontmatter
{
    "name": "documentation-criteria",
    "description": "Determines which of PRD, ADR, UI Spec, Design Doc, and Work Plan a change requires, and where each is stored. Use when deciding documentation scope, or when creating or reviewing a technical document."
}

Documentation Creation Criteria

This file holds the routing decision: which documents a change requires and where they live. What to write inside one is defined by its template, linked from Storage Locations.

What Each Document Fixes

Each document fixes one class of decision that the repository alone cannot supply. An unfilled section becomes a guess made later by the consumer named below, with no record of what was assumed.

  • PRD — Fixes the business outcome and the acceptance criteria later work traces to. Its AC IDs are the traceability keys that the Design Doc, UI Spec, and test selection reuse; without them each consumer re-derives requirements from prose and the link between a test and the value it protects is lost. Implementation details belong to the Design Doc, selection rationale to an ADR, phases and task breakdown to the Work Plan.

  • ADR — Fixes one durable technical choice and the options it beat, so later work can tell a deliberate decision from an accident. Without it a future change either re-runs the same comparison or silently reverses it. End-to-end implementation design belongs to the Design Doc, schedule and repository tasks to the Work Plan.

  • UI Spec — Fixes screen structure, transitions, component/state contracts, and visual acceptance before components exist, so decomposition is decided once instead of per-component during implementation. Create one when those decisions remain open; reuse an approved UI Spec or go straight to the Design Doc when one evident repository-supported pattern already determines them. Technical implementation and API contracts belong to the Design Doc.

  • Design Doc — Fixes the complete implementation design for the confirmed scope: flows, contracts, change impact, and verification strategy. Task execution treats it as the sole design authority and holds it read-only, so a gap here is filled by an implementer's local invention that no review compares against an approved decision. Technology selection rationale belongs to an ADR, schedule and assignments to the Work Plan.

  • Work Plan — Fixes task order, dependencies, executable verification, and the earliest vertical proof point. Without it task order follows file layout rather than dependency, and integration risk moves to the end of the work. Design detail is referenced from the Design Doc rather than restated.

Creation Decision Matrix

Structural Scale Base Documents Creation Order
Small None Direct implementation
Medium Design Doc → Work Plan Start with Design Doc
Large PRD → Design Doc → Work Plan Continue after PRD approval

Build one path in this order:

  1. Select the base path from Structural Scale.
  2. Insert an applicable UI Spec immediately before the Design Doc.
  3. One or more qualifying ADR decision points insert an ADR batch immediately before the Design Doc. A qualifying decision point sets the scale floor to Medium.

Structural Scale

Classify the decision burden, not repository layout. File count is supporting evidence only.

Scale Structural condition
Small One coherent outcome has one evident repository-supported implementation within one responsibility boundary and no unresolved durable choice
Medium One coherent outcome coordinates across a boundary or requires investigation of a potentially durable choice
Large Multiple independently valuable outcomes require separate design decisions

A qualifying ADR decision point sets the floor at Medium because it creates a durable decision. One coherent outcome remains Medium when it crosses multiple layers; Large requires independently valuable outcomes with separate design decisions.

ADR Decision Filters

Apply the Choice filter, then the Durability filter, to each technical topic inside the confirmed implementation scope. Apply them independently from Structural Scale, and check existing ADRs first.

  1. Choice requires judgment — current requirements, accepted decisions, and representative repository evidence support at least two credible, materially distinct options whose selection requires comparison.
  2. Decision is durable — choosing among those options materially changes responsibility, dependency direction, a shared contract, persistence, a technology dependency, reversibility, or lifecycle cost that future work must preserve or understand.

Create one ADR for each topic that passes both filters, and review the complete batch together. Treat choices as one decision point when they must be selected or reconsidered together; separate independently revisitable choices.

Qualifying durable choices include:

  • introducing or replacing a technology, library, platform, storage model, or external dependency;
  • changing ownership, dependency direction, a trust boundary, or a shared public contract when credible alternatives exist;
  • reversing or superseding an accepted architecture decision;
  • choosing an irreversible or high-cost-to-reverse data or compatibility strategy.

A local contract, data-flow, state, or component change belongs in the Design Doc when it follows an accepted design, has one evident repository-supported implementation, or remains cheaply reversible. Counts of files, consumers, nesting levels, states, steps, and asynchronous operations are supporting evidence rather than ADR criteria. Only the qualifying decisions above create ADRs; generic technical concerns, operational possibilities, and rejected activities can only support that determination.

Storage Locations

Document Path Naming Convention Template
PRD docs/prd/ [feature-name]-prd.md prd-template.md
ADR docs/adr/ ADR-[4-digits]-[title].md adr-template.md
UI Spec docs/ui-spec/ [feature-name]-ui-spec.md ui-spec-template.md
UI Spec Assets docs/ui-spec/assets/{feature-name}/ Prototype code files -
Design Doc docs/design/ [feature-name]-design.md design-template.md
Work Plan docs/plans/ YYYYMMDD-{type}-{description}.md plan-template.md
Task File docs/plans/tasks/ {plan-name}-task-{number}.md task-template.md

*Note: Work plans are excluded by .gitignore

References

Each template defines the content, structural elements, and diagram criteria for its document: prd-template.md, adr-template.md, ui-spec-template.md, design-template.md, plan-template.md, task-template.md

Version History

  • 416af89 Current 2026-08-12 16:37

    新增各文档解决的具体问题说明,细化结构规模分类逻辑。

  • 0d96a63 2026-08-05 22:04

    重构文档创建决策逻辑,从基于文件数量的简单规则改为基于结构规模和ADR过滤证据驱动的决策体系。

  • 51b7dbc 2026-08-05 01:45

    重构以简化规划并统一评审流程

  • 29b9210 2026-08-03 04:21

    细化ADR触发条件中的合同系统变更逻辑;调整任务注册机制以确保证据记录可追溯;优化收敛JSON格式及非目标说明方式。

  • d439b50 2026-07-31 02:51

    修复了工作流提示中的合约相关问题。

  • 66e3b29 2026-07-05 11:58

Same Skill Collection

dev-skills/skills/ai-development-guide/SKILL.md
dev-skills/skills/coding-principles/SKILL.md
dev-skills/skills/documentation-criteria/SKILL.md
dev-skills/skills/external-resource-context/SKILL.md
dev-skills/skills/frontend-ai-guide/SKILL.md
dev-skills/skills/implementation-approach/SKILL.md
dev-skills/skills/integration-e2e-testing/SKILL.md
dev-skills/skills/llm-friendly-context/SKILL.md
dev-skills/skills/requirement-convergence/SKILL.md
dev-skills/skills/test-implement/SKILL.md
dev-skills/skills/testing-principles/SKILL.md
dev-skills/skills/typescript-rules/SKILL.md
dev-workflows-frontend/skills/ai-development-guide/SKILL.md
dev-workflows-frontend/skills/coding-principles/SKILL.md
dev-workflows-frontend/skills/documentation-criteria/SKILL.md
dev-workflows-frontend/skills/external-resource-context/SKILL.md
dev-workflows-frontend/skills/frontend-ai-guide/SKILL.md
dev-workflows-frontend/skills/implementation-approach/SKILL.md
dev-workflows-frontend/skills/integration-e2e-testing/SKILL.md
dev-workflows-frontend/skills/llm-friendly-context/SKILL.md
dev-workflows-frontend/skills/recipe-diagnose/SKILL.md
dev-workflows-frontend/skills/recipe-front-adjust/SKILL.md
dev-workflows-frontend/skills/recipe-front-build/SKILL.md
dev-workflows-frontend/skills/recipe-front-design/SKILL.md
dev-workflows-frontend/skills/recipe-front-plan/SKILL.md
dev-workflows-frontend/skills/recipe-front-review/SKILL.md
dev-workflows-frontend/skills/recipe-task/SKILL.md
dev-workflows-frontend/skills/recipe-update-doc/SKILL.md
dev-workflows-frontend/skills/requirement-convergence/SKILL.md
dev-workflows-frontend/skills/subagents-orchestration-guide/SKILL.md
dev-workflows-frontend/skills/task-analyzer/SKILL.md
dev-workflows-frontend/skills/test-implement/SKILL.md
dev-workflows-frontend/skills/testing-principles/SKILL.md
dev-workflows-frontend/skills/typescript-rules/SKILL.md
dev-workflows-fullstack/skills/ai-development-guide/SKILL.md
dev-workflows-fullstack/skills/coding-principles/SKILL.md
dev-workflows-fullstack/skills/external-resource-context/SKILL.md
dev-workflows-fullstack/skills/frontend-ai-guide/SKILL.md
dev-workflows-fullstack/skills/implementation-approach/SKILL.md
dev-workflows-fullstack/skills/integration-e2e-testing/SKILL.md
dev-workflows-fullstack/skills/llm-friendly-context/SKILL.md
dev-workflows-fullstack/skills/recipe-add-integration-tests/SKILL.md
dev-workflows-fullstack/skills/recipe-build/SKILL.md
dev-workflows-fullstack/skills/recipe-design/SKILL.md
dev-workflows-fullstack/skills/recipe-diagnose/SKILL.md
dev-workflows-fullstack/skills/recipe-front-adjust/SKILL.md
dev-workflows-fullstack/skills/recipe-front-build/SKILL.md
dev-workflows-fullstack/skills/recipe-front-design/SKILL.md
dev-workflows-fullstack/skills/recipe-front-plan/SKILL.md

Metadata

Files
0
Version
416af89
Hash
4b4cdd7c
Indexed
2026-07-05 11:58

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-13 03:57
浙ICP备14020137号-1 $お客様$