run-ledger
Skill1 starsChanged 3 months agoMITView on GitHub
Type: skill (deterministic) · Used by: all workflows · Status: LIVE (P1) You are the run-ledger skill. You have two entry points: CHECK (called at O0, before the run) and WRITE (called at the end of the run, after verdict is known). The calling workflow tells you which mode to use. Inputs (passed by the workflow): - workflow, team, profile, env, trigger (cron | deploy | manual) - script_path — e.g. live/demo-web/api-benchmark/script.js - suite — "k6" (default when absent) |…
2 other projects use a version of this.
Adopted by
Most recently taken up by
- elfovo/agent-chain-doctortheir own version, first seen Oct 13, 2026
- aditya-deokar/software-factorytheir own version, first seen Sep 29, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- aditya-deokar/software-factory★ 0same name
- elfovo/agent-chain-doctor★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- k6-browser-testSkill
- k6-load-testSkill
- k6-playwright-converterSkill
- k6-smoke-testSkill
- k6-test-plannerSkill
- apply-ws2-conventionsSkill
- author-resilient-playwrightSkill
- build-status-viewsSkill
- choose-k6-execution-modeSkill
- compare-coreSkill
- compare-to-baselineSkill
- corroborate-2-sourcesSkill
- curate-baselinesSkill
- doc-consistency-checkSkill
- emit-otlp-and-prometheusSkill
- estimate-token-costSkill
- explore-product-structureSkill
- file-perf-regression-jiraSkill
- func-verdictSkill
- heal-playwright-suiteSkill
- k6-profile-benchmarkSkill
- k6-profile-loadSkill
- k6-profile-soakSkill
- k6-profile-spikeSkill
- k6-profile-stressSkill
- learn-via-k6-docsSkill
- link-grafana-panelSkill
- notify-responsible-teamSkill
- open-draft-prSkill
- parse-k6-json-summarySkill
- parse-playwright-summarySkill
- perf-run-logSkill
- run-k6-scriptSkill
- run-playwright-suiteSkill
- scope-reviewSkill
- scrub-har-secretsSkill
- triage-func-verdictSkill
- triage-perf-verdictSkill
- verify-k6-scriptSkill
- verify-playwright-suiteSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- Very specific: line 36
Use day_bucket for trigger=cron or trigger=manual.
- Distinctive: line 73
Validate required fields: before writing:
- Very specific: line 82
If any required field is missing → return { "action": "fail", "reason": "missing field: <name>" } and do NOT write
- Distinctive: line 92
Append-only: Never rewrite or delete prior lines.
- Distinctive: line 101
Read, Write (plain file I/O only — no MCP, no model call)
≈ “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.
Files
run-ledger
Append-only idempotency ledger — makes every run exactly-once and feeds all downstream consumers.
Type: skill (deterministic) · Used by: all workflows · Status: LIVE (P1)
Prompt
You are the run-ledger skill. You have two entry points: CHECK (called at O0, before the run) and WRITE (called at the end of the run, after verdict is known). The calling workflow tells you which mode to use.
Entry point A — CHECK (O0, before run)
Inputs (passed by the workflow):
workflow,team,profile,env,trigger(cron|deploy|manual)script_path— e.g.live/demo-web/api-benchmark/script.jssuite—"k6"(default when absent) |"functional". For functional runsscript_pathis the suite directory (e.g.live/redline-dashboard/functional);script_shais the SHA-256 of the concatenation ofplaywright.config.ts+ everytests/*.spec.tssorted by path (a spec fix → new sha → new dedupe_key → run re-arms).baseline_pathis omitted: use the empty-string SHA-256 and noteno-baseline-by-design.baseline_path— e.g.baselines/demo-web.api-benchmark.jsonday_bucket— ISO dateYYYY-MM-DD(for cron/manual runs)deploy_sha— git SHA of the deploy commit (for deploy-triggered runs; omit for cron)
Steps:
- Compute
script_sha: SHA-256 of the file atscript_path. Use the Read tool to read the file content, then compute SHA-256. If the file does not exist, return{ "action": "fail", "reason": "script not found: <path>" }— do not proceed. Functional suites (suite: "functional"):script_pathis the suite directory — computescript_shaas the SHA-256 of the concatenation ofplaywright.config.ts+ everytests/*.spec.tssorted by path (read in that order, concatenate contents, hash once). - Compute
baseline_sha: SHA-256 of the file atbaseline_path. If the baseline file does not exist, use the empty-string SHA-256 (e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) and noteno-baseline. Functional suites:baseline_pathis omitted — use the empty-string SHA-256 and noteno-baseline-by-design. - Assemble the dedupe input string (pipe-delimited, exact order):
Use<workflow>|<team>|<profile>|<env>|<script_sha>|<baseline_sha>|<day_bucket OR deploy_sha>day_bucketfortrigger=cronortrigger=manual; usedeploy_shafortrigger=deploy. - Compute
dedupe_key: SHA-256 of the assembled string above. - Read
state/run-ledger.jsonlline by line. Look for any line wherededupe_keymatches ANDstatus == "done".- Match found → return
{ "action": "skip", "run_id": "<prior run_id>", "verdict": "<prior verdict>", "dedupe_key": "<key>" }. The workflow stops here and returns the prior result. - No match → return
{ "action": "proceed", "dedupe_key": "<key>", "script_sha": "<sha>", "baseline_sha": "<sha>" }. The workflow continues to O1.
- Match found → return
Entry point B — WRITE (after verdict)
Inputs (passed by the workflow — all fields from CHECK plus run results):
- Everything from CHECK output (
dedupe_key,script_sha,baseline_sha) run_id— the run identifier (e.g.demo-web_api-benchmark_stg_20260610T131126Z)exit_code— integer (0=green, 99=red, 97=crash)overall_verdict—"green"|"red"|"fail"|"no-baseline"summary_line— one-line human summary (e.g."GREEN — GET /api/config p95=829ms (threshold 1000ms)")endpoints[]— array of per-endpoint results (REQUIRED on green/red; empty array on fail/no-baseline):{ "name": "GET /api/config", "metric": "demo_web_config_health", "p95_ms": 829, "p95_red_ms": 1000, "verdict": "green" }checks_passed,checks_failed— integersiterations— integer (10 for standard benchmark/browser)report_path— path to the reports folder for this run- Red runs also require:
sources—1at P1 (Grafana not yet wired);2at P2+consecutive_rejects— read from the most recent ledger record for the sameteam+profile+endpoint; if no prior record exists, use0reviewer_decision—"SIGN_OFF"|"REJECT"|"REQUEST_CHANGES"|null(if reviewer not yet called)jira_filed— boolean (defaultfalse)jira_key— string |null
Steps:
- Assemble the complete schema-v1 record using ALL inputs above. Fields
schema,recorded_at(current ISO 8601 timestamp), andstatus: "done"are added by this skill. For red runs: ifconsecutive_rejectsis not provided by the caller, look up the most recent ledger line for the sameteam + profile + endpoints[0].name(k6) — orteam + profile + failures[0].testfor functional records, whereendpointsis empty — wherereviewer_decision == "REJECT"— count the consecutive streak from the bottom of the file; if the streak is broken by any non-REJECT record, reset to 0. - Validate required fields before writing:
schema,run_id,dedupe_key,workflow,team,profile,env,trigger— all must be present and non-nullscript_sha,baseline_sha— must be 64-char hex stringsendpoints[]— must be a non-empty array on green/red for k6 records. Forsuite: "functional"recordsendpoints: []is valid; insteadtests_total,passed,failedmust be present, and red records must carryfailures[](name/file/error) — the 24h Jira dedupe and 3-strikes streak key onfailures[0].testfor functional. For k6 records an empty array remains valid only onfailorno-baseline.- On
overall_verdict == "red":sourcesmust be an integer ≥ 1 - If any required field is missing → return
{ "action": "fail", "reason": "missing field: <name>" }and do NOT write
- Append the record as a single minified JSON line to
state/run-ledger.jsonl. Use the Write tool to append (read the current file first, append the new line, write back). Never rewrite or reorder existing lines. - Return
{ "action": "written", "run_id": "<run_id>", "dedupe_key": "<key>" }.
Hard rules
- Append-only. Never rewrite or delete prior lines. If a record has an error, add a new corrective line — never edit in place.
- The dedupe_key is the only identity. Two records with the same key are a bug (CHECK should have caught it). If a duplicate is detected at WRITE time, skip and return
{ "action": "skip", "reason": "duplicate key" }. - Script fix → SHA changes → new key → runs again. A changed script or baseline always produces a new dedupe_key, so re-runs after fixes are never blocked.
- Cron dedupes per day per (workflow, team, profile, env, script, baseline). One record per day is correct — re-triggers within the same UTC day on the same code collapse to the same key.
- Deploy dedupes per deploy SHA. Re-triggering CI on the same commit is a no-op.
- Pre-v1 records (before 2026-06-10) have no
schemafield — read them defensively; never update them.
Tools
Read, Write (plain file I/O only — no MCP, no model call)
Data
- Reads/writes:
state/run-ledger.jsonl - Reads (for SHA computation):
live/<team>/<profile>/script.js,baselines/<team>.<profile>.json
Downstream consumers and their field dependencies
| Consumer | Fields required |
curate-baselines | endpoints[].p95_ms, overall_verdict, recorded_at, team, profile |
file-perf-regression-jira | endpoints[].name (k6) / failures[0].test (functional) — 24h dedupe; sources; reviewer_decision |
| 3-strikes escalation (reviewer) | consecutive_rejects, team, profile, endpoints[].name (k6) / failures[0].test (functional) |
| O0 idempotency gate | dedupe_key, status |
| perf-sweep aggregate | overall_verdict, run_id, team, profile, env |
Frozen skill registry: AGENTS.md in this repo
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
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.

