agentleFS
anhnguyen0905anhnguyen0905/codex-mcp/skills/run-ledger/SKILL.md

run-ledger

Skill4 starsChanged 6 days agoMITView on GitHub

Append one durable run record per lane and summarize the append-only ledger.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

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

    Use the exact CLI below. --project is the absolute project path.

    line 17

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

Run ledger (embed into Claude prompts)

When to append

Append exactly one record when the lane reaches its terminal outcome: full after the final review and delivery gates, fast-path-analysis or fast-path-small after its result or escalation, and brainstorm after the analysis is accepted, rejected, or parked. Append after the lane log, using the same run id, request, and session start.

The call

Use the exact CLI below. --project is the absolute project path; --request-file may replace --request. --started is the run's session-start ISO timestamp. Omit --language to let the helper detect it; pass it only to correct a wrong detection. --skills and --bypasses are comma-separated; omit them when empty. Exit 0 means written, exit 2 means usage or validation error with nothing written, and exit 1 means I/O failure.

Pass the run's recorded cause labels as --causes <csv> on the end-of-run ledger append.

node "${CLAUDE_PLUGIN_ROOT}/scripts/run-ledger.mjs" append --lane <lane> --project <abs-path> --run-id <id> --profile <profile> --profile-mode <m> --evidence-mode <m> --language-mode <m> --domain <text> --request-file <path> --skills <a,b> --fix-rounds <n> --codex-tokens <n> --started <ISO> --owner-gates <n> --bypasses <a,b> --causes <a,b> --outcome <outcome>

Modes come from STATE.md (profileMode, evidenceMode, languageMode); omit them only when STATE.md lacks these keys. The examples below show legacy/minimal runs whose STATE.md lacks these keys.

Complete calls, one for each lane:

node "${CLAUDE_PLUGIN_ROOT}/scripts/run-ledger.mjs" append --lane full --project /workspace/app --run-id run-1 --profile code --domain implementation --request "Ship the fix" --fix-rounds 1 --started 2026-11-13T04:41:51Z --owner-gates 2 --outcome accepted
node "${CLAUDE_PLUGIN_ROOT}/scripts/run-ledger.mjs" append --lane fast-path-analysis --project /workspace/app --run-id run-2 --profile data --domain retention --request "Analyze retention" --fix-rounds 0 --started 2026-11-13T04:41:51Z --owner-gates 0 --outcome delivered
node "${CLAUDE_PLUGIN_ROOT}/scripts/run-ledger.mjs" append --lane fast-path-small --project /workspace/app --run-id run-3 --profile code --domain config --request "Update config" --fix-rounds 0 --started 2026-11-13T04:41:51Z --owner-gates 0 --outcome done
node "${CLAUDE_PLUGIN_ROOT}/scripts/run-ledger.mjs" append --lane brainstorm --project /workspace/app --run-id run-4 --profile plan --domain roadmap --request "Choose a roadmap" --fix-rounds 0 --started 2026-11-13T04:41:51Z --owner-gates 1 --outcome parked

Classifying profile and domain

Choose profile from the dominant deliverable: code, data, design, plan, content, or mixed. Choose domain as a concise non-empty label (at most 80 characters) for the subject, such as retention, mobile UI, or release planning; do not invent a second taxonomy.

Count every AskUserQuestion call made by the run as one ownerGates. Count each Codex fix round after the initial execution as one fixRounds; review-only turns are not fix rounds.

Field sources

Lane--run-id--started--codex-tokens--fix-rounds--owner-gates
fullreport dir name, e.g. 20261113-114151PLAN.md - Session start:input + output tokens from the session-cost.mjs Totals already produced for cost.mdtotal codex_continue fix rounds across tasks and final reviewnumber of AskUserQuestion calls
brainstormrun dir nameFRAME.md provenance session startomit (null) unless measuredReason rounds runnumber of AskUserQuestion calls
fast pathISO timestamp written on its fastpath.log linetime Claude decided the lane; record it at the gateomit (null) unless measuredcodex_continue roundsnumber of AskUserQuestion calls

Vietnamese typed without diacritics is detected as en; pass --language vi to correct it. Ledger data stays local and is never deleted by the helper (D5); the owner may delete the file by hand.

Counting

Pass --codex-tokens when the run reports it; otherwise omit it. Pass --bypasses for each recorded bypass. Use --outcome exactly as one of accepted, rejected, parked, delivered, done, escalated, failed, or abandoned.

Best-effort rule

The ledger is best-effort: report a non-zero exit to the user and continue; never stop a run for it. One operator writes one append per run; concurrent writers are not supported.

Reading the ledger

Inspect aggregates with:

node "${CLAUDE_PLUGIN_ROOT}/scripts/run-ledger.mjs" summary [--project <abs-path>] [--json]

The summary reports totals, profile × language × outcome counts, medians, bypass rate, and malformed-line count. An empty ledger prints run-ledger: no runs recorded.

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.