Chock.sh Build your plugin

Architecture

The whole train

Every repository in the chock train and how a policy travels from chock-catalog through chock to the hook your agent's client runs.

The chock-catalog repository holds the policies. Chock compiles them and wires them into a repository or a plugin. Agentseam's adapters speak each agent's hook dialect. Around them, the threat list, context-report, this site and the release check each read the train at a pinned commit.

Diagram

  • Repository
  • Engine code
  • Generated file
  • The agent's client

Select a box to read its card below.

This diagram as JSON

Components

  1. Threat list Repository

    A human-reviewed weekly list of published agentic-AI threats. Each is scored by what the catalog does about it (enforced for a slice, advisory, policy wanted, or out of scope). It blocks nothing itself.

    Source: chock-threat-intel/reference/agentic-threat-ledger.md @ bb4084ff3cca

  2. Policy catalog Repository

    One folder per policy under base/: a manifest, its checks and its evals. registry.yaml lists every policy. tools/gen_registry.py writes it from the folders on disk.

    Source: chock-catalog/registry.yaml @ 3e9d2d3e04cf

  3. chock.sh Repository

    This site. The sitegen package builds every page from the catalog at .catalog-ref and the engine at .framework-ref, and refuses a catalog checked out at another commit.

    Source: chock-site/sitegen/__main__.py @ 2f535fa5ced3

  4. Release check Repository

    Checks one release manifest across the train: every repo at a commit on its default branch, CI green there, the catalog and this site pinned to the manifest's engine commit, and no release tag yet. Tagging runs only after this check passes, on the owner's approval.

    Source: chock-release/check.py @ b8daf7142199

  5. chock eval export Engine code

    Exports chock policies to context-report's run/v0.1 case format. Chock writes the format. It never imports context-report.

    Source: chock/src/chock/eval/context_report.py @ 39df00bbf764

  6. chock compile Engine code

    Reads a policy folder and runs one emitter per hook point: the ambient rule, agent hooks, git hook, CI step, Claude managed settings and the MCP gateway. The output lands in .chock/compiled/<policy>/.

    Source: chock/src/chock/compile/compiler.py @ 39df00bbf764

  7. chock sync Engine code

    Recompiles and rewires a repository so it matches its declared policies: each agent's hook file, the runtime in .chock/bin/, and the git hooks unless --skip-hooks. With --ci it also installs the CI gate workflow.

    Source: chock/src/chock/lifecycle.py @ 39df00bbf764

  8. Plugin install Engine code

    Builds the policies picked on this site's builder into one merged plugin for one agent, and swaps it into place (ask the user before running it). No repository changes.

    Source: chock/src/chock/install/package.py @ 39df00bbf764

  9. context-report Repository

    An open report format for whether an agent plugin, hook, skill or AGENTS.md works: one row per measured fact, each marked recomputable by anyone or only claimed by the author.

    Source: context-report/src/context_report/cli.py @ 3bf4d169b86a

  10. .chock/compiled Generated file

    One folder per policy and hook point: gate.json files, hook fragments, the ambient rule, and the git-hook and CI entry points. The cited file is the catalog's own compiled gate for one policy.

    Source: chock-catalog/.chock/compiled/block-invisible-unicode/pre-tool-use/gate.json @ 3e9d2d3e04cf

  11. Per-agent runtime Generated file

    One file per agent in .chock/bin/ (claude_code.py, cursor.py and the rest): agentseam's bundled dispatcher and adapter plus chock's gate handler. Each agent's hook command runs it with --gate or --guard.

    Source: chock/src/chock/gate/runtime_bundle.py @ 39df00bbf764

  12. Plugin folder Generated file

    Where a client's plugin goes, and what chock may replace there. The plugin carries a runtime built the same way, for its one agent.

    Source: chock/src/chock/install/place.py @ 39df00bbf764

  13. CI gate step Generated file

    A CI step that re-runs the policy's check over a pull request's commit range, so a change that skipped the local hooks is still checked.

    Source: chock/src/chock/compile/emitters/ci.py @ 39df00bbf764

  14. Git hooks Generated file

    The git-hook dispatchers that run each policy's git-hook entry point at commit and push.

    Source: chock/src/chock/hooks/installers.py @ 39df00bbf764

  15. Agentseam adapters Engine code

    One adapter per agent: it parses that client's hook payload into one Event, and speaks the Decision back in the client's own dialect, on stdout and in the exit code.

    Source: agentseam/src/agentseam/adapters/__init__.py @ dd4f0a485a36

  16. Your agent's client The agent's client

    Claude Code, Cursor, Codex CLI and the others run the hook before a tool runs. What a hook can do there, and what happens when it cannot run, depends on the agent.

    Agentseam's tier table at the release the engine pins, by fail mode:

    • No adapted pre-tool hook (10): Aider (none), Amp (unadapted), GitHub Copilot (Agent Plugins 1.0 marketplace bundle) (unadapted), DeepSeek Harness (dsh) (unadapted), Kilo Code (unadapted), Kiro (unadapted), OpenCode (unadapted), Replit Agent (unadapted), Roo Code (unadapted), Zed (none)
    • If the hook fails, the action goes through (14): Antigravity (block+rewrite), Claude Code (block+rewrite), Cline (block), OpenAI Codex CLI (block+rewrite), Devin (block+rewrite), Factory Droid (block), Gemini CLI (block+rewrite), Grok CLI (block), Junie CLI (block+rewrite), Kimi Code CLI (block), OpenHands (block), Tabnine CLI (block+rewrite), GitHub Copilot (VS Code agent mode / CLI) (block+rewrite), Windsurf (Cascade) (block)
    • What a failed hook does can be configured (3): Cursor (block+rewrite), goose (block), Mistral Vibe (block+rewrite)

    Source: agentseam/src/agentseam/tier_table.py @ dd4f0a485a36

Connections

  • Threat list → Policy catalog: Scores
  • Policy catalog → chock compile: Policy folders
  • Policy catalog → chock.sh: Pinned
  • Release check → chock.sh: Checks pins
  • chock eval export → context-report: run/v0.1 cases
  • chock compile → .chock/compiled: Writes
  • chock sync → Per-agent runtime: Writes
  • .chock/compiled → Per-agent runtime: gate.json
  • .chock/compiled → Git hooks: Entry points
  • .chock/compiled → CI gate step: step.yaml
  • Per-agent runtime → Agentseam adapters: Bundles
  • Agentseam adapters → Your agent's client: Decision
  • Plugin install → Plugin folder: Builds
  • Plugin folder → Your agent's client: Hooks

Main path

The flow this diagram is about, in order:

  1. Policy catalog
  2. chock compile
  3. .chock/compiled
  4. Per-agent runtime
  5. Agentseam adapters
  6. Your agent's client

Pinned sources

Every box cites a file at these commits. CI fails the build if a cited path is missing at its commit.

Built from engine 5a4b6287a46e and catalog 1e60d211c1bb.