Overview
Architecture artifacts in the SDD framework document the system’s structure, decomposition, and deployment strategy. They are generated by theplan-architect skill and stored in plan/.
Location
FASE structure (implementation phases)
FASE files are navigation indices that map specifications to incremental implementation phases. They are derived artifacts — always regenerated from specs, never patched incrementally.FASE--.md
CVAnalysis entity type
From domain/02-ENTITIES.md §1:Contratos resultantes
API Endpoints
- POST /api/v1/pdfs (API-pdf-upload) — Upload PDF file
- GET /api/v1/analyses/:id (API-analysis-status) — Get analysis status
Domain Events
- cv.uploaded — Published when upload succeeds
Verificación
Unit Tests
Integration Tests
Manual Verification
Alcance
Incluye
- PDF upload endpoint
- File size validation
- PDF format validation
- CVAnalysis entity creation
- Event publishing
- Error handling for upload failures
Excluye
- Text extraction (FASE-2)
- CV parsing (FASE-3)
- Skills analysis (FASE-4)
- Authentication implementation (FASE-0)
- Rate limiting enforcement (FASE-0)
Migration Strategy
- Use D1 migrations directory:
migrations/ - Sequential numbering:
0001_initial.sql,0002_add_error_tracking.sql - Apply via
wrangler d1 execute
4. Deployment View
Deployment Properties
- Region: Europe (GDPR compliance - ADR-020)
- TLS: 1.3 (minimum)
- Cold start: < 5ms (Workers advantage)
- Scaling: Automatic, per-request
5. Integration Map
From contracts/ and workflows/:Synchronous Integrations
None (all external calls are async via queues)Asynchronous Integrations
- cv.uploaded event → Processing Worker
- cv.completed event → Notification Service (future FASE)
Event Flow
6. Security Architecture
From spec/nfr/SECURITY.md and ADR-003:Authentication
- Method: JWT Bearer tokens (ADR-003)
- Provider: Cloudflare Access or external IdP
- Token expiry: 15 minutes
- Refresh: Via refresh tokens (30 days)
Authorization
- Model: Attribute-Based Access Control (ABAC)
- Rules: User can only access their own CVAnalysis entities
- Enforcement: Middleware in API Worker
Data Protection
- At rest: AES-256 (R2 default)
- In transit: TLS 1.3 (Cloudflare edge)
- PII: File names and content are encrypted
Audit Logging
- Events: All API calls, state transitions
- Storage: Cloudflare Logs (ADR-022)
- Retention: 90 days
Validation
The plan-architect skill runs 6 validation checks:| Check | What | Against |
|---|---|---|
| V1: UC Coverage | Every UC in FASE files has guidance in plan | FASE files ↔ PLAN-FASE-*.md |
| V2: ADR Compliance | Every ADR decision reflected in architecture | spec/adr/ ↔ ARCHITECTURE.md |
| V3: NFR Strategies | Every NFR has implementation strategy | spec/nfr/ ↔ PLAN.md |
| V4: INV Enforcement | Every invariant has enforcement mechanism | domain/05-INVARIANTS.md ↔ PLAN.md |
| V5: FASE Completeness | Every FASE has corresponding plan file | plan/fases/ ↔ plan/fase-plans/ |
| V6: No Orphan Decisions | Every CLARIFY-LOG decision used in plan | CLARIFY-LOG.md ↔ PLAN.md |
Related
- Skills:
/sdd:plan-architect,/sdd:task-generator - Upstream: Specifications in
spec/ - Downstream: Tasks in
task/ - SWEBOK: Chapter 02 (Software Design)
- References:
architecture-patterns.md,fase-template.md,plan-templates.md