write-adr

Writes Architecture Decision Records with executable grep-based enforcement rules for automated verification.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/lucolucus/mismagent --skill write-adr-lucolucus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-adr
Source: https://github.com/lucolucus/mismagent/tree/main/plugins/mismagent/skills/write-adr
Command: npx skills add https://github.com/lucolucus/mismagent --skill write-adr-lucolucus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Architecture Decision Records often become zombie documents that nobody enforces. This Skill writes ADRs whose mechanical constraints carry an executable enforced_by grep/lint rule, so a verifier can automatically fail builds that violate the decision instead of relying on human memory. ## Core Features & Use Cases - Mechanical vs discursive ADRs: Distinguishes constraints verifiable by grep/lint rules (checked by the mismagent-verifier) from judgment-based ones (checked by code review). - Portable, false-green-proof rules: Enforces POSIX-portable, shell-safe grep rules anchored to code constructs (imports, declarations) rather than filenames or bare tokens, with comment-stripping and positive/negative fixture validation. - Lifecycle management: Handles progressive numbering, superseding old ADRs, closing open spikes via closes_spike, wave-gated presence rules, and reconciliation with the context-map and profile boundary rules. - Use Case: During the model movement of a feature, record the decision "no wall-clock calls in domain code" as an ADR whose enforced_by grep covers System.currentTimeMillis, Instant.now(), and Clock.systemUTC(), so the verifier fails any violating diff. ## Quick Start Ask the agent to write an ADR for a specific architectural decision, for example: write an ADR forbidding direct database access from the frontend module with an enforced grep rule.

Frequently Asked Questions about write-adr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write an ADR that is automatically enforced in CI?

Add an enforced_by field to the ADR frontmatter containing an executable grep or lint rule. The mismagent-verifier runs that rule on the diff and fails the build if the constraint is violated, turning the ADR into a living check.

What is the difference between mechanical and discursive ADRs?

Mechanical ADRs carry an enforced_by grep/lint rule and are verified automatically by the verifier. Discursive ADRs require human judgment, leave enforced_by empty, and are verified during semantic code review instead.

Why does my enforced_by grep rule pass when it should fail?

False greens usually come from targeting a guessed filename that does not exist, matching bare tokens in comments, or using non-portable grep flags. Anchor rules to directories, packages, or code symbols, strip comment lines, and validate on positive and negative fixtures via bash -c.

Can I use grep -P or multiline matching in enforcement rules?

No. Rules must be POSIX-portable across BSD/macOS and GNU grep, so avoid -P, -z, and PCRE classes like \d. Use grep -rEn with BRE/ERE, POSIX classes like [[:space:]], and express multiline needs as two single-line greps combined with && or !.

When should a presence rule be wave-gated with exigible_from?

Use the structured form with kind: presence and exigible_from set to the owning block id whenever the rule requires a construct that does not exist yet. The verifier then enforces it only after that block is merged, avoiding a permanently red check for unbuilt work.