SDD Document Structure
The four document types in the SDD pipeline and what each one contains.
Syntax
design-and-specify
// User Story → Use Case → Design Doc → Task ListExample
design-and-specify
// SDD PIPELINE: 4 DOCUMENT TYPES
// DOCUMENT 1: User Story
// What: The requirement in user language
// Contains: Role, goal, benefit, acceptance criteria
// Audience: Product owner, developer, AI agent
// DOCUMENT 2: Use Case
// What: Actor-system interaction detail
// Contains: Actor, preconditions, main flow, exceptions, postconditions
// Audience: Developer, QA, AI agent
// DOCUMENT 3: Design Document
// What: Technical implementation design
// Contains:
// - Component architecture diagram (text or visual)
// - Data models and schema changes
// - API endpoints (method, path, request/response)
// - State management approach
// - Third-party integrations
// - Security considerations
// Audience: Senior developer, AI agent
// DOCUMENT 4: Task List (Implementation Tasks)
// What: Atomic units of work for AI execution
// Format: Ordered list, each task ≤ 1 AI session
// Example task list for "Add Password Reset":
//
// Task 1: Create /api/auth/forgot-password endpoint
// Task 2: Add password_reset_tokens database table
// Task 3: Implement email send with reset link
// Task 4: Create /reset-password page with token validation
// Task 5: Implement token expiry and single-use logic
// Task 6: Write unit tests for token validation
// Task 7: Add rate limiting to forgot-password endpoint
// KEY RULE: Each task must be completable without human intervention
// AI reads: task description + design doc + existing codebase context