Cline
Integrate Intutic governance with Cline — the VS Code extension for autonomous agentic coding.
How it works
Cline runs file hooks: an executable named PreToolUse in a hooks directory runs before every tool call, with the call as JSON on stdin. Intutic installs its gate as .clinerules/hooks/PreToolUse. It refuses a call by printing {"cancel": true, "errorMessage": "…"} on stdout, with the refusal's code and ruleId (refusal codes) — Cline ignores the hook's exit code. The hook has no tool filter, so it sees every tool call, including MCP calls (use_mcp_tool). Governance rules are written next to it as .clinerules/intutic-governance.md, which Cline reads as a rules file.
The same file serves the VS Code extension and the Cline CLI, which read different payload shapes; the gate accepts both. In the VS Code extension, turn on Enable Hooks in Cline's feature settings — hooks do not run until you do.
Setup
1. Initialize Intutic
intutic initThe CLI detects Cline and registers it as a harness:
✔ cline → /path/to/project/.clinerules/intutic-governance.mdintutic init only detects the harness and records it in ~/.intutic/config.json; it writes no harness files. The files described on this page are written by intutic gates install (open core, no control plane), from the rule sets in .intutic/sops/ — see What writes harness files:
intutic gates install2. Start the proxy
intutic startWhat gets written
- Gate:
.clinerules/hooks/PreToolUse— an executable Node.js script that evaluates shell commands, file edits and MCP tool calls against the built-in protections and your SOPs. - Rules:
.clinerules/intutic-governance.md— your SOP text.
.clinerules has to be a directory for both to fit. A flat .clinerules file that an earlier Intutic version wrote is converted automatically. A flat .clinerules file you wrote yourself is left alone, and no gate is installed until you move its content into a file inside a .clinerules/ directory, and Intutic reports it. A PreToolUse hook you wrote yourself is never overwritten.
An agent cannot edit or remove the gate: the Intutic gate refuses a tool call that names .clinerules/hooks, reading it included, under Cline and under every other harness with a hook gate. If the gate is deleted, replaced or made non-executable anyway, run intutic gates install to write it back. Cline runs the hooks in its other hook directories as well, and refuses a call when any of them does, so a hook added there cannot override the gate.
To undo what intutic gates install writes here, run intutic disconnect --harness cline: each file goes back to what it held before Intutic first wrote it, or is deleted if Intutic created it, and edits you made since are kept. See intutic disconnect.
Proxy routing
To route Cline's LLM requests through the local proxy:
- Open the Cline panel in VS Code.
- Click the gear icon to open Settings.
- Set API Provider to
OpenAI Compatible. - Set Base URL to
http://localhost:4000/v1. - Enter your Intutic API Key.
Cline keeps these in its own settings storage, not in a file Intutic writes, so this step is manual. For the Anthropic provider instead, check Use custom base URL and enter http://localhost:4000 — Cline appends /v1/messages itself.