semantic-atlas 4.1.2 → 5.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.
Files changed (54) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +63 -25
  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 +25 -3
  6. package/.agents/skills/semantic-atlas/references/reconciliation.md +3 -2
  7. package/README.md +41 -25
  8. package/README.zh-CN.md +33 -21
  9. package/dist/application/map-application.d.ts +1 -0
  10. package/dist/application/map-application.d.ts.map +1 -1
  11. package/dist/application/map-application.js +61 -15
  12. package/dist/application/map-application.js.map +1 -1
  13. package/dist/cli/run-cli.js +3 -1
  14. package/dist/cli/run-cli.js.map +1 -1
  15. package/dist/contracts/cli.d.ts +13 -20
  16. package/dist/contracts/cli.d.ts.map +1 -1
  17. package/dist/contracts/flow-navigation.d.ts +21 -11
  18. package/dist/contracts/flow-navigation.d.ts.map +1 -1
  19. package/dist/contracts/observation.d.ts +3 -3
  20. package/dist/contracts/query-context.d.ts +34 -0
  21. package/dist/contracts/query-context.d.ts.map +1 -0
  22. package/dist/contracts/query-context.js +2 -0
  23. package/dist/contracts/query-context.js.map +1 -0
  24. package/dist/contracts/query-location.d.ts +14 -0
  25. package/dist/contracts/query-location.d.ts.map +1 -0
  26. package/dist/contracts/query-location.js +2 -0
  27. package/dist/contracts/query-location.js.map +1 -0
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/map/business-graph.d.ts +0 -2
  31. package/dist/map/business-graph.d.ts.map +1 -1
  32. package/dist/map/business-graph.js +0 -15
  33. package/dist/map/business-graph.js.map +1 -1
  34. package/dist/query/context-query-service.d.ts +14 -2
  35. package/dist/query/context-query-service.d.ts.map +1 -1
  36. package/dist/query/context-query-service.js +111 -15
  37. package/dist/query/context-query-service.js.map +1 -1
  38. package/dist/query/flow-navigation-service.d.ts +1 -2
  39. package/dist/query/flow-navigation-service.d.ts.map +1 -1
  40. package/dist/query/flow-navigation-service.js +0 -21
  41. package/dist/query/flow-navigation-service.js.map +1 -1
  42. package/dist/query/query-source-locator.d.ts +19 -0
  43. package/dist/query/query-source-locator.d.ts.map +1 -0
  44. package/dist/query/query-source-locator.js +125 -0
  45. package/dist/query/query-source-locator.js.map +1 -0
  46. package/dist/rendering/flow-projector.js +4 -1
  47. package/dist/rendering/flow-projector.js.map +1 -1
  48. package/dist/rendering/viewer-page.js +3 -0
  49. package/dist/rendering/viewer-page.js.map +1 -1
  50. package/docs/architecture.md +64 -42
  51. package/docs/evaluation.md +119 -19
  52. package/docs/map-format.md +65 -39
  53. package/docs/product-contract.md +73 -51
  54. package/package.json +1 -1
@@ -4,10 +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
- **Status: the behavior below is implemented for 4.1.2, including named-project
8
- queries, multiple flow entries, unconditional fan-out and business-boundary
9
- authoring guidance. Exact publication identity lives in the corresponding GitHub Release;
10
- longitudinal acceptance remains in progress.**
7
+ **状态:当前 5.1.0 候选以已确认业务流程图为业务规范,包含节点说明标识与完整写图指导。
8
+ 紧凑查询及 YAML 格式保持;发布身份以对应 GitHub Release 为准,长期验收仍在进行。**
11
9
 
12
10
  ## Purpose
13
11
 
@@ -19,12 +17,13 @@ business-relevant decisions, branches, and outcomes that relationships alone
19
17
  cannot express. An existing shared map accelerates that work; a missing map
20
18
  starts a bounded current-evidence path.
21
19
 
22
- The map is a durable navigation prior rather than a synchronized copy of the
23
- codebase. Product structure normally changes more slowly than implementation,
24
- so a partially stale map can still lead an agent toward the right owners,
25
- collaborators, invariants, and upstream causes. The agent corrects that prior
26
- with current source, tests, tracked product documentation, Git, and runtime
27
- evidence before changing behavior.
20
+ 业务流程图是一等公民。经确认的流程图承载业务规则,是人和 AI 共同讨论、设计、
21
+ 实现与验收的基准。代码实现业务规范,测试与运行证据用于检查是否兑现;代码已经
22
+ 这样执行,不构成改变业务规则的理由。发生差异时,先核对用户要求和已有业务决定,
23
+ 区分实现缺陷、图的误写与业务意图变化,不默认让图迁就代码。
24
+
25
+ 首次建图或缺少资料时,调查当前实现形成可讨论候选,分清已确认规则、实现现状和
26
+ 待定差异。图的确认依据来自任务、产品决定与已有评审,不新增逐节点审批或持久字段。
28
27
 
29
28
  ## Product Outcome
30
29
 
@@ -42,8 +41,8 @@ reliably:
42
41
  - correct their investigation without requiring a person to supervise routine
43
42
  discovery and implementation.
44
43
 
45
- The map itself may be incomplete or stale. The final engineering conclusion
46
- uses current evidence and is held to a higher accuracy standard than the map.
44
+ 图可能尚未完整,锚点也可能过期。工程结论需要同时说清应有业务规则与实际实现,
45
+ 局部资料缺失不会让代码自动成为业务规范;未决业务意图保持明确状态。
47
46
 
48
47
  ## Users And Core Scenarios
49
48
 
@@ -69,6 +68,28 @@ it reads or writes, which invariant constrains it, and which interfaces cross
69
68
  its boundary. These relations guide source investigation when user wording and
70
69
  implementation vocabulary differ.
71
70
 
71
+ ### AI 查询与按需读取
72
+
73
+ 首次定位应足以判断业务入口:搜索候选带当前 YAML 的维护位置,第一候选随附唯一
74
+ 概念详情、源码入口、显式业务关系及相关图的引用位置;`contextFor` 明确摘要所属的
75
+ 候选 ID。最多五个候选仍由 Agent 按业务含义选择,第一候选及其词面分数不代表
76
+ 已经确定目标。选中其他候选后,按稳定 ID 读取相应概念或流程。
77
+
78
+ 已知概念用 `context` 直达所选业务与其关联;已知流程用 `flows <id>` 直接读本层完整
79
+ 步骤和转换。普通查询中的相关流程保留所属/引用摘要,完整细节按需读取。响应通过
80
+ ID 连接概念、关系和流程,避免在步骤和关系中重复概念与锚点;查询不列全库文件,
81
+ 使用紧凑 JSON,`repository` 只报告选中的 `root`。
82
+
83
+ 关联解释来自 `relations` 的类型、业务 `summary` 与端点,流程的 `references` 说明
84
+ 哪些步骤引用了相关概念。查询覆盖直接关系及共享数据、接口、规则的其他已记录使用方,
85
+ 帮助 Agent 判断哪些业务与图需要核实;不无限扩展动作邻域。`scope: "recorded"` 明示
86
+ 范围:记录了关联不等于当前变更一定有影响,未返回也不证明没有使用方。跨项目线索
87
+ 仍由 Agent 转到对应仓库核实,本轮不引入跨仓关系模型。
88
+
89
+ 维护位置从当前 YAML 派生,不改变持久模型。代码符号保留文件和声明提示,CLI 不猜
90
+ 代码行号;导航状态只说明路径可进入或缺失,不代替当前行为核实。字段与定位语义
91
+ 由[查询投影](map-format.md#context-projection)定义。
92
+
72
93
  ### Human inspection
73
94
 
74
95
  A person views deterministic projections of the same tracked map to discuss
@@ -87,7 +108,14 @@ display names, never repository paths, and cannot submit a filesystem path.
87
108
  所有可视页面统一为业务流程图。AI 根据真实业务决定怎样概括、拆分和连接,不套用
88
109
  固定的开始、判断和结束结构。项目可直接提供多张平级业务图,不要求共同父图或
89
110
  专门的“业务全貌”图。默认第一张只是初始阅读选择,不要求覆盖项目全部业务。
90
- 每张图的范围来自实际业务;相关主线不拆散,独立业务不强行合并。
111
+ 每张图的范围来自读者需要理解的业务目标;相关主线不拆散,独立业务不强行合并。
112
+ 操作有独立接口、角色或返回值,不足以证明它应当成为顶层业务。应说明它为谁发生、
113
+ 作用于什么对象,以及结果怎样进入后续使用,再决定主图、详图或仅保留概念与锚点。
114
+
115
+ 记录这些内容的 YAML 称为业务流程源文件,简称流程源文件;应用的运行实现称业务
116
+ 代码,渲染后的页面称业务流程图。AI 直接审查流程源文件中的业务范围、节点、连接和
117
+ 措辞,并按业务代码核实。孤立节点或多块不相连的内容需要逐项说明并修正组织,不能
118
+ 只靠同图摆放表示关系,也不能编造执行顺序。网页用于核对呈现,不代替业务语义审查。
91
119
 
92
120
  在选定业务内,图应讲清主要过程、重要条件、状态与交接,复杂局部可进入有额外
93
121
  解释的详图。例如订单图保留下单、付款、发货及按条件发生的退款,不因此把另一项
@@ -102,10 +130,15 @@ display names, never repository paths, and cannot submit a filesystem path.
102
130
  单项目界面只显示当前流程标题,不重复展示目录名或产品品牌栏。“查看其他流程”
103
131
  放在标题旁,菜单左对齐并向右增加层级。鼠标悬停整行展开下一层,点击名称直达;
104
132
  触屏仍可点展开箭头,键盘可用方向键浏览。“上一层”沿实际访问历史返回。
105
- 节点角标直接进入子流程;多个目标时先选择。点击节点正文只在有业务备注时打开
106
- 默认关闭的详情,详情不再包含进入按钮。无备注节点正文保持原样。
133
+ 子流程叠层角标直接进入下一张图;多个目标时先选择。有业务备注的节点显示独立的
134
+ 小信息标识,点击正文打开默认关闭的详情;没有备注就不显示该标识。详情不包含
135
+ 进入按钮,无备注节点正文保持原样。
107
136
  起点、判断、结果与子流程继续使用当前卡片样式,不改成大菱形。
108
137
 
138
+ 节点用一句话概括具体业务意图,补充说明只保留读懂路径所需的信息;清单、解释和
139
+ 例外放详情。写作预算由 Skill 指导,不变成文件格式的硬限制,也不在界面截断文字。
140
+ 读者仅看节点与分支就应理解主要过程,影响路径的关键条件保持可见。
141
+
109
142
  业务文件只由 AI 编辑。源码路径、类和方法锚点保留在文件与 CLI 中,Web 面向业务
110
143
  人员,隐藏源码与 AI 怎样编排图的理由。业务规则自身的目的和取舍仍可写成节点备注。
111
144
  浏览器只负责阅读、导航、平移和缩放,不修改业务资料。
@@ -150,8 +183,9 @@ rules for the complete authoring lifecycle.
150
183
  内部重命名、接线或组织变化没有改变业务含义时,不强制重画。新的局部业务没有流程
151
184
  资料时,建立足以表达当前改动的流程,不补画整个系统。
152
185
 
153
- 合并出现冲突时,依据合并后代码的业务行为重新梳理受影响路径,检查上下层和协作
154
- 交接,再解决图文件冲突。不能只做文本拼接或保留与代码不一致的分支。
186
+ 合并出现冲突时,先确定两边业务规则共同生效后的流程,检查上下层和协作交接,
187
+ 再核对合并后代码是否实现它。不能只做文本拼接,也不能因为代码先合入就删除正确
188
+ 的业务规则;尚未兑现的规则作为实现差异明确保留。
155
189
  候选、观察和合入后的校准不再作为正常开发门槛;既有历史工具只在明确请求时使用。
156
190
 
157
191
  旧业务文件不构成格式兼容约束。格式以当前产品需求与具体契约决定,新版发布后再
@@ -199,30 +233,23 @@ transitions carry distinct business labels. A step can reference an existing
199
233
 
200
234
  Flows retain only steps that can change a user-visible result, durable data,
201
235
  cost or provider usage, authorization or tenant isolation, an interface, or a
202
- business outcome. They can express stable loops, but they remain advisory
203
- knowledge rather than an executable workflow or synchronized copy of source.
236
+ business outcome. They can express stable loops. Confirmed flows define the
237
+ business contract; the Viewer does not execute them or automatically synchronize source.
204
238
 
205
239
  ## Authority And Accuracy
206
240
 
207
- Tracked map documents are authoritative for the shared map. They are not
208
- authoritative for current application behavior.
209
-
210
- Every business-changing engineering task follows this evidence order:
241
+ 已确认的业务流程图与业务决定定义应有行为;代码和测试说明实现,运行、数据库或
242
+ 队列证据说明部署环境实际发生了什么。三者承担不同职责,不能相互冒充。
211
243
 
212
- 1. 已知流程或业务 ID 时直接读取;未知时按本次业务意图搜索相关流程,不要求从总览开始。
213
- 2. A map proposes likely business scope and relations; `MAP_NOT_FOUND` routes to
214
- the smallest source-supported business model needed for the task.
215
- 3. Current source and tests confirm implementation behavior.
216
- 4. Tracked product documents confirm durable intent when they own that intent.
217
- 5. Runtime, database, queue, or environment evidence confirms state-dependent
218
- behavior when the task requires it.
219
- 6. The agent reports uncertainty when available evidence cannot support a
220
- decisive conclusion.
221
- 7. 业务行为变化时,代码与相关流程在同分支同步验证;观察记录仅按明确请求执行。
244
+ 1. 按已知流程或业务 ID 直达;未知时按业务意图搜索,不强制从总览开始。
245
+ 2. 从相关流程明确期望行为、影响范围与确认依据;缺图时调查当前实现,建立当前任务所需的候选资料。
246
+ 3. 沿源码锚点检查实现是否符合业务规则。发现不一致时先识别哪一侧偏离已有决定,不以源码或测试断言自动覆盖图。
247
+ 4. 行为要求改变时先更新流程表达,再实现并对照规范验证;图误写或已被新决定替代时,按确认依据修正图。
248
+ 5. 必要时核对运行现状,分别报告业务规则、实现差异与待定事项。业务意图仍不明确且会改变行为时,向用户确认关键取舍。
249
+ 6. 流程与实现同分支审查和合入;纯实现调整不重画业务规则,观察工具仍只按明确请求使用。
222
250
 
223
- An outdated path or symbol anchor weakens that navigation hint without
224
- invalidating unrelated business meaning. A contradiction changes the current
225
- task conclusion immediately; an affected business flow is corrected alongside the code.
251
+ 过期路径只影响导航提示,不否定仍成立的业务规则。合并先确定两边共同生效的最终
252
+ 业务流程,再核对合并后的实现,不能把先合入代码当成业务决定。
226
253
 
227
254
  ## Collaboration And Concurrency
228
255
 
@@ -244,9 +271,8 @@ The initial product delivers one coherent path:
244
271
  query, with a deterministic query-relative score and stable IDs.
245
272
  5. Select a concept by stable ID, while retaining the existing exact and partial
246
273
  selector behavior for compatibility.
247
- 6. Return its containment, direct business relations, related concepts, and
248
- navigation anchors as structured JSON, together with complete related
249
- business flows.
274
+ 6. 返回有维护位置的局部业务摘要、概念与锚点、直接关系及共享数据/接口/规则的其他
275
+ 已记录使用方;相关图提供引用位置,指定流程时才展开完整本层步骤。
250
276
  7. Render deterministic interactive human-readable projections from the same
251
277
  graph as a portable HTML artifact or loopback Web session, with linked
252
278
  business process diagrams.
@@ -291,9 +317,8 @@ the following:
291
317
 
292
318
  - tracked example and real-project map files load and validate through the
293
319
  public CLI;
294
- - ranked search returns the expected node-level candidates and stable IDs, then
295
- context queries return the expected business owner, containment, incoming
296
- and outgoing relationships, navigation anchors, and related flows;
320
+ - 搜索候选与指定概念/流程查询返回预期业务身份、维护位置、代码入口、带原因的
321
+ 已记录关联及相关图引用;候选摘要所属明确,概念不重复,完整流程按需读取;
297
322
  - the renderer produces readable business process diagrams from the
298
323
  same normalized map and links shared business concepts between them;
299
324
  - a package-managed Agent Skill activates for business-changing work with or
@@ -314,14 +339,10 @@ human-intervention evidence as acceptance conditions.
314
339
 
315
340
  ## Current Delivery State
316
341
 
317
- The initial product, managed setup, versioned observations, read-only
318
- reconciliation, public repository, and npm publication are complete. The first
319
- real target-domain map and reviewed observation pair are in local use. The
320
- current `semantic-atlas@2.3.0` release adds manual project registration,
321
- parameterless Web startup, on-demand single-project loading, and project-level
322
- unavailable states without changing the tracked YAML business-map source.
323
- Target-repository sharing and longitudinal acceptance remain separate verified
324
- stages.
342
+ 当前源码版本为 `semantic-atlas@5.1.0`。本次增加节点详情标识,完善业务图编写与复盘,
343
+ 并将已确认流程作为业务规范和验收基准。项目登记、只读阅读器、紧凑 AI 查询、观察
344
+ 与历史校准能力继续保留;业务文件格式与查询契约不变。公开发行和本机安装分别核验,
345
+ 长期真实任务验收仍按下文证据标准进行。
325
346
 
326
347
  ## Current Public Release
327
348
 
@@ -399,7 +420,8 @@ map-maintenance effort remain explanatory measures.
399
420
 
400
421
  `observe` 和 `reconcile` 保留已有不可变记录的查询与处理契约,仅在用户明确要求时使用。
401
422
  旧维护观察仍按精确来源记账,不重解释历史字段;这些工具不形成普通开发的候选门槛。
402
- 日常业务变化在当前分支同步代码和流程,冲突按合并后代码重审,再一起验证合入。
423
+ 日常业务变化先在流程中明确新规则,再同分支实现;冲突先确定共同生效的业务流程,
424
+ 再核对合并后的代码并一起验证合入。
403
425
 
404
426
  ### Real-use acceptance
405
427
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-atlas",
3
- "version": "4.1.2",
3
+ "version": "5.1.0",
4
4
  "description": "面向人与 AI 协作的业务流程图与只读阅读器。",
5
5
  "keywords": [
6
6
  "ai-agents",