PerryLink/dsh-canteen-retention-check

dsh-canteen-retention-check

核对食堂留样台账:四要素是否齐全、留样量是否达 125 克、是否冷藏满 48 小时、是否残留模板占位符。

Uncategorizedcanteencheckcordis

dsh-canteen-retention-check — Canteen retention check

English · 简体中文 · Español · Português · हिन्दी

dsh-canteen-retention-check checks a canteen food-retention ledger for the four record elements the regulation requires (dish name, weight, time, person), the 125-gram minimum, the 48-hour cold-storage window, and template placeholders left in a cell.

It checks the ledger, not the kitchen. A missing row means the ledger cannot prove a sample was taken; it does not mean no sample was taken.

Install

dsh plugin --profile <name> add dsh-canteen-retention-check
dsh --profile <name> --dump-config | grep 'dsh-canteen-retention-check'

What it looks like

*Workflow overview: document → rule pack → findings.*

Boundary: this only checks the ledger's own completeness and internal time consistency. It does not judge whether a retained sample would satisfy an inspection, whether the food was safe, or what happened in the kitchen. A blank cell is reported as "the ledger does not record it", not as "it did not happen" — the two are different claims and only the first is supportable from a document.

What it answers

  • Does every row name the dish, the weight, the time and the person?
  • Is each weight at least 125 grams?
  • Is the retention time recorded to the minute, and not in the future?
  • Was the sample kept at least 48 hours before release?
  • Does any cell still hold template text such as XXX or 待填?
  • Does every dish on the menu have a retained sample? This is the one rule that

needs two ledgers; a single table can check a row's weight, but only a join can find a dish that has no sample row at all.

Standards it follows

The pack quotes 《学校食品安全与营养健康管理规定》(教育部 国家市场监督管理总局 国家卫生健康委员会令第45号) 第四十条 verbatim:

中小学、幼儿园食堂应当对每餐次加工制作的每种食品成品进行留样,每个品种留样量应当满足检验需要,不得少于125克,并记录留样食品名称、留样量、留样时间、留样人员等。

That single clause supplies the four elements and the 125-gram floor, which is why the pack marks those checks direct and caps them at error. The 48-hour window is checked as a day gap and is labelled as such, not as a quotation of a clause it does not appear in.

Compatibility

Surface · Status Harness · peer range >=0.1.2-rc.1 =0.2.0-0 =24.0.0 Platforms · all (pure ESM; no native code, no network, no model call)

What it does

Nine rules, all single-table checks over the ledger:

Rule · Check CF-001 · Dish name present CF-002 · Weight ≥ 125 g CF-003 · Sample time present CF-004 · Sample person present CF-005 · Sample time written to the minute CF-006 · Release at least 2 days after sampling CF-007 · Meal present CF-008 · No template placeholder in the dish name CF-009 · Sample time not in the future

A column that is absent from the ledger entirely is reported as "not applicable" rather than as a violation of every row: a sheet without a 留样量 column is a shape problem, and saying "every row is wrong" would bury it.

Configuration

Key · Default · Meaning rulesFile · rules/canteen-retention-check.yaml · 规则库路径

Material format

One row per retained sample:

Column · Meaning 餐次 · Meal: 早餐 / 午餐 / 晚餐 留样食品名称 · Dish name 留样量 · Weight in grams 留样时间 · Sampling time, YYYY-MM-DD HH:MM 出柜时间 · Release time, same format 留样人员 · Person who retained the sample

Column aliases are declared in src/model.ts, so 品名, 留样重量, 留样人 and English names also resolve.

Rule sources

Quotations live in rules/evidence/clause-verification-school-food-safety.md and in the pack itself; check:citations verifies each appears verbatim.

Known limit: the 48-hour window is compared as whole days (dateGap, minDays: 2), so a sample released at 47 hours on the second day is not distinguished from one released at 49 hours. Tightening that needs an hour-level check, which the current engine kind does not provide.

Troubleshooting

  • The plugin installs but the tool never appears: check that main resolves to lib/index.mjs and that pnpm run build produced it.
  • `dsh plugin add` rejects the package: the peer range covers 0.1.x and 0.2.x; outside it, grant an explicit exemption.
  • A rule did not run: read the skipped array.

Development

pnpm install
pnpm run typecheck
pnpm test
pnpm run build
node ../scripts/sync-shared.mjs dsh-canteen-retention-check

PerryLink DSH Plugin Family

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

License

Apache License 2.0 © 2026 dsh-canteen-retention-check contributors.