From adr
This skill should be used when the user asks about "ADR compliance", "architecture compliance", "ADR audit", "enforce ADRs", "check code against ADRs", "ADR violations", or needs guidance on auditing code compliance with accepted architectural decision records.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adr:adr-complianceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides guidance on auditing code and system compliance with accepted Architectural Decision Records. Compliance checking ensures that architectural decisions are actually implemented and followed.
This skill provides guidance on auditing code and system compliance with accepted Architectural Decision Records. Compliance checking ensures that architectural decisions are actually implemented and followed.
ADR Compliance verifies that:
Not all ADRs require compliance checking:
| ADR Type | Enforcement |
|---|---|
| Technology choice | Check for usage/imports |
| Pattern adoption | Check for structure/patterns |
| Constraint | Check for violations |
| Process decision | Manual review |
| Organizational | Manual audit |
For each enforceable ADR, define:
Methods for checking:
Document findings:
Search for patterns that should/shouldn't exist:
# Check for prohibited imports (ADR says don't use library X)
grep -r "import libraryX" src/
# Check for required patterns (ADR says use factory pattern)
grep -r "Factory.create" src/
Use architecture test frameworks:
Java (ArchUnit):
@ArchTest
static final ArchRule servicesShouldNotAccessRepositories =
noClasses().that().resideInAPackage("..service..")
.should().accessClassesThat().resideInAPackage("..repository..");
TypeScript:
// Custom architecture rules
describe('Architecture compliance', () => {
it('services should not import from UI layer', () => {
// Check import patterns
});
});
For ADRs requiring manual review:
"Use PostgreSQL for primary storage"
Compliance checks:
"Adopt event-driven architecture"
Compliance checks:
"All external APIs must use authentication"
Compliance checks:
"Use service X for notifications"
Compliance checks:
## ADR Compliance Report
**Date**: {date}
**Scope**: {files/modules checked}
### Summary
| Status | Count |
|--------|-------|
| Compliant | X |
| Violations | Y |
| Undetermined | Z |
### Violations Found
#### ADR-001: Use PostgreSQL
**Severity**: High
**Location**: `src/legacy/data.js:45`
**Issue**: Direct MySQL connection found
**Recommendation**: Migrate to PostgreSQL adapter
#### ADR-007: Event-Driven Architecture
**Severity**: Medium
**Location**: `src/services/order.ts:123`
**Issue**: Synchronous call to payment service
**Recommendation**: Emit PaymentRequired event
| Level | Criteria | Action |
|---|---|---|
| Critical | Security or data risk | Immediate fix |
| High | Architectural violation | Fix in next sprint |
| Medium | Pattern deviation | Plan remediation |
| Low | Minor inconsistency | Track for cleanup |
Add compliance checks to pipeline:
Schedule regular compliance audits:
Maintain violation backlog:
Configure in .claude/adr.local.md:
compliance:
enabled: true
check_all_accepted: true
file_patterns:
- "**/*.ts"
- "**/*.py"
ignore_patterns:
- "**/test/**"
- "**/node_modules/**"
references/compliance-patterns.md - Common compliance check patternsreferences/automation.md - Automation strategiesnpx claudepluginhub zircote-plugins/adrGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.