semantic-atlas 5.1.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.
- package/.agents/skills/semantic-atlas/SKILL.md +8 -0
- package/README.md +192 -244
- package/README.zh-CN.md +159 -220
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +3 -0
- package/dist/cli/run-cli.js.map +1 -1
- package/dist/i18n/index.d.ts +12 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/cli.d.ts +2 -0
- package/dist/i18n/locales/en/cli.d.ts.map +1 -1
- package/dist/i18n/locales/en/cli.js +2 -0
- package/dist/i18n/locales/en/cli.js.map +1 -1
- package/dist/i18n/locales/en/viewer.d.ts +4 -0
- package/dist/i18n/locales/en/viewer.d.ts.map +1 -1
- package/dist/i18n/locales/en/viewer.js +4 -0
- package/dist/i18n/locales/en/viewer.js.map +1 -1
- package/dist/i18n/locales/zh-CN/cli.d.ts +2 -0
- package/dist/i18n/locales/zh-CN/cli.d.ts.map +1 -1
- package/dist/i18n/locales/zh-CN/cli.js +2 -0
- package/dist/i18n/locales/zh-CN/cli.js.map +1 -1
- package/dist/i18n/locales/zh-CN/viewer.d.ts +4 -0
- package/dist/i18n/locales/zh-CN/viewer.d.ts.map +1 -1
- package/dist/i18n/locales/zh-CN/viewer.js +4 -0
- package/dist/i18n/locales/zh-CN/viewer.js.map +1 -1
- package/dist/rendering/flow-projector.js +5 -2
- package/dist/rendering/flow-projector.js.map +1 -1
- package/dist/rendering/viewer-browser.d.ts.map +1 -1
- package/dist/rendering/viewer-browser.js +76 -17
- package/dist/rendering/viewer-browser.js.map +1 -1
- package/dist/rendering/viewer-layout.d.ts.map +1 -1
- package/dist/rendering/viewer-layout.js +81 -13
- package/dist/rendering/viewer-layout.js.map +1 -1
- package/dist/rendering/viewer-location.d.ts +7 -0
- package/dist/rendering/viewer-location.d.ts.map +1 -0
- package/dist/rendering/viewer-location.js +16 -0
- package/dist/rendering/viewer-location.js.map +1 -0
- package/dist/rendering/viewer-page.js +4 -1
- package/dist/rendering/viewer-page.js.map +1 -1
- package/dist/web/local-web-application.d.ts +1 -0
- package/dist/web/local-web-application.d.ts.map +1 -1
- package/dist/web/local-web-application.js +14 -0
- package/dist/web/local-web-application.js.map +1 -1
- package/dist/web/web-command-service.d.ts +1 -0
- package/dist/web/web-command-service.d.ts.map +1 -1
- package/dist/web/web-command-service.js +4 -2
- package/dist/web/web-command-service.js.map +1 -1
- package/docs/architecture.md +24 -2
- package/docs/evaluation.md +6 -0
- package/docs/map-format.md +9 -0
- package/docs/product-contract.md +19 -4
- package/package.json +1 -1
|
@@ -162,4 +162,12 @@ YAML 中应维护的声明。`scope: "recorded"` 表示只反映已记录关系
|
|
|
162
162
|
|
|
163
163
|
## 7. 交付
|
|
164
164
|
|
|
165
|
+
需要让人查看指定业务流程时,先取得准确流程 ID,再运行
|
|
166
|
+
`semantic-atlas web --project "<name-or-id>" --flow "<flow-id>" --no-open`
|
|
167
|
+
(未登记时替换为单个 `--repo "<absolute-path>"`)。命令先校验目标,再在 `data.url`
|
|
168
|
+
返回带项目和流程的直达链接;交付这个完整地址,让人打开即看到目标图。
|
|
169
|
+
已有服务时,可用其地址加 `#project=<project-id>&flow=<flow-id>`,按 URL 参数编码;
|
|
170
|
+
项目 ID 来自当前服务的项目目录,不能猜首项。链接定位对应服务中的项目与流程,
|
|
171
|
+
导出的自包含 HTML 也支持同样的 fragment 定位。切图会同步地址,复制当前 URL 即可。
|
|
172
|
+
|
|
165
173
|
说明当前业务边界、关键依据、代码与流程分别改了什么,以及实际验证。没有业务变化或无需结构性改图时给出简短依据。直接画图提供阅读入口与文件;仅分析时说明建议改动。把已核实的覆盖、尚未调查的范围、资料缺口、未完成的运行验证,以及本地修改与实际合入状态分别讲清楚。当前结果已充分验证后结束,不补画无关业务。
|
package/README.md
CHANGED
|
@@ -6,322 +6,270 @@
|
|
|
6
6
|
|
|
7
7
|
English | [简体中文](README.zh-CN.md)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
怎样运转,代码负责实现,测试与运行记录用于检查兑现情况。人通过只读画布讨论
|
|
11
|
-
流程、分支与结果,AI 维护 Git 中同一份业务规范与对应实现。
|
|
12
|
-
总览和子图统一为业务流程图;业务归属、源码锚点与查询为 AI 提供调查入口。
|
|
9
|
+
**Business flows are a first-class part of building software with AI.**
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
workflow and updates affected business flows in the same branch.
|
|
11
|
+
Semantic Atlas gives people and their coding agents a shared place to understand,
|
|
12
|
+
discuss, and maintain how a business works. People read interactive flow diagrams.
|
|
13
|
+
AI edits the underlying files, finds the relevant code, and keeps both together
|
|
14
|
+
as the business changes.
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
Use it with a coding agent such as Codex or Claude Code. The product provides a
|
|
17
|
+
read-only flow viewer, a local CLI, and one bundled Skill that guides the agent's
|
|
18
|
+
business investigation, drawing, and maintenance.
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
## Start With The Business
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```
|
|
22
|
+
As AI writes more code, people need a way to agree on its intended behavior.
|
|
23
|
+
Business flows make the actors, actions, conditions, and outcomes visible so
|
|
24
|
+
engineers and business teams can review the same decisions.
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
`--allow-scripts=semantic-atlas` 允许 npm 12 执行本包的安装步骤,不改变全局 npm 配置。
|
|
32
|
-
普通项目依赖安装不会改动用户级 Skill;主动禁用安装脚本时,可运行 `semantic-atlas setup`。
|
|
26
|
+
**Confirmed flows define the business specification. Code implements it. Tests
|
|
27
|
+
and runtime evidence check whether the implementation delivers it.**
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
When code and a flow disagree, the agent checks the business decision behind the
|
|
30
|
+
rule. The difference may be an implementation defect, an error in the diagram,
|
|
31
|
+
or a change in requirements. Existing code alone is insufficient reason to
|
|
32
|
+
rewrite an agreed rule. Unresolved differences stay explicit.
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
For a project without flows, the agent investigates the existing implementation
|
|
35
|
+
and drafts them progressively. It distinguishes confirmed requirements from
|
|
36
|
+
current behavior and open questions, revising earlier work as it learns more.
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
4.1.1 已支持 npm 12 返回的单项版本数组;更新后继续使用 `upgrade`。
|
|
38
|
+
## People Read, AI Maintains
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
| People | AI |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| Read and explain the business | Investigate the business and its implementation |
|
|
43
|
+
| Follow branches and open local details | Write and reorganize flow source files |
|
|
44
|
+
| Discuss rules and decide intended behavior | Find relevant code and related business flows |
|
|
45
|
+
| Review changes against the agreed flows | Update flows and code in the same branch |
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
The browser is a read-only canvas. Distinct node styles identify starting
|
|
48
|
+
points, decisions, outcomes, and steps with deeper flows. Click a step's corner
|
|
49
|
+
icon to enter a deeper flow, then use **Previous level** to return. A small
|
|
50
|
+
information marker identifies notes; click the node body to read them.
|
|
51
|
+
Each declared entry has a **Start** badge and a blue outline so readers can find
|
|
52
|
+
where to begin, including flows with multiple entries.
|
|
53
|
+
**Other flows** opens a cascading menu for direct navigation.
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
再运行 `semantic-atlas setup`。`upgrade` 若在 `step: "setup"` 失败,已安装的 CLI 保持,
|
|
55
|
-
处理这个目录后重跑 setup 即可,无需重新安装软件。不要手工伪造管理标记。
|
|
55
|
+
Business readers see the process and its explanations. Code file and method
|
|
56
|
+
references remain available to AI through the source files and CLI.
|
|
56
57
|
|
|
57
|
-
##
|
|
58
|
+
## Install
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
Requires Node.js 24 or later.
|
|
60
61
|
|
|
61
|
-
```
|
|
62
|
-
|
|
62
|
+
```bash
|
|
63
|
+
npm install --global semantic-atlas --allow-scripts=semantic-atlas
|
|
64
|
+
semantic-atlas --version
|
|
63
65
|
```
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
map:
|
|
70
|
-
id: commerce
|
|
71
|
-
title: Commerce
|
|
72
|
-
summary: Customer-facing product discovery and purchase.
|
|
73
|
-
|
|
74
|
-
nodes:
|
|
75
|
-
- id: commerce
|
|
76
|
-
kind: domain
|
|
77
|
-
name: Commerce
|
|
78
|
-
summary: Customer-facing product discovery and purchase.
|
|
79
|
-
aliases: []
|
|
80
|
-
anchors:
|
|
81
|
-
- kind: directory
|
|
82
|
-
value: src/commerce
|
|
83
|
-
description: Likely source entry point for Commerce behavior.
|
|
84
|
-
|
|
85
|
-
relations: []
|
|
86
|
-
flows: []
|
|
87
|
-
```
|
|
67
|
+
Global installation also installs the unified `semantic-atlas` Skill. Codex and
|
|
68
|
+
Claude share its entry at `~/.agents/skills/semantic-atlas`; recognized older
|
|
69
|
+
maintenance Skills are removed during setup. The npm 12 `--allow-scripts` option
|
|
70
|
+
allows this package's installation step without changing global npm settings.
|
|
88
71
|
|
|
89
|
-
|
|
90
|
-
business flows, anchors, validation rules, and lookup behavior.
|
|
72
|
+
## Create And Read Your First Flows
|
|
91
73
|
|
|
92
|
-
|
|
93
|
-
file so the Agent can begin with that declaration:
|
|
74
|
+
Ask your coding agent:
|
|
94
75
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- kind: symbol
|
|
98
|
-
file: src/orders/place-order.service.ts
|
|
99
|
-
value: PlaceOrderService.execute
|
|
100
|
-
description: Confirm inventory and create a durable customer order.
|
|
101
|
-
```
|
|
76
|
+
> Use Semantic Atlas to map this project's business so I can explain it to a new
|
|
77
|
+
> teammate.
|
|
102
78
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
The
|
|
106
|
-
|
|
107
|
-
can refine them when current evidence establishes a more precise business entry.
|
|
79
|
+
The agent uses the bundled Skill to investigate and write flow source files in
|
|
80
|
+
`docs/business-map/*.yaml`, alongside the project's code and Git history.
|
|
81
|
+
The [Skill](.agents/skills/semantic-atlas/SKILL.md) contains the drawing and
|
|
82
|
+
maintenance guidance; the [file format](docs/map-format.md) defines the fields.
|
|
108
83
|
|
|
109
|
-
|
|
84
|
+
After the files exist, register the project and open the viewer:
|
|
110
85
|
|
|
111
86
|
```bash
|
|
112
|
-
semantic-atlas
|
|
113
|
-
semantic-atlas search "order confirmation notification" --flows --repo /path/to/repository
|
|
114
|
-
semantic-atlas flows "engagement.notifications.confirm-order-flow" --repo /path/to/repository
|
|
115
|
-
semantic-atlas context "engagement.notifications.send-order-confirmation" --repo /path/to/repository
|
|
116
|
-
semantic-atlas render --repo /path/to/repository --output ./business-map.html
|
|
117
|
-
semantic-atlas project add /path/to/repository
|
|
87
|
+
semantic-atlas project add /path/to/my-app
|
|
118
88
|
semantic-atlas project list
|
|
119
|
-
semantic-atlas search "order confirmation notification" --flows --project repository
|
|
120
89
|
semantic-atlas web
|
|
121
90
|
```
|
|
122
91
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
`validate` checks every map document as one graph. `search` ranks up to five
|
|
130
|
-
concepts with stable IDs, query-relative scores, matched fields, and current YAML
|
|
131
|
-
maintenance locations. The first candidate's ID appears in `contextFor`: only
|
|
132
|
-
that candidate has an attached business summary. It remains a lexical candidate
|
|
133
|
-
for the Agent to assess; use another candidate's ID with `context` when needed.
|
|
134
|
-
|
|
135
|
-
The shared summary returns unique concept details and source anchors, typed
|
|
136
|
-
relations with business reasons, and related flow references with step locations.
|
|
137
|
-
It covers direct relations and other recorded users of shared data, interfaces,
|
|
138
|
-
and invariants. `scope: "recorded"` marks this as investigation evidence to
|
|
139
|
-
confirm in source. It does not establish complete change impact.
|
|
140
|
-
|
|
141
|
-
`context` retains exact and partial selectors and adds the selected concept,
|
|
142
|
-
ancestor IDs and direct child IDs. Related flows remain summaries;
|
|
143
|
-
`flows <id>` expands that flow's full local steps and
|
|
144
|
-
transitions. Scenario, parent, step concept and child-flow references use IDs;
|
|
145
|
-
concept details and anchors appear once in the same response. Query commands
|
|
146
|
-
emit compact versioned JSON with only `repository.root`, without a map-file
|
|
147
|
-
inventory. Each item's `map` locates its current YAML declaration. See the
|
|
148
|
-
[query contract](docs/map-format.md#context-projection) for fields and limits.
|
|
149
|
-
`render` produces a deterministic, self-contained interactive HTML Viewer from
|
|
150
|
-
that same normalized map.
|
|
151
|
-
|
|
152
|
-
AI 按业务问题直接定位流程:已知编号时直接 `flows <flow-id>`,未知时用
|
|
153
|
-
`search "<业务描述>" --flows` 返回相关流程及命中步骤的维护位置。`contextFor` 标明
|
|
154
|
-
第一流程候选的关联摘要;另一个候选更合适时按其流程 ID 读取,或用 `scenarioId`
|
|
155
|
-
查询概念上下文。完整步骤与子流程按需读取,没有必须先读总览的顺序。
|
|
156
|
-
搜索使用业务名称、别名、步骤和说明做词面匹配,AI 仍需判断业务含义,不能把分数当成证据。
|
|
157
|
-
|
|
158
|
-
人通过画布阅读。所有页面统一为流程图;节点角标直接进子流程,多目标先选择。
|
|
159
|
-
正文有备注才打开默认关闭的说明,说明中没有进入按钮。“上一层”沿实际来路返回。
|
|
160
|
-
“查看其他流程”按父子流程逐列展开,单项目名不重复显示。源码与 AI 编排理由在界面隐藏。
|
|
161
|
-
|
|
162
|
-
AI 根据真实业务决定每张图的范围、平级关系与必要详图。项目可以直接提供多张平级
|
|
163
|
-
业务图,无需共同父图或专门的“业务全貌”图。每张图讲清自己的业务,相关主线不拆散,
|
|
164
|
-
独立业务不强行合并;跨项目环节沿实际业务找源码,软件不自动拼图或推断执行关系。
|
|
165
|
-
|
|
166
|
-
同一流程的 `startsAt` 可写多个真实入口;普通动作可以连接多个无条件后续,表示各条
|
|
167
|
-
路径都成立。带条件的选择继续使用判断节点。CLI 的 `startsAt` 统一返回 ID 列表,
|
|
168
|
-
这是 4.0 的公开结果类型变化;原有单 ID 输入仍可读取。详见[格式](docs/map-format.md)。
|
|
169
|
-
|
|
170
|
-
没有 `flows` 时显示空状态。可运行[订单管理阅读样例](examples/订单管理/README.md)。
|
|
171
|
-
|
|
172
|
-
`project add [path]` validates the complete business map and saves its
|
|
173
|
-
normalized checkout path in the versioned user-local
|
|
174
|
-
`~/.semantic-atlas/projects.json` file. Omitting `path` uses the current
|
|
175
|
-
directory. Repeating a valid path is idempotent; a missing or invalid map leaves
|
|
176
|
-
the file unchanged.
|
|
177
|
-
|
|
178
|
-
`web` starts the same Viewer on a read-only `127.0.0.1` server and opens the
|
|
179
|
-
default browser. With neither `--repo` nor `--project`, it reads the registered list from any current
|
|
180
|
-
directory. An empty list opens an instructional empty state. The initial page
|
|
181
|
-
contains only project names and opaque IDs; it loads and validates a map only
|
|
182
|
-
when that project is initially selected or selected later. An unavailable path
|
|
183
|
-
stays in the list and does not prevent another project from loading.
|
|
184
|
-
|
|
185
|
-
Pass several repositories after one `--repo` option for a temporary session:
|
|
92
|
+
Registered projects are available by name or ID from any working directory.
|
|
93
|
+
Names come from checkout directory names: the example above becomes `my-app`.
|
|
94
|
+
For duplicate names, use the ID returned by `project list`. A misspelled project
|
|
95
|
+
name returns suggestions for the agent to assess and retry explicitly.
|
|
96
|
+
|
|
97
|
+
You can also open repositories for a temporary session:
|
|
186
98
|
|
|
187
99
|
```bash
|
|
188
100
|
semantic-atlas web --repo /path/to/api /path/to/frontend --port 4310 --no-open
|
|
189
101
|
```
|
|
190
102
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
103
|
+
Temporary paths are not merged with registered projects and are not saved.
|
|
104
|
+
Each project loads its own files. Reselect or refresh a project to read its latest
|
|
105
|
+
flows; press `Ctrl+C` to stop the server. To read an existing flow collection,
|
|
106
|
+
start here; generating new files is only needed when the relevant flows are absent.
|
|
107
|
+
|
|
108
|
+
To try a fictional flow from a source checkout, see the
|
|
109
|
+
[order-management example](examples/订单管理/README.md).
|
|
110
|
+
|
|
111
|
+
### Open A Specific Flow
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
semantic-atlas web --project my-app --flow "<flow-id>" --no-open
|
|
115
|
+
```
|
|
196
116
|
|
|
197
|
-
|
|
117
|
+
The command validates the target and returns its full local URL in `data.url`,
|
|
118
|
+
including `#project=<project-id>&flow=<flow-id>`. The agent gives you that link
|
|
119
|
+
to open the exact diagram. For an unregistered project, use a single
|
|
120
|
+
`--repo /path/to/my-app`. With several registered projects, select one explicitly.
|
|
198
121
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
122
|
+
Switching projects or flows updates the URL. Copy it to reopen the same diagram;
|
|
123
|
+
refresh and browser back/forward restore the target. Unknown targets show a
|
|
124
|
+
clear message. Exported HTML uses the same fragment format with its embedded
|
|
125
|
+
project ID.
|
|
203
126
|
|
|
204
|
-
|
|
205
|
-
for implementation details and the optional debugging override.
|
|
127
|
+
## Let The Business Decide The Diagram
|
|
206
128
|
|
|
207
|
-
|
|
129
|
+
Each diagram should explain a meaningful business process: who wants what,
|
|
130
|
+
which actions and conditions matter, and how the result is used. A project may
|
|
131
|
+
have several peer flows. Keep a coherent process together, and move a complex
|
|
132
|
+
local part into a deeper flow when that helps the reader understand it.
|
|
208
133
|
|
|
209
|
-
|
|
134
|
+
The agent chooses boundaries and depth from the business. A flow may cross a
|
|
135
|
+
frontend, backend, background job, and another repository; missing parts of the
|
|
136
|
+
story guide the next investigation. Multiple entry points and parallel paths
|
|
137
|
+
can be expressed when the business has them.
|
|
210
138
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
outcomes that the task can affect.
|
|
216
|
-
4. Check source and tests against the confirmed business rules.
|
|
217
|
-
5. Use business decisions to establish intended behavior and runtime evidence to
|
|
218
|
-
establish what actually happened.
|
|
219
|
-
6. Classify discrepancies as implementation defects, flow errors, or changed intent;
|
|
220
|
-
never rewrite a confirmed flow merely because code differs.
|
|
221
|
-
7. Implement, verify, and recheck the affected business paths through the
|
|
222
|
-
repository's normal engineering workflow.
|
|
223
|
-
8. 业务行为变化时,在同一分支同步代码与流程,一起验证和合入;纯实现调整不强制改图。
|
|
139
|
+
Node text states the concrete action or condition concisely. Notes carry longer
|
|
140
|
+
explanations, lists, and the business reasons behind a rule. The agent reviews
|
|
141
|
+
the source files for complete paths, misplaced fragments, unclear language, and
|
|
142
|
+
agreement with the business before handing them over.
|
|
224
143
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
144
|
+
Semantic Atlas manages, searches, validates, and renders these files. The Skill
|
|
145
|
+
teaches how to use those capabilities. The agent decides what to draw and how to
|
|
146
|
+
organize it, using the [flow-design guidance](.agents/skills/semantic-atlas/references/diagram-design.md).
|
|
228
147
|
|
|
229
|
-
##
|
|
148
|
+
## Change The Business And Its Implementation Together
|
|
230
149
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
150
|
+
1. Locate the relevant business flow and related code.
|
|
151
|
+
2. Express a changed business rule in the flow before implementing it. When fixing
|
|
152
|
+
code that violates an existing rule, preserve the correct flow.
|
|
153
|
+
3. Implement and verify the behavior. Check related flows when their conditions,
|
|
154
|
+
outcomes, or collaborators are affected.
|
|
155
|
+
4. Review and commit the flow and code changes in the same branch.
|
|
234
156
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
157
|
+
Internal refactoring or a comment change can leave the business flow unchanged.
|
|
158
|
+
During a merge, establish the combined business rules first, then check that the
|
|
159
|
+
merged implementation satisfies them.
|
|
238
160
|
|
|
239
|
-
|
|
240
|
-
新版发布后再按新契约重写,当前不迁移其他项目。
|
|
161
|
+
## Query Business Context For AI
|
|
241
162
|
|
|
242
|
-
|
|
163
|
+
<a id="query-and-render"></a>
|
|
243
164
|
|
|
244
|
-
|
|
165
|
+
An agent can enter through a known flow or concept ID, or search by business
|
|
166
|
+
intent. It chooses the relevant entry directly; the viewer's hierarchy is for
|
|
167
|
+
human navigation.
|
|
245
168
|
|
|
246
169
|
```bash
|
|
247
|
-
semantic-atlas
|
|
248
|
-
semantic-atlas
|
|
249
|
-
semantic-atlas
|
|
250
|
-
semantic-atlas insights summary --repo /path/to/repository --period 4w
|
|
170
|
+
semantic-atlas search "cancel an order before shipment" --flows --project my-app
|
|
171
|
+
semantic-atlas flows "<flow-id>" --project my-app
|
|
172
|
+
semantic-atlas context "<concept-id>" --project my-app
|
|
251
173
|
```
|
|
252
174
|
|
|
253
|
-
|
|
175
|
+
Use the IDs returned by the query. Results are compact JSON with business rules,
|
|
176
|
+
recorded relationships, related flow references, flow-file locations, and code
|
|
177
|
+
file or symbol anchors. These help the agent find the implementation and the
|
|
178
|
+
flow files affected by a change. Recorded links describe known relationships;
|
|
179
|
+
the agent still traces any missing callers or consumers needed for the task.
|
|
180
|
+
|
|
181
|
+
Search ranks up to five candidates using words in business names, aliases,
|
|
182
|
+
steps, and descriptions. The attached context belongs to the first candidate;
|
|
183
|
+
the agent assesses it and fetches another candidate by ID when appropriate.
|
|
184
|
+
Code symbols are navigation hints, while flow-file line locations point to the
|
|
185
|
+
current declarations to maintain. See the [query contract](docs/map-format.md#context-projection).
|
|
254
186
|
|
|
255
|
-
|
|
187
|
+
Use `--repo /path/to/my-app` instead of `--project my-app` for an unregistered
|
|
188
|
+
checkout. To validate or export a self-contained interactive HTML file:
|
|
256
189
|
|
|
257
190
|
```bash
|
|
258
|
-
semantic-atlas
|
|
259
|
-
semantic-atlas
|
|
191
|
+
semantic-atlas validate --project my-app
|
|
192
|
+
semantic-atlas render --project my-app --output ./business-flows.html
|
|
260
193
|
```
|
|
261
194
|
|
|
262
|
-
|
|
263
|
-
|
|
195
|
+
## Upgrade
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
semantic-atlas upgrade
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
This installs the current stable package, verifies the CLI version, and updates
|
|
202
|
+
the bundled Skill together. If an older CLI cannot complete its version check,
|
|
203
|
+
run the global installation command again.
|
|
204
|
+
|
|
205
|
+
<details>
|
|
206
|
+
<summary>Skill installation and conflicts</summary>
|
|
207
|
+
|
|
208
|
+
### Skill conflicts
|
|
209
|
+
|
|
210
|
+
If installation scripts were disabled, run `semantic-atlas setup`. Installing as
|
|
211
|
+
a project dependency leaves user-level Skills unchanged.
|
|
212
|
+
|
|
213
|
+
`MANAGED_SKILL_CONFLICT` means the destination cannot be identified as a Semantic
|
|
214
|
+
Atlas Skill. Move the reported directory outside agent Skill discovery paths,
|
|
215
|
+
then run `semantic-atlas setup` again. If `upgrade` fails at `step: "setup"`, the
|
|
216
|
+
CLI is already installed; resolve the directory conflict and rerun setup.
|
|
217
|
+
|
|
218
|
+
</details>
|
|
264
219
|
|
|
265
220
|
## Local Data And Privacy
|
|
266
221
|
|
|
267
|
-
|
|
268
|
-
|
|
222
|
+
Flow source files stay in their project repositories. Project registration
|
|
223
|
+
stores local checkout paths in `~/.semantic-atlas/projects.json`. The viewer
|
|
224
|
+
listens on `127.0.0.1`; repository paths stay server-side. Export writes a local
|
|
225
|
+
HTML file to the requested destination. Semantic Atlas works locally without
|
|
226
|
+
an account or telemetry uploads.
|
|
227
|
+
|
|
228
|
+
The CLI follows the terminal's language environment. The viewer and exported
|
|
229
|
+
HTML follow browser language preferences. English and Simplified Chinese are
|
|
230
|
+
supported; see [language selection](docs/architecture.md#internationalization).
|
|
269
231
|
|
|
270
|
-
|
|
271
|
-
|
|
232
|
+
<details>
|
|
233
|
+
<summary>Optional historical observations and reconciliation</summary>
|
|
234
|
+
|
|
235
|
+
These tools read or record explicit engineering observations. Use them when
|
|
236
|
+
working with retained evidence; ordinary maintenance keeps flows and code
|
|
237
|
+
together in the development branch.
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
semantic-atlas observe task --stdin --repo /path/to/my-app
|
|
241
|
+
semantic-atlas reconcile status --repo /path/to/my-app
|
|
242
|
+
semantic-atlas reconcile candidates --repo /path/to/my-app
|
|
272
243
|
```
|
|
273
244
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
service, account, telemetry upload, persistent graph database, or automatic
|
|
279
|
-
source/map mutation. `setup` and observation commands do not add files to a
|
|
280
|
-
target repository; `render` writes only the explicitly requested local output.
|
|
281
|
-
`web` binds only to loopback, exposes GET and HEAD, and reads either the
|
|
282
|
-
registered list or the explicit temporary `--repo` set.
|
|
245
|
+
See the [observation contract](docs/observations.md) for record formats and
|
|
246
|
+
historical-tool behavior.
|
|
247
|
+
|
|
248
|
+
</details>
|
|
283
249
|
|
|
284
250
|
## Development
|
|
285
251
|
|
|
286
|
-
|
|
287
|
-
|
|
252
|
+
Read the [contribution guide](https://github.com/lzj960515/semantic-atlas/blob/main/CONTRIBUTING.md)
|
|
253
|
+
for the upstream repository and PR workflow.
|
|
288
254
|
|
|
289
255
|
```bash
|
|
290
256
|
pnpm install --frozen-lockfile
|
|
291
|
-
pnpm lint
|
|
292
|
-
pnpm format:check
|
|
293
257
|
pnpm release:verify
|
|
294
258
|
```
|
|
295
259
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
semicolons, trailing commas, and a 100-column print width, while preserving
|
|
303
|
-
import order and embedded language content.
|
|
304
|
-
|
|
305
|
-
The release-candidate gate runs lint and formatting checks, contract and source
|
|
306
|
-
tests, typecheck, build,
|
|
307
|
-
rendering checks, packed-tarball privacy checks, an anonymous installed-product
|
|
308
|
-
flow, package dry-run, and Git diff validation.
|
|
309
|
-
|
|
310
|
-
Publication is a separate operation. After the repository's immutable-release
|
|
311
|
-
setting is enabled, a non-prerelease GitHub Release for an annotated version tag
|
|
312
|
-
triggers the protected npm workflow. The workflow verifies the specific Release
|
|
313
|
-
is immutable in a read-only job before any tag checkout or npm credential
|
|
314
|
-
boundary. Only then does the protected publish job repeat the candidate gate
|
|
315
|
-
and publish with npm provenance. A separate read-only job verifies public npm
|
|
316
|
-
visibility within five minutes and can be rerun without publishing again.
|
|
317
|
-
|
|
318
|
-
## Documentation
|
|
260
|
+
The candidate check covers lint, formatting, tests, types, build, rendering, and
|
|
261
|
+
packaged installation. Public releases use an immutable GitHub Release and the
|
|
262
|
+
protected npm workflow, with npm provenance and independent public-package
|
|
263
|
+
verification. See the [release procedure](https://github.com/lzj960515/semantic-atlas/blob/main/.claude/commands/release.md).
|
|
264
|
+
|
|
265
|
+
## Further Reading
|
|
319
266
|
|
|
267
|
+
- [Unified Skill](.agents/skills/semantic-atlas/SKILL.md)
|
|
268
|
+
- [Flow-design guidance](.agents/skills/semantic-atlas/references/diagram-design.md)
|
|
269
|
+
- [Flow source format and query contract](docs/map-format.md)
|
|
320
270
|
- [Product contract](docs/product-contract.md)
|
|
321
271
|
- [Architecture](docs/architecture.md)
|
|
322
|
-
- [
|
|
323
|
-
- [Accuracy observations](docs/observations.md)
|
|
324
|
-
- [Evaluation](docs/evaluation.md)
|
|
272
|
+
- [Evaluation and its evidence limits](docs/evaluation.md)
|
|
325
273
|
|
|
326
274
|
## License
|
|
327
275
|
|