Why Create Rules
You Know Your Standards
Every team has conventions. Maybe you:- Always use a specific logging library
- Follow particular naming conventions
- Have standard patterns for error handling
- Require certain testing approaches
Consistent Output
Without rules, makes reasonable choices—but they might not be your choices. Rules ensure:- All generated code follows your patterns
- The same standard applies across every milestone
- You don’t have to fix the same issue repeatedly
Prevent Repeated Mistakes
If you review a milestone PR and notice something wrong, ask: “Will this happen again?” If yes, create a rule. The next milestone—and all after—will follow it.When to Create Rules
Create a rule when you:- Know exactly what you want — You have a specific requirement, not a vague preference
- See a pattern emerging — The same issue appears across milestones
- Have company standards — Your team has documented conventions
- Need specific library usage — You want to use particular dependencies
Rule Examples
Coding Conventions
Library Preferences
Testing Requirements
Error Handling
Architecture Patterns
Specific Avoidances
Creating a Rule
- In your project, find the Rules section in the left sidebar
- Click the + button
- Enter a Title — A short description (e.g., “Python naming conventions”)
- Enter a Description — When this rule applies
- Write the Rule Content — The specific instructions
- Click Save
Writing Effective Rules
Be Specific Instead of: “Write clean code” Write: “Functions should do one thing. If a function exceeds 20 lines, consider splitting it.” Be Actionable Instead of: “Use good error handling” Write: “Wrap external API calls in try-except blocks. Log the error with full context. Re-raise as a custom DomainException.” Provide Examples When HelpfulHow Rules Are Applied
Rules are included in the context for every task in every milestone. When generates code:- It reads all active rules for your project
- It applies them alongside the milestone-specific instructions
- Generated code reflects both the milestone goal and your rules
Managing Rules
Viewing Rules
Click on any rule in the Rules section to view its full content.Editing Rules
- Click on a rule
- Modify the title, description, or content
- Save your changes
Deleting Rules
- Hover over a rule
- Click the delete icon (×)
- Confirm deletion
Best Practices
Start Focused
Don’t try to create 20 rules upfront. Start with:- Your most important coding conventions
- Critical library or framework requirements
- Any non-negotiable patterns
Review Rule Effectiveness
After a few milestones, check:- Are the rules being followed?
- Are they too vague (and being ignored)?
- Are they too strict (and causing issues)?
Keep Rules Maintainable
Many specific rules are better than one giant rule. Separate concerns:- One rule for naming conventions
- One rule for error handling
- One rule for testing patterns
Rules vs. Instructions
| Instructions | Rules |
|---|---|
| Define the overall migration goal | Define recurring standards |
| Approved once, apply to entire project | Can be added/modified anytime |
| Describe what to migrate | Describe how to write code |
| Set at project start | Added as you learn what you need |