dsh-pleading-draft 0.2.10 → 0.2.11

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/README-es.md CHANGED
@@ -3,6 +3,7 @@
3
3
  [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
4
 
5
5
  [![DSH Market](https://raw.githubusercontent.com/2BingLing/dsh-market/master/assets/readme/badge-listed-en.svg)](https://dsh.market/)
6
+ [![dshfind](https://dshfind.com/api/badge/PerryLink/dsh-pleading-draft?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-pleading-draft?ref=badge)
6
7
 
7
8
  `dsh-pleading-draft` lee una lista de elementos de la demanda —la cabecera del caso más una fila por pretensión, con sus columnas `序号`、`诉讼请求`、`事实依据`、`证据`、`法律依据`、`金额` y `期限`— y comprueba la completitud y la coherencia interna de ese documento: que cada pretensión registre su base fáctica, señale pruebas y exponga su fundamento jurídico, que la pretensión que lleva importe lleve también plazo de cumplimiento, que la cabecera nombre al demandante y al demandado, que no se repita ningún número de elemento y que no quede ningún marcador de plantilla sin sustituir en la columna de pretensiones.
8
9
 
@@ -15,14 +16,48 @@ dsh --profile <name> --dump-config | grep 'dsh-pleading-draft'
15
16
 
16
17
  ## Cómo se ve la salida
17
18
 
18
- ![Terminal demo of dsh-pleading-draft: real output over its PL-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-hero.png)
19
+ ![Diagrama de flujo de dsh-pleading-draft: llamada → plugin → resultado.](docs/assets/dsh-pleading-draft-flow.svg)
20
+
21
+ *Resumen del flujo: llamada → plugin → resultado. Los ejemplos siguientes usan la superficie de comandos real.*
19
22
 
20
- ![Animated terminal demo of dsh-pleading-draft](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-demo.gif)
21
23
 
22
24
  Salida real de este plugin sobre su propio fixture de prueba `PL-001` — no es un montaje. El paquete de reglas no inventa citas: cada hallazgo nombra la cláusula aplicada y si su excerpt es una cita literal o una inferencia de principio.
23
25
 
24
26
  ## Qué responde
25
27
 
28
+ ### Ejemplos
29
+
30
+ La tabla siguiente es el conjunto de ejemplos: la primera fila es el caso detallado y las demás son casos breves.
31
+
32
+ #### Salida detallada
33
+
34
+ **Herramienta** `pleading_draft`
35
+
36
+ **Entrada**
37
+
38
+ ~~~json
39
+ {"caseNo":"(2026)某民初 1234 号","rows":[{"序号":"1","请求要素":"本金给付请求","诉讼请求":"判令被告支付货款本金人民币 1,250,000 元","事实依据":"","证据":"证1、证2、证3"}]}
40
+ ~~~
41
+
42
+ **Salida**
43
+
44
+ ~~~json
45
+ {
46
+ "id": "dsh-pleading-draft.PL-001.de09b5a6",
47
+ "ruleId": "PL-001",
48
+ "severity": "warn",
49
+ "locator": {
50
+ "row": 1,
51
+ "field": "fact"
52
+ },
53
+ "found": "第 1 行「fact」为空",
54
+ "expected": "「fact」应填写",
55
+ "fix": "补填事实依据;本条只核对是否写明,不判断事实是否属实"
56
+ }
57
+ ~~~
58
+
59
+ *Observado en `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`*
60
+
26
61
  | Usted pregunta | Qué responde |
27
62
  |---|---|
28
63
  | La pretensión está redactada, pero la columna de pruebas no señala nada. | `PL-002` señala la fila cuya columna `证据` no apunta a ninguna prueba: comprueba que la referencia esté escrita, no que la prueba exista, esté completa o se refiera a esa pretensión concreta. |
@@ -120,6 +155,10 @@ node ../scripts/sync-shared.mjs dsh-pleading-draft
120
155
 
121
156
  El último comando copia el kit compartido de `../_shared` a `src/shared/`; vuelva a ejecutarlo tras cada cambio compartido.
122
157
 
158
+ ## PerryLink DSH Plugin Family
159
+
160
+ Full family index: [choose a checker by material](https://perrylink.github.io/zh/checkers/choose/) and [all plugins](https://github.com/PerryLink). This repository is one of them.
161
+
123
162
  ## License
124
163
 
125
164
  [Apache License 2.0](LICENSE) © 2026 dsh-pleading-draft contributors.
package/README-hi.md CHANGED
@@ -3,6 +3,7 @@
3
3
  [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
4
 
5
5
  [![DSH Market](https://raw.githubusercontent.com/2BingLing/dsh-market/master/assets/readme/badge-listed-en.svg)](https://dsh.market/)
6
+ [![dshfind](https://dshfind.com/api/badge/PerryLink/dsh-pleading-draft?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-pleading-draft?ref=badge)
6
7
 
7
8
  `dsh-pleading-draft` वाद-पत्र (अथवा आवेदन) के तत्वों की सूची पढ़ता है — मुकदमे का शीर्षक और प्रत्येक दावे की एक पंक्ति, जिसमें `序号`、`诉讼请求`、`事实依据`、`证据`、`法律依据`、`金额`、`期限` कॉलम होते हैं — और उसी दस्तावेज़ की पूर्णता तथा आंतरिक सुसंगति की जाँच करता है: क्या प्रत्येक दावे का तथ्य-आधार दर्ज है, साक्ष्य की ओर संकेत है और विधिक आधार लिखा है, क्या राशि वाले दावे में पालन-अवधि भी दर्ज है, क्या शीर्षक में वादी और प्रतिवादी के नाम हैं, क्या कोई क्रमांक दोहराया नहीं गया है, और क्या दावा-कॉलम में कोई भरा न गया टेम्पलेट प्लेसहोल्डर शेष है।
8
9
 
@@ -15,14 +16,48 @@ dsh --profile <name> --dump-config | grep 'dsh-pleading-draft'
15
16
 
16
17
  ## आउटपुट कैसा दिखता है
17
18
 
18
- ![Terminal demo of dsh-pleading-draft: real output over its PL-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-hero.png)
19
+ ![dsh-pleading-draft कार्यप्रवाह आरेख: कॉल → प्लगइन → परिणाम।](docs/assets/dsh-pleading-draft-flow.svg)
20
+
21
+ *कार्यप्रवाह: कॉल → प्लगइन → परिणाम। नीचे के उदाहरण वास्तविक कमांड सतह का उपयोग करते हैं।*
19
22
 
20
- ![Animated terminal demo of dsh-pleading-draft](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-demo.gif)
21
23
 
22
24
  इस प्लगइन का अपने ही `PL-001` टेस्ट फ़िक्स्चर पर वास्तविक आउटपुट — कोई नकली चित्र नहीं। नियम-पैक उद्धरण नहीं गढ़ता: हर निष्कर्ष लागू किए गए खंड का नाम और यह भी बताता है कि उसका excerpt शब्दशः उद्धरण है या सिद्धांत-व्युत्पन्न।
23
25
 
24
26
  ## यह किन सवालों का जवाब देता है
25
27
 
28
+ ### उदाहरण
29
+
30
+ नीचे दी गई तालिका उदाहरण-समुच्चय है: पहली पंक्ति विस्तृत केस है, बाकी संक्षिप्त केस हैं।
31
+
32
+ #### विस्तृत आउटपुट
33
+
34
+ **उपकरण** `pleading_draft`
35
+
36
+ **इनपुट**
37
+
38
+ ~~~json
39
+ {"caseNo":"(2026)某民初 1234 号","rows":[{"序号":"1","请求要素":"本金给付请求","诉讼请求":"判令被告支付货款本金人民币 1,250,000 元","事实依据":"","证据":"证1、证2、证3"}]}
40
+ ~~~
41
+
42
+ **आउटपुट**
43
+
44
+ ~~~json
45
+ {
46
+ "id": "dsh-pleading-draft.PL-001.de09b5a6",
47
+ "ruleId": "PL-001",
48
+ "severity": "warn",
49
+ "locator": {
50
+ "row": 1,
51
+ "field": "fact"
52
+ },
53
+ "found": "第 1 行「fact」为空",
54
+ "expected": "「fact」应填写",
55
+ "fix": "补填事实依据;本条只核对是否写明,不判断事实是否属实"
56
+ }
57
+ ~~~
58
+
59
+ *स्रोत `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`*
60
+
26
61
  | आपका सवाल | इसका जवाब |
27
62
  |---|---|
28
63
  | दावा लिखा गया है, पर साक्ष्य कॉलम किसी ओर संकेत नहीं करता। | `PL-002` उस पंक्ति को दर्ज करता है जिसका `证据` कॉलम साक्ष्य की ओर संकेत नहीं करता: यह देखता है कि संदर्भ लिखा है, यह नहीं कि साक्ष्य मौजूद है, पूरा है या उसी दावे से संबंधित है। |
@@ -120,6 +155,10 @@ node ../scripts/sync-shared.mjs dsh-pleading-draft
120
155
 
121
156
  अंतिम कमांड `../_shared` का साझा किट `src/shared/` में कॉपी करता है; हर साझा बदलाव के बाद इसे दोबारा चलाएँ।
122
157
 
158
+ ## PerryLink DSH Plugin Family
159
+
160
+ Full family index: [choose a checker by material](https://perrylink.github.io/zh/checkers/choose/) and [all plugins](https://github.com/PerryLink). This repository is one of them.
161
+
123
162
  ## License
124
163
 
125
164
  [Apache License 2.0](LICENSE) © 2026 dsh-pleading-draft contributors.
package/README-pt.md CHANGED
@@ -3,6 +3,7 @@
3
3
  [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
4
 
5
5
  [![DSH Market](https://raw.githubusercontent.com/2BingLing/dsh-market/master/assets/readme/badge-listed-en.svg)](https://dsh.market/)
6
+ [![dshfind](https://dshfind.com/api/badge/PerryLink/dsh-pleading-draft?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-pleading-draft?ref=badge)
6
7
 
7
8
  `dsh-pleading-draft` lê uma lista de elementos da petição inicial —o cabeçalho do processo mais uma linha por pedido, com as suas colunas `序号`、`诉讼请求`、`事实依据`、`证据`、`法律依据`、`金额` e `期限`— e verifica a completude e a coerência interna desse documento: se cada pedido regista o seu fundamento de facto, indica provas e apresenta o seu fundamento jurídico, se o pedido com montante indica também prazo de cumprimento, se o cabeçalho nomeia o autor e o réu, se não há números de elemento repetidos e se não resta nenhum marcador de modelo por substituir na coluna dos pedidos.
8
9
 
@@ -15,14 +16,48 @@ dsh --profile <name> --dump-config | grep 'dsh-pleading-draft'
15
16
 
16
17
  ## Como é a saída
17
18
 
18
- ![Terminal demo of dsh-pleading-draft: real output over its PL-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-hero.png)
19
+ ![Diagrama de fluxo de dsh-pleading-draft: chamada → plugin → resultado.](docs/assets/dsh-pleading-draft-flow.svg)
20
+
21
+ *Visão geral do fluxo: chamada → plugin → resultado. Os exemplos abaixo usam a superfície real de comandos.*
19
22
 
20
- ![Animated terminal demo of dsh-pleading-draft](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-demo.gif)
21
23
 
22
24
  Saída real deste plugin sobre o seu próprio fixture de teste `PL-001` — não é uma simulação. O pacote de regras não inventa citações: cada achado nomeia a cláusula aplicada e se o seu excerpt é uma citação literal ou uma inferência de princípio.
23
25
 
24
26
  ## O que ele responde
25
27
 
28
+ ### Exemplos
29
+
30
+ A tabela abaixo é o conjunto de exemplos: a primeira linha é o caso detalhado e as demais são casos curtos.
31
+
32
+ #### Saída detalhada
33
+
34
+ **Ferramenta** `pleading_draft`
35
+
36
+ **Entrada**
37
+
38
+ ~~~json
39
+ {"caseNo":"(2026)某民初 1234 号","rows":[{"序号":"1","请求要素":"本金给付请求","诉讼请求":"判令被告支付货款本金人民币 1,250,000 元","事实依据":"","证据":"证1、证2、证3"}]}
40
+ ~~~
41
+
42
+ **Saída**
43
+
44
+ ~~~json
45
+ {
46
+ "id": "dsh-pleading-draft.PL-001.de09b5a6",
47
+ "ruleId": "PL-001",
48
+ "severity": "warn",
49
+ "locator": {
50
+ "row": 1,
51
+ "field": "fact"
52
+ },
53
+ "found": "第 1 行「fact」为空",
54
+ "expected": "「fact」应填写",
55
+ "fix": "补填事实依据;本条只核对是否写明,不判断事实是否属实"
56
+ }
57
+ ~~~
58
+
59
+ *Observado em `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`*
60
+
26
61
  | Você pergunta | O que ele responde |
27
62
  |---|---|
28
63
  | O pedido está redigido, mas a coluna das provas não aponta para nada. | `PL-002` assinala a linha cuja coluna `证据` não aponta para provas: verifica que a referência está escrita, não que a prova exista, esteja completa ou diga respeito a esse pedido em concreto. |
@@ -120,6 +155,10 @@ node ../scripts/sync-shared.mjs dsh-pleading-draft
120
155
 
121
156
  O último comando copia o kit compartilhado de `../_shared` para `src/shared/`; execute-o novamente após cada alteração compartilhada.
122
157
 
158
+ ## PerryLink DSH Plugin Family
159
+
160
+ Full family index: [choose a checker by material](https://perrylink.github.io/zh/checkers/choose/) and [all plugins](https://github.com/PerryLink). This repository is one of them.
161
+
123
162
  ## License
124
163
 
125
164
  [Apache License 2.0](LICENSE) © 2026 dsh-pleading-draft contributors.
package/README-zh.md CHANGED
@@ -2,7 +2,17 @@
2
2
 
3
3
  [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
4
 
5
+ <!-- topblock:v1 -->
6
+ > **这是什么** 起诉状要素齐备性核对。输出一份「哪一行、哪一栏、差什么」的清单。
7
+ > **给谁用** 律师、法务;不用懂命令行。
8
+ > **你交什么** 这项核对用到的原始材料(表格、清单或文书);不改原件。Excel 可先转成 JSON/YAML,对话里也能代转。
9
+ > **它不做什么** 不判合规、不认定责任、不替代审核人;只列材料内部能逐条指认的差异。
10
+ > **怎么开始** 在 WorkBuddy / 扣子搜「文书与治理核对包」(本检查是其中一项;上架以商城为准);或命令行:
11
+ > `dsh plugin --profile <name> add dsh-pleading-draft`
12
+ <!-- /topblock:v1 -->
13
+
5
14
  [![DSH Market](https://raw.githubusercontent.com/2BingLing/dsh-market/master/assets/readme/badge-listed-en.svg)](https://dsh.market/)
15
+ [![dshfind](https://dshfind.com/api/badge/PerryLink/dsh-pleading-draft?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-pleading-draft?ref=badge)
6
16
 
7
17
  `dsh-pleading-draft` 读取一份起诉状(或申请书)要素核对表——案件表头加每项请求要素一行,含 `序号`、`诉讼请求`、`事实依据`、`证据`、`法律依据`、`金额`、`期限` 各栏——核对这份文书自身的齐备与自洽:每项诉请是否写明事实依据、是否指明证据、是否写明法律依据,写了金额的是否也写了履行期限,表头是否写明原告与被告,请求要素序号是否重复,诉请栏是否残留未替换的占位符。
8
18
 
@@ -15,14 +25,48 @@ dsh --profile <name> --dump-config | grep 'dsh-pleading-draft'
15
25
 
16
26
  ## 实际输出长什么样
17
27
 
18
- ![Terminal demo of dsh-pleading-draft: real output over its PL-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-hero.png)
28
+ ![dsh-pleading-draft 工作流图:调用 → 插件 → 结果。](docs/assets/dsh-pleading-draft-flow.svg)
29
+
30
+ *工作流概览:调用 → 插件 → 结果。下面的示例使用实际命令面。*
19
31
 
20
- ![Animated terminal demo of dsh-pleading-draft](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-demo.gif)
21
32
 
22
33
  本插件对自己 `PL-001` 测试夹具的**真实输出**,不是示意图。规则库不伪造引文:每条发现都会写明所引条款,以及该条 excerpt 是逐字引文还是原则性推论。
23
34
 
24
35
  ## 它回答什么问题
25
36
 
37
+ ### 示例
38
+
39
+ 下表是示例集:第一行是详细走查,其余行是简短案例。
40
+
41
+ #### 详细输出
42
+
43
+ **工具** `pleading_draft`
44
+
45
+ **输入**
46
+
47
+ ~~~json
48
+ {"caseNo":"(2026)某民初 1234 号","rows":[{"序号":"1","请求要素":"本金给付请求","诉讼请求":"判令被告支付货款本金人民币 1,250,000 元","事实依据":"","证据":"证1、证2、证3"}]}
49
+ ~~~
50
+
51
+ **输出**
52
+
53
+ ~~~json
54
+ {
55
+ "id": "dsh-pleading-draft.PL-001.de09b5a6",
56
+ "ruleId": "PL-001",
57
+ "severity": "warn",
58
+ "locator": {
59
+ "row": 1,
60
+ "field": "fact"
61
+ },
62
+ "found": "第 1 行「fact」为空",
63
+ "expected": "「fact」应填写",
64
+ "fix": "补填事实依据;本条只核对是否写明,不判断事实是否属实"
65
+ }
66
+ ~~~
67
+
68
+ *来源 `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`*
69
+
26
70
  | 你会问 | 它怎么答 |
27
71
  |---|---|
28
72
  | 诉讼请求写了,但「证据」栏什么都没指。 | `PL-002` 会报出 `证据` 栏没有指明证据的行。它只核对是否写明了指向,不判断证据是否存在、是否完整、是否与该项诉请对应。 |
@@ -38,32 +82,15 @@ dsh --profile <name> --dump-config | grep 'dsh-pleading-draft'
38
82
  |---|---|---|
39
83
  | 《中华人民共和国民事诉讼法》 | 1991年通过,经 2007、2012、2017、2021、2023 年五次修正(现行条号据 2021 年第四次修正及 2023 年第五次修正文本核对) | PL-001, PL-002, PL-003, PL-004, PL-005, PL-006, PL-007 |
40
84
 
41
- **Boundary:** this plugin checks a **起诉状(或申请书)要素核对表** for completeness — that every claim records
42
- its factual basis, points at evidence, states its legal basis, that a monetary claim states an amount and a
43
- performance deadline, that the document names both parties, that element numbers are unique, and that no
44
- placeholder survives. It does **not** decide whether a claim will succeed, whether it is time-barred, whether
45
- jurisdiction is right, whether the evidence suffices, or whether the case should be accepted. **Those are the
46
- court's determinations and the advocate's substantive judgement.**
85
+ **边界(中文译文,以英文原文为准):** 本插件核对一份 **起诉状(或申请书)要素核对表** 的齐备性——每项诉请是否写明事实依据、是否指明证据、是否写明法律依据,写了金额的诉请是否写明金额与履行期限,文书是否写明原告与被告,请求要素序号是否唯一,以及是否残留占位符。它**不**判定诉请能否获得支持、是否已过诉讼时效、管辖是否正确、证据是否充分,或案件是否应当受理。**这些是法院的认定,也是代理人的实体判断。**
47
86
 
48
- > ### ⚠️ What this plugin can and cannot do
87
+ > ### ⚠️ 本插件能做什么、不能做什么(以英文原文为准)
49
88
  >
50
- > **It reads a checklist, not the pleadings, the evidence or the statutes.** So it can only check that a
51
- > column *points at* evidence or *names* a provision — **never that the evidence suffices or that the
52
- > provision exists, is in force, or applies**. `PL-002` and `PL-003` say so in their own notes. Test the
53
- > plugin against a pleading whose cited article was repealed: it will pass, because looking up statutes is a
54
- > different job and one this plugin deliberately does not do.
89
+ > **它读的是一份核对表,而不是起诉状、证据或法律条文。** 因此它只能核对其中的某一栏是否*指向*证据、是否*写明*某项条款——**永远不能核对证据是否充分,也不能核对该条款是否存在、是否现行有效、是否适用**。`PL-002` 与 `PL-003` 在各自的 note 中写明了这一点。拿一份所引条文已被废止的起诉状来测试本插件:它会通过,因为查法是另一件工作,也是本插件特意不做的工作。
55
90
  >
56
- > **Every `excerpt` in the rule pack says, in so many words, that the clause text was not obtained.** The
57
- > regime lives in 《中华人民共和国民事诉讼法》(notably its article on what a statement of claim must record)
58
- > and the Supreme People's Court's interpretation of it. The verification pass could not retrieve verbatim
59
- > clause text, so the pack states the gap in the `excerpt` field itself and keeps every rule at `warn` or
60
- > `info`. **When the texts are in hand, replace each `excerpt` with the real clause and raise `kind` to
61
- > `direct`.**
91
+ > **规则库中的每一个 `excerpt` 都明文写着:条款原文本次未取得。** 该制度见于《中华人民共和国民事诉讼法》(尤其是关于起诉状必须记明哪些事项的那一条)以及最高人民法院对它的解释。核验环节无法取得逐字条款原文,因此规则库在 `excerpt` 字段本身写明这一缺口,并把每条规则保持在 `warn` 或 `info`。**待取得原文后,请把每个 `excerpt` 换成真实条款,并把 `kind` 提到 `direct`。**
62
92
  >
63
- > `PL-004` fires only when an amount column is filled, so a claim for a declaration or for a change of legal
64
- > relation is not asked for a performance deadline it does not have. And `PL-007` catches placeholders only:
65
- > a claim that is vague **without** containing `【】` or `待填` will pass, because judging whether a claim is
66
- > stated with the required precision is a legal judgement.
93
+ > `PL-004` 只在金额栏已填写时才触发,因此确认之诉或变更法律关系之诉不会被要求填写它本来就没有的履行期限。而 `PL-007` 只抓占位符:一条措辞含糊、但**不含** `【】` 或 `待填` 的诉请会通过,因为判断诉请是否写到要求的精确程度,属于法律判断。
67
94
 
68
95
  ## Compatibility
69
96
 
@@ -120,6 +147,10 @@ node ../scripts/sync-shared.mjs dsh-pleading-draft
120
147
 
121
148
  第 4 项把 `../_shared` 的共享件同步进 `src/shared/`;每次改动共享件后都要重跑。
122
149
 
150
+ ## PerryLink DSH Plugin Family
151
+
152
+ 完整清单(62 个核查器 + 通用插件)见 [按材料选核查器](https://perrylink.github.io/zh/checkers/choose/);本仓只是其中一个。
153
+
123
154
  ## License
124
155
 
125
156
  [Apache License 2.0](LICENSE) © 2026 dsh-pleading-draft contributors.
package/README.md CHANGED
@@ -2,7 +2,17 @@
2
2
 
3
3
  [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
4
 
5
+ <!-- topblock:v1 -->
6
+ > **What it is** — Pleading element checklist completeness check, one row per claim. It returns a list of what is inconsistent, where, and what to fix.
7
+ > **Who it is for** — lawyers and legal staff; no command line required.
8
+ > **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.
9
+ > **What it does not do** — no compliance verdict, no liability finding, no replacement for the reviewer; differences only.
10
+ > **How to start** — search "Documents and Governance Suite" in WorkBuddy / Coze (this check is one part of it; availability as listed); or:
11
+ > `dsh plugin --profile <name> add dsh-pleading-draft`
12
+ <!-- /topblock:v1 -->
13
+
5
14
  [![DSH Market](https://raw.githubusercontent.com/2BingLing/dsh-market/master/assets/readme/badge-listed-en.svg)](https://dsh.market/)
15
+ [![dshfind](https://dshfind.com/api/badge/PerryLink/dsh-pleading-draft?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-pleading-draft?ref=badge)
6
16
 
7
17
  `dsh-pleading-draft` reads one pleading-element checklist — the case header plus one row per claim, with its `序号`、`诉讼请求`、`事实依据`、`证据`、`法律依据`、`金额`、`期限` 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.
8
18
 
@@ -15,14 +25,47 @@ dsh --profile <name> --dump-config | grep 'dsh-pleading-draft'
15
25
 
16
26
  ## What it looks like
17
27
 
18
- ![Terminal demo of dsh-pleading-draft: real output over its PL-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-hero.png)
28
+ ![Workflow diagram for dsh-pleading-draft: call → plugin → result.](docs/assets/dsh-pleading-draft-flow.svg)
29
+
30
+ *Workflow overview: call → plugin → result. The examples below use the real command surface.*
19
31
 
20
- ![Animated terminal demo of dsh-pleading-draft](https://raw.githubusercontent.com/PerryLink/dsh-pleading-draft/main/docs/assets/dsh-pleading-draft-demo.gif)
21
32
 
22
- Real output from this plugin over its own `PL-001` test fixture — not a mock-up. The rule pack ships no invented quotations: a finding names the clause it applied and whether that excerpt is a verbatim quotation or a derived principle.
23
33
 
24
34
  ## What it answers
25
35
 
36
+ ### Examples
37
+
38
+ The table below is the example set: the first row is the detailed walkthrough, the remaining rows are short cases.
39
+
40
+ #### Detailed output
41
+
42
+ **Tool** `pleading_draft`
43
+
44
+ **Input**
45
+
46
+ ~~~json
47
+ {"caseNo":"(2026)某民初 1234 号","rows":[{"序号":"1","请求要素":"本金给付请求","诉讼请求":"判令被告支付货款本金人民币 1,250,000 元","事实依据":"","证据":"证1、证2、证3"}]}
48
+ ~~~
49
+
50
+ **Output**
51
+
52
+ ~~~json
53
+ {
54
+ "id": "dsh-pleading-draft.PL-001.de09b5a6",
55
+ "ruleId": "PL-001",
56
+ "severity": "warn",
57
+ "locator": {
58
+ "row": 1,
59
+ "field": "fact"
60
+ },
61
+ "found": "第 1 行「fact」为空",
62
+ "expected": "「fact」应填写",
63
+ "fix": "补填事实依据;本条只核对是否写明,不判断事实是否属实"
64
+ }
65
+ ~~~
66
+
67
+ *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`*
68
+
26
69
  | You ask | What it answers |
27
70
  |---|---|
28
71
  | The claim is written out, but the evidence column points at nothing. | `PL-002` reports the row whose `证据` 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. |
@@ -164,6 +207,10 @@ node ../scripts/sync-shared.mjs dsh-pleading-draft # refresh src/shared from .
164
207
  The plugin is **data-only**: `src/model.ts` declares the table shape, the shared kit supplies the reader and
165
208
  the check engine, and the rule pack declares every check.
166
209
 
210
+ ## PerryLink DSH Plugin Family
211
+
212
+ Full family index: [choose a checker by material](https://perrylink.github.io/zh/checkers/choose/) and [all plugins](https://github.com/PerryLink). This repository is one of them.
213
+
167
214
  ## License
168
215
 
169
216
  [Apache License 2.0](LICENSE) © 2026 dsh-pleading-draft contributors.
package/lib/index.d.mts CHANGED
@@ -6,7 +6,7 @@ import { Context } from "@deepseek-ai/cordis";
6
6
  * `cordis.yml` without editing code (the family's "no hard-coded tunables"
7
7
  * redline). The rule pack itself is data as well and can be pointed elsewhere.
8
8
  */
9
- interface Config {
9
+ export interface Config {
10
10
  /** Rule-pack path relative to the plugin package root. */
11
11
  rulesFile: string;
12
12
  /** Rule ids disabled for this deployment. */
@@ -18,13 +18,13 @@ interface Config {
18
18
  /** Tool timeout budget in milliseconds. */
19
19
  timeoutMs: number;
20
20
  }
21
- declare const Config: Schema<Config>;
21
+ export declare const Config: Schema<Config>;
22
22
  //#endregion
23
23
  //#region src/index.d.ts
24
- declare const name = "dsh-pleading-draft";
25
- declare const inject: string[];
24
+ export declare const name = "dsh-pleading-draft";
25
+ export declare const inject: string[];
26
26
  /** Tool id exposed to the model, and the row id in `cordis.patch.yml`. */
27
- declare const TOOL_NAME = "pleading_draft";
27
+ export declare const TOOL_NAME = "pleading_draft";
28
28
  /**
29
29
  * Locate a package-owned file such as the rule pack.
30
30
  *
@@ -36,7 +36,7 @@ declare const TOOL_NAME = "pleading_draft";
36
36
  * @returns the resolved absolute path.
37
37
  * @throws Error naming every location tried, when the file is absent.
38
38
  */
39
- declare function resolvePackageFile(relative: string): string;
39
+ export declare function resolvePackageFile(relative: string): string;
40
40
  /**
41
41
  * Register the checker tool.
42
42
  *
@@ -47,6 +47,5 @@ declare function resolvePackageFile(relative: string): string;
47
47
  * @param ctx - plugin context, with `tools` already available.
48
48
  * @param config - validated configuration.
49
49
  */
50
- declare function apply(ctx: Context, config: Config): () => void;
51
- //#endregion
52
- export { Config, TOOL_NAME, apply, inject, name, resolvePackageFile };
50
+ export declare function apply(ctx: Context, config: Config): () => void;
51
+ //#endregion
package/lib/index.mjs CHANGED
@@ -365,6 +365,10 @@ var Reader = class {
365
365
  if (!isSequenceItem(line.text)) break;
366
366
  this.index += 1;
367
367
  const rest = line.text === "-" ? "" : line.text.slice(2).trim();
368
+ if (rest.startsWith("{") || rest.startsWith("[")) {
369
+ items.push(parseScalar(rest, line.num));
370
+ continue;
371
+ }
368
372
  if ((rest === "" ? -1 : findKeySeparator(rest)) >= 0) {
369
373
  items.push(this.readMapping(indent + 2, {
370
374
  text: rest,
@@ -833,7 +837,7 @@ function optionalNumber(params, key) {
833
837
  function locatorOf(row, field) {
834
838
  const out = {};
835
839
  if (row !== void 0) out.row = row;
836
- if (field !== "") out.field = field;
840
+ if (field !== "") out.column = field;
837
841
  return out;
838
842
  }
839
843
  /**
@@ -1164,7 +1168,7 @@ function sumToConstant(ctx) {
1164
1168
  const total = parsed.reduce((sum, value) => sum + value, 0);
1165
1169
  const gap = Math.abs(total - target);
1166
1170
  if (gap <= tolerance) return;
1167
- ctx.add(locatorOf(void 0, field), `${parsed.length} 行的「${field}」合计 ${Number(total.toFixed(4))},与配置的目标值 ${target} 相差 ${Number(gap.toFixed(4))}`, `「${field}」的合计应为 ${target},允许偏差 ${tolerance}`, str(ctx.params, "fix", "核对是否有行遗漏或数值抄错;本条只做加法核对,不判断设置是否合规"));
1171
+ ctx.add(locatorOf(void 0, field), `${parsed.length} 行的「${field}」合计 ${Number(total.toFixed(4))},与配置的目标值 ${target} 相差 ${Number(gap.toFixed(4))}`, `「${field}」的合计应为 ${target},允许偏差 ${tolerance}`, str(ctx.params, "fix", "核对是否有行遗漏或数值抄错;本条只做加法核对,不评价分值设置本身"));
1168
1172
  }
1169
1173
  /** `countPerGroup` — each group value must appear at least N times. */
1170
1174
  function countPerGroup(ctx) {
@@ -2112,7 +2116,10 @@ function runChecks(input, ruleset, options) {
2112
2116
  const issues = [];
2113
2117
  const reasons = /* @__PURE__ */ new Map();
2114
2118
  const fired = /* @__PURE__ */ new Set();
2119
+ const disabled = /* @__PURE__ */ new Set([...ruleset.disabled, ...options.disabledRules]);
2120
+ const only = new Set(options.onlyRules);
2115
2121
  for (const rule of ruleset.rules) {
2122
+ if (disabled.has(rule.id) || only.size > 0 && !only.has(rule.id)) continue;
2116
2123
  const declaredCheck = typeof rule.params.check === "object" && rule.params.check !== null && !Array.isArray(rule.params.check) ? rule.params.check : {};
2117
2124
  const check = {
2118
2125
  ...rule.params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-pleading-draft",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "起诉状要素齐备性核对(按诉请、事实、证据、法条四要素核对文书齐备,仅提示差异,不作出定性结论)",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",
@@ -78,14 +78,14 @@
78
78
  "@deepseek-ai/schemastery": "^3.18.2"
79
79
  },
80
80
  "devDependencies": {
81
- "@deepseek-ai/cordis": "4.0.5-alpha.1",
81
+ "@deepseek-ai/cordis": "4.0.5",
82
82
  "@deepseek-ai/dsh-package-manifest": "0.2.1-rc.2",
83
83
  "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
84
- "@deepseek-ai/schemastery": "3.18.5-alpha.1",
84
+ "@deepseek-ai/schemastery": "3.18.5",
85
85
  "@types/node": "^22.20.1",
86
86
  "vitest": "^3.2.7",
87
87
  "@deepseek-ai/dsh-working-directory": "0.2.1-rc.2",
88
- "tsdown": "^0.22.14",
88
+ "tsdown": "^0.23.1",
89
89
  "typescript": "^5.9.3"
90
90
  },
91
91
  "dependencies": {}