semantic-atlas 3.0.0 → 4.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.
- package/.agents/skills/semantic-atlas/SKILL.md +25 -7
- package/.agents/skills/semantic-atlas/agents/openai.yaml +2 -2
- package/.agents/skills/semantic-atlas/references/boundary-design.md +9 -3
- package/.agents/skills/semantic-atlas/references/diagram-design.md +45 -13
- package/.agents/skills/semantic-atlas/references/map-authoring.md +61 -49
- package/README.md +30 -53
- package/README.zh-CN.md +30 -50
- package/dist/cli/localized-command.js +4 -0
- package/dist/cli/localized-command.js.map +1 -1
- package/dist/cli/run-cli.d.ts +2 -0
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +80 -14
- package/dist/cli/run-cli.js.map +1 -1
- package/dist/contracts/cli.d.ts +6 -1
- package/dist/contracts/cli.d.ts.map +1 -1
- package/dist/contracts/flow-navigation.d.ts +1 -1
- package/dist/contracts/flow-navigation.d.ts.map +1 -1
- package/dist/contracts/map.d.ts +5 -4
- package/dist/contracts/map.d.ts.map +1 -1
- package/dist/contracts/map.js +3 -1
- package/dist/contracts/map.js.map +1 -1
- package/dist/contracts/project.d.ts +13 -0
- package/dist/contracts/project.d.ts.map +1 -1
- package/dist/i18n/index.d.ts +14 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/cli.d.ts +3 -0
- package/dist/i18n/locales/en/cli.d.ts.map +1 -1
- package/dist/i18n/locales/en/cli.js +5 -2
- package/dist/i18n/locales/en/cli.js.map +1 -1
- package/dist/i18n/locales/en/errors.d.ts +4 -0
- package/dist/i18n/locales/en/errors.d.ts.map +1 -1
- package/dist/i18n/locales/en/errors.js +6 -2
- package/dist/i18n/locales/en/errors.js.map +1 -1
- package/dist/i18n/locales/zh-CN/cli.d.ts +3 -0
- package/dist/i18n/locales/zh-CN/cli.d.ts.map +1 -1
- package/dist/i18n/locales/zh-CN/cli.js +5 -2
- package/dist/i18n/locales/zh-CN/cli.js.map +1 -1
- package/dist/i18n/locales/zh-CN/errors.d.ts +4 -0
- package/dist/i18n/locales/zh-CN/errors.d.ts.map +1 -1
- package/dist/i18n/locales/zh-CN/errors.js +6 -2
- package/dist/i18n/locales/zh-CN/errors.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/map/business-flow-validator.js +21 -7
- package/dist/map/business-flow-validator.js.map +1 -1
- package/dist/map/map-validator.js +2 -0
- package/dist/map/map-validator.js.map +1 -1
- package/dist/projects/project-directory.d.ts +15 -0
- package/dist/projects/project-directory.d.ts.map +1 -0
- package/dist/projects/project-directory.js +119 -0
- package/dist/projects/project-directory.js.map +1 -0
- package/dist/rendering/flow-projector.js +1 -1
- package/dist/rendering/flow-projector.js.map +1 -1
- package/dist/setup/managed-skill-installer.d.ts +2 -0
- package/dist/setup/managed-skill-installer.d.ts.map +1 -1
- package/dist/setup/managed-skill-installer.js +80 -7
- package/dist/setup/managed-skill-installer.js.map +1 -1
- package/dist/setup/package-upgrader.d.ts.map +1 -1
- package/dist/setup/package-upgrader.js +6 -1
- package/dist/setup/package-upgrader.js.map +1 -1
- package/dist/web/local-web-application.d.ts.map +1 -1
- package/dist/web/local-web-application.js +6 -31
- package/dist/web/local-web-application.js.map +1 -1
- package/docs/architecture.md +35 -4
- package/docs/evaluation.md +29 -0
- package/docs/map-format.md +24 -12
- package/docs/product-contract.md +30 -21
- package/examples//350/256/242/345/215/225/347/256/241/347/220/206/README.md +3 -2
- package/examples//350/256/242/345/215/225/347/256/241/347/220/206/docs/business-map/orders.yaml +24 -15
- package/package.json +3 -1
- package/scripts/postinstall.mjs +8 -0
package/docs/architecture.md
CHANGED
|
@@ -87,7 +87,7 @@ Viewer selection -> GET /api/projects/<opaque-id> -> one validated projection
|
|
|
87
87
|
The tracked documents and their Git history are the shared product state. Each
|
|
88
88
|
map load creates an in-memory graph for its own invocation. Rendering and future
|
|
89
89
|
local acceleration remain derived behavior around that same graph. The
|
|
90
|
-
user-local project list supplies
|
|
90
|
+
user-local project list supplies checkout selection and never becomes a
|
|
91
91
|
second graph or map-authoring source.
|
|
92
92
|
|
|
93
93
|
## Stable Responsibilities
|
|
@@ -109,8 +109,10 @@ malformed anchors. It owns deterministic validity, not current-source truth.
|
|
|
109
109
|
### BusinessFlowValidator
|
|
110
110
|
|
|
111
111
|
Validates scenario ownership, flow and step identity, concept and transition
|
|
112
|
-
references, action/decision/outcome branch shape, and reachability
|
|
113
|
-
|
|
112
|
+
references, action/decision/outcome branch shape, and reachability from the
|
|
113
|
+
declared entry set. A single entry ID and a nonempty entry list normalize to
|
|
114
|
+
one immutable list. Actions can have multiple unconditional successors;
|
|
115
|
+
decisions retain distinct labeled alternatives. Cycles are valid. It owns structural flow coherence while current source and durable
|
|
114
116
|
product evidence decide whether the described business path is current.
|
|
115
117
|
|
|
116
118
|
### BusinessGraph
|
|
@@ -147,6 +149,9 @@ ID to `ContextQueryService`.
|
|
|
147
149
|
引用其场景的流程先显示,再按节点引用排列子流程。`part_of` 继续表示业务归属,
|
|
148
150
|
不会生成分类画面或执行箭头。没有流程时提供空状态。
|
|
149
151
|
|
|
152
|
+
AI 决定每条流程的业务范围与粒度;产品不补统一起止、不生成跨流程连线,也不把
|
|
153
|
+
所有根流程自动铺在一张画布中。独立业务通过按需导航分别浏览。
|
|
154
|
+
|
|
150
155
|
节点进入目标只取引用场景自己拥有的其他流程,排除当前流程。普通相关关系与后代
|
|
151
156
|
归属不产生深入链接。CLI 的概念、关系、源码锚点和完整地图统计保持其已有含义。
|
|
152
157
|
|
|
@@ -156,6 +161,10 @@ ID to `ContextQueryService`.
|
|
|
156
161
|
卡片、小图标与细色条,子流程节点以叠层样式提示。判断使用淡金卡片,不因正文
|
|
157
162
|
增加而膨胀成大菱形。
|
|
158
163
|
|
|
164
|
+
显式声明的所有入口都采用起点样式;同图的不相连路径和并行连线沿原布局完整投影,
|
|
165
|
+
不生成共同起点、虚拟判断或汇合节点。它们来自 AI 编写的这一张图,项目内其他流程
|
|
166
|
+
仍按需读取,不被自动合并到当前画布。
|
|
167
|
+
|
|
159
168
|
Dagre 确定层级和位置,正交走线保持水平或垂直并使用圆角转折。小箭头与线条同色,
|
|
160
169
|
分支标签放在对应连接的空白区。服务端预估与浏览器实测共用布局,文字变化后重新
|
|
161
170
|
测量卡片,完整展示标题、摘要与条件。
|
|
@@ -185,6 +194,14 @@ configuration is separate from observations and tracked business-map YAML.
|
|
|
185
194
|
`MapApplication` before storing its resolved root. A missing, invalid, or
|
|
186
195
|
unresolvable map therefore leaves the project file unchanged.
|
|
187
196
|
|
|
197
|
+
### ProjectDirectory
|
|
198
|
+
|
|
199
|
+
从既有登记路径派生目录名、展示名和路径哈希 ID,不增加持久字段。CLI 的 `project list`
|
|
200
|
+
返回 `{id, name, displayName, repositoryPath}`;Web 复用同一目录生成名称与 ID,但只
|
|
201
|
+
向浏览器发送名称和不透明 ID。目录名经 Unicode NFKC、首尾空白和大小写归一后精确
|
|
202
|
+
匹配,重名返回候选并要求使用 ID。未知名称返回最多五个相近候选,供 AI 判断后明确
|
|
203
|
+
重试,不自动选中相近项目。路径存在与地图有效性仍由 `MapApplication` 在读取时核实。
|
|
204
|
+
|
|
188
205
|
### LocalWebApplication And LocalWebServer
|
|
189
206
|
|
|
190
207
|
`LocalWebApplication` turns one saved or explicit path set into a session-local
|
|
@@ -273,7 +290,13 @@ AI 根据业务含义选择结果;没有语义向量索引,不将分数解
|
|
|
273
290
|
|
|
274
291
|
只安装一个包内 `semantic-atlas` Skill,统一理解业务与流程维护。沿用安装指纹、
|
|
275
292
|
归属标记、暂存目录和原子替换,验证已有同名目录归属后才修复或升级。
|
|
276
|
-
|
|
293
|
+
旧格式或无标记安装可由准确的 Skill 名称识别。新版接入后,清理 Agents/Codex/Claude
|
|
294
|
+
发现目录中已识别的旧维护 Skill;Codex 与 Claude 的当前入口链接到唯一源。比较真实
|
|
295
|
+
路径后再处理已有入口,父目录已经共享时保持唯一源。无关身份的目录继续报冲突并保留。
|
|
296
|
+
|
|
297
|
+
包内 `scripts/postinstall.mjs` 只在全局安装模式委派 CLI setup;普通源码/项目依赖安装
|
|
298
|
+
不加载构建产物或改动用户级发现目录。npm 12 以单包 allow-scripts 许可执行,不修改
|
|
299
|
+
用户全局配置。主动禁用生命周期脚本的使用方仍可显式执行 setup。
|
|
277
300
|
|
|
278
301
|
### PackageUpgrader
|
|
279
302
|
|
|
@@ -438,6 +461,7 @@ semantic-atlas flows [flow-id] [--repo <path>]
|
|
|
438
461
|
semantic-atlas context <id-or-term> [--repo <path>]
|
|
439
462
|
semantic-atlas render [--repo <path>] [--output <path>]
|
|
440
463
|
semantic-atlas project add [path]
|
|
464
|
+
semantic-atlas project list
|
|
441
465
|
semantic-atlas web [--repo <path...>] [--port <port>] [--no-open]
|
|
442
466
|
semantic-atlas setup
|
|
443
467
|
semantic-atlas upgrade
|
|
@@ -462,6 +486,10 @@ a versioned envelope with a stable success or error discriminant.
|
|
|
462
486
|
`search --flows` 直接检索流程及其业务步骤,按流程去重返回命中步骤。`flows <id>`
|
|
463
487
|
只读取指定图及源码锚点,省略编号时才提供目录。
|
|
464
488
|
|
|
489
|
+
`validate`、`search`、`flows`、`context`、`render` 与 `web` 均支持
|
|
490
|
+
`--project <name-or-id>`,从登记目录解析目标,与当前工作目录无关;它与显式 `--repo`
|
|
491
|
+
互斥。两项均未提供时,地图命令仍使用当前目录,`web` 仍使用完整登记清单。
|
|
492
|
+
|
|
465
493
|
`search` returns at most five ranked nodes from every business-node kind. A
|
|
466
494
|
successful empty result means the map has no sufficiently related vocabulary;
|
|
467
495
|
it is not a repository failure. Each candidate includes `rank`, a `0–1`
|
|
@@ -554,6 +582,9 @@ Errors fall into stable categories:
|
|
|
554
582
|
shape, normalized absolute-path rule, or uniqueness rule and remains unchanged.
|
|
555
583
|
- `PROJECT_CONFIG_STORAGE_FAILED`: the project file cannot be read or atomically
|
|
556
584
|
replaced; the previous complete file remains authoritative.
|
|
585
|
+
- `PROJECT_NOT_FOUND`:没有精确匹配的项目;`selector` 保留原输入,`candidates` 返回
|
|
586
|
+
相近项目,找不到相近项时为空。
|
|
587
|
+
- `PROJECT_AMBIGUOUS`:多个登记路径具有相同名称;`candidates` 返回候选,使用 ID 重试。
|
|
557
588
|
- `WEB_START_FAILED`: the registered list cannot be read, the loopback port
|
|
558
589
|
cannot bind, or the local Viewer cannot start.
|
|
559
590
|
|
package/docs/evaluation.md
CHANGED
|
@@ -35,6 +35,35 @@ correctness.
|
|
|
35
35
|
全库覆盖、长期稳定收益或所有业务的表达质量;本次生成图的浏览器阅读检查因工具问题
|
|
36
36
|
尚未完成。首次全库重建和日常工程中的后续证据应分别记录。
|
|
37
37
|
|
|
38
|
+
同日修订画图指导后,另一次新上下文试用只接收多业务样本和候选 Skill 的路径,自行
|
|
39
|
+
调查订单、履约、销售核算并生成 3 份文件、6 条具体流程。它保留独立业务入口与共享
|
|
40
|
+
下单通知,没有增加统一接收/选择/返回总流程,也没有把履约和销售登记串行化。
|
|
41
|
+
文件校验、业务查询、渲染和六图浏览器阅读通过;源码缺少持久化、投递调用方和日报
|
|
42
|
+
日期筛选的部分被明确记为证据缺口。词面搜索“取消订单”仍把收入汇总排在取消流程
|
|
43
|
+
之前,AI 需按业务含义选择候选;这次试用不证明语义搜索或长期可靠性。
|
|
44
|
+
|
|
45
|
+
随后用户进一步明确:所有项目的资料都应有能解释整体业务的总览,业务缺口还应驱动
|
|
46
|
+
跨仓库调查。上述六条独立流程的试用只证明具体路径的表达与核实,不再作为项目整体
|
|
47
|
+
建图已完成的证据。后续验收还需检查能否从总览讲清全貌、再进入相关细图,以及可访问
|
|
48
|
+
的前端/其他服务证据是否因仓库边界被遗漏;不要求固定图数、层数或虚构共同起止。
|
|
49
|
+
|
|
50
|
+
按这一指导进行的新上下文整理试用,把已有六个接口级入口组织为购买交接、客户取消、
|
|
51
|
+
财务报表三个入口,通过购买旅程展开独立的仓库和财务处理,保留原业务所有者。4 份
|
|
52
|
+
文件、9 条流程的校验、渲染与导航检查通过,未做浏览器阅读验证。该试用确认当时的
|
|
53
|
+
流程格式与阅读器无法在同图表达多入口、事件扇出和跨流程状态联系,仍需分图与说明。
|
|
54
|
+
这证明指导能促使 AI 聚合业务,也暴露软件能力缺口,不能作为完整视觉表达已达标的
|
|
55
|
+
证据。该限制随后成为本轮软件改动的依据:多入口列表与动作多后继由同一图模型表达,
|
|
56
|
+
不要求编写者扭曲业务来适应格式。新版本的实际图与阅读验证分别记录。
|
|
57
|
+
|
|
58
|
+
4.0.0 的新上下文试用从原始材料自行建立一张完整总览与四张规则细图;总览保留下单、
|
|
59
|
+
取消、收入报告三个入口和已下单事件的两个独立消费者。4 文件/5 流程的校验、搜索、
|
|
60
|
+
上下层直读、上下文与渲染通过,副本源码未变。该样本没有运行持久化、事件接线或日期
|
|
61
|
+
筛选;这些缺口均明确保留,试用图本身未做浏览器阅读。
|
|
62
|
+
|
|
63
|
+
软件的实际浏览另用公开订单样例核对两入口与并行后继,并在私有项目抽查整体总览、
|
|
64
|
+
多入口触发、细图、返回和菜单选择,页面错误为空。161 项检查及完整发布源门禁通过,
|
|
65
|
+
源码与业务图分别独立审查。以上不代表所有业务或屏幕尺寸都已运行验收。
|
|
66
|
+
|
|
38
67
|
## Accuracy Dimensions
|
|
39
68
|
|
|
40
69
|
### Business-boundary accuracy
|
package/docs/map-format.md
CHANGED
|
@@ -21,10 +21,11 @@ The first implementation uses this conventional directory. Every `*.yaml` file
|
|
|
21
21
|
in the directory participates in one repository-wide graph. File names organize
|
|
22
22
|
ownership but do not become graph nodes.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
各仓库保留各自的流程文件。登记后,通过 `project list` 查看项目名称、ID 与路径,查询、
|
|
25
|
+
校验和渲染使用 `--project <名称或ID>` 选择目标,与当前工作目录无关;也可通过 `--repo`
|
|
26
|
+
直接指定仓库。两种选择方式互斥,均不提供时只加载当前目录,不递归合并子项目。
|
|
27
|
+
概念与流程 ID 在选定仓库的图内解析,源码锚点也相对它解析。跨项目协作分别读取双方
|
|
28
|
+
资料并核实真实契约,不能把一个项目的同名业务当成另一个项目。
|
|
28
29
|
|
|
29
30
|
## Business Ownership And File Boundaries
|
|
30
31
|
|
|
@@ -216,14 +217,14 @@ Each flow contains:
|
|
|
216
217
|
| `name` | yes | Human-facing scenario path name |
|
|
217
218
|
| `summary` | yes | Durable business result represented by the flow |
|
|
218
219
|
| `scenario` | yes | Existing `scenario` node that owns the flow |
|
|
219
|
-
| `startsAt` | yes |
|
|
220
|
+
| `startsAt` | yes | 一个步骤 ID 或非空步骤 ID 列表,表示真实业务入口;解析与 CLI 输出统一为列表 |
|
|
220
221
|
| `steps` | yes | One or more business-granularity steps |
|
|
221
222
|
| `transitions` | yes | Directed step connections and decision labels |
|
|
222
223
|
| `notes` | no | Durable qualification or known uncertainty |
|
|
223
224
|
|
|
224
225
|
Step kinds are:
|
|
225
226
|
|
|
226
|
-
- `action
|
|
227
|
+
- `action`:具体业务动作,可有多条无条件后继;多条路径都成立,不表示择一执行;
|
|
227
228
|
- `decision`: a business choice with at least two uniquely labeled branches;
|
|
228
229
|
- `outcome`: a business result that ends its path.
|
|
229
230
|
|
|
@@ -295,8 +296,19 @@ CLI 在上下文查询中保留 `file` 和 `value` 两个字段;面向业务
|
|
|
295
296
|
|
|
296
297
|
## 流程图阅读与层次
|
|
297
298
|
|
|
298
|
-
所有可视页面使用 `flows
|
|
299
|
-
|
|
299
|
+
所有可视页面使用 `flows`。AI 依据实际业务与阅读需要决定范围、层次与表达;总览
|
|
300
|
+
概括真实业务动作、条件和交接,不为独立业务补出共同触发或执行关系。子流程
|
|
301
|
+
通过步骤的 `concept` 引用其所属场景进入。文件字段约定结构,不规定业务的画法。
|
|
302
|
+
|
|
303
|
+
每个项目的资料应通过一张或几张总览讲清整体业务,再逐步进入细节。只有分散的接口
|
|
304
|
+
流程并不满足项目建图的阅读目标。源码证据可以分布在多个仓库,图按完整业务组织;
|
|
305
|
+
本地路径锚点继续相对资料所属仓库,跨项目线索可由 `search` 锚点注明项目和入口。
|
|
306
|
+
|
|
307
|
+
一条流程可以有多个真实入口,`startsAt` 列出它们;没有执行关系的入口无需补出共同
|
|
308
|
+
触发或连线。动作有多个无条件后继时,各条路径分别继续,适合表达同一事件的独立
|
|
309
|
+
消费者。判断的带条件后继仍表示业务选择。多个入口与分支均由 AI 在资料中显式写出,
|
|
310
|
+
软件不自动补全业务联系。多条线汇入一个步骤不自行声明等待语义;需要等待哪些工作
|
|
311
|
+
完成,应使用具体动作与说明表达。阅读器负责展示,不执行或模拟流程。
|
|
300
312
|
`part_of` 只表达业务归属,不推断执行先后;没有 `flows` 的资料仍可被 CLI 查询,
|
|
301
313
|
阅读器显示空状态。
|
|
302
314
|
|
|
@@ -326,11 +338,11 @@ The complete repository map must satisfy:
|
|
|
326
338
|
12. Normalized graph order is deterministic across file discovery order.
|
|
327
339
|
13. Flow IDs are repository-wide unique and each flow belongs to an existing
|
|
328
340
|
`scenario`.
|
|
329
|
-
14. Step IDs are unique within a flow; `startsAt
|
|
330
|
-
optional concept
|
|
331
|
-
15. Actions have
|
|
341
|
+
14. Step IDs are unique within a flow; every `startsAt` ID, transition endpoint,
|
|
342
|
+
and optional concept reference resolves. Entry IDs are nonempty and unique.
|
|
343
|
+
15. Actions have unlabeled outgoing transitions, decisions have at
|
|
332
344
|
least two uniquely labeled outgoing transitions, and outcomes have none.
|
|
333
|
-
16. Every flow step is reachable from
|
|
345
|
+
16. Every flow step is reachable from at least one declared entry; cycles remain valid.
|
|
334
346
|
|
|
335
347
|
Horizontal relation endpoints follow their business meaning:
|
|
336
348
|
|
package/docs/product-contract.md
CHANGED
|
@@ -4,9 +4,10 @@ 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
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
**Status: the behavior below is implemented for 4.1.0, including named-project
|
|
8
|
+
queries, multiple flow entries, unconditional fan-out and overview authoring
|
|
9
|
+
guidance. Exact publication identity lives in the corresponding GitHub Release;
|
|
10
|
+
longitudinal acceptance remains in progress.**
|
|
10
11
|
|
|
11
12
|
## Purpose
|
|
12
13
|
|
|
@@ -48,12 +49,10 @@ uses current evidence and is held to a higher accuracy standard than the map.
|
|
|
48
49
|
|
|
49
50
|
### Coding agent orientation
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
otherwise establishes the smallest source-supported business boundary, then
|
|
56
|
-
opens decisive current evidence before editing.
|
|
52
|
+
Agent 接到功能、缺陷、重构或影响分析任务后,按已知流程或概念 ID 直接读取;只有
|
|
53
|
+
业务意图时才搜索相关流程。已登记项目可通过 `project list` 与 `--project <名称或ID>`
|
|
54
|
+
从任意工作目录定位。未登记项目可显式使用 `--repo <路径>`。业务图缺失时,先建立
|
|
55
|
+
当前任务所需且有源码依据的业务理解;修改前核实会决定结果的当前证据。
|
|
57
56
|
|
|
58
57
|
For a mapped business action, a source-file-bound symbol can point to the
|
|
59
58
|
specific method or function that carries it. The Agent locates that declaration
|
|
@@ -85,9 +84,12 @@ The explicit `web --repo <paths...>` form remains a temporary project set for
|
|
|
85
84
|
one session. It neither writes the user-local project file nor implicitly
|
|
86
85
|
merges registered paths. The browser receives service-assigned project IDs and
|
|
87
86
|
display names, never repository paths, and cannot submit a filesystem path.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
所有可视页面统一为业务流程图。AI 根据真实业务决定怎样概括、拆分和连接,不套用
|
|
88
|
+
固定的开始、判断和结束结构。每个项目的资料都应有能讲清整体业务的一张或几张总览,
|
|
89
|
+
再按真实环节进入细图,例如“顾客下单并付款 → 仓库发货 → 按顾客申请进入售后退款”。
|
|
90
|
+
细图目录不能代替整体业务理解,独立业务仍保留真实路径。业务跨前端、后端或其他
|
|
91
|
+
服务时,AI 按缺失环节寻找证据,仓库边界不截断图的业务叙述。软件提供表达、渲染
|
|
92
|
+
和导航能力,由 AI 组织总览与细节,不自动拼成巨图或推断执行关系。
|
|
91
93
|
|
|
92
94
|
流程节点可以引用场景,进入该场景自己的子流程。没有被其他流程引用的根流程排在
|
|
93
95
|
前面,默认打开第一条根流程;其余流程通过“查看其他流程”的级联菜单或节点角标进入。没有流程资料
|
|
@@ -187,6 +189,10 @@ A flow belongs to one existing scenario and orders business-granularity
|
|
|
187
189
|
transitions carry distinct business labels. A step can reference an existing
|
|
188
190
|
场景概念 ID,从该步骤进入场景自有的子流程,无需第二套链接字段。
|
|
189
191
|
|
|
192
|
+
同一张图支持多个真实业务入口与独立并行后续。`startsAt` 可写一个 ID 或非空列表,
|
|
193
|
+
解析与 CLI 返回统一为列表;动作的多条无条件后续均成立,判断的条件分支继续按条件
|
|
194
|
+
选择。软件按显式节点和连线展示,不要求编造共同入口,也不自动推断等待或执行状态。
|
|
195
|
+
|
|
190
196
|
Flows retain only steps that can change a user-visible result, durable data,
|
|
191
197
|
cost or provider usage, authorization or tenant isolation, an interface, or a
|
|
192
198
|
business outcome. They can express stable loops, but they remain advisory
|
|
@@ -318,8 +324,8 @@ stages.
|
|
|
318
324
|
- `lzj960515/semantic-atlas` is the active public source repository and
|
|
319
325
|
`semantic-atlas` is the npm package identity.
|
|
320
326
|
- Releases are normal fast-forward continuations of public `main`.
|
|
321
|
-
-
|
|
322
|
-
|
|
327
|
+
- 全局安装、`setup` 与 `upgrade` 同步唯一新版 Skill,接管已识别的旧格式并清理旧维护入口;
|
|
328
|
+
身份属于其他 Skill 的目录继续保留。
|
|
323
329
|
- Observation reads and writes use the current task and review schemas; old
|
|
324
330
|
local formats are disposable rather than migration inputs.
|
|
325
331
|
- Existing Git tags, GitHub Releases, and npm versions remain immutable release
|
|
@@ -330,15 +336,18 @@ stages.
|
|
|
330
336
|
The published CLI owns installation of its bundled user Skills:
|
|
331
337
|
|
|
332
338
|
```text
|
|
333
|
-
npm install --global semantic-atlas
|
|
334
|
-
semantic-atlas setup
|
|
339
|
+
npm install --global semantic-atlas --allow-scripts=semantic-atlas
|
|
335
340
|
```
|
|
336
341
|
|
|
337
|
-
`
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
+
使用 `npm install --global semantic-atlas --allow-scripts=semantic-atlas` 一次完成 CLI 与
|
|
343
|
+
统一 Skill 的接入。安装入口只在全局模式执行;普通项目安装保持用户目录不变。
|
|
344
|
+
`setup` 仍可显式修复,`upgrade` 委派新版 CLI 同步 Skill。启用 npm 12 的安装脚本只需
|
|
345
|
+
允许本包,无需修改全局配置;主动禁用脚本的安装需显式执行 setup。
|
|
346
|
+
|
|
347
|
+
唯一源保存在 `~/.agents/skills/semantic-atlas`,Codex/Claude 的入口指向这份资料。
|
|
348
|
+
当前管理标记或准确的 Skill 名称识别本产品旧目录,安装使用原子替换,随后移除各发现
|
|
349
|
+
目录中的旧维护 Skill 与过期副本。父发现目录已共享时不删除唯一源;其他 Skill 保留。
|
|
350
|
+
业务仓库只共享业务 YAML,安装与公开发布各自验证。
|
|
342
351
|
|
|
343
352
|
### Accuracy observations
|
|
344
353
|
|
|
@@ -9,8 +9,9 @@ pnpm build
|
|
|
9
9
|
node dist/cli/bin.js web --repo examples/订单管理 --port 4324 --no-open
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
默认打开“订单全流程”:顾客下单付款后,仓库发货与购买确认各自进行;退款申请有自己
|
|
13
|
+
的起点,交给售后核对。本图显式编写多个入口和并行连线,没有生成共同触发节点。
|
|
14
|
+
点击下单、发货或售后节点右上角的角标,直接进入子流程。
|
|
14
15
|
下单流程还可以继续进入支付细图。“查看其他流程”按层级展开;“上一层”沿实际来路恢复。
|
|
15
16
|
|
|
16
17
|
所有图都是流程图;起点、判断、结果与子流程节点有不同样式。资料只由 AI 修改文件。
|
package/examples//350/256/242/345/215/225/347/256/241/347/220/206/docs/business-map/orders.yaml
CHANGED
|
@@ -50,7 +50,7 @@ nodes:
|
|
|
50
50
|
- id: shopping.journey
|
|
51
51
|
kind: scenario
|
|
52
52
|
name: 订单全流程
|
|
53
|
-
summary:
|
|
53
|
+
summary: 已付款订单分别进入发货和购买通知;退款申请从自己的入口交给售后。
|
|
54
54
|
aliases: []
|
|
55
55
|
anchors: []
|
|
56
56
|
relations:
|
|
@@ -93,9 +93,9 @@ relations:
|
|
|
93
93
|
flows:
|
|
94
94
|
- id: shopping.journey.flow
|
|
95
95
|
name: 订单全流程
|
|
96
|
-
summary:
|
|
96
|
+
summary: 付款后发货与购买通知各自进行;顾客申请退款时,由售后核对处理。
|
|
97
97
|
scenario: shopping.journey
|
|
98
|
-
startsAt: checkout
|
|
98
|
+
startsAt: [checkout, refund-request]
|
|
99
99
|
steps:
|
|
100
100
|
- id: checkout
|
|
101
101
|
kind: action
|
|
@@ -108,10 +108,19 @@ flows:
|
|
|
108
108
|
name: 仓库发货
|
|
109
109
|
summary: 核对商品、打包并交给承运商。
|
|
110
110
|
concept: fulfillment.ship
|
|
111
|
-
- id:
|
|
112
|
-
kind:
|
|
113
|
-
name:
|
|
114
|
-
summary:
|
|
111
|
+
- id: confirmation
|
|
112
|
+
kind: action
|
|
113
|
+
name: 发送购买确认
|
|
114
|
+
summary: 将付款订单的购买凭证发给顾客。
|
|
115
|
+
notes: 发货和购买确认分别处理,任一项不必等候另一项完成。
|
|
116
|
+
- id: notified
|
|
117
|
+
kind: outcome
|
|
118
|
+
name: 顾客收到购买确认
|
|
119
|
+
summary: 购买确认通知流程结束。
|
|
120
|
+
- id: refund-request
|
|
121
|
+
kind: action
|
|
122
|
+
name: 顾客提交退款申请
|
|
123
|
+
summary: 售后申请有独立入口,不要求顾客等待发货流程结束。
|
|
115
124
|
- id: refund
|
|
116
125
|
kind: outcome
|
|
117
126
|
name: 售后退款
|
|
@@ -119,19 +128,19 @@ flows:
|
|
|
119
128
|
concept: aftersales.refund
|
|
120
129
|
- id: completed
|
|
121
130
|
kind: outcome
|
|
122
|
-
name:
|
|
123
|
-
summary:
|
|
131
|
+
name: 包裹已交运
|
|
132
|
+
summary: 仓库完成本次发货。
|
|
124
133
|
transitions:
|
|
125
134
|
- from: checkout
|
|
126
135
|
to: ship
|
|
136
|
+
- from: checkout
|
|
137
|
+
to: confirmation
|
|
127
138
|
- from: ship
|
|
128
|
-
to: needs-refund
|
|
129
|
-
- from: needs-refund
|
|
130
|
-
to: refund
|
|
131
|
-
when: 申请退款
|
|
132
|
-
- from: needs-refund
|
|
133
139
|
to: completed
|
|
134
|
-
|
|
140
|
+
- from: confirmation
|
|
141
|
+
to: notified
|
|
142
|
+
- from: refund-request
|
|
143
|
+
to: refund
|
|
135
144
|
- id: shopping.checkout.flow
|
|
136
145
|
name: 提交并支付订单
|
|
137
146
|
summary: 顾客确认商品后提交订单,付款成功后等待发货。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-atlas",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "面向人与 AI 协作的业务流程图与只读阅读器。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"docs/observations.md",
|
|
45
45
|
"docs/product-contract.md",
|
|
46
46
|
"examples",
|
|
47
|
+
"scripts/postinstall.mjs",
|
|
47
48
|
"LICENSE",
|
|
48
49
|
"README.md",
|
|
49
50
|
"README.zh-CN.md"
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
"vitest": "^3.2.4"
|
|
73
74
|
},
|
|
74
75
|
"scripts": {
|
|
76
|
+
"postinstall": "node scripts/postinstall.mjs",
|
|
75
77
|
"build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.build.json",
|
|
76
78
|
"contracts:check": "vitest run tests/release/release-contract.test.ts",
|
|
77
79
|
"release:verify": "pnpm lint && pnpm format:check && pnpm contracts:check && pnpm test && pnpm typecheck && pnpm build && node tests/smoke/built-render.mjs && node tests/smoke/built-skill.mjs && node tests/smoke/packaged-product.mjs && pnpm pack --dry-run && git diff --check",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Repository and dependency installs do not modify user-level agent discovery.
|
|
2
|
+
if (process.env.npm_config_global === "true") {
|
|
3
|
+
const { runCli } = await import("../dist/cli/run-cli.js");
|
|
4
|
+
const result = await runCli(["setup"]);
|
|
5
|
+
process.stdout.write(result.stdout);
|
|
6
|
+
process.stderr.write(result.stderr);
|
|
7
|
+
process.exitCode = result.exitCode;
|
|
8
|
+
}
|