plugins/doc-master/skills/doc-diagnostic/SKILL.md
This skill should be used when deciding whether a doc should exist, where it belongs, whether something is really an ADR, or whether an architectural decision is missing from the record. PROACTIVELY activate on "should this be an ADR?", "where should I document X?", "is this architecturally significant?", "ADR vs RFC vs design doc vs runbook", "Diátaxis", "audit docs folder", "clean up the decision log", "doc drift", "doc governance", "ADR template selection", "Nygard vs MADR vs Y-statement", "missing ADR", "missing decision record", "undocumented architecture", "implicit decision", "historical documentation clutter", "inherited repo", "large legacy repo", "architecture archaeology", "code archaeology", "scan for decision records", "find decisions not captured in ADRs." Provides: doc placement diagnostic, alternatives catalog, ADR canon, folder audit procedure, and BACKFILL-ADR candidate detection.
npx skillsauth add JosiahSiegel/claude-plugin-marketplace doc-diagnosticInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The diagnostic and canon skill. Owns three things:
references/alternatives-catalog.md./doc-audit. Full procedure: references/audit-procedure.md.Use this skill when routing a doc request, picking a template, naming a status, or auditing an existing doc set. The drafting / discovery / critique skills consume the canon defined here; they do not redefine it.
The canonical four-question check. The doc-expert agent and every other skill in this plugin reference this section rather than restate it. Before agreeing to produce any document, run all four. If any answer is "no" or "unclear," the doc should not be written yet.
If all four are answerable, proceed to the "is this an ADR?" diagnostic in the doc-expert agent body.
An ADR captures a single architectural decision and its rationale. An architectural decision addresses a requirement that is architecturally significant -- an ASR with "a measurable effect on the architecture and quality of a software and/or hardware system." If the change is not architecturally significant, an ADR is the wrong tool -- route via the alternatives catalog.
The same form generalizes to product, business, policy, security-program, and process decisions -- anywhere a justified, hard-to-reverse choice deserves a rationale that outlives its authors. Convention: rename docs/adr/ to docs/decisions/ and relax the ASR test to "is this decision worth recording at all?" Templates, lifecycle, numbering, immutability, and Relationships-mirror rules hold unchanged. Umbrella: github.com/joelparkerhenderson/architecture-decision-record; see also references/adr-template-catalog.md.
When the diagnostic says "not an ADR," route via references/alternatives-catalog.md -- it maps every common impulse to the correct doc form, explains why an ADR would be wrong, and names the Diátaxis four (tutorial / how-to / reference / explanation). ADRs are not Diátaxis explanations. Load it whenever the user debates "ADR vs RFC vs design doc vs runbook vs how-to" or asks "where should I document X?"
Pick the smallest template that captures the decision honestly:
| Template | Use when... | Don't use when... | |-------------------|--------------------------------------------------------------------------------------------|--------------------------------------------------| | Nygard / MADR light | Decision is simple, alternatives obvious, three to five fields suffice (Context, Decision, Consequences). | You need to compare 3+ alternatives on multiple criteria. | | MADR (full) | Multiple options need side-by-side analysis; decision drivers matter; Confirmation/Validation field needed; traceability matters. | The decision is trivial -- full MADR pads it. | | Y-statement | One sentence: "In the context of X, facing Y, we decided Z, to achieve W, accepting that V." Good for compact log entries or executive summaries. | The decision needs structured fields. | | arc42 / Tyree-Akerman / Business case | The project already uses one. | Starting fresh -- heavier than most teams need. |
Pick once per project; do not mix templates within a single log unless explicitly migrating.
proposed ----accepted----> accepted ----changed----> superseded
|
+--no-longer-applies--> deprecated
Explorer-compatible status values are lowercase proposed, accepted, deprecated, superseded. Do not overload status with rfc, rejected, backfilled, or explanatory strings.
rfc-deadline, do not invent status: rfc).supersedes list creates the edge.status.The cardinal rule: "Don't alter existing information in an ADR." Amend or supersede.
superseded by note, dated entries under an "Amendments" heading.supersedes. The old ADR may get a superseded by: NNNN reader note but otherwise stays untouched. The new ADR's supersedes list is the edge; superseded-by body prose is not.README.md.0001, 0002, ...). Never reuse. The number IS the identity..md (0007-use-postgres-for-primary-store.md).deciders as a YAML array (accountable); optionally consulted / informed (MADR RACI). "The team" is not an owner.Every ADR contains:
NNNN. Decision (imperative verb phrase).--- block with at minimum title, status, date, deciders. Add supersedes / amends / relates-to when relationships exist. Optional: tags, review-by, expires, confidence: high|medium|low, confidence-score, rfc-deadline (when status: proposed acts as an RFC). Gray-matter parsers read only the frontmatter; missing it orphans the node.## More Information → ### Relationships, link-prefix vocabulary (Supersedes, Superseded by, Amends, Amended by, Related to). Body-scanning parsers read only this section; the two surfaces must agree.docs/adr/, docs/decisions/, docs/architecture/decisions/, **/adr/*.md. Pick one; document it in the log's README.md.README.md listing every ADR with status and a one-line summary. The index is navigation, not the graph; index-hub links are not edge signals.supersedes / amends / relates-to feed gray-matter parsers; body ### Relationships feeds body-scanning parsers; either alone half-renders. If the project already uses Nygard, Y-statement, arc42, or Tyree-Akerman, follow it. MADR: adr.github.io/madr/, source github.com/adr/madr.Related ADRs: outside ### Relationships, or Related docs: in ### Notes, are courtesy navigation -- not edges."0008"). Explorer parsers extract digits with /(\d+)/ and zero-pad, so 8, "08", "0008", "ADR-0008" resolve identically -- but zero-padded strings render and sort predictably.// See docs/adr/0007-use-postgres-for-primary-store.md).plugins/doc-master/scripts/validate_adrs.py. See plugins/doc-master/scripts/README.md for the full per-file check list and CLI flags. Use during /doc-audit or as a CI gate, not as a substitute for the four-question check.---
title: "Use Postgres for primary store"
status: accepted
date: 2026-05-20
deciders: [Jane Doe]
supersedes: ["0004"]
relates-to:
- id: "0011"
reason: "shares the tenancy model decided in 0011"
---
# 0017. Use Postgres for primary store
## More Information
### Relationships
- Supersedes [ADR-0004](0004-use-dynamodb-for-primary-store.md) -- replaced because Q3 reporting needs sub-200ms joins.
- Related to [ADR-0011](0011-tenancy.md) -- shares the tenancy model decided in 0011.
Both surfaces must agree. Stray Related ADRs: lines in ### Notes, index-hub entries, or superseded-by body notes are courtesy navigation, not edges.
A decision log sits inside a broader set of community-health files: README, LICENSE, CONTRIBUTING, CODE_OF_CONDUCT (opensource.guide four-file canon), plus the extended GitHub profile (SECURITY, SUPPORT, CODEOWNERS, FUNDING, CITATION, .github/ templates). doc-master does not auto-create any of these; the four-question diagnostic still applies. Full canon in the repo-health skill -- load it when the user sets up community-health files, audits repo bootstrap docs, or picks a license / code-of-conduct / contribution guide.
The eleven canonical failure modes (drift, ADR-PRD duplication, bundled decisions, premature ADR, template thrash, decision-by-AI-without-buy-in, and the rest) with symptoms and remedies: references/failure-modes.md. Load during audits and adr-critique.
/doc-audit)Follow the eight-step procedure in references/audit-procedure.md: Inventory → ADR-canon test → four-question test → drift → duplication → misclassification → backfill-candidate detection (ASR test against shipped-change evidence) → numbered KEEP / MERGE / REWRITE / DELETE / MOVE / BACKFILL-ADR action list.
BACKFILL-ADR is a candidate, not a draft -- the audit surfaces it; the architect decides whether to load adr-backfill. Evidence must appear in two independent locations; reconstruction-confidence: low routes to open-questions.md. The procedure file pins the hard constraints (no body edits on Accepted ADRs, no bulk renumbering, no auto-generated Owners, no deletion without sign-off) and the post-approval flow.
Every doc recommended must answer all four diagnostic questions (Purpose, Audience, Owner, Update trigger). If one is unanswerable, the doc should not exist yet. This applies to ADRs, RFCs, how-tos, references, explanations, tutorials, runbooks, READMEs, and CONTRIBUTING alike. Documentation is a cost as well as a benefit -- the right number is the smallest number that keeps the system understandable, operable, and decisive.
references/alternatives-catalog.md -- Diátaxis / RFC / runbook routingreferences/failure-modes.md -- eleven ADR failure modes with remediesreferences/audit-procedure.md -- folder-level audit procedure with hard constraintsreferences/changelog-canon.md -- Keep a Changelog 1.1 + SemVer 2.0.0references/runbook-canon.md -- runbook structure for paged incidents (not how-to)references/postmortem-canon.md -- blameless postmortem (PagerDuty + Google SRE)references/open-questions-canon.md -- standalone open-questions registerreferences/agentic-docs-canon.md -- AGENTS.md convention for AI-agent contextreferences/adr-template-catalog.md -- template index (Nygard / MADR short / MADR long / Y-statement / Tyree-Akerman / arc42 §9)../_shared/adr-is-not.md -- canonical "ADR is NOT" checklistadr-discovery, adr-drafting, adr-critique skillsc4-model skill -- canonical-C4 LikeC4 diagramsrepo-health skill -- community-health files (README / LICENSE / CONTRIBUTING / CODE_OF_CONDUCT / SECURITY / SUPPORT / templates / REUSE-SPDX)development
This skill should be used when the user asks to train, debug, scale, or improve ML models. PROACTIVELY activate for: (1) PyTorch, TensorFlow/Keras, JAX, Flax, Hugging Face Trainer/Accelerate training loops, (2) distributed training, DDP/FSDP/DeepSpeed, TPU/GPU setup, (3) mixed precision AMP/bf16, gradient accumulation, checkpointing, seeding, (4) overfitting, imbalance, loss functions, regularization, LR schedules, warmup, (5) memory optimization, gradient checkpointing, offloading, quantization-aware training. Provides: reproducible training best practices across deep learning and classical ML.
development
This skill should be used when the user asks to productionize, track, version, govern, monitor, or automate ML systems. PROACTIVELY activate for: (1) MLflow, Weights & Biases, Neptune, Comet, ClearML experiment tracking, (2) model registry, model versioning, artifact lineage, reproducibility, (3) Kubeflow, SageMaker Pipelines, Vertex AI Pipelines, Azure ML pipelines, Databricks workflows, (4) CI/CD, continuous training/evaluation, A/B tests, canary/shadow deployments, (5) drift detection, model monitoring, data validation, responsible AI governance. Provides: end-to-end MLOps architecture and operational safeguards.
development
This skill should be used when the user asks to optimize, export, serve, compress, or accelerate ML inference. PROACTIVELY activate for: (1) latency, throughput, p95/p99, batching, concurrency, KV cache, memory, or cost issues, (2) quantization INT8/INT4, GPTQ, AWQ, bitsandbytes, pruning, sparsity, distillation, (3) ONNX export, ONNX Runtime, TensorRT, TorchScript, torch.compile, XLA, OpenVINO, Core ML, TFLite, (4) Triton, TorchServe, TF Serving, BentoML, Seldon, KServe configuration, (5) edge deployment, CPU/GPU/TPU/Inferentia serving. Provides: hardware-aware inference optimization and safe benchmarking.
testing
This skill should be used when the user asks to tune hyperparameters, run sweeps, optimize search spaces, or use AutoML. PROACTIVELY activate for: (1) Optuna, Ray Tune, FLAML, AutoGluon, Hyperopt, Nevergrad, KerasTuner, W&B sweeps, (2) grid search, random search, Bayesian optimization, TPE, Gaussian processes, evolutionary search, (3) ASHA, Hyperband, successive halving, multi-fidelity optimization, population-based training, (4) learning-rate finder, batch-size search, early stopping, pruning, (5) reproducible sweep design and experiment analysis. Provides: budget-aware hyperparameter search strategy.