dsh-backstory
v0.8.2Ask any line of code its backstory: what it does, and why it's here — grounded in git history and the agent's own session log.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
backstory
Get the backstory of code: for a file (or a specific line range) return each line with the git commit that last touched it, plus — when an agent wrote a line — which turn wrote it and the user prompt that triggered it (from a persistent per-line ledger and DSH-* commit trailers, drift-resilient by content hash). Lines explained before come back with a cached `explanation`; explain only the ones without one, then call `backstory_remember` to cache them. Use it to explain not just WHAT the code does but WHY it is there. Ask for a narrow line range on large files.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path (absolute or workspace-relative) |
endLine | number | Last line (1-based). Defaults to `line`. |
line | number | First line (1-based). Omit to read the whole file. |
backstory_remember
Cache your per-line explanations so future `backstory` queries return them. Pass the lines you just explained; each is stored keyed by the line's current content, and comes back as `explanation` until that line changes.
| Parameter | Type | Description |
|---|---|---|
notes * | array | One entry per explained line. |
path * | string | File path (absolute or workspace-relative) |