agentleFS
BuilderIOBuilderIO/agent-native/.agents/skills/verify-execution-lease/SKILL.md

verify-execution-lease

Skill7.6k starsChanged 5 months agoMITView on GitHub

Model-check the agent run execution lease and durable step journal with TLA+. Use when changing turn lease claim, renew, release, fenced writes, reapers, aborts, run pruning, beginAgentExecutionStep and its siblings, or the code that dispatches a tool effect after markAgentExecutionStepDispatched.

  • Installs packages

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    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. Very specific:

    P1.: Only the owner of the current live lease generation commits writes to agent_execution_steps.

    line 21
  2. Distinctive:

    If the protocol changed, change the action so it matches the code.

    line 58
  3. Very specific:

    Only once the model describes the new code, run pnpm verify:execution-lease --update-coverage to move the sync commit.

    line 62
  4. Distinctive:

    If every step is something the code can do, it is a bug.

    line 71
  5. Distinctive:

    If a step is impossible in the code, fix that action's guard to match the code.

    line 73
  6. Distinctive:

    Never weaken P8, P1, P6 or ClaimRespectsLiveOwner, never drop a mutation, and never shrink the bounds just to get a pass.

    line 75

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

Verify the execution lease

verification/execution-lease/ExecutionLease.tla models one turn's execution lease, its runs, and one durable execution step. TLC checks it exhaustively for three runs. The promise it guards:

  • P8. A step whose replay policy is never runs its external effect at most once, across every run and lease generation, including deposed workers that keep running. If this breaks, an email or a non-idempotent write goes out twice after a crash or takeover.
  • P1. Only the owner of the current live lease generation commits writes to agent_execution_steps.
  • P6 (no resurrection) and ClaimRespectsLiveOwner guard the lease itself.

P8 is per step row. It assumes every retry of a call reaches the same step id; whether a re-planned call does is the tool-call journal's job, which the model does not cover (NOTES.md, "Outside the model").

verification/execution-lease/NOTES.md has the assumptions, the bounds, what is left out, the results, the known findings, and a code-to-action map.

Run it

pnpm verify:execution-lease
  • Needs Java 11 or newer (brew install openjdk@21, or any java on PATH). The first run downloads the pinned TLA+ tools to .tmp/tla/ and checks their sha256.
  • About 3 to 5 minutes. --quick runs only the two checks (2 to 3 minutes).
  • Exit 0: every check passed, every mutation still fails, every known finding still reproduces, and no covered function changed.
  • Exit 1: one of those did not hold; the output names it.
  • Exit 2: could not run (no Java, tools not verified, TLC error). Never read exit 2 as a pass.

When your change touches covered code

manifest.json lists the covered code with a hash of each entry, recorded at coverage.syncCommit: named functions, plus anchored regions (from/to exact strings) for logic that lives inside a large closure. If you edit one, the runner fails with "covered code changed"; if an anchor no longer matches exactly once, it exits 2 until you update the anchors.

  1. Find the function's model action in the NOTES.md map and re-read both.
  2. If the protocol changed, change the action so it matches the code. Keep one action per real transaction, the guard equal to the code's WHERE clause and checks, and the cited file:line current.
  3. Run pnpm verify:execution-lease.
  4. Only once the model describes the new code, run pnpm verify:execution-lease --update-coverage to move the sync commit.

Reading a failure

A violation in ExecutionLease.cfg or ExecutionLeasePolicyFlip.cfg is either a real bug or a modelling error. Walk the TLC trace step by step against the cited code.

  • If every step is something the code can do, it is a bug. Report it as a numbered sequence in the code's words.
  • If a step is impossible in the code, fix that action's guard to match the code.
  • Never weaken P8, P1, P6 or ClaimRespectsLiveOwner, never drop a mutation, and never shrink the bounds just to get a pass.

A mutation that stops failing means the check has lost the ability to catch that break. Fix the model before anything else.

Known findings

findings/ holds configs that reproduce real gaps in the current code (F2, F3; F1 and F4-F6 are code-reading findings). They are expected to fail. When one is fixed, the runner reports that it no longer reproduces. Move its config into checks in manifest.json and update NOTES.md.

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 5 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 4 mentionsOct 2026: 51 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the BuilderIO/agent-native repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about BuilderIO/agent-native

The biggest 5 of 61 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 61

Talked about on GitHub and Bluesky (61 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 11

6 more on Bluesky

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.