Arckit architecture repository

From tractorjuice/arckit-codex · View interactive version

Arckit architecture repository is an AI agent skill from the GitHub repository tractorjuice/arckit-codex. Build architecture repository — patterns library, standards register, reusable building blocks

How to use this skill

Skill file

You are helping an enterprise architect create an Architecture Repository — the central knowledge store for the organisation's architecture artefacts including patterns, standards, reference architectures, lessons learned, and reusable building blocks. This is a global-scope artefact that synthesises learnings from all completed ADM cycles and projects into a living reference library.

User Input

$ARGUMENTS

Prerequisites: Read Synthesis Sources

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.

MANDATORY (warn if missing):

RECOMMENDED (read if available, note if missing):

OPTIONAL (read if available, skip silently if missing):

Prerequisites 1b: Scan all project directories for artefacts

Scan all projects/*/ directories for the following artefact types:

Prerequisites 1c: Read external documents and policies

Instructions

1. Identify Scope

This command operates at global scope by default. The repository synthesises learnings from ALL projects.

2. Read Template

Read the template (with user override support):

Tip: Users can customise templates with $arckit-customize architecture-repository

3. Gather and Classify Artefacts

Read PRIN and scan all available project artefacts. Classify each artefact's content into repository categories:

From PRIN → Standards Register
From ADR → Patterns Library + Reference Architectures
From DIAG → Reference Architectures
From STORY + ANAL → Lessons Learned
From all artefacts → Reusable Building Blocks

4. Generate Architecture Repository

Create the repository document following the template structure.

Standards Register

Extract and catalogue all standards from PRIN and ADR artefacts:

| Standard ID | Name | Domain | Status | Last Review | Source |

|-------------|------|--------|--------|-------------|--------|

Minimum quality requirement: ≥5 standards with complete entries

Standards categories to extract:

For each standard:

Patterns Library

Catalogue reusable architectural patterns from ADR artefacts:

Pattern structure (for each pattern):

Minimum quality requirement: ≥3 patterns with full description

Pattern grouping:

Reference Architectures

Catalogue reference architectures from DIAG artefacts:

| Reference ID | Name | Domain | Diagram | Last Used |

|-------------|------|--------|---------|-----------|

Minimum quality requirement: ≥2 reference architectures

Reference architecture types:

Each reference architecture includes:

Lessons Learned

Catalogue lessons from STORY and ANAL artefacts:

| Lesson ID | Project | Lesson | Category | Impact |

|-----------|---------|--------|----------|--------|

Minimum quality requirement: ≥3 lessons learned

Lesson categories:

Each lesson includes:

Reusable Building Blocks

Catalogue proven components and solutions:

| Block ID | Name | Type | Maturity | Documentation |

|----------|------|------|----------|---------------|

Minimum quality requirement: ≥3 building blocks

Building block types:

Maturity levels:

Search Index

Create a keyword-based search index for quick artefact lookup:

| Keyword | Artefacts |

|---------|-----------|

Traceability

Create a traceability matrix showing the provenance of repository entries:

| Source Type | Source Artefact | Repository Entry | Relationship |

|-------------|-----------------|------------------|-------------|

5. UK Government Specifics

If the user indicates this is a UK Government project, include:

6. MOD Specifics

If this is a Ministry of Defence project, include:

7. Load Mermaid Syntax References

Read .arckit/skills/mermaid-syntax/references/flowchart.md for official Mermaid syntax — node shapes, edge labels, and styling options for repository structure diagrams.

8. Mermaid Diagram Requirements

Include a repository structure diagram (Mermaid flowchart):

  1. Repository Structure — Show the hierarchy: Standards → Patterns → Reference Architectures → Building Blocks → Lessons Learned, with cross-references between sections

Syntax Rules:

9. Quality Gate

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

Additional quality checks for Architecture Repository:

  1. Standards Register: ≥5 standards with complete entries (ID, name, domain, status, last review, source)
  2. Patterns Library: ≥3 patterns with full description (context, problem, solution, consequences, related, source project)
  3. Reference Architectures: ≥2 reference architectures with ID, name, domain, diagram link, last used
  4. Lessons Learned: ≥3 lessons with ID, project, lesson, category, impact
  5. Building Blocks: ≥3 building blocks with ID, name, type, maturity, documentation
  6. Search Index: Present with meaningful keyword-to-artefact mappings
  7. Traceability: Complete provenance — every entry traces to a source artefact

10. Write the Repository File

IMPORTANT: The Architecture Repository document will be a large document (typically 400-700 lines). You MUST use the Write tool to create the file, NOT output the full content in chat.

Create the file at:

projects/000-global/ARC-000-REPO-v1.0.md

For project-scoped repositories (when a specific project ID is provided):

projects/{P}/ARC-{P}-REPO-v{VERSION}.md

Use the Write tool with the complete repository content following the template structure.

Auto-Populate Document Control Fields

Before completing the document, populate ALL document control fields in the header:

Construct Document ID:

Populate Required Fields:

Auto-populated fields (populate these automatically):

User-provided fields (extract from project metadata or user input):

Calculated fields:

Pending fields (leave as [PENDING] until manually updated):

Populate Revision History:

| 1.0 | {DATE} | ArcKit AI | Initial creation from `$arckit-architecture-repository` command | [PENDING] | [PENDING] |

Populate Generation Metadata Footer:

**Generated by**: ArcKit `$arckit-architecture-repository` command
**Generated on**: {DATE} {TIME} GMT
**ArcKit Version**: {ARCKIT_VERSION}
**Project**: Global Repository (Project 000)
**AI Model**: [Use actual model name, e.g., "Claude Sonnet 5 (session default)"]
**Generation Context**: [Brief note about source documents and projects synthesised]

11. Show Summary to User

After writing the file, show a concise summary (NOT the full document):

## Architecture Repository Created

**Document**: `projects/000-global/ARC-000-REPO-v1.0.md`
**Document ID**: ARC-000-REPO-v1.0

### Repository Contents

| Section | Count | Status |
|---------|-------|--------|
| Standards Register | [N] standards | ✅ [≥5 required] |
| Patterns Library | [N] patterns | ✅ [≥3 required] |
| Reference Architectures | [N] references | ✅ [≥2 required] |
| Lessons Learned | [N] lessons | ✅ [≥3 required] |
| Building Blocks | [N] blocks | ✅ [≥3 required] |
| Search Index | [N] keywords | ✅ Present |

### Standards Summary
| Domain | Count |
|--------|-------|
| Security | [N] |
| Architecture | [N] |
| Data | [N] |
| Technology | [N] |
| Governance | [N] |

### Patterns Summary
1. **[Pattern 1]**: [Brief description] — Source: [ARC-XXX-ADR]
2. **[Pattern 2]**: [Brief description] — Source: [ARC-XXX-ADR]
3. **[Pattern 3]**: [Brief description] — Source: [ARC-XXX-ADR]

### Reference Architectures Summary
1. **[REF-001]**: [Name] — [Domain] — Source: [ARC-XXX-DIAG]
2. **[REF-002]**: [Name] — [Domain] — Source: [ARC-XXX-DIAG]

### Top Lessons Learned
1. **[LL-001]**: [Lesson] — [Category] — [Impact]
2. **[LL-002]**: [Lesson] — [Category] — [Impact]
3. **[LL-003]**: [Lesson] — [Category] — [Impact]

### Building Blocks Summary
| Block | Type | Maturity |
|-------|------|----------|
| [BB-001] | [Type] | [Maturity] |
| [BB-002] | [Type] | [Maturity] |
| [BB-003] | [Type] | [Maturity] |

### Sources Synthesised
- ✅ Architecture Principles: ARC-000-PRIN-v[N].md
- ✅ ADR artefacts: [N] decisions across [N] projects
- ✅ DIAG artefacts: [N] diagrams across [N] projects
- ✅ STORY artefacts: [N] stories across [N] projects
- ✅ ANAL artefacts: [N] analyses across [N] projects

### Traceability
- [N] repository entries traced to source artefacts
- [N] standards derived from principles
- [N] patterns derived from decisions
- [N] reference architectures derived from diagrams
- [N] lessons derived from stories/analyses

### Next Steps
1. Review repository with Architecture Board / Enterprise Architecture team
2. Validate standards against current technology strategy
3. Feed repository standards into next ADM cycle: `$arckit-adm-preliminary`
4. Add new patterns as projects complete — re-run `$arckit-architecture-repository`
5. Maintain search index as new artefacts are added

### Usage
- Reference this repository when creating new architecture artefacts
- Use patterns library as design starting point for new projects
- Use standards register as compliance checklist
- Use lessons learned to avoid known pitfalls
- Use building blocks to accelerate delivery

**File location**: `projects/000-global/ARC-000-REPO-v1.0.md`

Important Notes

  1. Synthesis, Not Generation: This command synthesises existing artefacts into a curated knowledge repository. It should NOT generate new information but rather consolidate and classify existing architectural decisions, patterns, and learnings.
  1. Use Write Tool: The repository document is typically 400-700 lines. ALWAYS use the Write tool to create it. Never output the full content in chat.
  1. Global Scope: By default, this command operates across all projects. Use the argument to scope to a specific project when creating project-specific repositories.
  1. Quality Thresholds: The minimum quality requirements (≥5 standards, ≥3 patterns, ≥2 reference architectures, ≥3 lessons, ≥3 building blocks) ensure the repository provides genuine value. If thresholds cannot be met, note the gaps and suggest which artefacts would help fill them.
  1. Living Document: The Architecture Repository is a living artefact. Schedule quarterly reviews ($arckit-architecture-repository) to incorporate learnings from new projects. Version management (v1.0 → v2.0) tracks evolution.
  1. Traceability is Critical: Every repository entry must trace back to source artefacts. Orphan entries without provenance should be flagged and either sourced or removed.
  1. Integration with Other Commands:
  1. TOGAF Alignment: This document maps to the TOGAF Architecture Repository content meta-model: Architecture Capability, Architecture Methods, Tools, Governance, Standards, Reference Architectures, Patterns, and Lessons Learned.
  1. Search and Retrieval: The search index enables quick lookup of patterns, standards, and lessons. Maintain this index as the repository grows — it's the primary discovery mechanism for architects.
  1. 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.

Suggested Next Steps

After completing this command, consider running:

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.