dsh-backstory
Ask 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.
AI 분석
核心用途是让 Agent 能够查询代码行的 Git 提交历史(作者、日期、提交信息)。适合需要深入理解历史代码变更原因的软件维护和重构任务。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:MeghanBao/dsh-backstoryUsage
The plugin registers a model-facing backstory tool, so just ask the agent
in natural language:
- "what's the backstory of
src/auth.tsline 88?" - "explain
utils/date.tslines 10–40 and why each part is there"
The tool returns each line with the commit that last touched it (author, date, message); the agent narrates what the code does and uses the commit messages for why. Outside a git repo it degrades gracefully to source-only.
Tool: backstory
| Param | Type | Notes |
|---|---|---|
path | string (required) | absolute or workspace-relative |
line | number | first line (1-based); omit for the whole file |
endLine | number | last line; defaults to line |
Whole-file reads are bounded to 400 lines.