The Agentic workflow provides a structured, phase-based approach to software development with AI assistance. Each phase builds on the previous one, creating a comprehensive trail of decisions and implementations.
Purpose: Understand the codebase and gather context for implementation.
Command: /research [ticket-file] [additional-context]
Process:
- Reads ticket requirements
- Spawns specialized agents to explore codebase
- Searches thoughts directory for historical context
- Synthesizes findings into a research document
Output: thoughts/research/YYYY-MM-DD_topic.md
Key Points:
- Always review research for accuracy
- Research is timestamped for temporal context
- Can be extended with follow-up questions
- Forms the foundation for planning
Purpose: Create detailed implementation specifications.
Command: /plan [ticket-file] [research-file]
Process:
- Analyzes ticket and research
- Explores codebase for patterns and constraints
- Develops phased implementation approach
- Defines success criteria
Output: thoughts/plans/descriptive-name.md
Key Points:
- Interactive process with user feedback
- Breaks work into manageable phases
- Includes both automated and manual verification
- Must resolve all questions before finalizing
Purpose: Execute the plan with code changes.
Command: /execute [plan-file]
Process:
- Reads complete plan
- Implements each phase sequentially
- Runs verification after each phase
- Updates progress checkmarks in plan
Key Points:
- Follows plan while adapting to reality
- Stops and asks when encountering mismatches
- Maintains forward momentum
- Verifies work at natural stopping points
Purpose: Create atomic, well-documented git commits.
Command: /commit
Process:
- Reviews all changes
- Analyzes purpose and impact
- Drafts meaningful commit message
- Creates git commit
Key Points:
- Focuses on "why" not just "what"
- Follows repository conventions
- Handles pre-commit hooks
- Never pushes automatically
Purpose: Validate implementation against plan.
Command: /review [plan-file]
Process:
- Compares implementation to plan
- Identifies any drift or deviations
- Verifies success criteria
- Documents findings
Output: thoughts/reviews/YYYY-MM-DD_review.md
Key Points:
- Ensures plan was followed correctly
- Documents any necessary deviations
- Validates both automated and manual criteria
- Provides closure for the ticket
Each phase should typically start fresh to:
- Maximize inference quality
- Reduce token usage
- Avoid context pollution
- Improve response speed
Agents automatically compress context by:
- Extracting only essential information
- Summarizing findings
- Focusing on actionable details
- Preserving file references
Ticket Created
↓
Research Phase → Research Document
↓
Planning Phase → Implementation Plan
↓
Implementation Phase → Code Changes
↓
Commit Phase → Git History
↓
Review Phase → Review Document
↓
Ticket Closed
Good tickets include:
- Clear problem statement
- Specific requirements
- Success criteria
- Relevant context
Don't skip reviews:
- Research: Verify findings are accurate
- Plan: Ensure approach is sound
- Implementation: Check code quality
- Commit: Review message accuracy
- Review: Confirm completeness
Each phase can be refined:
- Ask follow-up questions during research
- Request plan adjustments before implementation
- Fix issues during implementation
- Amend commits if needed
When implementation differs from plan:
- Stop and communicate the issue
- Document why the change was needed
- Update plan or get approval
- Include in review documentation
- Research existing patterns and architecture
- Plan with multiple implementation phases
- Implement incrementally with testing
- Commit with feature-focused message
- Review against requirements
- Research to understand root cause
- Plan minimal, targeted fix
- Implement with regression tests
- Commit with issue reference
- Review for completeness
- Research current implementation thoroughly
- Plan incremental, safe changes
- Implement with extensive testing
- Commit with clear rationale
- Review for behavior preservation
- Research bottlenecks and measurements
- Plan targeted improvements
- Implement with benchmarks
- Commit with performance data
- Review impact and trade-offs
- Run follow-up research commands
- Append to existing research document
- Update metadata and timestamps
- Stop implementation immediately
- Document the conflict clearly
- Get guidance before proceeding
- Update plan if needed
- Fix issues before proceeding
- Re-run verification
- Document any workarounds
- Include in review notes
- Can skip some phases if needed
- Document why process was shortened
- Return to full process when possible
- Create retroactive documentation
Each phase has quality requirements:
- Covers all relevant areas
- Includes specific file references
- Identifies patterns and constraints
- Answers ticket questions
- Phases are properly scoped
- Success criteria are measurable
- Approach follows patterns
- No unresolved questions
- Follows plan structure
- Tests pass
- Code follows conventions
- Changes are focused
- Message explains why
- Scope is appropriate
- Tests are included
- No sensitive data
- All criteria verified
- Deviations documented
- Completeness confirmed
- Lessons captured