Free extension

AI Rulebook

One set of engineering rules for every AI coding agent on your project, managed from a sidebar in your editor.

Quick open
ext install WyvernSystemsLLC.ai-rulebook
  • PriceFree
  • LicenseMIT
  • Works in6 editors
  • WritesAGENTS.md, CLAUDE.md

Overview

AI coding agents are fast, but without guidance they drift: they touch code nobody asked them to change, skip the tests, and leave the docs out of date. AI Rulebook gives them a short, consistent set of engineering rules to follow in every session.

The rules live in your project's AGENTS.md, the shared instructions file read by Cursor, Cline, opencode, Windsurf, and supported GitHub Copilot features. Claude Code picks them up through a one-line @AGENTS.md import in CLAUDE.md. Commit both files and every teammate and every tool works from the same rules, with nothing extra to install.

A sidebar lets you turn each rule on or off. Every toggle edits that rule's section of AGENTS.md in place, and anything you wrote outside the managed block stays exactly as you left it.

AGENTS.md
<!-- ai-rulebook:start -->
<!-- Managed by the AI Rulebook extension. ... -->
<!-- ai-rulebook:rule scope enabled -->

## Scope

- Change only what the task requires. ...

<!-- ai-rulebook:end-rule scope -->

<!-- ai-rulebook:rule git disabled -->
<!-- ai-rulebook:end-rule git -->
<!-- ai-rulebook:end -->
The rule pack is one managed block. Text outside the markers is yours.

Features

  • One file for every agent

    Rules are written to AGENTS.md, so Cursor, Cline, opencode, Windsurf, GitHub Copilot, and Claude Code all read the same instructions.

  • Toggle rules one by one

    Sidebar checkboxes turn each rule on or off, and a status bar item such as AI 6/7 shows how many are active, plus the agent mode.

  • Respects your existing file

    Only the block between its markers is managed. Your own text is preserved, and a block with damaged markers is never overwritten.

  • Knows your test command

    The Tests rule names your real command, detected from npm, pnpm, yarn, bun, Cargo, Go, pytest, or a Makefile.

  • Installs itself where it's needed

    Projects that already use an AI agent, and every project in Cursor or with Cline installed, get the rule pack automatically on open. Turn that off with a single setting.

  • Optional agent modes

    Both off by default, one at a time: token-efficient subagent mode delegates searches, edits, and check runs to cheaper subagents, and fast parallel agent mode splits work into parallel units for speed at a higher token cost. Pick one with Select agent mode.

The seven rules

Scope
Keep changes in scope, fix small defects found along the way, refactor hard-to-change code first, and end with a fixed report: Changed, Also fixed, Checks, Not done.
Code
Reuse existing helpers, validate input where it enters, never log or commit secrets, keep error causes, and vet dependencies.
Tests
Test observable behavior, add regression tests for bugs, test only changed code and its dependents while iterating, run the full suite before a release, and report results accurately.
Docs
Update documentation the change made inaccurate, write densely, put new docs in the docs folder, keep requirements per feature with stable IDs, and add user-facing release notes.
Markdown
One H1, no skipped heading levels, language-tagged code fences, and relative links.
Git
Preserve existing work, never commit or push unless asked, stage only your own changes, and never rewrite pushed history unless you name the operation.
Review
Only when you ask for a full code review: checks unpushed changes for bugs, security, dead code, duplication, tests, and docs, fixes as it goes, flags licensing concerns, runs the checks, then commits and pushes without force-pushing.

Get started

  1. Install the extension

    Search for AI Rulebook in the Extensions panel, or install it from the VS Marketplace or Open VSX.

  2. Open your project

    If the project already uses an AI agent, or you use Cursor or Cline, the rule pack installs automatically. Otherwise run “AI Rulebook: Install / update rule pack” from the Command Palette.

  3. Choose your rules

    Use the AI Rulebook sidebar to switch individual rules on or off.

  4. Commit AGENTS.md and CLAUDE.md

    Teammates and terminal tools such as Claude Code and opencode then get the same rules without installing anything.

Works with

Runs in

  • VS Code
  • Cursor
  • Windsurf
  • VSCodium
  • code-server / OpenVSCode Server
  • Eclipse Theia

Rules are read by

  • Cursor
  • Claude Code
  • GitHub Copilot
  • Cline
  • opencode
  • Windsurf

Questions

Do I need the extension to use the rules?

No. Every GitHub release since 4.0.0, including the latest, includes a standalone AGENTS.md. Copy it into your project root and replace the placeholder test command with your own.

Will it overwrite my existing AGENTS.md?

No. It adds or updates one block between its own markers and leaves everything else in the file alone. If those markers are damaged, it stops rather than guess.

Does it work with Claude Code?

Yes. Claude Code reads CLAUDE.md, so the extension adds a single @AGENTS.md import line there. Your existing CLAUDE.md instructions are kept.

Do the rules guarantee an agent follows them?

No. Rules are instructions, not enforcement. Agents can still miss them, especially late in long sessions, so restate the rule that matters when that happens.

Can I stop it from installing automatically?

Yes. Set aiRules.autoInstallOnOpenWorkspace to false in your settings. Removing the rule pack does not turn auto-install off, so set this too if you want it to stay removed.

More free products