Fernando Ramos← All skills07 of 09
← All skills

/proof

Prove · Revision-bound verification and Stop gate

Executes declared checks against the exact code state (HEAD + tracked-modified + untracked digest) and writes .ramos/runs/<run-id>/result.json. A passing /proof run arms the Stop gate for that session.

npx skills@latest add luci-efe/skills -s proof

  • ProveStage
  • 03 Evidence of done · 01 ObservableMethod
  • .ramos/runs/<run-id>/result.jsonProduced artifact / output

Use when

You are about to say "done" — validating a change, measuring a performance claim, or verifying a web or desktop UI.

Support & adapters

  • Instructions usable across harnesses
  • Hooks tested: Claude Code
  • /proof stop gate: verified live on Codex
  • /proof stop gate: Gemini CLI, wired from its docs, not watched live
01 · INPUT STATERequirement + TreeHEAD SHA + dirty filessha256(tracked + untracked)02 · EXECUTED CHECKSObserved executionassertion · perf · visualargv + cwd + exit === 003 · STOP GATE (LOCAL DONE)result.jsonRecomputes input_digestBlocks if missing or stalestatus: passed | failed | blocked | cancelled04 · CI + REVIEWVerifiedIndependent CI run+ peer review
  1. 01 · INPUT STATERequirement + Tree

    HEAD SHA + dirty files · sha256(tracked + untracked)

  2. 02 · EXECUTED CHECKSObserved execution

    assertion · perf · visual · argv + cwd + exit === 0

  3. 03 · STOP GATE (LOCAL DONE)result.json

    Recomputes input_digest · Blocks if missing or stale · status: passed | failed | blocked | cancelled

  4. 04 · CI + REVIEWVerified

    Independent CI run + peer review

Fig. 3. A passing /proof run arms the Stop gate for that session (it does not read the conversation; blocked, failed, or cancelled runs with a reason are allowed to exit). The local gate prevents accidental false done claims, though a hand-written result can still pass locally; CI re-execution plus independent review earns verified.

Decision tree

  1. 01

    Select branch & probe prerequisites

    assertion (code checks), perf (baseline vs changed threshold), visual-web (playwright, optional odiff), or visual-desktop (cua-driver)

    → Branch prerequisites verified
  2. 02

    Execute scripts/run.mjs checks.json

    Run literal argv checks with timeout bounds, compute input_digest over HEAD + modified + untracked files, and arm the Stop gate for this session only when all checks pass

    → .ramos/runs/<run-id>/result.json
  3. 03

    Validate with scripts/check.mjs <run-id>

    Recompute current input_digest before ending the session; blocked/failed/cancelled runs with a reason are allowed to exit

    → Local done (CI + review = verified)

Prerequisites & install recipes

  • noderequired · assertion, perf, visual-web, visual-desktopnode
    brew install node
  • playwrightoptional · required for visual-web branchnode_modules/.bin/playwright
    npm i -D @playwright/test && npx playwright install chromiumper-repo local dependency
  • odiffoptional · visual-web pixel diffnode_modules/.bin/odiff
    npm i -D odiff-binoptional · per repo (or use Playwright's toHaveScreenshot)
  • cua-driveroptional · required for visual-desktop branchcua-driver
    from cua.ai (macOS); install not verified by this suite/doctor only checks that cua-driver is on PATH

Completion criteria

  • Writes .ramos/runs/<run-id>/result.json bound to HEAD and the SHA-256 digest of tracked-modified and untracked files.
  • Once wired with doctor --install-hooks claude|codex|gemini, a passing /proof run arms the Stop gate for that session in Claude Code, Codex, or Gemini CLI (it does not read the conversation; blocked/failed/cancelled runs with a reason are allowed). Verified live on Codex; Gemini CLI is wired from its docs, not watched live. Elsewhere, scripts/check.mjs is a manual check.
  • The local gate prevents accidental false done claims, though a hand-written result with matching hashes can still pass locally; CI re-execution plus independent review earns verified.

Example

A typecheck plus a vitest run on a public project: a pass, then the same evidence after the tree changes, then the perf gate and an attempt to forge a result.

What was run

S=$SKILLS/proof/scripts
node $S/run.mjs checks.json --run-id pass-1 --session s1 --branch assertion   # exit 0
node $S/check.mjs pass-1                                                       # exit 0
# then one comment line is appended to src/cli.ts
node $S/check.mjs pass-1

Output (excerpt)

{"ok":true,"reason":null}

$ node $S/check.mjs pass-1
{"ok":false,"reason":"Evidence is stale: source inputs changed"}       # exit 2
$ git checkout src/cli.ts && node $S/check.mjs pass-1
{"ok":true,"reason":null}                                              # exit 0 again

# perf branch: baseline unit-forks vs changed unit-threads
max_ratio 1.2   baseline 3384 ms   changed 4884 ms   ratio 1.44   failed: Perf ratio 1.44 exceeds max_ratio 1.2

# in a later passing run (ratio 0.66), result.json hand-edited to perf.ratio 0.5
{"ok":false,"reason":"Perf record does not match check timestamps (recorded ratio 0.5, recomputed 0.66)"}   # exit 2

What it found. A pass is bound to the exact tree: one appended comment makes check.mjs refuse it (exit 2) until the change is reverted. The perf run failed at 1.44 against a 1.2 limit, and a hand-edited ratio was caught because check.mjs recomputes it from the logged timestamps. With the stop hook installed, this refusal is what blocks a stale "done".

Caveat. This is a local gate: it stops accidental false claims, not deliberate fabrication, and CI re-execution is the real proof. Wall-clock noise is real: the same workload measured 1.44x cold, 1.02–1.08x warm, and 0.66x in the later re-run used for the forgery test.

View skill source on GitHub

Want something like this built for your company?

Book a callMessage me on LinkedInSee Agentic Engineering
← All skills