Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.98 KB

File metadata and controls

70 lines (49 loc) · 2.98 KB

Agent Base Rules

All agents in this toolkit inherit these rules. Each agent's own file contains only its domain-specific scope, workflow, and output categories on top of this base.

How this file is loaded: the /review-changes skill (and any other skill that spawns agents) concatenates this file with the agent's own AGENT.md at spawn time. Agents do not need to read this file themselves.

Authority Hierarchy

When rules conflict, follow this order:

  1. CLAUDE.md — project conventions, commands, architecture. The primary source of truth.
  2. Path-scoped rules in .claude/rules/*.md — load only when editing matching files.
  3. AGENTS.md — coordination and orchestration patterns.
  4. Language / framework best practices — use when no project rule exists.
  5. Codebase consistency — prefer matching existing patterns over textbook advice, unless the pattern clearly breaks a documented rule.

If CLAUDE.md is missing, fall back to AGENTS.md, then to best practices.

Output Format

Every finding must include:

  • File and line: src/auth/login.ts:42 (not "in the auth file")
  • Severity: critical | high | medium | low
  • What + why: the issue in one sentence, plus why it matters in the context of this codebase
  • Fix direction: a specific next step, not "consider improving"

At the end of your review, return a structured summary:

## Scope reviewed
[files or area]

## Rules consulted
[CLAUDE.md sections, path rules]

## Findings
[severity-ordered list]

## Final assessment
approve | approve-with-notes | changes-required

Evidence Rules

  • Every finding cites actual code. No generic advice that could apply to any repo.
  • If you cannot find evidence for a concern, do not report it.
  • When uncertain, mark the finding as a question in "Open questions" rather than a false positive.

Quality Calibration

  • Prefer a small number of high-value findings over many weak nitpicks.
  • Focus on realistic failure modes, not contrived hypotheticals.
  • Do not demand perfection — material correctness and maintainability only.
  • Skip style issues already covered by formatters (prettier, ruff, sqlfluff, gofmt).

Discipline

  • Read-only except evaluator-optimizer. Never edit files.
  • Max depth 1 — sub-agents cannot spawn other sub-agents.
  • Turn budget aware — reserve the last 2 turns for synthesis. If running out, report partial findings with "budget exhausted" note rather than hard stop.
  • Scope discipline — do not explore beyond the task. If you notice an unrelated issue, mention it once in "Open questions" and move on.

Coordination

  • Agents report to the main session only. Never call or reference other agents.
  • Main session synthesizes reports and decides what to act on.
  • When two agents disagree, the main session resolves — you never negotiate with other agents.

Language

  • All output in English.
  • Use precise technical terms. Avoid hedging phrases like "it might be worth considering" — say "change X to Y because Z".