dsh-pleading-draft 0.2.10 → 0.2.12-reconcile.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -0
- package/LICENSE +195 -9
- package/README.en.md +448 -0
- package/README.md +392 -113
- package/SECURITY.md +0 -0
- package/TROUBLESHOOTING.md +34 -0
- package/capability.json +20 -0
- package/cordis.patch.yml +0 -0
- package/docs/assets/dsh-pleading-draft-demo.gif +0 -0
- package/docs/assets/dsh-pleading-draft-demo.png +0 -0
- package/docs/assets/dsh-pleading-draft-flow-dark.svg +35 -0
- package/docs/assets/dsh-pleading-draft-flow-light.svg +35 -0
- package/docs/assets/dsh-pleading-draft-flow-v5-dark.svg +123 -0
- package/docs/assets/dsh-pleading-draft-flow-v5-light.svg +123 -0
- package/docs/assets/dsh-pleading-draft-flow.svg +19 -0
- package/docs/assets/dsh-pleading-draft-hero-en-dark.webp +0 -0
- package/docs/assets/dsh-pleading-draft-hero-en-light.webp +0 -0
- package/docs/assets/dsh-pleading-draft-hero-zh-dark.webp +0 -0
- package/docs/assets/dsh-pleading-draft-hero-zh-light.webp +0 -0
- package/docs/assets/dsh-pleading-draft-hero.png +0 -0
- package/docs/assets/quickstart.log +3 -0
- package/docs/assets/quickstart.png +0 -0
- package/icon.svg +0 -0
- package/lib/index.d.mts +0 -0
- package/lib/index.mjs +44 -8
- package/locale/en.json +0 -0
- package/locale/zh.json +0 -0
- package/package.json +24 -11
- package/rules/citations-baseline.json +0 -0
- package/rules/evidence/clause-verification-civil-procedure-versions.md +0 -0
- package/rules/evidence/clause-verification.md +0 -0
- package/rules/pleading-draft.yaml +0 -0
- package/samples/quickstart/expected/result.json +10 -0
- package/samples/quickstart/input/PL-001-unsafe.json +20 -0
- package/samples/quickstart/run.mjs +27 -0
- package/screenshots.json +14 -0
- package/README-es.md +0 -125
- package/README-hi.md +0 -125
- package/README-pt.md +0 -125
- package/README-zh.md +0 -125
package/README.en.md
ADDED
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/dsh-pleading-draft-hero-en-dark.webp">
|
|
5
|
+
<img src="docs/assets/dsh-pleading-draft-hero-en-light.webp" width="100%" alt="dsh-pleading-draft banner: left, the plugin name, two value lines (four elements checked column by column; name the row, the gap and the fix) and the subtitle; right, claim 1 as four element tiles — claim, fact, evidence, legal basis — with the factual-basis tile empty and flagged by PL-001, the amount 1,250,000 tied to its deadline by PL-004, and the sample summary error 0 / warn 1 / info 0 / skipped 0">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
# dsh-pleading-draft
|
|
9
|
+
|
|
10
|
+
**Check a pleading-element checklist for completeness and internal consistency — you get a list of which row, which column, and what to fix; the verdict stays with the reviewer.**
|
|
11
|
+
|
|
12
|
+
A data-only checker plugin for DeepSeek Harness: it reads one pleading-element checklist (the case header plus one row per claim), applies the versioned rule pack it ships, and lists only the differences it can point to inside the material — never a compliance verdict, never a liability finding.
|
|
13
|
+
|
|
14
|
+
[Install](#three-step-setup) · [Configuration](#configuration) · [FAQ](#faq) · [简体中文](README.md) · [English](README.en.md)
|
|
15
|
+
|
|
16
|
+
[](LICENSE)
|
|
17
|
+
[](#compatibility)
|
|
18
|
+
[](https://www.npmjs.com/package/dsh-pleading-draft)
|
|
19
|
+
[](https://github.com/PerryLink/dsh-pleading-draft/actions/workflows/ci.yml)
|
|
20
|
+
[](#compatibility)
|
|
21
|
+
|
|
22
|
+
[](https://github.com/PerryLink/dsh-pleading-draft/stargazers)
|
|
23
|
+
[](https://www.npmjs.com/package/dsh-pleading-draft)
|
|
24
|
+
[](https://dshfind.com/plugins/PerryLink/dsh-pleading-draft?ref=badge)
|
|
25
|
+
[](https://securityscorecards.dev/viewer/?uri=github.com/PerryLink/dsh-pleading-draft)
|
|
26
|
+
[](https://dsh.market/)
|
|
27
|
+
[](https://gitee.com/perrylink/dsh-pleading-draft)
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
dsh plugin --profile <name> add dsh-pleading-draft
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<sub>Community plugin, not affiliated with DeepSeek. Canonical repository: <https://github.com/PerryLink/dsh-pleading-draft> (Gitee is a mirror).</sub>
|
|
36
|
+
|
|
37
|
+
## What it is
|
|
38
|
+
|
|
39
|
+
`dsh-pleading-draft` reads one pleading-element checklist — the case header plus one row per claim, with its number, claim, factual basis, evidence, legal basis, amount, and deadline columns — and checks that document's own completeness and internal consistency: that every claim records a factual basis, points at evidence and states a legal basis, that a claim carrying an amount also carries a performance deadline, that the header names the plaintiff and the defendant, that no element number is repeated, and that no unreplaced placeholder survives in the claim column.
|
|
40
|
+
|
|
41
|
+
It does not decide whether a claim will succeed, whether it is time-barred, whether jurisdiction is right, whether the evidence suffices, or whether the case should be accepted.
|
|
42
|
+
|
|
43
|
+
- **Who it is for**: lawyers and legal staff; no command line required — hand the material over in chat.
|
|
44
|
+
- **What you give it**: the source material the check works on (a table, register, or document); the original is never modified. Excel can be converted to JSON/YAML first, in chat if the platform supports it.
|
|
45
|
+
- **What you get back**: a list of "which row, which column, what is missing, how to fix it"; every check that could not run is listed in `skipped` with its reason.
|
|
46
|
+
|
|
47
|
+
<picture>
|
|
48
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/dsh-pleading-draft-flow-v5-dark.svg">
|
|
49
|
+
<img src="docs/assets/dsh-pleading-draft-flow-v5-light.svg" width="100%" alt="dsh-pleading-draft structure: one read-only element register set as seven vertical columns (elementNo, claim, fact, evidence, law, amount, deadline). Each column foot carries the rule that reads it and this run's outcome — PL-006 unique, PL-007 containsAny, PL-001 presence, PL-002 presence, PL-003 presence — while PL-004 conditionalPresence spans the amount and deadline columns. The header band is checked by PL-005 on plaintiff and defendant. The factual-basis cell is empty, which is the single warn on row 1. The bar below is the report: issues[] 1, skipped[] 0, error 0 / warn 1 / info 0, markdown + reportJson; a check that cannot run is listed rather than passed silently, and the verdict stays with the reviewer.">
|
|
50
|
+
</picture>
|
|
51
|
+
|
|
52
|
+
## Three-step setup
|
|
53
|
+
|
|
54
|
+
1. **Install** (pick one channel):
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
# git channel (latest main; equivalent to git+https://github.com/PerryLink/dsh-pleading-draft.git)
|
|
58
|
+
dsh plugin --profile <name> add github:PerryLink/dsh-pleading-draft
|
|
59
|
+
# npm channel (published releases)
|
|
60
|
+
dsh plugin --profile <name> add dsh-pleading-draft
|
|
61
|
+
# tarball channel: pnpm pack in this repo, then
|
|
62
|
+
dsh plugin --profile <name> add ./dsh-pleading-draft-<version>.tgz
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
2. **Minimal config** (defaults are enough; a bundle row without `config` uses them all, and the rule-pack path points at the packaged `rules/pleading-draft.yaml`):
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
- insert:
|
|
69
|
+
- id: dsh-pleading-draft
|
|
70
|
+
name: dsh-pleading-draft
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
3. **Verify it mounts**:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
dsh --profile <name> --dump-config | grep 'dsh-pleading-draft'
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Then build once (`pnpm run build` produces `lib/`) and run the bundled sample (matches `samples/quickstart/expected/result.json`):
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
node samples/quickstart/run.mjs --json
|
|
83
|
+
# => {"tool":"pleading_draft","issueCount":1,"summary":{"error":0,"warn":1,"info":0},"skippedCount":0}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Uninstall**: `dsh plugin --profile <name> remove dsh-pleading-draft` (or remove the row from the profile patch).
|
|
87
|
+
|
|
88
|
+
<details>
|
|
89
|
+
<summary>Use it from WorkBuddy / Coze</summary>
|
|
90
|
+
|
|
91
|
+
Search "Documents and Governance Suite" in WorkBuddy / Coze (the suite, of which this check is one part; availability as listed in the store) to use the same checking capability without a command line.
|
|
92
|
+
|
|
93
|
+
</details>
|
|
94
|
+
|
|
95
|
+
<details>
|
|
96
|
+
<summary>Install from the DSH Desktop market</summary>
|
|
97
|
+
|
|
98
|
+
Every PerryLink plugin is listed in the built-in DSH Desktop market: **Market → Sources → Add source → paste** `https://perrylink-dsh-catalog.perrylink.workers.dev/catalog-source.json` **→ select**. Installation still requires the market's npm identity check and your confirmation.
|
|
99
|
+
|
|
100
|
+
</details>
|
|
101
|
+
|
|
102
|
+
## Core capabilities
|
|
103
|
+
|
|
104
|
+
`dsh-pleading-draft` registers the `pleading_draft` tool: it reads one element checklist, applies a versioned rule pack, and returns a report.
|
|
105
|
+
|
|
106
|
+
- **Seven rules in one pack** — the rule pack is data, not code (`rules/pleading-draft.yaml`); replace the pack and you replace the whole rule set without touching TypeScript.
|
|
107
|
+
- **Read-only on the material** — accepts JSON or YAML; the original is never modified. Plain ESM, no network requests, no model calls.
|
|
108
|
+
- **No fabricated citations** — every rule carries `document` / `number` / `clause` / `excerpt` / `kind` / `source`; `excerpt` must be a verbatim quotation, and a rule whose text could not be obtained says so in `excerpt` and is marked `derived-from-principle`.
|
|
109
|
+
- **Severity follows the evidence** — `derived-from-principle` is capped at `warn`, institutional configuration (`institutional-configuration`) at `info`, and a test asserts it.
|
|
110
|
+
- **An empty issue list is not "nothing is wrong"** — every check that could not run goes into `skipped` with its reason; a rule whose required list is unset reports itself in `skipped` rather than passing silently.
|
|
111
|
+
- **No adjudicating wording** — the report lists differences only; it never pronounces on compliance, liability or correctness. A wording guard enforces this and the report always carries the disclaimer.
|
|
112
|
+
|
|
113
|
+
| Rule | Check | Severity | Basis kind |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
| `PL-001` | every claim records its factual basis | warn | direct |
|
|
116
|
+
| `PL-002` | every claim points at evidence | warn | direct |
|
|
117
|
+
| `PL-003` | every claim states its legal basis | warn | direct |
|
|
118
|
+
| `PL-004` | a claim carrying an amount also carries a deadline | warn | principle |
|
|
119
|
+
| `PL-005` | the header names plaintiff and defendant | warn | direct |
|
|
120
|
+
| `PL-006` | element numbers are unique in the table | warn | principle |
|
|
121
|
+
| `PL-007` | the claim column holds no unreplaced placeholder | warn | principle |
|
|
122
|
+
|
|
123
|
+
### Examples
|
|
124
|
+
|
|
125
|
+
These are the plugin's real entry points; install once, then call one. The first row is the detailed walkthrough, the rest are short cases.
|
|
126
|
+
|
|
127
|
+
**Detailed example** — tool `pleading_draft`, input:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{"caseNo":"(2026)某民初 1234 号","rows":[{"序号":"1","请求要素":"本金给付请求","诉讼请求":"判令被告支付货款本金人民币 1,250,000 元","事实依据":"","证据":"证1、证2、证3"}]}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Output:
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"id": "dsh-pleading-draft.PL-001.de09b5a6",
|
|
138
|
+
"ruleId": "PL-001",
|
|
139
|
+
"severity": "warn",
|
|
140
|
+
"locator": {
|
|
141
|
+
"row": 1,
|
|
142
|
+
"field": "fact"
|
|
143
|
+
},
|
|
144
|
+
"found": "第 1 行「fact」为空",
|
|
145
|
+
"expected": "「fact」应填写",
|
|
146
|
+
"fix": "补填事实依据;本条只核对是否写明,不判断事实是否属实"
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
*Observed from `dsh-pleading-draft/tests/fixtures/PL-001/PL-001-unsafe.json (cases.json expects 1×PL-001); executed parseMaterial+runCheck, checkedAt=2026-10-06T00:00:00.000Z`*
|
|
151
|
+
|
|
152
|
+
| You ask | What it answers |
|
|
153
|
+
|---|---|
|
|
154
|
+
| The claim is written out, but the evidence column points at nothing. | `PL-002` reports the row whose evidence column does not point at evidence — it checks that a reference is written, not that the evidence exists, is complete or bears on that particular claim. |
|
|
155
|
+
| The legal-basis column holds only a general phrase such as "relevant provisions". | `PL-003` requires the legal-basis column to be filled on every claim element. It reports an empty column; it does not verify that the provision cited exists, is in force or applies to the case. |
|
|
156
|
+
| The amount is stated, but no performance deadline is recorded. | `PL-004` fires only when the amount column is filled, and then requires the deadline column: an amount without a deadline is reported. A claim for a declaration is not asked for a deadline it does not have. Whether the amount is computed correctly or the deadline is reasonable is not checked. |
|
|
157
|
+
| Which fields must the case header carry? | `PL-005` requires the header to name the plaintiff and the defendant; both are configuration fields, so your own form can add the cause of action and the accepting court. It does not check that the parties are the right ones for that claim. |
|
|
158
|
+
| What happens when the claim column still holds a template placeholder? | `PL-007` reports it. The exact term list lives in `rules/pleading-draft.yaml` (`PL-007` `terms`); it covers square brackets, doubled braces, `XXX`, `TBD`, `todo`, and the Chinese words for "to be filled", "to be supplemented" and "example". A vague claim with none of those terms passes, because judging the required precision of a claim is a legal judgement. |
|
|
159
|
+
| A rule appears in `skipped` instead of reporting anything. Does that mean it passed? | No. `skipped` names a check that did not run: `PL-002`, for instance, is listed there when it was disabled in configuration, left out by the `only` selection, or when the material met its precondition and no difference was found. A check that does not run cannot clear a column, and its own limit stands: it never sees whether the evidence suffices or corresponds to the claim. |
|
|
160
|
+
|
|
161
|
+
## Configuration
|
|
162
|
+
|
|
163
|
+
All tunables are Schemastery `Config` fields in `src/config.ts` (changeable from cordis.yml); per-rule thresholds live in the rule pack under `rules/`. An id-targeted override replaces the whole row — restate every key you need.
|
|
164
|
+
|
|
165
|
+
| Key | Type | Default | Description |
|
|
166
|
+
|---|---|---|---|
|
|
167
|
+
| `rulesFile` | string | `rules/pleading-draft.yaml` | Rule-pack path, relative to the package root |
|
|
168
|
+
| `disabledRules` | string[] | `[]` | Rule ids to stop running; each appears in `skipped` |
|
|
169
|
+
| `onlyRules` | string[] | `[]` | Run only these rule ids; empty runs every rule |
|
|
170
|
+
| `skipNotes` | string | `""` | Note appended to every `skipped` reason |
|
|
171
|
+
| `timeoutMs` | number | `120000` | Cooperative tool timeout budget |
|
|
172
|
+
|
|
173
|
+
Rule-level parameters worth knowing:
|
|
174
|
+
|
|
175
|
+
- `PL-004` `conditionField` / `requiredFields` — which column triggers the deadline requirement; the amount column by default, requiring the performance deadline.
|
|
176
|
+
- `PL-005` `fields` — the header fields that must be present; plaintiff and defendant by default. Add `court` and `cause` if your checklist records them in the header.
|
|
177
|
+
- `PL-007` `terms` — the placeholders to look for.
|
|
178
|
+
|
|
179
|
+
Example override in your profile patch:
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
- insert:
|
|
183
|
+
- id: dsh-pleading-draft
|
|
184
|
+
name: dsh-pleading-draft
|
|
185
|
+
config:
|
|
186
|
+
disabledRules: [PL-006]
|
|
187
|
+
timeoutMs: 180000
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Material format
|
|
191
|
+
|
|
192
|
+
The tool accepts JSON or YAML:
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
caseNo: (2026)某民初 1234 号
|
|
196
|
+
court: 某某人民法院
|
|
197
|
+
plaintiff: 原告某某公司
|
|
198
|
+
defendant: 被告某某公司
|
|
199
|
+
cause: 买卖合同纠纷
|
|
200
|
+
rows:
|
|
201
|
+
- { 序号: '1', 请求要素: 本金给付请求,
|
|
202
|
+
诉讼请求: 判令被告支付货款本金人民币 1,250,000 元,
|
|
203
|
+
事实依据: 双方于 2025 年 3 月 10 日签订买卖合同,原告已按约交付货物,被告未按期付款,
|
|
204
|
+
证据: 证1、证2、证3, 法律依据: 《中华人民共和国民法典》第五百七十七条,
|
|
205
|
+
金额: '1250000', 期限: 本判决生效之日起十日内 }
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Column names are matched case-insensitively and ignoring spaces, underscores and hyphens; the checklist's own column names are kept, so a finding names the column it read. Fields are optional at the reader layer and validated by the check engine, so a partial export produces "missing item" findings instead of crashing.
|
|
209
|
+
|
|
210
|
+
## Rule sources
|
|
211
|
+
|
|
212
|
+
Rule data lives in `rules/pleading-draft.yaml`, separate from the code: every rule carries the document, number, clause in the source's own numbering, a verbatim excerpt, and a source URL. A load-time guard enforces that `excerpt` is a real quotation of at least eight characters, but it cannot tell a quotation from a description — so this pack also leans on each rule's `note` and the verification record under `rules/evidence/`; `kind: derived-from-principle` is capped at `warn`, `institutional-configuration` at `info`; a pack that overstates its basis fails at load. `scripts/check-citations.mjs` additionally matches every `excerpt` against the verification record under `rules/evidence/`, and that baseline can only shrink. Four of the seven rules are `direct` (`PL-001`, `PL-002`, `PL-003`, `PL-005`) and three are `derived-from-principle` (`PL-004`, `PL-006`, `PL-007`): each quotes the provision it relies on, but the requirement it checks follows from the provision's principle rather than its wording, and the gap is stated in the rule's `note`.
|
|
213
|
+
|
|
214
|
+
## Standards it follows
|
|
215
|
+
|
|
216
|
+
| Document | Number | Cited by rules |
|
|
217
|
+
|---|---|---|
|
|
218
|
+
| Civil Procedure Law of the People's Republic of China | Adopted 1991; amended five times (2007, 2012, 2017, 2021, 2023); current article numbers checked against the 2021 and 2023 consolidated texts | PL-001, PL-002, PL-003, PL-004, PL-005, PL-006, PL-007 |
|
|
219
|
+
|
|
220
|
+
**Boundary:** this plugin checks a **pleading-element checklist** for completeness — that every claim records its factual basis, points at evidence, states its legal basis, that a monetary claim states an amount and a performance deadline, that the document names both parties, that element numbers are unique, and that no placeholder survives. It does **not** decide whether a claim will succeed, whether it is time-barred, whether jurisdiction is right, whether the evidence suffices, or whether the case should be accepted. **Those are the court's determinations and the advocate's substantive judgement.**
|
|
221
|
+
|
|
222
|
+
## FAQ
|
|
223
|
+
|
|
224
|
+
<details>
|
|
225
|
+
<summary>Where does the material go? Is it uploaded?</summary>
|
|
226
|
+
|
|
227
|
+
Nowhere. The tool reads only the local `file` path or inline `material` (JSON/YAML) you hand it; the plugin makes no network requests, writes nothing to disk, and calls no model (the manifest declares `network: false` and empty `writes`), and it returns report text only. The material itself is never modified.
|
|
228
|
+
|
|
229
|
+
</details>
|
|
230
|
+
|
|
231
|
+
<details>
|
|
232
|
+
<summary>Can an empty `issues` list be read as "nothing is wrong"?</summary>
|
|
233
|
+
|
|
234
|
+
No. Every check that could not run is listed in `skipped` with its reason; a rule whose required list is unset reports itself in `skipped` rather than passing silently. Read `issues` and `skipped` together.
|
|
235
|
+
|
|
236
|
+
</details>
|
|
237
|
+
|
|
238
|
+
<details>
|
|
239
|
+
<summary>Does the rule pack make up its citations?</summary>
|
|
240
|
+
|
|
241
|
+
No. Every rule carries `document` / `number` / `clause` / `excerpt` / `kind` / `source`; `excerpt` must be a verbatim quotation, and when the text could not be obtained the pack says so in `excerpt` and steps the rule down to a principle-based basis (capped at `warn`). `pnpm run check:citations` matches every excerpt against the verification record in `rules/evidence/`, and CI runs it.
|
|
242
|
+
|
|
243
|
+
</details>
|
|
244
|
+
|
|
245
|
+
<details>
|
|
246
|
+
<summary>Does it fight other plugins over tool names or service keys?</summary>
|
|
247
|
+
|
|
248
|
+
No. It registers one namespaced tool, `pleading_draft`, provides no service key, registers no client slot and no `webServer` prefix, and mutates no globals; `cordis.patch.yml` only `insert`s its own row and never overrides a built-in row. Tool registration is a Cordis effect, so unloading removes it.
|
|
249
|
+
|
|
250
|
+
</details>
|
|
251
|
+
|
|
252
|
+
<details>
|
|
253
|
+
<summary>Will it cope with a batch of documents at once?</summary>
|
|
254
|
+
|
|
255
|
+
The tool works in both `native` and `ptc` modes; for batch work (a whole directory) use `ptc`, where the schema cost is paid once. The checks themselves are local reading and rule evaluation — no network requests, no model calls; `timeoutMs` (default 120 s) is the cooperative timeout budget.
|
|
256
|
+
|
|
257
|
+
</details>
|
|
258
|
+
|
|
259
|
+
## Security boundaries
|
|
260
|
+
|
|
261
|
+
> ### ⚠️ Read this before trusting a citation in the report
|
|
262
|
+
>
|
|
263
|
+
> **It reads a checklist, not the pleadings, the evidence or the statutes.** So it can only check that a column *points at* evidence or *names* a provision — **never that the evidence suffices or that the provision exists, is in force, or applies**. `PL-002` and `PL-003` say so in their own `note`s. Test the plugin against a pleading whose cited article was repealed: it will pass, because looking up statutes is a different job and one this plugin deliberately does not do.
|
|
264
|
+
>
|
|
265
|
+
> **The citation status differs rule by rule; it is not uniform.** Four of the seven rules quote verbatim clause text (`kind: direct`): `PL-001`, `PL-002`, `PL-003`, `PL-005`. The other three (`PL-004`, `PL-006`, `PL-007`) quote the provision they rely on, but the requirement itself follows only from that provision's principle, so they are marked `derived-from-principle` and capped at `warn`, with the gap stated in each rule's `note`. The pack never presents a paraphrase as a quotation.
|
|
266
|
+
>
|
|
267
|
+
> `PL-004` fires only when an amount column is filled, so a claim for a declaration or for a change of legal relation is not asked for a performance deadline it does not have. And `PL-007` catches placeholders only: a claim that is vague **without** containing `【】` or a to-fill placeholder will pass, because judging whether a claim is stated with the required precision is a legal judgement.
|
|
268
|
+
>
|
|
269
|
+
> The conclusion stays with the reviewer: the plugin lists only differences it can point to inside the material, and never judges whether facts are true or whether conduct is compliant.
|
|
270
|
+
|
|
271
|
+
## Known limitations
|
|
272
|
+
|
|
273
|
+
- **It checks whether a column is written, not whether it is right.** It cannot see the evidence itself and cannot verify that a provision is in force; those judgements need legal expertise and are the advocate's core work.
|
|
274
|
+
- **`PL-004` is conditional.** A deadline is required only when the amount column is filled, so a declaration or constitutive claim is not asked for a deadline it does not have.
|
|
275
|
+
- **`PL-007` catches placeholders only.** A vague claim without `【】`, a to-fill placeholder, `TBD` or similar passes, because judging the required precision of a claim is a legal judgement.
|
|
276
|
+
- **Article numbers travel with the text.** The rule pack is version `2026.1`; citations and article numbers follow the 2021 fourth amendment and the 2023 fifth amendment, and a later amendment can move them again.
|
|
277
|
+
- **No timezone conversion.** All date checks are wall-clock arithmetic on the input strings.
|
|
278
|
+
- **The material is read column by column.** A partial export produces "missing item" findings instead of crashing — read `issues` and `skipped` together.
|
|
279
|
+
|
|
280
|
+
## Troubleshooting
|
|
281
|
+
|
|
282
|
+
- **`PL-003` passes on a provision I know was repealed.** It cannot check that: it verifies that a legal basis is *named*, not that it exists or applies. Statute lookup is out of scope by design.
|
|
283
|
+
- **`PL-002` passes although the evidence proves nothing.** Same reason: it checks that evidence is *pointed at*, not that it is sufficient.
|
|
284
|
+
- **`PL-004` does not fire on a declaration claim.** That is deliberate — the deadline is required only when an amount is stated.
|
|
285
|
+
- **`PL-007` does not fire on a vague claim.** It catches placeholders, not imprecision.
|
|
286
|
+
- **The plugin installs but the tool never appears.** Check that `main` resolves to `lib/index.mjs` and that `pnpm run build` produced it; a wrong `main` makes the loader skip the entry silently.
|
|
287
|
+
- **`dsh plugin add` refuses the package as incompatible.** The peer range covers `0.1.x` and `0.2.x`; if your runtime sits outside it, grant an explicit exemption: `dsh plugin --profile <name> allow-version dsh-pleading-draft@0.1.0 --dsh-version <runtime> --accept-risk`
|
|
288
|
+
- **`check` reports `manifest-peers` as 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 in `dsh-plugin-dev`.
|
|
289
|
+
- **Times look shifted.** All arithmetic is wall-clock on the input strings, with no timezone conversion.
|
|
290
|
+
|
|
291
|
+
## Compatibility
|
|
292
|
+
|
|
293
|
+
| Surface | Status |
|
|
294
|
+
|---|---|
|
|
295
|
+
| 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 |
|
|
296
|
+
| Node | `^22.19.0 \|\| >=24.0.0` |
|
|
297
|
+
| Platforms | All (plain ESM; no native code, no network, no model call) |
|
|
298
|
+
| Tool mode | Works in `native` and `ptc`; for a whole directory of material use `ptc` |
|
|
299
|
+
|
|
300
|
+
## Ecosystem & quality
|
|
301
|
+
|
|
302
|
+
- [Gitee mirror](https://gitee.com/perrylink/dsh-pleading-draft) (sync mirror; GitHub is canonical)
|
|
303
|
+
- [dshfind plugin page](https://dshfind.com/plugins/PerryLink/dsh-pleading-draft) (installs and ranking)
|
|
304
|
+
- [OpenSSF Scorecard report](https://securityscorecards.dev/viewer/?uri=github.com/PerryLink/dsh-pleading-draft) (driven by [.github/workflows/scorecard.yml](.github/workflows/scorecard.yml))
|
|
305
|
+
- [DSH Market](https://dsh.market/) (listed)
|
|
306
|
+
- **1024 store channel**: `npm i -g dsh1024` once, then `dsh1024 plugin --profile <name> add dsh-pleading-draft` (counts toward the [deepseek1024.com](https://deepseek1024.com) install ranking)
|
|
307
|
+
- [Ecosystem knowledge base](https://perrylink.github.io/dsh-plugin-guide/) — plugin development guide · measured selection data · maintenance criteria
|
|
308
|
+
|
|
309
|
+
## Development
|
|
310
|
+
|
|
311
|
+
```sh
|
|
312
|
+
pnpm install # node ^22.19 || >=24
|
|
313
|
+
pnpm run typecheck # tsc --noEmit
|
|
314
|
+
pnpm test # vitest: shared table-plugin suite + paired fixtures
|
|
315
|
+
pnpm run build # tsdown -> lib/index.mjs + lib/index.d.mts
|
|
316
|
+
pnpm run verify:self-contained # dependency specs resolve from the registry
|
|
317
|
+
pnpm run check:lockfile # lockfile drift check
|
|
318
|
+
pnpm run check:readmes # five-language README consistency
|
|
319
|
+
pnpm run check:citations # rule-pack citation baseline
|
|
320
|
+
node ../scripts/sync-shared.mjs dsh-pleading-draft # refresh src/shared from ../_shared
|
|
321
|
+
pnpm pack # the published tarball
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
The plugin is **data-only**: `src/model.ts` declares the table shape, `src/check.ts` is the pure check core with no plugin context, `src/shared/` supplies the reader and report shape, and the rule pack declares every check. Local sample run (needs `pnpm run build` first to produce `lib/`):
|
|
325
|
+
|
|
326
|
+
```sh
|
|
327
|
+
node samples/quickstart/run.mjs --json
|
|
328
|
+
# => {"tool":"pleading_draft","issueCount":1,"summary":{"error":0,"warn":1,"info":0},"skippedCount":0}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
The sample input lives in `samples/quickstart/input/`, the expected output in `samples/quickstart/expected/result.json`, and a screenshot in `docs/assets/quickstart.png`. The README images are generated programmatically by [`scripts/gen-readme-assets.py`](scripts/gen-readme-assets.py) (Pillow for the hero, hand-written SVG for the structure diagram) and are safe to re-run: it writes `docs/assets/dsh-pleading-draft-hero-{zh,en}-{light,dark}.webp` and `docs/assets/dsh-pleading-draft-flow-v5-{light,dark}.svg`. The older single-skin flow diagram and demo images stay in `docs/assets/` for external deep links, while the READMEs reference only the new hero and flow-v5.
|
|
332
|
+
|
|
333
|
+
Topics: `deepseek-harness`, `dsh`, `dsh-plugin`, `cordis`, `pleading`, `draft`
|
|
334
|
+
|
|
335
|
+
## Family & thanks
|
|
336
|
+
|
|
337
|
+
This project is part of the DeepSeek Harness plugin family from [PerryLink](https://github.com/PerryLink) (all Apache-2.0). Full family index: [choose a checker by material](https://perrylink.github.io/zh/checkers/choose/). If it is useful, **a star helps the next person find it** — nothing is gated behind it.
|
|
338
|
+
|
|
339
|
+
- [@PerryLink](https://github.com/PerryLink) — creator and maintainer: the data-only rule pack (PL-001..PL-007), the `pleading_draft` tool, the citation-verification record, and the five-language docs.
|
|
340
|
+
|
|
341
|
+
<details>
|
|
342
|
+
<summary>Expand all plugins</summary>
|
|
343
|
+
|
|
344
|
+
| Plugin | Status |
|
|
345
|
+
|---|---|
|
|
346
|
+
| **[dsh-aqua-input-check](https://github.com/PerryLink/dsh-aqua-input-check)** | |
|
|
347
|
+
| **[dsh-archive-check](https://github.com/PerryLink/dsh-archive-check)** | |
|
|
348
|
+
| **[dsh-auto-review](https://github.com/PerryLink/dsh-auto-review)** | |
|
|
349
|
+
| **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | 🧊 FROZEN — see the repo README |
|
|
350
|
+
| **[dsh-bid-ca-precheck](https://github.com/PerryLink/dsh-bid-ca-precheck)** | |
|
|
351
|
+
| **[dsh-bid-qual-check](https://github.com/PerryLink/dsh-bid-qual-check)** | |
|
|
352
|
+
| **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | 🧊 FROZEN — see the repo README |
|
|
353
|
+
| **[dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind)** | |
|
|
354
|
+
| **[dsh-click](https://github.com/PerryLink/dsh-click)** | |
|
|
355
|
+
| **[dsh-composer-history](https://github.com/PerryLink/dsh-composer-history)** | |
|
|
356
|
+
| **[dsh-contract-stance](https://github.com/PerryLink/dsh-contract-stance)** | |
|
|
357
|
+
| **[dsh-customs-doc-check](https://github.com/PerryLink/dsh-customs-doc-check)** | |
|
|
358
|
+
| **[dsh-data-quality](https://github.com/PerryLink/dsh-data-quality)** | 🧊 FROZEN — see the repo README |
|
|
359
|
+
| **[dsh-demurrage-ledger](https://github.com/PerryLink/dsh-demurrage-ledger)** | |
|
|
360
|
+
| **[dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck)** | |
|
|
361
|
+
| **[dsh-drill-script-check](https://github.com/PerryLink/dsh-drill-script-check)** | |
|
|
362
|
+
| **[dsh-eia-guide-check](https://github.com/PerryLink/dsh-eia-guide-check)** | |
|
|
363
|
+
| **[dsh-emergency-plan](https://github.com/PerryLink/dsh-emergency-plan)** | |
|
|
364
|
+
| **[dsh-essay-rubric-check](https://github.com/PerryLink/dsh-essay-rubric-check)** | |
|
|
365
|
+
| **[dsh-evidence-check](https://github.com/PerryLink/dsh-evidence-check)** | |
|
|
366
|
+
| **[dsh-export-ctl-check](https://github.com/PerryLink/dsh-export-ctl-check)** | |
|
|
367
|
+
| **[dsh-fast](https://github.com/PerryLink/dsh-fast)** | |
|
|
368
|
+
| **[dsh-fmea-table-check](https://github.com/PerryLink/dsh-fmea-table-check)** | |
|
|
369
|
+
| **[dsh-forecast-penalty](https://github.com/PerryLink/dsh-forecast-penalty)** | |
|
|
370
|
+
| **[dsh-fund-research](https://github.com/PerryLink/dsh-fund-research)** | |
|
|
371
|
+
| **[dsh-github](https://github.com/PerryLink/dsh-github)** | |
|
|
372
|
+
| **[dsh-gongwen-flow-check](https://github.com/PerryLink/dsh-gongwen-flow-check)** | |
|
|
373
|
+
| **[dsh-gongwen-word-check](https://github.com/PerryLink/dsh-gongwen-word-check)** | |
|
|
374
|
+
| **[dsh-guard-plan-qc](https://github.com/PerryLink/dsh-guard-plan-qc)** | |
|
|
375
|
+
| **[dsh-hazchem-check](https://github.com/PerryLink/dsh-hazchem-check)** | |
|
|
376
|
+
| **[dsh-hazplan-check](https://github.com/PerryLink/dsh-hazplan-check)** | |
|
|
377
|
+
| **[dsh-hidden-risk-map](https://github.com/PerryLink/dsh-hidden-risk-map)** | |
|
|
378
|
+
| **[dsh-hs-classify](https://github.com/PerryLink/dsh-hs-classify)** | |
|
|
379
|
+
| **[dsh-icd-rule-check](https://github.com/PerryLink/dsh-icd-rule-check)** | |
|
|
380
|
+
| **[dsh-industry-research](https://github.com/PerryLink/dsh-industry-research)** | |
|
|
381
|
+
| **[dsh-lawcite-adapter](https://github.com/PerryLink/dsh-lawcite-adapter)** | |
|
|
382
|
+
| **[dsh-laya](https://github.com/PerryLink/dsh-laya)** | |
|
|
383
|
+
| **[dsh-lc-doc-check](https://github.com/PerryLink/dsh-lc-doc-check)** | |
|
|
384
|
+
| **[dsh-learning-gap-check](https://github.com/PerryLink/dsh-learning-gap-check)** | |
|
|
385
|
+
| **[dsh-library](https://github.com/PerryLink/dsh-library)** | |
|
|
386
|
+
| **[dsh-local-ai](https://github.com/PerryLink/dsh-local-ai)** | |
|
|
387
|
+
| **[dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions)** | |
|
|
388
|
+
| **[dsh-mask](https://github.com/PerryLink/dsh-mask)** | |
|
|
389
|
+
| **[dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel)** | |
|
|
390
|
+
| **[dsh-medrec-qc](https://github.com/PerryLink/dsh-medrec-qc)** | |
|
|
391
|
+
| **[dsh-memento](https://github.com/PerryLink/dsh-memento)** | 🧊 FROZEN — see the repo README |
|
|
392
|
+
| **[dsh-nsfc-form-check](https://github.com/PerryLink/dsh-nsfc-form-check)** | |
|
|
393
|
+
| **[dsh-nurse-record-check](https://github.com/PerryLink/dsh-nurse-record-check)** | |
|
|
394
|
+
| **[dsh-observe](https://github.com/PerryLink/dsh-observe)** | |
|
|
395
|
+
| **[dsh-origin-rvc-check](https://github.com/PerryLink/dsh-origin-rvc-check)** | |
|
|
396
|
+
| **[dsh-ota-review-check](https://github.com/PerryLink/dsh-ota-review-check)** | |
|
|
397
|
+
| **[dsh-output-styles](https://github.com/PerryLink/dsh-output-styles)** | |
|
|
398
|
+
| **[dsh-paper-doc-adapter](https://github.com/PerryLink/dsh-paper-doc-adapter)** | |
|
|
399
|
+
| **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | |
|
|
400
|
+
| **[dsh-permit-report-check](https://github.com/PerryLink/dsh-permit-report-check)** | |
|
|
401
|
+
| **[dsh-pipeline-check](https://github.com/PerryLink/dsh-pipeline-check)** | |
|
|
402
|
+
| **[dsh-pleading-draft](https://github.com/PerryLink/dsh-pleading-draft)** | |
|
|
403
|
+
| **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | 🚫 RETIRED (repo archived) |
|
|
404
|
+
| **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | |
|
|
405
|
+
| **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | 🚫 RETIRED (repo archived) |
|
|
406
|
+
| **[dsh-plugin-upgrade](https://github.com/PerryLink/dsh-plugin-upgrade)** | 🚫 RETIRED (repo archived) |
|
|
407
|
+
| **[dsh-policy-brief-draft](https://github.com/PerryLink/dsh-policy-brief-draft)** | |
|
|
408
|
+
| **[dsh-power-loss-split](https://github.com/PerryLink/dsh-power-loss-split)** | |
|
|
409
|
+
| **[dsh-power-ticket-check](https://github.com/PerryLink/dsh-power-ticket-check)** | |
|
|
410
|
+
| **[dsh-ppap-check](https://github.com/PerryLink/dsh-ppap-check)** | |
|
|
411
|
+
| **[dsh-protest-deadline](https://github.com/PerryLink/dsh-protest-deadline)** | |
|
|
412
|
+
| **[dsh-railway-window](https://github.com/PerryLink/dsh-railway-window)** | |
|
|
413
|
+
| **[dsh-repair-order-qc](https://github.com/PerryLink/dsh-repair-order-qc)** | |
|
|
414
|
+
| **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | |
|
|
415
|
+
| **[dsh-review-reply-check](https://github.com/PerryLink/dsh-review-reply-check)** | |
|
|
416
|
+
| **[dsh-rulefile-check](https://github.com/PerryLink/dsh-rulefile-check)** | |
|
|
417
|
+
| **[dsh-safety-brief-check](https://github.com/PerryLink/dsh-safety-brief-check)** | |
|
|
418
|
+
| **[dsh-score](https://github.com/PerryLink/dsh-score)** | 🧊 FROZEN — see the repo README |
|
|
419
|
+
| **[dsh-session-sync](https://github.com/PerryLink/dsh-session-sync)** | |
|
|
420
|
+
| **[dsh-site-log-check](https://github.com/PerryLink/dsh-site-log-check)** | |
|
|
421
|
+
| **[dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security)** | |
|
|
422
|
+
| **[dsh-soe-decision-check](https://github.com/PerryLink/dsh-soe-decision-check)** | |
|
|
423
|
+
| **[dsh-soilwater-check](https://github.com/PerryLink/dsh-soilwater-check)** | |
|
|
424
|
+
| **[dsh-sop-sync-check](https://github.com/PerryLink/dsh-sop-sync-check)** | |
|
|
425
|
+
| **[dsh-spc-gbt-adapter](https://github.com/PerryLink/dsh-spc-gbt-adapter)** | |
|
|
426
|
+
| **[dsh-talk](https://github.com/PerryLink/dsh-talk)** | |
|
|
427
|
+
| **[dsh-tender-extract](https://github.com/PerryLink/dsh-tender-extract)** | |
|
|
428
|
+
| **[dsh-tender-matrix](https://github.com/PerryLink/dsh-tender-matrix)** | |
|
|
429
|
+
| **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | |
|
|
430
|
+
| **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | 🚫 RETIRED (repo archived) |
|
|
431
|
+
| **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | |
|
|
432
|
+
| **[dsh-warranty-calc](https://github.com/PerryLink/dsh-warranty-calc)** | |
|
|
433
|
+
| **[dsh-budget](https://github.com/PerryLink/dsh-budget)** | 🧊 FROZEN — see the repo README |
|
|
434
|
+
| **[dsh-claude-move](https://github.com/PerryLink/dsh-claude-move)** | 🧊 FROZEN — see the repo README |
|
|
435
|
+
| **[dsh-defend](https://github.com/PerryLink/dsh-defend)** | 🧊 FROZEN — see the repo README |
|
|
436
|
+
| **[dsh-draw](https://github.com/PerryLink/dsh-draw)** | 🧊 FROZEN — see the repo README |
|
|
437
|
+
| **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | 🧊 FROZEN — see the repo README |
|
|
438
|
+
| **[dsh-background-agents](https://github.com/PerryLink/dsh-background-agents)** | 🚫 RETIRED (repo archived) |
|
|
439
|
+
| **[dsh-session-pin](https://github.com/PerryLink/dsh-session-pin)** | 🚫 RETIRED (repo archived) |
|
|
440
|
+
| **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | 🚫 RETIRED (repo archived) |
|
|
441
|
+
|
|
442
|
+
</details>
|
|
443
|
+
|
|
444
|
+
## License
|
|
445
|
+
|
|
446
|
+
[LICENSE](LICENSE) (Apache License 2.0) © 2026 dsh-pleading-draft contributors
|
|
447
|
+
|
|
448
|
+
<p align="center"><sub>Apache-2.0 · Community plugin, not affiliated with DeepSeek.</sub></p>
|