Arckit conformance

From tractorjuice/arckit-codex · View interactive version

Arckit conformance is an AI agent skill from the GitHub repository tractorjuice/arckit-codex. Assess architecture conformance — ADR decision implementation, cross-decision consistency, design-principles alignment, architecture drift, technical debt, and custom constraint rules

How to use this skill

Skill file

User Input

$ARGUMENTS

Goal

Generate a systematic Architecture Conformance Assessment that checks whether the decided architecture (ADRs, principles, approved designs) matches the designed/implemented architecture (HLD, DLD, DevOps artifacts). This command fills the gap between $arckit-health (quick metadata scan) and $arckit-analyze (deep governance across all dimensions) by focusing specifically on decided-vs-designed conformance, architecture drift, and architecture technical debt (ATD).

This is a point-in-time assessment — run at key project gates or after major design changes to track conformance over time.

Prerequisites

Architecture Principles (MANDATORY)

a. PRIN (Architecture Principles, in projects/000-global/) (MUST exist):

Architecture Decision Records (MANDATORY)

b. ADR (Architecture Decision Records, in projects/{project-dir}/decisions/) (MUST exist):

Project Artifacts (RECOMMENDED)

More artifacts = better conformance assessment:

Custom Constraint Rules (OPTIONAL)

c. .arckit/conformance-rules.md in the project root (if exists):

Note: Assessment is possible with minimal artifacts (principles + ADRs), but accuracy improves significantly with HLD/DLD and review documents.

Operating Constraints

Non-Destructive Assessment: Do NOT modify existing artifacts. Generate a new conformance assessment document only.

Evidence-Based Assessment: Every finding must cite specific file:section:line references. Avoid vague statements like "design addresses this" — be specific.

Honest Assessment: Do not inflate conformance scores. FAIL is better than false PASS. Untracked technical debt should be surfaced, not hidden.

Architecture Principles Authority: The architecture principles (ARC-000-PRIN-*.md in projects/000-global/) are non-negotiable. Any design that contradicts principles is automatically a FAIL.

ADR Decision Authority: Accepted ADR decisions are binding. Designs that ignore or contradict accepted decisions are non-conformant.

Execution Steps

Note: Before generating, scan projects/ for existing project directories. For each project, list all ARC-*.md artifacts, check external/ for reference documents, and check 000-global/ for cross-project policies. If no external docs exist but they would improve output, ask the user.

0. Read the Template

Read the template (with user override support):

Tip: Users can customize templates with $arckit-customize conformance

1. Validate Prerequisites

Check Architecture Principles:

Check ADRs:

1b. Read external documents and policies

2. Identify the Target Project

1. Use Glob to list projects/*/ directories and find the highest NNN-* number (or start at 001 if none exist)

2. Calculate the next number (zero-padded to 3 digits, e.g., 002)

3. Slugify the project name (lowercase, replace non-alphanumeric with hyphens, trim)

4. Use the Write tool to create projects/{NNN}-{slug}/README.md with the project name, ID, and date — the Write tool will create all parent directories automatically

5. Also create projects/{NNN}-{slug}/external/README.md with a note to place external reference documents here

6. Set PROJECT_ID = the 3-digit number, PROJECT_PATH = the new directory path

3. Load All Relevant Artifacts

Read the following artifacts. Do NOT read entire files — extract relevant sections for each conformance check.

Architecture Principles (projects/000-global/ARC-000-PRIN-*.md):

ADRs (projects/{project-dir}/decisions/ARC-*-ADR-*.md):

Design Documents (if exist):

Review Documents (if exist):

Other Artifacts (if exist):

Spec Kit Delivery Artefacts (if a specs/ folder exists at the repository root, or the arguments name one with SPECS=<path>):

Custom Rules (if exist):

4. Execute Conformance Checks

Run ALL 12 conformance checks. Each check produces a PASS/FAIL/NOT ASSESSED status with evidence.


Check ADR-IMPL: ADR Decision Implementation (Severity: HIGH)

For EACH ADR with status "Accepted":

  1. Extract the Decision section text
  2. Search HLD and DLD for evidence that the decision is implemented
  3. Check that the technology/pattern/approach chosen in the ADR appears in the design
  4. PASS: Design documents reference or implement the ADR decision
  5. FAIL: Decision is accepted but not reflected in design documents
  6. NOT ASSESSED: No HLD/DLD available to check against

Evidence format: ADR "Title" (file:line) → HLD Section X (file:line) — [IMPLEMENTED/NOT FOUND]


Check ADR-CONFL: Cross-ADR Consistency (Severity: HIGH)
  1. Compare all Accepted ADRs for contradictions:
  1. PASS: No contradictions found between accepted ADRs
  2. FAIL: Contradictions identified — list conflicting ADR pairs with specific conflicts

Evidence format: ADR-001 (file:line) CONFLICTS WITH ADR-005 (file:line) — [description]


Check ADR-SUPER: Superseded ADR Enforcement (Severity: MEDIUM)
  1. Identify all Superseded ADRs
  2. Check that HLD/DLD does NOT reference patterns/technologies from superseded decisions
  3. Check that the superseding ADR's decision IS reflected instead
  4. PASS: No residue from superseded decisions found in design
  5. FAIL: Design still references superseded decision patterns/technologies

Evidence format: Superseded ADR "Title" (file:line) — residue found in HLD Section X (file:line)


Check PRIN-DESIGN: Principles-to-Design Alignment (Severity: HIGH)

For EACH architecture principle:

  1. Extract the principle statement and implications
  2. Search HLD/DLD for design elements that satisfy or violate the principle
  3. Apply binary pass/fail constraint checking (unlike principles-compliance which uses RAG scoring):
  1. This is a hard constraint check, not a maturity assessment
  2. If a Spec Kit constitution exists, check that it carries every non-negotiable principle, by name or [ArcKit Principle N] tag. A non-negotiable principle missing from the constitution is a FAIL: the delivery team is not bound by it

Note: This differs from $arckit-principles-compliance which provides RAG scoring with remediation plans. This check is a binary gate: does the design conform or not?

Evidence format: Principle "Name" — HLD Section X (file:line) [SATISFIES/VIOLATES] — [description]


Check COND-RESOLVE: Review Condition Resolution (Severity: HIGH)
  1. Read HLD/DLD review documents (HLDR, DLDR)
  2. Look for conditions — typically flagged as "APPROVED WITH CONDITIONS", "CONDITIONAL", "CONDITIONS", or specific condition markers
  3. For each condition found:
  1. PASS: All review conditions have resolution evidence
  2. FAIL: Unresolved conditions found — list each with its source and status

Evidence format: Condition "[text]" (file:line) — [RESOLVED in file:line / UNRESOLVED]


Check EXCPT-EXPIRY: Exception Register Expiry (Severity: HIGH)
  1. Search for exception registers in principles-compliance assessment, risk register, and review documents
  2. Look for patterns: "Exception", "EXC-", "Approved exception", "Waiver", "Exemption"
  3. For each exception found, check if the expiry date has passed (compare to today's date)
  4. PASS: No expired exceptions found (or no exceptions exist)
  5. FAIL: Expired exceptions found that haven't been renewed or remediated

Evidence format: Exception "EXC-NNN" (file:line) — expired [DATE], [REMEDIATED/STILL ACTIVE]


Check EXCPT-REMEDI: Exception Remediation Progress (Severity: MEDIUM)
  1. For each active (non-expired) exception found:
  1. PASS: All active exceptions have remediation plans with evidence of progress
  2. FAIL: Exceptions missing remediation plans or showing no progress

Evidence format: Exception "EXC-NNN" — remediation plan [EXISTS/MISSING], progress [EVIDENCE/NONE]


Check DRIFT-TECH: Technology Stack Drift (Severity: MEDIUM)
  1. Extract technology choices from ADRs (databases, frameworks, languages, cloud services, tools)
  2. Extract technology references from HLD, DLD, and DevOps strategy
  3. Compare: do the technologies in design documents match ADR decisions?
  4. Look for technologies appearing in design that were NOT decided via ADR (undocumented technology adoption)
  5. PASS: Technology stack in design matches ADR decisions
  6. FAIL: Technologies in design don't match ADR decisions, or undocumented technologies found

Evidence format: Technology "[name]" — ADR (file:line) says [X], Design (file:line) uses [Y]


Check DRIFT-PATTERN: Architecture Pattern Drift (Severity: MEDIUM)
  1. Extract architecture patterns from ADRs and HLD (microservices, event-driven, REST, CQRS, etc.)
  2. Check DLD for consistent pattern application across all components
  3. Look for components that deviate from the chosen pattern without an ADR justifying the deviation
  4. PASS: Patterns consistently applied across all design artifacts
  5. FAIL: Inconsistent pattern application found

Evidence format: Pattern "[name]" chosen in ADR/HLD (file:line) — DLD component [X] (file:line) uses [different pattern]


Check RULE-CUSTOM: Custom Constraint Rules (Severity: Variable)
  1. Read .arckit/conformance-rules.md if it exists
  2. For each rule defined:
  1. PASS: Rule satisfied with evidence
  2. FAIL: Rule violated — cite specific violation
  3. NOT ASSESSED: Insufficient artifacts to check rule
  4. If no custom rules file exists: mark as NOT ASSESSED with note "No custom rules defined"

Evidence format: Rule "[text]" — [SATISFIED/VIOLATED] at (file:line)


Check ATD-KNOWN: Known Technical Debt (Severity: LOW)
  1. Catalogue acknowledged architecture technical debt from:
  1. Classify each debt item into ATD categories:
  1. PASS: Known debt is documented and tracked (this check always passes if debt is acknowledged)
  2. NOT ASSESSED: No artifacts available to catalogue debt

Evidence format: ATD-NNN: "[description]" — Category: [category], Source: (file:line)


Check ATD-UNTRACK: Untracked Technical Debt (Severity: MEDIUM)
  1. Look for potential architecture technical debt NOT explicitly acknowledged:
  1. PASS: No untracked debt detected
  2. FAIL: Potential untracked debt identified — list items for team review

Evidence format: Potential ATD: "[description]" found at (file:line) — not documented in any ADR/risk/exception


5. Calculate Conformance Score

Scoring:

Deviation Tier Assignment — for each FAIL finding, assign a tier based on result + severity:

Tier-Specific Response Requirements:

Overall Recommendation:

6. Generate Document

Use the document ID ARC-{PROJECT_ID}-CONF-v{VERSION} (e.g., ARC-001-CONF-v1.0). Work out {VERSION} first with .arckit/references/version-detection.md: a re-run writes the next version beside the earlier assessment, never over it, so the conformance trend stays visible.

Before writing the file, read .arckit/references/quality-checklist.md and verify all Common Checks plus the CONF per-type checks pass. Fix any failures before proceeding.

Use the Write tool to save the document to projects/{project-dir}/ARC-{PROJECT_ID}-CONF-v{VERSION}.md.

Populate the template with all conformance check results, following the structure defined in the template.

IMPORTANT: Use Write tool, not output to user. Document will be 500-2000 lines depending on the number of ADRs, principles, and findings.

Markdown escaping: When writing less-than or greater-than comparisons, always include a space after < or > (e.g., < 3 seconds, > 99.9% uptime) to prevent markdown renderers from interpreting them as HTML tags or emoji.

7. Show Summary to User

Display concise summary (NOT full document):

✅ Architecture conformance assessment generated

📊 **Conformance Summary**:
   - Overall Score: [X]% ([CONFORMANT / CONFORMANT WITH CONDITIONS / NON-CONFORMANT])
   - Checks Passed: [X] / [Y]
   - Checks Failed: [X]
   - Not Assessed: [X]

[IF RED findings:]
🔴 **RED — Escalate** ([N]):
   - [Check ID]: [Brief description]
   [List all RED findings]

[IF YELLOW findings:]
🟡 **YELLOW — Negotiate** ([N]):
   - [Check ID]: [Brief description]
   [List all YELLOW findings]

[IF GREEN findings:]
🟢 **GREEN — Acceptable** ([N]):
   - [Check ID]: [Brief description]
   [List all GREEN findings]

[IF ATD items found:]
📦 **Architecture Technical Debt**: [X] known items, [Y] potential untracked items

📄 **Document**: projects/{project-dir}/ARC-{PROJECT_ID}-CONF-v{VERSION}.md

🔍 **Recommendation**:
   [CONFORMANT]: ✅ Architecture conforms to decisions and principles
   [CONFORMANT WITH CONDITIONS]: ⚠️ No critical deviations — [N] YELLOW findings need remediation by [date]
   [NON-CONFORMANT]: ❌ [N] RED findings require escalation before proceeding

**Next Steps**:
1. Review detailed findings in the generated document
2. [IF RED findings:] Escalate critical deviations to architecture board immediately
3. [IF YELLOW findings:] Agree remediation plans or fallback positions within 30 days
4. [IF ATD items:] Review technical debt register with architecture board
5. [IF custom rules missing:] Consider creating `.arckit/conformance-rules.md` for project-specific rules
6. Schedule next conformance check at [next gate/phase]

Post-Generation Actions

After generating the assessment document:

  1. Suggest Follow-up Commands:

```text

📋 Related Commands:

```

  1. Track in Project:

Suggest adding remediation actions to project tracking:

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.