What is Speclock?
Speclock is an AI constraint engine that enforces project rules across every AI coding session. It stops AI assistants from breaking constraints you have defined, such as "never touch the auth system" or "database must stay PostgreSQL."
How to use Speclock?
Install in your project with npx speclock protect, wire up MCP for supported clients using speclock mcp install <client> (e.g., claude-code, cursor, windsurf, cline, codex), then verify with speclock doctor. Default mode is advisory (warnings only); hard enforcement is enabled with --strict or SPECLOCK_STRICT=1.
Key features of Speclock
- Semantic conflict detection (100/100 score, 0% false positives)
- Hard enforcement mode that blocks AI from proceeding
- Pre‑commit hooks and MCP integration for all major AI tools
- Tamper‑proof audit trail with HMAC‑SHA256 chain
- SOC 2 / HIPAA compliance exports
- Encrypted storage (AES‑256‑GCM) and RBAC with API key auth
- Policy‑as‑Code DSL using YAML rules
Use cases of Speclock
- Prevent AI from modifying auth, payment, or patient‑record files
- Enforce database technology choices across sessions (e.g., PostgreSQL only)
- Block deletion or disabling of critical systems (e.g., patient data, audit logging)
- Protect regulatory‑sensitive workflows that require SOC 2 or HIPAA compliance
- Extend guardrails to no‑install platforms like Lovable or Bolt.new
评论