dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
???????????(??????????????????????,?????,???????)
English · 简体中文 · Español · Português · हिन्दी
dsh-hs-classify reads one classification register — the declarant header plus one row per item — and checks the structure of the numbers it records: that a commodity code is ten digits, that its chapter, heading and subheading are successive prefixes of the code, that the levels get progressively finer, that each row records a classification basis, that the header declares the tariff version the codes belong to, that item numbers are unique within the register, and that no unreplaced placeholder survives in the item name.
dsh plugin --profile <name> add dsh-hs-classify
dsh --profile <name> --dump-config | grep 'dsh-hs-classify'*Workflow overview: call → plugin → result. The examples below use the real command surface.*
The table below is the example set: the first row is the detailed walkthrough, the remaining rows are short cases.
Tool hs_classify
Input
~~~json {"rows":[{"品名":"便携式自动数据处理设备","子目":"847140","商品编号":"8471300000"}]} ~~~
Output
~~~json { "id": "dsh-hs-classify.HC-002.de09b5a6", "ruleId": "HC-002", "severity": "warn", "locator": { "field": "subheading", "row": 1 }, "found": "第 1 行「subheading」为「847140」,不是「hsCode」(8471300000)的前缀", "expected": "「subheading」应与「hsCode」的前几位一致", "fix": "核对层级填写;本条只核对前缀关系,不判断归类是否正确" } ~~~
*Observed from tests/fixtures/HC-002/HC-002-unsafe.json (cases.json expects HC-002 count 1); run via lib/index.mjs rules/hs-classify.yaml*
You ask · What it answers Some codes in our register are eight digits, and one ends with a letter. Will the check report them? · Yes. HC-001 matches every filled hsCode against the pack's pattern, ^[0-9]{10}$, and reports the row together with the value it read. It checks the digit count and the characters only, never whether the goods belong under that code. A blank code cell is passed over, so what it reports is a code of the wrong shape, not a code that is missing. The ten digits are a pack setting: when the annual tariff changes the length, edit the pattern, not the code. A row's 章, 品目 and 子目 do not agree with its 商品编号. Is that caught? · Yes. HC-002 reads the level columns in coarse-to-fine order — 章, 品目, 子目, two, four and six digits in the pack's own example — and reports the level that is not a prefix of the hsCode it read, or that is not finer than the level above it. It checks that prefix relation and that order only: whether the code fits the goods is a customs determination needing the tariff and the classification decisions, which this plugin does not consult. A level cell left blank is not compared. One row leaves 归类依据 blank. · HC-003 reports that row: basis has to be filled in on every row that carries the column. It checks that something is written there, not that the tariff clause, chapter note, classification decision or advance ruling cited exists or supports the classification — this plugin consults none of them. If the register has no basis column at all, HC-003 is listed in skipped with the reason that the material has no such column, instead of passing silently. The header does not say which tariff version the codes belong to. · HC-004 requires the header to declare tariffVersion and reports the register when the header leaves it empty. It checks that the declaration is present, not that the edition named is the one these codes come from: the rule does not read the codes, and codes are split and merged between editions. Its fields list is a pack setting — add declarant if your header records one. 项号 5 appears on two rows. · HC-005 reports the later row as a duplicate of the earlier one, because itemNo has to be unique within one register; whitespace is ignored in the comparison, so 5 and 5 count as the same item number. It checks uniqueness only. One goods item declared on several rows, for different specifications say, needs a different item number on each row. Item numbers that are all distinct still leave HC-005 in skipped: it is then listed with the reason that the material met the check's preconditions and no differing entries were found — a different reason from the one a rule gives when it could not run because the column is absent. The 品名 column still holds 【】 or 待填 from the template. · HC-006 reports the row and the placeholder it matched. The pack looks for 【, 】, {{, }}, XXX, xxx, 待填, 待补充, TBD, todo and 示例, and terms can be trimmed to your own template. It finds unreplaced placeholders only: it does not judge whether the name is right, and it does not require the column to be filled — a blank description cell draws no finding from it, and no other rule in this pack requires one.
Document · Number · Cited by rules 《中华人民共和国进出口税则》 · 现行版本本次未核实 · HC-001, HC-004, HC-005, HC-006 《商品名称及编码协调制度》 · 现行版本本次未核实 · HC-002 《中华人民共和国进出口关税条例》 · 国务院令第392号(2003年11月23日公布;根据2011年1月8日、2013年12月7日、2016年2月6日三次《国务院关于修改(废止)部分行政法规的决定》修订) · HC-003
Boundary: this plugin checks a 商品归类台账 for the *structure* of the numbers it records — that a commodity code is ten digits, that its chapter, heading and subheading are successive prefixes of it, that the levels get progressively finer, that a classification basis is recorded, that the tariff version is declared, that item numbers are unique, and that no placeholder survives. It does not decide which code goods should be classified under.
### ⚠️ It checks the shape of a code, never whether the code is right
Classification is a customs determination, turning on the goods' material, function and degree of
processing together with the tariff's section and chapter notes and any classification decisions or advance
rulings. **This plugin does not consult the tariff, does not consult classification decisions, and does not
consult rulings.** So:
- it can find "this row's code disagrees with the chapter, heading and subheading the same row states";
- it cannot find "this row's code does not match the goods", because that needs the tariff itself.
A register with a structurally perfect code for the wrong goods passes this plugin. That is the documented
limit, stated in the header, in HC-002's note, and in the troubleshooting section.The rule pack states its citation status rule by rule. 1 of its 6 rules quote verbatim clause text and are markeddirect; the remaining 5 state in theexcerptfield itself that the text was not obtained, and stay atwarnorinfo. Where a rule still carries that note, treat it as a lead rather than as a citation. The
regime lives in 《中华人民共和国进出口税则》— whose codes are ten digits, the first six being the WCO
Harmonized System — and 《中华人民共和国进出口关税条例》. For the rules whose text the verification pass could not retrieve, the pack states the gap in the
excerptfield itself rather than paraphrasing it, and those rules stay atwarnorinfo. **When the texts are in hand, replace eachexcerptwith the real clause and raisekind
todirect.** The ten-digit assumption is apatternin the rule pack, so an annual tariff change needs a
rule-pack edit, not a code change.
Surface · Status Harness · Peer range >=0.1.2-rc.1 =0.2.0-0 =0.2.1-0 =24.0.0 Platforms · All (plain ESM; no native code, no network, no model call) Tool mode · Works in native and ptc; for a customs declaration's item list use ptc
Registers the hs_classify tool. It reads one classification register — the declarant header plus one row per item — applies a versioned rule pack, and returns a report.
Rule · Check · Severity · Basis kind HC-001 · the commodity code is ten digits · warn · principle HC-002 · chapter, heading and subheading are successive prefixes · warn · principle HC-003 · a classification basis is recorded · warn · direct HC-004 · the tariff version is declared · warn · principle HC-005 · item numbers are unique · warn · principle HC-006 · the description holds no unreplaced placeholder · warn · principle
Key · Type · Default · Description rulesFile · string · rules/hs-classify.yaml · Rule-pack path, relative to the package root disabledRules · string[] · [] · Rule ids to stop running; each appears in skipped onlyRules · string[] · [] · Run only these rule ids; empty runs every rule skipNotes · string · "" · Note appended to every skipped reason timeoutMs · number · 120000 · Cooperative tool timeout budget
Rule-level parameters worth knowing:
HC-001 pattern — the code's shape, ten digits by default. Change it when the tariff changes.HC-002 field / components / digits — the code column, the level columns in coarse-to-fine order([chapter, heading, subheading]), and the expected total length.
HC-004 fields — header fields that must be present; the tariff version by default. Add declarant ifyour register records one.
HC-006 terms — the placeholders to look for.The tool accepts JSON or YAML:
declarant: 某某报关行
tariffVersion: 2026 年版税则
rows:
- { 序号: '1', 品名: 便携式自动数据处理设备, 材质: 塑料外壳、金属结构件、电子元器件,
功能: 数据处理与显示,重量 1.2 千克, 章: '84', 品目: '8471', 子目: '847130',
商品编号: '8471300000', 申报日期: 2026-03-10,
归类依据: 税则第八十四章章注及品目 8471 条文 }Column names are matched case-insensitively and ignoring spaces, underscores and hyphens; the register's own column names are kept, so a finding names the column it read.
Rule data lives in rules/hs-classify.yaml. The pack's header states what the plugin does and does not judge, and each rule's note repeats the part that matters for that rule. The load-time guard that normally enforces "an excerpt must be a real quotation of at least eight characters" cannot tell a quotation from a description — so this pack leans on the header, the per-rule notes and a test that asserts every excerpt admits the gap.
not its fit to the goods. Classification needs the tariff and the notes.
digits. The finding names the level and shows both values.
the code, or adjust the pattern if this year's tariff really differs.
matters, because codes are split and merged between editions.
main resolves to lib/index.mjs andthat pnpm run build produced it; a wrong main makes the loader skip the entry silently.
0.1.x and 0.2.x; ifyour runtime sits outside it, grant an explicit exemption: dsh plugin --profile allow-version dsh-hs-classify@0.1.0 --dsh-version --accept-risk
range that predates the 0.2 line. The runtime enforces peer compatibility at install time, so the declared range is the correct one; this is a known upstream issue in dsh-plugin-dev.
pnpm install
pnpm run typecheck # tsc --noEmit
pnpm test # vitest, the shared table-plugin suite plus paired fixtures
pnpm run build # tsdown -> lib/index.mjs + lib/index.d.mts
node ../scripts/sync-shared.mjs dsh-hs-classify # refresh src/shared from ../_sharedThe plugin is data-only: src/model.ts declares the table shape, the shared kit supplies the reader and the check engine, and the rule pack declares every check.
This project is part of the DeepSeek Harness plugin family from PerryLink. The roster stays collapsed below so every README keeps a short first screen; expand it to see every row and its status.
Expand all plugins
Plugin · Status dsh-aqua-input-check · dsh-archive-check · dsh-auto-review · dsh-autotier · dsh-bid-ca-precheck · dsh-bid-qual-check · dsh-cert-mcp · dsh-checkpoint-rewind · dsh-click · dsh-composer-history · dsh-contract-stance · dsh-customs-doc-check · dsh-data-quality · dsh-demurrage-ledger · dsh-doublecheck · dsh-drill-script-check · dsh-eia-guide-check · dsh-emergency-plan · dsh-essay-rubric-check · dsh-evidence-check · dsh-export-ctl-check · dsh-fast · dsh-fmea-table-check · dsh-forecast-penalty · dsh-fund-research · dsh-github · dsh-gongwen-flow-check · dsh-gongwen-word-check · dsh-guard-plan-qc · dsh-hazchem-check · dsh-hazplan-check · dsh-hidden-risk-map · dsh-hs-classify · dsh-icd-rule-check · dsh-industry-research · dsh-lawcite-adapter · dsh-laya · dsh-lc-doc-check · dsh-learning-gap-check · dsh-library · dsh-local-ai · dsh-lsp-actions · dsh-mask · dsh-mcp-panel · dsh-medrec-qc · dsh-memento · dsh-nsfc-form-check · dsh-nurse-record-check · dsh-observe · dsh-origin-rvc-check · dsh-ota-review-check · dsh-output-styles · dsh-paper-doc-adapter · dsh-permission-rules · dsh-permit-report-check · dsh-pipeline-check · dsh-pleading-draft · dsh-plugin-doctor · dsh-plugin-guide · dsh-plugin-kit · dsh-plugin-upgrade · dsh-policy-brief-draft · dsh-power-loss-split · dsh-power-ticket-check · dsh-ppap-check · dsh-protest-deadline · dsh-railway-window · dsh-repair-order-qc · dsh-research-report · dsh-review-reply-check · dsh-rulefile-check · dsh-safety-brief-check · dsh-score · dsh-session-sync · dsh-site-log-check · dsh-skill-pack-security · dsh-soe-decision-check · dsh-soilwater-check · dsh-sop-sync-check · dsh-spc-gbt-adapter · dsh-talk · dsh-tender-extract · dsh-tender-matrix · dsh-test-drive · dsh-ticktick · dsh-translate · dsh-warranty-calc · dsh-budget · 🧊 FROZEN — see the repo README dsh-claude-move · 🧊 FROZEN — see the repo README dsh-defend · 🧊 FROZEN — see the repo README dsh-draw · 🧊 FROZEN — see the repo README dsh-reach · 🧊 FROZEN — see the repo README dsh-background-agents · 🚫 RETIRED — see the repo README dsh-session-pin · 🚫 RETIRED — see the repo README dsh-team-rooms · 🚫 RETIRED — see the repo README
Apache License 2.0 © 2026 dsh-hs-classify contributors.