From docs-methodology
Apply a lightweight, ID-anchored, arc42-inspired documentation methodology when working on project documentation. Use this skill whenever the user adds, edits, audits, or sets up specifications — functional requirements (REQ-F), non-functional requirements (REQ-NF), architecture decision records (ADRs), architecture views (ARCH-*), API specs, UI specs, or test cases (TC). Trigger on phrases like "add requirement", "write an ADR", "document the API", "spec out", "design doc", "architecture decision", "traceability", "arc42", or whenever the user touches anything under docs/requirements/, docs/architecture/, docs/api/, docs/ui/, or docs/traceability.yaml. Also trigger when bootstrapping a new project's docs/ folder. The skill enforces stable IDs, immutable accepted ADRs, the traceability.yaml spine, and the right template for each artifact. Use it even when the user does not name the methodology explicitly — any "let's document X" or "I need to capture this decision" intent is a hit.
How this skill is triggered — by the user, by Claude, or both
Slash command
/docs-methodology:documentation-methodologyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A lightweight, arc42-inspired, ID-anchored specification method for software projects. Every spec lives as plain Markdown + YAML under `docs/`, every artifact has a stable ID, and `docs/traceability.yaml` is the spine that links Requirement → Architecture → API → UI → Test → Implementation.
assets/templates/ADR-template.mdassets/templates/API-template.mdassets/templates/ARCH-data-model.mdassets/templates/ARCH-dataflow.mdassets/templates/ARCH-deployment.mdassets/templates/ARCH-system-overview.mdassets/templates/CLAUDE.mdassets/templates/REQ-functional.mdassets/templates/REQ-nonfunctional.mdassets/templates/REQ-testcases.mdassets/templates/UI-template.mdassets/templates/traceability.yamlreferences/METHODOLOGY.mdscripts/check_traceability.pyA lightweight, arc42-inspired, ID-anchored specification method for software projects. Every spec lives as plain Markdown + YAML under docs/, every artifact has a stable ID, and docs/traceability.yaml is the spine that links Requirement → Architecture → API → UI → Test → Implementation.
Use this skill in two modes — it picks the right one automatically based on whether docs/ already exists.
Before doing anything else, check the working directory:
test -d docs && test -f docs/traceability.yaml && echo "EDIT" || echo "SETUP"
docs/ or docs/traceability.yaml is missing. Bootstrap the structure before writing any spec.If only some of the structure is present (partial bootstrap), treat the missing pieces as SETUP for those specific files but do not overwrite anything that already exists.
When docs/ is missing or incomplete, scaffold it from the bundled templates. The templates live next to this skill at assets/templates/.
Create the directory skeleton at the repo root:
docs/
├─ requirements/
├─ architecture/
├─ api/
├─ ui/
├─ research/
└─ traceability.yaml
Copy templates from assets/templates/. They split into three buckets — handle each differently:
Bucket A — Copy verbatim, no edits:
REQ-functional.md → docs/requirements/REQ-functional.mdREQ-nonfunctional.md → docs/requirements/REQ-nonfunctional.mdREQ-testcases.md → docs/requirements/REQ-testcases.mdscripts/check_traceability.py → repo scripts/check_traceability.pyThe REQ/TC templates ship with one or two illustrative placeholder entries (REQ-F001 — <Short imperative title> etc.). Leave those as-is; they are scaffolding the user will overwrite or extend when adding the first real REQ. They are NOT placeholders you should fill in during setup.
Bucket B — Copy and fill placeholders from the conversation:
CLAUDE.md → repo root CLAUDE.md (only if none exists)docs/traceability.yaml ← derived from assets/templates/traceability.yaml, but seeded with a real first entry (see step 3)For CLAUDE.md: do not ship <Project Name>, <Short prose>, <test command>, <e.g. uv>, or any other <...> placeholder back to the user. Replace every angle-bracket placeholder with information from the conversation (project name, one-line description, tech stack, common commands if you know them). If a value is genuinely unknown, write TBD rather than leaving the angle brackets. The agent's entry point should be usable as-is the moment setup finishes — placeholders that survive into the committed file create friction every time someone reads it.
Bucket C — Create only what the project actually needs:
ARCH-system-overview.md, ARCH-data-model.md, ARCH-dataflow.md, ARCH-deployment.md → docs/architecture/API-template.md → docs/api/API-<slug>.mdUI-template.md → docs/ui/UI-<slug>.mdDo NOT copy these as empty stubs by default. Pick only the ones you can populate now with real project content drawn from the conversation. A typical greenfield setup gets ARCH-system-overview.md (because you usually know roughly what the system is for) and maybe ARCH-deployment.md (if the tech stack already implies a topology). Skip the rest — they'll be created later when there's content to put in them. An empty ARCH-data-model.md with a <EntityName> placeholder is worse than no file: it rots, it lies, and the next reader has to wade through scaffolding to find real content.
API and UI files are slug-named, so they only exist when there's an actual API surface or UI screen to specify. Skip during initial setup unless explicitly relevant.
Do not copy ADR-template.md to a fixed location. ADRs are created on demand as docs/architecture/ADR-NNN-<slug>.md, one per file.
Seed docs/traceability.yaml with at least one realistic entry derived from the conversation so the structure is non-empty. The seed should match a real capability the user mentioned (e.g. for a feed crawler: REQ-F001 — Register an RSS feed source). Do not commit the bare template content with placeholder REQs.
Briefly tell the user what was created (one line per file) and what the next concrete step is — typically "open docs/requirements/REQ-functional.md and replace the REQ-F001 — <Short imperative title> scaffold with your first real requirement". Do not dump file contents back at them.
This is the most common case. The user wants to capture something: a new requirement, a decision, an API endpoint, a UI screen, a test case, or a change to an existing entry. Follow the workflow for the artifact type.
Pick the right template and target file:
| The user wants to capture… | Prefix | Template | Target file |
|---|---|---|---|
| A capability the system must provide | REQ-F### | (append to) REQ-functional.md | docs/requirements/REQ-functional.md |
| A quality attribute with a measurable scenario | REQ-NF### | (append to) REQ-nonfunctional.md | docs/requirements/REQ-nonfunctional.md |
| An architectural choice with consequences | ADR-### | assets/templates/ADR-template.md | docs/architecture/ADR-NNN-<slug>.md (new file) |
| A view of the architecture (data, runtime, deployment, context) | ARCH-<slug> | corresponding ARCH template | docs/architecture/ARCH-<slug>.md |
| An API surface | API-<slug> | assets/templates/API-template.md | docs/api/API-<slug>.md |
| A UI/UX surface | UI-<slug> | assets/templates/UI-template.md | docs/ui/UI-<slug>.md |
| A test scenario | TC-### | (append to) REQ-testcases.md | docs/requirements/REQ-testcases.md |
IDs are immutable, sequential, and zero-padded. Never renumber. To find the next number for a counted prefix:
grep -oE '^### (REQ-F|REQ-NF|TC-)[0-9]{3}' docs/requirements/*.md | sort -u
ls docs/architecture/ADR-*.md 2>/dev/null
Take the highest existing number + 1, pad to 3 digits. For <slug>-style IDs (ARCH-, API-, UI-), the slug is descriptive kebab-case, not a number.
Read the matching template from assets/templates/ and produce the new entry. Hard rules per artifact:
TC-###. If you don't have a test case yet, write one now.Status: proposed. Once accepted, the file is immutable: a later change requires a new ADR that supersedes this one (set the old one's Superseded by: and the new one's Supersedes:). Never edit an accepted ADR's Context/Decision/Consequences.REQ-F### it implements via a Verifies: line.REQ-F### or REQ-NF### via Verifies: and point at an executable test path via Impl:.docs/traceability.yamlThis is non-optional. Every REQ has exactly one entry; every change to an artifact must reflect into the spine.
status: active, populated tests:, and the linked arch/api/ui slugs (if known yet).status: dropped, add note: explaining why, and an adr: link to the supersession.note: and adr: to affected REQ entries.Schema example:
- req: REQ-F001
title: Create crawl source
status: active # active | deferred | dropped
arch: [ARCH-data-model]
api: [API-core-endpoints#POST-sources]
ui: [UI-sources#create-form]
tests: [TC-001]
impl:
- src/api/routes/sources.py
If the project has Python available, run the bundled linter to catch broken links:
python scripts/check_traceability.py --repo-root .
Or copy scripts/check_traceability.py from this skill into the project under scripts/ or docs/. It exits non-zero on any violation (missing entry, broken slug, missing impl path, dropped REQ without ADR link).
State: which file changed, which ID was allocated, what's still needed (e.g., "TC-007 has no Impl: path yet — point it at the test function when you've written it"). Do not echo the whole file back.
| Prefix | Scope | Example |
|---|---|---|
REQ-F### | Functional requirement | REQ-F010 |
REQ-NF### | Non-functional requirement | REQ-NF003 |
ADR-### | Architecture decision | ADR-002 |
ARCH-<slug> | Architecture view | ARCH-data-model |
API-<slug> | API spec | API-core-endpoints |
UI-<slug> | UI spec | UI-design-system |
TC-### | Test case | TC-001 |
Iron rules:
status: dropped, never deletion.These are the failure modes the methodology is designed to prevent:
REQ-F042 stays REQ-F042 even if REQ-F001..F041 are all dropped.TC-### is incomplete; either write a test case immediately or mark the REQ deferred.traceability.yaml by accident-of-omission. Every change to an artifact should propagate to the spine in the same commit.ARCH-* stub files. Only create the views you're going to populate. Stubs rot.docs/. Code comments may reference IDs but never replace them.For background on the philosophy, full artifact specifications, workflow details, glossary, or anything you're unsure about, read references/METHODOLOGY.md (the full 12-section authoritative method). Use it for:
assets/templates/ — every template referenced above. Copy-paste from these; do not rewrite from memory.scripts/check_traceability.py — CI linter for the spine.references/METHODOLOGY.md — full authoritative reference (read when in doubt).Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.
npx claudepluginhub svnstfns/claude-marketplace --plugin docs-methodology