agentleFS
autonomous-aiautonomous-ai/openharness/cli/AGENTS.md

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

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 3 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the autonomous-ai/openharness repository that our weekly crawl found: only 4 in all, so this is a hint, not a trend. There is no adoption data for this file yet.
  • 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.

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
  1. Very specific:

    Read this before changing anything under cli/.

    line 3

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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 addingPut it inNot in
A new feature (anything a session can run without)a new service, src/services/<name>.tsthe core, cli.ts, backendSocket.ts
A request the apps send to a featurethe 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 questionsthe module under src/core/ that owns itcli.ts
Support for an engine (Claude Code, Codex, …)src/engines/<engine>/the core
A pure helper with no daemon statesrc/lib/the core
Supervision of processessrc/harnessd/anywhere else

Rules

  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 service. src/architecture.spec.ts fails when either grows; move the logic out instead of raising the budget.
  2. A feature is a service. It runs against CoreApi and is reached through a port in CorePorts, both in src/core/api.ts. A service never imports core modules, the registry, cli.ts or backendSocket.ts (src/architecture.spec.ts checks it). See src/services/AGENTS.md.
  3. 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 in core/api.ts.
  4. 100% coverage, per file, for src/core/, src/services/ (npm run test:core) and src/harnessd/ (npm run test:harnessd). CI enforces both. Write the test that fails without your change.
  5. 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.
  6. 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 unset TMUX and TMUX_PANE, and point TMUX_TMPDIR at a folder that exists (src/testing/isolatedTmux.ts).
  7. 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 end

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.