architecture-catalog
CLAUDE.md39 starsChanged 9 months agoMITView on GitHub
A lightweight, Git-native architecture catalog. It replaces monolithic tools like Archi with a simple repo structure: architecture elements are registered as Markdown files, diagrams are draw.io files, and Python scripts validate, extract, refresh, and generate dashboards. The goal is to be an open-source, lightweight alternative for architects who want Git-friendly, AI-readable architecture models without learning a DSL or paying for enterprise tooling. Single source of truth: models/registry-mapping.yaml drives everything — the UI, validation, and data loading. Adding a new element…
- Installs packages
In this repository8 other files it gives its agents.
- crawl-apisSkill
- crawl-dataSkill
- dashboardSkill
- deploySkill
- enterprise-platform-archiSkill
- new-entrySkill
- scaffold-componentSkill
- validateSkill
The file
We split this CLAUDE.md into the rules it gives an agent
12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 158
Add entry to registry-mapping.yaml
- Very specific: line 159
Create _template.md in the appropriate registry-v2/ subfolder
- Very specific: line 168
Create views folder: views/<domain>/
- Very specific: line 169
Create registry entries in registry-v2/ (discover folders from registry-mapping.yaml)
- Distinctive: line 170
Update welcome hook to show new skill
- Very specific: line 179
Always create a feature branch from main: git checkout -b <type>/<short-description>
- Very specific: line 202
Create a YAML definition file in models/ (e.g., heatmap-mapping.yaml)
- Very specific: line 203
Create the React visualization component in catalog-ui/src/components/graphs/
- Distinctive: line 204
Create the Astro page to render it
- Distinctive: line 218
Keep it simple — no servers, no databases, just files, Git, and Python
- Distinctive: line 219
Don't make architects learn new tools — draw.io, Markdown, and Git are enough
- Very specific: line 237
Test: If a user renames every element type, layer, and relationship in registry-mapping.yaml to completely custom names, the catalog UI …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
What is this project?
A lightweight, Git-native architecture catalog. It replaces monolithic tools like Archi with a simple repo structure: architecture elements are registered as Markdown files, diagrams are draw.io files, and Python scripts validate, extract, refresh, and generate dashboards.
The goal is to be an open-source, lightweight alternative for architects who want Git-friendly, AI-readable architecture models without learning a DSL or paying for enterprise tooling.
Architecture (how it works)
registry-mapping.yaml ──→ registry-loader.ts ──→ Astro pages
(schema: types, (reads .md files, (static HTML
fields, relationships) resolves refs, at build time)
builds graph)Single source of truth: models/registry-mapping.yaml drives everything — the UI, validation, and data loading. Adding a new element type = add one entry to this YAML file + create a _template.md. Zero code changes.
Data pipeline: registry-mapping.yaml → registry-loader.ts (loadRegistry()) → registry.ts (bridge) → Astro pages. The loader builds an in-memory graph with elements, edges, and indexes (byType, byDomain, byLayer).
Key design: Framework-agnostic. ArchiMate alignment is optional, not required. Works with any architecture vocabulary. Layers are flat (1 to N), each with sub-folders for element types. No nested child layers.
Current State
Registry (registry-v2/)
- 4-layer structure — flat layers, each with typed sub-folders
- Template-driven — each element type has a
_template.mdwith typed YAML frontmatter - Example domains: "Customer Management", "Billing & Payments", "Analytics & Insights" — 3 fictional B2B SaaS CRM domains with 71 elements across all 4 layers
- Health: 71 healthy, 71 connected, 0 orphans, 0 broken refs, 84 pages
Catalog UI (catalog-ui/)
- Astro 5 + React static site for browsing the registry
- Schema-driven — all types, layers, and relationships derived from
models/registry-mapping.yaml - ReactFlow graphs for visualizing element relationships (via
@xyflow/react+ dagre) - Diagram viewer supporting PlantUML, BPMN, and draw.io formats
- CSS pattern: EventCatalog-inspired RGB variable pattern:
--ec-page-bg: 255 255 255used asrgb(var(--ec-page-bg)) - 3-panel layout: icon bar (56px) + nested sidebar (315px) + main content
Piece 1 / Piece 2 Strategy
- Piece 1 (this repo): registry-mapping.yaml → registry skeleton → UI. Ships first.
- Piece 2 (future): meta model → registry-mapping.yaml generation. Convenience tool, not critical path.
Skills (Slash Commands)
| Skill | Usage | Purpose |
/enterprise-platform-archi | /enterprise-platform-archi [question] | Enterprise Platform domain Q&A, create entries, proposals |
/validate | /validate | Run model validation, show errors and orphans |
/dashboard | /dashboard | Generate HTML health dashboard |
/new-entry | /new-entry [type] [name] | Create registry entry (guided wizard) |
/scaffold-component | /scaffold-component [Name] | Scaffold React component + test file |
/deploy | /deploy [--dry-run] [--target catalog|docs|all] | Build & deploy to Firebase Hosting |
/crawl-apis | /crawl-apis <path> [--domain <name>] [--write] | Scan codebase for APIs, propose registry entries |
/crawl-data | /crawl-data <path> [--domain <name>] [--write] | Scan codebase for data models, propose registry entries |
Examples
/enterprise-platform-archi What data does Tenant Management own?
/enterprise-platform-archi Create a registry entry for Payment Gateway
/validate
/dashboard
/new-entry data-object "Payment Record"
/scaffold-component CapabilityHeatmap
/deploy --dry-run
/deploy --target catalog
/crawl-apis ./src --domain "Customer Management"
/crawl-data ./src --domain "Billing & Payments"Why Skills?
- Explicit invocation — Type
/enterprise-platform-archito guarantee the right context - Scoped search — Each domain skill searches its own files first, minimizing token usage
- Pattern for teams —
/<domain>-archiis learnable:/payments-archi,/logistics-archi, etc.
Repo Structure
.claude/
skills/
enterprise-platform-archi/SKILL.md # /enterprise-platform-archi skill
validate/SKILL.md # /validate skill
dashboard/SKILL.md # /dashboard skill
new-entry/SKILL.md # /new-entry skill
scaffold-component/SKILL.md # /scaffold-component skill
agents/
domain-expert.md # Read-only domain Q&A (auto-delegation)
fe-developer.md # Frontend developer (catalog-ui/)
registry-agent.md # Registry data specialist (registry-v2/, views/)
test-writer.md # Test specialist (pytest + vitest)
hooks/
welcome.sh # Shows skills on session start
pre-commit-validate.sh # Runs validate.py before git commits
check-test-exists.sh # Warns if .tsx has no co-located test
rules/
vocab-agnostic.md # 2-tier vocab-agnostic reminder (catalog-ui/src/**)
registry-format.md # Registry entry format rules (registry-v2/**)
settings.json # Hook configuration
registry-v2/ # Element registry — one .md file per architecture element
1-business/ # Layer 1: Business
2-organization/ # Layer 2: Organization
3-application/ # Layer 3: Application (primary focus)
4-technology/ # Layer 4: Technology
views/ # Architecture diagrams by domain
customer-management/ # Example domain diagrams
models/
registry-mapping.yaml # Schema mapping (types → folders → UI) — THE source of truth
catalog-ui/ # Astro 5 + React catalog UI
src/
data/registry.ts # Schema-driven data provider (bridge module)
lib/registry-loader.ts # Builds in-memory graph from registry-v2/
lib/types.ts # TypeScript interfaces
config/meta-model.config.ts # Graph layout config (hierarchy ranks, relationship semantics)
scripts/
validate.py # Validates diagrams against registry
generate_dashboard.py # HTML health dashboard
refresh_diagrams.py # Sync registry to diagrams
extract_view.py # Extract YAML from .drawio
generate_library.py # Generate draw.io library
docs-site/ # Starlight documentation site
src/content/docs/ # All documentation pages (Markdown)Key Scripts
python scripts/validate.py # Validate model
python scripts/generate_dashboard.py # Generate dashboard.html
python scripts/refresh_diagrams.py # Sync registry to diagrams
python scripts/extract_view.py <file> # Extract YAML from diagram
python scripts/generate_metamodel.py <file.drawio> # Generate registry-mapping.yaml from meta-model diagramCatalog UI
cd catalog-ui
npm install
npm run dev # Start dev server on port 4321
npm run build # Build static siteThe UI is fully schema-driven via models/registry-mapping.yaml. Adding a new element type requires:
- Add entry to
registry-mapping.yaml - Create
_template.mdin the appropriateregistry-v2/subfolder - Rebuild — zero code changes needed
Adding New Domains
- Create skill:
.claude/skills/<domain>-archi/SKILL.md - Create sub-agent:
.claude/agents/<domain>.md - Create views folder:
views/<domain>/ - Create registry entries in
registry-v2/(discover folders from registry-mapping.yaml) - Update welcome hook to show new skill
See templates/agents/domain-onboarding.md for a guided template, or docs-site/src/content/docs/contributing/how-to-contribute.md for detailed instructions.
Git Workflow
- Never commit directly to
main— branch protection rules are enabled - Always create a feature branch from
main:git checkout -b <type>/<short-description> - Branch naming:
feat/,fix/,chore/,docs/prefixes - Implement, test, commit on the branch, then push and create a PR
- Merge via GitHub PR (squash or merge commit)
Maps Architecture
Maps are analytical views that consume registry data. They are a separate layer from the core registry schema.
Two-tier design:
- Core schema (
registry-mapping.yaml) — vocabulary-agnostic, drives the registry loader and catalog UI. No type-name conditionals, no layer-name conditionals. A user can rename every type and layer and it still works. - Map definitions (separate YAML files) — view-specific, can reference specific element types. Each map type gets its own YAML:
registry-mapping.yaml→ Domain Context Map (uses registry relationships)event-mapping.yaml→ Event Flow Map (knows about events, publish/consume)- Future:
heatmap-mapping.yaml,impact-mapping.yaml, etc.
Why maps are NOT vocabulary-agnostic: An event map needs to know what events are. A capability heatmap needs to know what capabilities are. These are opinionated analytical views — that's the whole point. The core registry stays generic; map views are intentionally domain-aware.
Adding a new map type:
- Create a YAML definition file in
models/(e.g.,heatmap-mapping.yaml) - Create the React visualization component in
catalog-ui/src/components/graphs/ - Create the Astro page to render it
- Pre-configured maps ship with the project; custom maps can be contributed
Content & Marketing
Do NOT create blog posts, social media drafts, or content schedules in this repo. All content is managed in the media-manager repo (/Users/raj.navakoti/Desktop/github/media-manager/). Use media-manager's content-writer agent for drafting. The content/ and media/ folders here are gitignored local scratch space only.
Development Principles
- Build incrementally — 1% at a time, prove each piece works
- Keep it simple — no servers, no databases, just files, Git, and Python
- Don't make architects learn new tools — draw.io, Markdown, and Git are enough
- AI integration is a side effect of the format, not a feature to build
- Domain-scoped skills — each domain gets
/<domain>-archito avoid searching everything - Schema-driven — zero hardcoded types. Everything flows from registry-mapping.yaml
Vocabulary-Agnostic Principle (CRITICAL)
This project MUST remain vocabulary-agnostic. Users can use ArchiMate, TOGAF, C4, or any custom vocabulary. The UI and loader code must NEVER contain logic that depends on specific type names, layer names, or relationship names.
Rules for all code changes:
- No type-name conditionals — Never write
if (type === 'component')ortype.includes('data'). Behavior must be driven by schema properties (graph_rank,layer,icon) not by type key strings. - No layer-name conditionals — Never write
if (layer === 'applications_and_data'). Layer colors and metadata come fromregistry-mapping.yaml. - No relationship-name conditionals — Never write
if (rel === 'composition')in data/rendering logic. Relationship semantics come frommeta-model.config.tswhich reads from the YAML. - Hardcoded style maps are optional enrichments —
NODE_STYLES,ELEMENT_ICONS,ELEMENT_HIERARCHYin TypeScript provide rich styling for known types, but unknown types MUST fall back to schema-derived values (layer color,graph_rank,iconemoji from the YAML). A user who defines a brand-new element type inregistry-mapping.yamlshould see it render correctly without touching any.tsor.tsxfile. - Domain anchor =
graph_rank: 0— The domain/area anchor element is identified by havinggraph_rank: 0in the YAML, not by checking for a specific type key likedomain. - The
archimate:field in registry-mapping.yaml is optional metadata — It exists for documentation/reference for ArchiMate users. The UI and loader NEVER read it.
Test: If a user renames every element type, layer, and relationship in registry-mapping.yaml to completely custom names, the catalog UI must still build and render correctly.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

