opennori 0.1.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.
@@ -0,0 +1,298 @@
1
+ {
2
+ "goal_id": "opennori-self",
3
+ "goal": "让 OpenNori 成为人类用户可验收、agent 可执行、跨会话可恢复的验收驱动协议;用户通过真实工具判断目标是否达成,而不是追踪过程计划。",
4
+ "acceptance_basis": {
5
+ "status": "approved",
6
+ "summary": "User agreed to the layered OpenNori self acceptance criteria."
7
+ },
8
+ "criteria": [
9
+ {
10
+ "id": "AC-P-1",
11
+ "layer": "protocol",
12
+ "user_story": "作为用户,我在编辑器或文件浏览器里打开 active Nori Contract 后,能在 60 秒内看懂目标、分层验收标准、每条状态和当前缺口。",
13
+ "measurement": "打开 .opennori/active/<goal>.acceptance.md 并阅读。",
14
+ "threshold": "不读聊天历史、不读实现说明,60 秒内能判断任务在验收层面的状态和下一条缺口。",
15
+ "risk": "medium"
16
+ },
17
+ {
18
+ "id": "AC-P-2",
19
+ "layer": "protocol",
20
+ "user_story": "作为用户,我运行 nori check 后,能知道验收标准是否仍然是用户视角,而不是技术实现清单。",
21
+ "measurement": "对当前 active goal 或故意写坏的验收草案运行 nori check。",
22
+ "threshold": "“存在文件、字段、命令、测试通过、实现某模块”这类内容不能作为用户验收标准通过校验。",
23
+ "risk": "medium"
24
+ },
25
+ {
26
+ "id": "AC-P-3",
27
+ "layer": "protocol",
28
+ "user_story": "作为用户,我运行 nori next 或 nori status 后,看到的是当前验收缺口和完成判断,而不是任务步骤列表。",
29
+ "measurement": "运行 nori next/status 并查看返回的 current_gap、completion 和 intervention。",
30
+ "threshold": "输出默认回答“当前差哪条 AC、是否完成、是否需要人类动作”,不把过程任务当作主线。",
31
+ "risk": "medium"
32
+ },
33
+ {
34
+ "id": "AC-P-4",
35
+ "layer": "protocol",
36
+ "user_story": "作为用户,我查看高风险 AC 的状态时,能看到弱证据不能让它变成 passing。",
37
+ "measurement": "给 high risk AC 添加弱 passing 证据,再查看 status 或 report。",
38
+ "threshold": "高风险 passing 不能只由 agent 自我总结证明;缺少强证据时必须保持 failing、unknown 或 blocked。",
39
+ "risk": "high"
40
+ },
41
+ {
42
+ "id": "AC-P-5",
43
+ "layer": "protocol",
44
+ "user_story": "作为用户,我运行 nori report 后,能看到目标、分层 AC 状态、证据摘要、当前缺口、是否需要我介入和结论。",
45
+ "measurement": "运行 nori report 或让 Codex 生成 OpenNori 报告。",
46
+ "threshold": "报告默认围绕验收状态和证据组织,不把过程任务当作主线。",
47
+ "risk": "medium"
48
+ },
49
+ {
50
+ "id": "AC-P-6",
51
+ "layer": "protocol",
52
+ "user_story": "作为用户,我查看 OpenNori 报告时,能知道每条通过、阻塞或豁免的 AC 是基于什么证据判断的。",
53
+ "measurement": "给 AC 添加不同来源的证据后运行 nori report 或 nori status。",
54
+ "threshold": "报告或状态输出展示证据摘要、判断基础、证据强度和剩余限制;不会只显示 agent 自我结论。",
55
+ "risk": "high"
56
+ },
57
+ {
58
+ "id": "AC-P-7",
59
+ "layer": "protocol",
60
+ "user_story": "作为用户,我不需要限制 agent 使用哪种取证工具,但我能复查 agent 引用的证据来源。",
61
+ "measurement": "让 agent 用任意验证方式完成一条 AC,并查看该 AC 的证据来源。",
62
+ "threshold": "证据来源可以是命令、产物、URL、截图、diff、人类确认或其他引用;每个来源都包含用户可理解的 label 或复查线索。",
63
+ "risk": "high"
64
+ },
65
+ {
66
+ "id": "AC-P-8",
67
+ "layer": "protocol",
68
+ "user_story": "作为用户,我能区分证据是来自工具观察、人类确认、产物审查、协议校验,还是 agent 的判断。",
69
+ "measurement": "给不同 basis 的证据运行 status/report。",
70
+ "threshold": "输出明确展示证据 basis;agent 判断可以记录,但不会伪装成工具验证或人类确认。",
71
+ "risk": "high"
72
+ },
73
+ {
74
+ "id": "AC-P-9",
75
+ "layer": "protocol",
76
+ "user_story": "作为用户,我能看到证据的复查方式和限制,而不是只看到通过结论。",
77
+ "measurement": "添加带复查说明和限制说明的证据后运行 report。",
78
+ "threshold": "报告展示 reviewability 和 limitations;限制不会被隐藏在实现日志里。",
79
+ "risk": "medium"
80
+ },
81
+ {
82
+ "id": "AC-P-10",
83
+ "layer": "protocol",
84
+ "user_story": "作为用户,我能看到一条 AC 可以由多个证据来源共同支撑,而不要求 agent 把它们拆成固定适配器。",
85
+ "measurement": "为一条 AC 添加包含多个来源的证据后查看 evidence record 和 report。",
86
+ "threshold": "同一条证据可以包含多个 sources;报告能合并展示这些来源,并保留 agent 的自由取证空间。",
87
+ "risk": "medium"
88
+ },
89
+ {
90
+ "id": "AC-P-11",
91
+ "layer": "protocol",
92
+ "user_story": "作为用户,我在 Codex 对话中说“把这次验证作为证据”后,agent 能按 OpenNori 结构记录,而不要求我记住 CLI 参数。",
93
+ "measurement": "查看 OpenNori Skill 导出的证据记录说明,并检查 agent 使用自然语言到 CLI 的映射。",
94
+ "threshold": "Skill 明确要求 agent 自由选择验证方式,但记录证据时说明 basis、sources、reviewability、confidence 和 limitations。",
95
+ "risk": "medium"
96
+ },
97
+ {
98
+ "id": "AC-P-12",
99
+ "layer": "protocol",
100
+ "user_story": "作为用户,我运行 nori check 后,能发现 AC 是否缺少真实用户操作或可观察结果,而不是只检查是否以“作为用户”开头。",
101
+ "measurement": "对包含“测试通过”“字段存在”等内部完成条件的验收草案运行 nori check,再对包含真实用户操作和报告结果的草案运行 nori check。",
102
+ "threshold": "内部完成条件会被拒绝;包含用户运行、打开、查看、确认等操作,并说明用户能看到或判断什么结果的 AC 可以通过。",
103
+ "risk": "high"
104
+ },
105
+ {
106
+ "id": "AC-P-13",
107
+ "layer": "protocol",
108
+ "user_story": "作为用户,我打开 nori report 后,能先看到完成结论、当前缺口和是否需要我介入,再查看详细 AC 表格。",
109
+ "measurement": "运行 nori report 并阅读报告顶部内容,再向下查看 Acceptance Status 表格。",
110
+ "threshold": "报告在详细表格前显示 Decision Summary,包含 completion、current gap、user intervention 和 workflow status;blocked 报告也先显示需要用户采取的动作。",
111
+ "risk": "medium"
112
+ },
113
+ {
114
+ "id": "AC-O-1",
115
+ "layer": "operator",
116
+ "user_story": "作为用户,我在 Codex 对话里说“用 OpenNori 跑这个任务:目标是 X”后,能看到一份待确认的人类视角验收草案。",
117
+ "measurement": "在 Codex 对话中查看 agent 返回的验收草案。",
118
+ "threshold": "草案只描述用户通过工具执行操作后能完成的判断或动作;用户能直接 approve 或 revise。",
119
+ "risk": "medium"
120
+ },
121
+ {
122
+ "id": "AC-O-2",
123
+ "layer": "operator",
124
+ "user_story": "作为用户,我在 Codex 对话里 approve 或 revise 验收标准后,能控制什么叫完成,而不是让 agent 自动决定完成定义。",
125
+ "measurement": "查看 active Nori Contract 中是否反映用户确认后的验收标准。",
126
+ "threshold": "agent 在用户确认前不能进入 complete 判断;用户修改过的 AC 会成为后续状态判断依据。",
127
+ "risk": "high"
128
+ },
129
+ {
130
+ "id": "AC-O-3",
131
+ "layer": "operator",
132
+ "user_story": "作为用户,我在新的 Codex 会话里说“继续 OpenNori”后,agent 能恢复当前 active goal 并告诉我当前关键验收缺口。",
133
+ "measurement": "在新会话触发 OpenNori 恢复流程,观察 agent 返回内容。",
134
+ "threshold": "不依赖旧聊天上下文;能返回 goal id、当前状态、当前关键缺口和下一条需要证据的 AC。",
135
+ "risk": "high"
136
+ },
137
+ {
138
+ "id": "AC-O-4",
139
+ "layer": "operator",
140
+ "user_story": "作为用户,我在 Codex 对话里问“现在完成了吗?”后,agent 只能基于 required AC 的状态和证据回答。",
141
+ "measurement": "向 agent 询问完成状态并检查回答依据。",
142
+ "threshold": "只有 required AC 全部 passing 或 waived 时才能回答 complete;否则必须指出未通过或 blocked 的 AC。",
143
+ "risk": "high"
144
+ },
145
+ {
146
+ "id": "AC-O-5",
147
+ "layer": "operator",
148
+ "user_story": "作为用户,我在 Codex 对话里问“我需要做什么?”后,如果任务 blocked,能看到一个明确的人类动作。",
149
+ "measurement": "制造或查看 blocked 状态下的 OpenNori 报告或 agent 回复。",
150
+ "threshold": "blocked 说明必须是用户可执行动作,例如确认取舍、提供权限、批准成本或选择方案,而不是技术日志。",
151
+ "risk": "medium"
152
+ },
153
+ {
154
+ "id": "AC-O-6",
155
+ "layer": "operator",
156
+ "user_story": "作为用户,我发现新事实后在对话中修改某条 AC,agent 后续只按更新后的验收标准判断完成。",
157
+ "measurement": "用户提出 AC 修改后,查看 active contract、status 和 report。",
158
+ "threshold": "更新后的 AC 成为后续 completion 和 current_gap 的唯一验收依据;旧标准不会继续被当成完成条件。",
159
+ "risk": "high"
160
+ },
161
+ {
162
+ "id": "AC-O-7",
163
+ "layer": "operator",
164
+ "user_story": "作为用户,我说“OpenNori 先头脑风暴:想法 X”后,能看到几个可选择的验收方向,而不需要记住 CLI 用法。",
165
+ "measurement": "在 Codex 对话中触发 brainstorm,查看 agent 展示的候选方向。",
166
+ "threshold": "候选项围绕用户价值、可观察验收方式和风险组织;用户能选择或改写方向进入 draft;brainstorm 输出不能被当作 Nori Contract 或完成证据。",
167
+ "risk": "medium"
168
+ },
169
+ {
170
+ "id": "AC-O-8",
171
+ "layer": "operator",
172
+ "user_story": "作为用户,我在 Codex 对话里声明必须使用某个 Skill、偏好某个技术栈或避免某个工具后,agent 能记录这些偏好并在完成前告诉我是否遵守。",
173
+ "measurement": "在 Codex 对话中提出能力偏好后,查看 active contract、status 或 report 中的 Nori Profile。",
174
+ "threshold": "用户不需要记住 CLI;must 或 avoid 的违反会阻止 complete,prefer 会被展示但不阻止 complete;这些偏好不会被写成用户 AC。",
175
+ "risk": "high"
176
+ },
177
+ {
178
+ "id": "AC-Z-1",
179
+ "layer": "productization",
180
+ "user_story": "作为用户,我运行 nori skill export 后,能得到可放入 Codex Skills 的 OpenNori 使用说明。",
181
+ "measurement": "运行 nori skill export --json 并查看输出内容。",
182
+ "threshold": "输出说明能指导 agent 使用 resume、next、evidence、evaluate、status 和 report,不要求用户追踪过程任务。",
183
+ "risk": "medium"
184
+ },
185
+ {
186
+ "id": "AC-Z-2",
187
+ "layer": "productization",
188
+ "user_story": "作为用户,我运行 nori install 后,能把 OpenNori 放入当前项目的可用入口,并且不会意外覆盖已有内容。",
189
+ "measurement": "在一个已有项目中运行安装入口并查看安装结果。",
190
+ "threshold": "安装前能看到将创建或跳过的入口;已有内容默认不被覆盖;失败时说明用户需要做什么。",
191
+ "risk": "high"
192
+ },
193
+ {
194
+ "id": "AC-Z-3",
195
+ "layer": "productization",
196
+ "user_story": "作为用户,我在 Git 或 PR diff 中审查 agent 本轮改动后,能区分验收证据变化和实现过程噪音。",
197
+ "measurement": "查看本轮 diff 或报告变更摘要。",
198
+ "threshold": "默认摘要围绕 AC 状态变化、证据变化和用户影响组织;实现过程只作为附属证据出现。",
199
+ "risk": "medium"
200
+ },
201
+ {
202
+ "id": "AC-Z-4",
203
+ "layer": "productization",
204
+ "user_story": "作为用户,我运行 nori list 后,能看到多个 active goals,并能明确选择要继续的目标。",
205
+ "measurement": "创建多个 active goals 后运行 nori list,并用 --goal 指定 resume/status/report 的目标。",
206
+ "threshold": "多个目标不会被 agent 随机选择;用户能看见目标列表、状态、当前缺口和对应路径。",
207
+ "risk": "high"
208
+ },
209
+ {
210
+ "id": "AC-Z-5",
211
+ "layer": "productization",
212
+ "user_story": "作为用户,我运行归档入口后,completed 或 blocked 中保留报告,active 中不再出现这个目标。",
213
+ "measurement": "对 complete 或 blocked goal 执行归档,再运行 nori list 并打开归档产物。",
214
+ "threshold": "归档不会丢失 Nori Contract、evidence record 或 report;active 列表只显示仍需推进的目标。",
215
+ "risk": "high"
216
+ },
217
+ {
218
+ "id": "AC-Z-6",
219
+ "layer": "productization",
220
+ "user_story": "作为用户,我在项目目录运行 OpenNori 后,能看到 OpenNori 状态集中在 .opennori 目录里,而不是散落到通用 process 目录。",
221
+ "measurement": "运行 nori install、draft、brainstorm、report 或 archive 后查看项目目录。",
222
+ "threshold": "OpenNori 默认只把协议、active goal、报告、归档和 brainstorm 写入 .opennori;不创建 process/acceptance 或 process/development-protocols。",
223
+ "risk": "medium"
224
+ },
225
+ {
226
+ "id": "AC-Z-7",
227
+ "layer": "productization",
228
+ "user_story": "作为用户,我运行 nori install 后,能看到当前项目的 OpenNori 接入登记信息,并判断版本、托管入口、active goals 和 Skill 状态是否可信。",
229
+ "measurement": "运行 nori install --dry-run 或 nori install 后查看输出和项目中的接入登记。",
230
+ "threshold": "输出包含 create、skip、overwrite 或 update 语义;接入登记说明 OpenNori 版本、managed files、active goals、Skill 状态和协议能力;已有用户内容默认不被覆盖。",
231
+ "risk": "high"
232
+ },
233
+ {
234
+ "id": "AC-Z-8",
235
+ "layer": "productization",
236
+ "user_story": "作为用户,我运行 nori doctor 后,能判断当前项目是 ready、needs-action 还是 broken,并知道下一步修复动作。",
237
+ "measurement": "在已安装项目、缺少接入登记的项目或 active goal 异常的项目中运行 nori doctor。",
238
+ "threshold": "输出包含整体健康状态、逐项检查结果、active goal 可恢复性、Skill 同步状态和可执行的 recovery 建议。",
239
+ "risk": "high"
240
+ },
241
+ {
242
+ "id": "AC-Z-9",
243
+ "layer": "productization",
244
+ "user_story": "作为用户,我预览 OpenNori 安装时,能判断每个项目入口会被创建、跳过、更新还是覆盖,并确认 dry-run 不会写入项目。",
245
+ "measurement": "运行 nori install --dry-run,查看 install plan,再检查项目文件是否未被写入。",
246
+ "threshold": "install plan 对每个入口显示 action、kind、managed、would_write、will_write、destructive 和 reason;dry-run 下 will_write 为 0;覆盖类动作必须被标记为 destructive。",
247
+ "risk": "high"
248
+ },
249
+ {
250
+ "id": "AC-Z-10",
251
+ "layer": "productization",
252
+ "user_story": "作为用户,我执行可能覆盖已有 OpenNori 入口的安装时,必须先看到预览并显式确认,才能真正写入项目。",
253
+ "measurement": "在已有 OpenNori 入口的项目中运行 nori install --force、nori install --force --dry-run 和确认后的安装。",
254
+ "threshold": "未确认的真实 --force 安装会失败并提示先 dry-run;dry-run 可展示 destructive overwrite;只有带显式确认的 --force 才会执行覆盖写入。",
255
+ "risk": "high"
256
+ },
257
+ {
258
+ "id": "AC-Z-11",
259
+ "layer": "productization",
260
+ "user_story": "作为用户,我卸载 OpenNori 前,能预览将移除什么,并确认默认卸载不会丢失 active goals、证据、报告或归档。",
261
+ "measurement": "在已安装且有 active goal 的项目中运行 nori uninstall --dry-run、未确认 uninstall、确认 uninstall 和 include-state uninstall。",
262
+ "threshold": "默认 uninstall plan 标明 entry assets 会被移除、验收状态会被 preserve;未确认真实卸载会失败;确认后只移除入口资产;只有显式 --include-state --confirm 才会删除 .opennori 状态目录。",
263
+ "risk": "high"
264
+ },
265
+ {
266
+ "id": "AC-Z-12",
267
+ "layer": "productization",
268
+ "user_story": "作为用户,我安装 OpenNori 后,agent 能获得一组职责清晰的 OpenNori Skills 来处理验收、证据、能力偏好、项目健康和报告,而我不需要记住这些 Skill 名。",
269
+ "measurement": "运行 nori skill export --pack、nori install --skill 和 nori doctor,查看 Skill Pack、manifest 和 doctor 结果。",
270
+ "threshold": "Skill Pack 包含总入口和 acceptance、evidence、capability-profile、project-health、reporting 子 Skill;install 会写入这些 Skill;manifest 记录 skill_pack;doctor 能发现缺失或不同步的 Skill。",
271
+ "risk": "high"
272
+ },
273
+ {
274
+ "id": "AC-Z-13",
275
+ "layer": "productization",
276
+ "user_story": "作为用户,我运行 nori doctor 后,如果项目状态不健康,能直接看到一组可执行恢复动作。",
277
+ "measurement": "分别制造缺失 Skill Pack、缺失 manifest、stale manifest 和损坏 active goal 的项目,然后运行 nori doctor。",
278
+ "threshold": "doctor 输出 status、失败 check、active_goal_issues 和 recovery_actions;recovery_actions 说明要运行的 OpenNori 命令或要检查的 .opennori/active 文件位置。",
279
+ "risk": "high"
280
+ },
281
+ {
282
+ "id": "AC-Z-14",
283
+ "layer": "productization",
284
+ "user_story": "作为用户,我让 agent 继续 OpenNori 工作时,不需要每轮都追问下一步是什么。",
285
+ "measurement": "运行 nori resume、nori status、nori next 和 nori report,分别查看未完成、阻塞和已完成 goal 的输出。",
286
+ "threshold": "输出包含 next_recommendation 或顶部推荐动作;未完成时指向当前验收缺口,阻塞时指向需要用户介入的事项,完成时提示 agent 可进入下一轮 OpenNori loop。",
287
+ "risk": "high"
288
+ },
289
+ {
290
+ "id": "AC-Z-15",
291
+ "layer": "productization",
292
+ "user_story": "作为用户,我让 agent 记录验收证据时,不需要 agent 为常见来源手写复杂结构。",
293
+ "measurement": "运行 nori evidence add,分别使用 --source-command、--source-path、--source-url 和自由 --source 记录证据,再查看 status/report。",
294
+ "threshold": "证据来源能显示为 command、artifact、url 或自由 reference;report/status 中仍保留 basis、reviewability、limitations 和 confidence。",
295
+ "risk": "medium"
296
+ }
297
+ ]
298
+ }
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "opennori",
3
+ "version": "0.1.0",
4
+ "description": "OpenNori: human-centered Nori Contracts and evidence records for coding agents.",
5
+ "type": "module",
6
+ "bin": {
7
+ "nori": "bin/nori.js"
8
+ },
9
+ "files": [
10
+ ".opennori/protocol.md",
11
+ "bin/",
12
+ "src/",
13
+ "examples/",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "scripts": {
18
+ "test": "node --test",
19
+ "check": "node --test && node ./bin/nori.js doctor --json"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "keywords": [
25
+ "agent",
26
+ "workflow",
27
+ "acceptance",
28
+ "codex",
29
+ "claude"
30
+ ],
31
+ "author": "okbexx <okbexx@gmail.com>",
32
+ "license": "MIT",
33
+ "engines": {
34
+ "node": ">=20"
35
+ }
36
+ }