Read the Rules

Your weekly impact email recommends this when your assistants run many checks but rarely ask Norma for your rules first. One instruction in your repository makes reading the rules the first step of every task.

What it does #

Norma gives your AI assistant the rules of your organisation before it writes a line of code. An assistant that knows the rules writes correct code at the first attempt, so a Live Check finds less to correct afterwards.

The assistant reads the rules with two Norma tools:

  • get_rulesets — finds the rulesets that apply to the repository, one per language or framework.
  • get_rules_for_ruleset — returns the rules of one ruleset, with the fix guidance for each rule.

When you’d use it #

Use it when your assistants check code often but write it without the rules in mind. Your weekly email suggests it when your team ran at least 50 checks in the week and asked for the rules less than 5 times for every 100 checks.

How to use it #

  1. Open the instruction file your editor reads, at the root of your repository:

    Editor File
    Claude Code CLAUDE.md
    Cursor a rule in .cursor/rules/
    VS Code (Copilot) .github/copilot-instructions.md
    Other editors AGENTS.md
  2. Add this text:

    ## Norma
    
    Before you write or change code:
    1. Call Norma's `get_rulesets` for this repository.
    2. Call `get_rules_for_ruleset` for every ruleset it returns. Do not skip any.
    3. Write the code with those rules in mind.
    
    After you create or change a file, run Norma's `live_check` on it and fix the issues it returns.
  3. Commit the file. Every developer’s assistant now reads the same instruction.

Limits & notes #

  • Your editor must be connected to Norma first.
  • The repository must be imported in Norma. For any other repository, the assistant gets no rules.
  • The next weekly email shows Last week’s advice worked under the recommendation when the requests for the rules per 100 checks go up.

Frequently asked questions #

Does reading the rules use my scan quota?
No. Reading the rules never touches your scan quota.

Do I need to repeat the instruction in every repository?
Yes. The instruction file belongs to the repository, so add it to each repository your team works on.

Related #

Was it helpful ?