Skip to main content
Rule files are Markdown documents that define how Verdent behaves during coding sessions. They guide the AI agent’s behavior, output formatting, and adherence to project standards.

What You’ll Learn

  • Understanding user rules and project rules
  • When to use each rule type
  • Writing effective rules

Rule Types

Rule TypeFileScopePurpose
User Rulesuser_rules.mdGlobal (all projects)Personal coding preferences
Project RulesAGENTS.mdCurrent projectTeam conventions, project standards
Precedence: AGENTS.md (highest) → user_rules.md (medium) → defaults (lowest)

User Rules (user_rules.md)

User rules define global preferences that apply across all projects. Access: Settings → User Rules
  • Coding style: Indentation, naming conventions
  • Language: Response language preferences
  • Comments: Comment style and detail level
  • Communication: Tone and verbosity

Project Rules (AGENTS.md)

Project rules define standards specific to the current project. Store in the project root and commit to version control for team-wide sharing.
  • Team conventions: Shared coding standards
  • Architecture: Design patterns, state management
  • Testing: Coverage requirements, frameworks
  • Workflows: Build commands, PR guidelines
Share AGENTS.md with your team via version control to ensure consistent AI behavior across all team members.

Rule Precedence

When rules conflict, project rules override user rules:
user_rules.md: "Use 2-space indentation"
AGENTS.md: "Use 4-space indentation for this project"
→ Result: 4-space indentation (project rules win)

Writing Effective Rules

Be Specific:
# Good
- Use async/await for asynchronous operations
- Include JSDoc comments for exported functions

# Avoid
- Try to use modern JavaScript features
- Add comments when necessary
Best Practices:
  • Use clear, directive language (“Always…”, “Never…”, “Prefer…”)
  • Group related rules under section headers
  • Keep rules concise (one concept per bullet)
  • Review and update rules as project evolves

FAQs

Create user_rules.md for personal preferences and AGENTS.md in your project root for project-specific rules. Use plain Markdown with bullet points.
Rule changes apply immediately in new conversations and influence current conversation responses.
Project rules take precedence, but you can provide specific instructions in your prompt to override for a single request.

See Also