Guide for spike-driven development methodology...
When building a railroad, the first spike establishes direction, validates the foundation, proves feasibility, and defines the repeatable pattern. In software, a spike ticket serves the same purpose: prove the approach works with ONE component before building everything.
Before building anything complex:
Create a spike ticket when:
For detailed decision criteria, see decision-criteria.md
Ask these questions about the upcoming work:
If YES to any ā Create a spike ticket first.
Keep it minimal:
Example scopes:
Follow this sequence strictly:
Step 1: Write Tests FIRST (1 hour)
func testModelCreation() { /* ... */ }
func testJSONDecoding() { /* ... */ }
func testRealDataLoading() { /* ... */ }
Run tests ā ā FAIL (expected - code doesn't exist)
Step 2: Implement Minimal Code (1-2 hours)
Step 3: Test with Real Data (1 hour)
Step 4: Document Findings (1 hour)
For detailed TDD flow, see spike-patterns.md
Success: Tests pass, architecture validated ā Close spike, proceed with main ticket using proven pattern
Partial Success: Tests pass but adjustments needed ā Document findings, adjust main ticket, possibly create follow-up spike
Failure: Tests fail, approach flawed ā Research alternatives, create new spike with different approach
All outcomes are wins - better to discover issues in 6 hours than 6 days.
Use the validated pattern to build the full feature with confidence:
Every spike should validate:
ā Starting without a spike when using new patterns ā Skipping tests - defeats the purpose of validation ā Using mock data only - doesn't catch real-world issues ā Scope creep - building more than ONE component ā Fear of throwing away code - spikes are proofs, not production ā Open-ended exploration - must have clear success criteria
For concrete examples (exercise library, API integration, database migration): ā See examples.md
For decision trees and risk analysis: ā See decision-criteria.md
For spike characteristics and TDD patterns: ā See spike-patterns.md
The time spent on a spike is time saved (10x) on the main feature.