lpeixin/dsh-project-compass 预览 preview

lpeixin/dsh-project-compass

An AI-powered DSH plugin for codebase analysis, developer onboarding, and project-level Q&A. 项目罗盘 / Project Compass — DSH 插件,通过 AST、依赖图、RAG 和 LLM 分析代码库,自动生成架构、模块、调用链与上手指南,并提供项目级 AI Q&A,帮助开发者快速理解和接手项目。

Project Overview项目介绍

dsh-project-compass (Project Compass) is a codebase reconnaissance and citation-backed Q&A plugin built for DeepSeek Harness. It registers six tools with the model through Cordis using the uniform project_compass_* namespace, exposes a single /compass command to humans, and ships only named exports (name, inject, apply) with no default export. Host services are reached solely through ctx.get(...), so when the default session model or LLM service is unavailable the plugin degrades to deterministic output.

The typical workflow is: point it at an unfamiliar project path, run project_compass_report to produce six artifacts in one pass — ONBOARDING.md, ARCHITECTURE.md, MODULE_MAP.md, KEY_FLOWS.md, GETTING_STARTED.md and a machine-readable project-compass.json — then keep querying with project_compass_ask. Every claim is routed through a validator that requires paths, line numbers and symbols to actually exist; failed claims are dropped and counted rather than silently surfaced. The target audience includes new developers inheriting legacy code, tech leads estimating the blast radius of a change, and AI agents that need stable project context without re-grepping every turn; the optional contextInjection flag injects a short project brief into the system prompt when enabled.

Dependencies are strictly limited to node:* built-ins — no npm packages, no install scripts, no build output — and the package is pure ESM with "type": "module". Writes are confined to <project>/.project-compass/ and <project>/docs/project-compass/, and on first write a *-rule .gitignore is dropped into the machine-state directory so absolute local paths never get committed by accident. Detailed docs (docs/TOOLS.md, docs/CONFIG.md, docs/ARCHITECTURE.md, docs/OUTPUT-FORMAT.md, docs/VERIFICATION.md, docs/ROADMAP.md) are currently Chinese-only; license is MIT; tests run via node --test and the smoke test via node scripts/compass-cli.mjs analyze <path>.

dsh-project-compass(Project Compass 项目罗盘)是一款面向 DeepSeek Harness 的代码库侦察与可引用问答插件。它通过 Cordis 工具注册为模型暴露 6 个 project_compass_* 工具,同时为用户提供 /compass 命令,并把工具命名空间统一规范。核心能力是把陌生代码库转化为 6 份带 path:line 引用的制品:ONBOARDING、ARCHITECTURE、MODULE_MAP、KEY_FLOWS、GETTING_STARTED 与 project-compass.json。

典型工作流是:拿到一个陌生项目路径后运行 project_compass_report,一次性产出上述 6 份文档,再用 project_compass_ask 持续追问;回答附带引用并经过校验,路径、行号、符号必须真实存在。它面向接手遗留项目的新成员、做变更评估的技术负责人,以及需要项目上下文作为系统提示注入的 AI 代理。contextInjection 选项默认关闭,启用后可在同一会话中持续携带项目简报。

依赖方面仅允许使用 node:* 内置模块,零 npm 依赖、零安装脚本、零构建产物;写入范围只触及目标项目的 .project-compass/ 与 docs/project-compass/,不会修改任何业务代码。机器状态目录会在首次写入时自动创建 .gitignore 以避免误提交根路径。文档 docs/TOOLS.md、CONFIG.md、ARCHITECTURE.md 等目前为中文版;许可为 MIT;测试使用 node --test,冒烟测试使用 node scripts/compass-cli.mjs analyze。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
  • Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:lpeixin/dsh-project-compass

把 lpeixin/dsh-project-compass 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

English | 中文

Project Compass — understand any codebase in 10 minutes, with evidence not guesses

dsh-project-compass · Project Compass 项目罗盘

Codebase reconnaissance and citation-backed Q&A for DeepSeek Harness.

Project Compass reads an existing project and turns "how is this thing put together" into a set of evidence-cited documents, plus a question-answering interface you can keep asking.

It does not require you to get the project running first, does not require you to read all the code, and does not go online. Give it a path and it returns six artifacts: an onboarding guide, an architecture description, a module map, the key flows, the steps to get it running, and a machine-readable JSON.


Documentation language. The detailed documents under docs/ — TOOLS, CONFIG, OUTPUT-FORMAT, ARCHITECTURE, ROADMAP and VERIFICATION — are currently written in Chinese. If you need English versions, please raise it in an issue.


Table of contents


What problem it solves

When you take over an unfamiliar codebase, the expensive part is not reading code — it is not knowing where to start reading, and not knowing what will break when you change something.

Situation What it used to cost What Project Compass gives you
New developer onboarding A colleague explains verbally for two hours, and afterwards you still don't know where the entry point is; the README was last updated three years ago GETTING_STARTED.md gives runnable steps to get up and running, ONBOARDING.md gives a reading order arranged by role, and every item carries path:line so you can jump straight into the code
Inheriting a legacy project No documentation, the original owner has left, and changing one line feels like a three-day risk ARCHITECTURE.md + MODULE_MAP.md give module boundaries, dependency direction, cycles and high-risk modules; risks come with reasons, not with feelings
A tech lead reviewing a change "How big is the blast radius of this change?" can only be guessed from experience A module / file / symbol three-level dependency graph plus reachability from entry points, so blast radius is something you look at rather than guess at; key flows come with Mermaid sequence diagrams
An AI agent that needs project context Every turn re-greps, the context fills up with scattered fragments, and it still invents files that do not exist project_compass_ask returns answers with citations (path:line + symbol + rationale); every claim passes a validator first — paths, line numbers and symbols must really exist, and claims that fail validation are explicitly dropped and counted

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-approval-voice 下一个 Next dsh-zh-hant-hk →