knowledge-ledgerlisted
Install: claude install-skill tsurutanmen/claude-plugins
# knowledge-ledger
A hook records every line the agent writes with Write, Edit or MultiEdit into
`.knowledge-ledger/ledger.jsonl` in the project. A line leaves the ledger when
it disappears from the code, or when the user rewrites it themselves. A line is
**explained** once the user has described it in their own words.
**Debt** = agent-written lines still in the code that the user has not explained.
The script is `scripts/kledger.py` in this skill's directory. Standard library
only. Call it with `python3` (or `python` on Windows).
## Commands
```
python3 <skill-dir>/scripts/kledger.py status # table, highest debt first
python3 <skill-dir>/scripts/kledger.py status --json
python3 <skill-dir>/scripts/kledger.py explain FILE --lines A-B # explanation on stdin
python3 <skill-dir>/scripts/kledger.py record --git # agents without hooks: lines added since HEAD
```
## Explain-it-back session
1. Run `status`. Pick the file with the most debt, and in it a block of 5 to 30
agent-written lines that belong together (one function, one branch).
2. Show the block with line numbers. Ask one question: what does this do, and
why is it written this way? Do not hint at the answer.
3. **The user writes the explanation. You never write it for them,** never
offer a draft to approve, and never paraphrase their words into something
better before recording. The ledger measures what the user can say, not what
you can.
4. Read the user's explanation against the cod