doc-naming
The ID and naming authority for the SDD flow - validates document IDs, 4-segment element IDs, threshold tags, and flags removed/legacy patterns. Use before creating or editing any artifact.
What this skill does
# doc-naming
## Purpose
The naming authority for the 8-layer SDD flow. `doc-naming` validates document
IDs, element IDs, threshold tags, and file names against
`${CLAUDE_PLUGIN_ROOT}/framework/governance/ID_NAMING_STANDARDS.md`, and flags removed/legacy
patterns. It produces no artifacts — it is the declarative ID validator (the
framework ships no runtime code).
**Layer**: cross-cutting utility (applies to all 8 layers).
## When to Use
**Use** before creating or editing any artifact, to:
- verify a document or element ID format,
- check a `@threshold:` tag, or
- detect removed/legacy ID patterns and get the migration target.
**Do NOT use** for cross-document traceability or content review — use
`../doc-validator/SKILL.md`.
## Behavior
### 1. Document ID — `TYPE-NN`
`^[A-Z]{2,8}-[0-9]{2,}$` — uppercase type, single dash, 2+ digit sequence (no
extra leading zeros beyond two: `BRD-01`, `ADR-99`, `IPLAN-102`). File name:
`TYPE-NN_descriptive_slug.md`.
### 2. Element ID — `TYPE.NN.SS.xxxx` (4-segment)
`^[A-Z]+\.[0-9]{2,}\.[0-9]{2,}\.[a-f0-9]{4,8}$`
| Segment | Meaning | Format |
|---------|---------|--------|
| TYPE | Artifact prefix | `BRD PRD EARS BDD ADR TDD` |
| NN | Document number | 2+ digits |
| SS | Source section number | 2+ digits |
| xxxx | Content hash (SHA256, first 4 hex; extend to 8 on collision) | `[a-f0-9]{4,8}` |
Example: `BRD.01.07.a7f3`. Element IDs appear as markdown headings
(`### BRD.01.07.a7f3: Title`).
### 3. Reference granularity (element vs document)
There are **no numeric element-type codes** — identity is the section + hash,
not a fixed code.
| Layer | Reference form | Example |
|-------|----------------|---------|
| BRD, PRD, EARS, BDD, TDD | element (dotted) `TYPE.NN.SS.xxxx` | `PRD.01.09.1dbc` |
| ADR | both: document `ADR-NN` and element `ADR.NN.SS.xxxx` | `ADR-05`, `ADR.05.03.e5b1` |
| SPEC, IPLAN | document (dash) `TYPE-NN` | `SPEC-06`, `IPLAN-01` |
Traceability tags carry these refs: `@brd: BRD.01.07.a7f3`, `@spec: SPEC-06`,
`@iplan: IPLAN-01`.
### 4. Threshold tags
`@threshold: {TYPE}.{NN}.{key}` where `key` is
`category.subcategory.attribute[.qualifier]`. Categories: `perf timeout rate
retry circuit alert cache pool queue batch`. Doc reference is mandatory and
dot-separated — `@threshold: PRD.035.timeout.partner.bridge` (valid);
`@threshold: timeout.partner.bridge` (missing doc ref — invalid). Threshold
sources: BRD (business SLAs), PRD (product metrics), ADR (technical limits).
### 5. Reserved-ID and REF exemptions
- **`TYPE-00_*`** (indexes, templates, glossaries) — framework infrastructure;
skip element-ID and traceability checks.
- **`TYPE-REF-NN_{slug}.md`** (BRD/ADR only, via `../doc-ref/SKILL.md`) —
free-format reference targets; no element IDs, no quality gates.
### 6. Removed / legacy patterns (reject)
Migrate every match to `TYPE.NN.SS.xxxx` (or a dash doc ref for SPEC/IPLAN):
| Removed | Applies to |
|---------|-----------|
| `AC-XXX`, `FR-XXX`, `BC-XXX`, `BA-XXX`, `QA-XXX`, `BO-XXX`, `RISK-XXX`, `METRIC-XXX`, `Feature F-XXX` | BRD, PRD |
| `Event-XXX`, `State-XXX` | EARS |
| `DEC-XXX`, `ALT-XXX`, `CON-XXX` | ADR |
| 3-segment `TYPE.NN.xxxx` | all element layers |
Detect with grep, e.g. `grep -E "(AC|FR|BC|BA|QA|BO|NFR|RISK|METRIC)(-[A-Za-z0-9]+)*-[0-9]+" file.md`
(the optional `(-[A-Za-z0-9]+)*` catches compound forms like `FR-CICD-001`).
Migration: derive `TYPE`/`NN` from the file name, `SS` from the source section,
`xxxx` from the element content hash; replace all occurrences and re-verify.
### 7. ISO 8601 timestamps
Date/time fields (frontmatter `last_updated`, `created_date`; `review_date`,
`fix_date`, `approval_date`, `decision_date`) use
`YYYY-MM-DDTHH:MM:SS` (optionally `Z` or `±HH:MM`), enabling same-day drift
detection. Date-only values are deprecated.
### Pre-flight checklist
- [ ] Document ID is `TYPE-NN`; file name is `TYPE-NN_slug.md`.
- [ ] Element IDs are 4-segment `TYPE.NN.SS.xxxx` with a 4–8 hex hash, unique
within the document; SPEC/IPLAN use dash doc refs.
- [ ] `@threshold:` tags include the doc reference and an approved category.
- [ ] No removed/legacy patterns; no 3-segment element IDs.
- [ ] Traceability tag prefixes (`@brd:` … `@tdd:`) are correct and targets exist.
## Related Resources
- ID & tag authority: `${CLAUDE_PLUGIN_ROOT}/framework/governance/ID_NAMING_STANDARDS.md`
- Threshold rules: `${CLAUDE_PLUGIN_ROOT}/framework/governance/THRESHOLD_NAMING_RULES.md`
- Layer registry (roster, chains, folders): `${CLAUDE_PLUGIN_ROOT}/framework/registry/LAYER_REGISTRY.yaml`
- Per-layer templates & READMEs: `${CLAUDE_PLUGIN_ROOT}/framework/layers/NN_<X>/`
- Cross-document validation: `../doc-validator/SKILL.md`
- Workflow routing: `../doc-flow/SKILL.md`
- Diagrams: `../charts-flow/SKILL.md`
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.