Transform approved requirements into comprehensive technical design blueprints
The Plan phase converts approved requirements into actionable technical designs. The π Plan agent pairs with you to create architecture, sequencing, and validation strategies before implementation begins.
The Plan agent cycles through these stages iteratively:
1
Discovery
Research codebase for architectural patterns and constraints.Mandatory: Run #tool:agent/runSubagent with research instructions:
- Research the user's task comprehensively using read-only tools- Start with high-level code searches before reading specific files- Pay special attention to skills in .github/skills for best practices- Look for analogous existing features that can serve as implementation templates- Identify missing information, conflicting requirements, technical unknowns- DO NOT draft a full plan yet β focus on discovery, feasibility, and architecture signals
2
Alignment
Validate assumptions and confirm requirements stability.Use #tool:vscode/askQuestions to:
Confirm requirements are approved and stable
Surface discovered technical constraints and tradeoffs
Validate architectural approach
Present alternative approaches if applicable
Loop back to Discovery if answers significantly change scope.
## Technical Design: {Title (2-10 words)}{TL;DR - what will be built, why this architecture is recommended, and how implementation will proceed.}**Steps**1. DES-1: {Implementation step} (REQ-1, REQ-2) - {Architecture-first ordering} - {Note dependency: "depends on N" or "parallel with N"}2. DES-2: {Next step} (REQ-3)3. DES-3: {For 5+ steps, group into named phases}**Relevant files**- `{full/path/to/file}` β {what to modify/create/reuse} - {Reference specific functions/patterns and why}**Verification**1. {Specific verification steps: tests, commands, MCP tools}2. {Not generic statements β actionable validation}**Decisions**- {Decision, assumptions, and included/excluded scope}**Traceability**- DES-1 β REQ-1, REQ-2- DES-2 β REQ-3**Further Considerations**1. {Clarifying question with recommendation}
The Plan phase introduces DES-* identifiers that map to REQ-* from Phase 1:
# From Requirements (Phase 1)REQ-1: User can trigger export from workspace settingsREQ-2: System generates CSV with all workspace dataREQ-3: Export includes timestamp in filenameREQ-4: System validates data before export# Design Mapping (Phase 2)DES-1: CSV Export Service (REQ-2, REQ-3, REQ-4) DES-1.1: Data validation layer (REQ-4) DES-1.2: CSV generation with timestamp (REQ-2, REQ-3)DES-2: API Route Handler (REQ-1)DES-3: UI Integration (REQ-1)
This traceability ensures every design decision maps back to requirements.
**Steps**1. DES-1: Create data model changes2. DES-2: Implement repository layer (depends on DES-1)3. DES-3: Build API endpoints (depends on DES-2)4. DES-4.1: Add UI components (depends on DES-3) DES-4.2: Add state management (parallel with DES-4.1)5. DES-5: End-to-end validation (depends on DES-4.1, DES-4.2)
**Parallel Execution Groups**- Group A (parallel): DES-2.1, DES-2.2, DES-2.3 (independent services)- Group B (depends on Group A): DES-3 (API integration)- Group C (parallel): DES-4.1 (UI), DES-4.2 (docs)
- Research the user's task comprehensively using read-only tools.- Start with high-level code searches before reading specific files.- Pay special attention to instructions and skills made available by the developers to understand best practices and intended usage.- Look for analogous existing features that can serve as implementation templates β study how similar functionality already works end-to-end.- Identify missing information, conflicting requirements, technical unknowns, and design constraints.- DO NOT draft a full plan yet β focus on discovery, feasibility, and architecture signals.
β Run bun test web/lib/services/export.service.test.ts
β Test API with curl -X POST http://localhost:3000/api/export
β Verify CSV opens correctly in Excel
β Check permission denied for non-admin users
**Architectural Alternatives Considered**1. Approach A: Server-side generation (chosen) - Pros: No client resource limits, easier permission checks - Cons: Server load for large exports2. Approach B: Client-side generation - Pros: Offload processing to client - Cons: Data transfer overhead, permission complexity**Decision**: Approach A for v1; reconsider for v2 if server load becomes issue