open-agreements 0.2.2 → 0.3.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.
Files changed (147) hide show
  1. package/README.de.md +371 -0
  2. package/README.es.md +371 -0
  3. package/README.md +30 -0
  4. package/README.pt-br.md +371 -0
  5. package/README.zh.md +371 -0
  6. package/content/templates/closing-checklist/template.docx +0 -0
  7. package/content/templates/common-paper-ai-addendum/README.md +18 -0
  8. package/content/templates/common-paper-ai-addendum/metadata.yaml +136 -0
  9. package/content/templates/common-paper-ai-addendum/replacements.json +5 -0
  10. package/content/templates/common-paper-ai-addendum/selections.json +62 -0
  11. package/content/templates/common-paper-ai-addendum/template.docx +0 -0
  12. package/content/templates/common-paper-ai-addendum-in-app/metadata.yaml +88 -0
  13. package/content/templates/common-paper-ai-addendum-in-app/replacements.json +5 -0
  14. package/content/templates/common-paper-ai-addendum-in-app/selections.json +62 -0
  15. package/content/templates/common-paper-amendment/README.md +18 -0
  16. package/content/templates/common-paper-amendment/metadata.yaml +48 -0
  17. package/content/templates/common-paper-amendment/template.docx +0 -0
  18. package/content/templates/common-paper-business-associate-agreement/README.md +20 -1
  19. package/content/templates/common-paper-business-associate-agreement/metadata.yaml +111 -3
  20. package/content/templates/common-paper-business-associate-agreement/replacements.json +2 -1
  21. package/content/templates/common-paper-business-associate-agreement/selections.json +38 -0
  22. package/content/templates/common-paper-business-associate-agreement/template.docx +0 -0
  23. package/content/templates/common-paper-cloud-service-agreement/README.md +18 -0
  24. package/content/templates/common-paper-cloud-service-agreement/metadata.yaml +48 -0
  25. package/content/templates/common-paper-cloud-service-agreement/template.docx +0 -0
  26. package/content/templates/common-paper-csa-with-ai/README.md +18 -0
  27. package/content/templates/common-paper-csa-with-ai/metadata.yaml +462 -2
  28. package/content/templates/common-paper-csa-with-ai/replacements.json +5 -2
  29. package/content/templates/common-paper-csa-with-ai/selections.json +291 -0
  30. package/content/templates/common-paper-csa-with-ai/template.docx +0 -0
  31. package/content/templates/common-paper-csa-with-sla/README.md +18 -0
  32. package/content/templates/common-paper-csa-with-sla/metadata.yaml +387 -2
  33. package/content/templates/common-paper-csa-with-sla/replacements.json +4 -2
  34. package/content/templates/common-paper-csa-with-sla/selections.json +257 -0
  35. package/content/templates/common-paper-csa-with-sla/template.docx +0 -0
  36. package/content/templates/common-paper-csa-without-sla/README.md +18 -0
  37. package/content/templates/common-paper-csa-without-sla/metadata.yaml +380 -2
  38. package/content/templates/common-paper-csa-without-sla/replacements.json +5 -2
  39. package/content/templates/common-paper-csa-without-sla/selections.json +250 -0
  40. package/content/templates/common-paper-csa-without-sla/template.docx +0 -0
  41. package/content/templates/common-paper-data-processing-agreement/README.md +16 -0
  42. package/content/templates/common-paper-data-processing-agreement/metadata.yaml +397 -3
  43. package/content/templates/common-paper-data-processing-agreement/replacements.json +2 -1
  44. package/content/templates/common-paper-data-processing-agreement/selections.json +211 -0
  45. package/content/templates/common-paper-data-processing-agreement/template.docx +0 -0
  46. package/content/templates/common-paper-design-partner-agreement/README.md +18 -0
  47. package/content/templates/common-paper-design-partner-agreement/metadata.yaml +99 -3
  48. package/content/templates/common-paper-design-partner-agreement/selections.json +27 -0
  49. package/content/templates/common-paper-design-partner-agreement/template.docx +0 -0
  50. package/content/templates/common-paper-independent-contractor-agreement/README.md +18 -0
  51. package/content/templates/common-paper-independent-contractor-agreement/clean.json +8 -0
  52. package/content/templates/common-paper-independent-contractor-agreement/metadata.yaml +52 -0
  53. package/content/templates/common-paper-independent-contractor-agreement/replacements.json +3 -0
  54. package/content/templates/common-paper-independent-contractor-agreement/template.docx +0 -0
  55. package/content/templates/common-paper-letter-of-intent/README.md +18 -0
  56. package/content/templates/common-paper-letter-of-intent/metadata.yaml +48 -0
  57. package/content/templates/common-paper-letter-of-intent/template.docx +0 -0
  58. package/content/templates/common-paper-mutual-nda/README.md +29 -7
  59. package/content/templates/common-paper-mutual-nda/metadata.yaml +48 -0
  60. package/content/templates/common-paper-mutual-nda/template.docx +0 -0
  61. package/content/templates/common-paper-one-way-nda/README.md +13 -0
  62. package/content/templates/common-paper-one-way-nda/metadata.yaml +24 -0
  63. package/content/templates/common-paper-one-way-nda/selections.json +38 -0
  64. package/content/templates/common-paper-one-way-nda/template.docx +0 -0
  65. package/content/templates/common-paper-order-form/README.md +18 -0
  66. package/content/templates/common-paper-order-form/metadata.yaml +115 -3
  67. package/content/templates/common-paper-order-form/replacements.json +5 -2
  68. package/content/templates/common-paper-order-form/selections.json +56 -0
  69. package/content/templates/common-paper-order-form/template.docx +0 -0
  70. package/content/templates/common-paper-order-form-with-sla/README.md +18 -0
  71. package/content/templates/common-paper-order-form-with-sla/metadata.yaml +149 -3
  72. package/content/templates/common-paper-order-form-with-sla/replacements.json +6 -2
  73. package/content/templates/common-paper-order-form-with-sla/selections.json +64 -0
  74. package/content/templates/common-paper-order-form-with-sla/template.docx +0 -0
  75. package/content/templates/common-paper-partnership-agreement/README.md +18 -0
  76. package/content/templates/common-paper-partnership-agreement/metadata.yaml +293 -4
  77. package/content/templates/common-paper-partnership-agreement/replacements.json +5 -2
  78. package/content/templates/common-paper-partnership-agreement/selections.json +138 -0
  79. package/content/templates/common-paper-partnership-agreement/template.docx +0 -0
  80. package/content/templates/common-paper-pilot-agreement/README.md +18 -0
  81. package/content/templates/common-paper-pilot-agreement/metadata.yaml +48 -0
  82. package/content/templates/common-paper-pilot-agreement/template.docx +0 -0
  83. package/content/templates/common-paper-professional-services-agreement/README.md +18 -0
  84. package/content/templates/common-paper-professional-services-agreement/metadata.yaml +338 -4
  85. package/content/templates/common-paper-professional-services-agreement/replacements.json +7 -4
  86. package/content/templates/common-paper-professional-services-agreement/selections.json +207 -0
  87. package/content/templates/common-paper-professional-services-agreement/template.docx +0 -0
  88. package/content/templates/common-paper-statement-of-work/README.md +18 -0
  89. package/content/templates/common-paper-statement-of-work/metadata.yaml +110 -2
  90. package/content/templates/common-paper-statement-of-work/replacements.json +4 -1
  91. package/content/templates/common-paper-statement-of-work/selections.json +55 -0
  92. package/content/templates/common-paper-statement-of-work/template.docx +0 -0
  93. package/content/templates/common-paper-term-sheet/README.md +18 -0
  94. package/content/templates/common-paper-term-sheet/metadata.yaml +48 -0
  95. package/content/templates/common-paper-term-sheet/template.docx +0 -0
  96. package/content/templates/working-group-list/template.docx +0 -0
  97. package/dist/commands/checklist.d.ts.map +1 -1
  98. package/dist/commands/checklist.js +2 -1
  99. package/dist/commands/checklist.js.map +1 -1
  100. package/dist/commands/list.d.ts.map +1 -1
  101. package/dist/commands/list.js +1 -46
  102. package/dist/commands/list.js.map +1 -1
  103. package/dist/core/checklist/format-checklist-docx.d.ts +10 -0
  104. package/dist/core/checklist/format-checklist-docx.d.ts.map +1 -0
  105. package/dist/core/checklist/format-checklist-docx.js +321 -0
  106. package/dist/core/checklist/format-checklist-docx.js.map +1 -0
  107. package/dist/core/checklist/index.d.ts +1 -0
  108. package/dist/core/checklist/index.d.ts.map +1 -1
  109. package/dist/core/checklist/index.js +7 -3
  110. package/dist/core/checklist/index.js.map +1 -1
  111. package/dist/core/engine.d.ts +1 -0
  112. package/dist/core/engine.d.ts.map +1 -1
  113. package/dist/core/engine.js +72 -11
  114. package/dist/core/engine.js.map +1 -1
  115. package/dist/core/selector.d.ts +2 -0
  116. package/dist/core/selector.d.ts.map +1 -1
  117. package/dist/core/selector.js +181 -39
  118. package/dist/core/selector.js.map +1 -1
  119. package/dist/core/template-listing.d.ts +40 -0
  120. package/dist/core/template-listing.d.ts.map +1 -0
  121. package/dist/core/template-listing.js +91 -0
  122. package/dist/core/template-listing.js.map +1 -0
  123. package/dist/core/validation/template.d.ts.map +1 -1
  124. package/dist/core/validation/template.js +10 -2
  125. package/dist/core/validation/template.js.map +1 -1
  126. package/dist/index.d.ts +2 -0
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js +4 -0
  129. package/dist/index.js.map +1 -1
  130. package/package.json +8 -2
  131. package/skills/iso-27001-evidence-collection/CONNECTORS.md +25 -9
  132. package/skills/iso-27001-evidence-collection/SKILL.md +10 -6
  133. package/skills/iso-27001-internal-audit/CONNECTORS.md +25 -9
  134. package/skills/iso-27001-internal-audit/SKILL.md +12 -9
  135. package/skills/soc2-readiness/CONNECTORS.md +25 -9
  136. package/skills/soc2-readiness/SKILL.md +17 -5
  137. package/skills/soc2-readiness/rules/change-vendor-management.md +104 -0
  138. package/skills/soc2-readiness/rules/communication-info.md +85 -0
  139. package/skills/soc2-readiness/rules/control-activities.md +95 -0
  140. package/skills/soc2-readiness/rules/control-environment.md +126 -0
  141. package/skills/soc2-readiness/rules/logical-access.md +264 -0
  142. package/skills/soc2-readiness/rules/monitoring-activities.md +66 -0
  143. package/skills/soc2-readiness/rules/optional-categories.md +264 -0
  144. package/skills/soc2-readiness/rules/privacy-criteria.md +359 -0
  145. package/skills/soc2-readiness/rules/risk-assessment.md +100 -0
  146. package/skills/soc2-readiness/rules/system-operations.md +170 -0
  147. package/skills/soc2-readiness/rules/trust-services.md +0 -230
package/README.zh.md ADDED
@@ -0,0 +1,371 @@
1
+ # OpenAgreements
2
+
3
+ [![npm version](https://img.shields.io/npm/v/open-agreements)](https://www.npmjs.com/package/open-agreements)
4
+ [![npm downloads](https://img.shields.io/npm/dm/open-agreements.svg)](https://npmjs.org/package/open-agreements)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
+ [![Agent Skill](https://img.shields.io/badge/agent--skill-open--agreements-purple)](https://skills.sh)
7
+ [![CI](https://github.com/open-agreements/open-agreements/actions/workflows/ci.yml/badge.svg)](https://github.com/open-agreements/open-agreements/actions/workflows/ci.yml)
8
+ [![MCP Server Status](https://img.shields.io/endpoint?url=https%3A%2F%2Fopenagreements.ai%2Fapi%2Fstatus%3Fformat%3Dshields)](https://openagreements.openstatus.dev/)
9
+ [![codecov](https://img.shields.io/codecov/c/github/open-agreements/open-agreements/main)](https://app.codecov.io/gh/open-agreements/open-agreements)
10
+ [![GitHub stargazers](https://img.shields.io/github/stars/open-agreements/open-agreements?style=social)](https://github.com/open-agreements/open-agreements/stargazers)
11
+ [![Tests: Vitest](https://img.shields.io/badge/tests-vitest-6E9F18)](https://vitest.dev/)
12
+ [![OpenSpec Traceability](https://img.shields.io/badge/openspec-traceability%20gate-brightgreen)](./scripts/validate_openspec_coverage.mjs)
13
+ [![Socket Badge](https://socket.dev/api/badge/npm/package/open-agreements)](https://socket.dev/npm/package/open-agreements)
14
+ [![install size](https://packagephobia.com/badge?p=open-agreements)](https://packagephobia.com/result?p=open-agreements)
15
+
16
+ [English](./README.md) | [Español](./README.es.md) | [简体中文](./README.zh.md) | [Português (Brasil)](./README.pt-br.md) | [Deutsch](./README.de.md)
17
+
18
+ > **翻译说明:** 英文版 `README.md` 是规范的事实来源。此翻译可能会有短暂滞后。英文 README 的重大更新应在 72 小时内同步到本文件。
19
+
20
+ <!-- TODO: Add OpenSSF Scorecard badge once repo is indexed at securityscorecards.dev -->
21
+ <!-- TODO: Add OpenSSF Best Practices badge after registration at bestpractices.dev -->
22
+ <!-- TODO: Re-evaluate Snyk badge — Advisor migrated to security.snyk.io (July 2024) -->
23
+
24
+ <p align="center">
25
+ <img src="docs/assets/demo-fill-nda.gif" alt="Fill a Mutual NDA in Claude Code — prompt, answer questions, get a signed-ready DOCX" width="720">
26
+ </p>
27
+
28
+ > *演示:Claude 在 2 分钟内完成一份 Common Paper 双向 NDA。为简洁起见已加速。*
29
+
30
+ 填写标准法律协议模板并生成可签署的 DOCX 文件。模板涵盖 NDA、云服务条款、雇佣文档、承包商协议、SAFE 以及 NVCA 融资文件。
31
+
32
+ 由 [UseJunior.com](https://usejunior.com) 背后团队构建,已在 Am Law 100 律所中投入生产使用。
33
+
34
+ ## 质量与可信信号
35
+
36
+ - CI 会在 pull request 以及推送到 `main` 时运行。
37
+ - 实时服务健康状态通过 OpenStatus 在 `openagreements.openstatus.dev` 发布。
38
+ - 覆盖率发布到 Codecov,并在 `codecov.yml` 中使用仓库定义的 patch/project 门禁。
39
+ - 当前 JS 测试框架是 Vitest,JUnit 测试结果会上传到 Codecov 进行测试分析。
40
+ - OpenSpec 场景可追溯性通过 `npm run check:spec-coverage` 强制执行。若要导出本地矩阵,请运行 `npm run check:spec-coverage -- --write-matrix integration-tests/OPENSPEC_TRACEABILITY.md`。
41
+ - 配方源漂移 canary(`npm run check:source-drift`)会校验预期源哈希,以及结构化替换/规范化锚点。
42
+ - 假设级回归在 `docs/assumptions.md` 中跟踪,并通过定向回归测试与 CI 门禁进行验证。
43
+ - 基于 LibreOffice 的 DOCX 视觉渲染在 macOS 使用固定构建配置(`config/libreoffice-headless.json`);运行视觉 Allure 证据测试前请先执行 `npm run check:libreoffice`。
44
+ - Maintainer: [Steven Obiajulu](https://www.linkedin.com/in/steven-obiajulu/)(MIT 机械工程背景;哈佛法学院法律训练)。
45
+
46
+ ## 工作方式
47
+
48
+ 1. 第 1 步:选择模板(36 份标准协议)
49
+ 2. 第 2 步:填写你的信息(交互式提示或 MCP)
50
+ 3. 第 3 步:获得专业排版的 DOCX
51
+
52
+ OpenAgreements 支持两种执行模式,信任边界不同:
53
+
54
+ - 托管远程 MCP 连接器(`https://openagreements.ai/api/mcp`),便于在 Claude 中快速配置。
55
+ - 完全本地包执行(`npx`、全局安装或本地 stdio MCP 包),用于本机本地工作流。
56
+
57
+ 没有全局默认模式推荐。请根据文档敏感度、内部策略和工作流速度需求进行选择。参见 `docs/trust-checklist.md` 获取 60 秒数据流概览。
58
+
59
+ ### 快速决策
60
+
61
+ - 如果文档敏感,请使用完全本地包执行。
62
+ - 如果更优先便捷性,请使用托管远程 MCP 连接器。
63
+
64
+ ## 与 Claude Code 一起使用
65
+
66
+ OpenAgreements 可作为 [Claude Code 插件](https://docs.anthropic.com/en/docs/claude-code/plugins) 和 [Agent Skill](https://agentskills.io) 使用。无需预安装,Claude 会通过 `npx` 按需下载并运行 CLI。
67
+
68
+ ### 选项 1:Agent Skill(推荐)
69
+
70
+ ```bash
71
+ npx skills add open-agreements/open-agreements
72
+ ```
73
+
74
+ 然后让 Claude 起草协议:
75
+
76
+ ```
77
+ > Draft an NDA between Acme Corp and Beta Inc
78
+ ```
79
+
80
+ Claude 会发现可用模板、向你提问获取字段值,并生成可签署的 DOCX。
81
+
82
+ ### 选项 2:Gemini CLI 扩展
83
+
84
+ ```bash
85
+ gemini extensions install https://github.com/open-agreements/open-agreements
86
+ ```
87
+
88
+ 然后让 Gemini 起草协议。该扩展提供 MCP 工具、上下文文件和用于模板发现与填写的技能。
89
+
90
+ ### 选项 3:直接配合 Claude Code
91
+
92
+ 如果你有 Node.js >= 20,直接向 Claude 提示:
93
+
94
+ ```
95
+ > Fill the Common Paper mutual NDA for my company
96
+ ```
97
+
98
+ Claude 会运行 `npx -y open-agreements@latest list --json` 来发现模板,然后运行 `npx -y open-agreements@latest fill <template>` 生成输出。零安装。
99
+
100
+ ### 选项 4:CLI
101
+
102
+ ```bash
103
+ # Install globally
104
+ npm install -g open-agreements
105
+
106
+ # List available templates
107
+ open-agreements list
108
+
109
+ # Fill a template
110
+ open-agreements fill common-paper-mutual-nda -d values.json -o my-nda.docx
111
+ ```
112
+
113
+ ### 执行过程
114
+
115
+ 1. Claude 运行 `list --json` 来发现可用模板及其字段
116
+ 2. Claude 询问字段值(按章节分组,每轮最多 4 个问题)
117
+ 3. Claude 运行 `fill <template>` 生成 DOCX,并保留原始格式
118
+ 4. 你审核并签署输出文档
119
+
120
+ ## 与 Cursor 一起使用
121
+
122
+ 本仓库包含带 MCP 接线的 Cursor 插件清单:
123
+
124
+ - Plugin manifest: `.cursor-plugin/plugin.json`
125
+ - MCP config: `mcp.json`
126
+ - Skill: `skills/open-agreements/SKILL.md`
127
+
128
+ `mcp.json` 中的默认 MCP 配置包含:
129
+
130
+ - 托管 OpenAgreements MCP 连接器(`https://openagreements.ai/api/mcp`)
131
+ - 本地 workspace MCP 服务器(`npx -y @open-agreements/contracts-workspace-mcp`)
132
+ - 本地模板起草 MCP 服务器(`npx -y @open-agreements/contract-templates-mcp`)
133
+
134
+ 要将该插件发布到 Cursor Marketplace,请在以下地址提交此仓库:
135
+
136
+ - https://cursor.com/marketplace/publish
137
+
138
+ ## 模板
139
+
140
+ 共 28 个模板,分为三个层级。运行 `open-agreements list` 查看完整清单。
141
+
142
+ | 层级 | 数量 | 来源 | 工作方式 |
143
+ |------|-------|--------|--------------|
144
+ | 内部模板 | 17 | [Common Paper](https://commonpaper.com), [Bonterms](https://bonterms.com), OpenAgreements | 随包发布,CC BY 4.0 |
145
+ | 外部模板 | 4 | [Y Combinator](https://www.ycombinator.com/documents) | 原样 vendor,CC BY-ND 4.0 |
146
+ | Recipes | 7 | [NVCA](https://nvca.org/model-legal-documents/) | 按需下载(不可再分发) |
147
+
148
+ **内部模板**(NDA、云条款、雇佣表单、承包商协议等)采用 CC BY 4.0,我们随包提供带 `{tag}` 占位符的 DOCX。
149
+
150
+ **外部模板**(YC SAFE)采用 CC BY-ND 4.0,我们原样 vendor。填写后的输出是在你机器上的临时衍生结果。
151
+
152
+ **Recipes**(NVCA 融资文件)可自由下载但不可再分发,我们仅提供转换指令,并在运行时从 nvca.org 下载源 DOCX。
153
+
154
+ ### Guidance 提取
155
+
156
+ 源文档包含专家评论,例如脚注、起草说明、`[Comment: ...]` 块,这些内容由领域专家(如证券律师)撰写。配方清理器会移除这些内容以生成可填写文档,也可以将其提取为结构化 JSON:
157
+
158
+ ```bash
159
+ open-agreements recipe clean source.docx -o cleaned.docx \
160
+ --recipe nvca-indemnification-agreement \
161
+ --extract-guidance guidance.json
162
+ ```
163
+
164
+ 这会生成 `guidance.json`,其中包含每条被移除的脚注、评论和起草说明,并按来源类型和文档位置打标。该 guidance 仅为本地产物(不会提交或发布),可供 AI 代理或人工作者在填写表单时参考。格式细节见 [Adding Recipes — Guidance Extraction](docs/adding-recipes.md#guidance-extraction)。
165
+
166
+ **为什么要程序化提取?** 源文档是唯一事实来源。发布方更新后重新提取即可零人工获取最新 guidance,保留领域专家原文,并且覆盖全部内容。AI 可以即时总结,但无法恢复已经丢弃的内容。
167
+
168
+ 每个模板都是自包含目录:
169
+
170
+ ```
171
+ content/templates/<name>/
172
+ ├── template.docx # DOCX with {tag} placeholders
173
+ ├── metadata.yaml # Fields, license, source, attribution
174
+ └── README.md # Template-specific documentation
175
+ ```
176
+
177
+ ## CLI 命令
178
+
179
+ ### `fill <template>`
180
+
181
+ 基于模板渲染已填写 DOCX。
182
+
183
+ ```bash
184
+ # Using a JSON data file
185
+ open-agreements fill common-paper-mutual-nda -d data.json -o output.docx
186
+
187
+ # Using inline --set flags
188
+ open-agreements fill common-paper-mutual-nda --set party_1_name="Acme Corp" --set governing_law="Delaware"
189
+ ```
190
+
191
+ ### `validate [template]`
192
+
193
+ 对单个或全部模板运行验证流水线。
194
+
195
+ ```bash
196
+ open-agreements validate # All templates
197
+ open-agreements validate common-paper-mutual-nda # One template
198
+ ```
199
+
200
+ ### `list`
201
+
202
+ 显示可用模板及许可证信息与字段数量。
203
+
204
+ ```bash
205
+ open-agreements list
206
+
207
+ # Machine-readable JSON output (for agent skills and automation)
208
+ open-agreements list --json
209
+ ```
210
+
211
+ ## Contracts Workspace CLI(独立包)
212
+
213
+ OpenAgreements 现在包含一个用于仓库/workspace 操作的同级包:
214
+
215
+ - Package: `@open-agreements/contracts-workspace`
216
+ - Binary: `open-agreements-workspace`
217
+ - Docs: `docs/contracts-workspace.md`
218
+
219
+ 该包刻意与 `open-agreements` 分离,团队可以选择:
220
+
221
+ - 仅采用模板填写
222
+ - 仅采用 workspace 管理
223
+ - 或两者一起采用
224
+
225
+ workspace 核心能力:
226
+
227
+ - 面向主题的 `init` 规划(建议最小结构,含顶层域)
228
+ - 带 URL + SHA-256 校验的表单目录
229
+ - 通过文件名驱动 `_executed` 状态的 YAML 状态索引与 lint
230
+
231
+ v1 模型仅依赖文件系统,可在本地同步的云盘目录中工作(例如 Google Drive 同步)。无需 Drive API/OAuth 集成。
232
+
233
+ ## 本地 MCP(Workspace 演示)
234
+
235
+ 用于本地连接器演示时,可使用本地 stdio MCP 包:
236
+
237
+ - Package: `@open-agreements/contracts-workspace-mcp`
238
+ - Binary: `open-agreements-workspace-mcp`
239
+ - Docs: `docs/contracts-workspace.md`
240
+
241
+ 快速开始:
242
+
243
+ ```bash
244
+ npm run build:workspace-mcp
245
+ node packages/contracts-workspace-mcp/bin/open-agreements-workspace-mcp.js
246
+ ```
247
+
248
+ ## 本地 MCP(模板起草)
249
+
250
+ 用于本地 Gemini/Cursor 模板起草流程,请使用:
251
+
252
+ - Package: `@open-agreements/contract-templates-mcp`
253
+ - Binary: `open-agreements-contract-templates-mcp`
254
+
255
+ 快速开始:
256
+
257
+ ```bash
258
+ npm run build:contract-templates-mcp
259
+ node packages/contract-templates-mcp/bin/open-agreements-contract-templates-mcp.js
260
+ ```
261
+
262
+ ## 网站(Vercel)
263
+
264
+ 静态营销站点通过 Eleventy 从 `site/` 生成。
265
+
266
+ - Entry points: `site/index.njk`, `site/templates.njk`, `site/template-detail.njk`
267
+ - Styles: `site/styles.css`
268
+ - Demo media: `site/assets/demo-fill-nda.gif`
269
+ - Deployment config: `vercel.json`
270
+ - Discovery outputs (generated during `npm run build:site`): `_site/llms.txt`, `_site/llms-full.txt`, `_site/sitemap.xml`, `_site/robots.txt`
271
+
272
+ 本地预览:
273
+
274
+ ```bash
275
+ npm run build:site
276
+ python3 -m http.server 8080 --directory _site
277
+ ```
278
+
279
+ 然后打开 `http://localhost:8080`。
280
+
281
+ Vercel 部署说明:
282
+
283
+ - 在 Vercel 中导入此仓库
284
+ - 保持项目根目录为仓库根目录
285
+ - 随仓提供的 `vercel.json` 会将 `_site/` 作为静态输出部署
286
+
287
+ ## 可选内容根目录(面向未来)
288
+
289
+ 为了在表单库增长时支持逻辑解耦,`open-agreements` 可以通过以下方式从额外根目录加载内容:
290
+
291
+ - env var: `OPEN_AGREEMENTS_CONTENT_ROOTS`
292
+ - format: 由路径分隔符连接的绝对/相对目录列表(例如 macOS/Linux 上的 `dirA:dirB`)
293
+ - 每个根目录下预期结构:`templates/`、`external/` 和/或 `recipes/`(或嵌套在 `content/` 下)
294
+
295
+ 查找优先级:
296
+
297
+ 1. `OPEN_AGREEMENTS_CONTENT_ROOTS` 中的根目录(按列出顺序)
298
+ 2. 包内自带内容(默认回退)
299
+
300
+ 这既保持默认安装简单,也允许高级用户将大型内容库移出核心包。
301
+
302
+ ## 贡献
303
+
304
+ 参见 [CONTRIBUTING.md](CONTRIBUTING.md) 了解如何添加模板、recipes 及其他改进。
305
+
306
+ - [Adding templates](docs/adding-templates.md)(CC BY 4.0 / CC0 来源)
307
+ - [Adding recipes](docs/adding-recipes.md)(不可再分发来源)
308
+ - [Employment source policy](docs/employment-source-policy.md)(信任与条款分类)
309
+ - [Code of Conduct](CODE_OF_CONDUCT.md)(社区规范与执行)
310
+
311
+ ## 发布
312
+
313
+ 发布通过 GitHub Actions 自动完成,使用 npm 可信发布(OIDC)并启用 provenance。
314
+
315
+ 1. 在根包和可发布 MCP 包中更新版本。
316
+ 2. 提交并打标签后执行 `git push origin main --tags`
317
+ 3. 运行本地 Gemini 扩展门禁(复制/软链接到 `~/.gemini/extensions/open-agreements`,并验证两个本地 MCP 服务器可启动/响应)。
318
+ 4. `Release` workflow 会在标签上运行 build、验证、测试、隔离运行时 smoke 和包检查后发布。
319
+
320
+ workflow 防护规则:
321
+
322
+ - 标签必须与根包和可发布包版本一致
323
+ - 发布提交必须包含在 `origin/main` 中
324
+ - 若任一目标 npm 版本已存在,发布将失败
325
+
326
+ ## 架构
327
+
328
+ - **Language**: TypeScript
329
+ - **DOCX Engine**: [docx-templates](https://www.npmjs.com/package/docx-templates) (MIT)
330
+ - **CLI**: [Commander.js](https://www.npmjs.com/package/commander)
331
+ - **Validation**: [Zod](https://www.npmjs.com/package/zod) schemas
332
+ - **Skill Pattern**: Agent-agnostic `ToolCommandAdapter` interface
333
+
334
+ ```
335
+ content/ # All content directories
336
+ ├── templates/ # Internal templates (CC BY 4.0)
337
+ ├── external/ # External templates (CC BY-ND 4.0)
338
+ └── recipes/ # Recipes (downloaded at runtime)
339
+
340
+ src/ # TypeScript source + collocated unit tests
341
+ ├── cli/ # Commander.js CLI
342
+ ├── commands/ # fill, validate, list, recipe, scan
343
+ ├── core/
344
+ │ ├── engine.ts # docx-templates wrapper
345
+ │ ├── metadata.ts # Zod schemas + loader
346
+ │ ├── recipe/ # Recipe pipeline (clean → patch → fill → verify)
347
+ │ ├── external/ # External template support
348
+ │ ├── validation/ # template, license, output, recipe
349
+ │ └── command-generation/
350
+ │ ├── types.ts # ToolCommandAdapter interface
351
+ │ └── adapters/ # Claude Code adapter
352
+ └── index.ts # Public API
353
+
354
+ integration-tests/ # Integration and end-to-end tests
355
+ ```
356
+
357
+ ## 资源
358
+
359
+ - [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code)
360
+ - [Claude Code Plugins Guide](https://docs.anthropic.com/en/docs/claude-code/plugins)
361
+ - [Agent Skills Specification](https://agentskills.io)
362
+
363
+ ## 许可
364
+
365
+ MIT
366
+
367
+ 模板内容按各自作者授权:CC BY 4.0(Common Paper、Bonterms)、CC BY-ND 4.0(Y Combinator)或专有(NVCA,运行时下载)。详见每个模板的 `metadata.yaml`。
368
+
369
+ ## 免责声明
370
+
371
+ 本工具基于标准模板生成文档,不构成法律建议。与 Common Paper、Bonterms、Y Combinator、NVCA 或任何模板来源不存在附属关系或背书关系。请咨询律师获取法律建议。
@@ -17,6 +17,24 @@ An AI addendum based on [Common Paper's](https://commonpaper.com) standard terms
17
17
  | `ai_policy_reference` | string | no | Reference to AI usage policy |
18
18
  | `additional_terms` | string | no | Additional AI-specific terms |
19
19
 
20
+
21
+ ### Signature Block
22
+
23
+ | Field | Type | Required | Description |
24
+ |-------|------|----------|-------------|
25
+ | `provider_signatory_type` | enum (`entity` / `individual`) | no | Whether the Provider signatory is an entity or individual (default: `entity`) |
26
+ | `provider_signatory_name` | string | no | Full legal name of the Provider's signatory |
27
+ | `provider_signatory_title` | string | no | Title/role of the Provider's signatory (entity only) |
28
+ | `provider_signatory_company` | string | no | Company name for the Provider signatory (entity only) |
29
+ | `provider_signatory_email` | string | no | Notice email address for the Provider |
30
+ | `customer_signatory_type` | enum (`entity` / `individual`) | no | Whether the Customer signatory is an entity or individual (default: `entity`) |
31
+ | `customer_signatory_name` | string | no | Full legal name of the Customer's signatory |
32
+ | `customer_signatory_title` | string | no | Title/role of the Customer's signatory (entity only) |
33
+ | `customer_signatory_company` | string | no | Company name for the Customer signatory (entity only) |
34
+ | `customer_signatory_email` | string | no | Notice email address for the Customer |
35
+
36
+ > **Note:** `*_title` and `*_company` are only rendered when the corresponding `*_type` is `entity` (default). When set to `individual`, those cells are left blank even if values are provided.
37
+
20
38
  ## Attribution
21
39
 
22
40
  Based on the Common Paper AI Addendum, available at https://commonpaper.com.
@@ -26,6 +26,142 @@ fields:
26
26
  type: string
27
27
  description: Additional AI-specific terms
28
28
  section: Legal
29
+ - name: training_data_none
30
+ type: boolean
31
+ description: No Training Data types selected
32
+ section: AI Training
33
+ - name: training_data_usage
34
+ type: boolean
35
+ description: Usage Data is Training Data
36
+ section: AI Training
37
+ - name: training_data_feedback
38
+ type: boolean
39
+ description: Feedback is Training Data
40
+ section: AI Training
41
+ - name: training_data_input
42
+ type: boolean
43
+ description: Input is Training Data
44
+ section: AI Training
45
+ - name: training_data_output
46
+ type: boolean
47
+ description: Output is Training Data
48
+ section: AI Training
49
+ - name: training_data_prompts
50
+ type: boolean
51
+ description: User prompts (excluding other Input) are Training Data
52
+ section: AI Training
53
+ - name: training_data_customer_content
54
+ type: boolean
55
+ description: Customer Content is Training Data
56
+ section: AI Training
57
+ - name: training_data_additional
58
+ type: boolean
59
+ description: Additional Training Data types apply
60
+ section: AI Training
61
+ - name: model_training_none
62
+ type: boolean
63
+ description: No model training permitted
64
+ section: AI Training
65
+ - name: model_training_customer_only
66
+ type: boolean
67
+ description: Model training solely for Customer benefit
68
+ section: AI Training
69
+ - name: training_data_aggregated
70
+ type: boolean
71
+ description: Training Data must be aggregated
72
+ section: AI Training
73
+ - name: training_data_deidentified
74
+ type: boolean
75
+ description: Training Data must be de-identified
76
+ section: AI Training
77
+ - name: training_data_best_effort_deidentify
78
+ type: boolean
79
+ description: Provider will use commercially reasonable efforts to de-identify Training Data
80
+ section: AI Training
81
+ - name: training_requirements_additional
82
+ type: boolean
83
+ description: Additional Training Data requirements apply
84
+ section: AI Training
85
+ - name: no_customer_identification
86
+ type: boolean
87
+ description: Neither Input nor Output may identify Customer
88
+ section: AI Output
89
+ - name: improvements_for_customer_only
90
+ type: boolean
91
+ description: Improvements from Customer data solely for Customer benefit
92
+ section: AI Output
93
+ - name: output_restrictions_additional
94
+ type: boolean
95
+ description: Additional output restrictions apply
96
+ section: AI Output
97
+ - name: ai_provider_covered_claims
98
+ type: boolean
99
+ description: Provider AI-specific Covered Claims apply
100
+ section: AI Liability
101
+ - name: provider_covered_claims_detail
102
+ type: string
103
+ description: Detail of Provider Covered Claims describing Output IP infringement provisions
104
+ section: AI Liability
105
+ - name: provider_covered_claims_exclusions
106
+ type: string
107
+ description: Provider Covered Claims indemnity exclusions (e.g. combined use, Input, breach, modifications)
108
+ section: AI Liability
109
+ - name: customer_covered_claims_detail
110
+ type: string
111
+ description: Detail of Customer Covered Claims describing IP infringement and usage violation provisions
112
+ section: AI Liability
113
+ - name: ai_customer_covered_claims
114
+ type: boolean
115
+ description: Customer AI-specific Covered Claims apply
116
+ section: AI Liability
117
+ - name: provider_signatory_type
118
+ type: enum
119
+ description: Whether the Provider signatory is an entity or individual
120
+ options:
121
+ - entity
122
+ - individual
123
+ default: entity
124
+ section: Signature Block
125
+ - name: provider_signatory_name
126
+ type: string
127
+ description: Full legal name of the Provider's signatory
128
+ section: Signature Block
129
+ - name: provider_signatory_title
130
+ type: string
131
+ description: Title/role of the Provider's signatory (entity only)
132
+ section: Signature Block
133
+ - name: provider_signatory_company
134
+ type: string
135
+ description: Company name for the Provider signatory (entity only)
136
+ section: Signature Block
137
+ - name: provider_signatory_email
138
+ type: string
139
+ description: Notice email address for the Provider
140
+ section: Signature Block
141
+ - name: customer_signatory_type
142
+ type: enum
143
+ description: Whether the Customer signatory is an entity or individual
144
+ options:
145
+ - entity
146
+ - individual
147
+ default: entity
148
+ section: Signature Block
149
+ - name: customer_signatory_name
150
+ type: string
151
+ description: Full legal name of the Customer's signatory
152
+ section: Signature Block
153
+ - name: customer_signatory_title
154
+ type: string
155
+ description: Title/role of the Customer's signatory (entity only)
156
+ section: Signature Block
157
+ - name: customer_signatory_company
158
+ type: string
159
+ description: Company name for the Customer signatory (entity only)
160
+ section: Signature Block
161
+ - name: customer_signatory_email
162
+ type: string
163
+ description: Notice email address for the Customer
164
+ section: Signature Block
29
165
  required_fields:
30
166
  - company_name
31
167
  - agreement_description
@@ -0,0 +1,5 @@
1
+ {
2
+ "[ that the Output—when generated and used by Customer according to the terms of the Agreement and the AI Addendum—violates, misappropriates, or otherwise infringes upon the intellectual property or other proprietary rights of another person or entity. ": "{provider_covered_claims_detail}",
3
+ "Without limiting the indemnity exclusions in the Agreement, Provider's obligations as an Indemnifying Party will not apply to Provider Covered Claims that result from: (a) use of Output in combination with data, software, hardware, equipment, technology, or other products or services not provided by Provider; (b) Input; (c) Customer's use of the AI Services in breach of the Agreement or the AI Addendum; (d) modifications to the Output that were not made by Provider; (e) Output that Customer knew or should have known might violate, misappropriate, or otherwise infringe upon another's intellectual property or other proprietary rights; or (f) a claim that use of Output infringes another's trademark or related rights. ]": "{provider_covered_claims_exclusions}",
4
+ "[ that (1) the Input—when used by Provider according to the terms of the Agreement and the AI Addendum—violates, misappropriates, or otherwise infringes upon the intellectual property or other proprietary rights of another person or entity; or (2) results from Customer's use of the AI Services in violation of the applicable restrictions in the Agreement or the AI Addendum. ]": "{customer_covered_claims_detail}"
5
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "groups": [
3
+ {
4
+ "id": "training_data_types",
5
+ "type": "checkbox",
6
+ "options": [
7
+ { "marker": "None", "trigger": { "field": "training_data_none" } },
8
+ { "marker": "Usage Data", "trigger": { "field": "training_data_usage" } },
9
+ { "marker": "Feedback", "trigger": { "field": "training_data_feedback" } },
10
+ { "marker": "Input", "trigger": { "field": "training_data_input" } },
11
+ { "marker": "Output", "trigger": { "field": "training_data_output" } },
12
+ { "marker": "User prompts, excluding other components of Input", "trigger": { "field": "training_data_prompts" } },
13
+ { "marker": "Customer Content", "trigger": { "field": "training_data_customer_content" } },
14
+ { "marker": "{additional_terms}", "trigger": { "field": "training_data_additional" } }
15
+ ]
16
+ },
17
+ {
18
+ "id": "model_training_scope",
19
+ "type": "radio",
20
+ "options": [
21
+ { "marker": "None", "trigger": { "field": "model_training_none", "equals": true } },
22
+ { "marker": "Train the Model(s) in the AI Services solely for Customer\u2019s benefit", "trigger": { "field": "model_training_customer_only", "equals": true } },
23
+ { "marker": "Train the Model(s) in the AI Services", "trigger": "default" }
24
+ ]
25
+ },
26
+ {
27
+ "id": "training_data_requirements",
28
+ "type": "checkbox",
29
+ "options": [
30
+ { "marker": "Training Data must be aggregated", "trigger": { "field": "training_data_aggregated" } },
31
+ { "marker": "Training Data must be de-identified", "trigger": { "field": "training_data_deidentified" } },
32
+ { "marker": "Provider will use commercially reasonable efforts consistent with industry standard technology to de-identify", "trigger": { "field": "training_data_best_effort_deidentify" } },
33
+ { "marker": "{additional_terms}", "trigger": { "field": "training_requirements_additional" } }
34
+ ]
35
+ },
36
+ {
37
+ "id": "output_restrictions",
38
+ "type": "checkbox",
39
+ "options": [
40
+ { "marker": "Neither Input nor Output may identify Customer", "trigger": { "field": "no_customer_identification" } },
41
+ { "marker": "Improvements based on Customer's Input, Output, or Training Data will be solely for Customer's benefit", "trigger": { "field": "improvements_for_customer_only" } },
42
+ { "marker": "{additional_terms}", "trigger": { "field": "output_restrictions_additional" } }
43
+ ]
44
+ },
45
+ {
46
+ "id": "ai_covered_claims",
47
+ "type": "checkbox",
48
+ "options": [
49
+ { "marker": "Provider Covered Claims include any action", "trigger": { "field": "ai_provider_covered_claims" } },
50
+ { "marker": "Customer Covered Claims include any action", "trigger": { "field": "ai_customer_covered_claims" } }
51
+ ]
52
+ },
53
+ {
54
+ "id": "ai_acceptable_use_policy",
55
+ "type": "checkbox",
56
+ "standalone": true,
57
+ "options": [
58
+ { "marker": "Use of the AI Services is subject to the Acceptable Use Policy", "trigger": { "field": "ai_policy_reference" } }
59
+ ]
60
+ }
61
+ ]
62
+ }