Generate comprehensive system architecture from any product idea or PRD. Maps 14 layers covering state, journeys, failures, security, resilience, observability, accessibility, and experience. Use before writing any code.
Transform product ideas into comprehensive system architecture before code gets written.
Core Philosophy
Most apps fail not because features don't work, but because features don't connect.
This skill forces systems thinking by mapping fourteen architecture layers from any product description. Layers 1–7 were the original framework. Layers 8–14 were added after a RALPH analysis (Systems Thinking → First Principles → Second-Order Thinking) revealed critical blind spots in production.
Why 14 Layers (The RALPH Analysis)
The original 7-layer framework assumed a connected, single-user, English-speaking, able-bodied user on a fast network accessing a static system.
Real systems operate in chaos: offline, multi-device, multi-language, regulated, evolving.
First Principles reveals: Every assumption we didn't question became a blind spot.
No persistence → No offline → No multi-device → Lost users
No security boundaries → Features accidentally expose data
No observability → Debugging becomes archaeology
No accessibility → Legal liability + 15% market exclusion
Adding layers early is 10x cheaper than retrofitting.
Layer Priority (when time is limited)
P0 — Build before any code:
Persistence Layer (data loss prevention)
Security Layer (liability prevention)
Resilience Layer (user trust)
P1 — Build before launch:
Observability Layer (operational excellence)
Evolution Layer (maintainability)
Failure Map (support burden)
P2 — Build for scale:
Accessibility Layer (inclusive design)
Experience Layer (differentiation)
Cost Model (optimization)
The Fourteen Layers
#
Layer
Question Answered
Output
1
System Map
What state connects features?
Features → State → Read/Write relationships
2
Journey Map
What order must things happen?
Init flow, critical paths, user states
3
Failure Map
What breaks and what catches it?
Failure modes → Fallbacks → User messaging
4
Rules Engine
What logic governs behavior?
Triggers → Conditions → Actions
5
Dependency Map
What external services are needed?
Services → Failure points → Fallbacks
6
Validation Schema
What gates AI/data quality?
Inputs → Checks → Rejection handling
7
Cost Model
Where does money/compute go?
Operations → Cost → Optimization opportunities
8
Persistence Layer
How does data survive and sync?
Storage → Sync → Conflict resolution
9
Security Layer
Who can access what?
Auth → Authorization → Encryption → Audit
10
Resilience Layer
What works without network?
Offline → Queue → Sync → Retry
11
Observability Layer
How do we know it's working?
Metrics → Logs → Traces → Alerts
12
Accessibility Layer
Can everyone use it?
Screen readers → Keyboard → Cognitive load
13
Evolution Layer
How do we ship changes?
Migration → Feature flags → Versioning
14
Experience Layer
How does it feel?
Performance → Emotion → Localization
LAYER 1: System Map
Purpose
Map how features connect through shared state.
Process
Extract all features from the product description
For each feature, identify:
What state does it READ to function?
What state does it WRITE when used?
State that multiple features touch = shared state
Output Format
Feature: [Name] (INIT if first-run required)
├── Reads: [state1, state2, ...]
├── Writes: [state3, state4, ...]
└── Connections: [features that depend on its writes]
Key Questions
What's the single source of truth for each piece of state?
Which feature MUST run first?
What happens if init feature never completes?
LAYER 2: Journey Map
Purpose
Define the sequence of user actions and system responses.
Process
Identify user states:
Uninitialized (first-time user)
Active (normal operation)
Edge states (expired, banned, incomplete)
Map critical paths:
First-time setup flow
Daily active use flow
Recovery flows (re-engagement, error recovery)
Define state transitions
Output Format
User State: [Name]
├── Entry Condition: [how user enters this state]
├── Available Actions: [what they can do]
├── Blocked Actions: [what's disabled and why]
└── Exit Conditions: [how they leave this state]
Key Questions
What does a returning user see?
What happens if user abandons mid-flow?
How do we detect which state user is in?
LAYER 3: Failure Map
Purpose
Enumerate everything that can fail and how we handle it.
Categories of Failure
Network Failures: API timeouts, offline, bad responses
User Input Failures: Invalid data, missing required fields
AI/ML Failures: Hallucination, wrong format, confidence too low
System Failures: Storage full, memory exhausted, crash
Business Logic Failures: Insufficient funds, expired subscription
Output Format
Failure: [Description]
├── Detection: [how we know it happened]
├── Fallback: [what we do instead]
├── User Message: [what user sees]
├── Recovery Path: [how user fixes it]
└── Logging: [what we capture for debugging]
Key Questions
What's the blast radius of each failure?
Can failures cascade?
What's the MTTR (mean time to recovery)?
LAYER 4: Rules Engine
Purpose
Extract business logic that acts on state independent of user action.
Categories
Time-based: "Every 7 days, prompt for progress photo"
Threshold-based: "If calories exceeded 3 consecutive days, show intervention"
Generate a React component that visualizes all fourteen layers as an interactive application. See references/output-template.md for the component structure.
The output should:
Allow tab navigation between all 14 layers
Show relationships visually (hover interactions)
Group layers by phase (Core/Infrastructure/Human)
Include the raw data as exportable JSON
Work as a standalone artifact
References
references/output-template.md - React component template for the visualization
references/examples.md - Example analyses for different product types
Layer 10 (Resilience) is always underestimated for mobile apps — offline handling needs to be designed before state management, not after
Layer 14 (Experience) should include a "day 30 emotional state" question — why does the user open the app on day 30? If you can't answer it, the architecture is incomplete
Habit apps live or die on Layer 4 (Rules Engine) — streak logic, intervention triggers, and re-engagement rules need to be explicit before building, not discovered in production
Layer 9 (Security) for consumer apps: the biggest risk is usually accidental data exposure between users, not external attacks — model your authorization boundaries first
2026-03-03 — ICON Command Center (retail intelligence dashboard):
Layer 11 (Observability) for AI-heavy apps: define what "working correctly" means for AI outputs before launch — hallucination boundaries and confidence thresholds are architecture decisions, not implementation details
Layer 7 (Cost Model) for Gemini/GPT integrations: token costs at scale are non-obvious — model the cost per DAU before committing to always-on AI features