Legal knowledge-base workbench: hybrid keyword/statistical/vector retrieval over local statute .doc/.docx corpora, faceted filtering, charge-name and civil-cause trees, a document editor, and four AI tools (citation check, contract review, AI analysis, AI drafting).
Install
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/Iambatman1928/dsh-lawkb-ui/releases/latest/download/lawkb-ui.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Iambatman1928/dsh-lawkb-ui
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
面向法律检索的本地 DSH 插件:把你机器上的法规 .doc/.docx 语料建成条文级检索库,提供关键词 / 统计语义 / 向量语义三种检索与 RRF 融合、双维度筛选、大纲与条文级阅读,并内置案名索引、民事案由树、文书编辑器,以及「引用核验 / 合同审查 / AI 分析 / AI 文书生成」四件套。
⚠️ 本插件是检索与写作辅助工具,不构成法律意见。AI 生成的内容须由使用者自行复核。
特性
- 直读本地语料:直接解析
.doc/.docx(Word 二进制 / OOXML / 伪 HTML / RTF 多策略嗅探),全程离线,语料不外传。 - 条文级检索:按「一条条文 / 一段文章」切块建索引;子串匹配 + 效力级别先验 + 命中条文数打分。
- 三种检索 + RRF 融合:关键词(子串)、统计语义(IDF + 概念共现 + 法条引用图)、向量语义(本地 bge-small-zh-v1.5 嵌入),可三路融合并逐条标注来源。
- 双维度筛选:效力级别 / 制定机关 / 时效性 / 公布年份 / 数据源,计数剔除自身维度。
- 知识索引树:刑事罪名树(刑法括注 + 补充规定)、民事案由树(《民事案件案由规定》)。
- 文书编辑器:9 种文书模板 + 常用条文库,纯模板渲染(非 AI),条文实时取库内现行有效原文。
- AI 四件套:引用核验(纯本地)、合同审查(纯本地规则)、AI 分析(先检索 → 模型只依据条文 → 回验条号)、AI 文书生成;模型走宿主
llm服务。
安装
dsh plugin add github:Iambatman1928/dsh-lawkb-ui
装完重启 DSH。向量检索首次使用会自动下载本地嵌入模型(bge-small-zh-v1.5,约 23 MB,默认从 huggingface.co 拉取;无法直连时设 HF_ENDPOINT=https://hf-mirror.com),之后全程离线。
数据目录与语料
- 插件数据(索引 / 抽取缓存 / 草稿 / 导出)默认落在
~/lawkb/。 优先级:cordis.patch.yml的config.dataRoot> 环境变量LAWKB_DATA_ROOT> 默认值。 - 安装后先在「数据管理」里登记你的语料根目录(一个含
.doc/.docx法规文本的目录),再执行入库。 入库 / 建索引为后台任务,进度可查;向量索引可中断续跑。
许可证
MIT © 2026 Iambatman1928
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10290
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10290
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 7336
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7093
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5036
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
Devin-AXIS/deepseek-design#deepseek-idesign★ 1792
Visual design studio for websites, app prototypes, posters, cards, reports, and magazines, with templates, direct element editing, selection-aware AI draft handoff, and export.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.