harness-setup
Skill1 starsChanged 2 months agoMITView on GitHub
Use to install or finish setting up the task harness in a repository - it detects the stack, interviews the human for every decision the installer cannot infer, and writes the gate config, the mandatory loop, the architecture adoption map and the index. Use it on a repository with no harness, and on one where docs/harness still contains TODO(harness) markers.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- chocomyong/harness-kittheir own version, first seen Nov 1, 2026
- GangJaeYu/harness_loop_full_koreantheir own version, first seen Oct 29, 2026
- hmj1026/dhpktheir own version, first seen Oct 13, 2026
- Chachamaru127/claude-code-harnesstheir own version, first seen Oct 13, 2026
- MrBogomips/agentic-harnesstheir own version, first seen Jun 13, 2026
- ArtLjn/harness-setuptheir own version, first seen May 9, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- Chachamaru127/claude-code-harness★ 3.2ksame name
- GangJaeYu/harness_loop_full_korean★ 4same name
- chocomyong/harness-kit★ 2same name
- hmj1026/dhpk★ 2same name
- BedirT/harness-setup★ 1same name
- MrBogomips/agentic-harness★ 1same name
- ArtLjn/harness-setup★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-reviewSkill
- architecture-guidelinesSkill
- auto-run-taskSkill
- code-auditingSkill
- commitSkill
- enrich-taskSkill
- run-taskSkill
- runtime-verificationSkill
- start-projectSkill
- update-docsSkill
- using-git-worktreesSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Detect first, then ask: Never ask what you can read.
- Distinctive: line 30
Never invent a decision: If they do not answer something, write the question into the document as an explicit open question, marked as …
- Distinctive: line 70
Ask in five rounds, in this order.
- Very specific: line 74
Keep every question concrete.
- Very specific: line 109
Only after an explicit agent, ask a separate question: whether to add Bash(scripts/harness/land:*) to the allow list in …
- Distinctive: line 152
Never a real credential - name where the human keeps it instead.
- Distinctive: line 161
When the step does not apply at all - a library with no runtime surface of its own - and why.
- Distinctive: line 180
If AGENTS.md does not exist or does not mention the harness, propose the section.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
harness-setup
norma install puts the mechanical half in place: the gate, the hook, the skills,
and templates full of TODO(harness) markers. Those markers are the half that
encodes decisions - your layers, your commands, your conventions - and no installer
can infer them. This procedure fills them by asking.
A harness left half-installed is worse than none: the loop points at documents that
say TODO, and every agent that reads them learns that the rules are decoration.
Portability
This procedure references files by path, never by an agent-specific shortcut, so
it runs identically whichever agent executes it. If you are Claude Code it is also
invocable as /harness-setup; any other agent reads this file.
The two rules
- Detect first, then ask. Never ask what you can read. Come to the human with
proposals - "your gates look like
pnpm lint && pnpm typecheck, right?" - not with a blank form. An interview that makes them type what is already inpackage.jsonwill be abandoned halfway. - Never invent a decision. If they do not answer something, write the question into the document as an explicit open question, marked as unanswered. A guessed convention that everybody then follows is worse than an admitted gap.
0. Locate the harness
norma doctor- Command not found: the harness repository is not installed on this machine. Ask
the human for its location, then tell them the two commands (clone it, and
ln -s <repo>/bin/norma ~/.local/bin/norma). Do not clone anything yourself without being asked. - It reports no harness in this repository: run
norma install --dry-run, show the human what it would do, and runnorma installonce they agree. - It reports TODOs or missing pieces: that list is your worklist.
1. Read the repository before asking anything
Build a findings sheet. Look for:
- Build and test commands - the package manifest's scripts, the CI workflow (it is the most honest statement of what must pass), the README's contributing notes.
- What already enforces the architecture - a dependency linter, a boundary
check, an architecture test suite, a lint config with import rules. This is the
single most important thing to find: it goes into
harness_gates, and it means you must not add a second mechanism that competes with it. - The layer layout - the directory structure, and any document that describes it. Prefer the document.
- Branch and roadmap conventions -
git branch -afor the naming pattern in use, plus any roadmap or phase documents. - Where decisions live - an ADR directory, a decision log, a spec registry.
- The default branch name, so the hook's refusal matches reality.
Report the sheet to the human in a few lines before the first question. It shows them what you already know and what you are about to ask about.
2. Interview, in rounds
Ask in five rounds, in this order. Each round is a handful of questions with your proposed answer attached. STOP after each round and wait: a wrong answer in round 1 is copied into every document you write later.
Keep every question concrete. "What are your layers?" gets a vague answer; "I see
packages/domain, packages/application, packages/adapters - does application
depend only on domain and ports?" gets a decision.
Round 1 - the gate (scripts/harness/config.sh)
- The static gates, in order, and which of them are fast enough to run on every verification.
- Whether the architecture check you found in step 1 belongs in the gates. If the repository has one and it only runs in CI, say so plainly: with the "only the tests involved" rule, CI becomes the only place it ever runs.
- The command that runs one named test target, and the one that runs everything.
- The top-level directories that count as code, for
HARNESS_CODE_PATHS.
Round 2 - the loop (docs/harness/mandatory-steps.md)
- The default branch name, and the branch naming convention.
- Where the roadmap lives, and whether work is organised in phases.
- Where tests live per layer, and which runner or flag each needs.
- Which areas are sensitive enough to also require
code-auditing: authentication, credentials, payments, personal data. - Which documents own which topic, and where a new decision is registered.
- Whether CI runs the full suite on the pull request. That is the backstop for
git commit --no-verify, the one hole the hook cannot close - if CI does not do it, say so, because then the hole is real. Who lands a pull request once its CI is green - the
Landing:line in step 9. Proposeowner: it changes nothing for a project that never thinks about it.agentis the owner handing the merge to whichever agent opened the pull request, throughscripts/harness/land; say what that commits the agent to, as the template does.agentcomes only from the owner's explicit word to this question. No answer, a vague one, or a run with nobody to ask leavesLanding: ownerexactly as the template ships it - never writeagenton your own reading of the project.Only after an explicit
agent, ask a separate question: whether to addBash(scripts/harness/land:*)to theallowlist in.claude/settings.json, showing the exact JSON you would write. Claude Code's auto mode otherwise refuses the merge as unreviewed, so the decision would be written down and never carried out; but the rule lets any agent in the repository runlandon any pull request, which is a wider grant than theLanding:answer, and the owner says yes to it on its own or not at all.Under
agent, some pull requests stay the owner's: the harness's own paths always, and whichever paths the owner names here. Ask which parts of this project an agent should never land on its own - migrations, payments, authentication, infrastructure, CI configured outside.github/workflows/, the settings of an agent the harness does not name - and write them, in GitHub's path syntax, intoHARNESS_LAND_OWNER_PATHSinconfig.sh. None is a valid answer; the harness's paths and the floor guard still apply.- For
land, whichever the answer: if the CI workflow has apaths-ignore, the same paths go intoHARNESS_LAND_NO_CIinconfig.sh- in GitHub's syntax, as the workflow writes them - or a pull request touching only those waits for checks that never come. Ask whetherlandshould require a passing review verdict on the head it merges -HARNESS_LAND_REVIEW=required: every pull request then needsland --reviewposted on its last commit, by the agent's review or by the owner who read it. Propose it withLanding: agent, where it is the one record a review happened before an unattended merge.landreads these settings fromconfig.shon the default branch, so they apply from the first pull request after this setup is merged, not to the one that writes them. The merge method, if the repository does not merge commits (HARNESS_LAND_METHOD). And if CI runs on one shared or slow runner, recommend aconcurrencygroup in the workflow that cancels a pull request's superseded runs; on the default branch, let the run in progress finish. With several agents pushing, superseded runs are what the queue is made of.
Round 3 - how the project is exercised for real (docs/harness/mandatory-steps.md, Step 5)
.agents/skills/runtime-verification/SKILL.md is the procedure, and it arrives
with every upgrade. What it cannot know is the commands, and it looks for them
here first - a Step 5 left on its TODO(harness) marker means every run has to
rediscover them. Ask until you can write it down:
- The command that boots this project the way a person uses it, and anything it needs first - a container, a seed, a build.
- Where it surfaces: a URL and a screen, an endpoint, the packed CLI, a simulator and which device.
- The account, fixture or sample payload to exercise it with. Never a real credential - name where the human keeps it instead.
- How the effect is observed: the log to read, the row to look at, the response to inspect. The layer you can see is not evidence on its own.
- How the failure path is reached deliberately. That is half the step, and it is the half nobody documents.
- Whether this project migrates a data store, and if so the commands to bring the real engine up, apply a migration twice, and apply it to a store that already has data. If it does not migrate anything, record that too, so nobody goes looking for it.
- When the step does not apply at all - a library with no runtime surface of its own - and why.
Round 4 - the architecture criteria (docs/harness/architecture-rules.md)
- Which reference applies -
references/backend.md,references/frontend.md, or both on different directories. - The precedence order: name this repository's own architecture documents, because they win over the shared reference.
- Which sections the project adopts, and specifically which rules its own documents do not state yet. Those are the ones worth writing down.
- Which sections are not applicable, and why. This is the half that stops a shared guideline from fighting the project, and the reason matters as much as the decision - without it, the next reader re-adopts what you dropped.
- Anything the reference asks for that this project deliberately does the other way. Record it as a deliberate exception, not as debt.
Round 5 - the index and the extras
- If
AGENTS.mddoes not exist or does not mention the harness, propose the section; if it already documents the harness, leave it alone and say so. - Confirm
CLAUDE.mdis a symlink toAGENTS.md. Without it, Claude Code loads nothing and the whole harness is dead letter. - Whether the linter or formatter excludes
.agents/**. Vendored skills carry third-party files, and a linter will report them as the project's own. - Optional per-agent extras the human may want: an indexed search server, a token-cutting proxy, a code graph, MCP servers. Ask, do not install.
3. Write
Now write the answers into the files, replacing every TODO(harness) you touched:
scripts/harness/config.sh- the contract isHARNESS_CODE_PATHS,harness_gates,harness_test_selected,harness_test_all. Userunfor every command. Keep the comment block at the top.docs/harness/mandatory-steps.md- stack-specific, in the project's language and with its real commands. Never leave a generic step that names no command. TheLanding:line holds the owner's answer,owneroragent, nothing else..claude/settings.json- only thelandpermission, and only if the owner said yes to that separate question in round 2. Not on theLanding:answer alone. The CI workflow is the owner's to change; propose theconcurrencyblock, do not write it.docs/harness/architecture-rules.md- the adoption map, including the not-applicable section with reasons.openspec/config.yaml- thecontextblock, if the project uses OpenSpec.AGENTS.md- only if round 5 said so.
Anything unanswered stays in the file as a marked open question. Do not quietly drop it, and do not answer it yourself.
4. Verify, then report
Prove the harness works rather than asserting it:
norma doctor
scripts/harness/verify --docs-onlydoctor must be clean, and the gate must actually run the project's real gates and
record a stamp. If the gates fail, that is a finding about the repository, not about
the harness - report it, do not paper over it by weakening the gates.
Then confirm the two refusals hold, because they are what makes the loop binding:
scripts/harness/verify # must refuse: no test targetReport to the human:
- which files you wrote, and which questions they answered;
- what
doctorsays now; - what remains open, and what will not work until they answer it;
- what you deliberately did not do - anything you were asked not to install, and any decision you left as an open question.
Finally: stop. Do not commit. Setting up the harness is a change like any other, and the harness itself says the human reviews before delivery.
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.

