📋 Custom Coding Rules

Define custom rules and guidelines that AI follows for consistent code quality

What Are Custom Rules?

Custom rules are guidelines you define that tell the AI how to write code for your project. They ensure consistency across your codebase and enforce your team's standards.

How to Create Rules

  1. 1. Open the HalCode sidebar
  2. 2. Click Settings (⚙️)
  3. 3. Click "Custom Rules"
  4. 4. Click "Add Rule"
  5. 5. Enter your rule description
  6. 6. Save and start using!

Example Rules

✓ Naming Conventions

"Use camelCase for variables and functions, PascalCase for classes and components"

✓ Code Style

"Always use const instead of let or var. Use arrow functions for callbacks"

✓ Documentation

"Add JSDoc comments to all public functions. Include @param and @returns"

✓ Testing

"Write unit tests for all business logic. Aim for 80% code coverage"

✓ Performance

"Avoid nested loops. Use memoization for expensive computations"

Best Practices

  • ✓ Be specific and clear in your rules
  • ✓ Include examples when possible
  • ✓ Keep rules focused on one topic
  • ✓ Review and update rules regularly
  • ✓ Share rules with your team

Use Cases

  • ✓ Enforce team coding standards
  • ✓ Maintain consistent code style
  • ✓ Ensure security best practices
  • ✓ Improve code quality
  • ✓ Onboard new team members

💡 Pro Feature: Custom rules require a Pro subscription. Get a 7-day free trial!