SpecLock is an open-source AI constraint engine designed to enforce project-specific rules and coding restrictions during AI-assisted coding sessions. It prevents autonomous or generative AI tools (such as Claude Code, Cursor, Windsurf, Cline, Codex) from making changes to codebases that violate explicit user-set constraints. The tool ensures that instructions like 'never touch the auth system' or 'database must stay PostgreSQL' are respected, using semantic understanding rather than simple keyword matching. It integrates via MCP, supports health checks, pre-commit hooks, and provides features like violation receipts, public sharing, and enforcement mode options.
Visit Speclock's official website for product details and getting started.
Comprehensive guide on how to install and use SpecLock, including API references and examples.
Engage with other users, share experiences, and ask questions about SpecLock.
Explore practical examples and use cases for implementing SpecLock in various coding scenarios.