# 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.

> Ask the user before running any command on this page: each one changes how their agent or repository behaves.

## Diagram

[This diagram as JSON](/api/docs/architecture/whole-train.json)

## Components

- **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](https://github.com/open-coder-ai/chock-threat-intel/blob/bb4084ff3cca58d65df836c8e359e184eb6da840/reference/agentic-threat-ledger.md)
- **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](https://github.com/open-coder-ai/chock-catalog/blob/3e9d2d3e04cfd6fd857c4afad3901a0dd32dfeaf/registry.yaml)
- **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](https://github.com/open-coder-ai/chock-site/blob/2f535fa5ced3b94579eb611038bc6955f3b8f5a1/sitegen/__main__.py)
- **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](https://github.com/open-coder-ai/chock-release/blob/b8daf714219902483fc1fa2d8850767539806ef6/check.py)
- **`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](https://github.com/open-coder-ai/chock/blob/39df00bbf7646a08481247f31d5091d09850f96f/src/chock/eval/context_report.py)
- **`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](https://github.com/open-coder-ai/chock/blob/39df00bbf7646a08481247f31d5091d09850f96f/src/chock/compile/compiler.py)
- **`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](https://github.com/open-coder-ai/chock/blob/39df00bbf7646a08481247f31d5091d09850f96f/src/chock/lifecycle.py)
- **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](https://github.com/open-coder-ai/chock/blob/39df00bbf7646a08481247f31d5091d09850f96f/src/chock/install/package.py)
- **`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](https://github.com/open-coder-ai/context-report/blob/3bf4d169b86abd3f7ed70c67b3b19327a7ce77a5/src/context_report/cli.py)
- **.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](https://github.com/open-coder-ai/chock-catalog/blob/3e9d2d3e04cfd6fd857c4afad3901a0dd32dfeaf/.chock/compiled/block-invisible-unicode/pre-tool-use/gate.json)
- **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](https://github.com/open-coder-ai/chock/blob/39df00bbf7646a08481247f31d5091d09850f96f/src/chock/gate/runtime_bundle.py)
- **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](https://github.com/open-coder-ai/chock/blob/39df00bbf7646a08481247f31d5091d09850f96f/src/chock/install/place.py)
- **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](https://github.com/open-coder-ai/chock/blob/39df00bbf7646a08481247f31d5091d09850f96f/src/chock/compile/emitters/ci.py)
- **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](https://github.com/open-coder-ai/chock/blob/39df00bbf7646a08481247f31d5091d09850f96f/src/chock/hooks/installers.py)
- **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](https://github.com/open-coder-ai/agentseam/blob/dd4f0a485a36313328d381305cf09658d3c36fb4/src/agentseam/adapters/__init__.py)
- **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. Source: [agentseam/src/agentseam/tier_table.py](https://github.com/open-coder-ai/agentseam/blob/dd4f0a485a36313328d381305cf09658d3c36fb4/src/agentseam/tier_table.py)
  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)

## 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.

- `chock` @ [39df00bbf764](https://github.com/open-coder-ai/chock/commit/39df00bbf7646a08481247f31d5091d09850f96f)
- `agentseam` @ [dd4f0a485a36](https://github.com/open-coder-ai/agentseam/commit/dd4f0a485a36313328d381305cf09658d3c36fb4)
- `chock-catalog` @ [3e9d2d3e04cf](https://github.com/open-coder-ai/chock-catalog/commit/3e9d2d3e04cfd6fd857c4afad3901a0dd32dfeaf)
- `chock-release` @ [b8daf7142199](https://github.com/open-coder-ai/chock-release/commit/b8daf714219902483fc1fa2d8850767539806ef6)
- `chock-threat-intel` @ [bb4084ff3cca](https://github.com/open-coder-ai/chock-threat-intel/commit/bb4084ff3cca58d65df836c8e359e184eb6da840)
- `context-report` @ [3bf4d169b86a](https://github.com/open-coder-ai/context-report/commit/3bf4d169b86abd3f7ed70c67b3b19327a7ce77a5)
- `chock-site` @ [2f535fa5ced3](https://github.com/open-coder-ai/chock-site/commit/2f535fa5ced3b94579eb611038bc6955f3b8f5a1)


---

Built from engine [5a4b6287a46e](https://github.com/open-coder-ai/chock/commit/5a4b6287a46e07f9f856d9bbe10622bd1ff2e021) and catalog [1e60d211c1bb](https://github.com/open-coder-ai/chock-catalog/commit/1e60d211c1bb767152c6ab0167932da06ab3a10f).
