arch-deviate

Records deliberate architecture rule deviations as numbered ADRs under docs/adr/.

89|10|Updated Sep 15, 2026
One-click install
npx skills add https://github.com/baristaze/swe_guidelines --skill arch-deviate-baristaze
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: arch-deviate
Source: https://github.com/baristaze/swe_guidelines/tree/main/skills/arch-deviate
Command: npx skills add https://github.com/baristaze/swe_guidelines --skill arch-deviate-baristaze

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a project intentionally diverges from an architecture guideline rule, the decision is often lost in review threads or left undocumented, causing repeated findings in future reviews. This Skill records the deviation as a formal Architecture Decision Record so reviews treat the cited code as a documented exception rather than a finding. ## Core Features & Use Cases - ADR Generation: Resolves the deviated rule from the lens catalog and guideline, quotes the principle verbatim, and writes a numbered ADR (NNNN-<slug>.md) under docs/adr/ with context, decision, and consequences. - Checker Integration: Produces the matching arch-check configuration entry (disable, exception, or inline ignore comment) so the static checker passes on code covered by the ADR. - Deviations Table Maintenance: Appends a summary row to the specs/architecture.md deviations table when one exists. - Use Case: A reviewer flags that a service bypasses the storage layer (lens STO-02), and the team decides the bypass is intentional for a read-only reporting path. Run the Skill with the lens id and reason to produce ADR-0007, the pyproject.toml exception entry, and the inline comment to cite beside the code. ## Quick Start Ask the AI to record a deviation from lens STO-02 with the reason that the reporting service reads replicas directly, and have it write the ADR and arch-check entry.

Frequently Asked Questions about arch-deviate

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

FAQPage Schema
How do I document an intentional deviation from an architecture rule?▼

Provide the rule as a lens id, section title, or description plus a one-line reason. The Skill writes a numbered ADR under docs/adr/ quoting the rule verbatim, stating the decision, and listing the consequences the project accepts.

How do I make arch-check pass on code that intentionally breaks a rule?▼

The Skill generates the appropriate entry: a [[tool.arch-check.disable]] entry for a fully disabled rule, a [[tool.arch-check.exception]] entry with a path glob for specific files, or an inline '# arch-check: ignore[<LENS-ID>] ADR-NNNN' comment for a single line.

Is a technology substitution recorded as a deviation?▼

No. Substituting an equivalent for a technology the guideline names is not a deviation; it belongs in the project's technology-choices ADR per the guideline's override section. The Skill detects this case and stops without writing a deviation ADR.

Where must deviation ADRs be stored for arch-check to accept them?▼

ADRs must live under docs/adr/ as Markdown files; arch-check refuses a deviation whose adr field points anywhere else. Inline ignore comments resolve only to docs/adr/NNNN-*.md paths with a four-digit number.

Does a recorded deviation still appear in architecture reviews?▼

Yes, but only as a one-line entry under Deviations, never as a finding, and it never lowers severity. This applies only when the ADR number is cited in a comment beside the deviating code.