Harnesses Open-Core
A harness is any AI coding agent that Intutic governs. Intutic currently supports 18 harnesses — from IDE extensions like Cursor and Windsurf to CLI tools like Claude Code and Aider to autonomous agent frameworks like OpenHands and Goose.
Governance works through two components that run on the developer's machine:
| Component | Language | Role |
|---|---|---|
| Proxy | Rust | Intercepts LLM API calls on port 4000 — DLP, metering, policy checks |
| Sync Daemon | TypeScript | Syncs SOPs from the control plane → harness config files, detects drift |
Architecture
Developer's Machine Cloud
┌──────────────────────────────────────┐ ┌──────────────┐
│ │ │ │
│ ┌──────────┐ LLM API calls │ │ Control │
│ │ Harness │ ──────────────────────────▶ │ Plane │
│ │ (Cursor, │ via localhost:4000 │ │ (:3001) │
│ │ Claude, │ │ │ │
│ │ etc.) │ │ │ ┌────────┐ │
│ └────┬─────┘ │ │ │ SOPs │ │
│ │ reads │ │ │ Traces │ │
│ ▼ │ │ │ Budgets│ │
│ ┌──────────┐ ┌──────────────┐ │ │ └────────┘ │
│ │ Config │◀────│ Sync Daemon │◀──────▶│ │
│ │ Files │ │ (sync loop + │ │ └──────────────┘
│ │ │ │ WebSocket) │ │ ▲
│ └──────────┘ └──────────────┘ │ │
│ ▲ │ │
│ │ watches for drift │ Policy checks
│ │ │ + telemetry
│ │ ┌──────────────┐ │ │
│ └───────────│ Proxy (Rust) │───────────┘
│ │ :4000 │ │
│ └──────────────┘ │
└──────────────────────────────────────┘The flow
- Harness makes an LLM API call (e.g.,
POST /v1/chat/completions) - Proxy intercepts the call at
localhost:4000— runs DLP scanning, budget checks, and policy evaluation - Proxy forwards approved requests to the real LLM provider, records traces
- Sync Daemon polls the control plane every 30s (or receives instant WebSocket pushes) for SOP updates
- Sync Daemon writes SOPs into each harness's native config file format
- Sync Daemon watches config files via chokidar — unauthorized edits trigger immediate rewrite + tamper event
Proxy (Rust)
The proxy is a LiteLLM-Rust fork that transparently intercepts all LLM traffic. Harnesses connect to it by setting their base URL environment variable to http://localhost:4000.
Protocol routing
| Route | Protocol | Harnesses |
|---|---|---|
/v1/chat/completions | OpenAI | Cursor, Windsurf, Continue, Cline, Roo Code |
/v1/messages | Anthropic | Claude Code, Claude Desktop |
/v1/responses | Codex | OpenAI Codex |
/v1beta/models/:model | Gemini | Antigravity |
Pre-request pipeline
Every request passes through these stages before reaching the LLM:
- Virtual key validation — verifies the
vk_*workspace key - Budget gate — checks session and workspace spend limits against Valkey (
v2:budget:hard_block:{workspace_id}) - DLP scanner — regex-based detection of secrets (AWS keys, GitHub tokens, bearer tokens, private keys, SSNs) with
redactorblockactions - SnipCompactor — token compression: text repetition collapse, JSON array truncation, code skeleton extraction via tree-sitter
- WASM plugin evaluation — custom governance plugins compiled to WebAssembly
- Policy check — pre-request evaluation against the control plane (3s timeout, configurable fail-open or fail-closed)
Key constants
| Constant | Value |
|---|---|
| Default port | 4000 |
| Policy check timeout | 3,000ms |
| HTTP client timeout | 120s |
| SnipCompactor max tool output | 8,192 tokens |
| Valkey default | redis://127.0.0.1:6379 |
→ Source: packages/proxy/
Sync Daemon (TypeScript)
The sync daemon keeps harness config files in sync with SOPs from the control plane. It runs on the developer's machine as a managed process started by intutic connect.
Sync loop
Every 30 seconds (configurable via pollIntervalMs):
- Fetch config —
POST /api/v1/sync/config(15s timeout) - Compare configVersion — if remote > local → write SOPs to harness files
- Apply SkillOpt edits — if any
appliedEditspresent from the SOP optimizer - Compute SHA-256 hashes — hash each config file
- Report hashes —
POST /api/v1/sync/sop-hashfor drift detection - Update integrity store — writes to
~/.intutic/integrity.json - Config capture — every 5th iteration (~2.5 min): upload configs to
POST /api/v1/config/capture - Compliance probes — detect proxy bypass attempts
Real-time updates via WebSocket
Instead of waiting for the 30s poll, the control plane can push updates instantly:
- Endpoint:
ws(s)://{controlPlaneUrl}/api/v1/sync/ws?token={apiKey} - Heartbeat: every 30s
- Auto-reconnect: exponential backoff (1s base, 30s max)
- Events:
config_update(apply SOPs immediately),active_local_sops_update
Config drift detection
The daemon watches all harness config files using chokidar:
- Stability threshold: 200ms (waits for write to finish)
- On
changeorunlink→ immediately rewrites the config file (unlessalert-onlyenforcement tier) - Appends a
config_tamperevent to the hook-events log - Reports the tamper to the control plane
All config writes are atomic — write to a temp file, then rename. On macOS, optional uchg immutable flag support prevents casual editing.
Config file formats
SOPs are written in each harness's native format:
| Format | Harnesses | Example file |
|---|---|---|
| Markdown | Cursor, Claude Code, Windsurf, GitHub Copilot | .cursorrules |
| JSON | Antigravity | .gemini/settings.json |
| YAML | Aider | .aider.conf.yml |
| TOML | OpenHands | config.toml |
| Env | Codex | .env.intutic |
| Native hooks | Cline, Roo Code, Continue, Claude Desktop, Goose | Harness-specific |
→ Source: services/sync-daemon/
Harness adapter interface
Each harness implements a three-method adapter contract:
// tools/cli/src/harness/types.ts
interface IHarnessAdapter {
readonly type: HarnessType
readonly configFileName: string
detect(workspaceRoot: string): Promise<boolean>
writeConfig(workspaceRoot: string, sops: SyncSopEntry[], proxyUrl: string): Promise<string | null>
readCurrentHash(workspaceRoot: string): Promise<string | null>
}| Method | Purpose |
|---|---|
detect() | Check if the harness is present (usually fs.access on the config file) |
writeConfig() | Write SOPs to the harness's native config format (atomic write) |
readCurrentHash() | SHA-256 of current config file (for drift detection) |
The createMarkdownAdapter() factory in base.ts generates adapters for markdown-based harnesses (Cursor, Claude Code, Windsurf). All adapters share the same auto-generated header:
# Intutic Governance Rules (auto-generated)
# DO NOT EDIT — managed by intutic sync daemon
# Last sync: 2026-07-04T12:15:00Z→ Source: tools/cli/src/harness/
Related
- Integrations Hub — All 18 harnesses with setup guides
- Enforcement Actions — BYPASS/ENHANCE/HIJACK/KILL verdicts
- Getting Started — Install and connect your first harness
- Core Concepts — Workspaces, SOPs, scoring