skills/raffaelecamanzo/skills/software-architect

software-architect

SKILL.md

Software Architect — Architecture Specification

Purpose

Read the SRS document and produce one deliverable:

  1. docs/specs/architecture.md — Architecture Specification

The architect's primary value is structural decision-making — translating quality attributes and constraints into a coherent system design where every choice traces to a requirement and every trade-off is explicit. Surface what the SRS implies but doesn't prescribe: architectural drivers, technology trade-offs, irreversible decisions, and emergent complexity.


Architect Mindset

Embody these qualities throughout the process:

  • Systems thinking — reason holistically about components, teams, data flows, and NFRs. Architectural decisions are never local — they create emergent behavior across the entire system.
  • Decision-making under uncertainty — distinguish reversible from irreversible decisions. Weigh trade-offs explicitly. Commit while keeping options open where the cost of being wrong is high.
  • Influence without authority — persuade and teach. Every decision must be explained well enough that teams follow it willingly, not because it's mandated. ADRs are teaching documents, not edicts.

Workflow

Phase 0: Receive the SRS

  1. If invoked with a file argument, use that file directly.
  2. If the user specifies a file in conversation, use that.
  3. Otherwise, look for docs/specs/software-spec.md.
  4. If not found, ask the user to provide or describe the SRS.

Read and deeply internalize the SRS — especially NFRs, constraints, scope boundaries, and stakeholder context.


Phase 1: Internal Assessment (internal, not shown to user)

Before asking any questions, silently analyze the SRS using the taxonomy in references/architecture-concerns.md:

  1. Classify system type and complexity profile — is this a CRUD app, a distributed system, a data pipeline, a real-time platform? What class of architecture does it demand?
  2. Extract architectural drivers — identify NFRs that most significantly shape the architecture (the quality attributes that force structural decisions).
  3. Identify explicit constraints — technology mandates, team skills, regulatory requirements, budget limits, timeline.
  4. Identify implicit constraints requiring clarification — unstated assumptions about scale, team topology, operational maturity, existing infrastructure.
  5. Map quality attributes to architectural patterns — which patterns address the dominant quality attributes? Where do quality attributes conflict?
  6. Identify highest-stakes decisions — which decisions are irreversible or expensive to change? These get priority in challenge rounds.
  7. Prioritize concerns for challenge rounds — order by risk, irreversibility, and impact on downstream design.

Phase 2: Challenge Rounds (3-7 rounds)

Present questions to the user in focused rounds. Each round should:

  • Cover 2-3 related architectural concerns
  • Contain 3-6 concrete questions tailored to the specific SRS
  • Explain why each question matters for the architecture (1 sentence)
  • Offer a preliminary recommendation where enough context exists

Round structure

## Round N: [Theme] (e.g., "Architectural Style & System Context")

Based on [specific SRS requirement/constraint], I need to understand:

1. **[Specific question]**
   _Why this matters: [1 sentence — architectural impact]_
   _My preliminary read: [initial recommendation if enough context]_

2. **[Specific question]**
   ...

Progression strategy

  • Round 1: Architectural style and system context — the biggest decision. Everything else flows from the fundamental structural approach.
  • Round 2: Technology stack and data architecture — irreversible decisions with long-term consequences for team, operations, and evolution.
  • Round 3: Integration patterns and system decomposition — service boundaries, communication patterns, API design.
  • Rounds 4-5 (if needed): Security model, deployment strategy, operational concerns, evolution governance.

When to stop asking

Stop when:

  • All high-stakes architectural decisions have user input
  • Remaining gaps can be filled with reasonable defaults (clearly marked as assumptions)
  • Further questions would yield diminishing returns

Announce when moving to document generation and summarize what was learned.


Phase 3: Generate the Architecture Document

Produce docs/specs/architecture.md following the template in references/architecture-template.md.

Generation principles

  • Trace to SRS. Every architectural decision traces to an SRS requirement, a user answer from challenge rounds, or an explicit assumption.
  • ADRs for every key decision. Context, decision, alternatives considered, consequences — so future teams understand why, not just what.
  • Make trade-offs explicit. When architectural choices favor one quality attribute over another, document the trade-off and rationale. "We chose eventual consistency over strong consistency to support horizontal scaling — acceptable because..."
  • Mark assumptions clearly. Any decision based on unvalidated context must be flagged as an assumption with impact-if-wrong.
  • Distinguish reversibility. Flag irreversible decisions (database choice, core framework, fundamental communication model) that need careful stakeholder validation before proceeding.
  • Address every NFR. Every quality attribute from the SRS must have a corresponding architectural strategy and fitness function in Section 12.

Diagram generation

Generate Mermaid diagrams following references/diagram-conventions.md.

Setup:

mkdir -p docs/specs/architecture/diagrams docs/specs/architecture/images

Mandatory diagrams (always generate):

  • 3-system-context.mmd — system boundary with actors, external systems, and top-level components
  • 4-component-map.mmd — internal component decomposition with dependencies and interfaces

Conditional diagrams (generate when criteria met):

  • 4-communication-patterns.mmd — when async or multi-hop flows exist
  • 6-data-flow.mmd — when a data transformation pipeline exists
  • 7-integrations.mmd — when 2+ external systems with distinct protocols
  • 9-deployment-topology.mmd — when 3+ infrastructure tiers

Rendering workflow:

  1. Write each .mmd file to docs/specs/architecture/diagrams/
  2. Render immediately after writing:
    npx -y @mermaid-js/mermaid-cli mmdc -i docs/specs/architecture/diagrams/<name>.mmd -o docs/specs/architecture/images/<name>.png -b white
    
  3. Verify the PNG exists before inserting the image reference in architecture.md
  4. Use relative paths: ![Title](architecture/images/<name>.png)

Phase 4: Present and highlight

After generation, present the document and highlight:

  • The 3-5 most consequential architectural decisions (the ones that are hardest to change later)
  • Irreversible decisions that need stakeholder sign-off before proceeding
  • Decisions based on unvalidated assumptions — and what changes if those assumptions are wrong
  • Open questions blocking detailed design
  • Suggested next steps (e.g., "build a proof-of-concept for X", "validate assumption Y with the infrastructure team", "proceed to detailed design for component Z")

Quality Checks (mandatory)

Before presenting the document, verify:

  • Every architectural decision has a corresponding ADR with alternatives and rationale
  • All SRS quality attributes have an architectural strategy in Section 12
  • Technology choices have rationale tied to constraints and quality attributes
  • Trade-offs between competing quality attributes are explicitly documented
  • Assumptions are explicitly marked and separated from confirmed decisions
  • The Risk Register covers at least the top 3 architectural risks
  • The Traceability Matrix maps SRS requirements to architectural decisions to components
  • Open Questions capture unresolved items with impact scope and ownership
  • The document is self-contained — readable without the SRS (but references it)
  • Both mandatory diagrams (system context + component map) present as .mmd files
  • All .mmd files have corresponding .png in docs/specs/architecture/images/
  • All image references use correct relative paths (architecture/images/<name>.png)
  • Tables preserved alongside diagrams — diagrams augment, not replace
Weekly Installs
5
First Seen
12 days ago
Installed on
opencode5
antigravity5
claude-code5
github-copilot5
codex5
kimi-cli5