agentleFS
89jobrien89jobrien/godmode/skills/crs-ledger-apply/SKILL.md

godmode:crs-ledger-apply

Skill1 starsChanged 59 days agoMITView on GitHub

Merge crs-ledger-diff's proposed entries into the installed rule-ledger YAML, then regenerate the Markdown view from that YAML plus live crs-stats.json numbers. Merge/render half of the coursers rule-ledger pair.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    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:

    After crs-ledger-diff has written .ctx/coursers/rule-ledger-proposed.yaml

    line 20
  2. Very specific:

    Read .ctx/coursers/rule-ledger-proposed.yaml.

    line 27
  3. Very specific:

    Read .ctx/coursers/rule-ledger.yaml (empty mapping if missing).

    line 31
  4. Very specific:

    Read .ctx/coursers/crs-stats.json (blocks = counts, last_seen = epoch floats per rule ID).

    line 36
  5. Very specific:

    Never deletes entries flagged as orphaned by crs-ledger-diff — this step only ever writes what diff proposed.

    line 53

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

crs-ledger-apply

Merge crs-ledger-diff's proposed entries into the installed rule-ledger YAML, then regenerate the Markdown view from that YAML plus live crs-stats.json numbers. This is the merge/render half of the coursers rule-ledger pair; crs-ledger-diff is the discover/propose half.

When to Use

  • After crs-ledger-diff has written .ctx/coursers/rule-ledger-proposed.yaml
  • Asked to "apply the ledger proposal" or "regenerate the rule ledger"
  • To refresh rule-ledger.md's numbers even with no new rows (e.g. after a rule has tripped a few more times)

Steps

  1. Read .ctx/coursers/rule-ledger-proposed.yaml. If it is missing or {}, report "nothing to merge" and continue to step 3 anyway — the Markdown view still needs regenerating since crs-stats.json counts may have changed since the last render.
  2. Read .ctx/coursers/rule-ledger.yaml (empty mapping if missing). For each key in the proposed file, add it to the ledger only if that key is not already present. Never overwrite an existing entry — a human may have already filled in its prose. Write the merged result back to .ctx/coursers/rule-ledger.yaml.
  3. Read .ctx/coursers/crs-stats.json (blocks = counts, last_seen = epoch floats per rule ID). Regenerate .ctx/coursers/rule-ledger.md:
    • Header: <!-- generated by crs-ledger-apply — do not hand-edit; edit rule-ledger.yaml instead -->
    • One table per category found in the merged YAML, columns: Rule ID | Occurrences | Last seen | Pattern | Prevention | Notes
    • Occurrences/Last seen always come from crs-stats.json at render time — never read or written from the YAML. A rule with no entry in crs-stats.json yet (never triggered) renders as 0 / never.

Contract

  • Input: .ctx/coursers/rule-ledger-proposed.yaml (from crs-ledger-diff), .ctx/coursers/rule-ledger.yaml, .ctx/coursers/crs-stats.json
  • Output: updated .ctx/coursers/rule-ledger.yaml (only if new rows were merged) and an always-regenerated .ctx/coursers/rule-ledger.md
  • Never deletes entries flagged as orphaned by crs-ledger-diff — this step only ever writes what diff proposed; orphan pruning is a manual edit to rule-ledger.yaml.
  • Never touches ~/.config/coursers/course-correct-rules.json, .ctx/coursers/crs-stats.json (read-only here), or anything under .ctx/memory-bank/.

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.