| title | Working on docs |
|---|
The committed Markdown under docs/ is the source of truth for
product knowledge, architecture, decisions, workflows, operations, and
durable learnings.
- One fact, one home. If a fact lives in code or config, link to
it; do not restate it. If a fact lives in
docs/, do not duplicate it inREADME.mdorPROJECT_STATUS.md. - Markdown is the source of truth. Code/config stays authoritative for implementation details and schedules.
- Don't duplicate code-discoverable facts. Link to the file or command.
- Mark unresolved questions explicitly in
STATUS.md— do not invent information. - New non-obvious decision → new ADR under
architecture/decisions/(use the ADR template). Never renumber; supersede with a new ADR that points back. - Durable learnings →
knowledge/learnings/. Abandoned approaches →knowledge/failed-approaches/with the reason. - Prefer
docs/archive/<name>.mdover deletion so git rename history survives. Usegit mvwhen reorganizing. - Keep pages short (150–300 lines). Split rather than grow.
- Every docs Markdown file needs a
titlein frontmatter. The validator enforces this. - Archive pages under
docs/archive/**are preserved for git history.
pnpm docs:check # link check + frontmatter + structure validationCI runs pnpm docs:check on every push / PR via
the docs workflow.
The validator (scripts/check-docs.mjs) enforces:
- Every docs Markdown file has a
titlein frontmatter. Archive files are exempt. - Every relative Markdown link resolves to a file that exists.
docs/index.mdexists.- No empty
docs/subdirectories.
| Change | Update |
|---|---|
| New route added/removed | product/surfaces.md |
| New D1 table | architecture/data-model.md + src/lib/db-schema.sql |
| Non-obvious decision | New ADR under architecture/decisions/ |
| New cron / scheduled job | operations/jobs/ |
| New runbook | operations/runbooks/ |
| Durable learning | knowledge/learnings/ |
| Abandoned approach | knowledge/failed-approaches.md |
| PR-sized work completed | PROJECT_STATUS.md (durable) + STATUS.md (short view) |
| Superseded doc | Move to docs/archive/ with a stale- prefix and a one-line supersession note |
Do not update docs for minor edits or bug fixes that don't change documented architecture or conventions.