Speclock

by sgroy10

23 stars
332 downloads
Not rated
GitHub Website

About

AI constraint engine — persistent memory + active enforcement. Stops AI from breaking locked code. Semantic conflict detection, file-level guards, session continuity. 19 MCP tools.

Details

Author
sgroy10
GitHub stars
23
Downloads
332
Categories
Developer Tools, Other, Security

- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Speclock
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "speclock": {
            "speclock": {
                "command": "npx",
                "args": [
                    "-y",
                    "speclock",
                    "serve"
                ]
            }
        }
    }
}

McpServers

{
    "speclock": {
        "command": "npx",
        "args": [
            "-y",
            "speclock",
            "serve"
        ]
    }
}

→ sk_speclock_a1b2c3... (shown once, stored as SHA-256 hash)


| Role | Read | Write Locks | Override | Admin |
|------|:---:|:---:|:---:|:---:|
| viewer | Yes | — | — | — |
| developer | Yes | — | With reason | — |
| architect | Yes | Yes | Yes | — |
| admin | Yes | Yes | Yes | Yes |

AES-256-GCM Encryption

bash
export SPECLOCK_ENCRYPTION_KEY="your-secret"
speclock encrypt # Encrypts brain.json + events.log at rest

PBKDF2 key derivation (100K iterations). Authenticated encryption. HIPAA 2026 compliant.

HMAC Audit Chain

Every event gets an HMAC-SHA256 hash chained to the previous event. Modify anything — the chain breaks.

bash
$ speclock audit-verify

✓ Audit chain VALID — 247 events, 0 broken links, no tampering detected.


Compliance Exports

bash
speclock export --format soc2 # SOC 2 Type II report (JSON)
speclock export --format hipaa # HIPAA PHI protection report
speclock export --format csv # All events for auditor spreadsheets

---

Policy-as-Code

Declarative YAML rules for organization-wide enforcement:

yaml

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.