meghanbao/dsh-backstory

Answers what any line of code does and why it is there, by tracing it to the commit and agent turn that wrote it.

Most provenance tools stop at git blame. Backstory fuses three layers: git history (line to commit to what and why), a persistent line-level ledger that records every write and edit with its turn, prompt, touched lines and content hashes, and the live session log that identifies which agent turn wrote a file and what prompt triggered it. Attribution is hash-based, so provenance survives a line moving within the file, and the git-native layer goes further with DSH-* commit trailers recovered through blame, plus an optional prepare-commit-msg hook (npm run install-hook) that folds ledger records into trailers automatically. Incremental explanations keep the cost down: per-line answers are cached by content hash through backstory_remember, so only lines whose text changed get re-explained. A /backstory user command takes a file:line argument, and the same engine is published as an MCP server for clients other than DSH.

Coding & Development ★ 2
View on GitHub ↗

Install

dsh plugin add dsh-backstory

The README's DSH install line, written without a profile argument — it installs into the default profile, so add --profile <name> if you use a named one. The package is also an MCP server, and the README documents that route separately (claude mcp add backstory -- npx -y dsh-backstory, or a backstory entry with command: npx, args: ["-y", "dsh-backstory"] in any MCP client's config), which needs no DeepSeek Harness at all. A local cordis.yml loads just the dsh plugin for development.

Compatibility

Built against the dsh developer preview, and the README says APIs may shift; the runtime touchpoints are defensive and degrade gracefully so the tool does not take a session down with it. Privacy is configurable rather than assumed: stored prompts are redacted for secrets automatically, and there is an opt-out through .dsh/backstory.config.json or the DSH_BACKSTORY_DISABLE environment variable. The engine is covered by 43 tests spanning pure logic and end-to-end runs against real temporary repositories. Line-level ledger records live in .dsh/backstory.jsonl, per-line explanations cache into .dsh/backstory-notes.jsonl.

Details

Alternatives

MAXeaglet/dsh-bash-terminal · huanyuLv/dsh-balance-tide · MichengAI/dsh-simplify

More plugins in Coding & Development

Browse more in Coding & Development

Guides for Coding & Development plugins