Senior architect

From borghei/Claude-Skills · View interactive version

Senior architect is an AI agent skill from the GitHub repository borghei/Claude-Skills. Makes and records architecture decisions (pattern, database, monolith vs services) as ADRs, backed by coupling and diagram tools. Use when writing an ADR, choosing an architecture or database, or reviewing system structure.

How to use this skill

Skill file

Senior Architect

Architecture design and analysis tools for making informed technical decisions: visualize system structure, analyze dependencies and coupling, detect architectural patterns, and run decision workflows for databases, patterns, and monolith-vs-microservices trade-offs.

Decision Workflow

The value of this skill is the decision and its record; the tools supply evidence.

  1. Frame the decision: one question (for example "split billing out of the monolith?"), the constraints (team size, deployment cadence, data consistency, budget) and who decides.
  2. Gather evidence from the code: dependency_analyzer.py for coupling and cycles, project_architect.py for the current pattern and layer violations, architecture_diagram_generator.py for a current-state diagram. Low confidence or unknown layers mean the structure does not follow naming conventions; read the code rather than trusting the label.
  3. Run the matching workflow in references/decision_workflows.md: database selection, pattern selection, or monolith vs microservices. Write down at least two real options and the cost of each.
  4. Write the ADR (template in the same reference): context, options, decision, consequences, and the signal that would make you revisit it.
  5. Done when the ADR is accepted by the people who will own the result, and the evidence it cites can be regenerated by rerunning the tools.

Not this skill: cloud-provider service design (see engineering/aws-solution-architect, engineering/azure-cloud-architect, engineering/gcp-cloud-architect), choosing between frameworks or vendors (see engineering/tech-stack-evaluator), and backend implementation (see engineering/senior-backend).

Core Capabilities

When to Use

Clarify First

Before generating diagrams or an assessment, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Tools Overview

| Tool | Purpose | Command |

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

| architecture_diagram_generator.py | Component, layer or deployment diagrams (Mermaid, PlantUML, ASCII) from a project directory | python3 scripts/architecture_diagram_generator.py ./project --format mermaid --type component |

| dependency_analyzer.py | Coupling score (0-100) and circular dependencies across npm, pip, Poetry, Go modules and Cargo | python3 scripts/dependency_analyzer.py ./project --output json --check circular |

| project_architect.py | Pattern detection, layer violations and code smells, with a confidence score | python3 scripts/project_architect.py ./project --check layers --verbose |

Exit codes: 0 report (or check passed); 1 a --check gate failed (cycles found, coupling above 70); 2 missing or unreadable project path. --output json applies to the --check gates too. Detection is name-based: folders called services/ or domain/ are read as layers, so treat a low confidence score as "no clear pattern", not as a finding.

Quick Start

# from engineering/senior-architect/ (a small layered Python app with one deliberate back-reference)
python3 scripts/project_architect.py assets/sample_layered_app            # Layered, 55% confidence
python3 scripts/dependency_analyzer.py assets/sample_layered_app --output json --check circular   # exit 1: one cycle
python3 scripts/architecture_diagram_generator.py assets/sample_layered_app --format mermaid --type layer

The cycle is controllers -> services -> repositories -> controllers: the repository imports the controller, which is the kind of finding an ADR or a refactor ticket should record.

Reference Documentation

Load the reference that matches the task — keep this file lean and pull detail on demand:

Anti-Patterns

Mistake: Choosing microservices for a small team or an unclear domain.

Why it matters: Service boundaries drawn before the domain is understood get redrawn at the cost of distributed-systems complexity.

Instead: Start with a modular monolith with enforced module boundaries, and extract a service when a boundary has proved stable and has its own scaling or release need.

Mistake: A decision with no written record.

Why it matters: Six months later nobody remembers why, so the decision is relitigated or silently reversed.

Instead: Write a short ADR with the options considered and the trigger for revisiting it.

Mistake: Treating tool output as the architecture review.

Why it matters: Coupling scores and pattern labels are heuristics; they miss runtime coupling such as shared databases and synchronous call chains.

Instead: Use the tools to find where to look, then review data ownership and call paths by hand.

Files

| File | Purpose |

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

| scripts/architecture_diagram_generator.py, scripts/dependency_analyzer.py, scripts/project_architect.py | Stdlib CLIs |

| references/decision_workflows.md | Decision workflows and the ADR template |

| assets/sample_layered_app/ | Controllers, services, repositories and models with a repository-to-controller import cycle |

| references/tools-and-usage.md | Full flags, example outputs and troubleshooting |

Scope & Limitations

Covers: system-level architecture analysis (pattern detection, layer validation, component diagramming) for existing codebases; technology-agnostic dependency analysis across npm, pip, Poetry, Go modules, and Cargo; architecture decision workflows (database, pattern, monolith-vs-microservices); diagram generation in Mermaid, PlantUML, and ASCII.

Does NOT cover:

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.