Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Enterprise Architecture Plugin

AI-assisted enterprise architecture guidance based on TOGAF, Zachman Framework, ADRs, cloud alignment frameworks, and solution architecture patterns.

Installation

/plugin install enterprise-architecture@claude-code-plugins

Features

Architecture Decision Records (ADRs)

The "killer app" of this plugin - document and manage architecture decisions.

# Create a new ADR
/ea:adr-management create Use PostgreSQL for persistence

# Explain ADR concepts
/ea:explain ADR

When to use this vs spec-driven-development:

  • Use /ea:adr-management create for standalone architecture governance decisions
  • Use /spec:adr:create (spec-driven-development plugin) when extracting decisions that emerge during specification authoring

Both use MADR format and can coexist in the same project.

TOGAF Guidance

Get phase-specific guidance for TOGAF ADM (Architecture Development Method).

# Get guidance for a specific phase
/ea:togaf-phase A           # Architecture Vision
/ea:togaf-phase B           # Business Architecture
/ea:togaf-phase preliminary # Preliminary Phase
/ea:togaf-phase requirements # Requirements Management

Zachman Framework Analysis

Analyze architecture from specific stakeholder perspectives.

# Analyze from builder perspective (what data structures)
/ea:zachman-analyze builder what

# Use wizard mode
/ea:zachman-analyze

Architecture Documentation

Generate C4-style architecture documentation.

# Generate different document types
/ea:document context          # System context
/ea:document container        # Container architecture
/ea:document component        # Component details
/ea:document executive-summary # For leadership

Architecture Review

Comprehensive review against principles and viewpoints.

# Review entire codebase
/ea:architecture-review

# Review staged changes
/ea:architecture-review staged

# Review specific files
/ea:architecture-review src/api/

Dashboard

View architecture metrics and status.

/ea:dashboard

Cloud Alignment

Check alignment with cloud frameworks.

# Use the cloud-alignment skill
/ea:explain cloud adoption framework
/ea:explain well-architected

Solution Architecture Features (NEW)

Event Storming

AI-simulated event storming workshops with multi-persona support.

# Full simulation with 5 persona agents debating in parallel
/ea:event-storming "Order fulfillment process" --mode full

# Quick single-pass analysis
/ea:event-storming "Customer onboarding" --mode quick

# Interactive guided session (default)
/ea:event-storming "Payment processing"

Modes:

Mode Personas Tokens Best For
full 5 (parallel) ~15K Comprehensive discovery
quick 0 ~3K Quick domain overview
guided On-demand Variable Interactive exploration

Persona Agents:

  • domain-expert: Deep business knowledge, domain events, business rules
  • developer-persona: Technical events, integration points, feasibility
  • business-analyst: Process flow, commands, actors, acceptance criteria
  • product-owner: Priorities, MVP scope, user value
  • devils-advocate: Challenges, gaps, contradictions, edge cases

Context Mapping (NEW)

Map relationships between bounded contexts using DDD context mapping patterns.

# Full systematic analysis
/ea:context-mapping bounded-contexts.md --mode full

# Quick obvious patterns only
/ea:context-mapping --mode quick

# Interactive guided session (default)
/ea:context-mapping

Patterns Supported:

Pattern Abbrev Description
Shared Kernel SK Shared code/model between contexts
Customer/Supplier C/S Upstream supplies, downstream consumes
Anti-Corruption Layer ACL Downstream translates/isolates upstream
Open Host Service OHS Formal API for consumers
Published Language PL Standardized API format (OpenAPI, etc.)
Conformist CF Downstream adopts upstream model
Partnership P Equal collaboration, mutual dependency
Separate Ways SW No integration, independent evolution

Outputs:

  • Context Mapper DSL (CML) file for tooling
  • Mermaid diagram for visualization
  • Team topology alignment suggestions
  • Integration strategy recommendations

Domain Storytelling

Capture business processes through pictographic stories.

# Capture current state (AS-IS)
/ea:domain-storytelling "order-fulfillment"

# Capture desired future state (TO-BE)
/ea:domain-storytelling "order-fulfillment" --type to-be

Outputs:

  • Story sequence diagram (actors, work objects, activities)
  • Actor catalog with responsibilities
  • Work object catalog with lifecycle
  • Bounded context observations
  • Glossary of domain terms

Fitness Functions

Architecture tests for .NET projects.

# Analyze architecture fitness (report only)
/ea:fitness-functions

# Generate NetArchTest tests
/ea:fitness-functions --generate

# Generate ArchUnitNET tests
/ea:fitness-functions --generate --framework archunitnet

# Analyze specific scope
/ea:fitness-functions src/MyModule/ --generate

Checks:

  • Dependency rules (Domain → Infrastructure violations)
  • Layer constraints (Controller placement, DbContext location)
  • Naming conventions (Handler, Repository, Controller suffixes)
  • Module cross-references (modular monolith boundaries)

Resilience Audit

Scan code for resilience patterns (Polly, Brighter).

# Basic audit
/ea:resilience-patterns audit

# Detailed audit with code snippets
/ea:resilience-patterns audit --detailed

# Audit specific scope
/ea:resilience-patterns audit src/Infrastructure/

Detects:

  • HTTP clients without resilience handlers
  • Message handlers without retry policies
  • Missing circuit breakers
  • Missing timeouts
  • Dead letter queue gaps
  • Anti-patterns (catch-and-swallow, infinite retries)

Skills Reference

Enterprise Architecture Skills

Skill Purpose Keywords
adr-management Create and manage ADRs adr, decision, alternatives
ea-learning Explain EA concepts explain, what is, togaf, zachman
architecture-documentation Generate docs with diagrams document, c4, viewpoint
togaf-guidance TOGAF ADM phase guidance togaf, adm, phase
zachman-analysis Zachman perspective analysis zachman, viewpoint, perspective
gap-analysis Current/target state analysis gap, migration, roadmap
cloud-alignment CAF/Well-Architected alignment caf, well-architected, azure, aws

Solution Architecture Skills (NEW)

Skill Purpose Keywords
event-storming AI-simulated event storming workshops events, commands, actors, bounded contexts
context-mapping Map bounded context relationships context map, upstream, downstream, ACL, OHS, CML
domain-storytelling Pictographic domain modeling stories, actors, work objects, as-is, to-be
modular-architecture Module organization patterns modules, ports, adapters, hexagonal
fitness-functions Architecture tests for .NET netarchtest, archunitnet, dependencies
resilience-patterns Polly/Brighter resilience guidance retry, circuit breaker, dlq, polly, brighter

Agents Reference

Enterprise Architecture Agents

Agent Purpose Model
architecture-documenter Generate comprehensive docs Sonnet
viewpoint-analyzer Analyze stakeholder perspectives Haiku
principles-validator Validate against principles Sonnet
migration-explorer Explore migration options Sonnet

Event Storming Persona Agent (NEW)

The event-storming-persona agent supports multiple persona types via argument:

Invocation Perspective Model
event-storming-persona domain-expert Business knowledge, domain events, rules Opus
event-storming-persona developer Technical events, integration, feasibility Opus
event-storming-persona business-analyst Process flow, commands, actors Opus
event-storming-persona product-owner Priorities, MVP scope, user value Opus
event-storming-persona devils-advocate Challenges, gaps, contradictions Opus

Utility Agents (NEW)

Agent Purpose Model
story-facilitator Guide domain storytelling sessions Opus
context-mapper Map bounded context relationships Sonnet
fitness-function-generator Generate architecture tests Opus
resilience-analyzer Audit resilience patterns Opus
over-engineering-detector Detect unnecessary complexity Opus

User-Invocable Skills

Enterprise Architecture

Skill Purpose
/ea:adr-management <action> [title] Create and manage ADRs
/ea:ea-explain <concept> Explain EA concept
/ea:ea-document <type> Generate architecture document
/ea:togaf-phase <phase> Get TOGAF phase guidance
/ea:zachman-analyze [row] [column] Analyze from Zachman perspective
/ea:architecture-review [scope] Review architecture
/ea:ea-dashboard Show architecture metrics

Solution Architecture

Skill Purpose
/ea:event-storming <domain> [--mode] Run event storming workshop
/ea:context-mapping [file] [--mode] [--output] Map bounded context relationships
/ea:domain-storytelling <journey> [--type] Create domain story
/ea:fitness-functions [scope] [--generate] Analyze architecture fitness
/ea:resilience-patterns [scope] [--detailed] Audit resilience patterns

Framework References

TOGAF 10

The Open Group Architecture Framework provides methodology via the ADM:

  • Preliminary Phase + Phases A-H
  • Requirements Management (cross-cutting)
  • Four domains: Business, Data, Application, Technology

Zachman Framework 3.0

A 6x6 ontology for classifying architecture artifacts:

  • Rows: Planner, Owner, Designer, Builder, Subcontractor, User
  • Columns: What, How, Where, Who, When, Why

Important: Rows 1-3 require human input; rows 4-6 can be extracted from code.

Microsoft Cloud Adoption Framework (CAF)

7 methodologies for Azure adoption:

  • Strategy, Plan, Ready, Adopt, Govern, Secure, Manage

AWS Well-Architected Framework

6 pillars for workload design:

  • Operational Excellence, Security, Reliability
  • Performance Efficiency, Cost Optimization, Sustainability

.NET Tooling

Polly v8

Resilience patterns using the new pipeline API:

.AddStandardResilienceHandler()  // Quick setup
.AddResilienceHandler("custom", builder => {  // Custom
    builder.AddRetry(...)
    builder.AddCircuitBreaker(...)
    builder.AddTimeout(...)
})

Brighter

Message handler resilience with policy attributes:

[UsePolicy("retry-policy", step: 1)]
[UsePolicy("circuit-breaker", step: 2)]
public override MyCommand Handle(MyCommand command)

NetArchTest / ArchUnitNET

Architecture fitness functions:

Types.InAssembly(...)
    .ShouldNot()
    .HaveDependencyOn("Infrastructure")

Visualization Integration

This plugin integrates with the visualization plugin for C4 diagrams:

# Install visualization plugin (recommended)
/plugin install visualization@claude-code-plugins

When available, the architecture-documenter agent will generate Mermaid or PlantUML diagrams. Without it, text-based descriptions are provided.


Repository Structure

The plugin expects architecture artifacts in /architecture/:

/architecture/
  README.md
  principles.md
  /adr/
    0001-initial-architecture.md
    0002-database-selection.md
  /viewpoints/
    context.md
    containers.md
    /components/

See memory/repository-structure.md for full details.


Honest Limitations

This plugin acknowledges what it can and cannot do:

What It Does Well

  • ADR creation and management
  • Technology stack analysis (Zachman rows 4-5)
  • TOGAF phase guidance
  • Code-derived architecture documentation
  • Technical gap analysis
  • AI-simulated event storming (approximates workshop dynamics)
  • Architecture fitness function generation
  • Resilience pattern analysis

What Requires Human Input

  • Business strategy (Zachman rows 1-2)
  • Design rationale (without ADRs)
  • Budget and timeline decisions
  • Organizational context
  • Real stakeholder perspectives (personas simulate, not replace)

All outputs clearly indicate what was extracted from code vs what requires human input.


Memory Files

Reference documentation included:

  • adr-template.md - Standard ADR format
  • repository-structure.md - Directory structure guide
  • togaf-overview.md - TOGAF 10 quick reference
  • zachman-overview.md - Zachman 3.0 matrix
  • zachman-limitations.md - Code extraction limits
  • architecture-principles.md - Principles template
  • cloud-frameworks/caf-pillars.md - Microsoft CAF
  • cloud-frameworks/well-architected.md - AWS Well-Architected

Contributing

This plugin is part of the claude-code-plugins repository. Contributions welcome!

License

MIT