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)
Skills relacionados
a. PRIN (Architecture Principles, in projects/000-global/) (MUST exist):
If NOT found: ERROR "Run $arckit-principles first to define governance standards for your organization"
Architecture Decision Records (MANDATORY)
b. ADR (Architecture Decision Records, in projects/{project-dir}/decisions/) (MUST exist):
If NOT found: ERROR "Run $arckit-adr first — conformance assessment requires at least one accepted ADR"
Project Artifacts (RECOMMENDED)
More artifacts = better conformance assessment:
REQ (Requirements) in projects/{project-dir}/ — Requirements to cross-reference
Format: Natural language rules with MUST/MUST NOT/SHOULD/SHOULD NOT keywords
Example: "All API services MUST use OAuth 2.0 for authentication"
Example: "Database connections MUST NOT use plaintext credentials"
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):
First, check if .arckit/templates/conformance-assessment-template.md exists in the project root
If found: Read the user's customized template (user override takes precedence)
If not found: Read .arckit/templates/conformance-assessment-template.md (default)
Tip: Users can customize templates with $arckit-customize conformance
1. Validate Prerequisites
Check Architecture Principles:
Look for ARC-000-PRIN-*.md in projects/000-global/
If NOT found: ERROR "Architecture principles not found. Run $arckit-principles first."
Check ADRs:
Look for ARC-*-ADR-*.md files in projects/{project-dir}/decisions/
If NONE found: ERROR "No ADRs found. Run $arckit-adr first — conformance assessment requires at least one accepted ADR."
1b. Read external documents and policies
Read any external documents listed in the project context (external/ files) — extract audit findings, compliance gaps, certification evidence, remediation plans
Read any enterprise standards in projects/000-global/external/ — extract enterprise compliance frameworks, cross-project conformance benchmarks
If no external docs exist but they would improve the assessment, note this as an assessment limitation
Citation traceability: When referencing content from external documents, follow the citation instructions in .arckit/references/citation-instructions.md. Place inline citation markers (e.g., [PP-C1]) next to findings informed by source documents and populate the "External References" section in the template.
2. Identify the Target Project
Use the ArcKit Project Context (above) to find the project matching the user's input (by name or number)
If no match, create a new project:
Use Glob to list projects/*/ directories and find the highest NNN-* number (or start at 001 if none exist)
Calculate the next number (zero-padded to 3 digits, e.g., 002)
Slugify the project name (lowercase, replace non-alphanumeric with hyphens, trim)
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
Also create projects/{NNN}-{slug}/external/README.md with a note to place external reference documents here
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.
For EACH ADR, extract: title, status (Accepted/Superseded/Deprecated/Proposed), decision text, context, consequences (positive and negative), related ADRs
Insufficient evidence to determine? → NOT ASSESSED
This is a hard constraint check, not a maturity assessment
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?
For each 🔴 RED finding: explain the architecture risk, propose an alternative approach, recommend escalation to architecture board/CTO
For each 🟡 YELLOW finding: provide specific remediation steps + timeline, include a fallback position if remediation is deferred
For each 🟢 GREEN finding: document the deviation rationale, set a review date, no blocking action required
Overall Recommendation:
CONFORMANT: All checks PASS (or NOT ASSESSED), no FAIL findings
CONFORMANT WITH CONDITIONS: No RED findings, YELLOW/GREEN findings have remediation plans, conformance >= 80%
NON-CONFORMANT: Any RED finding, or conformance < 80%
6. Generate Document
Use the document ID ARC-{PROJECT_ID}-CONF-v{VERSION} (e.g., ARC-001-CONF-v1.0).
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]
Track in Project:
Suggest adding remediation actions to project tracking:
Create backlog items for FAIL findings
Schedule architecture technical debt review
Set next conformance check date
Important Notes
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