Preface

In DSH’s plugin ecosystem, “everything is a plugin” is a core principle. In CAD drawing review, relying solely on screenshots or manual experience often leads to insufficient evidence for issue localization, and repeated runs can produce inconsistent results. dsh-cad-review grounds its inspection in ASCII DXF entities: it first reads entities, then applies project-specific policies to execute deterministic rule checks, and associates issues with entities, layers, source file line ranges, and geometric positions.

What This Is

dsh-cad-review is a DeepSeek Harness plugin maintained by dongsheng123132, licensed under MIT. It performs entity-level inspection and deterministic CAD rule review for ASCII DXF files.

It does not infer engineering defects from screenshots. Instead, it reads CAD entities, hashes the source drawing, and outputs issue evidence tied to entity positions, layers, source file line ranges, and geometric locations.

Core Features

Entities and Evidence

  • Reads CAD entities and hashes the source drawing.
  • Supports LINE, LWPOLYLINE, CIRCLE, ARC, TEXT, MTEXT, POINT, and INSERT geometry.
  • Issue output is associated with entity handle/index, layer, source file line range, and geometric position.
  • TEXT/MTEXT content and malformed numeric tokens are represented only via SHA-256 and length.

DSH Tools

  • dsh_cad_inspect_dxf: Returns source file SHA-256, units, bounds, layers, entity counts, and precise entity geometry/line evidence.
  • dsh_cad_review_dxf: Returns the same evidence along with a deterministic policy report; accepts an optional policyJson parameter to override the configured policy per invocation.

MCP Exposure

.mcp.json exposes:

  • cad_dxf_inspect_inline
  • cad_dxf_review_inline

MCP services cannot read files, access the network, execute drawing content, spawn subprocesses, or write artifacts.

CLI

  • dsh-cad-review inspect
  • dsh-cad-review review

Deterministic Rules

Rule checks cover:

  • malformed numbers
  • zero-length lines
  • non-positive radii
  • polyline closure
  • exact duplicate geometry
  • required/forbidden layers
  • forbidden entity types
  • text height
  • units
  • drawing span
  • entity limits

Project Policy Configuration

Supports project-specific policy configuration, including:

  • workspaceRoot
  • maxBytes
  • requiredLayers
  • forbiddenLayers
  • forbiddenEntityTypes
  • requireClosedPolylines
  • minTextHeight
  • maxDrawingSpan
  • requiredInsUnits
  • maxEntities
  • maxIssues

Installation and Enablement

First, install the plugin:

dsh plugin --profile <name> add github:dongsheng123132/dsh-cad-review

The plugin requires Node.js >=22.

After installation, configure the workspace root and project policies. Paths must be .dxf files relative to workspaceRoot.

Typical Usage

The examples below follow the reproducible usage provided in the documentation.

Inspecting a Single DXF File

Run:

dsh-cad-review inspect drawing.dxf

This step returns inspection evidence for reviewing source file hash, units, bounds, layers, entity counts, and entity-level evidence.

Reviewing with Project Policies

Run:

dsh-cad-review review drawing.dxf --policy examples/strict-mm-policy.json

After the steps above, review exits with code 2 if any error-severity issues exist.

Invoking Tools in DSH

  • Call dsh_cad_inspect_dxf to obtain inspection evidence.
  • Call dsh_cad_review_dxf to obtain inspection evidence and a deterministic policy report; you can pass policyJson per invocation to override the configured policy.

Local Verification

The documentation provides the following verification commands:

npm test
npm run check
npm run smoke:plugin
npm run smoke:mcp
npm run smoke:cli
DSH_CHECKOUT=/path/to/deepseek-harness npm run smoke:dsh

Suitable Scenarios and Cautions

Suitable for:

  • Processing ASCII DXF entity inspection within DSH plugins or CLI.
  • Requirements to localize issues to entities, layers, source file line ranges, and geometric positions.
  • Executing deterministic rule review based on project policies.
  • Environments using Node.js >=22 and accepting the MIT license.

Not suitable for:

  • Inferring engineering defects from screenshots.
  • Handling Binary DXF or DWG files; these formats are rejected rather than guessed.
  • Treating a passing report as professional engineering approval; a pass only indicates that the current deterministic policy found no errors.
  • General architectural, mechanical, or electrical code judgment; rules are project-specific and are not claimed as universal standards.

Usage limitations:

  • The source file SHA-256 identifies the exact bytes under review and does not prove authorship.
  • Unsupported entity types cause incomplete extraction and are explicitly retained in the report.
  • Path access rejects traversal, symlink escapes, binary DXF, and oversized inputs.
  • The plugin runs with the permissions of the current dsh process. Review the source code and license before installation.
  • The community directory is an independent site with no official affiliation to DeepSeek / High-Flyer and should not be understood as an official app store.

Conclusion

The value of dsh-cad-review lies in shifting ASCII DXF review from “looking at images” to “reading entities, checking rules, and providing evidence.” It is well-suited as a deterministic CAD rule evidence layer within the DSH plugin ecosystem.

  • GitHub link: https://github.com/dongsheng123132/dsh-cad-review
  • Directory page: No verified standalone URL provided; it can be viewed via the repository page or the community directory entry.