openharness / cli
AGENTS.md1.1k starsChanged 58 days agoMITView on GitHub
Read this before changing anything under cli/. The repository-wide process rules (validation, merging, releases) are in ../AGENTS.md. The design, and why, is in ../docs/design/2026-10-03-harnessd.md. The one-page picture for new contributors is ../docs/design/2026-10-04-harnessd-before-after.md. src/cli.ts runForeground() is the composition root: it creates the modules and wires them together. src/backendSocket.ts is the transport: it receives frames and dispatches them. 1. No logic in runForeground or the backendSocket.ts request switch. Wiring and dispatch only: a handler there is one call into a module or…
Trending
More talk lately.thin dataabout the whole repository
Who's talking about autonomous-ai/openharness
- sudosubin/agents.nix“agent-skills.github.autonomous-ai.openharness: 0-unstable-2026-10-03 → 0-unstable-2026-10-05”GitHub · Oct 5, 2026
- sudosubin/agents.nix“agent-skills.github.autonomous-ai.openharness: 5b3e9b3 → 03bed81”GitHub · Oct 4, 2026
- sudosubin/agents.nix“agent-skills.github.autonomous-ai.openharness: init at 0-unstable-2026-10-03”GitHub · Oct 3, 2026
- nicktoumpelis/clocwork“Read Kilo Code's token usage”GitHub · Sep 21, 2026
The biggest 4 of 4 mentions linking to the repository that our crawl found. Each line is their own headline.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- desktop/AGENTS.mdAGENTS.md
- store/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cli/CLAUDE.mdCLAUDE.md
- desktop/CLAUDE.mdCLAUDE.md
- store/CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
Read this before changing anything under cli/.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
The Harness CLI and daemon (harnessd)
Read this before changing anything under cli/. The repository-wide process rules (validation,
merging, releases) are in ../AGENTS.md. The design, and why, is in
../docs/design/2026-10-03-harnessd.md. The one-page picture
for new contributors is ../docs/design/2026-10-04-harnessd-before-after.md.
The shape: master, core, services
MASTER src/harnessd/ supervises: starts, watches, restarts. No feature code, no network.
CORE src/core/ owns sessions: agents, terminals, transcripts, turns, input, questions.
Must never go down. Grows only for what every session needs.
SERVICES src/services/ everything else: search, viewers, models, workspaces, … and new features.
Reaches the core only through core/api.ts; can fail without the core.src/cli.ts runForeground() is the composition root: it creates the modules and wires them
together. src/backendSocket.ts is the transport: it receives frames and dispatches them.
Where new code goes
| You are adding | Put it in | Not in |
| A new feature (anything a session can run without) | a new service, src/services/<name>.ts | the core, cli.ts, backendSocket.ts |
| A request the apps send to a feature | the service's start returns its handler (src/services/AGENTS.md) | a case in backendSocket.ts, a slot on BackendSocket |
| Behaviour of agents, terminals, transcripts, turns, input or questions | the module under src/core/ that owns it | cli.ts |
| Support for an engine (Claude Code, Codex, …) | src/engines/<engine>/ | the core |
| A pure helper with no daemon state | src/lib/ | the core |
| Supervision of processes | src/harnessd/ | anywhere else |
Rules
- No logic in
runForegroundor thebackendSocket.tsrequest switch. Wiring and dispatch only: a handler there is one call into a module or service.src/architecture.spec.tsfails when either grows; move the logic out instead of raising the budget. - A feature is a service. It runs against
CoreApiand is reached through a port inCorePorts, both insrc/core/api.ts. A service never imports core modules, the registry,cli.tsorbackendSocket.ts(src/architecture.spec.tschecks it). See src/services/AGENTS.md. - The core does not wait on a service and does not crash with one. Services start through
serviceHost.start(); every port declares fallbacks beside it incore/api.ts. - 100% coverage, per file, for
src/core/,src/services/(npm run test:core) andsrc/harnessd/(npm run test:harnessd). CI enforces both. Write the test that fails without your change. - End to end for every user-facing flow (
npm run test:e2e,e2e/): the real daemon, a private tmux server and fake Claude Code and Codex engines (e2e/harness/fakeEngine.mjs). Prefer extending the fake engine faithfully over loosening a test. - Never test against the developer's own machine. Tests use a throwaway home and data folder:
never the real
~/.claude,~/.codex, daemon (port 18473) or tmux server. In tmux tests unsetTMUXandTMUX_PANE, and pointTMUX_TMPDIRat a folder that exists (src/testing/isolatedTmux.ts). - Comments say why, in plain sentences. Name the incident or the measurement that made the code the way it is; that history is what keeps the next change from undoing it.
Commands
npm run typecheck # tsc
npm test # the unit suite
npm run test:core # src/core and src/services at 100%
npm run test:harnessd # src/harnessd at 100%
npm run test:e2e # the real daemon, end to endDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

