Introduction
Welcome to Prism Context Engine.
New to Prism? Start with Quick Start. You need no account to run the CLI.
What is Prism Context Engine?
Prism Context Engine is a rules layer for AI coding assistants. You write rules in a JSON file in your repo. Prism checks every write your agent makes against those rules and sends corrections back to the agent.
The problem
AI coding assistants do not know your project’s conventions:
You: "Create a login form"
AI: generates a component that ignores your design tokens and naming rules
You: correct it
AI: fixes one file, breaks the convention in the nextThe solution
Prism turns your conventions into machine-checked rules. A hook inside your agent runs prism check on every write. A block-severity violation halts the agent with a correction message; the agent fixes the file and continues.
How it works
Step 1: Install the CLI
npm install -g @prism-engine/cliRequires Node.js 20 or newer. The binary is prism.
Step 2: Run prism init
prism init scans your project (package.json, globals.css, Tailwind config), writes .prism/rules.json, and wires the enforcement hooks into .claude/settings.json (plus Cursor and Antigravity hook files when present). No network calls, no account.
Step 3: The hook checks every write
The hook command is:
npx @prism-engine/cli check --hook --format claude-codeIt reads the agent’s tool event from stdin. On a blocking violation it exits with code 2 and prints a correction; the agent reads it and fixes the file.
Step 4 (optional): Connect the dashboard
prism login and prism pull sync rules from the hosted dashboard at prism.syntaxure.dev . The local path keeps working without it.
Key features
Local rules (.prism/rules.json)
Seven check types: forbidden patterns, required tokens, banned imports, and more
Agent hooks
Claude Code, Cursor, and Antigravity hooks; MCP for VS Code, Windsurf, Claude Desktop
CLI reference
Every command verified against the source
Dashboard (optional)
Projects, rules, brand profiles, and export
Supported agents and editors
| Editor / agent | Hook enforcement | MCP |
|---|---|---|
| Claude Code | Yes — PreToolUse, PostToolUse, Stop | — |
| Cursor | Yes — afterFileEdit hook (config verified; in-agent firing unverified) | Yes — prism ide-setup |
| Antigravity | Yes — PostToolUse hook (config verified; in-agent firing unverified) | — |
| Windsurf | — | Yes — prism ide-setup |
| VS Code | — | Yes — prism ide-setup (marketplace extension for full support) |
| Claude Desktop | — (no hooks system; MCP advisory only) | Yes — prism ide-setup |
Architecture
Prism is local-first. The check runs on your machine against a local rules file:
┌──────────────────────────────────────────────┐
│ Your project │
│ .prism/rules.json (rules, version 1) │
│ .prism/activity.log (check history) │
│ .claude/settings.json (hook wiring) │
└──────────────────────┬───────────────────────┘
│ prism check --hook
▼
┌──────────────────────────────────────────────┐
│ Rule engine (regex + structural checks, │
│ optional Gemini semantic layer) │
└──────────────────────┬───────────────────────┘
│ optional: prism login / pull
▼
┌──────────────────────────────────────────────┐
│ Dashboard — prism.syntaxure.dev │
│ Deployed on Vercel, Supabase backend │
└──────────────────────────────────────────────┘The optional semantic layer (Gemini) only runs when you set PRISM_GEMINI_CHECK=1 and provide a GEMINI_API_KEY or GOOGLE_GEMINI_API_KEY. It fails open.
Next Steps
Current Version: 1.2.0 Built by: Syntaxure Labs