harness-loop
Skill0 starsChanged 56 days agoMITView on GitHub
Drives tracked work through the basicly loop, intake to ship. Use to start or resume work, or to move an issue past a checkpoint or gate.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Chachamaru127/claude-code-harnesstheir own version, first seen Aug 14, 2026
- anyoneanderson/agent-skillstheir own version, first seen Jul 30, 2026
- maxwell2732/claudecode-research-harness-workflowtheir own version, first seen May 29, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Chachamaru127/claude-code-harness★ 3.1ksame name
- maxwell2732/claudecode-research-harness-workflow★ 40same name
- anyoneanderson/agent-skills★ 2same 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 repository52 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- best-practices-auditSkill
- catalog-authoringSkill
- cli-toolsSkill
- conventional-commitsSkill
- decompose-planSkill
- falsify-firstSkill
- find-skillsSkill
- harness-clientSkill
- harness-loopSkill
- interface-factsSkill
- no-commentsSkill
- nodeSkill
- plain-englishSkill
- pythonSkill
- release-processSkill
- repair-in-placeSkill
- retention-probeSkill
- root-causeSkill
- session-finishSkill
- skill-creatorSkill
- test-disciplineSkill
- tier-injectionSkill
- validate-as-consumerSkill
- work-trackerSkill
- worktree-isolationSkill
- best-practices-auditSkill
- catalog-authoringSkill
- cli-toolsSkill
- conventional-commitsSkill
- decompose-planSkill
- falsify-firstSkill
- find-skillsSkill
- harness-clientSkill
- interface-factsSkill
- no-commentsSkill
- nodeSkill
- plain-englishSkill
- pythonSkill
- release-processSkill
- repair-in-placeSkill
- retention-probeSkill
- root-causeSkill
- session-finishSkill
- skill-creatorSkill
- test-disciplineSkill
- tier-injectionSkill
- validate-as-consumerSkill
- work-trackerSkill
- worktree-isolationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 10 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Never record the verify gate by hand during build: Only the build-to-verify loop advance merges the branch.
- Very specific: line 27
Never signal a supervisor or its lanes: Use --max-passes or loop stop, so no lane dies mid-write.
- Very specific: line 28
When a required fact is missing, do not guess: Write .basicly/usage/needs-input.json and stop.
- Very specific: line 43
Use it to inspect one transition.
- Distinctive: line 60
Run the command yourself.
- Very specific: line 62
Ask when the challenge appears, because the code expires after 15 minutes.
- Very specific: line 63
If it expired, run the command again without --confirm to get a new code.
- Distinctive: line 67
If you approve there, the checkpoint is approved but the loop stays parked.
- Very specific: line 95
Use feature only when the work fans out into children that land separately.
- Very specific: line 101
Do not guess the DoR sections.
- Very specific: line 105
Every later phase reads ## Scope.
- Very specific: line 137
If you record the gate first (basicly verify --issue), the phase jumps to verify without the merge.
- Distinctive: line 139
After the landing merged, re-run the gate from the base checkout only:
- Distinctive: line 193
Check each clause. Revert the mechanism that you think delivers it and watch named tests fail.
- Very specific: line 200
If git diff --cached --stat shows deletions under .basicly/ledger/, stop and find what rewrote it.
- Distinctive: line 208
Never commit the ledger on a harness branch.
- Distinctive: line 209
Commit the ledger between those steps and the next landing.
- Very specific: line 226
Use preflight and supervise over an epic for parallel work.
- Distinctive: line 227
Only a human sets a limit on lanes.
- Distinctive: line 228
Keep two or fewer agents in the base checkout.
- Distinctive: line 241
Read the log file it prints.
- Very specific: line 242
Do not push while a pass holds the lock: Read in the base. Write in your own worktree until loop stop returns.
- Distinctive: line 252
After an epic slice lands, write a retro comment and file a record for each finding the user keeps:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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
<!-- Generated by `basicly skills-build` from skill.yaml. Do not edit; edit the source. -->Harness Loop
This skill drives one tracked issue, or many lanes under an epic, through the loop with basicly loop.
The agent supplies the phase inputs and writes the code. The engine records state, runs gates and advances.
The same commands work under Claude, Codex and Copilot.
Other skills own the mechanics of each phase: work-tracker (records), worktree-isolation
(worktrees), decompose-plan (child plans), repair-in-place (rework), validate-as-consumer
(validate), conventional-commits (commit messages).
Rules
- Read the state first with
basicly loop status <issue>. The tracker ledger is the only state, so any agent can resume. - Commit your work on the harness branch before you advance. The loop never commits the agent's work.
- Never stage or commit tracker state yourself for loop work. The engine makes every tracker commit.
- Never record the verify gate by hand during build. Only the build-to-verify
loop advancemerges the branch. - Get an explicit yes before you relay a confirm code. Each approval covers one checkpoint only.
- Treat the base checkout as read-only while a pass runs. Your uncommitted files fail the lanes' landings.
- Never clear another session's files to unblock a landing. Hold the branch until that session commits.
- Confirm a landing from the
[merged]line, not from the exit code. Every checkpoint stop exits non-zero. - Never signal a supervisor or its lanes. Use
--max-passesorloop stop, so no lane dies mid-write. - When a required fact is missing, do not guess. Write
.basicly/usage/needs-input.jsonand stop.
Drive one issue
basicly loop run advances to the next boundary where it needs an agent or a human.
A leaf issue takes two runs:
basicly loop status <issue> # phase, worktree, gates, checkpoints, rework, ready and blocked sets
basicly loop run <issue> --work-type task # intake -> worktree ready for the agent
# ... write the code in the worktree, then git commit it on the harness branch ...
basicly loop run <issue> # land, verify, validate, ship, closebasicly loop advance <issue> [--work-type T] [--children plan.toml] [--mode M] does one step.
Use it to inspect one transition. Both commands exit non-zero when the track stops short.
Pass the input that loop status or loop advance names as needs input.
Other flags on both: --runner <agent> (manual gives a handoff), --autonomy, --tier.
loop run also takes --confirm <code>, --root <epic> and --detach.
Checkpoints and confirm codes
There are three ways past a checkpoint: an interactive terminal, a covering grant, or a relayed confirm code.
Without a terminal, loop run stops at each checkpoint.
It prints a one-time code and the full command to run again.
- Show the exact command, with the code.
- Say in one line what approval does. Read it from the challenge, not from the phase name. A classify approval provisions a worktree. A ship approval tears the worktree down and closes the issue. Ship does not merge and does not publish.
- Get an explicit yes. Silence, or a yes to a different checkpoint, is not approval.
- Run the command yourself.
Ask when the challenge appears, because the code expires after 15 minutes.
If it expired, run the command again without --confirm to get a new code.
Relay the code on the reprinted basicly loop run <issue> --confirm <code>.
basicly policy checkpoint <issue> <classify|decompose|ship> only shows the status.
If you approve there, the checkpoint is approved but the loop stays parked.
A grant resolves checkpoints with no relay:
basicly policy grant <epic> --level L2 --token-budget <tokens> # L2 and L3 need a budget
basicly loop run <issue> --root <epic>Phases
loop run does every engine step. The agent proposes the work type, writes the child plan, writes the code and commits it.
| Phase | What advances it | Commands and notes |
| intake | the agent proposes the work type | --work-type {bug,chore,task,feature,epic}. See "Classify by shape". |
| classify (checkpoint) | approval, then the Definition-of-Ready (DoR) gate | Relay the code on the reprinted basicly loop run <id> --confirm <code>. basicly policy dor <id> checks readiness. basicly policy scaffold --type <type> prints every required heading. See "Write a ready body". |
| decompose | a feature needs a child plan. A leaf goes to build. | basicly decompose <feature> --plan plan.toml [--dry-run], or --children on advance. See decompose-plan. |
| decompose (checkpoint) | approval before fan-out | Relay the code on the reprinted basicly loop run <id> --confirm <code>. |
| build | the agent commits the work on the harness branch | basicly worktree list. Write the code, add fragments, git commit, then basicly loop advance <id> lands it through the serial merge queue. |
| verify | the landing ran verify and recorded the required gate; inspect it, then approve ship | basicly policy gate <id> to inspect. Relay the ship code on the reprinted basicly loop run <id> --confirm <code>, not on a bare basicly policy checkpoint <id> ship --approve, which leaves the loop parked. |
| validate | an L3 unit needs a consumer verdict on the merged checkout | Refused first when the record states no requirements. Blocks with needs input: validation. Repair a FAIL in the lane's worktree and land again. |
| ship | teardown and the closing write | basicly loop advance <id>. It blocks with no side effect on needs input: demonstration or on an unmerged branch. |
Classify by shape
The work type decides if the loop asks for children.
One coherent change is a task, bug or chore.
Use feature only when the work fans out into children that land separately.
A feature blocks at decompose and provisions no worktree.
To fix a wrong type, run basicly tracker write -- update <id> -t task and run the loop again.
Write a ready body
Do not guess the DoR sections. Fill the TODOs that policy scaffold prints.
A bug also needs ## Steps to Reproduce. An epic also needs ## Success Criteria.
Pass the body with basicly tracker write -- create ... -d or basicly tracker write -- update <id> -d.
Every later phase reads ## Scope. Write each entry as one backticked glob on its own line:
- `src/app/cli.py`A bare path, or a path with a note after it, parses to no glob.
basicly policy dor <id> warns when ## Scope parses to zero globs.
Add fragments, never edit shared files
Two lanes that edit one shared file collide at the merge. A file named with the issue id cannot collide.
| Change | Write | Never edit |
| user-facing change | changelog.d/<issue-id>.<category>.md, body only, no ### heading | CHANGELOG.md |
| new verify check | a [[verify.checks]] entry in basicly.d/<issue-id>.toml | [[verify.checks]] in basicly.toml |
| ratchet number moved | [ratchet.<gate>] count_delta or [ratchet.<gate>.frozen] in basicly.d/<issue-id>.toml | the ratchet table in pyproject.toml |
The category is one of added, changed, deprecated, removed, fixed, security.
basicly release assembles the changelog fragments.
A ratchet fragment is a delta, never a new total.
Two lanes that each record a total both write the same number, and the merged tree then fails the gate.
For a path that every lane appends to by convention, add it to [worktree] append_only_paths.
The engine then serializes the lanes that touch it, and loop preflight warns with contend:.
Split the shared file where you can, because serial lanes are slower.
Verify gate
The build-to-verify loop advance rebases, runs verify, records the required gate and merges.
If you record the gate first (basicly verify --issue), the phase jumps to verify without the merge.
Ship refuses to close an issue whose branch has not landed.
After the landing merged, re-run the gate from the base checkout only:
basicly verify --mode full --issue <id>A dirty worktree, or a branch with no commit, blocks the landing with "commit the work on <branch> before landing".
Gates and rework
Deterministic checks (tests, lint, types, build) record a required gate. A failed required gate blocks.
Semantic AI checks record an advisory gate. It never blocks.
A loop-provisioned worktree records gates in the base ledger through the redirect file.
basicly verify --issue refuses in a linked worktree that has no redirect.
A failed node gets a bounded rework loop ([policy] max_rework, default 2).
Rework is gate results and comments, not a status. At the cap, the node escalates to a human.
basicly policy rework <id> --gate verify [--record] [--allow-retry]Answer an escalation
The engine reads the first word of the answer. A reason can follow it.
basicly loop answer <decision-id> "park - the upstream fix is not released"| Answer | What the engine does |
retry | Gives one more attempt on that gate. A delegated answer does not give it. |
re-dispatch | Nothing now. The supervisor runs the lane again on the next pass. |
park or hold | Sets the lane deferred with the reason. It stops holding its parent open. Human only. |
land anyway | Only for an unreliable-gate escalation. The next landing skips that gate once. Human only. |
The command prints what it did, so an answer that changed nothing is visible.
To drop a requirement, kill the lane. A human must confirm, and a grant cannot replace the code:
basicly loop kill <id> --reason "<why this work is not done>" # refuses and prints a code
basicly loop kill <id> --reason "<why>" --confirm <code> [--discard]The kill tears the worktree down and closes the issue.
The committed work stays on the harness/ branch unless you pass --discard. There is no undo.
Before you build
- Check a third-party claim in the issue against the real tool. The DoR gate checks structure, not facts.
Record the result with
basicly tracker write -- comments add <id> "verified: ...". - Check a follow-up issue against the merged code. An issue filed after a lane overran records the lane's last position. Check each clause. Revert the mechanism that you think delivers it and watch named tests fail. Then run the real command. Close the issue with no diff when the work is done, and record the evidence.
- Read the brief when a lane built the wrong thing.
basicly brief <issue>prints what the loop dispatches, with no dispatch.
Tracker commits
The ledger is append-only. Its location follows .basicly/ledger/redirect, so every worktree writes the same log.
If git diff --cached --stat shows deletions under .basicly/ledger/, stop and find what rewrote it.
The engine commits tracker state at three points:
- At provisioning, it commits the claim before it creates the worktree.
- At landing,
loop advanceputs the.basicly/ledger/**changes in onechore(tracker)commit, then merges. - At ship, it commits the closing state.
Never commit the ledger on a harness branch. Grants, checkpoints and answers also write the ledger. Commit the ledger between those steps and the next landing.
The landing checks that the base checkout is clean, and it counts untracked files. Other dirt outside the ledger blocks the landing. Check the base before every landing:
git -C <base-checkout> status --shortPush cadence:
- Solo repository: push once per track, after ship.
- Team repository: push each engine tracker commit at once, most of all the claim, so nobody takes claimed work.
A claimed record with no live worktree shows a race. Compare
basicly loop status <id>withbasicly worktree list.
Many lanes
Use preflight and supervise over an epic for parallel work.
Only a human sets a limit on lanes. Control cost by the size of the work.
Keep two or fewer agents in the base checkout. Put every other agent in its own worktree.
basicly loop preflight <epic> # read-only: can a pass start, and what does it cost
basicly loop supervise <epic> --max-passes 3 --detach # provision, dispatch, land through the merge queue
basicly loop stop <epic> --reason "<why>" --by <name> # finish the current round, then return- Run
preflightfirst, from the base checkout. A worktree cannot see the run records in.basicly/usage/. - Read the whole
VERDICT: not ready - ...line. It lists every blocker, separated by semicolons. - Approve the epic's
decomposecheckpoint once. Without it, the pass endsseed-blocked, even with a grant:basicly policy checkpoint <epic> decompose --approve --root <epic>. - Start a supervisor with
--detach. A round can outlast the timeout of the agent's shell tool. Read the log file it prints. Commit the ledger before you start it again. - Do not push while a pass holds the lock. Read in the base. Write in your own worktree until
loop stopreturns. loop stoprefuses when nothing supervises that root. A stale lock is taken only from a holder with a stale heartbeat.--label <label>fans out over the issues with that label instead of the epic's children.
Size the grant budget, read the band table, and watch lanes with references/many-lanes.md.
Ship and retro
Ship tears down the worktree and closes the issue. The merge already happened at the landing. After an epic slice lands, write a retro comment and file a record for each finding the user keeps:
basicly tracker write -- comments add <epic-id> "Retro: <finding>"Resume
To resume after a crash or an agent switch, run basicly loop status <issue>.
Compare the result with basicly worktree list, and continue.
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.

