speclock
by sgroy10·★ 24·Score 46
SpecLock is an AI constraint engine with 51 MCP tools that enforces project rules across AI coding sessions.
Overview
SpecLock prevents AI coding assistants from violating project constraints by analyzing requests semantically and blocking actions that violate defined rules. It supports both advisory and hard enforcement modes, with enterprise features including AES-256-GCM encryption, HMAC audit chains, and RBAC. The system uses semantic analysis rather than keyword matching to detect euphemistic attacks, temporal evasion, and compound sentence violations.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose SpecLock when you need to enforce constraints across AI coding sessions and protect critical systems from unintended modifications, especially in teams or projects with strict governance requirements.
When NOT to choose this
Avoid SpecLock if you're looking for simple AI memory tools without enforcement capabilities, or if you need very fine-grained control over individual AI actions rather than high-level constraints.
Tools this server exposes
12 tools extracted from the READMEspeclock_initInitialize SpecLock in project
speclock_get_contextGet full context pack including goals and locks
speclock_set_goalSet project goal
speclock_add_lockAdd constraint and auto-guard files
speclock_remove_lockSoft-delete a lock
speclock_add_decisionRecord architectural decision
speclock_add_noteAdd pinned note to project
speclock_set_deploy_factsRecord deployment configuration
speclock_checkTest if an action would conflict with locks
speclock_list_locksShow all current locks
speclock_enforceChange enforcement mode between hard and advisory
speclock_overrideOverride a lock with a reason
Comparable tools
Installation
Installation
npx speclock protect # Install in your project
speclock mcp install claude-code # Wire up MCP for Claude Code
speclock doctor # Verify everything is set up correctlyFor Claude Desktop, add to your config.json:
{
"mcpServers": {
"speclock": {
"command": "npx",
"args": ["-y", "speclock", "serve", "--project", "."]
}
}
}FAQ
- How does SpecLock differ from AI memory tools?
- Unlike memory tools that only remember context, SpecLock actively enforces constraints and blocks AI from violating project rules.
- What enforcement modes are available?
- SpecLock offers advisory mode (default, shows warnings) and hard mode (blocks violations with MCP errors).
On Hacker News
Recent discussion from the developer community.
- Story by sgroy10 · 2026-03-01
- Story by sgroy10 · 2026-04-08
- Story by sgroy10 · 2026-02-26
Compare speclock with
Last updated · Auto-generated from public README + GitHub signals.