A PRD states a decision, a requirement, a constraint or evidence. Those survive the code moving underneath them. A line number, a progress report or a dated status claim does not: it is true on the day it is written and silently wrong a month later, while still reading as authoritative. prdlint rejects five shapes: file:line citations (including a document citing its own line numbers), dated status claims, progress reports on the work being designed, phase-completion narration, and records of how a finding was produced. Each finding names the file, line, rule and fix. The rules target decay, not subject matter. A PRD may describe a phased plan, name a dependency that exists, and carry its own Status and Date header fields; what it may not do is assert the state of the tree on the day it was written. Fenced blocks are skipped, since a listing may specify a line reference as its literal content. Wired into task check next to docs:check. A sweep alone would not stop the class recurring.
38 lines
2.1 KiB
Markdown
38 lines
2.1 KiB
Markdown
# PRD writing rules
|
|
|
|
These rules apply to every file in `docs/prds/`.
|
|
|
|
- Search existing PRDs, issues, architecture records, and code first. Do not ask
|
|
the maintainer to repeat recorded requirements.
|
|
- A newer maintainer decision overrides an older design. Mark the old design as
|
|
superseded instead of preserving or defending it.
|
|
- Write plain English. Use a technical term only when the reader needs that
|
|
exact contract or concept.
|
|
- Use the shortest direct sentence. Write “When upgraded, existing instances
|
|
are migrated to the database,” not a description of an importer seeding
|
|
absent resources.
|
|
- State each fact once. Do not repeat a heading, summarize a list before showing
|
|
it, or restate a decision afterward.
|
|
- Every sentence must add a decision, requirement, constraint, evidence, or
|
|
verification step. Delete narration and explanations of obvious text.
|
|
- Do not turn a requested outcome into extra product features. Keep inferences
|
|
open until the maintainer or repository evidence settles them.
|
|
- Do not create a process for a logical boundary. Add one only when it must
|
|
deploy, scale, start, secure, or fail separately.
|
|
- Describe working behavior, not explanatory UI around missing behavior. State
|
|
what users can do and how success is proved.
|
|
- Before approval, use independent read-only reviewers to check a cross-cutting
|
|
PRD for missing behavior and exaggerated claims. Verify and synthesize their
|
|
findings; do not copy their prose.
|
|
- Before requesting approval, review every sentence for complexity, repetition,
|
|
and unsupported scope.
|
|
- Write nothing whose truth expires. No `file.go:123` citations (cite the file
|
|
and the symbol), no progress reports on the work being designed, no dated
|
|
status claims, and no record of how a finding was produced. A phased plan is
|
|
durable design; which phase is finished is not. `task docs:prds` enforces
|
|
this.
|
|
- Every PRD carries one of three statuses. `Draft` until the maintainer
|
|
explicitly approves it, `Approved` once they have and while the work is being
|
|
built, `Finalised` when the work is complete. A finalised PRD does not change;
|
|
supersede it with a new one instead.
|