agentleFS
urvijain02urvijain02/claude-autopilot/skills/gate-runner/SKILL.md

gate-runner

Skill0 starsChanged 23 days agoMITView on GitHub

How to run the deterministic quality gates (tests, build) against the target repo and interpret their verdicts. Bound by the test-writer, implementer, and fixer agents. Gates are the checks the model cannot talk its way past.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the gate after the edit that's supposed to satisfy it, then read the JSON back.

    line 37
  2. Distinctive:

    If a verdict is from an earlier round, it's stale — re-run.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

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

Gate runner

Gates are shell scripts, not judgments. You run them; their exit code and the JSON they write are the truth. You never declare a gate "passed" from your own reasoning.

The scripts live in one place and run against any repo. Your briefing gives the repo you work on: its path ($REPO) and its name (<label>). Always pass both — --repo "$REPO" and --label "<label>" — so multi-repo verdicts don't collide.

Commands

# tests — expects PASS
${CLAUDE_PLUGIN_ROOT}/bin/gate-tests.sh <TICKET> --repo "$REPO" --label "<label>"

# tests — TDD, expects FAIL (new failing tests, not yet implemented)
${CLAUDE_PLUGIN_ROOT}/bin/gate-tests.sh <TICKET> --repo "$REPO" --label "<label>" --expect-fail

${CLAUDE_PLUGIN_ROOT}/bin/gate-build.sh    <TICKET> --repo "$REPO" --label "<label>"

Each writes its verdict to $STATE/gates/<label>/<gate>.json (central, per-repo — see state-protocol) with status (pass|fail|skipped|blocked), exit_code, repo, and a log_file path. Don't construct that path from a default — state_root and AUTOPILOT_STATE_DIR relocate it, and the script prints the file it actually wrote on its last stdout line. The test/build commands run inside $REPO; you don't cd yourself and you don't choose the command by hand (the script auto-detects dotnet vs node). If --label is omitted it defaults to the repo dir name.

Interpreting

  • pass → proceed.
  • fail → do not proceed. Read the log_file, fix, re-run. Report honestly in log.md.
  • skipped → the tool/command wasn't available. Record it — a skipped gate is not a passed gate; say so.
  • blocked → the gate could not run — an environment or tooling problem it couldn't work around, not a code defect. Do not "fix" code and do not loop: stop and escalate, quoting what the log_file actually shows. Read it before naming a cause; the ask depends on the reason. Two that occur today: a .NET NuGet restore hitting a private-feed 401 the offline-cache workaround couldn't resolve (ask for a valid Azure DevOps feed PAT, Packaging: Read), and a suite that exited non-zero without a test having run (a build error or a missing test script — a code or setup problem for the author, not a credential).

.NET restore is auto-handled. For dotnet repos the gate first runs ensure-dotnet-restore.sh, which tries a normal restore, then an offline restore from the local NuGet cache on a 401. You don't do anything — a blocked verdict only appears if that fallback also failed.

Non-negotiable

  • Run the gate after the edit that's supposed to satisfy it, then read the JSON back.
  • If a verdict is from an earlier round, it's stale — re-run.

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.