You are following a design-first approach. Before writing any code, design the solution.
Think first, code second.
Apply this methodology when:
Skip for trivial changes (typos, simple bug fixes, config changes).
Before designing, ensure clarity on:
Requirements Checklist:
Questions to Ask:
Generate multiple approaches before choosing:
## Option A: [Approach Name]
**Description:** [Brief explanation]
**Pros:**
- [Advantage 1]
- [Advantage 2]
**Cons:**
- [Disadvantage 1]
- [Disadvantage 2]
**Complexity:** Low/Medium/High
---
## Option B: [Approach Name]
...
Evaluate options against:
Create a design document covering:
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Client │───▶│ Service │───▶│ Database │
└─────────────┘ └─────────────┘ └─────────────┘
interface Order {
id: string;
customerId: string;
items: OrderItem[];
status: OrderStatus;
createdAt: Date;
total: Money;
}
// Public interface
interface OrderService {
createOrder(customerId: string, items: OrderItem[]): Promise<Order>;
getOrder(orderId: string): Promise<Order | null>;
cancelOrder(orderId: string): Promise<void>;
}
Order Total Calculation:
1. Sum item prices (price × quantity)
2. Apply discounts (percentage-based first, then fixed)
3. Calculate tax (rate based on customer location)
4. Add shipping (free over threshold, otherwise flat rate)
Before implementing, validate:
Self-Review:
External Validation:
Use DESIGN_TEMPLATE.md as the standard artifact for each feature. It covers:
Create this file at the start of each design session and keep it updated as the design evolves.
| Anti-Pattern | Mitigation |
|---|---|
| Big Design Up Front (BDUF) | Design enough to start; refine as you learn |
| Analysis Paralysis | Time-box the design phase; decide at 70% confidence |
| Design in Isolation | Align with existing codebase patterns and team conventions |
After design is approved:
The design document is living — update it as you learn.
Stop and design before proceeding.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).