semantic-atlas 5.0.0 → 5.2.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 (56) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +48 -22
  2. package/.agents/skills/semantic-atlas/agents/openai.yaml +1 -1
  3. package/.agents/skills/semantic-atlas/references/boundary-design.md +1 -1
  4. package/.agents/skills/semantic-atlas/references/diagram-design.md +55 -16
  5. package/.agents/skills/semantic-atlas/references/map-authoring.md +9 -2
  6. package/.agents/skills/semantic-atlas/references/reconciliation.md +3 -2
  7. package/README.md +192 -243
  8. package/README.zh-CN.md +159 -221
  9. package/dist/cli/run-cli.d.ts.map +1 -1
  10. package/dist/cli/run-cli.js +3 -0
  11. package/dist/cli/run-cli.js.map +1 -1
  12. package/dist/i18n/index.d.ts +12 -0
  13. package/dist/i18n/index.d.ts.map +1 -1
  14. package/dist/i18n/locales/en/cli.d.ts +2 -0
  15. package/dist/i18n/locales/en/cli.d.ts.map +1 -1
  16. package/dist/i18n/locales/en/cli.js +2 -0
  17. package/dist/i18n/locales/en/cli.js.map +1 -1
  18. package/dist/i18n/locales/en/viewer.d.ts +4 -0
  19. package/dist/i18n/locales/en/viewer.d.ts.map +1 -1
  20. package/dist/i18n/locales/en/viewer.js +4 -0
  21. package/dist/i18n/locales/en/viewer.js.map +1 -1
  22. package/dist/i18n/locales/zh-CN/cli.d.ts +2 -0
  23. package/dist/i18n/locales/zh-CN/cli.d.ts.map +1 -1
  24. package/dist/i18n/locales/zh-CN/cli.js +2 -0
  25. package/dist/i18n/locales/zh-CN/cli.js.map +1 -1
  26. package/dist/i18n/locales/zh-CN/viewer.d.ts +4 -0
  27. package/dist/i18n/locales/zh-CN/viewer.d.ts.map +1 -1
  28. package/dist/i18n/locales/zh-CN/viewer.js +4 -0
  29. package/dist/i18n/locales/zh-CN/viewer.js.map +1 -1
  30. package/dist/rendering/flow-projector.js +8 -2
  31. package/dist/rendering/flow-projector.js.map +1 -1
  32. package/dist/rendering/viewer-browser.d.ts.map +1 -1
  33. package/dist/rendering/viewer-browser.js +76 -17
  34. package/dist/rendering/viewer-browser.js.map +1 -1
  35. package/dist/rendering/viewer-layout.d.ts.map +1 -1
  36. package/dist/rendering/viewer-layout.js +81 -13
  37. package/dist/rendering/viewer-layout.js.map +1 -1
  38. package/dist/rendering/viewer-location.d.ts +7 -0
  39. package/dist/rendering/viewer-location.d.ts.map +1 -0
  40. package/dist/rendering/viewer-location.js +16 -0
  41. package/dist/rendering/viewer-location.js.map +1 -0
  42. package/dist/rendering/viewer-page.js +7 -1
  43. package/dist/rendering/viewer-page.js.map +1 -1
  44. package/dist/web/local-web-application.d.ts +1 -0
  45. package/dist/web/local-web-application.d.ts.map +1 -1
  46. package/dist/web/local-web-application.js +14 -0
  47. package/dist/web/local-web-application.js.map +1 -1
  48. package/dist/web/web-command-service.d.ts +1 -0
  49. package/dist/web/web-command-service.d.ts.map +1 -1
  50. package/dist/web/web-command-service.js +4 -2
  51. package/dist/web/web-command-service.js.map +1 -1
  52. package/docs/architecture.md +40 -12
  53. package/docs/evaluation.md +88 -19
  54. package/docs/map-format.md +20 -12
  55. package/docs/product-contract.md +61 -39
  56. package/package.json +1 -1
@@ -127,8 +127,8 @@ invariant
127
127
  interface
128
128
  ```
129
129
 
130
- Every node is advisory. The format does not assign a numeric truth score or
131
- pretend that one confidence value can replace task-time evidence.
130
+ 已确认的节点与流程承载业务规范;未决解释在现有备注中说明。格式不增加数值真值
131
+ 分数或逐节点审批字段,也不把源码已运行视为业务规则自动成立的证明。
132
132
 
133
133
  ## Relation Contract
134
134
 
@@ -239,10 +239,9 @@ business outcome. Keep parameter validation, DTO conversion, helpers,
239
239
  framework wiring, Service or Queue names, retries, and timing in current-source
240
240
  evidence. Cycles are valid when the repeated business path itself is durable.
241
241
 
242
- Flows remain advisory knowledge. A source discrepancy starts an investigation
243
- into whether source regressed, product intent changed, the flow was already
244
- stale, or available evidence is unresolved. It never synchronizes either side
245
- automatically.
242
+ 已确认流程定义应有行为。源码差异需要核实是实现偏离规范、图误写、业务决定变化,
243
+ 还是意图尚未确认;不自动以源码覆盖流程。首次建图可以记录当前实现与已知差异,
244
+ 但不能把代码缺陷确立为正确规则。阅读器不执行流程,也不会自动同步任何一侧。
246
245
 
247
246
  ## Navigation Anchors
248
247
 
@@ -315,7 +314,16 @@ CLI 在上下文查询中保留 `file` 和 `value` 两个字段;面向业务
315
314
  默认入口是没有被其他流程的步骤引用其场景的根流程,按稳定编号排序;随后沿步骤
316
315
  引用安排子流程。步骤对自身场景的引用不算新的父层。所有流程都能从按需选择器访问。
317
316
 
318
- 步骤备注优先使用自己的 `notes`,未写时沿用所引用概念的备注。只有业务备注才打开节点详情;子流程角标直接进入,多目标先选择。新增或修改概念、关系和流程仍沿用 v1 字段;源码锚点只供
317
+ 浏览链接通过 `#project=<project-id>&flow=<flow-id>` 引用已有流程,切换时同步更新。
318
+ 没有指定流程时按默认根图进入;指定流程不存在时明确提示。项目 ID 来自当前阅读器
319
+ 目录或导出文件,流程 ID 来自既有声明;定位信息只在 URL 中表达,不增加 YAML 字段。
320
+ Web 和自包含 HTML 共用此规则。
321
+
322
+ `startsAt` 同时决定“开始”标记;声明多个入口就逐个显示,节点类型保持原样。
323
+ 连线接点及回线路径由阅读器按既有 `transitions` 布局,不写入 YAML;渲染不改变边的
324
+ 起点、终点或条件。自适应横竖选择和画布缩放仍由同一阅读器处理。
325
+
326
+ 步骤备注优先使用自己的 `notes`,未写时沿用所引用概念的备注。实际采用的非空备注让节点显示信息标识并支持点击正文打开详情;子流程叠层角标直接进入,多目标先选择。标识由既有备注派生,不增加文件字段。新增或修改概念、关系和流程仍沿用 v1 字段;源码锚点只供
319
327
  AI 与 CLI 使用,业务界面不展示。
320
328
 
321
329
  ## Validation Rules
@@ -353,8 +361,8 @@ Horizontal relation endpoints follow their business meaning:
353
361
  - `constrained_by` targets an invariant.
354
362
 
355
363
  The first version does not require every node to have a parent or horizontal
356
- relation. Incompleteness is valid advisory knowledge and remains visible to the
357
- caller.
364
+ relation. Incomplete coverage remains visible to the caller and does not make
365
+ unrecorded implementation behavior an approved business rule.
358
366
 
359
367
  ## Ranked Search And Lookup Semantics
360
368
 
@@ -435,9 +443,9 @@ when no candidate is sufficient.
435
443
 
436
444
  ## 同分支编辑与业务定位
437
445
 
438
- 改变业务行为时,在同一开发分支更新代码和相关流程,校验完整地图,实际查看受影响
439
- 图,并一起评审和合入。纯实现调整不改变流程含义时保持原图。合并冲突按合并后代码
440
- 重新核实分支、结果与引用,再修订资料,不等待合入后创建候选任务。
446
+ 业务规则变化先在流程中表达,再同分支实现和验证,并一起评审合入。纯实现调整不
447
+ 改变业务含义时保持原图。合并冲突先确定共同生效的最终业务流程,再核对代码中的
448
+ 分支、结果与引用;不等待合入后创建候选任务,也不让代码先合入决定业务规则。
441
449
 
442
450
  AI 不必先从总览进入。已知编号直接 `flows <flow-id>`;未知时
443
451
  `search "<business-query>" --flows` 搜索流程业务词,再读取命中的图、步骤和概念锚点。
@@ -4,8 +4,8 @@ This page defines the accepted initial product. It answers what Semantic Atlas
4
4
  must improve, how agents and people use it, and which results establish
5
5
  that the product works.
6
6
 
7
- **状态:当前 5.0.0 源码已实现紧凑查询、业务关系与维护位置输出。YAML 持久格式保持
8
- 不变;查询 JSON 的字段变化见下文。发布身份以对应 GitHub Release 为准,长期验收仍在进行。**
7
+ **状态:当前 5.2.0 候选支持流程 URL 直达、醒目起点与分离连线接点,保留自适应布局。
8
+ 紧凑查询及 YAML 格式保持;发布身份以对应 GitHub Release 为准,长期验收仍在进行。**
9
9
 
10
10
  ## Purpose
11
11
 
@@ -17,12 +17,13 @@ business-relevant decisions, branches, and outcomes that relationships alone
17
17
  cannot express. An existing shared map accelerates that work; a missing map
18
18
  starts a bounded current-evidence path.
19
19
 
20
- The map is a durable navigation prior rather than a synchronized copy of the
21
- codebase. Product structure normally changes more slowly than implementation,
22
- so a partially stale map can still lead an agent toward the right owners,
23
- collaborators, invariants, and upstream causes. The agent corrects that prior
24
- with current source, tests, tracked product documentation, Git, and runtime
25
- evidence before changing behavior.
20
+ 业务流程图是一等公民。经确认的流程图承载业务规则,是人和 AI 共同讨论、设计、
21
+ 实现与验收的基准。代码实现业务规范,测试与运行证据用于检查是否兑现;代码已经
22
+ 这样执行,不构成改变业务规则的理由。发生差异时,先核对用户要求和已有业务决定,
23
+ 区分实现缺陷、图的误写与业务意图变化,不默认让图迁就代码。
24
+
25
+ 首次建图或缺少资料时,调查当前实现形成可讨论候选,分清已确认规则、实现现状和
26
+ 待定差异。图的确认依据来自任务、产品决定与已有评审,不新增逐节点审批或持久字段。
26
27
 
27
28
  ## Product Outcome
28
29
 
@@ -40,8 +41,8 @@ reliably:
40
41
  - correct their investigation without requiring a person to supervise routine
41
42
  discovery and implementation.
42
43
 
43
- The map itself may be incomplete or stale. The final engineering conclusion
44
- uses current evidence and is held to a higher accuracy standard than the map.
44
+ 图可能尚未完整,锚点也可能过期。工程结论需要同时说清应有业务规则与实际实现,
45
+ 局部资料缺失不会让代码自动成为业务规范;未决业务意图保持明确状态。
45
46
 
46
47
  ## Users And Core Scenarios
47
48
 
@@ -107,7 +108,14 @@ display names, never repository paths, and cannot submit a filesystem path.
107
108
  所有可视页面统一为业务流程图。AI 根据真实业务决定怎样概括、拆分和连接,不套用
108
109
  固定的开始、判断和结束结构。项目可直接提供多张平级业务图,不要求共同父图或
109
110
  专门的“业务全貌”图。默认第一张只是初始阅读选择,不要求覆盖项目全部业务。
110
- 每张图的范围来自实际业务;相关主线不拆散,独立业务不强行合并。
111
+ 每张图的范围来自读者需要理解的业务目标;相关主线不拆散,独立业务不强行合并。
112
+ 操作有独立接口、角色或返回值,不足以证明它应当成为顶层业务。应说明它为谁发生、
113
+ 作用于什么对象,以及结果怎样进入后续使用,再决定主图、详图或仅保留概念与锚点。
114
+
115
+ 记录这些内容的 YAML 称为业务流程源文件,简称流程源文件;应用的运行实现称业务
116
+ 代码,渲染后的页面称业务流程图。AI 直接审查流程源文件中的业务范围、节点、连接和
117
+ 措辞,并按业务代码核实。孤立节点或多块不相连的内容需要逐项说明并修正组织,不能
118
+ 只靠同图摆放表示关系,也不能编造执行顺序。网页用于核对呈现,不代替业务语义审查。
111
119
 
112
120
  在选定业务内,图应讲清主要过程、重要条件、状态与交接,复杂局部可进入有额外
113
121
  解释的详图。例如订单图保留下单、付款、发货及按条件发生的退款,不因此把另一项
@@ -122,10 +130,20 @@ display names, never repository paths, and cannot submit a filesystem path.
122
130
  单项目界面只显示当前流程标题,不重复展示目录名或产品品牌栏。“查看其他流程”
123
131
  放在标题旁,菜单左对齐并向右增加层级。鼠标悬停整行展开下一层,点击名称直达;
124
132
  触屏仍可点展开箭头,键盘可用方向键浏览。“上一层”沿实际访问历史返回。
125
- 节点角标直接进入子流程;多个目标时先选择。点击节点正文只在有业务备注时打开
126
- 默认关闭的详情,详情不再包含进入按钮。无备注节点正文保持原样。
133
+ 子流程叠层角标直接进入下一张图;多个目标时先选择。有业务备注的节点显示独立的
134
+ 小信息标识,点击正文打开默认关闭的详情;没有备注就不显示该标识。详情不包含
135
+ 进入按钮,无备注节点正文保持原样。
127
136
  起点、判断、结果与子流程继续使用当前卡片样式,不改成大菱形。
128
137
 
138
+ 每个 `startsAt` 指定的入口显示独立“开始”标记和蓝色轮廓,普通动作入口另有浅蓝底色。
139
+ 入口同时是判断或结果时,保留其类型底色。标记由已有入口声明派生,多入口逐个显示,
140
+ 不要求 AI 添加仅用于占位的开始节点。连线从不同接点进入、离开卡片,分支和回线
141
+ 使用可辨别的路径;自适应横竖布局、文字实测、缩放和平移继续保留。
142
+
143
+ 节点用一句话概括具体业务意图,补充说明只保留读懂路径所需的信息;清单、解释和
144
+ 例外放详情。写作预算由 Skill 指导,不变成文件格式的硬限制,也不在界面截断文字。
145
+ 读者仅看节点与分支就应理解主要过程,影响路径的关键条件保持可见。
146
+
129
147
  业务文件只由 AI 编辑。源码路径、类和方法锚点保留在文件与 CLI 中,Web 面向业务
130
148
  人员,隐藏源码与 AI 怎样编排图的理由。业务规则自身的目的和取舍仍可写成节点备注。
131
149
  浏览器只负责阅读、导航、平移和缩放,不修改业务资料。
@@ -134,6 +152,16 @@ display names, never repository paths, and cannot submit a filesystem path.
134
152
  按实际内容重新测量;小图不自动放大超过原始字号,避免节点和线条变成大色块。
135
153
  Web 与导出的单文件 HTML 共用同一个阅读器。
136
154
 
155
+ 每张业务流程可通过 URL 直接打开。fragment 使用已有项目 ID 和流程 ID:
156
+ `#project=<project-id>&flow=<flow-id>`。初次打开、刷新按目标定位,切项目、跳图、
157
+ 深入和上一层同步地址,浏览器前进后退恢复对应目标。未指定流程使用默认根图;
158
+ 指定目标不存在时明确提示,不能用第一张图冒充目标。
159
+
160
+ AI 用 `web --project <name-or-id> --flow <flow-id>`,或单个 `--repo`,从 `data.url`
161
+ 取得完整目标链接。仅有一个登记项目时可省略项目选择;多个项目时需要明确选择。
162
+ 起服务前核实目标,失败沿现有 CLI 错误边界报告;普通多项目 Web 继续按需加载。
163
+ 导出 HTML 使用同一规则及自身内嵌项目 ID。URL 不含仓库路径,不增加业务文件字段。
164
+
137
165
  ### Runtime language
138
166
 
139
167
  Product-owned text supports English and Simplified Chinese, with English as
@@ -170,8 +198,9 @@ rules for the complete authoring lifecycle.
170
198
  内部重命名、接线或组织变化没有改变业务含义时,不强制重画。新的局部业务没有流程
171
199
  资料时,建立足以表达当前改动的流程,不补画整个系统。
172
200
 
173
- 合并出现冲突时,依据合并后代码的业务行为重新梳理受影响路径,检查上下层和协作
174
- 交接,再解决图文件冲突。不能只做文本拼接或保留与代码不一致的分支。
201
+ 合并出现冲突时,先确定两边业务规则共同生效后的流程,检查上下层和协作交接,
202
+ 再核对合并后代码是否实现它。不能只做文本拼接,也不能因为代码先合入就删除正确
203
+ 的业务规则;尚未兑现的规则作为实现差异明确保留。
175
204
  候选、观察和合入后的校准不再作为正常开发门槛;既有历史工具只在明确请求时使用。
176
205
 
177
206
  旧业务文件不构成格式兼容约束。格式以当前产品需求与具体契约决定,新版发布后再
@@ -219,30 +248,23 @@ transitions carry distinct business labels. A step can reference an existing
219
248
 
220
249
  Flows retain only steps that can change a user-visible result, durable data,
221
250
  cost or provider usage, authorization or tenant isolation, an interface, or a
222
- business outcome. They can express stable loops, but they remain advisory
223
- knowledge rather than an executable workflow or synchronized copy of source.
251
+ business outcome. They can express stable loops. Confirmed flows define the
252
+ business contract; the Viewer does not execute them or automatically synchronize source.
224
253
 
225
254
  ## Authority And Accuracy
226
255
 
227
- Tracked map documents are authoritative for the shared map. They are not
228
- authoritative for current application behavior.
229
-
230
- Every business-changing engineering task follows this evidence order:
256
+ 已确认的业务流程图与业务决定定义应有行为;代码和测试说明实现,运行、数据库或
257
+ 队列证据说明部署环境实际发生了什么。三者承担不同职责,不能相互冒充。
231
258
 
232
- 1. 已知流程或业务 ID 时直接读取;未知时按本次业务意图搜索相关流程,不要求从总览开始。
233
- 2. A map proposes likely business scope and relations; `MAP_NOT_FOUND` routes to
234
- the smallest source-supported business model needed for the task.
235
- 3. Current source and tests confirm implementation behavior.
236
- 4. Tracked product documents confirm durable intent when they own that intent.
237
- 5. Runtime, database, queue, or environment evidence confirms state-dependent
238
- behavior when the task requires it.
239
- 6. The agent reports uncertainty when available evidence cannot support a
240
- decisive conclusion.
241
- 7. 业务行为变化时,代码与相关流程在同分支同步验证;观察记录仅按明确请求执行。
259
+ 1. 按已知流程或业务 ID 直达;未知时按业务意图搜索,不强制从总览开始。
260
+ 2. 从相关流程明确期望行为、影响范围与确认依据;缺图时调查当前实现,建立当前任务所需的候选资料。
261
+ 3. 沿源码锚点检查实现是否符合业务规则。发现不一致时先识别哪一侧偏离已有决定,不以源码或测试断言自动覆盖图。
262
+ 4. 行为要求改变时先更新流程表达,再实现并对照规范验证;图误写或已被新决定替代时,按确认依据修正图。
263
+ 5. 必要时核对运行现状,分别报告业务规则、实现差异与待定事项。业务意图仍不明确且会改变行为时,向用户确认关键取舍。
264
+ 6. 流程与实现同分支审查和合入;纯实现调整不重画业务规则,观察工具仍只按明确请求使用。
242
265
 
243
- An outdated path or symbol anchor weakens that navigation hint without
244
- invalidating unrelated business meaning. A contradiction changes the current
245
- task conclusion immediately; an affected business flow is corrected alongside the code.
266
+ 过期路径只影响导航提示,不否定仍成立的业务规则。合并先确定两边共同生效的最终
267
+ 业务流程,再核对合并后的实现,不能把先合入代码当成业务决定。
246
268
 
247
269
  ## Collaboration And Concurrency
248
270
 
@@ -332,10 +354,9 @@ human-intervention evidence as acceptance conditions.
332
354
 
333
355
  ## Current Delivery State
334
356
 
335
- 当前源码版本为 `semantic-atlas@5.0.0`。项目登记、只读阅读器、观察与历史校准能力继续
336
- 保留;本次将 AI 查询改为唯一概念详情、带原因的关联、相关图引用及当前 YAML 位置,
337
- 完整步骤按需读取。查询 JSON 的重复嵌套对象与全量文件目录已移除,因此使用主版本
338
- 标明输出契约变化;业务文件仍使用原有 YAML,无需迁移。公开发行和本机安装分别核验,
357
+ 当前源码版本为 `semantic-atlas@5.2.0`。本次增加流程 URL 直达与 `web --flow`,突出每个
358
+ 入口的开始样式,分离连线接点并改善回线路径。已确认流程仍为业务规范与验收基准,
359
+ 自适应布局和现有查询能力保留;业务文件格式不变。公开发行和本机安装分别核验,
339
360
  长期真实任务验收仍按下文证据标准进行。
340
361
 
341
362
  ## Current Public Release
@@ -414,7 +435,8 @@ map-maintenance effort remain explanatory measures.
414
435
 
415
436
  `observe` 和 `reconcile` 保留已有不可变记录的查询与处理契约,仅在用户明确要求时使用。
416
437
  旧维护观察仍按精确来源记账,不重解释历史字段;这些工具不形成普通开发的候选门槛。
417
- 日常业务变化在当前分支同步代码和流程,冲突按合并后代码重审,再一起验证合入。
438
+ 日常业务变化先在流程中明确新规则,再同分支实现;冲突先确定共同生效的业务流程,
439
+ 再核对合并后的代码并一起验证合入。
418
440
 
419
441
  ### Real-use acceptance
420
442
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-atlas",
3
- "version": "5.0.0",
3
+ "version": "5.2.0",
4
4
  "description": "面向人与 AI 协作的业务流程图与只读阅读器。",
5
5
  "keywords": [
6
6
  "ai-agents",