mcpField
R
RuleDrift

RuleDrift

Local
github.com/ri7inAI & Agents0Updated 11w ago

About RuleDrift

RuleDrift is a local test suite for checking whether AI agents keep following critical instructions as conversations grow. It is for developers testing changes to prompts, models, memory systems, or agent workflows.

Key features

  1. 01Finds the first point where a rule fails
  2. 02Terminal, JSON, and JUnit reports
  3. 03Local Ollama and custom-agent support
  4. 04Stable exit codes for CI
  5. 05Optional MCP tools for coding clients

Use cases

  1. 01Test instruction retention after prompt changes
  2. 02Check agent behavior across long conversations
  3. 03Run rule checks in CI

MCP support

RuleDrift provides optional MCP tools for AI coding clients. Start the MCP server with `npx -y rule-drift mcp --root /path/to/your/project`.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"ri7in-rule-drift": {
"command": "npx",
"args": [
"-y",
"rule-drift"
]
}
}
}
Run commandnpx -y rule-drift

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmrule-drift0.1.1

Tools

2

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
configPathstringNoConfiguration path inside the MCP workspace root.

Details

From the project README
RuleDrift logo

RuleDrift

Catch the moment your agent drifts from its rules.

RuleDrift tests whether an AI agent still follows important instructions after a conversation becomes long or distracting.

Run it like a test suite when you change a prompt, model, memory system, or agent workflow. It runs locally and does not sit in front of production requests.

Quick start

Requires Node.js 22+ and Ollama.

ollama pull qwen3:1.7b
npx rule-drift init
npx rule-drift test

No paid model API, account, backend, or telemetry is required.

What you get

  • The first conversation point where a rule fails
  • Terminal, JSON, and JUnit reports
  • Local Ollama and bring-your-own-agent support
  • Optional MCP tools for AI coding clients
  • Stable exit codes for CI

MCP

npx -y rule-drift mcp --root /path/to/your/project

See the MCP setup guide for client configuration and safety details.

Documentation

Contributions are welcome—see CONTRIBUTING.md. Licensed under MIT.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.