Skip to content

mattgierhart/PRD-driven-context-engineering / .claude/skills/prd-v06-architecture-design

prd-v06-architecture-design

Verified

Define how system components connect, establishing boundaries, patterns, and integration approaches during PRD v0.6 Architecture. Triggers on requests to design architecture, create system design, define component relationships, or when user asks "design architecture", "system design", "how do components connect?", "architecture decisions", "technical architecture", "system overview". Consumes TECH- (stack selections), RISK- (constraints), FEA- (features). Outputs ARC- entries documenting architecture decisions with rationale. Feeds v0.6 Technical Specification.

FileKindSize
SKILL.mdskill md15.8 KB
assets/arc.mdmarkdown1.5 KB
references/diagrams.mdmarkdown11.5 KB
references/examples.mdmarkdown7.7 KB

references/diagrams.md

View on GitHub
# Architecture Diagram Templates

## Basic System Diagram (ASCII)

```
┌─────────────────────────────────────────────────────────┐
│                    TRUST BOUNDARY                        │
│                                                          │
│  ┌─────────────┐     ┌─────────────┐    ┌────────────┐  │
│  │  Component  │────▶│  Component  │───▶│  Database  │  │
│  │     A       │     │     B       │    │            │  │
│  └─────────────┘     └─────────────┘    └────────────┘  │
│                                                          │
└──────────────────────────┬───────────────────────────────┘
                           │
           ┌───────────────┼───────────────┐
           ▼               ▼               ▼
     ┌──────────┐   ┌──────────┐   ┌──────────┐
     │ External │   │ External │   │ External │
     │ Service  │   │ Service  │   │ Service  │
     └──────────┘   └──────────┘   └──────────┘
```

## Data Flow Diagram

```
User Request
     │
     ▼
┌──────────┐    ┌──────────┐    ┌──────────┐
│   CDN    │───▶│  Load    │───▶│   App    │
│  (cache) │    │ Balancer │    │ Server   │
└──────────┘    └──────────┘    └────┬─────┘
                                     │
                    ┌────────────────┼────────────────┐
                    ▼                ▼                ▼
              ┌──────────┐    ┌──────────┐    ┌──────────┐
              │  Cache   │    │ Database │    │  Queue   │
              │ (Redis)  │    │ (Postgres)│   │ (SQS)   │
              └──────────┘    └──────────┘    └──────────┘
```

## Integration Pattern: Webhook

```
┌─────────────────────────────────────────────────────────┐
│                    External Service                      │
│                    (Stripe, GitHub, etc.)                │
└───────────────────────────┬──────────────────────────────┘
                            │ POST /webhooks/service
                            ▼
┌─────────────────────────────────────────────────────────┐
│                    Webhook Endpoint                      │
│  1. Verify signature                                     │
│  2. Check idempotency key                                │
│  3. Acknowledge (200 OK)                                 │
│  4. Enqueue for processing                               │
└───────────────────────────┬──────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────┐
│                    Event Queue                           │
└───────────────────────────┬──────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────┐
│                    Event Handler                         │
│  1. Parse event type                                     │
│  2. Execute business logic                               │
│  3. Update database                                      │
│  4. Mark as processed                                    │
└─────────────────────────────────────────────────────────┘
```

## Integration Pattern: Circuit Breaker

```
┌─────────────┐     ┌─────────────────────┐     ┌─────────────┐
│  Your Code  │────▶│   Circuit Breaker   │────▶│  External   │
│             │     │                     │     │   Service   │
│             │◀────│  State: CLOSED      │◀────│             │
└─────────────┘     │        OPEN         │     └─────────────┘
                    │        HALF-OPEN    │
                    └──────────┬──────────┘
                               │
                               ▼ (if OPEN)
                    ┌─────────────────────┐
                    │  Fallback Response  │
                    │  - Cached data      │
                    │  - Default value    │
                    │  - Feature disable  │
                    └─────────────────────┘
```

## Module Structure

```
/app
├── /modules
│   ├── /auth           # ARC-003: Authentication module
│   │   ├── actions.ts
│   │   ├── queries.ts
│   │   └── types.ts
│   │
│   ├── /billing        # ARC-004: Billing module
│   │   ├── actions.ts
│   │   ├── webhooks.ts
│   │   └── types.ts
│   │
│   ├── /reports        # Core business logic
│   │   ├── actions.ts
│   │   ├── queries.ts
│   │   └── types.ts
│   │
│   └── /shared         # Cross-cutting concerns
│       ├── db.ts
│       ├── cache.ts
│       └── logger.ts
│
├── /api                # API routes
│   ├── /trpc
│   └── /webhooks
│
└── /components         # React components
```

## Security Boundary Diagram

```
┌──────────────────────────────────────────────────────────────┐
│                     PUBLIC INTERNET                           │
│                                                               │
│  ┌──────────────────────────────────────────────────────┐    │
│  │                   WAF / DDoS Protection               │    │
│  └──────────────────────────┬───────────────────────────┘    │
│                              │                                │
└──────────────────────────────┼────────────────────────────────┘
                               │
┌──────────────────────────────┼────────────────────────────────┐
│                    DMZ (Edge Layer)                           │
│  ┌──────────────────────────┐│                               │
│  │         CDN / Edge       ││                               │
│  │    (Static assets,       ││                               │
│  │     Edge functions)      ││                               │
│  └──────────────────────────┘│                               │
└──────────────────────────────┼────────────────────────────────┘
                               │
┌──────────────────────────────┼────────────────────────────────┐
│                  APPLICATION BOUNDARY                         │
│                              │                                │
│  ┌───────────────────────────▼──────────────────────────────┐│
│  │              Application Server                          ││
│  │   - Auth verification                                    ││
│  │   - Input validation                                     ││
│  │   - Business logic                                       ││
│  └───────────────────────────┬──────────────────────────────┘│
│                              │                                │
└──────────────────────────────┼────────────────────────────────┘
                               │
┌──────────────────────────────┼────────────────────────────────┐
│                    DATA BOUNDARY                              │
│  ┌───────────────────────────▼──────────────────────────────┐│
│  │              Database (Encrypted at rest)                ││
│  │   - Row-level security                                   ││
│  │   - Audit logging                                        ││
│  └──────────────────────────────────────────────────────────┘│
└───────────────────────────────────────────────────────────────┘
```
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall