Documentation criteria

From shinpr/claude-code-workflows · View interactive version

Documentation criteria is an AI agent skill from the GitHub repository shinpr/claude-code-workflows. 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.

How to use this skill

Skill file

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.

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 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:

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.