# remote-controlled-man/skillfit architecture

> Architecture diagram of the GitHub repository remote-controlled-man/skillfit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/remote-controlled-man/skillfit
- Repository: https://github.com/remote-controlled-man/skillfit

## Overview

skillfit is a CLI for checking agent-configuration health, measuring configuration effects on task benches, and installing only selected profiles. The main evaluation path is CLI → eval command → harness runs paired baseline/treatment trials, grades outputs, and summarizes evidence; trigger mode additionally captures whether an installed skill was invoked. Other product branches cover bench authoring/validation, health checks, usage receipts, and managed installation. The tree and excerpts support the major modules, but some command and harness wiring is unsampled, so uncertain internal links are omitted.

Main entry points: [`src/harness/runner.ts`](https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/runner.ts) (Trial runner), [`src/cli.ts`](https://github.com/remote-controlled-man/skillfit/blob/main/src/cli.ts) (Command router), [`src/commands/eval.ts`](https://github.com/remote-controlled-man/skillfit/blob/main/src/commands/eval.ts) (Eval command), [`src/harness/executors`](https://github.com/remote-controlled-man/skillfit/tree/main/src/harness/executors) (Agent executors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI entry"]
  node_cli["Command router<br/>[cli.ts]"]
end

subgraph group_evaluation["Evaluation"]
  node_evalcmd["Eval command<br/>[eval.ts]"]
  node_runner["Trial runner<br/>[runner.ts]"]
  node_prompt["Prompt builder<br/>[prompt.ts]"]
  node_executors["Agent executors"]
  node_verifier["Verifier summary"]
  node_judge["Blind judge<br/>[judge.ts]"]
  node_stats["Trial statistics<br/>[stats.ts]"]
  node_reporting["Run reports<br/>[report.ts]"]
end

subgraph group_configuration["Configuration"]
  node_doctor["Setup health<br/>[doctor.ts]"]
  node_receipts["Usage receipts<br/>[report.ts]"]
  node_install["Profile installer<br/>[install.ts]"]
  node_agentdefs["Agent definitions<br/>[agents.ts]"]
end

subgraph group_bench["Bench authoring"]
  node_benchcmd["Bench commands"]
  node_benchdata["Bench tasks"]
end

node_user(("Operator"))
node_agentcli(("Agent CLI"))
node_api(("Model API"))
node_localfiles[("Local agent setup")]

node_user -->|"runs command"| node_cli
node_cli -->|"dispatches eval"| node_evalcmd
node_cli -->|"dispatches doctor"| node_doctor
node_cli -->|"dispatches report"| node_receipts
node_cli -->|"dispatches install"| node_install
node_cli -->|"dispatches bench"| node_benchcmd
node_evalcmd -->|"selects tasks"| node_benchdata
node_evalcmd -->|"runs trials"| node_runner
node_runner -->|"builds prompts"| node_prompt
node_runner -->|"executes trial"| node_executors
node_executors -->|"invokes agent"| node_agentcli
node_executors -.->|"calls model"| node_api
node_runner -->|"summarizes verdict"| node_verifier
node_runner -->|"judges pairs"| node_judge
node_runner -->|"summarizes trials"| node_stats
node_runner -->|"builds report"| node_reporting
node_benchcmd -->|"creates or checks"| node_benchdata
node_doctor -->|"loads definitions"| node_agentdefs
node_doctor -->|"inspects setup"| node_localfiles
node_receipts -->|"reads history"| node_localfiles
node_install -->|"selects targets"| node_agentdefs
node_install -->|"writes configuration"| node_localfiles

click node_cli "https://github.com/remote-controlled-man/skillfit/blob/main/src/cli.ts"
click node_evalcmd "https://github.com/remote-controlled-man/skillfit/blob/main/src/commands/eval.ts"
click node_runner "https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/runner.ts"
click node_prompt "https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/prompt.ts"
click node_executors "https://github.com/remote-controlled-man/skillfit/tree/main/src/harness/executors"
click node_verifier "https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/verifier-summary.ts"
click node_judge "https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/judge.ts"
click node_stats "https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/stats.ts"
click node_reporting "https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/report.ts"
click node_benchcmd "https://github.com/remote-controlled-man/skillfit/tree/main/src/commands"
click node_benchdata "https://github.com/remote-controlled-man/skillfit/tree/main/benches"
click node_doctor "https://github.com/remote-controlled-man/skillfit/blob/main/src/commands/doctor.ts"
click node_receipts "https://github.com/remote-controlled-man/skillfit/blob/main/src/commands/report.ts"
click node_install "https://github.com/remote-controlled-man/skillfit/blob/main/src/commands/install.ts"
click node_agentdefs "https://github.com/remote-controlled-man/skillfit/blob/main/src/agents.ts"

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_cli toneBlue
class node_evalcmd,node_runner,node_prompt,node_executors,node_verifier,node_judge,node_stats,node_reporting,node_localfiles toneAmber
class node_doctor,node_receipts,node_install,node_agentdefs,node_api toneMint
class node_benchcmd,node_benchdata toneRose
class node_user,node_agentcli toneIndigo
```

## Components

### CLI entry

- [Command router](https://github.com/remote-controlled-man/skillfit/blob/main/src/cli.ts): `src/cli.ts`

### Evaluation

- [Eval command](https://github.com/remote-controlled-man/skillfit/blob/main/src/commands/eval.ts): `src/commands/eval.ts`
- [Trial runner](https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/runner.ts): `src/harness/runner.ts`
- [Prompt builder](https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/prompt.ts): `src/harness/prompt.ts`
- [Agent executors](https://github.com/remote-controlled-man/skillfit/tree/main/src/harness/executors): `src/harness/executors`
- [Verifier summary](https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/verifier-summary.ts): `src/harness/verifier-summary.ts`
- [Blind judge](https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/judge.ts): `src/harness/judge.ts`
- [Trial statistics](https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/stats.ts): `src/harness/stats.ts`
- [Run reports](https://github.com/remote-controlled-man/skillfit/blob/main/src/harness/report.ts): `src/harness/report.ts`

### Configuration

- [Setup health](https://github.com/remote-controlled-man/skillfit/blob/main/src/commands/doctor.ts): `src/commands/doctor.ts`
- [Usage receipts](https://github.com/remote-controlled-man/skillfit/blob/main/src/commands/report.ts): `src/commands/report.ts`
- [Profile installer](https://github.com/remote-controlled-man/skillfit/blob/main/src/commands/install.ts): `src/commands/install.ts`
- [Agent definitions](https://github.com/remote-controlled-man/skillfit/blob/main/src/agents.ts): `src/agents.ts`

### Bench authoring

- [Bench commands](https://github.com/remote-controlled-man/skillfit/tree/main/src/commands): `src/commands`
- [Bench tasks](https://github.com/remote-controlled-man/skillfit/tree/main/benches): `benches`

### Other components

- **Operator**
- **Agent CLI**
- **Model API**
- **Local agent setup**

## Connections

- Operator → Command router: runs command
- Command router → Eval command: dispatches eval
- Command router → Setup health: dispatches doctor
- Command router → Usage receipts: dispatches report
- Command router → Profile installer: dispatches install
- Command router → Bench commands: dispatches bench
- Eval command → Bench tasks: selects tasks
- Eval command → Trial runner: runs trials
- Trial runner → Prompt builder: builds prompts
- Trial runner → Agent executors: executes trial
- Agent executors → Agent CLI: invokes agent
- Agent executors → Model API: calls model
- Trial runner → Verifier summary: summarizes verdict
- Trial runner → Blind judge: judges pairs
- Trial runner → Trial statistics: summarizes trials
- Trial runner → Run reports: builds report
- Bench commands → Bench tasks: creates or checks
- Setup health → Agent definitions: loads definitions
- Setup health → Local agent setup: inspects setup
- Usage receipts → Local agent setup: reads history
- Profile installer → Agent definitions: selects targets
- Profile installer → Local agent setup: writes configuration
