You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creates .cursor/rules/speclock.mdc — a Cursor-native rules file that Cursor's agent reads on every turn
Registers the SpecLock MCP server in Cursor's MCP config (Cursor 0.42+)
Configures Cursor to call speclock_session_briefing at session start
Expected output:
Installing SpecLock for Cursor...
Created .cursor/rules/speclock.mdc
Updated ~/.cursor/mcp.json
51 MCP tools registered
Done. Restart Cursor to load the new rules.
SpecLock generates an .mdc file that follows Cursor's rule format:
---
description: SpecLock enforcement rules for this repo
globs: ["**/*"]
alwaysApply: true
---
# SpecLock-enforced constraints
Before making changes, call speclock_check_conflict to verify
against the repo's lock registry.
Locked constraints (do not violate without explicit user override):
1. Never remove the rate limiter middleware from api/middleware/
2. Always use the repository pattern for DB access
3. Minimal diffs only — no speculative refactors
...
The rules listed in this file are auto-generated from your CLAUDE.md + .cursorrules. Don't edit it by hand — run npx speclock sync-rules after updating either source file and SpecLock will regenerate it.
Cursor-specific gotchas
Rules not loading — Cursor loads .mdc files only when alwaysApply: true is set OR the glob matches the current file. SpecLock sets alwaysApply: true by default.
MCP not registering — Requires Cursor 0.42 or later. Check Cursor > Settings > MCP and verify speclock shows as connected (green dot).
Rules conflict with your existing .cursorrules — Run npx speclock sync-rules --dry-run to see the merged output before writing.
Next steps
Once SpecLock is running in Cursor, try:
npx speclock audit --semantic
This runs a full semantic audit on your working tree and tells you if Cursor (or anyone) has drifted from the rules since the last checkpoint.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Tutorial: Setting up SpecLock with Cursor
Same idea as the Claude Code setup but for Cursor users. Three commands, ~60 seconds.
Prerequisites
.cursorrulesorCLAUDE.mdfile in your repo (SpecLock reads both)Step 1: Protect the repo
SpecLock will auto-detect both
CLAUDE.mdand.cursorrulesand merge rules from both sources into its lock registry.Expected output:
Step 2: Install the Cursor rules file
What this does:
.cursor/rules/speclock.mdc— a Cursor-native rules file that Cursor's agent reads on every turnspeclock_session_briefingat session startExpected output:
Step 3: Verify
Expected output (Cursor-specific lines shown):
What
.cursor/rules/speclock.mdclooks likeSpecLock generates an
.mdcfile that follows Cursor's rule format:The rules listed in this file are auto-generated from your
CLAUDE.md+.cursorrules. Don't edit it by hand — runnpx speclock sync-rulesafter updating either source file and SpecLock will regenerate it.Cursor-specific gotchas
Rules not loading — Cursor loads
.mdcfiles only whenalwaysApply: trueis set OR the glob matches the current file. SpecLock setsalwaysApply: trueby default.MCP not registering — Requires Cursor 0.42 or later. Check
Cursor > Settings > MCPand verifyspeclockshows as connected (green dot).Rules conflict with your existing
.cursorrules— Runnpx speclock sync-rules --dry-runto see the merged output before writing.Next steps
Once SpecLock is running in Cursor, try:
This runs a full semantic audit on your working tree and tells you if Cursor (or anyone) has drifted from the rules since the last checkpoint.
Questions? Drop them below.
Beta Was this translation helpful? Give feedback.
All reactions