# intent-hq/intent architecture

> Architecture diagram of the GitHub repository intent-hq/intent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/intent-hq/intent
- Repository: https://github.com/intent-hq/intent

## Overview

This checkout is the cross-cutting tooling layer of Intent, not the desktop app or daemon: the README identifies those as separate component repositories. Its visible responsibilities include agent evaluation, Rust test-gate support, repository checks, and runner-fleet planning. The main workflow shown is an evaluation run starting isolated daemons, exercising task scenarios, scoring results, and writing a report. Edges follow excerpts or SOURCE INDEX references; the broader product workflow is documented in the README, but its implementation is not present in this file tree.

Main entry points: [`scripts/agent-eval/run.mjs`](https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/run.mjs) (Eval runner), [`scripts/resumable_nextest.py`](https://github.com/intent-hq/intent/blob/main/scripts/resumable_nextest.py) (Resumable test runner), [`scripts/check-mcp-bindings.mjs`](https://github.com/intent-hq/intent/blob/main/scripts/check-mcp-bindings.mjs) (MCP binding check), [`infra/runners/fleet_slots.py`](https://github.com/intent-hq/intent/blob/main/infra/runners/fleet_slots.py) (Fleet slot totals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_eval["Agent evaluation"]
  node_eval_runner["Eval runner<br/>[run.mjs]"]
  node_eval_daemon["Isolated daemon<br/>[daemon.mjs]"]
  node_eval_rpc["RPC client<br/>[rpc.mjs]"]
  node_eval_tasks["Task scenarios<br/>[tasks.mjs]"]
  node_eval_score["Transcript scoring<br/>[score.mjs]"]
  node_eval_report["Report rendering<br/>[report.mjs]"]
  node_eval_metrics["Stored metrics<br/>[metrics.mjs]"]
end

subgraph group_gates["Test gate support"]
  node_nextest["Nextest stress runner<br/>[nextest_stress.py]"]
  node_resumable["Resumable test runner"]
  node_storage_gate["Gate storage policy<br/>[gate_storage.py]"]
  node_tomli_parser["TOML parser<br/>[_parser.py]"]
  node_tomli_types["TOML types<br/>[_types.py]"]
end

subgraph group_checks["Repository checks"]
  node_agent_toggle_check["Agent toggle check"]
  node_doc_link_check["Documentation link check"]
  node_makefile_check["Makefile target check"]
  node_mcp_check["MCP binding check"]
  node_markdown_scan["Markdown scanner"]
  node_fixture_copy["Fixture copy utility<br/>[fixture-copy.mjs]"]
  node_submodule_ref["Submodule ref utility<br/>[submodule-ref.mjs]"]
end

subgraph group_runners["Runner fleet"]
  node_fleet_slots["Fleet slot totals<br/>[fleet_slots.py]"]
  node_smoke_plan["Smoke plan<br/>[smoke_plan.py]"]
end

node_agent_actor(("Coding agents"))
node_runner_fleet(("Self-hosted runners"))

node_eval_runner -->|"starts"| node_eval_daemon
node_eval_runner -->|"connects"| node_eval_rpc
node_eval_runner -->|"loads tasks"| node_eval_tasks
node_eval_runner -->|"scores transcripts"| node_eval_score
node_eval_runner -->|"renders report"| node_eval_report
node_eval_daemon -->|"connects via"| node_eval_rpc
node_eval_runner -.->|"evaluates"| node_agent_actor
node_eval_metrics -->|"uses scoring"| node_eval_score
node_resumable -->|"uses policy"| node_storage_gate
node_resumable -->|"uses runner"| node_nextest
node_resumable -->|"parses TOML"| node_tomli_parser
node_tomli_parser -->|"imports types"| node_tomli_types
node_agent_toggle_check -->|"uses ref helper"| node_submodule_ref
node_mcp_check -->|"uses ref helper"| node_submodule_ref
node_mcp_check -->|"references check"| node_makefile_check
node_doc_link_check -.->|"uses scanner"| node_markdown_scan
node_fixture_copy -.->|"validates copies"| node_runner_fleet
node_fleet_slots -->|"imports fleet config"| node_smoke_plan
node_fleet_slots -->|"totals capacity"| node_runner_fleet
node_smoke_plan -.->|"plans jobs"| node_runner_fleet

click node_eval_runner "https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/run.mjs"
click node_eval_daemon "https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/lib/daemon.mjs"
click node_eval_rpc "https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/lib/rpc.mjs"
click node_eval_tasks "https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/tasks.mjs"
click node_eval_score "https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/lib/score.mjs"
click node_eval_report "https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/lib/report.mjs"
click node_eval_metrics "https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/metrics.mjs"
click node_nextest "https://github.com/intent-hq/intent/blob/main/scripts/nextest_stress.py"
click node_resumable "https://github.com/intent-hq/intent/blob/main/scripts/resumable_nextest.py"
click node_storage_gate "https://github.com/intent-hq/intent/blob/main/scripts/gate_storage.py"
click node_tomli_parser "https://github.com/intent-hq/intent/blob/main/scripts/_vendor/tomli/_parser.py"
click node_tomli_types "https://github.com/intent-hq/intent/blob/main/scripts/_vendor/tomli/_types.py"
click node_agent_toggle_check "https://github.com/intent-hq/intent/blob/main/scripts/check-agent-feature-toggles.mjs"
click node_doc_link_check "https://github.com/intent-hq/intent/blob/main/scripts/check-doc-links.mjs"
click node_makefile_check "https://github.com/intent-hq/intent/blob/main/scripts/check-makefile-targets.mjs"
click node_mcp_check "https://github.com/intent-hq/intent/blob/main/scripts/check-mcp-bindings.mjs"
click node_markdown_scan "https://github.com/intent-hq/intent/blob/main/scripts/lib/markdown-tables.mjs"
click node_fixture_copy "https://github.com/intent-hq/intent/blob/main/scripts/lib/fixture-copy.mjs"
click node_submodule_ref "https://github.com/intent-hq/intent/blob/main/scripts/submodule-ref.mjs"
click node_fleet_slots "https://github.com/intent-hq/intent/blob/main/infra/runners/fleet_slots.py"
click node_smoke_plan "https://github.com/intent-hq/intent/blob/main/infra/runners/smoke_plan.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_eval_runner,node_eval_daemon,node_eval_rpc,node_eval_tasks,node_eval_score,node_eval_report,node_eval_metrics toneBlue
class node_nextest,node_resumable,node_storage_gate,node_tomli_parser,node_tomli_types toneAmber
class node_agent_toggle_check,node_doc_link_check,node_makefile_check,node_mcp_check,node_markdown_scan,node_fixture_copy,node_submodule_ref toneMint
class node_fleet_slots,node_smoke_plan toneRose
class node_agent_actor,node_runner_fleet toneIndigo
```

## Components

### Agent evaluation

- [Eval runner](https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/run.mjs): `scripts/agent-eval/run.mjs`
- [Isolated daemon](https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/lib/daemon.mjs): `scripts/agent-eval/lib/daemon.mjs`
- [RPC client](https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/lib/rpc.mjs): `scripts/agent-eval/lib/rpc.mjs`
- [Task scenarios](https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/tasks.mjs): `scripts/agent-eval/tasks.mjs`
- [Transcript scoring](https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/lib/score.mjs): `scripts/agent-eval/lib/score.mjs`
- [Report rendering](https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/lib/report.mjs): `scripts/agent-eval/lib/report.mjs`
- [Stored metrics](https://github.com/intent-hq/intent/blob/main/scripts/agent-eval/metrics.mjs): `scripts/agent-eval/metrics.mjs`

### Test gate support

- [Nextest stress runner](https://github.com/intent-hq/intent/blob/main/scripts/nextest_stress.py): `scripts/nextest_stress.py`
- [Resumable test runner](https://github.com/intent-hq/intent/blob/main/scripts/resumable_nextest.py): `scripts/resumable_nextest.py`
- [Gate storage policy](https://github.com/intent-hq/intent/blob/main/scripts/gate_storage.py): `scripts/gate_storage.py`
- [TOML parser](https://github.com/intent-hq/intent/blob/main/scripts/_vendor/tomli/_parser.py): `scripts/_vendor/tomli/_parser.py`
- [TOML types](https://github.com/intent-hq/intent/blob/main/scripts/_vendor/tomli/_types.py): `scripts/_vendor/tomli/_types.py`

### Repository checks

- [Agent toggle check](https://github.com/intent-hq/intent/blob/main/scripts/check-agent-feature-toggles.mjs): `scripts/check-agent-feature-toggles.mjs`
- [Documentation link check](https://github.com/intent-hq/intent/blob/main/scripts/check-doc-links.mjs): `scripts/check-doc-links.mjs`
- [Makefile target check](https://github.com/intent-hq/intent/blob/main/scripts/check-makefile-targets.mjs): `scripts/check-makefile-targets.mjs`
- [MCP binding check](https://github.com/intent-hq/intent/blob/main/scripts/check-mcp-bindings.mjs): `scripts/check-mcp-bindings.mjs`
- [Markdown scanner](https://github.com/intent-hq/intent/blob/main/scripts/lib/markdown-tables.mjs): `scripts/lib/markdown-tables.mjs`
- [Fixture copy utility](https://github.com/intent-hq/intent/blob/main/scripts/lib/fixture-copy.mjs): `scripts/lib/fixture-copy.mjs`
- [Submodule ref utility](https://github.com/intent-hq/intent/blob/main/scripts/submodule-ref.mjs): `scripts/submodule-ref.mjs`

### Runner fleet

- [Fleet slot totals](https://github.com/intent-hq/intent/blob/main/infra/runners/fleet_slots.py): `infra/runners/fleet_slots.py`
- [Smoke plan](https://github.com/intent-hq/intent/blob/main/infra/runners/smoke_plan.py): `infra/runners/smoke_plan.py`

### Other components

- **Coding agents**
- **Self-hosted runners**

## Connections

- Eval runner → Isolated daemon: starts (evidence: `scripts/agent-eval/run.mjs`)
- Eval runner → RPC client: connects (evidence: `scripts/agent-eval/run.mjs`)
- Eval runner → Task scenarios: loads tasks (evidence: `scripts/agent-eval/run.mjs`)
- Eval runner → Transcript scoring: scores transcripts (evidence: `scripts/agent-eval/run.mjs`)
- Eval runner → Report rendering: renders report (evidence: `scripts/agent-eval/run.mjs`)
- Isolated daemon → RPC client: connects via (evidence: `scripts/agent-eval/lib/daemon.mjs`)
- Eval runner → Coding agents: evaluates
- Stored metrics → Transcript scoring: uses scoring (evidence: `scripts/agent-eval/metrics.mjs`)
- Resumable test runner → Gate storage policy: uses policy (evidence: `scripts/resumable_nextest.py`)
- Resumable test runner → Nextest stress runner: uses runner (evidence: `scripts/resumable_nextest.py`)
- Resumable test runner → TOML parser: parses TOML (evidence: `scripts/resumable_nextest.py`)
- TOML parser → TOML types: imports types (evidence: `scripts/_vendor/tomli/_parser.py`)
- Agent toggle check → Submodule ref utility: uses ref helper (evidence: `scripts/check-agent-feature-toggles.mjs`)
- MCP binding check → Submodule ref utility: uses ref helper (evidence: `scripts/check-mcp-bindings.mjs`)
- MCP binding check → Makefile target check: references check (evidence: `scripts/check-mcp-bindings.mjs`)
- Documentation link check → Markdown scanner: uses scanner
- Fixture copy utility → Self-hosted runners: validates copies
- Fleet slot totals → Smoke plan: imports fleet config (evidence: `infra/runners/fleet_slots.py`)
- Fleet slot totals → Self-hosted runners: totals capacity (evidence: `infra/runners/fleet_slots.py`)
- Smoke plan → Self-hosted runners: plans jobs
