Enterprise Architecture
A practical toolkit for doing real architecture work the way open-source EA standards
intend it — diagrams as code, documentation as code, decisions as records, and a single
traceable model underneath. It unifies four complementary frameworks so you reach for the
right tool at the right altitude instead of forcing everything into one notation.
The mental model: four frameworks, four altitudes
These frameworks are not competitors — they answer different questions. Knowing which one
fits the question is most of the skill.
| Framework |
Question it answers |
Altitude |
When to reach for it |
| C4 model |
"How is this software system structured?" |
System → code |
A single system/service: context, containers, components |
| ArchiMate |
"How does the whole enterprise hang together?" |
Business → app → tech |
Capabilities, app landscapes, cross-system flows |
| TOGAF ADM |
"How do we deliver an architecture change?" |
Process/governance |
Running an architecture engagement end-to-end |
| arc42 + ADRs |
"How do we write it down so others understand & decisions stick?" |
Documentation |
Documenting a system; recording a decision |
A useful rule of thumb: C4 zooms into one system, ArchiMate zooms out to the
enterprise, TOGAF is the method for changing it, and arc42/ADR is how you narrate it.
They compose: an arc42 doc embeds C4 diagrams and links ADRs; a TOGAF engagement produces
ArchiMate models and ADRs as deliverables.
How to use this skill
- Pick the mode (below) from what the user is asking for. If ambiguous, ask one
short clarifying question rather than guessing — architecture work is expensive to redo.
If the question is which framework / how should we approach this rather than a request
for an artifact ("is TOGAF worth it?", "Zachman vs TOGAF?", "how do we structure this
effort?"), read
references/choosing-frameworks.md and answer with a grounded
recommendation that routes into the right mode.
- Read the matching reference file(s) in
references/ before producing output. They
contain the real notation, element catalogs, templates, and gotchas. Do not work from
memory of the standards — load the reference so the output is correct and idiomatic.
- Produce diagrams/docs as code, default to text formats that live in Git and render
anywhere. Save artifacts to files when the user has a repo/workspace; otherwise emit
inline.
- Keep one source of truth. When elements recur across diagrams/docs, give them
stable IDs and reuse them (see Traceability below). Don't redraw the same box with a
different name in two places.
The four modes
Mode 1 — Diagram (diagrams as code)
Triggers: "draw / diagram / visualize the architecture", "C4 container diagram",
"Structurizr workspace", "show the components".
- For a single software system, use C4 → read
references/c4-structurizr.md.
- Default output: Structurizr DSL when the user wants a reusable model that
generates multiple views; Mermaid when they want something that renders inline
immediately (chat, GitHub, Markdown docs); PlantUML (C4-PlantUML) when they're
already in a PlantUML/Kroki toolchain.
- Produce views in order of altitude: System Context → Container → Component (→ Code
only if explicitly asked; it's usually noise). Stop at the level that answers the
question.
- For cross-system / enterprise views, use ArchiMate → read
references/archimate.md.
- Respect good-diagram hygiene from the reference: 5–20 elements per view, every external
dependency shown, consistent naming, a title and a legend.
Mode 2 — Document (docs & decisions as code)
Triggers: "document this system", "write an ADR / decision record", "arc42 docs",
"design doc / RFC for X".
- Whole-system documentation → arc42. Read
references/arc42.md. Use the
discover → generate → validate loop and the detail-level knob (LEAN / ESSENTIAL /
THOROUGH) so you write the right amount, not a 40-page tome nobody reads.
- A single decision → ADR/MADR. Read
references/adr-madr.md. Capture the context and
the options considered with trade-offs, not just the chosen answer — the value of an
ADR is the reasoning a future reader can't reconstruct.
- Embed diagrams (Mode 1) rather than describing visuals in prose. Link ADRs from the
relevant arc42 section (§9 Decisions).
Mode 3 — Review / assess
Triggers: "review my architecture", "is this design sound?", "assess this against best
practice", "what are the risks in this design?".
- Read
references/review-rubric.md. Assess against quality attributes (the ISO/IEC
25010 set: performance, security, reliability, maintainability, etc.) and EA principles,
not personal taste.
- Output severity-categorized findings (Critical / Major / Minor / Suggestion), each
with evidence and a concrete remediation, then a verdict
(Approved / Approved-with-changes / Needs-revision). Avoid vague praise; an unhelpful
"looks good" is worse than nothing.
- Where a finding implies a fix, hand off to the right mode (e.g. "record this as an ADR",
"redraw the container diagram to show the queue").
Mode 4 — Model the enterprise
Triggers: "map our business capabilities", "application landscape", "capability → app →
technology", "enterprise architecture model", "rationalize our app portfolio".
- This is the big-picture mode. Use ArchiMate for the model
(
references/archimate.md) and TOGAF ADM for the method/structure of the engagement
(references/togaf-adm.md).
- Work top-down through the layers: Strategy/Motivation → Business (capabilities,
processes, services) → Application (apps, services, data) → Technology (nodes,
platforms), then draw the realization links between layers (which app realizes which
capability; which node hosts which app). The cross-layer links are the whole point — a
capability map with no realization links is just a list.
- For portfolio rationalization, add a TIME / quality assessment per application
(Tolerate / Invest / Migrate / Eliminate) — see the TOGAF reference.
Traceability — keep one model under everything
Give every architectural element a stable, human-readable ID and reuse it across
diagrams, docs, and ADRs. This is what turns a pile of pictures into an actual model.
- Recommended ID scheme (URN-style):
ea:{org}:{system}:{kind}:{name}
- e.g.
ea:acme:checkout:container:payment-api, ea:acme:enterprise:capability:billing
kind ∈ person, system, external, container, component, capability, app, node,
decision …
- When a repo/workspace exists, persist these in an
architecture/ folder (one file per
significant artifact, or a Structurizr workspace as the model-of-record) so they're
diff-able and greppable. Reference the same ID from the arc42 doc and the ADRs.
- Before inventing a new element, check whether it already exists under another name and
reuse the ID. Two names for one thing is the most common EA documentation defect.
Validation
After generating diagrams or docs, sanity-check them. For cross-artifact consistency
(IDs referenced but never defined, building blocks named in prose but missing from
diagrams, quality goals with no scenario, ADRs not linked from any doc), run:
python scripts/ea_lint.py <path-to-architecture-dir-or-file>
It reports issues grouped by severity. Treat its output as advisory review feedback, not a
hard gate — explain findings to the user rather than silently "fixing" their intent.
Output conventions
- Diagrams: fenced code blocks with the right language tag (
```mermaid,
```plantuml, or Structurizr DSL in ```text/a .dsl file). One view per block,
each with a one-line caption stating what it shows and for whom.
- Docs: Markdown, headings matching the standard's section structure. Diagrams as
separate
.puml/.dsl files referenced from the doc when a repo exists; inlined
otherwise.
- Always state which framework and view you're producing, so the user learns the map.
Part of this skill's job is to make the user fluent in the frameworks, not just hand them
artifacts.
Reference files (load as needed)
| File |
Load when |
references/c4-structurizr.md |
Any C4 diagram; Structurizr DSL; Mermaid/PlantUML C4 |
references/archimate.md |
ArchiMate views; enterprise/cross-system modeling (Modes 1 & 4) |
references/togaf-adm.md |
Running/structuring an architecture engagement; portfolio (Mode 4) |
references/arc42.md |
Whole-system documentation (Mode 2) |
references/adr-madr.md |
Writing a decision record (Mode 2) |
references/review-rubric.md |
Reviewing/assessing an architecture (Mode 3) |
references/choosing-frameworks.md |
"Which framework should I use?", framework comparisons, EA-approach strategy questions |
Templates live in assets/templates/; the consistency linter in scripts/ea_lint.py.
1---2name: enterprise-architecture3description: Unified enterprise & software architecture skill grounded in four open-source standards — C4 + Structurizr DSL, ArchiMate 3.x, TOGAF ADM, and arc42 + ADRs (MADR). Use it whenever the user wants to: produce architecture diagrams as code (C4 context/container/component, Structurizr, PlantUML, Mermaid); write architecture docs or decision records (arc42, ADRs/MADRs, design docs); review or assess a design against quality attributes and EA principles; or model an enterprise (capabilities → applications → technology, app landscapes, portfolio rationalization). Trigger it even when no framework is named — e.g. "draw the architecture of this service", "give me a container diagram", "write an ADR for choosing Kafka", "is this design sound?", "map our capabilities to apps", "document my architecture in arc42", "create an HLD or LLD", "assess this design against ISO 25010 / quality attributes", "produce a solution design". Do NOT trigger it for writing application code or REST endpoints, IaC / cloud deployment (Terrafo4---56# Enterprise Architecture78A practical toolkit for doing real architecture work the way open-source EA standards9intend it — diagrams as code, documentation as code, decisions as records, and a single10traceable model underneath. It unifies four complementary frameworks so you reach for the11right tool at the right altitude instead of forcing everything into one notation.1213## The mental model: four frameworks, four altitudes1415These frameworks are not competitors — they answer different questions. Knowing which one16fits the question is most of the skill.1718| Framework | Question it answers | Altitude | When to reach for it |19|---|---|---|---|20| **C4 model** | "How is *this software system* structured?" | System → code | A single system/service: context, containers, components |21| **ArchiMate** | "How does the *whole enterprise* hang together?" | Business → app → tech | Capabilities, app landscapes, cross-system flows |22| **TOGAF ADM** | "How do we *deliver* an architecture change?" | Process/governance | Running an architecture engagement end-to-end |23| **arc42 + ADRs** | "How do we *write it down* so others understand & decisions stick?" | Documentation | Documenting a system; recording a decision |2425A useful rule of thumb: **C4 zooms into one system, ArchiMate zooms out to the26enterprise, TOGAF is the *method* for changing it, and arc42/ADR is how you *narrate* it.**27They compose: an arc42 doc embeds C4 diagrams and links ADRs; a TOGAF engagement produces28ArchiMate models and ADRs as deliverables.2930## How to use this skill31321. **Pick the mode** (below) from what the user is asking for. If ambiguous, ask one33 short clarifying question rather than guessing — architecture work is expensive to redo.34 If the question is *which framework / how should we approach this* rather than a request35 for an artifact ("is TOGAF worth it?", "Zachman vs TOGAF?", "how do we structure this36 effort?"), read `references/choosing-frameworks.md` and answer with a grounded37 recommendation that routes into the right mode.382. **Read the matching reference file(s)** in `references/` before producing output. They39 contain the real notation, element catalogs, templates, and gotchas. Do not work from40 memory of the standards — load the reference so the output is correct and idiomatic.413. **Produce diagrams/docs as code**, default to text formats that live in Git and render42 anywhere. Save artifacts to files when the user has a repo/workspace; otherwise emit43 inline.444. **Keep one source of truth.** When elements recur across diagrams/docs, give them45 stable IDs and reuse them (see *Traceability* below). Don't redraw the same box with a46 different name in two places.4748## The four modes4950### Mode 1 — Diagram (diagrams as code)51*Triggers: "draw / diagram / visualize the architecture", "C4 container diagram",52"Structurizr workspace", "show the components".*5354- For a **single software system**, use **C4** → read `references/c4-structurizr.md`.55 - Default output: **Structurizr DSL** when the user wants a reusable model that56 generates multiple views; **Mermaid** when they want something that renders inline57 immediately (chat, GitHub, Markdown docs); **PlantUML (C4-PlantUML)** when they're58 already in a PlantUML/Kroki toolchain.59 - Produce views in order of altitude: System Context → Container → Component (→ Code60 only if explicitly asked; it's usually noise). Stop at the level that answers the61 question.62- For **cross-system / enterprise** views, use **ArchiMate** → read `references/archimate.md`.63- Respect good-diagram hygiene from the reference: 5–20 elements per view, every external64 dependency shown, consistent naming, a title and a legend.6566### Mode 2 — Document (docs & decisions as code)67*Triggers: "document this system", "write an ADR / decision record", "arc42 docs",68"design doc / RFC for X".*6970- **Whole-system documentation** → arc42. Read `references/arc42.md`. Use the71 discover → generate → validate loop and the detail-level knob (LEAN / ESSENTIAL /72 THOROUGH) so you write the right amount, not a 40-page tome nobody reads.73- **A single decision** → ADR/MADR. Read `references/adr-madr.md`. Capture the context and74 the *options considered with trade-offs*, not just the chosen answer — the value of an75 ADR is the reasoning a future reader can't reconstruct.76- Embed diagrams (Mode 1) rather than describing visuals in prose. Link ADRs from the77 relevant arc42 section (§9 Decisions).7879### Mode 3 — Review / assess80*Triggers: "review my architecture", "is this design sound?", "assess this against best81practice", "what are the risks in this design?".*8283- Read `references/review-rubric.md`. Assess against **quality attributes** (the ISO/IEC84 25010 set: performance, security, reliability, maintainability, etc.) and EA principles,85 not personal taste.86- Output **severity-categorized findings** (Critical / Major / Minor / Suggestion), each87 with *evidence* and a *concrete remediation*, then a **verdict**88 (Approved / Approved-with-changes / Needs-revision). Avoid vague praise; an unhelpful89 "looks good" is worse than nothing.90- Where a finding implies a fix, hand off to the right mode (e.g. "record this as an ADR",91 "redraw the container diagram to show the queue").9293### Mode 4 — Model the enterprise94*Triggers: "map our business capabilities", "application landscape", "capability → app →95technology", "enterprise architecture model", "rationalize our app portfolio".*9697- This is the big-picture mode. Use **ArchiMate** for the model98 (`references/archimate.md`) and **TOGAF ADM** for the method/structure of the engagement99 (`references/togaf-adm.md`).100- Work top-down through the layers: **Strategy/Motivation → Business (capabilities,101 processes, services) → Application (apps, services, data) → Technology (nodes,102 platforms)**, then draw the *realization* links between layers (which app realizes which103 capability; which node hosts which app). The cross-layer links are the whole point — a104 capability map with no realization links is just a list.105- For portfolio rationalization, add a TIME / quality assessment per application106 (Tolerate / Invest / Migrate / Eliminate) — see the TOGAF reference.107108## Traceability — keep one model under everything109110Give every architectural element a **stable, human-readable ID** and reuse it across111diagrams, docs, and ADRs. This is what turns a pile of pictures into an actual model.112113- Recommended ID scheme (URN-style): `ea:{org}:{system}:{kind}:{name}`114 - e.g. `ea:acme:checkout:container:payment-api`, `ea:acme:enterprise:capability:billing`115 - `kind` ∈ person, system, external, container, component, capability, app, node,116 decision …117- When a repo/workspace exists, persist these in an `architecture/` folder (one file per118 significant artifact, or a Structurizr workspace as the model-of-record) so they're119 diff-able and greppable. Reference the same ID from the arc42 doc and the ADRs.120- Before inventing a new element, check whether it already exists under another name and121 reuse the ID. Two names for one thing is the most common EA documentation defect.122123## Validation124125After generating diagrams or docs, sanity-check them. For cross-artifact consistency126(IDs referenced but never defined, building blocks named in prose but missing from127diagrams, quality goals with no scenario, ADRs not linked from any doc), run:128129```130python scripts/ea_lint.py <path-to-architecture-dir-or-file>131```132133It reports issues grouped by severity. Treat its output as advisory review feedback, not a134hard gate — explain findings to the user rather than silently "fixing" their intent.135136## Output conventions137138- **Diagrams**: fenced code blocks with the right language tag (` ```mermaid `,139 ` ```plantuml `, or Structurizr DSL in ` ```text `/a `.dsl` file). One view per block,140 each with a one-line caption stating what it shows and for whom.141- **Docs**: Markdown, headings matching the standard's section structure. Diagrams as142 separate `.puml`/`.dsl` files referenced from the doc when a repo exists; inlined143 otherwise.144- **Always state which framework and view** you're producing, so the user learns the map.145 Part of this skill's job is to make the user fluent in the frameworks, not just hand them146 artifacts.147148## Reference files (load as needed)149150| File | Load when |151|---|---|152| `references/c4-structurizr.md` | Any C4 diagram; Structurizr DSL; Mermaid/PlantUML C4 |153| `references/archimate.md` | ArchiMate views; enterprise/cross-system modeling (Modes 1 & 4) |154| `references/togaf-adm.md` | Running/structuring an architecture engagement; portfolio (Mode 4) |155| `references/arc42.md` | Whole-system documentation (Mode 2) |156| `references/adr-madr.md` | Writing a decision record (Mode 2) |157| `references/review-rubric.md` | Reviewing/assessing an architecture (Mode 3) |158| `references/choosing-frameworks.md` | "Which framework should I use?", framework comparisons, EA-approach strategy questions |159160Templates live in `assets/templates/`; the consistency linter in `scripts/ea_lint.py`.