better-harness
AGENTS.md2.4k starsChanged 3 months agoMITView on GitHub
Cross-platform support is required (Windows, macOS, Linux). Architecture, directory routing, and template ownership live in docs/ARCHITECTURE.md. Adding support for a new Coding Agent host starts with docs/adapters/contributing-new-coding-agent.md. - DESIGN.md is the visual source of truth for Harness Studio and interactive Better Harness reports unless a surface owns a narrower approved contract. Read it before changing UI hierarchy, typography, color, density, components, interaction states, or responsive behavior. - Keep AGENTS.md as the routing and enforcement layer; put reusable tokens, visual rationale,…
Trending
More talk lately.thin dataabout the whole repository
Who's talking about QoderAI/better-harness
- sudosubin/agents.nix“agent-skills.github.qoderai.better-harness: init at 0.6.6”GitHub · Oct 1, 2026
- wxf8126275/sean-skills“feat(sean): v3.2.0 — Agent Work Loop 五维评估 + 学习沉淀闭环”GitHub · Sep 29, 2026
- wikicommit/ai-driven-dev-wiki“wiki: bulk update 2026-09-25”GitHub · Sep 25, 2026
- junjiezhou1122/OpenFactory“agent harness”GitHub · Sep 1, 2026
- skysthelimitpainting1779-collab/harness-agent“Mine evidence-backed harness weaknesses with Better Harness Inspector”GitHub · Aug 14, 2026
The biggest 5 of 5 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.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
32 rules. About 0 are common, 9 are distinctive, and 23 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
23
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 15
Keep AGENTS.md as the routing and enforcement layer.
- Distinctive: line 17
Treat Studio as a VS Code-inspired docked workbench: prefer panes, rows, tabs, toolbars, and editor views over cards, and define pointer …
- Very specific: line 29
Write a plan or spec for new agents, hooks, or major features under docs/specs/<yyyy-mm-dd>-<spec-name>.md, using the spec's creation date.
- Very specific: line 33
Prefer docs/specs/<yyyy-mm-dd>-<story-id>-<slug>.md when there is a Story or issue id.
- Very specific: line 35
Keep specs reviewable: include intent, acceptance scenarios with stable AC ids, non-goals, plan/tasks, and test/review evidence.
- Very specific: line 37
Keep docs/specs/*.md titles human-readable.
- Very specific: line 38
Put traceability metadata in the body: Spec ID, optional Story, and Status in a short ## Traceability section.
- Very specific: line 42
Do not proactively edit CHANGELOG.md, release notes, version files, roadmap/status documents, or other task-external project metadata.
- Distinctive: line 59
Keep support-level claims honest: a host's placement in the README is a display choice, not its verification level.
- Very specific: line 68
Treat native filesystem paths as host data.
- Very specific: line 72
Keep portable format paths separate from filesystem paths.
- Very specific: line 76
Prefer Node APIs and execFile argv arrays over shell-specific commands or quoting.
- Distinctive: line 79
Do not make fixtures depend on checkout newline conversion, executable bits, case-sensitive filesystems, or raw absolute-path string …
- Very specific: line 91
Do not add pattern-matching assertions as a shortcut for coverage.
- Distinctive: line 96
Never add a test that walks the repository and greps every file for a forbidden literal.
- Distinctive: line 105
When a test does need to read a file, assert a property of the parsed result (imports resolved, exports present, JSON shape valid) rather …
- Very specific: line 111
Run npm run preview, then smoke-test http://localhost:58575/health and /canvas-module.js to ensure TSX transforms and SDK runtime load.
- Very specific: line 115
All relative .md references across skills/, references/, templates/, models/, docs/, and case-studies/ must resolve.
- Very specific: line 117
After adding, moving, or renaming markdown docs, run npx vitest run test/skills-docs/doc-link-graph.test.mjs before committing, and …
- Very specific: line 120
Every reference doc shipped under skills/better-harness/references/ must stay reachable from SKILL.md routing, otherwise agents can never …
- Very specific: line 129
Do not add tool- or agent-specific prefixes such as codex/ or agent/ unless a maintainer explicitly requests one.
- Distinctive: line 130
Keep the description concise and portable across filesystems and shells.
- Very specific: line 134
Always add co-author information.
- Distinctive: line 135
Only ONE co-author line is allowed.
- Very specific: line 148
Use Conventional Commits: <type>(<scope>): <summary>, blank line, then a prose body when non-trivial.
- Very specific: line 149
Prefer feat, fix, test, docs, refactor, chore.
- Very specific: line 151
Keep summaries imperative, lower-case after the type, and under 72 characters when practical.
- Very specific: line 152
Do not use vague subjects like update, changes, or fix stuff.
- Very specific: line 159
Use .agents/skills/change-traceability-review/SKILL.md as the Story/Spec/Test/Risk evidence-chain review guide, not a code-style guide.
- Distinctive: line 160
Before review, merge, or commit of a non-trivial change, run a Review Readiness Check over the staged or local diff: Story evidence, …
- Very specific: line 162
Use Review Retrospective for process tuning across recent history: commit messages, Story/Spec/Test/Risk coverage, oversized commits, …
- Distinctive: line 164
Do not infer Story ids, AI involvement, tracker status, CI status, or spec content from branch names, prose style, timestamps, or topic …
≈ “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
Better Harness
Cross-platform support is required (Windows, macOS, Linux). Architecture, directory routing, and template ownership live in docs/ARCHITECTURE.md. Adding support for a new Coding Agent host starts with docs/adapters/contributing-new-coding-agent.md.
UI and Visual Design
- DESIGN.md is the visual source of truth for Harness Studio and interactive Better Harness reports unless a surface owns a narrower approved contract. Read it before changing UI hierarchy, typography, color, density, components, interaction states, or responsive behavior.
- Keep
AGENTS.mdas the routing and enforcement layer; put reusable tokens, visual rationale, component rules, and do/don't guidance inDESIGN.md. - Treat Studio as a VS Code-inspired docked workbench: prefer panes, rows, tabs, toolbars, and editor views over cards, and define pointer and keyboard behavior before adding or changing an interaction.
- Map Studio styles to shared semantic tokens. Do not introduce one-off colors,
font sizes, radii, shadows, an unbundled font family, or broad
!importantoverrides when the design contract already defines the role. - Visual review must prove the primary decision remains obvious at wide, compact, and narrow layouts. Verify keyboard focus, bounded overflow, browser console/page errors, and screenshots for every changed Studio surface.
Plan & Spec
- Write a plan or spec for new agents, hooks, or major features under
docs/specs/<yyyy-mm-dd>-<spec-name>.md, using the spec's creation date. - For non-trivial behavior changes to
skills/,hooks/,scripts/,templates/, adapters, report formats, or review workflows, use.agents/skills/change-traceability-review/SKILL.mdin Spec Preparation mode before implementation. - Prefer
docs/specs/<yyyy-mm-dd>-<story-id>-<slug>.mdwhen there is a Story or issue id; otherwise usedocs/specs/<yyyy-mm-dd>-<slug>.mdfor justified maintenance, docs-only, test-only, dependency, or infra work. - Keep specs reviewable: include intent, acceptance scenarios with stable AC ids, non-goals, plan/tasks, and test/review evidence.
Mark unknowns with
[NEEDS CLARIFICATION: ...]. - Keep
docs/specs/*.mdtitles human-readable. Do not put Story ids, status, or review state in titles, and do not use YAML front matter by default. - Put traceability metadata in the body:
Spec ID, optionalStory, andStatusin a short## Traceabilitysection.
Change Scope
- Do not proactively edit
CHANGELOG.md, release notes, version files, roadmap/status documents, or other task-external project metadata. Change them only when the user explicitly requests it or a pre-existing issue, spec, or acceptance criterion requires it; user-visible behavior alone is not authorization.
Host Adapters
- The supported host set is deliberately bounded. Do not add a new host adapter without an explicit maintainer decision or a pre-existing issue/spec; a host being technically installable is not by itself justification to add one.
README.mdandREADME.zh-CN.mdInstallation sections are reserved for the most common hosts with inline setup steps. Do not add a full per-host install section for an additional or adapter-support host. Document its setup and boundaries in the installation guide (docs/docs/installation.mdx) and the Host Adapter Matrix (docs/docs/hosts/adapter-matrix.md and docs/adapters/README.md), and reference it from the README "More adapters" list instead.- Keep support-level claims honest: a host's placement in the README is a display choice, not its verification level. Do not downgrade a host's matrix positioning (for example, from Verified Quickstart to adapter support) only to shorten the README.
Test and Verify
Cross-platform behavior
- Treat native filesystem paths as host data. Build and inspect them with
node:path(join,resolve,relative,basename, anddirname) rather than splitting on/, concatenating separators, assuming/tmp, or ignoring Windows drive letters and UNC roots. - Keep portable format paths separate from filesystem paths. Persisted artifact,
archive, URL, protocol, and receipt paths use their specified separator (often
node:path.posix); when simulating a target OS, selectposixorwin32from that explicit target instead of the host running the test. - Prefer Node APIs and
execFileargv arrays over shell-specific commands or quoting. If a shell is part of the contract, cover the intended PowerShell,cmd.exe, or POSIX-shell behavior explicitly. - Do not make fixtures depend on checkout newline conversion, executable bits, case-sensitive filesystems, or raw absolute-path string equality unless that platform behavior is the contract. Normalize only at the boundary the test is meant to ignore.
- A local POSIX pass is not Windows evidence. Reproduce platform semantics with focused tests where possible, and use the corresponding GitHub Actions job as the authoritative receipt before declaring a Windows, macOS, or Linux failure fixed.
- Assert on behaviour, not on text that happens to contain it. Prefer calling the function and checking its returned value, shape, or error over matching a pattern against source code, rendered markup, or CLI output.
- Do not add pattern-matching assertions as a shortcut for coverage. A
assert.match(source, /functionName/)proves a string exists; it does not prove the behaviour works, it passes while the feature is broken, and it fails when an unrelated rename touches the text. If the only way to observe something is to grep for it, the code needs an exported seam, not a regex. - Never add a test that walks the repository and greps every file for a forbidden literal. Such tests fail on unrelated local files, editor state, and tool config that the change did not touch, and they train contributors to obfuscate strings rather than fix anything. Enforce naming and branding in review or in lint, not as a repo-wide scan.
- Regex is acceptable where it is the actual contract: a frozen CLI help or error
channel, a redaction guarantee (
doesNotMatchfor a secret or absolute path), or a schema-shaped string. Keep those narrow and name the contract in the assertion's test title. - When a test does need to read a file, assert a property of the parsed result (imports resolved, exports present, JSON shape valid) rather than a property of its raw characters.
- Design scripts and code for AI-friendly automated use, and validate automation with an AI agent when relevant,
e.g. Qoder via
qodercli -por Codex viacodex -p. - For visual changes, verify with Playwright against the preview URL, inspect console/page errors, and save a screenshot for layout review.
- Run
npm run preview, then smoke-testhttp://localhost:58575/healthand/canvas-module.jsto ensure TSX transforms and SDK runtime load.
Doc Link Integrity
- All relative
.mdreferences acrossskills/,references/,templates/,models/,docs/, andcase-studies/must resolve;test/skills-docs/doc-link-graph.test.mjsenforces this innpm test. - After adding, moving, or renaming markdown docs, run
npx vitest run test/skills-docs/doc-link-graph.test.mjsbefore committing, and regenerate the routing graph withnode scripts/doc-link-graph/cli.mjs skills/better-harness(it rewritesdocs/better-harness-doc-links.mmd, which the test checks for staleness). - Every reference doc shipped under
skills/better-harness/references/must stay reachable fromSKILL.mdrouting, otherwise agents can never load it.
Branch Names
- Name branches
<type>/<short-kebab-case-description>, using the same intent-based types as Conventional Commits:feat,fix,test,docs,refactor, orchore. - Choose the type from the purpose of the change, not only the files it touches. For example, a test-only change that fixes
a CI failure uses
fix/<description>. - Do not add tool- or agent-specific prefixes such as
codex/oragent/unless a maintainer explicitly requests one. - Keep the description concise and portable across filesystems and shells; use lowercase ASCII words separated by hyphens.
Co-Author Format
- Always add co-author information. If closing an issue in commit text, verify against
mainfirst:gh issue view <issue-id>. - Only ONE co-author line is allowed. If multiple agents contributed, aggregate into ONE entry
Format example: Co-authored-by: <AgentName> (<You-Model>) <Email>
Valid examples (choose EXACTLY ONE):
Co-authored-by: GitHub Copilot Agent (GPT 5.5) 198982749+copilot@users.noreply.github.com Co-authored-by: Codex (GPT 5.6 Sol) codex@openai.com Co-authored-by: QoderAI (Qwen 3.8 Max) qoder_ai@qoder.com Co-authored-by: augment-app-staging[bot] <182802480+augment-app-staging[bot]@users.noreply.github.com>
Commit Messages
- Use Conventional Commits:
<type>(<scope>): <summary>, blank line, then a prose body when non-trivial. - Prefer
feat,fix,test,docs,refactor,chore; scopes should name affected areas such ashooks,canvas,templates,agents, ordeps. - Keep summaries imperative, lower-case after the type, and under 72 characters when practical.
Do not use vague subjects like
update,changes, orfix stuff. - Agent-authored non-trivial commits need a normal prose body explaining what changed, why, and how it was validated.
- For spec-backed commits, naturally mention the Story/spec/test evidence in the body. Use
Story:,Spec:,Test:,Risk:,AI:, orRefs:trailers only when a reviewer, host tool, or external workflow explicitly requires them.
Change Traceability Review
- Use
.agents/skills/change-traceability-review/SKILL.mdas the Story/Spec/Test/Risk evidence-chain review guide, not a code-style guide. - Before review, merge, or commit of a non-trivial change, run a Review Readiness Check over the staged or local diff: Story evidence, matching Spec, tests, risk, AI marker, changed modules, generated files, and staged/unstaged split.
- Use Review Retrospective for process tuning across recent history: commit messages, Story/Spec/Test/Risk coverage, oversized commits, repeated rework, automation commits, and missing review evidence.
- Do not infer Story ids, AI involvement, tracker status, CI status, or spec content from branch names, prose style, timestamps, or topic similarity. Count only visible local evidence or explicitly opened external evidence.
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
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.

