agentleFS
me-cedricme-cedric/agent-compass/skills/harness-loop/SKILL.md

harness-loop

Skill3 starsChanged 27 days agoMITView on GitHub

Run a large goal as a loop with one check, a progress file on disk and a turn cap. Uses the deliver workflow for multi-file work. Use when the user asks you to keep going until a big goal is finished.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 17 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check: one command that proves the goal.

    line 17
  2. Distinctive:

    Stop condition: the check passes, the turn cap is reached, or a blocker stops the work.

    line 18
  3. Very specific:

    Write the progress file .agents/progress/<goal-slug>.md.

    line 22
  4. Distinctive:

    Read it at the start of each turn.

    line 23
  5. Distinctive:

    Read the repository rules, the project memory and the specs that the goal touches.

    line 27
  6. Distinctive:

    Do one phase in each turn.

    line 31
  7. Distinctive:

    After each phase, read your diff and run the check.

    line 32
  8. Distinctive:

    Write the result in the progress file.

    line 34
  9. Distinctive:

    Run 2 workers at most. Give them files that do not overlap.

    line 39
  10. Distinctive:

    Before the first edit in a worktree or a new branch, run git log --oneline main..HEAD and git log --oneline HEAD..main.

    line 40
  11. Distinctive:

    If the branch is behind and has no commits of its own, run git merge --ff-only main.

    line 41
  12. Distinctive:

    If the branch is behind and has its own commits, tell the parent.

    line 42
  13. Distinctive:

    If the user allows commits, commit each finished piece.

    line 43
  14. Distinctive:

    Do not remove a worktree because it looks finished.

    line 45
  15. Distinctive:

    Run the shared steps in the session worktree: merge, screenshots, land.

    line 51
  16. Distinctive:

    Read a saved subagent report for "the hook refused" notes before you trust it.

    line 53
  17. Distinctive:

    Do not commit, push, open a PR, deploy, publish, write to production or run a migration on production without approval.

    line 57
  18. Very specific:

    Use only commands that exist: in package.json, in a Makefile, or in the documented command list.

    line 58
  19. Distinctive:

    Prefer a narrow fix to a broad rewrite.

    line 59

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

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

harness-loop

Set up

State these items before you start. Ask only about an item that blocks safe work.

  1. Goal: one sentence.
  2. Check: one command that proves the goal.
  3. Stop condition: the check passes, the turn cap is reached, or a blocker stops the work.
  4. Turn cap: 20 turns unless the user says another number. Never raise the cap yourself.
  5. Out of scope: what you will not touch.

Write the progress file .agents/progress/<goal-slug>.md. It holds the five items above, the done list, the next step and the blockers. Read it at the start of each turn. A new context resumes from this file.

Loop

  1. Read the repository rules, the project memory and the specs that the goal touches.
  2. For work on more than one file, run the deliver workflow (.claude/workflows/deliver.js) with the goal as args. The workflow plans, then splits the work into 2 file groups at most. Workers build. A reviewer checks in a fresh context. Fixes take 2 rounds at most. Without workflow support, do the same steps with the scout, worker and reviewer agents.
  3. Do one phase in each turn.
  4. After each phase, read your diff and run the check.
  5. Fix a failure that you introduced before you start the next phase.
  6. Write the result in the progress file.
  7. At the cap, report "partial" with the blocker. Do not continue.

Parallel work

  1. Run 2 workers at most. Give them files that do not overlap.
  2. Before the first edit in a worktree or a new branch, run git log --oneline main..HEAD and git log --oneline HEAD..main.
  3. If the branch is behind and has no commits of its own, run git merge --ff-only main.
  4. If the branch is behind and has its own commits, tell the parent. Do not rebase.
  5. If the user allows commits, commit each finished piece. A session that dies loses uncommitted work.
  6. Stay inside the files that your task names.
  7. Do not remove a worktree because it looks finished. Wait for the signal of the orchestrator.

Worktree fence

The desktop app fences each subagent. A hook refuses Edit, Write and git commands that target another worktree.

  1. Run the shared steps in the session worktree: merge, screenshots, land.
  2. A reviewer of a lane worktree calls EnterWorktree with the lane path first.
  3. Read a saved subagent report for "the hook refused" notes before you trust it. A refusal appears in the notes, not as a failure.

Safety

  • Do not commit, push, open a PR, deploy, publish, write to production or run a migration on production without approval.
  • Use only commands that exist: in package.json, in a Makefile, or in the documented command list. Do not invent one.
  • Prefer a narrow fix to a broad rewrite.

Handoff

Give the goal, the files changed, each command with its result, the risks and the next step.

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.