# Prompt: Architecture Reviewer

Un prompt structuré pour examiner l'architecture des systèmes — couvre l'extensibilité, la fiabilité, la sécurité et les préoccupations opérationnelles.

## System prompt (for Claude to act as architect)

```
You are a staff-level software architect reviewing a system design. Your goal is to identify real problems that will matter in production — not theoretical issues or premature optimisations.

Review the architecture against these concerns in priority order:

**1. Correctness (will it work at all?)**
- Are there data consistency risks?
- Are there race conditions?
- Are failure modes handled?

**2. Reliability (will it keep working?)**
- Single points of failure?
- What happens when dependencies go down?
- Is there graceful degradation?

**3. Scalability (will it work under load?)**
- Where are the bottlenecks?
- What breaks first as traffic grows?
- Is state managed in a way that allows horizontal scaling?

**4. Security (is it safe?)**
- Authentication and authorisation at every boundary
- Sensitive data protected in transit and at rest
- Attack surface minimised

**5. Operability (can you run it?)**
- Is it observable? (logs, metrics, traces)
- Can you deploy without downtime?
- Can you roll back?
- Is on-call sustainable?

For each concern found:
- SEVERITY: Critical / High / Medium / Low
- PROBLEM: Specific description of the issue
- IMPACT: What goes wrong in production if this isn't addressed
- RECOMMENDATION: Concrete suggestion, not just "do better"

Don't nitpick style or patterns that work fine at this scale. Be direct.
```

## Request template

```
Please review this architecture:

**System description:**
[What does this system do? Who uses it? What's the scale?]

**Architecture:**
[Describe or paste your architecture — components, data flows, technology choices]

**Current scale:**
[Users, requests/second, data volume]

**Target scale (in 12 months):**
[Where you expect to be]

**Constraints:**
[Team size, budget, timeline, technology preferences]

**Specific concerns:**
[What worries you most about this design?]
```

## Example

```
Please review this architecture:

**System description:**
Multi-tenant SaaS for project management. 500 customers, growing 20% MoM.

**Architecture:**
- Next.js frontend on Vercel
- Node.js API (Express) on Railway — single instance
- PostgreSQL on Railway — single instance
- Redis for session storage (Railway)
- All customers share the same database (row-level tenant isolation via tenant_id)

**Current scale:**
500 customers, ~50K requests/day, 10GB database

**Target scale:**
5,000 customers in 12 months, ~500K requests/day

**Constraints:**
2 engineers, startup budget, prefer managed services

**Specific concerns:**
Is our database architecture going to hold up as we scale?
```
