npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xjq11029/dsh-guide-code-review

v1.5.0

Published

代码分析/审查方法论指南的 Cordis 插件:单一可信源 + 受控导出 + 漂移检测。解决逐项目手动拷贝导致的版本与变更日志漂移。

Readme

@xjq11029/dsh-guide-code-review

代码分析 / 审查方法论指南的 Cordis 插件。遵循 deepseek-harness「万物皆为插件」范式, 把 CODE_ANALYSIS_GUIDE.mdCODE_REVIEW_GUIDE.md_GUIDE_CHANGELOG.md 封装为单一可信源,供各项目以受控、可检测的方式复用,根除逐项目手动拷贝导致的 版本与变更日志漂移。

为什么需要它

过去指南靠手动拷贝落入每个项目根目录,带来三类问题:

  • 多副本编辑:指南正文与其引用的变更日志文件名各自演化、互不一致 (曾出现 CODE_REVIEW_GUIDE.md 仍引用已合并删除的 _REVIEW_GUIDE_CHANGELOG.md)。
  • 无受控写入:项目侧可手改任意副本,无版本钉、无校验。
  • 无漂移检测:无法回答「本项目用的指南是不是最新」。

本插件的三道闸:

  1. 单一可信源 —— 指南与变更日志只在本包 guides/ 维护;包版本号 == 指南版本号
  2. 受控消费 —— 项目只通过 guide:export 拉取、通过 guide:check 校验,绝不手改; 导出时自动重写失效内部引用并写版本钉。
  3. 可检测漂移 —— 每个项目记录所钉版本,guide:check 报告是否落后于包版本。

安装

pnpm add -D @xjq11029/dsh-guide-code-review
# 或作为 git 依赖
pnpm add -D "github:your-org/dsh-guide-code-review"

作为 dsh 插件使用时,宿主需提供 peer 依赖:@deepseek-ai/cordis@deepseek-ai/dsh-skill@deepseek-ai/dsh-system-prompt@deepseek-ai/dsh-tools@deepseek-ai/schemastery(即任意 deepseek-harness 工作环境)。

作为 dsh 插件挂载

在项目的 cordis.yml 中以裸名挂载(由 resolver manifest 解析依赖):

plugins:
  - name: '@xjq11029/dsh-guide-code-review'
    config:
      inject: pointer      # none | pointer(默认) | full
      exportDir: docs/guides

运行时该插件会:

  • 注册 code-analysis-guide / code-review-guide 两个 bundled skill(rank 600,跨项目共享一份);
  • 注册 GuideServicectx.guide:版本 / check / export);
  • inject 向 system-prompt 注入轻量指针(默认)或全文;
  • 注册 guide_check / guide_export 工具,供 agent 在会话内自检与导出。

独立 CLI(不依赖 dsh 运行时)

即便不挂载进 dsh,也可用 CLI 直接管理各项目(从已安装的包读取 guides/):

# 检查 guides/ 内链接自洽(CI 闸门)
dsh-guide link-check

# 检测某项目指南版本是否漂移
dsh-guide check --root /path/to/project

# 受控导出指南到项目(默认 docs/guides/),并写 .guide-code-review.version 钉
dsh-guide export --root /path/to/project
dsh-guide export --root /path/to/project --force   # 覆盖已存在文件

check 退出码:一致 0 / 漂移 1 / 参数错误 2link-check 有断链 1

版本纪律(单一可信源成立的前提)

  • 所有指南编辑只在本题仓库 guides/ 内进行,并 bump 包版本package.jsonversion)。
  • 包版本 = 指南版本:分析指南为主版本锚(CODE_ANALYSIS_GUIDE.md 版本),变更日志随包版本走。
  • 变更日志只在 guides/_GUIDE_CHANGELOG.md 编辑;各项目通过 export 拉取,永不手改
  • pnpm link-check 是 CI 闸门:拦截「正文引用已删除/改名文件」类回归。

迁移自旧手动拷贝

旧方式:每个项目根放 CODE_ANALYSIS_GUIDE.md 等,靠 @path 引用。 新方式:

  1. 删除项目根旧的指南副本(或保留为 export 产物);
  2. 安装并挂载本插件(或仅用 CLI);
  3. 运行 dsh-guide export --root . 生成受控副本 + 钉文件;
  4. 对话中改用 code-analysis-guide / code-review-guide skill 或 @dsh-guide-code-review 注入的指针, 不再依赖项目根旧文件。

开发

pnpm link-check     # 链接自检
pnpm test           # node:test 单测(无需外部测试框架)
pnpm export --root /tmp/demo --force   # 本地试导出

src/core.ts纯逻辑、零 dsh 依赖(可读写/校验),独立可测;src/index.ts 为 dsh 集成入口(type-only 引入 dsh 类型),仅在 dsh 宿主内编译。src/cli.ts 为独立命令行入口。