| name | agent-workflow |
| description | Standard agent workflow pattern: explore→plan→code→verify→commit. Use when starting any coding task, feature implementation, or bug fix. Triggers: "workflow", "implement", "feature", "fix", "task".
|
| category | agent-patterns |
Skill: agent-workflow
What This Covers
The recommended workflow for all AI agents working on this codebase. Follows a five-phase pattern that ensures quality and verification.
Workflow Phases
1. Explore
Read files, understand patterns, identify affected modules.
ls -la src/ tests/ scripts/
grep -r "function" src/ --include='*.js'
cat src/utils/format.js
Key: Use subagents for investigation to keep main context clean.
2. Plan
Create a detailed implementation plan. Reference specific files, line numbers, and existing patterns.
## Implementation Plan
1. Modify `src/components/Button.js` (lines 45-60)
2. Add test in `tests/unit/button.test.js`
3. Update `DESIGN.md` with new token
4. Run `bash scripts/quality-gate.sh`
3. Code
Implement changes adhering to conventions. Write tests first where applicable.
bun vitest run
bun vitest run
4. Verify
Run quality gates. Fix any failures before proceeding.
bash scripts/quality-gate.sh
bash scripts/roast-scorer.sh
5. Commit
Use conventional commit format. Include test results in commit message.
git add .
git commit -m "feat: add new Button component with variants"
When to Skip Planning
For small, well-scoped tasks (typo fixes, variable renames, single-line changes), skip the plan phase and implement directly.
Verification Strategies
| Strategy | Example | Signal |
|---|
| Tests | bun vitest run | Pass/fail |
| Build | bun run build | Exit code |
| Lint | bash scripts/quality-gate.sh | Structured output |
| Screenshot | Visual comparison | Diff analysis |
Rules
- Always provide a check agents can run
- Clear context between unrelated tasks
- Use subagents for investigation
- Adversarial review before completion