SpecLock: Open Source Constraint Engine for AI Coding Agents

✍️ OpenClawRadar📅 Published: February 28, 2026🔗 Source
SpecLock: Open Source Constraint Engine for AI Coding Agents
Ad

SpecLock is an open source constraint engine that adds active enforcement to AI coding agents. While Claude Code's native memory can remember constraints, SpecLock actively blocks violations with semantic conflict warnings.

How SpecLock Works

SpecLock operates as an MCP server with 19 MCP tools. When you set a constraint like "never modify auth files," if Claude tries to violate it—even 10 sessions later—the action gets blocked. The system uses three key techniques:

  • Synonym expansion across 15 groups
  • Negation detection
  • Destructive action flagging

This semantic understanding means that "remove the login endpoints" correctly triggers against a constraint about "never modify auth files."

Compatibility and Availability

SpecLock works with multiple platforms:

  • Bolt.new (npm mode, no MCP needed)
  • Lovable
  • Cursor
  • Windsurf

The tool is free, open source, and available on GitHub. The developer built it over several months after experiencing frustration with AI tools ignoring constraints.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also