Software Architect

The Software Architect agent specializes in system design, architecture decisions, and technical planning.

Expertise Areas#

  • System Design - Scalability, reliability, maintainability
  • Architecture Patterns - Microservices, monolith, serverless
  • Design Patterns - SOLID, DDD, clean architecture
  • API Design - REST, GraphQL, event-driven
  • Data Architecture - Storage, caching, replication
  • Trade-off Analysis - Performance vs. complexity
  • Technical Documentation - ADRs, diagrams, specs

Usage Examples#

System Design#

Use the software-architect agent to design a real-time notification system that can handle 1M users.

Response includes:

  • Architecture diagram
  • Component breakdown
  • Technology recommendations
  • Scaling strategy
  • Trade-off analysis

Architecture Review#

Use the software-architect agent to review our current architecture and suggest improvements.

Response includes:

  • Current state analysis
  • Pain points identification
  • Improvement recommendations
  • Migration path
  • Risk assessment

Technology Selection#

Use the software-architect agent to compare PostgreSQL vs MongoDB for our use case.

Response includes:

  • Feature comparison
  • Use case analysis
  • Pros and cons
  • Recommendation with reasoning

Architecture Patterns#

Clean Architecture#

┌─────────────────────────────────────────────────────────┐ │ Presentation Layer │ │ (Controllers, Views, APIs) │ ├─────────────────────────────────────────────────────────┤ │ Application Layer │ │ (Use Cases, Application Services) │ ├─────────────────────────────────────────────────────────┤ │ Domain Layer │ │ (Entities, Value Objects, Domain Services) │ ├─────────────────────────────────────────────────────────┤ │ Infrastructure Layer │ │ (Repositories, External Services, Database) │ └─────────────────────────────────────────────────────────┘

Microservices Architecture#

┌──────────┐ ┌──────────┐ ┌──────────┐ │ API │ │ User │ │ Order │ │ Gateway │────▶│ Service │ │ Service │ └──────────┘ └──────────┘ └──────────┘ │ │ │ │ ┌─────┴─────┐ │ │ │ Message │─────────┤ │ │ Queue │ │ │ └───────────┘ │ │ │ ┌────▼─────┐ ┌─────▼────┐ │ Payment │ │ Inventory│ │ Service │ │ Service │ └──────────┘ └──────────┘

Event-Driven Architecture#

Producers Event Bus Consumers ┌─────────┐ ┌─────────┐ ┌─────────┐ │ Order │──────▶│ │──────▶│ Email │ │ Service │ │ Kafka │ │ Service │ └─────────┘ │ or │ └─────────┘ │ RabbitMQ│ ┌─────────┐ │ │ ┌─────────┐ │ Payment │──────▶│ │──────▶│Analytics│ │ Service │ └─────────┘ │ Service │ └─────────┘ └─────────┘

Decision Frameworks#

Architecture Decision Record (ADR)#

1# ADR-001: Use PostgreSQL as Primary Database 2 3## Status 4Accepted 5 6## Context 7We need to choose a database for our application that handles: 8- Complex relational data 9- ACID transactions 10- Full-text search 11- JSON data support 12 13## Decision 14We will use PostgreSQL as our primary database. 15 16## Consequences 17 18### Positive 19- Strong ACID compliance 20- Excellent JSON support with JSONB 21- Built-in full-text search 22- Mature ecosystem and tooling 23 24### Negative 25- Requires more operational expertise than managed NoSQL 26- Horizontal scaling requires additional tooling (Citus, etc.) 27 28### Risks 29- Single point of failure without proper replication setup

Trade-off Analysis#

| Factor | Option A: Monolith | Option B: Microservices | |-----------------|--------------------|-----------------------| | Complexity | Lower | Higher | | Scalability | Limited | High | | Dev Speed | Faster initially | Slower initially | | Team Size | Any | Larger teams | | Deployment | Simpler | Complex | | Debugging | Easier | Harder |

System Design Examples#

High-Level Design: E-commerce Platform#

┌─────────────────────────────────────────────────────────────┐ │ CDN (CloudFront) │ └─────────────────────────────────────────────────────────────┘ │ ┌─────────────────────────────▼─────────────────────────────────┐ │ Load Balancer (ALB) │ └─────────────────────────────────────────────────────────────┘ │ ┌────────────────────┼────────────────────┐ ▼ ▼ ▼ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ Web App │ │ Web App │ │ Web App │ │ (Next.js) │ │ (Next.js) │ │ (Next.js) │ └─────────────┘ └─────────────┘ └─────────────┘ │ │ │ └────────────────────┼────────────────────┘ │ ┌────────────────────┼────────────────────┐ ▼ ▼ ▼ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ Product API │ │ Order API │ │ User API │ └─────────────┘ └─────────────┘ └─────────────┘ │ │ │ ┌────┴────┐ ┌───┴───┐ ┌───┴───┐ ▼ ▼ ▼ ▼ ▼ ▼ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ │ Redis │ │Elastic│ │ DB │ │ Queue │ │ DB │ │ Redis │ └───────┘ └───────┘ └───────┘ └───────┘ └───────┘ └───────┘

Sample Prompts#

TaskPrompt
System design"Design a URL shortener that handles 1B requests/day"
Architecture"Should we use microservices or a modular monolith?"
Migration"Plan migration from REST to GraphQL"
Review"Review this architecture for potential bottlenecks"
Documentation"Create an ADR for our caching strategy"

Configuration#

1// bootspring.config.js 2module.exports = { 3 agents: { 4 customInstructions: { 5 'software-architect': ` 6 - Consider scalability from the start 7 - Document architecture decisions 8 - Identify potential bottlenecks 9 - Plan for failure scenarios 10 - Keep solutions pragmatic 11 `, 12 }, 13 }, 14};