Chuyển đến nội dung chính

ai-code-review-dsh

Đã xác minh

@tabilo/ai-code-review-dsh · v1.0.4 · MIT

DeepSeek Harness (dsh) plugin for @tabilo/ai-code-review: registers the ai_code_review tool (review | context) that reuses the Node.js engine to collect diffs, run tests/coverage, do impact analysis, and feed pack skills to the model.

Cài đặt

dsh plugin add @tabilo/ai-code-review-dsh

Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.

Mã nguồn

Thẻ

Tác giả

Readme

@tabilo/ai-code-review-dsh

A DeepSeek Harness (dsh) plugin that brings the @tabilo/ai-code-review workflow to dsh. It registers one tool, ai_code_review (action review | context), which reuses the same dependency-free Node.js engine (diff collection, pack routing, test/coverage gate, impact analysis) as the Copilot version — but feeds the data to the DeepSeek model instead of a Copilot skill.

The model reads the collected context + pack review checklists, performs the review, and writes .ai-code-review/out/review-report.md itself (via the dsh fs tool).

Works on both dsh web and dsh headless.

Install

dsh plugin --profile web add @tabilo/ai-code-review-dsh

The plugin auto-mounts via its dsh.bundle.patch declaration (no manual cordis.patch.yml editing needed). Restart dsh web afterwards.

Local development (before publishing): from the repo root, run npm install so @tabilo/ai-code-review resolves, then point dsh at the workspace. The plugin also falls back to the repo-root src/core engine if the package is not installed.

Use

In the chat, ask the model to review, e.g.:

"Review this branch with the ai_code_review tool"

The model calls ai_code_review with:

param type description
action string review (full data) or context (collect diff only)
repoRoot string Absolute path to the git repository root
target string Base branch to diff against (default develop)
source string Source branch (default current HEAD)
scope string branch | staged | working | commit:<a>..<b>
pack string Force a pack: java | react | vue | angular
reportLang string en | vi (hint for the model)

What the tool returns (object)

  • contextFile — path to .ai-code-review/out/context.md (read it via the fs tool)
  • changedFiles, added, removed, source, baseRef
  • config — report language, default target, active packs
  • packs[] — per pack: priority, routing, skills, and gate (test/coverage raw output + thresholds)
  • impactedFiles — files touched by the change (grep fallback; use GitNexus/CodeGraph MCP if available)
  • packSkillsText — the full pack review checklists for the model to apply

The model reviews the diff against the checklists, applies the C0/C1 coverage gate, and writes .ai-code-review/out/review-report.md.

Develop

This package ships plain ESM (lib/index.js) so no build step is required for consumers.

npm publish        # publish to npm, then others can `dsh plugin add` it

License

MIT