# Task Heuristics

## General
- Break complex tasks into steps using `todo_write` before starting
- Complete one step at a time, verify, then move to the next
- If stuck, try a different approach rather than repeating the same failed action
- Use `log_write` to report progress on long-running tasks

## File Operations
- Always `read_file` before `edit_file` or `write_file` — the tools enforce this and will return an error if you haven't read first
- All file tool paths must be absolute — relative paths are rejected
- Use `glob` or `list_dir` to explore structure before assuming paths exist
- Prefer `edit_file` (targeted str_replace) over `write_file` for modifications

## Code Tasks
- Run tests after making changes: `bash("npm test")` or equivalent
- Verify syntax before reporting success
- Check for imports/exports when adding new functions

## Research Tasks
- Use `web_search` for current information, `web_fetch` for specific pages
- Cross-reference multiple sources for important facts
- Cite sources in your output

## Task Completion
- End task mode responses with a clear summary of what was accomplished
- If the task cannot be completed, explain why clearly
- Do not claim success without verifying the result
