Reflex — Pre-action verification for AI agents. A new file format (.reflex) that defines verification rules AI agents check before taking actions. Not an MCP server, not a skill, not a proxy.
Overview
Reflex is a new file format (.reflex) that defines verification rules that AI agents check BEFORE taking actions. Like human reflexes — automatic, protective, fast. AI agents fire actions directly into production with zero pre-checks. They write files, delete data, run commands, and make API calls — all without verifying first. One bad action can break everything. Reflex fixes this by giving AI agents a set of verification rules they check before every action. Like a bouncer at a club — every action goes through the bouncer first. - NOT an MCP server (no external process, no connection needed) - NOT a skill (not an MD file, not a procedure to follow) - NOT a proxy (doesn't intercept or modify tool calls) - NOT memory (doesn't store facts) - NOT a prompt (doesn't instruct the AI) Reflex is a that any AI tool can read and follow. No server, no plugin, no proxy. Just a file. 1. Place a .reflex file in your project root (or ~/.reflex globally) 2.
README
Reflex — Pre-Action Verification for AI Agents
What is Reflex?
Reflex is a new file format (.reflex) that defines verification rules that AI agents
check BEFORE taking actions. Like human reflexes — automatic, protective, fast.
Why Reflex?
AI agents fire actions directly into production with zero pre-checks. They write files, delete data, run commands, and make API calls — all without verifying first. One bad action can break everything.
Reflex fixes this by giving AI agents a set of verification rules they check before every action. Like a bouncer at a club — every action goes through the bouncer first.
What Reflex is NOT
- NOT an MCP server (no external process, no connection needed)
- NOT a skill (not an MD file, not a procedure to follow)
- NOT a proxy (doesn’t intercept or modify tool calls)
- NOT memory (doesn’t store facts)
- NOT a prompt (doesn’t instruct the AI)
Reflex is a new file format that any AI tool can read and follow. No server, no plugin, no proxy. Just a file.
How It Works
- Place a
.reflexfile in your project root (or~/.reflexglobally) - AI tool reads the file at startup (or when loading a project)
- Before each action, AI checks if any reflex triggers
- If triggered, AI runs the check and follows the action (allow/block/warn/ask)
- If not triggered, AI proceeds normally
Quick Start
Create a .reflex file in your project root:
# Prevent overwriting existing files
reflex prevent_overwrite
trigger: before_action
check: file_exists
condition: action is write_file
on_fail: allow
on_pass: ask_user
message: "This file already exists. Overwrite?"
# Block dangerous commands
reflex block_dangerous
trigger: before_action
check: custom "echo $COMMAND | grep -E 'rm -rf|drop table|delete from'"
on_pass: block
on_fail: allow
message: "Dangerous command detected. Blocked for safety."
# Require tests before commit
reflex require_tests
trigger: before_commit
check: tests_pass
on_pass: allow
on_fail: block
message: "Tests are failing. Fix them before committing."
Cross-Platform
Reflex works on ANY AI tool that can read files:
| AI Tool | How it reads .reflex |
|---|---|
| OpenCode | Plugin hooks (automatic) or skill (manual) |
| Claude Code | CLAUDE.md instruction (automatic) |
| Cursor | .cursorrules (automatic) |
| ChatGPT | Custom GPT instructions (manual) |
| Gemini CLI | Config file (automatic) |
| Kilo Code | Extension (automatic) |
| Any AI | Reads .reflex file as context (manual) |
File Format
See reflex-spec.md for the full specification.
Parser
- JavaScript/TypeScript: reflex-parser.js
- Python: reflex-parser.py
License
MIT
Install
This server does not publish a one-line install command.
Open the repository installation guide