WORKS ON BOLT.NEW, LOVABLE, CLAUDE CODE, CURSOR

AI Remembers.
SpecLock Enforces.

Memory alone isn't enough — AI tools forget constraints, ignore decisions, and break what works. SpecLock is the AI Constraint Engine that gives your AI memory + active enforcement.

Bolt.new Setup All Platforms ⭐ Star on GitHub
19
MCP Tools
8
Platforms
Free
Open Source
NEW IN v1.3.0

Bolt.new now has memory + guardrails.

Millions of Bolt.new users have zero memory and zero protection between sessions. SpecLock gives Bolt persistent memory and active constraint enforcement. No MCP needed. Just say "install speclock".

Session 1 — Setup

Say "install speclock" — done.

Bolt automatically runs npx speclock setup, reads the generated rules, and starts capturing your project memory.

User: "Install speclock and set up memory for Lumina" Bolt: ✓ Set goal: "Build B2B Lumina API" ✓ Added 6 locks (auth, security, rate limiting...) ✓ Recorded 7 decisions (Gemini, Stripe...) ✓ Context file generated
Session 2 — Full Memory

New chat. Everything remembered.

Bolt reads .speclock/context/latest.md and picks up exactly where you left off. All locks, decisions, and history intact.

User: "Create a plan for the API endpoints" Bolt: ✓ Read project context (6 locks, 7 decisions) ✓ Created 10-phase plan respecting ALL constraints ✓ All plans use Supabase (locked), Bearer auth (locked) ✓ Logged planning phase back to SpecLock
Works on Bolt.new free and paid plans. Also works with Aider, Rocket.new, and any platform with npm.
Live Demo

See it in action

Memory + enforcement in action. The AI remembers your constraints and actively blocks violations.

# Session 1 — Setting up the project $ speclock_session_briefing > Project memory active. No previous context found. $ speclock_set_goal "Build a SaaS dashboard with Stripe billing" > Goal set. $ speclock_add_lock "Never modify auth files without permission" > 🔒 Locked: "Never modify auth files without permission" $ speclock_add_decision "Use Supabase for auth, Stripe for payments" > Decision recorded. $ speclock_session_summary "Set up project structure and core constraints" > Session saved. 1 lock, 1 decision tracked. # Session 2 — AI remembers everything $ speclock_session_briefing > 🔒 Memory loaded — 1 lock, 1 decision, 1 session tracked. > Goal: Build a SaaS dashboard with Stripe billing > Lock: Never modify auth files without permission $ speclock_check_conflict "Adding social login to auth page" > ⚠️ CONFLICT (HIGH confidence): Violates lock "Never modify auth files" > Action blocked. Ask user for permission before proceeding.
The Problem

Memory without enforcement is dangerous.

Some AI tools now have memory. But remembering is not the same as respecting.

💥

AI Breaks What You Locked

You said "never touch auth files." The AI remembers — and rewrites them anyway while "fixing a bug."

🔄

Decisions Get Overridden

You chose PostgreSQL. Three sessions later, the AI switches to MongoDB because it "seemed better."

🚫

No Constraint Enforcement

Claude's native memory, Mem0, CLAUDE.md — none of them stop the AI when it's about to violate a rule.

🧠

Bolt.new Has Nothing

Millions of vibe coders on Bolt.new have zero memory and zero protection between sessions. Every chat starts from scratch.

🤖

Multi-Agent Chaos

Agent A locks the API. Agent B doesn't know and rewrites it. No tool tracks constraints across agents — except SpecLock.

🔁

Passive Memory = False Safety

Your AI "remembers" your rules in a text file. But when the context is long, it ignores them. You need active enforcement, not passive notes.

Why SpecLock

How SpecLock compares to alternatives

Memory tools exist. But none of them enforce constraints or work on Bolt.new.

Feature Claude Native Memory Mem0 CLAUDE.md / .cursorrules SpecLock
Stops AI from breaking locks No No No Yes — active enforcement
Semantic conflict detection No No No Yes — synonyms + negation
Works on Bolt.new No (Claude only) No No Yes — npm file-based
Works on Lovable No No No Yes — MCP remote
Remembers context Yes Yes Manual Yes
Structured decisions/locks Flat text Tags only Flat text Goals, locks, decisions
Git-aware (checkpoints) No No No Yes
Cross-platform Claude only MCP only Tool-specific MCP + npm (universal)
Price Free (Claude only) Free tier / $249/mo Free (manual) Free & open source

Other tools remember. SpecLock enforces.

How It Works

SpecLock in real life

Connect once. The AI handles everything automatically. Here's what happens:

Lock

You lock something important

You: "Don't ever touch the auth files" AI: 🔒 Locked: "Never modify auth files"
Protect

AI checks before every change

You: "Add social login" AI: ⚠️ This conflicts with your lock: "Never modify auth files" Proceed or find another way?
Remember

New session, full memory

You: "Let's work on the dashboard" AI: 🔒 Memory loaded — 5 locks, 3 decisions, 2 sessions tracked. Ready to continue.
Unlock

You change your mind

You: "Unlock the auth files" AI: You locked: "Never modify auth files". Want me to unlock? You: "Yes" AI: 🔓 Unlocked. Proceeding.
Setup

Connect in 2 minutes

Choose your platform. Follow the steps. Done.

Lovable — Custom MCP Server

Easy — 3 min
1

Connect SpecLock MCP

Go to Settings → Connectors → Personal connectors → New MCP server

Server name: SpecLock Server URL: https://speclock-mcp-production.up.railway.app/mcp Auth: No authentication
2

Add Project Instructions (REQUIRED)

Go to Project Settings → Knowledge and paste the SpecLock rules. This makes the AI use SpecLock automatically on every message. Copy the rules below ↓

3

Start Building

That's it! Every chat now auto-loads your memory, checks constraints, and logs decisions. Say "Initialize SpecLock" in your first chat to get started.

Requires Lovable paid plan (Pro $25/mo) for custom MCP servers.

Claude Code

Easy — 1 min
1

Install via Smithery

npx @anthropic-ai/smithery-cli install sgroy10/speclock --client claude-code
2

Or add to ~/.claude.json manually

{ "mcpServers": { "speclock": { "command": "npx", "args": ["-y", "speclock", "serve", "--project", "."] } } }
3

Done — Zero Config Needed

Claude Code follows MCP server instructions automatically. No extra setup. SpecLock works the moment you connect it.

Cursor

Easy — 2 min
1

Add to .cursor/mcp.json

{ "mcpServers": { "speclock": { "command": "npx", "args": ["-y", "speclock", "serve", "--project", "."] } } }
2

Add Project Instructions (RECOMMENDED)

Add the SpecLock rules to .cursorrules in your project root for best results. Copy the rules below ↓

Windsurf

Easy — 2 min
1

Add to MCP config

Add to ~/.codeium/windsurf/mcp_config.json:

{ "mcpServers": { "speclock": { "command": "npx", "args": ["-y", "speclock", "serve", "--project", "."] } } }
2

Add Project Instructions (RECOMMENDED)

Add the SpecLock rules to .windsurfrules in your project root. Copy the rules below ↓

Cline (VS Code Extension)

Easy — 2 min
1

Add to Cline MCP Settings

Click MCP Servers icon in the Cline sidebar → Configure MCP Servers

{ "mcpServers": { "speclock": { "command": "npx", "args": ["-y", "speclock", "serve", "--project", "."] } } }

OpenAI Codex

Easy — 2 min
1

Via Smithery

Visit smithery.ai/servers/sgroy10/speclock → click Codex and follow the auto-generated configuration.

bolt.diy (Open Source Bolt)

Medium — 5 min
1

Add Remote MCP Server

In bolt.diy, go to Settings → MCP and add:

{ "speclock": { "type": "streamable-http", "url": "https://speclock-mcp-production.up.railway.app/mcp" } }

Bolt.new — npm File-Based Mode

Easy — 1 min
1

Just tell Bolt to install it

In any Bolt.new project, type this in the chat:

Install speclock and set up project memory for my app
2

That's it. Bolt does the rest.

Bolt will run npx speclock setup, read the generated SPECLOCK.md rules file, and start using SpecLock automatically. It will add locks when you say "never/always/don't touch", check constraints before changes, and log what it builds. No MCP needed. No config. No paste.

Works on Bolt.new free and paid plans. No MCP support required — uses npm file-based mode.

Project Instructions

The rules that make SpecLock automatic

Copy these rules and paste them into your platform's project instructions. This tells the AI to use SpecLock on every message — no commands needed.

🔒 SpecLock Project Instructions — Copy & Paste

Where to paste (one-time setup):

PlatformWhere to PasteAuto from MCP?
LovableProject Settings → KnowledgeNo — paste required
Claude CodeCLAUDE.md in project rootYes — works without paste
Cursor.cursorrules in project rootPartial — paste recommended
Windsurf.windsurfrules in project rootPartial — paste recommended
ClineCustom Instructions in settingsPartial — paste recommended
bolt.diySystem prompt settingsNo — paste required

The rules to copy:

## SpecLock Rules (MANDATORY — follow on every message) 1. START OF EVERY CONVERSATION: Call speclock_session_briefing FIRST. Read all locks, decisions, and goals before doing anything else. Show a brief summary: "🔒 Memory loaded — X locks, Y decisions." 2. BEFORE WRITING OR MODIFYING ANY CODE: Call speclock_check_conflict with a description of what you're about to change (e.g., "Adding payment page" or "Modifying the auth login flow"). If a conflict is found with HIGH confidence, STOP and tell me which lock would be violated. Do NOT proceed unless I explicitly say to override it. 3. WHEN I SAY "lock this", "never touch this", "don't ever change this", "this is critical", or similar: Immediately call speclock_add_lock with my exact constraint. Confirm with: "🔒 Locked: [constraint]" 4. AFTER COMPLETING ANY FEATURE OR SIGNIFICANT CHANGE: Call speclock_log_change with a summary of what was built/changed and which files were affected. Also call speclock_add_decision if an architectural choice was made. 5. WHEN I ASK TO REMOVE OR CHANGE SOMETHING THAT WAS LOCKED: Warn me first: "⚠️ You locked this: [constraint]. Want me to unlock it and proceed?" Only proceed if I confirm. 6. END OF CONVERSATION: Call speclock_session_summary with what was accomplished.

That's it. Paste once, and every chat after that will automatically use SpecLock. The AI will load your memory at the start, check constraints before changes, and log what it builds. You never have to type a SpecLock command.

19 MCP Tools

Everything SpecLock can do

Memory management, change tracking, constraint enforcement, git integration, and AI-powered intelligence.

Memory
speclock_init
Initialize SpecLock in project
Memory
speclock_get_context
Full structured context pack
Memory
speclock_set_goal
Set or update project goal
Memory
speclock_add_lock
Add non-negotiable constraint
Memory
speclock_remove_lock
Deactivate a lock by ID
Memory
speclock_add_decision
Record architectural decision
Memory
speclock_add_note
Add a pinned note
Memory
speclock_set_deploy_facts
Record deploy configuration
Tracking
speclock_log_change
Log a significant change
Tracking
speclock_get_changes
Get recent tracked changes
Tracking
speclock_get_events
Get event log (filterable)
Protection
speclock_check_conflict
Check action against locks
Protection
speclock_session_briefing
Start session + full briefing
Protection
speclock_session_summary
End session + record summary
Git
speclock_checkpoint
Create named git tag
Git
speclock_repo_status
Branch, commit, diff info
Intelligence
speclock_suggest_locks
AI-powered lock suggestions
Intelligence
speclock_detect_drift
Scan for constraint violations
Intelligence
speclock_health
Health score + agent timeline
Platform Matrix

Where SpecLock works today

Platform MCP Support SpecLock Status Instructions Needed?
Lovable Custom MCP (Paid) Ready Yes — paste into Knowledge
Claude Code Native MCP Ready No — auto from MCP
Cursor Native MCP Ready Recommended — .cursorrules
Windsurf Native MCP Ready Recommended — .windsurfrules
Cline Native MCP Ready Recommended
Codex (OpenAI) Via Smithery Ready TBD
bolt.diy MCP Support Ready Yes — paste into system prompt
Bolt.new npm file-based Ready No — reads SPECLOCK.md
Why I Built This

Built from 1 year of AI frustration.

"I spent a year building products with AI coding tools. Every session, my AI forgot what we agreed on. 'Never touch auth' became 'oops, I rewrote your login flow.' I chose PostgreSQL — three sessions later, the AI migrated to MongoDB. I built SpecLock because memory without enforcement is useless. Other tools remember. SpecLock is the only one that says NO when you're about to break something."

SR
Sandeep Roy
npm version GitHub stars MIT License npm downloads