| name | plan-and-implement |
| description | Systematically plans and implements features through investigation, clarification, implementation, testing, and documentation. Use when user requests to "plan and implement", "plan & implement", or "plan and build" a feature or change. |
Plan and Implement
Execute a structured workflow to plan and implement features systematically.
Workflow
1. Context Gathering
- Check
.agent/for project docs (prd.md, file-map.md) - Warn if missing but allow user to proceed
- Review existing project context
2. Investigation
- Use Task tool (Explore agent) to discover existing related functionality
- Identify prerequisites already implemented
- Note architecture patterns and testing tools
3. Clarification
- Use AskUserQuestion for ambiguities:
- Feature intent and scope
- Technical decisions (provide options + recommendation)
- Missing requirements
- Iterate investigation and questions until confident
4. Planning
- Create TodoWrite task list breaking down implementation
- Get implicit approval by presenting plan
5. Implementation
- Execute todo list, updating status in real-time
- Follow existing code patterns
6. Testing
- Run tests using project's testing tools
- Never modify test suites
- For failures: fix code OR document why test needs updating
- Track all failing tests with justification
7. Documentation
- Update
.agent/file-map.mdusing update-file-map skill
8. Commit
Include in message:
- Brief change summary
- Manual testing steps
- Any failing tests with reasons
Key Rules
- Always use TodoWrite for progress tracking
- Never skip clarification if ambiguous
- Preserve test suites unchanged
- Follow project conventions