Skip to main content

Open Custom Instructions

  • Navigate to Refacto → Settings → Custom Instructions.
  • You’ll see two tabs:
    • PR Review – controls how the AI analyzes pull requests.
    • Custom Instructions – lets you define rules and coding standards using YAML.

Choose How to Start

You can begin in two ways:
  • Load Example & Get Started – creates a sample YAML with one org rule and two repo rules.
  • Start from Scratch – starts with an empty config.

Edit the Template

When you load the example, a YAML editor opens with three prefilled blocks (1 org, 2 repo-specific).You can click Add Repository to insert a new block.
FieldDescriptionExample
match.pathsRegex to match file pathssrc/java*
match.extensionsFile extensions to include.ts, .js
instructionsThe actual review rule text"All PRs must include unit tests."
Only the content under instructions counts toward the 500-character limit per block.

Submit for Review

Below the editor, you’ll find a summary table showing:
  • Character usage per block
  • Status (No Status, Approved, In Review, Rejected)
  • Rejection reason (if any)
Select blocks to send for approval and click Submit & Apply.
StatusMeaning
No statusNot yet submitted
In ReviewUnder validation (usually a few days)
ApprovedInstructions are active
RejectedInvalid or security violation (reason shown)

Verify Rules in PRs

When Refacto reviews a PR, it posts a summary comment with:
  • Applied Instructions – which rules were used
  • Unapplied Instructions – skipped rules and reasons (e.g., repo mismatch)
Once approved, your rules automatically apply to all matching PRs across the organization.
I