Checks a bid evaluation scoring matrix for internal arithmetic consistency: that each factor's maximum, the scores recorded and the total agree with each other. Reports the differences it finds; it does not judge whether the evaluation itself was correct or fair.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-tender-matrix
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:PerryLink/dsh-tender-matrix
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
dsh-tender-matrix
Current version 0.2.18.
Point out the arithmetic errors in an evaluation-factor scoring matrix before the review meeting — differences only, never the committee's verdict.
A DeepSeek Harness checker for tender agencies, bid-evaluation support and internal review: it reads one scoring matrix (a package header plus one row per evaluation factor) and checks the matrix's own arithmetic and completeness with a versioned rule pack.
Last verified on DeepSeek Harness dsh-v0.2.3-alpha.1 (2026-11-22).
Install · Configuration · FAQ · 简体中文 · English · Español · Português · हिन्दी
dsh plugin --profile <name> add dsh-tender-matrix
Community plugin, not affiliated with DeepSeek. Canonical repository: https://github.com/PerryLink/dsh-tender-matrix (Gitee is a mirror).
What it is
dsh-tender-matrix reads one evaluation-factor scoring matrix — a package header (project, tender number, evaluation method) plus one row per evaluation factor — and checks the matrix's own arithmetic and completeness: that it names its project and evaluation method, that no single score exceeds that item's maximum, that the item maximum scores total the figure you configure, that one bidder's scores total the figure you configure, that every score records its basis, that factor numbers are unique, and that no unreplaced placeholder survives in the basis column.
It returns a list of which row, which column, and what differs, for tender agencies, bid-evaluation support and internal review to verify item by item. It does not pass a compliance verdict, assign liability, replace the reviewer, or decide who should win — scoring is the evaluation committee's independent judgement, and the weights and criteria belong to the tender document.
Three-step setup
Install (pick one channel):
# git channel (latest main; equivalent to git+https://github.com/PerryLink/dsh-tender-matrix.git) dsh plugin --profile web add github:PerryLink/dsh-tender-matrix # npm channel (published releases) dsh plugin --profile web add dsh-tender-matrix # tarball channel: pnpm pack in this repo, then dsh plugin --profile web add ./dsh-tender-matrix-<version>.tgzlib/index.mjsis the shipped artifact; installing from source runsprepare(tsdown) to produce it, and nothing compiles at runtime.Minimal config (defaults work;
cordis.patch.ymlinserts one row, add config only if needed):- insert: - id: dsh-tender-matrix name: dsh-tender-matrixVerify it mounts:
dsh --profile web --dump-config | grep 'dsh-tender-matrix' node samples/quickstart/run.mjs --checkThe second command runs the bundled sample and prints 1
warnplus 2skipped; the expected result is insamples/quickstart/expected/result.json.
You can also search for "Tender Compliance Suite" in WorkBuddy / Coze (this check is one part of it; availability is as listed).
Uninstall: dsh plugin --profile web remove dsh-tender-matrix (or remove the row from the profile patch).
The sample input is samples/quickstart/input/TM-001-unsafe.json, the expected output is samples/quickstart/expected/result.json, and the screenshot is docs/assets/quickstart.png.
Core capabilities
dsh-tender-matrix registers one tool, tender_matrix: it reads a material (JSON or YAML), applies a versioned rule pack, and returns a report. The rule pack is a data file — replace rules/tender-matrix.yaml to switch rule sets without touching code.
| Rule | What it checks | Severity | Basis kind |
|---|---|---|---|
TM-001 |
the matrix names its project and evaluation method | warn | derived from principle |
TM-002 |
no score exceeds its item's maximum | warn | derived from principle |
TM-003 |
the item maximum scores total your configured figure (off by default) | info | institutional configuration |
TM-004 |
a bidder's scores total your configured figure (off by default) | warn | derived from principle |
TM-005 |
every score records its basis | warn | derived from principle |
TM-006 |
factor numbers are unique | warn | derived from principle |
TM-007 |
the basis column holds no unreplaced placeholder | warn | derived from principle |
- Data separate from code — the rule pack
rules/tender-matrix.yamldeclares every check and is validated on load; replacing the file replaces the rule set. - An empty issue list is not "nothing is wrong" — every check that could not run is reported in
skippedwith its rule id and reason; a "not applicable" such as a missingbasiscolumn says so instead of passing silently. - Differences only — the report states which row, which column, what is there, what is expected, and how to verify it; it does not pass a compliance verdict, assign liability, or replace the reviewer.
- Read-only material — the tool reads
fileormaterial, never modifies the original or writes back to it. - Verifiable rule pack — every rule carries document, number, clause, verbatim excerpt, and source URL; an excerpt shorter than eight characters or a severity above its basis kind fails at load.
Examples

Animated replay of a real run recorded in this repository.
These are the plugin's real entry points; install once, then call one.
Detailed example — tool tender_matrix, input:
{"rows":[{"评审因素":"施工组织设计","分值":"30","投标人A":"32"}]}
Output:
{
"id": "dsh-tender-matrix.TM-002.de09b5a6",
"ruleId": "TM-002",
"severity": "warn",
"locator": {
"row": 1,
"field": "bidderA"
},
"found": "第 1 行「bidderA」为 32,「maxScore」为 30,不满足不大于关系",
"expected": "「bidderA」应不大于「maxScore」",
"fix": "核对评分是否抄错;本条只核对是否超出分值上限,不判断评分是否恰当"
}
Observed from dsh-tender-matrix/tests/fixtures/TM-002/TM-002-unsafe.json
Brief example: tender_matrix against samples/quickstart/input/TM-001-unsafe.json returns issueCount: 1, warn: 1, skippedCount: 2 in one call.
Standards it follows
| Document | Number | Cited by rules |
|---|---|---|
| Tendering and Bidding Law of the People's Republic of China | Adopted 1999-08-30; amended 2017-12-27 (NPC Standing Committee decision amending the Tendering and Bidding Law and the Metrology Law); in force since 2000-01-01 | TM-001, TM-002, TM-003, TM-004, TM-005, TM-006, TM-007 |
Boundary: this plugin checks an evaluation-factor scoring matrix for arithmetic — that the matrix names its project and evaluation method, that no single score exceeds its item's maximum, that the maximum scores total what you configure, that a bidder's scores total what you configure, that each score records its basis, that factor numbers are unique, and that no placeholder survives. It does not decide whether a score is appropriate, whether the evaluation was fair, or who should win. Scoring is the evaluation committee's independent judgement, and the weights and criteria are the tender document's.
⚠️ Read this before trusting a citation in the report
Every
excerptin this plugin's rule pack is a verbatim quotation of the clause it cites, and the citation gate re-checks each segment against the record inrules/evidence/. The pack states a requirement verbatim when the clause states it, and stops atwarnwhen the clause only implies it: a check that rests on a general principle is capped belowerrorand says so in its ownnote. What the pack will not do is paraphrase a clause and present the paraphrase as a quotation. When the text could not be obtained, theexcerptsays so plainly and no quotation is invented.The plugin ships no scoring scale. The two total checks ship with a target of
0, meaning "not configured":
TM-003compares the sum of the items' maximum scores againsttarget. 100 is common, but 120-point scales and weighted schemes exist, so the total is your tender document's figure and the rule reports that it could not run until you set it.TM-004compares the sum of one bidder's scores againsttarget. The check compares the column against the figure you state; it is deliberately not wired to a per-bidder total column, so it stays a pure addition check.
TM-002checks column A by default (bidderAvsmaxScore). Add a rule each for B and C, or overrideleftFieldper call.
The load-time guard requires every excerpt to be at least eight characters and to be a real quotation, but it cannot tell a quotation from a description; this pack therefore leans on the pack header, each rule's note, and a test that makes every excerpt admit the gap.
Configuration
All tunables live in the Schemastery schema in src/config.ts; change cordis.yml without touching code. Per-rule thresholds live in the rule pack under rules/.
Most-used keys:
| Key | Type | Default | Meaning |
|---|---|---|---|
rulesFile |
string | rules/tender-matrix.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 (milliseconds) |
TM-002leftField/rightField/relation— the two compared columns and the relation,bidderA <= maxScoreby default.TM-003target— the total the items' maximum scores must reach;0means the rule does not run.TM-004field/target— the bidder column and the total it must reach;0means the rule does not run.TM-007terms— the placeholders to look for.
Example override in your profile patch:
- insert:
- id: dsh-tender-matrix
name: dsh-tender-matrix
config:
onlyRules: [TM-001, TM-002, TM-005, TM-006, TM-007]
skipNotes: institutional rule 4 of this buyer
Material format
The tool accepts JSON or YAML:
project: 某某工程施工招标
tenderNo: ZB-2026-018
method: 综合评估法
rows:
- { 序号: '1', 评审因素: 施工组织设计, 分值: '30', 投标人A: '26',
投标人B: '24', 投标人C: '28', 评分依据: '按招标文件评标办法第 3.2 条' }
Column names are matched case-insensitively and ignoring spaces, underscores and hyphens, so a Chinese header for bidder A and bidderA resolve to the same field; the matrix's own column names are kept, so a finding names the column it actually read. Fields are optional at the reader layer and validated by the check engine, so a partial export produces "missing" findings instead of a crash. Excel can be converted to JSON/YAML first, in chat if the platform supports it.
FAQ
Because both totals ship unconfigured: TM-003 compares the sum of the maxScore column against its target, and TM-004 adds up one bidder's bidderA scores against its target; both carry target: 0, meaning "not configured", so each reports itself in skipped rather than passing quietly until you enter the figure your tender document states. Once configured, a hit means only that the sum differs from the figure you set — not that the score scale is non-compliant; TM-004 is pure addition and is deliberately not wired to any per-bidder total column.
TM-002 reports both. It compares bidderA with maxScore item by item and reports a row whose score is above that item's maximum; when both cells are filled but neither can be read as a number or a date, that row is reported as uncomparable instead of being passed over, while a row missing one of the two is not compared at all. It is a numeric comparison only and never judges whether a score is appropriate; it reads column A by default — cover B and C with an extra rule or a leftField override.
Both are reported. TM-005 requires the basis cell to be filled on every row the material gives that column, and reports each blank one; it checks only that something is written there — not whether the recorded basis holds, is appropriate, or matches the score. TM-007 reports a basis cell that still contains any of its placeholder terms:
【 】 {{ }} XXX xxx 待填 待补充 TBD todo 示例
That list is adjustable to your own template. The failure it targets is a placeholder being read as a reason already recorded. If the matrix carries no basis column at all, TM-005 reports that it does not apply rather than passing silently.
TM-006 reports the repeated number, comparing with whitespace ignored. Uniqueness is all it establishes, and it matters because a repeat makes the maximum-score total come out wrong: either the same factor was registered twice or two factors were mis-numbered as one. It does not decide which of the two rows is the correct one.
TM-001 requires the material's header to carry project and method and reports whichever is missing; it checks only that the header declares them, not that they agree with the tender document. If your institution's form has no evaluation-method column, set that rule's fields to [project] so it stops asking for a column your form never carries.
Everything happens in the local process: it reads only the file or material you pass and the rule pack, makes no network requests, calls no model, writes no telemetry, and keeps no second copy beyond the tool result. The host's own session/log storage is controlled by the host; this package adds no copy. Overhead scales linearly with the number of matrix rows and is dominated by parsing and row-by-row comparison; the timeout budget is governed by timeoutMs. Removing the package removes code only — it does not delete host session logs or material you already created.
No. It registers exactly one tool, tender_matrix, removed through the disposer returned by ctx.tools.register on unload or hot reload; it provides no service key, registers no client slot, registers no webServer route, listens to no shared event, and mutates no global. The bundle patch only inserts its own row and never overrides a built-in row's config. See "Interoperability with other DSH plugins" for the point-by-point argument.
Security boundaries
- No qualitative verdict. The report lists only differences the material itself can identify; it does not decide compliance, liability, whether a score is appropriate, whether the evaluation was fair, or who should win. The report always carries the disclaimer, and a wording guard enforces its phrasing.
- No fabricated citations. Every rule must fill
document/number/clause/excerpt/kind/source; theexcerptis a verbatim quotation, and when the text could not be obtained it says so.kind: derived-from-principleis capped atwarn,kind: institutional-configurationatinfo, all enforced at load. - An empty result is not "nothing is wrong". Every check that could not run is reported in
skippedwith its reason; a "not applicable" such as a missingbasiscolumn says so instead of passing silently. - Read-only material. The tool reads only
fileormaterial; it does not modify the original, write back, or create a second copy. - Registrations are effects. Tool registration returns a disposer; stopping or hot-reloading the plugin removes it, leaving no global state behind.
Permissions & data
- Permissions: the plugin uses only the
toolsservice; it reads the material file you explicitly pass and the packaged rule pack, and writes no files, makes no network calls, and reads no credentials. - Data: material content is parsed and compared in-process only; nothing is kept beyond the tool result. The host's own session/log storage is controlled and retained by the host; this package adds no copy.
- Manifest declaration:
package.json#dsh.demodeclaresreadsas the user-specified material file,writesas empty,network: false, andexternal: []. - Removal: removing the package removes code only — it does not delete host session logs or material you already created.
Known limitations
- It checks the matrix's own arithmetic and completeness only. Seven rules cover the project/method declaration, the per-item ceiling, the two totals, the scoring basis, factor-number uniqueness, and placeholders; it does not decide whether a score is appropriate, whether the evaluation was fair, who should win, or whether the matrix matches the tender document — that needs human comparison.
- The two total checks are off by default.
TM-003/TM-004ship withtarget: 0and reportskippeduntil configured;TM-004is pure addition and deliberately not wired to a "bidder total" column. The total is this project's tender-document figure; the plugin does not assume it. TM-002checks column A only by default. It comparesbidderAwithmaxScore; B and C need an extra rule each, or a per-callleftFieldoverride. It is a numeric comparison and never judges whether a score is disproportionately high or low.- Citations have a generation gap. Some rules can only be derived from a principle, so their
kindisderived-from-principleand they are capped atwarn; theirexcerptplainly states that the clause text was not obtained. The citation gate guarantees that a quotation is a quotation, not that the clause directly governs the check — a boundary this rule pack keeps on purpose. - Column names match literally. Matching is case-insensitive and ignores spaces, underscores and hyphens; two columns with the same meaning but different names are not merged automatically. If a column is absent, the rule reports "not applicable" or
skippedinstead of guessing a result. - Time is wall-clock. Date comparisons operate on the input strings as wall-clock values, with no time-zone conversion.
- Measured platform scope. Pure ESM, no native code, no network, no model calls; this repository's tests were run on Linux, and other DSH-capable platforms were not measured one by one.
- Rule-pack version. The current rule pack is
2026.1; replacingrules/tender-matrix.yamlchanges behaviour, and the replacement is still validated at load.
Interoperability with other DSH plugins
- The only global name it occupies is the tool name
tender_matrix. It provides no service key, registers no client slot, registers nowebServerroute, and listens to no shared event, so there is no service-key, slot, HTTP-route, or event-chain collision. - It depends only on the
toolsservice.inject: ['tools']; registration is removed through the disposer returned byctx.tools.register, so stop/hot-reload cleans up. - The patch only adds.
cordis.patch.ymlonlyinserts its own row and never overrides a built-in row'sconfig. - No global mutation. It does not patch prototypes, rewrite
process.env, replace the global fetch dispatcher, or write global objects. - Concurrency-safe. The tool declares
isConcurrencySafe: () => true; each call reads only its own input and the rule pack, with no shared mutable state. - Rule pack loaded on demand.
rulesFileresolves relative to the package root, walking ancestors and throwing every attempted path on a miss, so it never silently falls back to the wrong rule pack.
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-rc.2. engines.dsh is declared as >=0.2.1-0 <0.3.0 and is enforced by the host since 0.2.1 |
| Node | ^22.19.0 || >=24.0.0 |
| Platforms | Any DSH host that runs plain ESM (no native code, no network, no model call); this repository's tests were run on Linux |
| Tool mode | Works in native and ptc; use ptc when checking several packages at once, so the schema cost is paid once |
Ecosystem & quality
- Gitee mirror (sync mirror; GitHub is canonical)
- dshfind plugin page (installs and ranking)
- OpenSSF Scorecard report (driven by .github/workflows/scorecard.yml)
- DSH Market (listed)
- Choose a checker by material (family selection index; this repository is one of them)
Development
pnpm install
pnpm run typecheck # tsc --noEmit
pnpm test # vitest: shared table-plugin suite + paired fixtures
pnpm run build # tsdown -> lib/index.mjs + lib/index.d.mts
pnpm run verify:self-contained # dependency specs resolve from the registry
pnpm run check:lockfile # lockfile drift check
pnpm run check:readmes # five-language README consistency
pnpm run check:citations # rule citation gate
pnpm pack # the published tarball
node ../scripts/sync-shared.mjs dsh-tender-matrix # refresh src/shared
prepublishOnly re-runs the gate, so a release cannot ship a drifted tree. README images are generated programmatically by scripts/gen-readme-assets.py (Python + Pillow: four hero WebPs and docs/assets/dsh-tender-matrix-flow-v5-{light,dark}.svg) and are safe to re-run.
| Path | Purpose |
|---|---|
src/index.ts |
registers the tender_matrix tool, resolves the rule pack, reads the material |
src/config.ts |
Schemastery config schema; single entry point for every tunable |
src/check.ts |
pure check core (input, ruleset, options) => Report, with no I/O, clock, or model |
src/parse.ts |
JSON / YAML material reader |
src/view.ts |
model-facing report projection; output.schema mirrors it |
src/shared/ |
shared kit (ruleset loader, report shape, YAML subset, calendar arithmetic, wording guard), copied in rather than imported |
rules/tender-matrix.yaml |
rule pack: data for seven rules |
rules/evidence/ |
clause-verification record for every citation |
tests/ |
vitest; every rule has a paired compliant/violating fixture |
scripts/gen-readme-assets.py |
README hero + structure diagram generator (Pillow + hand-written SVG) |
Troubleshooting
- It 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-tender-matrix@0.2.17 --dsh-version <runtime> --accept-risk.- A rule did not run: read the
skippedarray; it names the rule id and the reason. With nobasiscolumn,TM-005reports "not applicable". checkreportsmanifest-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. This is a known upstream issue indsh-plugin-dev.- Times look shifted: all arithmetic is wall-clock on the input strings, with no time-zone conversion.
Topics: deepseek-harness, dsh, dsh-plugin, cordis, tender, matrix
Family & thanks
This project is part of the DeepSeek Harness plugin family from PerryLink (all Apache-2.0). If it is useful, a star helps the next person find it — nothing is gated behind it.
- @PerryLink — creator and maintainer: the rule pack, the check engine, the
tender_matrixtool surface, and the five-language docs.
License
LICENSE (Apache License 2.0) © 2026 dsh-tender-matrix contributors
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38526
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37266
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28921
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 9983
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6095
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4745
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.