dsh-guard-plan-qc
Manifest validVerification of Labor Protection and Safety Equipment Configuration Table (check product names, specifications, and configuration quantities against publicly available equipment standards, indicating only differences without drawing qualitative conclusions)
dsh-guard-plan-qc
Boundary: this plugin checks one 劳动防护用品配置表 for what a table can be held to — that every row names a product with a specification and a quantity, that the quantity is a positive number, that it reconciles with the headcount the plan states, that the issue date falls inside the plan period, that an expiry date follows the issue date, and that the table covers the categories you require. It does not judge whether a given product is the right protection for a given hazard, whether its protection level suffices, or whether it counts as special protective equipment.
⚠️ Read this before trusting a citation in the report
Every
excerptin this plugin's rule pack says, in so many words, that the clause text was not obtained. The regime lives in GB 39800.1《个体防护装备配备规范》 and 《劳动防护用品监督管理规定》. The verification pass for this plugin could not retrieve verbatim clause text from them, so rather than paraphrase a quotation the pack states the gap in theexcerptfield itself and puts the honest reasoning innote. Everything is therefore capped atwarn(principle-derived) orinfo(locally configured), and a test asserts that no rule claims a quotation it does not have. When the texts are in hand, two things must be done: replace eachexcerptwith the real clause, and raisekindtodirect.The two numbers that would make this plugin powerful are the two it refuses to invent. How many items each person needs (
GP-003factors) and which product categories a job must cover (GP-006requiredCategories) depend on the hazard identification for your project, not on a national figure. Both ship empty, and a rule whose list is unset reports itself inskippedrather than passing.
Compatibility
| Surface | Status |
|---|---|
| Harness | Peer range >=0.1.2-rc.1 <0.2.0 || >=0.2.0-0 <0.3.0 — verified to accept both 0.2.0-rc.2 and 0.2.1-alpha.1. engines.dsh is deliberately not declared: it has no reader and cannot reject a host |
| Node | `^22.19.0 |
| Platforms | All (plain ESM; no native code, no network, no model call) |
| Tool mode | Works in native, ptc and both; for a batch of plans use ptc |
What it does
Registers the guard_plan_qc tool. It reads one configuration table — rows keyed by the table's own
column names, plus the plan's headcount and period — and returns a report.
| Rule | Check | Severity | Basis kind |
|---|---|---|---|
GP-001 | every row names 品名, 规格型号 and 配置数量 | info | local |
GP-002 | the quantity parses to a positive number | warn | principle |
GP-003 | the quantity reconciles with headcount × per-person factor (off by default) | info | local |
GP-004 | the issue date falls inside the plan period | warn | principle |
GP-005 | an expiry date is later than the issue date | warn | principle |
GP-006 | the table covers your required categories (off by default) | info | local |
Install
dsh plugin --profile <name> add dsh-guard-plan-qc
dsh --profile <name> --dump-config | grep 'dsh-guard-plan-qc'
Configuration
| Key | Type | Default | Description |
|---|---|---|---|
rulesFile | string | rules/guard-plan-qc.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:
GP-001requiredFields— defaults to[品名, 规格型号, 配置数量]; replace it with your form's columns.GP-002checkQuantity— set tofalseto stop checking quantities.GP-003factors— your per-person factors, e.g.[{ match: 绝缘手套, perPerson: 2, tolerance: 0 }].matchis a substring test on 品名.GP-006requiredCategories— the products your project must cover, e.g.[安全帽, 绝缘手套, 安全带]. It can also be passed per call.
Material format
The tool accepts JSON or YAML:
subject: 某某厂房工程
headcount: 20
periodFrom: 2026-03-01
periodTo: 2026-03-31
rows:
- { 品名: 安全帽, 规格型号: V 型 黄色, 配置数量: "20", 发放日期: 2026-03-05, 有效截止日期: 2028-03-04 }
- { 品名: 绝缘手套, 规格型号: 12kV, 配置数量: "40", 发放日期: 2026-03-05 }
Quantities are read from strings, so a spreadsheet export works as-is: 2双, 1,200, 12 and 1.5
all parse. A cell that is not a number (若干, blank) is reported as unparseable, which is different
from a quantity of zero — the two need different fixes, so they produce different findings.
GP-004 needs periodFrom and/or periodTo; with neither, it reports itself in skipped rather than
assuming a period. GP-003 needs headcount; without it, it says so.
Rule sources
Rule data lives in rules/guard-plan-qc.yaml. The pack's header states the citation gap in full, 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.
Troubleshooting
GP-003orGP-006report themselves as skipped. Their lists are empty.factorsandrequiredCategoriescome from your hazard identification, and the plugin will not guess them.GP-003fires on a quantity I set deliberately. The factor you configured is not the one in use, or the headcount in the material is stale. Raisetolerance, or fix the factor.GP-006fires on a product that is in the table. The comparison is a literal substring test against 品名 and 规格型号, so安全帽will not match安全头盔. List the spellings you use, or normalise the table.GP-004reports nothing about dates. No plan period was declared, or the table carries no issue date; either way the rule says so inskipped.- The plugin installs but the tool never appears. Check that
mainresolves tolib/index.mjsand thatpnpm run buildproduced it; a wrongmainmakes the loader skip the entry silently. dsh plugin addrefuses the package as incompatible. The peer range covers0.1.xand0.2.x; if your runtime sits outside it, grant an explicit exemption:dsh plugin --profile <name> allow-version dsh-guard-plan-qc@0.1.0 --dsh-version <runtime> --accept-riskcheckreportsmanifest-peersas failed. The static checker compares against a hard-coded peer 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 indsh-plugin-dev.
Development
pnpm install
pnpm run typecheck # tsc --noEmit
pnpm test # vitest, paired fixtures per rule
pnpm run build # tsdown -> lib/index.mjs + lib/index.d.mts
node ../scripts/sync-shared.mjs dsh-guard-plan-qc # refresh src/shared from ../_shared
License
Apache License 2.0 © 2026 dsh-guard-plan-qc contributors.
Comments
Loading…
From the same category
by awesome-dsh-plugin
A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表
★ 18.3k
CC0-1.0
Python
Oct 10, 2026
by 0xsline
DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.
★ 1.2k
CC0-1.0
Python
Oct 10, 2026
by pax-beehive
Open-source CLI, schemas, resolver, and DSH agent tools for DSH Plugin Hub
★ 450
MIT
TypeScript
Oct 6, 2026
by xiajiajun516
DeepSeek Harness (DSH) backup & restore plugin — export, import, migrate and sync your complete DSH configuration, plugins, MCP servers, skills and workspace. One-click migration to another machine.
★ 176
MIT
TypeScript
Oct 8, 2026
dsh plugin --profile web add dsh-config-managerby yjh051108
推荐组件(非必须):DeepSeek Harness 运行时注入器;已随 dsh-routing-suite 单仓库化保留,本仓库继续维护/发布。
★ 164
TypeScript
Sep 18, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injectorby jigjoy-ai
A CLI that turns a goal into a pull request - and a sandbox for testing concurrent AI coding agents on the Mozaik runtime.
★ 124
MIT
TypeScript
Oct 2, 2026