agentleFS
willianbswillianbs/skills/adr-enforcer/SKILL.md

adr-enforcer

Skill0 starsChanged 4 months agoMITView on GitHub

Ensures engineering work aligns with Architecture Decision Records and catches architectural drift. Use when planning, implementing, reviewing, or when no ADRs exist and bootstrap is needed. Emits ADR_COMPLIANCE. Never silently invents architecture or auto-modifies ADRs.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer existing patterns over new frameworks.

    line 43
  2. Distinctive:

    Do not rewrite ADR files unless the user explicitly asks.

    line 46
  3. Distinctive:

    Search in order; stop when found:

    line 52
  4. Very specific:

    If Conflict → Decision Block.

    line 66
  5. Very specific:

    If NoADRs → bootstrap: propose 1–3 minimal ADR outlines for decisions the change forces.

    line 67
  6. Distinctive:

    Never auto-modify ADR files without explicit user request.

    line 105
  7. Distinctive:

    Never approve Conflict as “temporary.”

    line 106
  8. Distinctive:

    Never invent a complete architecture under NoADRs—only the decisions forced by the change.

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Make ADRs the authority for architectural choices. Detect conflicts before code hardens the wrong pattern.

When to Use / When NOT to Use

Use when: feature touches structure/patterns/deps; delivery-planner emits ADR triggers; review suspects drift; greenfield with no ADRs.

Do not use when: pure style nits; bugfix with no architectural impact.

Preconditions

Task or change set identified. If no ADRs found → enter bootstrap mode (do not pretend compliance).

Inputs / Outputs

Inputs: proposed change / plan / diff, CONTEXT_PACK.

Outputs: ADR_COMPLIANCE

Upstream / Downstream

Upstream: context-loader, spec-validator, delivery-planner, code-reviewer, quality-gate.

Downstream: delivery-planner, feature-implementer, engineering-mentor (explain tradeoffs).

Core Principles

  1. ADRs win over preference.
  2. Unknown compliance is not approval.
  3. Conflicts Block until a superseding ADR is drafted/approved.
  4. Prefer existing patterns over new frameworks.
  5. Bootstrap proposes first ADRs; does not invent a full architecture alone.
  6. Drift is a first-class finding.
  7. Do not rewrite ADR files unless the user explicitly asks.

Process

Discovery algorithm

Search in order; stop when found:

  1. docs/adr/, adr/, docs/architecture/decisions/
  2. Files matching **/ADR*.md, **/*adr*.md
  3. Links from ARCHITECTURE.md / README
  4. Index files (README inside adr dirs)

Record paths + IDs/titles + status if present (accepted, superseded, proposed).

Evaluation

  1. Map change to relevant ADRs.
  2. Compliance matrix: requirement → ADR → Compliant / Gap / Conflict / Unknown.
  3. Detect new patterns, deps, or layers not covered by ADRs.
  4. If Conflict → Decision Block; list required superseding ADR outline (title, context, decision, consequences)—do not auto-write the ADR file.
  5. If NoADRs → bootstrap: propose 1–3 minimal ADR outlines for decisions the change forces; status NoADRs / ProceedWithConditions.

Evidence Requirements

Cite ADR path + clause. Cite code paths that drift.

Stop Conditions / Failure Modes

ConditionAction
Conflict with accepted ADRBlock
Unknown whether ADR appliesCompliantWithGaps or Block for HighRisk
No ADRs + HighRisk changeProceedWithConditions only with bootstrap ADR outlines approved by user

Severity + Confidence

Conflict with accepted ADR on security/data boundaries → Critical/High.

Output Contract

## ADR_COMPLIANCE
Status: Compliant | CompliantWithGaps | Conflict | NoADRs | Blocked
Checked ADRs: ...
Violations: ...
Required new ADRs: ...
Bootstrap outlines (if NoADRs): ...
Decision: Proceed | ProceedWithConditions | Revise | Block

Handoffs

  • delivery-planner — after compliance known
  • feature-implementer — only if Compliant / CompliantWithGaps with conditions
  • code-reviewer / quality-gate — consume this report; do not re-litigate ADRs shallowly

Never

  • Never auto-modify ADR files without explicit user request.
  • Never approve Conflict as “temporary.”
  • Never invent a complete architecture under NoADRs—only the decisions forced by the change.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.