Create a task breakdown from a design document
Converts high-level design documents into actionable task breakdowns using the Last Responsible Moment principle. Use when planning features to defer implementation details until you have more context.
/plugin marketplace add dhruvbaldawa/ccconfigs/plugin install essentials@ccconfigsSPEC DOCUMENTDocument: $1
You are my project-planning assistant. Given a high-level feature or milestone description in the above document, produce an agile task breakdown following the Last Responsible Moment principle. Update the above document with this breakdown.
Defer decisions until you have enough information, but not so late that it blocks progress.
Tasks should provide:
Tasks should NOT specify:
Why: Implementation details become clearer as you work. Early decisions lock you into approaches that may not fit the reality you discover during development.
For every task you generate, include:
Iteration header – ### 🔄 **Iteration <n>: <Theme>**
Task header – #### Task <n>: <Concise Task Name>
Status – always start as Status: **Pending**
Goal – 1-2 sentences describing the purpose and outcome
Working Result – what is concretely "done" at the end (working code, passing test, validated integration)
Constraints – technical limitations, performance requirements, compatibility needs, existing patterns to follow
Dependencies – what this task assumes exists or depends on
Implementation Guidance – a fenced <guidance></guidance> block with:
NOT: step-by-step instructions or specific implementation choices
Validation – a checklist (- [ ]) of objective pass/fail checks (tests, scripts, CI runs, manual verifications)
Separate tasks and iterations with ---
#### Task 3: User Authentication
Status: **Pending**
**Goal**: Enable users to securely authenticate and maintain sessions across requests.
**Working Result**: Users can log in, their session persists, and protected routes verify authentication.
**Constraints**:
- Must integrate with existing Express middleware pattern (see src/middleware/)
- Session data should not exceed 4KB
- Authentication must work with existing PostgreSQL user table
**Dependencies**:
- User registration system (Task 2)
- Database connection pool configured
<guidance>
**Context**: The application uses session-based auth (not JWT) following the pattern in src/middleware/. Refer to existing middleware for consistency.
**Key Considerations**:
- Session storage: Choose between in-memory (simple, dev-only) vs. Redis (production). Decision can be deferred until Task 8 (deployment planning)
- Password hashing: Use established library (bcrypt/argon2), but specific choice depends on performance testing in Task 7
- Session duration: Start with reasonable default (24h), tune based on user feedback
**Risks**:
- Session fixation vulnerabilities
- Timing attacks on password comparison
- CSRF if not using proper token validation
**Questions to Resolve**:
- Should "remember me" functionality be included in this task or deferred?
- What's the session renewal strategy?
**Existing Patterns**: Review src/middleware/requestLogger.js for middleware structure.
</guidance>
**Validation**:
- [ ] Users can log in with valid credentials
- [ ] Invalid credentials are rejected
- [ ] Sessions persist across page reloads
- [ ] Protected routes redirect unauthenticated users
- [ ] Tests cover authentication success and failure cases
- [ ] No timing vulnerabilities in password comparison