YOU MUST:
- Parse what exactly is being asked
- Identify if this is a feature (use feature.md) or fix (use fix.md)
- If neither, continue with this workflow
- Break down into specific, measurable subtasks
- Identify what success looks like
REQUIRED RESEARCH - USE ALL AVAILABLE TOOLS:
- Use
package_docs_search
for any packages involved - Check existing usage rules via
get_usage_rules
MCP tool or CLAUDE.md links - Check existing code patterns with grep/glob
- Verify Ash-specific requirements
- Look for similar implementations
- Review any applicable existing usage rules for packages involved
- Understand the full context
YOU MUST:
- Use TodoWrite to create specific subtasks
- Order tasks by dependency
- Include verification steps
- Add "Ask Zach for confirmation" as final task
EXAMPLE TODO STRUCTURE:
1. Research [specific thing] in docs
2. Check existing [pattern] in codebase
3. Implement [specific change]
4. Test/verify [specific behavior]
5. Ask Zach for confirmation
FOR EACH TODO ITEM:
- Mark as "in_progress" when starting
- Execute the specific task
- Verify it worked as expected
- Document any issues or discoveries
- Mark as "completed" when done
- Report status before moving to next
ALWAYS:
- Check for generators before writing code
- Use
project_eval
to test code snippets - Follow existing patterns exactly
- Use Ash concepts, not Ecto
- Compile after changes
- Run relevant tests
AFTER EACH CHANGE:
- Check compilation status
- Look for warnings/errors
- Test the specific functionality
- Ensure no regressions
- Update user on progress
REQUIRED CHECKS:
- All todos completed
- Code compiles cleanly
- Tests pass (if applicable)
- Functionality works as requested
- No security issues introduced
PRESENT TO USER:
Task completed. Here's what was done:
1. [Specific thing 1]
2. [Specific thing 2]
3. [etc.]
[Any issues or notes]
Should I make any adjustments?
WHEN ASKED TO EXPLAIN/EXPLORE CODE:
- Use grep/glob to find relevant files
- Read files systematically
- Use
project_eval
to explore runtime behavior - Explain findings clearly
- Reference specific files and line numbers
WHEN ASKED TO REFACTOR:
- Understand current implementation fully
- Research best practices in docs
- Create incremental refactoring plan
- Test after each change
- Ensure behavior unchanged
WHEN ASKED TO DOCUMENT:
- Only create docs if EXPLICITLY requested
- Follow existing documentation patterns
- Focus on "why" not just "what"
- Include examples where helpful
- Keep concise and clear
WHEN ASKED TO OPTIMIZE:
- Measure current performance first
- Identify specific bottlenecks
- Research Ash-specific optimizations
- Apply minimal changes
- Measure improvement
- NO ASSUMPTIONS - Research everything
- NO COMMITS - Unless told "commit this"
- ASH FIRST - Always use Ash patterns
- TEST EVERYTHING - Verify all changes work
- ASK WHEN UNSURE - Better to clarify than guess
- REPORT PROGRESS - Keep user informed
- MINIMAL CHANGES - Don't over-engineer
STOP AND ASK FOR HELP IF:
- Task seems to require breaking the rules
- You're unsure about security implications
- The approach might affect system stability
- You need to modify critical system files
- The task specification is ambiguous