Task Refinement
Learn how to use AI-powered task refinement to transform simple descriptions into high-quality, actionable prompts.
What is Task Refinement?
Task refinement uses AI to enhance your task descriptions. A simple idea like "add user authentication" becomes a detailed specification with:
- Clear objectives
- Acceptance criteria
- Scope boundaries
- Implementation guidance
Using the Refine Button
- Create or open a task
- Click the Refine button
- Wait for AI processing (usually 5-10 seconds)
- Review the enhanced description
- Edit if needed, then save
Before and After
Before Refinement
Add dark mode to the app
After Refinement
## Objective
Implement a dark mode theme toggle that allows users to switch between light and dark color schemes.
## Requirements
- Add a theme toggle button in the header/navigation
- Implement dark color palette using CSS custom properties
- Persist user preference in localStorage
- Respect system preference (prefers-color-scheme) by default
- Ensure smooth transition between themes
## Acceptance Criteria
- [ ] Toggle button switches between light/dark modes
- [ ] Theme preference persists across sessions
- [ ] All components render correctly in both themes
- [ ] Transitions are smooth (no flash of wrong theme)
- [ ] System preference is respected on first visit
## Out of Scope
- Multiple theme options (only light/dark)
- Per-page theme settings
- Theme scheduling
How It Works
The refinement process:
- Analyzes your input: Understands intent and context
- Adds structure: Organizes into sections
- Expands details: Adds missing requirements
- Defines boundaries: Sets clear scope
- Creates checklist: Measurable acceptance criteria
Best Practices
Provide Context
More context leads to better refinement:
# Less context (okay)
Add search
# More context (better)
Add search to find products by name and description
Review and Edit
Always review refined descriptions:
- Remove irrelevant suggestions
- Add project-specific requirements
- Adjust scope as needed
Iterative Refinement
You can refine multiple times:
- Start with a rough idea
- Refine once for structure
- Add your own details
- Refine again for polish
How It's Implemented
Task refinement uses Claude Code CLI with the Haiku model for fast, cost-effective processing:
- Model: Haiku (optimized for speed)
- Timeout: 60 seconds
- Output format: Markdown with structured sections
The refinement prompt instructs the AI to:
- Output only the refined task (no conversational text)
- Add clear title and objective
- Include acceptance criteria
- Define appropriate scope
Troubleshooting
Refinement Takes Too Long
- Check AI agent availability
- Try refreshing and retrying
- Check network connectivity
Output Quality Issues
- Provide more input context
- Try refining again
- Manually edit the output