speclock_initLABSCO SUMMARY
Enforcement level depends on the client, and the README says which is which.
Claude Code gets native pre-action checks on Write, Edit and Bash. Everywhere else — Cursor, Windsurf, Cline, Codex, Gemini CLI, Copilot CLI — the agent can call SpecLock before acting but nothing guarantees it will, which the project labels MCP-assisted rather than pretending otherwise. If a constraint genuinely must hold, the answer given is speclock protect --strict plus CI, where enforcement does not depend on the coding agent at all. Start advisory: it never blocks a change while you find out what it would have caught.
What it is
A constraint enforcement layer for coding agents. It reads the rule files you already keep — CLAUDE.md, AGENTS.md, .cursorrules — turns them into locks, and checks proposed actions against them, in advisory mode by default and blocking when you switch it on.
What you get
- The README counts 51 MCP tools and lists 49 of them by name, spanning context, constraints, enforcement, sessions and audit
- speclock_check_conflict runs a semantic conflict check against every active lock, and speclock_get_context returns the full context pack
- speclock_add_lock adds a constraint and auto-guards the matching files; speclock_remove_lock soft-deletes one and speclock_suggest_locks proposes new ones
- speclock_set_enforcement switches between advisory and hard mode; speclock_override_lock records an override with a reason and speclock_override_history reads that trail back
- speclock_semantic_audit analyses a git diff against the locks, speclock_detect_drift scans for violations, and speclock_audit checks staged files before a commit
- speclock_session_briefing and speclock_session_summary bracket a working session; speclock_log_change, speclock_get_changes and speclock_get_events track what happened inside it
- speclock_verify_audit checks the integrity of the HMAC audit chain, and speclock_report gives violation statistics and the most-tested locks
- Matching is semantic rather than keyword: "clean up old patient data" reads as deletion, "temporarily disable MFA" as disabling MFA, and "enable audit logging" does not trip a lock that forbids disabling it
Requirements
The npm package speclock, version 5.8.0, started as speclock serve --project . over stdio, or installed as a Claude Code plugin from the repository's marketplace. Run npx speclock@latest protect once in the project to extract constraints — that starts advisory. protect --strict turns on blocking, and speclock doctor verifies rules, hooks and integration. No account; it runs locally by default.
Setup effort
One command — npx speclock@latest protect
USE CASES
Stopping the assistant rewriting something you locked
The proposed edit is checked against active constraints before the files change.
Finding out what it would block before it blocks anything
Advisory mode warns and logs; hard mode is a separate, deliberate switch.
Catching a violation that already landed
Analyse the git diff against the locks, or scan the working tree for drift.
Guarding the commit itself
Staged files are audited independently of whichever agent wrote them.
Explaining a decision after the fact
Overrides carry a reason, and the audit chain can be verified rather than trusted.
49 tools
Listed in project docs. Your client may show a different list.
speclock_get_contextspeclock_set_goalspeclock_add_lockspeclock_remove_lockspeclock_add_decisionspeclock_add_notespeclock_set_deploy_factsspeclock_check_conflictspeclock_set_enforcementspeclock_override_lockspeclock_override_historyspeclock_semantic_auditspeclock_detect_driftspeclock_auditspeclock_session_briefingspeclock_session_summaryspeclock_log_changespeclock_get_changesspeclock_get_eventsspeclock_checkpointspeclock_repo_statusspeclock_suggest_locksspeclock_healthspeclock_apply_templatespeclock_reportspeclock_verify_auditspeclock_export_compliancespeclock_policy_evaluatespeclock_policy_managespeclock_telemetryspeclock_add_typed_lockspeclock_check_typedspeclock_list_typed_locksspeclock_update_thresholdspeclock_compile_specspeclock_build_graphspeclock_blast_radiusspeclock_map_locksspeclock_review_patchspeclock_review_patch_diffspeclock_parse_diffspeclock_sync_rulesspeclock_list_sync_formatsspeclock_replayspeclock_list_sessionsspeclock_drift_scorespeclock_coveragespeclock_strengthenBEFORE YOU INSTALL
What to know first
Tools you get
49 tools named in the project's documentation.
Requires
npx on PATH
INSTALLATION
Connect your client
Server setup
npx speclock@latest protectMCP Clients
Claude Code — plugin
/plugin marketplace add sgroy10/speclock
/plugin install speclock@speclock-marketplaceClaude Code, Cursor, Windsurf, Other MCP clients
{
"mcpServers": {
"speclock": {
"command": "npx",
"args": [
"--yes",
"speclock@5.8.0",
"serve",
"--project",
"."
]
}
}
}Windsurf — installer
speclock mcp install windsurfGemini CLI
gemini extensions install https://github.com/sgroy10/speclockGitHub Copilot
copilot plugin marketplace add sgroy10/speclock
copilot plugin install speclock@speclock-marketplaceLovable
https://speclock-mcp-production.up.railway.app/mcpBolt.new, Aider
npx speclock setup --goal "Build my app" --template nextjsCreates SPECLOCK.md, injects rules into package.json, generates .speclock/context/latest.md. The AI reads these automatically.