Skip to content

/edikt:adr:review

Review ADR language quality — checks whether decisions are specific, actionable, and phrased for reliable enforcement.

This is a scoped shortcut for running /edikt:gov:review targeting ADRs only.

Usage

bash
/edikt:adr:review
/edikt:adr:review ADR-003

Arguments

ArgumentDescription
(none)Review all ADRs in docs/architecture/decisions/
ADR-NNNReview a specific ADR
--backfillInteractive retrofit: populate canonical_phrases on existing multi-sentence ADRs

Soft-language markers

In addition to the four quality dimensions below, the review now flags six soft-language markers in directive bodies:

MarkerWhy it's flaggedSuggested replacement
shouldImplies optionalityMUST
ideallySuggests best effortMUST
preferNon-mandatoryMUST (positive) or NEVER (negative)
try toEffort without commitmentMUST
mightProbabilistic framingRewrite as definitive
considerAdvisory, not directiveMUST evaluate X or remove

For each flagged occurrence, the review shows the directive text, the marker, and a suggested replacement using MUST or NEVER with one-clause reasoning.

--backfill flag

Retrofit canonical_phrases onto existing multi-sentence ADRs interactively:

bash
/edikt:adr:review --backfill

For each ADR with a multi-sentence directive and no canonical_phrases:

  1. The command proposes 2–3 candidate phrases derived from a noun/verb heuristic applied to the directive body
  2. It shows the rationale for each candidate
  3. You approve (y), skip (n), or edit (e) before the field is written

The [e]dit option opens an inline editor for the phrase list before confirming. One ADR at a time; Ctrl+C to stop without losing already-completed ADRs.

After backfill, re-run /edikt:gov:compile to pick up the new phrases.

What it checks

Each directive in an ADR is scored on four dimensions:

DimensionStrongVague
SpecificityNames exact patterns, functions, or formatsCould mean anything to different readers
ActionabilityOne clear action, no ambiguityNo actionable instruction
PhrasingNEVER/MUST with one-clause reason for hard constraintsReads as a suggestion
TestabilityVerifiable by grep, test, or code reviewCannot be verified

Sidecar Cross-Check (v0.6.0)

After the prose-quality review, :review cross-checks the ADR's <ADR>.edikt.yaml sidecar against the prose body for drift. The check is read-only — it never modifies files.

For each directive in the sidecar:

  1. Read <ADR>.edikt.yaml. If missing, warn: "No sidecar found — run /edikt:adr:compile <ADR> to generate."
  2. Locate each of the directive's source_excerpts[].quote entries in the prose body. If any verbatim quote is not found, flag: "Sidecar directive 'X' no longer matches body — sidecar may be stale."
  3. Scan the prose body for imperative directives (MUST, MUST NOT, SHOULD, NEVER, ALWAYS) not represented in the sidecar. Flag any extras.

The output is either:

text
✓ Sidecar in sync (5 directives, all source_excerpts match)

or:

text
⚠ Sidecar drift detected
  ADR-003-use-postgres-for-persistence.edikt.yaml
    drift: directive "Use connection pooling..." quote not found at lines 47-49
    extra in body: line 78 — "MUST run migrations in a transaction" (no sidecar entry)

  Resolve via:
    - /edikt:adr:compile ADR-003   (regenerate from current prose)
    - or edit the prose body to match the sidecar's source_excerpts

:review never auto-regenerates. The user resolves drift via :compile or by editing the prose. This keeps :review safe to run as a CI gate without touching files.

When to run

  • After writing a new ADR, before accepting it
  • Periodically — ADR language quality can drift as context accumulates

What's next

Released under the Elastic License 2.0. Free to use, not for resale.