π You are here: Main Guide β Examples β Troubleshooting & Pitfalls
- π Learn Process: Process Guide - Avoid pitfalls with systematic approach
- π¬ Better Communication: Prompting Best Practices - Prevent misunderstandings
- β‘ Implementation Issues: Execution Troubleshooting - Fix coding problems
- π Real Examples: Case Studies - Learn from actual failures
A comprehensive guide to avoiding common mistakes in spec-driven development and recovering when things go wrong.
The Problem:
# BAD EXAMPLE
- User should be able to manage their data
- System should be fast and reliable
- Interface should be user-friendlyWhy It Fails:
- No measurable criteria
- Subjective terms without definition
- Missing specific user actions
The Solution:
# GOOD EXAMPLE
**User Story:** As a registered user, I want to edit my profile information, so that I can keep my account details current.
#### Acceptance Criteria
1. WHEN a user clicks "Edit Profile" THEN the system SHALL display an editable form with current profile data
2. WHEN a user submits valid profile changes THEN the system SHALL save the changes within 2 seconds
3. WHEN a user enters invalid data THEN the system SHALL display specific error messages within the formRecovery Strategy:
- Review each requirement and ask "How would I test this?"
- Convert subjective terms to measurable criteria
- Add specific user actions and system responses
The Problem: Starting with "simple user login" and ending up with "complete user management system with roles, permissions, audit logging, and social authentication."
Why It Fails:
- Loses focus on core functionality
- Makes design phase overwhelming
- Creates unrealistic implementation timeline
The Solution:
- Define a clear boundary for the current spec
- Document "future enhancements" separately
- Use the "could/should/must" prioritization framework
Recovery Strategy:
## Current Spec Scope (MUST HAVE)
- Basic email/password authentication
- User session management
- Password reset functionality
## Future Enhancements (COULD HAVE)
- Social login integration
- Role-based permissions
- Audit loggingThe Problem: Only documenting the "happy path" scenarios.
Common Missing Cases:
- Network failures
- Invalid input handling
- Concurrent user actions
- System resource limitations
The Solution: For each requirement, explicitly consider:
- What happens when this fails?
- What are the boundary conditions?
- How should the system behave under stress?
The Problem:
# BAD EXAMPLE - Too Complex for Initial Implementation
## Architecture
- Microservices with event sourcing
- CQRS pattern implementation
- Distributed caching layer
- Message queue system
- API gateway with rate limitingWhy It Fails:
- Adds unnecessary complexity
- Makes implementation tasks overwhelming
- Increases chance of implementation failure
The Solution:
# GOOD EXAMPLE - Appropriate for Requirements
## Architecture
- Single service with clear module separation
- Direct database access with connection pooling
- RESTful API endpoints
- Simple authentication middlewareRecovery Strategy:
- Review each design decision against actual requirements
- Ask "What's the simplest solution that meets the requirements?"
- Document complex features as "future architectural evolution"
The Problem: Making design decisions without understanding:
- Available libraries and frameworks
- Performance characteristics
- Integration requirements
- Deployment constraints
Warning Signs:
- Design assumes capabilities that don't exist
- No consideration of technical limitations
- Missing integration details
The Solution:
- Research key technical decisions during design phase
- Validate assumptions with proof-of-concept code
- Document technical constraints and their impact
The Problem: Creating designs that are theoretically sound but practically difficult to implement.
Common Issues:
- Complex data relationships without clear implementation path
- Assumed libraries or services that don't exist
- Performance requirements without implementation strategy
Recovery Strategy:
- Review design with implementation feasibility in mind
- Break complex components into simpler, implementable pieces
- Add implementation notes for complex design decisions
The Problem:
# BAD EXAMPLE
- [ ] Implement user authentication system
- [ ] Create database layer
- [ ] Build API endpointsWhy It Fails:
- No clear completion criteria
- Too much work for single task
- Unclear dependencies
The Solution:
# GOOD EXAMPLE
- [ ] 1.1 Create User model with validation
- Implement User class with email, password fields
- Add email format validation
- Add password strength requirements
- Write unit tests for User model validation
- _Requirements: 1.2, 2.1_
- [ ] 1.2 Implement password hashing utilities
- Create password hashing function using bcrypt
- Create password verification function
- Write unit tests for password utilities
- _Requirements: 1.2, 3.1_Recovery Strategy:
- Break large tasks into 2-4 hour implementation chunks
- Add specific deliverables and test criteria
- Ensure each task has clear completion definition
The Problem: Tasks that can't be implemented because prerequisite work isn't complete.
Example:
- [ ] 2.1 Implement user login endpoint
- [ ] 2.2 Add authentication middleware
- [ ] 1.1 Create User model # Should come first!The Solution:
- Review task sequence for logical dependencies
- Ensure foundational components are implemented first
- Use task numbering that reflects implementation order
The Problem: All tasks focus on individual components without connecting them together.
Missing Elements:
- Integration between components
- End-to-end workflow testing
- System-level validation
The Solution: Always include integration tasks:
- [ ] 5.1 Integrate authentication with API endpoints
- [ ] 5.2 Create end-to-end user registration flow
- [ ] 5.3 Test complete login/logout workflowThe Problem: Moving from Requirements β Design β Tasks without user validation at each step.
Why It Fails:
- Compounds errors across phases
- User discovers issues too late to fix efficiently
- Implementation doesn't match user expectations
Recovery Strategy:
- Always get explicit approval before moving to next phase
- If issues are discovered later, return to the appropriate phase
- Don't try to fix fundamental issues during implementation
The Problem: Refusing to update requirements or design when implementation reveals issues.
Better Approach:
- Specs are living documents that can be updated
- Implementation insights should inform spec improvements
- Document changes and rationale for future reference
The Problem: Spending too much time perfecting requirements or design instead of moving forward.
Warning Signs:
- Multiple revisions without significant improvement
- Analysis paralysis on minor decisions
- Avoiding implementation phase
Recovery Strategy:
- Set time limits for each phase
- Aim for "good enough" rather than perfect
- Remember that implementation will reveal areas for improvement
Symptoms:
- Design phase reveals major gaps
- Requirements conflict with each other
- User feedback indicates misunderstanding
Recovery Steps:
- Stop current phase work
- Return to requirements with specific issues identified
- Focus revision on problem areas only
- Get explicit approval before proceeding
Symptoms:
- Tasks phase reveals implementation impossibility
- Design complexity far exceeds requirement complexity
- Missing critical system components
Recovery Steps:
- Identify specific design-requirement mismatches
- Revise design to address gaps
- Simplify over-engineered components
- Validate revised design against all requirements
Symptoms:
- Tasks require non-existent capabilities
- Task dependencies are circular or unclear
- Individual tasks are too large or vague
Recovery Steps:
- Review tasks against design and requirements
- Break down large tasks into implementable chunks
- Reorder tasks to respect dependencies
- Add missing integration and testing tasks
- Use EARS format consistently
- Include error cases and edge conditions
- Get specific examples for each requirement
- Validate requirements with potential users
- Research technical decisions during design
- Keep initial design simple and extensible
- Document assumptions and constraints
- Validate design against requirements frequently
- Ensure each task is 2-4 hours of work
- Include testing and integration tasks
- Sequence tasks by dependency order
- Reference specific requirements for each task
- Difficulty explaining requirements to others
- Design decisions made without research
- Tasks that seem overwhelming or unclear
- Resistance to moving between phases
- Multiple failed attempts at same phase
- Growing complexity without added value
- Implementation consistently failing
- User confusion about spec content
Sometimes the best recovery strategy is to restart with lessons learned:
Consider Restarting When:
- Fundamental misunderstanding of user needs
- Technical approach is completely wrong
- Spec has become too complex to follow
- More time spent on fixes than forward progress
How to Restart Effectively:
- Document lessons learned from failed attempt
- Identify the root cause of failure
- Start with simplified scope
- Apply prevention strategies from the beginning