dsh-lawcite-adapter 0.2.9 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.10] - 2026-10-18
4
+
5
+ ### Changed
6
+
7
+ - Move `tsdown` and `typescript` from runtime dependencies to devDependencies; a published checker no longer pulls a build chain into the profile. Same rollout as the 0.2.11 pilot.
8
+
3
9
  ## [0.2.9] - 2026-10-18
4
10
 
5
11
  ### Changed
package/README-es.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # dsh-lawcite-adapter — Verificación de citas de artículos legales y de los elementos del documento jurídico
2
2
 
3
+ [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
+
3
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-lawcite-adapter?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-lawcite-adapter?ref=badge)
4
7
 
5
8
  `dsh-lawcite-adapter` lee un inventario de citas de artículos legales —la cabecera del documento más una fila por cita— y comprueba la verificabilidad y los elementos documentales de ese propio inventario: que cada cita indique la ley y el número de artículo, que el número de artículo siga la forma china, que se haya transcrito el texto citado, que el estado de vigencia provenga de su propio vocabulario, que la cita indique dónde se usa y qué argumenta, que la cabecera del documento declare su título y su tipo, que los números de cita no se repitan y que no sobreviva ningún marcador de plantilla en la columna del texto citado. No verifica que una ley exista, que esté vigente, que no haya sido modificada o derogada, ni que se aplique al caso.
6
9
 
@@ -13,14 +16,47 @@ dsh --profile <name> --dump-config | grep 'dsh-lawcite-adapter'
13
16
 
14
17
  ## Cómo se ve la salida
15
18
 
16
- ![Terminal demo of dsh-lawcite-adapter: real output over its LC-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-hero.png)
19
+ ![Diagrama de flujo de dsh-lawcite-adapter: llamada → plugin → resultado.](docs/assets/dsh-lawcite-adapter-flow.svg)
20
+
21
+ *Resumen del flujo: llamada → plugin → resultado. Los ejemplos siguientes usan la superficie de comandos real.*
17
22
 
18
- ![Animated terminal demo of dsh-lawcite-adapter](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-demo.gif)
19
23
 
20
24
  Salida real de este plugin sobre su propio fixture de prueba `LC-001` — no es un montaje. El paquete de reglas no inventa citas, así que cada hallazgo nombra la cláusula aplicada y advierte que su texto no se obtuvo.
21
25
 
22
26
  ## Qué responde
23
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** `lawcite_adapter`
35
+
36
+ **Entrada**
37
+
38
+ ~~~json
39
+ {"documentTitle":"某某买卖合同纠纷起诉状","documentType":"民事起诉状","rows":[{"法律法规名称":"","条号":"","引用原文":"当事人一方不履行合同义务或者履行合同义务不符合约定的,应当承担继续履行、采取补救措施或者赔偿损失等违约责任。"}]}
40
+ ~~~
41
+
42
+ **Salida**
43
+
44
+ ~~~json
45
+ {
46
+ "id": "dsh-lawcite-adapter.LC-001.de09b5a6",
47
+ "ruleId": "LC-001",
48
+ "severity": "info",
49
+ "locator": {
50
+ "row": 1,
51
+ "field": "lawName"
52
+ },
53
+ "found": "第 1 行 lawName、articleNo 都为空",
54
+ "expected": "lawName、articleNo 至少应填写一项"
55
+ }
56
+ ~~~
57
+
58
+ *Observado en `dsh-lawcite-adapter/tests/fixtures/LC-001/LC-001-unsafe.json`*
59
+
24
60
  | Usted pregunta | Qué responde |
25
61
  |---|---|
26
62
  | Una fila lleva el número de artículo pero deja vacío el nombre de la ley. ¿Se informa? | Sí. `LC-001` exige el nombre de la ley y el número de artículo (`lawName`, `articleNo`) en cada fila e informa de la fila a la que le falta uno de los dos. Comprueba que estén escritos, no que la ley o el artículo existan: no incluye ninguna base de datos normativa ni la consulta. |
@@ -138,6 +174,10 @@ node ../scripts/sync-shared.mjs dsh-lawcite-adapter
138
174
 
139
175
  El último comando copia el kit compartido de `../_shared` a `src/shared/`; vuelva a ejecutarlo tras cada cambio compartido.
140
176
 
177
+ ## PerryLink DSH Plugin Family
178
+
179
+ 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.
180
+
141
181
  ## License
142
182
 
143
183
  [Apache License 2.0](LICENSE) © 2026 dsh-lawcite-adapter contributors.
package/README-hi.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # dsh-lawcite-adapter — विधिक उद्धरण और दस्तावेज़ के तत्वों की जाँच
2
2
 
3
+ [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
+
3
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-lawcite-adapter?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-lawcite-adapter?ref=badge)
4
7
 
5
8
  `dsh-lawcite-adapter` एक विधिक-उद्धरण सूची पढ़ता है — दस्तावेज़ का हेडर और प्रत्येक उद्धरण की एक पंक्ति — और उसी सूची की सत्यापन-योग्यता तथा दस्तावेज़-तत्वों की जाँच करता है: क्या प्रत्येक उद्धरण में विधि का नाम और अनुच्छेद संख्या लिखी है, क्या अनुच्छेद संख्या मानक चीनी रूप में है, क्या उद्धृत पाठ लिखा गया है, क्या प्रभावी-स्थिति आपकी अपनी शब्दावली से ली गई है, क्या उद्धरण में यह लिखा है कि वह कहाँ प्रयुक्त है और क्या तर्क देता है, क्या दस्तावेज़ का हेडर अपना शीर्षक और प्रकार बताता है, क्या उद्धरण संख्याएँ दोहराई नहीं गई हैं, और क्या उद्धृत पाठ के कॉलम में कोई अपूरित प्लेसहोल्डर बचा नहीं है। यह नहीं जाँचता कि कोई विधि वास्तव में मौजूद है, प्रभावी है, संशोधित या निरस्त नहीं हुई, या उस मामले पर लागू होती है।
6
9
 
@@ -13,14 +16,47 @@ dsh --profile <name> --dump-config | grep 'dsh-lawcite-adapter'
13
16
 
14
17
  ## आउटपुट कैसा दिखता है
15
18
 
16
- ![Terminal demo of dsh-lawcite-adapter: real output over its LC-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-hero.png)
19
+ ![dsh-lawcite-adapter कार्यप्रवाह आरेख: कॉल → प्लगइन → परिणाम।](docs/assets/dsh-lawcite-adapter-flow.svg)
20
+
21
+ *कार्यप्रवाह: कॉल → प्लगइन → परिणाम। नीचे के उदाहरण वास्तविक कमांड सतह का उपयोग करते हैं।*
17
22
 
18
- ![Animated terminal demo of dsh-lawcite-adapter](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-demo.gif)
19
23
 
20
24
  इस प्लगइन का अपने ही `LC-001` टेस्ट फ़िक्स्चर पर वास्तविक आउटपुट — कोई नकली चित्र नहीं। नियम-पैक उद्धरण नहीं गढ़ता, इसलिए हर निष्कर्ष लागू किए गए खंड का नाम और यह भी बताता है कि उसका मूल पाठ इस बार प्राप्त नहीं हुआ।
21
25
 
22
26
  ## यह किन सवालों का जवाब देता है
23
27
 
28
+ ### उदाहरण
29
+
30
+ नीचे दी गई तालिका उदाहरण-समुच्चय है: पहली पंक्ति विस्तृत केस है, बाकी संक्षिप्त केस हैं।
31
+
32
+ #### विस्तृत आउटपुट
33
+
34
+ **उपकरण** `lawcite_adapter`
35
+
36
+ **इनपुट**
37
+
38
+ ~~~json
39
+ {"documentTitle":"某某买卖合同纠纷起诉状","documentType":"民事起诉状","rows":[{"法律法规名称":"","条号":"","引用原文":"当事人一方不履行合同义务或者履行合同义务不符合约定的,应当承担继续履行、采取补救措施或者赔偿损失等违约责任。"}]}
40
+ ~~~
41
+
42
+ **आउटपुट**
43
+
44
+ ~~~json
45
+ {
46
+ "id": "dsh-lawcite-adapter.LC-001.de09b5a6",
47
+ "ruleId": "LC-001",
48
+ "severity": "info",
49
+ "locator": {
50
+ "row": 1,
51
+ "field": "lawName"
52
+ },
53
+ "found": "第 1 行 lawName、articleNo 都为空",
54
+ "expected": "lawName、articleNo 至少应填写一项"
55
+ }
56
+ ~~~
57
+
58
+ *स्रोत `dsh-lawcite-adapter/tests/fixtures/LC-001/LC-001-unsafe.json`*
59
+
24
60
  | आपका सवाल | इसका जवाब |
25
61
  |---|---|
26
62
  | एक पंक्ति में अनुच्छेद संख्या दर्ज है, पर विधि का नाम खाली है। क्या यह दर्ज होता है? | हाँ। `LC-001` हर पंक्ति में विधि का नाम और अनुच्छेद संख्या (`lawName`, `articleNo`) अपेक्षित करता है और जिस पंक्ति में इनमें से एक भी न हो उसे दर्ज करता है। यह देखता है कि ये लिखे गए हैं, यह नहीं कि विधि या अनुच्छेद मौजूद है: इसमें कोई विधि-कोश नहीं है और वह उसे खोजता भी नहीं। |
@@ -138,6 +174,10 @@ node ../scripts/sync-shared.mjs dsh-lawcite-adapter
138
174
 
139
175
  अंतिम कमांड `../_shared` का साझा किट `src/shared/` में कॉपी करता है; हर साझा बदलाव के बाद इसे दोबारा चलाएँ।
140
176
 
177
+ ## PerryLink DSH Plugin Family
178
+
179
+ 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.
180
+
141
181
  ## License
142
182
 
143
183
  [Apache License 2.0](LICENSE) © 2026 dsh-lawcite-adapter contributors.
package/README-pt.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # dsh-lawcite-adapter — Verificação de citações de artigos legais e dos elementos do documento jurídico
2
2
 
3
+ [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
+
3
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-lawcite-adapter?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-lawcite-adapter?ref=badge)
4
7
 
5
8
  `dsh-lawcite-adapter` lê um inventário de citações de artigos legais —o cabeçalho do documento mais uma linha por citação— e verifica a verificabilidade e os elementos documentais desse próprio inventário: se cada citação indica a lei e o número do artigo, se o número do artigo segue a forma chinesa, se o texto citado foi transcrito, se a situação de vigência vem do seu próprio vocabulário, se a citação indica onde é usada e o que argumenta, se o cabeçalho do documento declara o título e o tipo, se os números de citação não se repetem e se não resta nenhum marcador de modelo na coluna do texto citado. Não verifica se uma lei existe, se está em vigor, se não foi alterada ou revogada, nem se se aplica ao caso.
6
9
 
@@ -13,14 +16,47 @@ dsh --profile <name> --dump-config | grep 'dsh-lawcite-adapter'
13
16
 
14
17
  ## Como é a saída
15
18
 
16
- ![Terminal demo of dsh-lawcite-adapter: real output over its LC-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-hero.png)
19
+ ![Diagrama de fluxo de dsh-lawcite-adapter: chamada → plugin → resultado.](docs/assets/dsh-lawcite-adapter-flow.svg)
20
+
21
+ *Visão geral do fluxo: chamada → plugin → resultado. Os exemplos abaixo usam a superfície real de comandos.*
17
22
 
18
- ![Animated terminal demo of dsh-lawcite-adapter](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-demo.gif)
19
23
 
20
24
  Saída real deste plugin sobre o seu próprio fixture de teste `LC-001` — não é uma simulação. O pacote de regras não inventa citações, por isso cada achado nomeia a cláusula aplicada e avisa que o seu texto não foi obtido.
21
25
 
22
26
  ## O que ele responde
23
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** `lawcite_adapter`
35
+
36
+ **Entrada**
37
+
38
+ ~~~json
39
+ {"documentTitle":"某某买卖合同纠纷起诉状","documentType":"民事起诉状","rows":[{"法律法规名称":"","条号":"","引用原文":"当事人一方不履行合同义务或者履行合同义务不符合约定的,应当承担继续履行、采取补救措施或者赔偿损失等违约责任。"}]}
40
+ ~~~
41
+
42
+ **Saída**
43
+
44
+ ~~~json
45
+ {
46
+ "id": "dsh-lawcite-adapter.LC-001.de09b5a6",
47
+ "ruleId": "LC-001",
48
+ "severity": "info",
49
+ "locator": {
50
+ "row": 1,
51
+ "field": "lawName"
52
+ },
53
+ "found": "第 1 行 lawName、articleNo 都为空",
54
+ "expected": "lawName、articleNo 至少应填写一项"
55
+ }
56
+ ~~~
57
+
58
+ *Observado em `dsh-lawcite-adapter/tests/fixtures/LC-001/LC-001-unsafe.json`*
59
+
24
60
  | Você pergunta | O que ele responde |
25
61
  |---|---|
26
62
  | Uma linha traz o número do artigo, mas o nome da lei está em branco. Isso é reportado? | Sim. `LC-001` exige o nome da lei e o número do artigo (`lawName`, `articleNo`) em cada linha e reporta a linha à qual falta um dos dois. Verifica que estejam escritos, não que a lei ou o artigo exista: não inclui nenhuma base de dados normativa nem a consulta. |
@@ -138,6 +174,10 @@ node ../scripts/sync-shared.mjs dsh-lawcite-adapter
138
174
 
139
175
  O último comando copia o kit compartilhado de `../_shared` para `src/shared/`; execute-o novamente após cada alteração compartilhada.
140
176
 
177
+ ## PerryLink DSH Plugin Family
178
+
179
+ 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.
180
+
141
181
  ## License
142
182
 
143
183
  [Apache License 2.0](LICENSE) © 2026 dsh-lawcite-adapter contributors.
package/README-zh.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # dsh-lawcite-adapter — 法条引用与文书要素核对
2
2
 
3
+ [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
+
5
+ <!-- topblock:v1 -->
6
+ > **这是什么** 法条引用与文书要素核对。输出一份「哪一行、哪一栏、差什么」的清单。
7
+ > **给谁用** 律师、法务、文书起草人;不用懂命令行。
8
+ > **你交什么** 这项核对用到的原始材料(表格、清单或文书);不改原件。Excel 可先转成 JSON/YAML,对话里也能代转。
9
+ > **它不做什么** 不判合规、不认定责任、不替代审核人;只列材料内部能逐条指认的差异。
10
+ > **怎么开始** 在 WorkBuddy / 扣子搜「文书与治理核对包」(本检查是其中一项;上架以商城为准);或命令行:
11
+ > `dsh plugin --profile <name> add dsh-lawcite-adapter`
12
+ <!-- /topblock:v1 -->
13
+
3
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-lawcite-adapter?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-lawcite-adapter?ref=badge)
4
16
 
5
17
  `dsh-lawcite-adapter` 读取一份法条引用清单——表头加每处引用一行——核对这份清单自身的可核验性与文书要素:每处引用是否写明法律名称与条号、条号是否写成规范的中文形式、是否抄录了引用原文、效力状态是否取自本机构配置的取值、是否写明引用位置与论证作用、文书表头是否声明标题与文书类型、引用编号是否重复、引用原文栏是否残留未替换的占位符。它不核验法条是否真实存在、是否现行有效、是否已被修订或废止、是否适用于本案。
6
18
 
@@ -13,14 +25,47 @@ dsh --profile <name> --dump-config | grep 'dsh-lawcite-adapter'
13
25
 
14
26
  ## 实际输出长什么样
15
27
 
16
- ![Terminal demo of dsh-lawcite-adapter: real output over its LC-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-hero.png)
28
+ ![dsh-lawcite-adapter 工作流图:调用 → 插件 → 结果。](docs/assets/dsh-lawcite-adapter-flow.svg)
29
+
30
+ *工作流概览:调用 → 插件 → 结果。下面的示例使用实际命令面。*
17
31
 
18
- ![Animated terminal demo of dsh-lawcite-adapter](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-demo.gif)
19
32
 
20
33
  本插件对自己 `LC-001` 测试夹具的**真实输出**,不是示意图。规则库不伪造引文,因此每条发现都会同时写明所引条款,以及该条款原文本次未取得。
21
34
 
22
35
  ## 它回答什么问题
23
36
 
37
+ ### 示例
38
+
39
+ 下表是示例集:第一行是详细走查,其余行是简短案例。
40
+
41
+ #### 详细输出
42
+
43
+ **工具** `lawcite_adapter`
44
+
45
+ **输入**
46
+
47
+ ~~~json
48
+ {"documentTitle":"某某买卖合同纠纷起诉状","documentType":"民事起诉状","rows":[{"法律法规名称":"","条号":"","引用原文":"当事人一方不履行合同义务或者履行合同义务不符合约定的,应当承担继续履行、采取补救措施或者赔偿损失等违约责任。"}]}
49
+ ~~~
50
+
51
+ **输出**
52
+
53
+ ~~~json
54
+ {
55
+ "id": "dsh-lawcite-adapter.LC-001.de09b5a6",
56
+ "ruleId": "LC-001",
57
+ "severity": "info",
58
+ "locator": {
59
+ "row": 1,
60
+ "field": "lawName"
61
+ },
62
+ "found": "第 1 行 lawName、articleNo 都为空",
63
+ "expected": "lawName、articleNo 至少应填写一项"
64
+ }
65
+ ~~~
66
+
67
+ *来源 `dsh-lawcite-adapter/tests/fixtures/LC-001/LC-001-unsafe.json`*
68
+
24
69
  | 你会问 | 它怎么答 |
25
70
  |---|---|
26
71
  | 某处引用填了条号,法律名称栏却是空的,会被报出吗? | 会。`LC-001` 要求每处引用都写明法律名称与条号(`lawName`、`articleNo`),缺其一即报出该行。它只核对是否写明,不核验该法律或该条号是否存在——本插件不含法规库,也不查询法规库。 |
@@ -38,50 +83,21 @@ dsh --profile <name> --dump-config | grep 'dsh-lawcite-adapter'
38
83
  | 本机构法律文书审查口径(本机构配置)—— 原挂《党政机关公文格式》GB/T 9704—2012,已核实为版式标准 | GB/T 9704—2012(本次未取得条文) | LC-002, LC-003, LC-005, LC-006, LC-007, LC-008 |
39
84
  | 本机构法律文书审查办法(本机构配置) | 无统一标准(本条依据为本机构配置的效力口径) | LC-004 |
40
85
 
41
- **Boundary:** this plugin checks a **法条引用清单** for verifiability and document elements — that each citation
42
- names its law and article, that the article number follows the Chinese form, that a direct quotation is
43
- transcribed, that the power status comes from your vocabulary, that the citation states where it is used and what
44
- it argues, that the document names its title and type, that citation numbers are unique, and that no placeholder
45
- survives. It does **not** verify that a statute exists, that it is currently in force, that it has not been amended
46
- or repealed, or that it applies to the case.
86
+ **边界(中文译文,以英文原文为准):** 本插件核对一份**法条引用清单**的可核验性与文书要素——每条引用是否写明所引法律与条号,条号是否符合中文写法,直接引文是否照录,效力状态是否取自你的取值口径,引用是否写明其使用位置与所主张的内容,文书是否写明标题与文种,引用编号是否唯一,以及是否残留占位符。它**不**核实某部法律是否存在、当前是否有效、是否未经修改或废止,也不核实其是否适用于本案。
47
87
 
48
- > ### ⚠️ This plugin does not query a statute database — and that is the point
88
+ > ### ⚠️ 本插件不查询法规数据库——而这正是重点(以英文原文为准)
49
89
  >
50
- > **It cannot find the most consequential error: a citation to a statute or article that does not exist, or that
51
- > has been repealed.** Confirming that requires the national laws-and-regulations database and the facts of the
52
- > case, which is a legal professional's work. What this plugin checks is whether a citation left behind the
53
- > elements needed to verify it — the law, the article, the quoted text, the power status, the purpose.
90
+ > **它无法发现后果最严重的错误:引用了不存在的、或已被废止的法律或条款。** 确认这一点需要国家法律法规数据库和案件事实,那是法律专业人员的工作。本插件核对的是:一处引注是否遗漏了核验它所需的要素——法律、条款、引文、效力状态和用途。
54
91
  >
55
- > That boundary is stated in the pack's header, in `LC-001`'s, `LC-003`'s and `LC-004`'s notes, and in the
56
- > troubleshooting section. Read it before acting on any finding: **a clean report from this plugin is not a
57
- > statement that the citations are correct.**
92
+ > 这条边界写在规则库库头、`LC-001`、`LC-003` 和 `LC-004` 的说明以及排障一节中。在依据任何发现采取行动之前,请先读它:**本插件给出的一份干净报告,并不等于这些引注就是正确的。**
58
93
  >
59
- > `LC-002` checks the article number's *form* — `第X条` in Chinese or Arabic numerals, allowing `第X条之一` —
60
- > and nothing about whether the article exists. `LC-003` checks that a quotation is transcribed, not that the
61
- > transcription matches the statute. `LC-004`'s power-status vocabulary ships **empty** because no statute's
62
- > current status is built in either.
94
+ > `LC-002` 核对条款编号的*形式*——中文数字或阿拉伯数字的 `第X条`,允许 `第X条之一`——完全不涉及该条款是否存在。`LC-003` 核对的是引文已逐字录入,而不是录入内容与法规一致。`LC-004` 的效力状态词表出厂为**空**,因为任何法规的现行状态同样没有内置。
63
95
  >
64
- > **Every `excerpt` in the rule pack says, in so many words, that the clause text was not obtained.** The regime
65
- > lives in 《中华人民共和国立法法》, GB/T 9704—2012 and each institution's legal-document review rules. The
66
- > verification pass could not retrieve verbatim clause text, so the pack states the gap in the `excerpt` field
67
- > itself and keeps every rule at `warn` or `info`. **When the texts are in hand, replace each `excerpt` with the
68
- > real clause and raise `kind` to `direct`.**
96
+ > **规则库中的每一个 `excerpt` 都明文写着:条款原文本次未取得。** 该制度见于《中华人民共和国立法法》、GB/T 9704—2012 以及各机构自己的法律文件审核规则。核验环节无法取得逐字条款原文,因此规则库在 `excerpt` 字段本身写明这一缺口,并把每条规则保持在 `warn` 或 `info`。**待取得原文后,请把每个 `excerpt` 换成真实条款,并把 `kind` 提到 `direct`。**
69
97
  >
70
- > ⚠️ **One basis was corrected rather than completed.** GB/T 9704—2012《党政机关公文格式》 was verified chapter by
71
- > chapter to be a **layout** standard — paper, typesetting, binding, the placement of document elements and the
72
- > specimen forms. **It contains no provision about citation management at all.** Six rules had been hung on it
73
- > anyway ("every citation must name the instrument and the article", "a direct quotation must be transcribed",
74
- > and so on). Those six now declare **the institution's own legal-document review practice** as their basis, are
75
- > rated **`institutional-configuration`**, and therefore sit at **`info`** rather than `warn`. Leaving them at
76
- > `warn` while their own note says "read this as the institution's practice" would have contradicted itself.
98
+ > ⚠️ **有一项依据是被更正了,而不是被补全了。** 经逐章核验,GB/T 9704—2012《党政机关公文格式》是一部**版面**标准——纸张、排版、装订、公文要素的位置以及式样。**它完全不包含任何关于引注管理的规定。** 但此前仍有六条规则挂在它名下(「每处引注都必须写明文件与条款」「直接引用必须逐字录入」等等)。这六条规则现在改以**机构自身的法律文件审核实践**为依据,评为 **`institutional-configuration`**,因此定在 **`info`** 而不是 `warn`。如果一边把它们留在 `warn`,一边又在它们自己的说明里写着「请按机构实践来读」,那就自相矛盾了。
77
99
  >
78
- > **`LC-001` was then corrected the same way.** It cited 《中华人民共和国立法法》. That statute was obtained in
79
- > full and does contain a numbering provision — 第六十五条: 「法律根据内容需要,可以分编、章、节、条、款、项、目」,with
80
- > numbering rules and an authorisation for the NPC Standing Committee's working body to draft legislative
81
- > technique rules. But that governs **how a law is itself drafted and numbered**; it says nothing about how an
82
- > official document cites an existing law. So `LC-001` joins the other seven: **all eight rules in this pack now
83
- > declare the institution's own review practice as their basis and are rated `institutional-configuration` at
84
- > `info`.** See `rules/evidence/clause-verification-basis-mismatch.md`.
100
+ > **随后 `LC-001` 也以同样的方式被更正。** 它原本引用《中华人民共和国立法法》。该法已完整取得,其中确实有一条关于编号的规定——第六十五条:「法律根据内容需要,可以分编、章、节、条、款、项、目」,并附有编号规则,以及授权全国人大常委会工作机构拟订立法技术规范的规定。但该条规范的是**法律本身如何起草和编号**;它完全没有说明一份公文应当如何引用一部现行法律。因此 `LC-001` 加入了另外七条的行列:**本规则库中的全部八条规则现在都以机构自身的审核实践为依据,并评为 `institutional-configuration`,定在 `info`。** 参见 `rules/evidence/clause-verification-basis-mismatch.md`。
85
101
 
86
102
  ## Compatibility
87
103
 
@@ -138,6 +154,10 @@ node ../scripts/sync-shared.mjs dsh-lawcite-adapter
138
154
 
139
155
  第 4 项把 `../_shared` 的共享件同步进 `src/shared/`;每次改动共享件后都要重跑。
140
156
 
157
+ ## PerryLink DSH Plugin Family
158
+
159
+ 完整清单(62 个核查器 + 通用插件)见 [按材料选核查器](https://perrylink.github.io/zh/checkers/choose/);本仓只是其中一个。
160
+
141
161
  ## License
142
162
 
143
163
  [Apache License 2.0](LICENSE) © 2026 dsh-lawcite-adapter contributors.
package/README.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # dsh-lawcite-adapter — Statute citation and legal document element check
2
2
 
3
+ [English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
4
+
5
+ <!-- topblock:v1 -->
6
+ > **What it is** — Statute citation and legal document element check. It returns a list of what is inconsistent, where, and what to fix.
7
+ > **Who it is for** — lawyers and legal drafters; 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-lawcite-adapter`
12
+ <!-- /topblock:v1 -->
13
+
3
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-lawcite-adapter?metric=downloads)](https://dshfind.com/en/plugins/PerryLink/dsh-lawcite-adapter?ref=badge)
4
16
 
5
17
  `dsh-lawcite-adapter` reads one statute-citation inventory — the document header plus one row per citation — and checks that inventory's own verifiability and document elements: that each citation states its law and article number, that the article number follows the Chinese form, that a direct quotation has been transcribed into the quotation column, that the power status comes from your own vocabulary, that the citation states where it is used and what it argues, that the document header names its title and type, that citation numbers are not repeated, and that no unreplaced placeholder survives in the quotation column. It does not verify that a statute exists, that it is currently in force, that it has not been amended or repealed, or that it applies to the case.
6
18
 
@@ -13,14 +25,46 @@ dsh --profile <name> --dump-config | grep 'dsh-lawcite-adapter'
13
25
 
14
26
  ## What it looks like
15
27
 
16
- ![Terminal demo of dsh-lawcite-adapter: real output over its LC-001 fixture](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-hero.png)
28
+ ![Workflow diagram for dsh-lawcite-adapter: call → plugin → result.](docs/assets/dsh-lawcite-adapter-flow.svg)
29
+
30
+ *Workflow overview: call → plugin → result. The examples below use the real command surface.*
17
31
 
18
- ![Animated terminal demo of dsh-lawcite-adapter](https://raw.githubusercontent.com/PerryLink/dsh-lawcite-adapter/main/docs/assets/dsh-lawcite-adapter-demo.gif)
19
32
 
20
- Real output from this plugin over its own `LC-001` test fixture — not a mock-up. The rule pack ships no invented quotations, so a finding names both the clause it applied and the fact that the clause text was not obtained.
21
33
 
22
34
  ## What it answers
23
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** `lawcite_adapter`
43
+
44
+ **Input**
45
+
46
+ ~~~json
47
+ {"documentTitle":"某某买卖合同纠纷起诉状","documentType":"民事起诉状","rows":[{"法律法规名称":"","条号":"","引用原文":"当事人一方不履行合同义务或者履行合同义务不符合约定的,应当承担继续履行、采取补救措施或者赔偿损失等违约责任。"}]}
48
+ ~~~
49
+
50
+ **Output**
51
+
52
+ ~~~json
53
+ {
54
+ "id": "dsh-lawcite-adapter.LC-001.de09b5a6",
55
+ "ruleId": "LC-001",
56
+ "severity": "info",
57
+ "locator": {
58
+ "row": 1,
59
+ "field": "lawName"
60
+ },
61
+ "found": "第 1 行 lawName、articleNo 都为空",
62
+ "expected": "lawName、articleNo 至少应填写一项"
63
+ }
64
+ ~~~
65
+
66
+ *Observed from `dsh-lawcite-adapter/tests/fixtures/LC-001/LC-001-unsafe.json`*
67
+
24
68
  | You ask | What it answers |
25
69
  |---|---|
26
70
  | A citation row carries an article number but the law name is blank. Is that reported? | Yes. `LC-001` requires the law name and the article number (`lawName`, `articleNo`) on every row and reports the row that leaves either one blank. It checks that they are written, not that the statute or the article exists: it holds no statute database and does not query one. |
@@ -188,6 +232,10 @@ node ../scripts/sync-shared.mjs dsh-lawcite-adapter # refresh src/shared from
188
232
  The plugin is **data-only**: `src/model.ts` declares the table shape, the shared kit supplies the reader and the
189
233
  check engine, and the rule pack declares every check.
190
234
 
235
+ ## PerryLink DSH Plugin Family
236
+
237
+ 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.
238
+
191
239
  ## License
192
240
 
193
241
  [Apache License 2.0](LICENSE) © 2026 dsh-lawcite-adapter 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-lawcite-adapter";
25
- declare const inject: string[];
24
+ export declare const name = "dsh-lawcite-adapter";
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 = "lawcite_adapter";
27
+ export declare const TOOL_NAME = "lawcite_adapter";
28
28
  /**
29
29
  * Locate a package-owned file such as the rule pack.
30
30
  *
@@ -36,7 +36,7 @@ declare const TOOL_NAME = "lawcite_adapter";
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-lawcite-adapter",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "法条引用与文书要素核对(按名称、条号、原文与效力状态核对引用可核验性,仅提示差异,不作出定性结论)",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",
@@ -77,16 +77,15 @@
77
77
  "@deepseek-ai/schemastery": "^3.18.2"
78
78
  },
79
79
  "devDependencies": {
80
- "@deepseek-ai/cordis": "4.0.5-alpha.1",
80
+ "@deepseek-ai/cordis": "4.0.5",
81
81
  "@deepseek-ai/dsh-package-manifest": "0.2.1-rc.2",
82
82
  "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
83
- "@deepseek-ai/schemastery": "3.18.5-alpha.1",
83
+ "@deepseek-ai/schemastery": "3.18.5",
84
84
  "@types/node": "^22.20.1",
85
85
  "vitest": "^3.2.7",
86
- "@deepseek-ai/dsh-working-directory": "0.2.1-rc.2"
87
- },
88
- "dependencies": {
89
- "tsdown": "^0.22.14",
86
+ "@deepseek-ai/dsh-working-directory": "0.2.1-rc.2",
87
+ "tsdown": "^0.23.1",
90
88
  "typescript": "^5.9.3"
91
- }
89
+ },
90
+ "dependencies": {}
92
91
  }