plugins/doc-master/skills/adr-drafting/SKILL.md
This skill should be used when a decision is ready to become an ADR and the user wants co-thinking rather than template filler. PROACTIVELY activate on "draft the ADR", "write up the decision", "co-think this ADR", "challenge my reasoning", "ADR for X", "MADR for X", "Y-statement for X", "we decided to use X", "co-draft", "ADR drafting", or "scripted push-back." Provides: seven-phase ADR drafting, one-question turns, failure-mode pressure test, and self-critique against the ADR-is-NOT checklist.
npx skillsauth add JosiahSiegel/claude-plugin-marketplace adr-draftingInstall 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.
Co-drafts an ADR through structured dialogue. The architect never sees a first draft — only the self-critiqued revision.
docs/architecture/discovery-brief.md with all five MUSTs CONFIRMED. If missing or shallow, this skill refuses and routes to adr-discovery.docs/architecture/open-questions.md. PARKED MUSTs must be cited in the resulting ADR's Consequences.Never emit more than one question or one step per message. If a turn contains two ?, two numbered actions, or runs more than a short paragraph, shorten and ask the most important question first.
Read discovery-brief.md. Do not re-ask anything in it. Ask only for the MUSTs not already confirmed:
| MUST | Default question | |---|---| | Purpose of the decision | "In one sentence: what decision are we recording?" | | Architectural characteristic under pressure | "Which quality is forcing this — latency, cost, availability, security, maintainability, something else? Name the number or condition." | | Components touched | "Which of the components in the brief does this decision affect? (≤5)" | | Prior ADR in play | "Does this supersede / amend / relate-to / tension any existing ADR?" | | Decider | "Who is accountable for this decision? Named human(s)." |
Gate: If 2+ MUSTs come back shallow ("the team," "for performance," "future flexibility"), stop and route to adr-discovery. Do not advance.
Walk each ADR returned by Phase 1's "prior ADR" question, one at a time. For each, classify in dialogue:
supersedes — this decision replaces itamends — this decision adjusts without replacingrelates-to — this decision shares context but stands alonetension — incompatible without one supersedingunrelated — drop itGlob the ADR directory once to confirm the architect didn't miss any.
The architect lists the options. Not the agent. If they offer one option, ask: "What else is realistic?"
Walk each option across four separate exchanges:
Optionally add one missing option the architect didn't name (only if you can name a force they haven't addressed). Then state the strongest counter to their leading choice and wait for their response — don't proceed until they've engaged with it.
Four separate exchanges:
references/pushback-patterns.md that matches the leading option, deliver it verbatim, wait.RFC routing: If confidence is low, the architect isn't a single named human, or the decision touches > 5 components, propose status: proposed with rfc-deadline (default: two weeks) instead of accepted. ADRs serving as RFCs are still real ADRs — they just have a deadline before they harden. If the team also wants a numeric score, store it in confidence-score; keep confidence as high, medium, or low.
Section by section. Confirm each before moving to the next. Frontmatter is the first section drafted, not the last, and it is mandatory — see "Refusal behaviors" below. Hard limits enforced:
| Section | Limit | Notes |
|---|---|---|
| Frontmatter | YAML between --- fences | Mandatory. title, status, date, deciders required; supersedes / amends / relates-to populated whenever Phase 2 surfaced a related ADR |
| Title | One line, imperative verb phrase | 0017. Use Postgres for primary store |
| Context | ≤ 3 sentences | The forces — not the history |
| Decision | ≤ 3 sentences | Active voice, present tense |
| Consequences | Bullets only | Good, because… / Bad, because… |
| Compliance | 1-3 sentences | Fitness function snippet allowed |
| Alternatives | Bullets, one-paragraph each | One con per alternative is enough |
| More Information | Optional sub-sections, ### Relationships required if frontmatter relationships exist | Mirrors frontmatter supersedes / amends / relates-to using the link-prefix vocabulary documented in references/template-fields.md (Supersedes, Superseded by, Amends, Amended by, Related to). Parsers that scan body links instead of frontmatter rely on this section. |
| Notes | Optional | PARKED open questions cited here. Not a substitute for the Relationships mirror above. |
Default body structure: unless the project's existing decision log already uses a different convention (Nygard plain, Y-statement, arc42, Tyree-Akerman), default to MADR (currently 4.0.0): ## Context (or ## Context and Problem Statement) → ## Decision (or ## Decision Outcome) → ## Consequences → ## Compliance → ## Alternatives Considered → ## More Information (with ### Relationships when relationships exist). If the project has an existing template, follow it. Upstream MADR template: adr.github.io/madr/, source repo github.com/adr/madr.
The architect does not see the Phase 5 output yet. Self-critique against ../_shared/adr-is-not.md first, flagging violations one at a time using this template:
Original: <verbatim line>
Violates: <which rule from adr-is-not.md>
Rewrite: <shorter, stricter replacement>
Apply? (yes / no / adjust)
One violation per message. Wait for the architect's reply before flagging the next.
Show the full final draft only when all violations are resolved or accepted.
docs/adr/, docs/decisions/, docs/architecture/decisions/, **/adr/*.md; also check legacy architecture/decisions/ but warn it may need custom ADR Explorer root configuration. Use the first existing directory; if none, create docs/adr/.max+1, zero-pad to 4 digits.NNNN-kebab-imperative-title.md (must start with the numeric id).README.md (create if absent).supersedes / amends / relates-to so the architect can update the linked ADRs in a separate pass. Remind them that ADR-graph tooling splits into two families:
supersedes, amends, and relates-to produce edges. Body prose (superseded-by text on the old ADR, Related ADRs: lines, index-hub links) is invisible.## Links, now community-conventionally ## More Information with a ### Relationships sub-section). Frontmatter is invisible.
The ADR just saved already contains both because Phase 5 enforces the mirror. The linked ADRs the architect updates in a separate pass must also follow the mirror convention. Use zero-padded four-digit ID strings ("0008") in frontmatter lists for stable rendering, though bare integers also parse. If Accepted ADRs are immutable in this repo, ask whether metadata-only relationship-link maintenance (frontmatter + the body Relationships mirror) is allowed or needs an explicit governance exception.YAML frontmatter is mandatory and goes first. The body uses MADR (currently 4.0.0) by default and mirrors every frontmatter relationship into a ### Relationships block under ## More Information so the ADR renders edges in both classes of tooling: gray-matter-style parsers that read frontmatter, and parsers that scan body links under MADR-style sections.
---
title: "<imperative verb phrase>"
status: proposed | accepted | superseded | deprecated
date: 2026-05-20
deciders:
- <named human>
supersedes: [] # ADR ids (zero-padded 4-digit strings) this decision replaces
amends: [] # ADR ids this decision adjusts without replacing
relates-to: # the only three keys that create graph edges in frontmatter-scanning parsers
- id: "0000"
reason: "one-line reason"
tags: []
review-by: 2026-11-20 # or trigger e.g. "100k DAU"
expires: 2027-05-20 # optional; only when expiry is real
confidence: high | medium | low
confidence-score: 4 # optional numeric score
rfc-deadline: 2026-06-03 # only when status == proposed and acting as RFC
---
# NNNN. <Title>
## Context
≤ 3 sentences. The forces.
## Decision
≤ 3 sentences. Active voice.
## Consequences
- Good, because …
- Bad, because …
## Compliance
1-3 sentences. Fitness-function snippet if appropriate.
## Alternatives Considered
- Option B -- one paragraph, single strongest con.
- Option C -- one paragraph, single strongest con.
## More Information
### Relationships
Mirror every frontmatter relationship here using the link-prefix vocabulary. Required when frontmatter `supersedes` / `amends` / `relates-to` is non-empty.
- Supersedes [ADR-0004](0004-old-decision.md) -- replaced because <reason>.
- Related to [ADR-0011](0011-tenancy.md) -- shares the tenancy model.
### Notes
Optional. PARKED open questions cited here.
Mirror both surfaces. Frontmatter feeds gray-matter parsers (ADR Explorer); body ### Relationships under ## More Information feeds body-scanning parsers (ADR Manager). Either surface alone leaves the ADR half-rendered; the two must agree. Full rationale, field semantics, and the link-prefix vocabulary live in references/template-fields.md.
The skill refuses to draft when:
discovery-brief.md has any MUST not CONFIRMEDThe skill refuses to save when:
--- YAML frontmatter block containing at minimum title, status, date, and deciders (and supersedes / amends / relates-to whenever Phase 2 surfaced any related ADR).supersedes, amends, or relates-to but the body has no ## More Information → ### Relationships mirror, or vice versa. Either surface alone leaves the ADR invisible to half the tooling; the two must agree.references/template-fields.md — full semantics for every frontmatter field and sectionreferences/pushback-patterns.md — scripted push-backs for Phase 4references/rfc-routing.md — when an ADR should be RFC status with a deadline../_shared/adr-is-not.md — the canonical "ADR is not" checklist used in Phase 6adr-discovery skill for upstream context gatheringc4-model skill for diagrams alongside the ADRadr-critique skill for audits of legacy / external ADRs not drafted via this flowdevelopment
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.