agentleFS
LeostrukaLeostruka/devin-bundle/skills/gates/SKILL.md

gates

Skill0 starsChanged 3 months agoMITView on GitHub

Use when about to claim work is complete/fixed/passing, when a task risks agent laziness (large, multi-step, previously half-done, or with acceptance criteria), or when running long-horizon/unattended work where quality must be verified before proceeding. Covers gates, gates ledgers, and autonomous gate semantics. Completion-claim discipline only; writing tests goes to testing or e2e-testing.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use release.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    RUN: execute it fresh and complete.

    line 17
  2. Distinctive:

    READ: full output, exit code, failure count.

    line 18
  3. Distinctive:

    VERIFY: output confirms the claim?

    line 19
  4. Distinctive:

    ONLY THEN make the claim. Skip any step = lying, not verifying.

    line 21
  5. Distinctive:

    If a fixed gate still fails and the workspace is unchanged since last failure → the gate may be wrong.

    line 55
  6. Distinctive:

    Before dispatching an implementer, distill the spec into checkable assertions with commands:

    line 60
  7. Very specific:

    Every runnable gate gets CHECK: + EXPECT:.

    line 92
  8. Distinctive:

    Check fails → fix the work, not the check.

    line 94
  9. Distinctive:

    Don't create a ledger for a trivial edit (<20 lines, one tool call).

    line 99

“Common” is measured: kept by at least 6 in 10 of the 9 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

Gates

The Iron Law: NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.

Violating the letter of this rule is violating the spirit. If you haven't run the verification command in this message, you cannot claim it passes.

The Gate Function (before ANY claim of status/success)

  1. IDENTIFY: what command proves this claim?
  2. RUN: execute it fresh and complete.
  3. READ: full output, exit code, failure count.
  4. VERIFY: output confirms the claim? NO → state actual status + evidence. YES → claim WITH evidence.
  5. ONLY THEN make the claim. Skip any step = lying, not verifying.
ClaimRequiresNot sufficient
Tests passTest output: 0 failuresPrevious run, "should pass"
Lint cleanLinter output: 0 errorsPartial check
Build succeedsBuild exit 0Linter passing
Bug fixedOriginal symptom test passesCode changed
Regression test worksRed-green cycle verifiedTest passes once
Agent completedVCS diff verifiedAgent said "success"
Requirements metLine-by-line checklistTests passing

Red flags — STOP: "should/probably/seems to", satisfaction before verification ("Great!", "Done!"), committing without verification, trusting agent reports, "just this once".

Security check before claiming done on API/DB/secrets/endpoints/infra work: no secrets in diff, no new unauthenticated endpoints/public storage, no broad IAM, no plaintext passwords. Any present → run security first.

Gate types (autonomous/long-horizon)

A gate is a command that must exit 0 before the task can be declared complete. Bounded (truncate output), idempotent, skippable only when nothing relevant changed since last failure, multi-level.

GateWhenExampleOn failure
Pre-taskBefore startinggit status --porcelainStop, ask user
StepAfter each stepnpm test -- --grep "<step>"Retry with output
IntegrationAfter combiningnpm run buildRoll back to green
FinalBefore "done"npm run checkCannot declare done
SecurityBefore pushpython scripts/check-ai-signature.pyBlock, fix

If a fixed gate still fails and the workspace is unchanged since last failure → the gate may be wrong; stop and escalate.

Verification Functions (VFs) — the dual gate

Before dispatching an implementer, distill the spec into checkable assertions with commands:

VF1: API returns 200 for valid input → curl -s -o /dev/null -w "%{http_code}" localhost:3000/api -d '{"valid":"data"}'
VF3: Type checker passes → npx tsc --noEmit

Gate 1 (PRE): VFs go in the implementer's brief; it must run every VF and show output before claiming DONE. Gate 2 (POST): controller re-runs VFs independently; failure → re-enter fix loop. Can't write a VF → the requirement is ambiguous — clarify first.

Gates ledger (unlazy pattern)

For tasks at laziness risk — large, multi-step, previously half-done, or with acceptance criteria — write the ledger BEFORE work. Path: .devin/ledgers/<task>.md when tracked; otherwise the repo's tracked ledgers/ convention (record the path decision).

# GATES: add OAuth2 login

- [ ] G1: valid fixture imports
  CHECK: python -m pytest tests/import/test_valid.py
  EXPECT: 1 passed
  EVIDENCE: pending

ABANDON: G3 migration owner unavailable; recorded in issue 123

Rules:

  • Every runnable gate gets CHECK: + EXPECT:; run it, replace EVIDENCE: pending with the deciding snippet.
  • Check fails → fix the work, not the check.
  • Manual gates only when no command can decide.
  • Impossible step → explicit ABANDON: <id> <reason>, never silent drop.
  • A ticked gate with EVIDENCE: pending is worse than an empty gate.
  • Re-run every runnable gate after claiming done; report met/unmet/abandoned.
  • Don't create a ledger for a trivial edit (<20 lines, one tool call).

Anti-patterns: grading own gates without re-running; trusting "done" without recorded evidence; skipping ABANDON; gates as the ONLY verification (manual review still catches design issues); overly broad step gates (scope them).

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.