Development Workflow
Core Principle
code
Investigate → Plan → Implement → Test → Validate → Commit
Never skip steps. The most common failures come from implementing without understanding.
Quick Reference
| Task | Command | Subagent |
|---|---|---|
| Create plan | /plan | - |
| Fix a bug | /fix | @investigator |
| Validate changes | /validate | - |
| Code review | /review | @code-reviewer |
| Write tests | - | @test-writer |
| Update docs | - | @doc-writer |
Workflow by Task Type
Bug Fix
- •Delegate to
@investigatorfor root cause analysis - •
/planthe fix with TLDR - •Implement on feature branch
- •
/validateall changes - •Commit with
fix(scope): description
New Feature
- •
/planwith requirements breakdown - •Implement incrementally
- •Delegate
@test-writerfor coverage - •
/reviewbefore completion - •
/validateand commit
Refactoring
- •Ensure tests exist first (delegate
@test-writerif not) - •
/planthe refactoring approach - •Make small, incremental changes
- •Run tests after each change
- •
/validatebehavior unchanged
Code Quality Standards
DRY (Don't Repeat Yourself)
- •Extract to function when pattern appears 3+ times
- •Create shared utilities for cross-module patterns
- •Use constants for magic numbers/strings
SOLID Principles
- •Single Responsibility: One function = one purpose
- •Open/Closed: Extend behavior without modifying existing code
- •Liskov Substitution: Subtypes must be substitutable
- •Interface Segregation: Small, focused interfaces
- •Dependency Inversion: Depend on abstractions
Error Handling
code
- Handle ALL error cases explicitly - Fail fast with clear error messages - Log errors with context for debugging - Don't swallow exceptions silently
Git Commit Format
code
type(scope): brief description - Detail about what changed - Why it was changed - Any breaking changes
Types: feat, fix, refactor, docs, test, chore, perf
Context Management
When to /compact
- •After completing a major milestone
- •Before starting unrelated work
- •When context exceeds ~50% (feeling sluggish)
- •After 15+ tool calls in a session
When to Delegate to Subagents
- •Independent analysis tasks
- •Parallel work opportunities
- •Specialized reviews (security, docs)
- •Tasks that would clutter main context
Response Format
TLDR (Always Include for Plans)
code
## TLDR - **Problem**: [one sentence] - **Solution**: [one sentence] - **Steps**: [3-7 items] - **Validation**: [how we verify]
Completion Report
code
## Complete ### Summary [What was done] ### Validation - Tests: ✅/❌ - Lint: ✅/❌ - Environment: ✅/❌ ### Commit [hash and message]
Anti-Patterns (Never Do These)
❌ Implement without investigating first ❌ Fix symptoms instead of root causes ❌ Skip validation ("it should work") ❌ Mark complete before tests pass ❌ Leave TODO placeholders in plans ❌ Make assumptions without verification ❌ Edit directly on main/master branch