agentleFS
RaillyRailly/skills/skills/gate/SKILL.md

gate

Skill11 starsChanged 26 days agoMITView on GitHub

Gate a diff before pushing or requesting review: verify exact-state identity, run deterministic checks, then run only the lenses the change triggers, including test strength, resilience, security, and simplification. Use before opening or updating a PR, for pre-review, or after an external review round. Scale the path from mechanical through high-risk and external-PR profiles.

  • Reads credentials

32 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use new, build and 10 more.

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.
  • codebycoreySkill

    new

    Start a new change with a proposal. Use when starting a feature, creating a proposal, or beginning planned work.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    build

    Build the TypeSpec Rust emitter from source. Run this after cloning the repo, after pulling changes, or when TypeScript source files have been modified.

    Also in 5 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 8 projects that use this

  • genomewalkerSkill

    checkpoint

    Save a checkpoint of task status, decisions, active files, and next steps

    Also in 3 projects that use this

  • VercelSkill

    investigate

    Investigate an issue report, or analyze the constraints of a proposed change, with strict, evidence-driven diagnosis.

    Also in 3 projects that use this

  • BlockSkill

    plan

    Draft a TDD, PRD, or lightweight plan in the conversation without committing it.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 30 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the packaged scripts/resolve-source-root.mjs, which honors RAILLY_SKILLS_REPO, to resolve the canonical Railly/skills checkout.

    line 14
  2. Very specific:

    When the target repo has .agents/verify/, run scripts/gate.sh verify: doctor, check, and a passing observation of every contract feature …

    line 39
  3. Very specific:

    When radius supports the target language, save its Impact Map under the canonical Gate run directory.

    line 41
  4. Distinctive:

    Run each triggered deep lens and record its receipt in the report:

    line 47
  5. Distinctive:

    Read the lens catalog after the diff, conventions, profile, and receipts identify trigger families.

    line 57
  6. Distinctive:

    Prefer an independent reviewer for high-risk work.

    line 61
  7. Distinctive:

    Run the security lens when the diff or stated claim touches authentication, authorization, confidentiality, integrity, credentials, …

    line 69
  8. Very specific:

    Read the run-report schema when materializing the exact-head verdict.

    line 73
  9. Very specific:

    Run scripts/gate.sh report <run-report.json>.

    line 75
  10. Distinctive:

    After an external review, harvest each escaped finding into the smallest durable destination: deterministic gate, triggered lens, project …

    line 79

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

Gate

Gate decides whether one exact diff is ready for human promotion. It owns deterministic checks, claim review, triggered judgment lenses, empirical verification, and the final verdict. Its deep lenses live in references/lenses/: test strength for behavioral falsification, resilience for failure-path pressure, security for attacker modeling and vulnerability classification, and simplify for bounded reduction. Their supporting rules: security classification, security receipt, simplification method. Each emits the receipt the report schema expects.

Canonical state and execution identity

Run the packaged scripts/resolve-source-root.mjs, which honors RAILLY_SKILLS_REPO, to resolve the canonical Railly/skills checkout. Never write cases, conventions, run reports, Impact Maps, or ledgers into the target repo, .agents/skills, .claude/skills, or another installed copy.

Read the work-item manifest first. Verify only drift-prone fields: target HEAD, dirty digest, authorization, profile, stage fingerprints, and executing skill revision. A stable pass requires an exact skill_revision and an executing package whose digest is tied to that revision. Run bun scripts/skills-doctor.mjs --installed <skills-root> --skill gate from the canonical checkout when identity is uncertain.

Use the manifest's runtime record. Prefer the packaged scripts/run-fx-review.mjs for an isolated reviewer. It reads the Vercel AI Gateway / vercel-ai-gateway credential from macOS Keychain, disables FX's stored-session lookup for that process, verifies that FX reports auth=AI_GATEWAY_API_KEY, and writes a sanitized JSON artifact. Never put the key in a prompt, artifact, manifest, or log. Cursor and cursor-agent are not supported Gate runtimes.

On the first runtime schema or capability failure, inspect the available capability once, never repeat the identical invalid call, and fall back in order: FX worker, native subagent, visible Herdr worker, sequential isolated pass, then unavailable. Record execution_mode, degraded_from, and independence_gap. More than one schema failure per operation or three in the whole turn is a protocol failure, not a reason to retry.

1. Select the profile

Honor the manifest profile:

ProfileReview path
mechanicalexact-state identity, applicable deterministic checks, narrow proof, one focused review pass
standarddeterministic checks, claim inventory, triggered receipts and lenses, real-boundary proof
high-riskfull proof ledger, required Test Strength or Resilience receipts when triggered, independent challenge from a different model family through scripts/run-fx-review.mjs by default
external-prstandard or high-risk obligations plus built-artifact dogfood before trusting authored tests

Escalate the profile or wall-time budget only when new evidence exposes a new risk. Record the trigger in the manifest.

2. Load conventions and run deterministic checks

Load cases/<repo>/conventions.md from the canonical source root. If absent, compile it from target-repo instructions before review. Run every applicable check in scripts/gate.sh, starting with covered when an exact-head report is expected. A finding is fixed or acknowledged with evidence, never skipped silently.

When the target repo has .agents/verify/, run scripts/gate.sh verify: doctor, check, and a passing observation of every contract feature for the exact tree. A repo without a kit is a recorded gap, never an implicit pass.

When radius supports the target language, save its Impact Map under the canonical Gate run directory. Treat it as attention guidance, not proof.

3. Inventory claims and consume stage receipts

Build the contract, design, user-facing, and implementation claim inventory. Read the proof obligations for standard and high-risk work because those profiles must distinguish properties from proxies, carry assumptions, and map durable commit points.

Run each triggered deep lens and record its receipt in the report:

  • A Test Strength trigger requires a passing receipt tied to the current head, command, environment, contract digest, relevant paths, and Test Strength revision.
  • A resilience trigger requires a passing receipt with forced failure partitions, cleanup ownership, retry evidence, and the same identity fields.
  • A security trigger requires a passing Security Review receipt tied to the exact base, head, dirty digest, changed-path digest, and Security Review revision. An unresolved security blocker or verification gap makes the review incomplete.
  • A missing, stale, unavailable, or failed required receipt makes the review incomplete. Run the lens rather than skipping it.
  • A reusable receipt must show that the later diff cannot intersect its relevant paths or contract dependency cone. Final exact-head checks still run.

4. Run only triggered lenses

Read the lens catalog after the diff, conventions, profile, and receipts identify trigger families. Run each triggered lens as a focused pass over the frozen tree. Record every catalog lens as run or skipped with a reason.

Load the getByRole contract only when reviewing browser role lookup, accessibility-tree normalization, or getByRole behavior.

Prefer an independent reviewer for high-risk work. If the runtime degrades to a sequential isolated pass, preserve separate input and output artifacts but record the independence gap. Never present sequential self-review as cross-family independence.

5. Verify at the layer of the claim

For external PRs, drive the built artifact before trusting the contributor's tests. For other profiles, drive every changed user-visible boundary that carries a material claim. Force error paths. A missing environment is an explicit gap, not a pass.

Refute findings at their own layer. Verify exemptions with the same rigor as findings. Freeze the reviewed tree while any pass runs.

Run the security lens when the diff or stated claim touches authentication, authorization, confidentiality, integrity, credentials, secrets, origin validation, tenant isolation, sandboxing, privilege, injection, or unsafe deserialization. Hardening and non-security observations remain visible but do not become blockers.

6. Emit one report and one receipt

Read the run-report schema when materializing the exact-head verdict. Treat schema-v1 JSON as the only authored report. Generate the human view with scripts/gate.sh render <run-report.json> <run-report.md>. Never maintain an independently authored prose twin.

Run scripts/gate.sh report <run-report.json>. A pass requires the exact current head, resolved required receipts, no open finding or gap, and required independence. Update the manifest's review stage atomically.

Record the reviewed patch-id in the report. scripts/gate.sh scope and scripts/gate.sh prbody <body.md> run before any commit or PR. Before any promotion, scripts/gate.sh drift <reviewed-patch-id> must pass; a different patch-id voids the verdict.

After an external review, harvest each escaped finding into the smallest durable destination: deterministic gate, triggered lens, project norm, or subsystem invariant. Record outcome fields including external findings, review rounds, human corrections, and escaped finding class.

Complete when

The exact state has a validated run report and manifest receipt, every required upstream receipt is current, all triggered checks and lenses have dispositions, empirical claims were exercised or named as gaps, and the verdict is pass, findings, or incomplete without ambiguity.

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.