semantic-atlas 2.2.0 → 2.3.1
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/README.md +29 -13
- package/README.zh-CN.md +21 -9
- package/dist/application/map-application.d.ts +2 -1
- package/dist/application/map-application.d.ts.map +1 -1
- package/dist/application/map-application.js +3 -3
- package/dist/application/map-application.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 +40 -3
- package/dist/cli/run-cli.js.map +1 -1
- package/dist/contracts/cli.d.ts +7 -0
- package/dist/contracts/cli.d.ts.map +1 -1
- package/dist/contracts/project.d.ts +7 -0
- package/dist/contracts/project.d.ts.map +1 -0
- package/dist/contracts/project.js +6 -0
- package/dist/contracts/project.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/projects/project-registration-service.d.ts +20 -0
- package/dist/projects/project-registration-service.d.ts.map +1 -0
- package/dist/projects/project-registration-service.js +41 -0
- package/dist/projects/project-registration-service.js.map +1 -0
- package/dist/projects/project-store.d.ts +20 -0
- package/dist/projects/project-store.d.ts.map +1 -0
- package/dist/projects/project-store.js +89 -0
- package/dist/projects/project-store.js.map +1 -0
- package/dist/rendering/flow-projector.d.ts.map +1 -1
- package/dist/rendering/flow-projector.js +61 -77
- package/dist/rendering/flow-projector.js.map +1 -1
- package/dist/rendering/latest-project-loader.d.ts +2 -0
- package/dist/rendering/latest-project-loader.d.ts.map +1 -0
- package/dist/rendering/latest-project-loader.js +26 -0
- package/dist/rendering/latest-project-loader.js.map +1 -0
- package/dist/rendering/map-camera.d.ts +1 -0
- package/dist/rendering/map-camera.d.ts.map +1 -1
- package/dist/rendering/map-camera.js +8 -1
- package/dist/rendering/map-camera.js.map +1 -1
- package/dist/rendering/map-projector.d.ts.map +1 -1
- package/dist/rendering/map-projector.js +46 -73
- package/dist/rendering/map-projector.js.map +1 -1
- package/dist/rendering/viewer-browser.d.ts.map +1 -1
- package/dist/rendering/viewer-browser.js +199 -23
- package/dist/rendering/viewer-browser.js.map +1 -1
- package/dist/rendering/viewer-diagram.d.ts +8 -0
- package/dist/rendering/viewer-diagram.d.ts.map +1 -0
- package/dist/rendering/viewer-diagram.js +99 -0
- package/dist/rendering/viewer-diagram.js.map +1 -0
- package/dist/rendering/viewer-layout.d.ts +40 -0
- package/dist/rendering/viewer-layout.d.ts.map +1 -0
- package/dist/rendering/viewer-layout.js +79 -0
- package/dist/rendering/viewer-layout.js.map +1 -0
- package/dist/rendering/viewer-page.d.ts +20 -1
- package/dist/rendering/viewer-page.d.ts.map +1 -1
- package/dist/rendering/viewer-page.js +149 -36
- package/dist/rendering/viewer-page.js.map +1 -1
- package/dist/web/local-web-application.d.ts +15 -2
- package/dist/web/local-web-application.d.ts.map +1 -1
- package/dist/web/local-web-application.js +62 -16
- package/dist/web/local-web-application.js.map +1 -1
- package/dist/web/local-web-server.d.ts.map +1 -1
- package/dist/web/local-web-server.js +46 -8
- package/dist/web/local-web-server.js.map +1 -1
- package/dist/web/web-command-service.d.ts +4 -2
- package/dist/web/web-command-service.d.ts.map +1 -1
- package/dist/web/web-command-service.js +6 -2
- package/dist/web/web-command-service.js.map +1 -1
- package/docs/architecture.md +89 -22
- package/docs/map-format.md +6 -0
- package/docs/product-contract.md +32 -17
- package/package.json +1 -1
package/docs/architecture.md
CHANGED
|
@@ -6,8 +6,8 @@ public CLI, renderer, and business-understanding Agent Skill.
|
|
|
6
6
|
|
|
7
7
|
**Status: query, validation, visual projection, Agent Skills, managed Skill
|
|
8
8
|
lifecycle, accuracy observations, read-only reconciliation, and public release
|
|
9
|
-
verification are implemented.
|
|
10
|
-
the current source candidate.**
|
|
9
|
+
verification are implemented. Persistent project registration and on-demand
|
|
10
|
+
Web loading are implemented in the current source candidate.**
|
|
11
11
|
|
|
12
12
|
## System Model
|
|
13
13
|
|
|
@@ -71,11 +71,21 @@ verified source candidate -> annotated release tag -> published GitHub Release
|
|
|
71
71
|
|
|
|
72
72
|
v
|
|
73
73
|
provenance publication + public read-back
|
|
74
|
+
|
|
75
|
+
project add [path] -> complete map validation -> user-local ProjectStore
|
|
76
|
+
|
|
|
77
|
+
parameterless web ----------------------------------+
|
|
78
|
+
explicit web --repo -> temporary session paths -----+-> LocalWebApplication
|
|
79
|
+
|
|
|
80
|
+
Viewer catalog <- GET / -----------------------------+
|
|
81
|
+
Viewer selection -> GET /api/projects/<opaque-id> -> one validated projection
|
|
74
82
|
```
|
|
75
83
|
|
|
76
84
|
The tracked documents and their Git history are the shared product state. Each
|
|
77
|
-
|
|
78
|
-
local acceleration remain derived behavior around that same graph.
|
|
85
|
+
map load creates an in-memory graph for its own invocation. Rendering and future
|
|
86
|
+
local acceleration remain derived behavior around that same graph. The
|
|
87
|
+
user-local project list supplies only checkout selection and never becomes a
|
|
88
|
+
second graph or map-authoring source.
|
|
79
89
|
|
|
80
90
|
## Stable Responsibilities
|
|
81
91
|
|
|
@@ -126,34 +136,77 @@ identities for repeatable layout and inspection.
|
|
|
126
136
|
|
|
127
137
|
### FlowProjector
|
|
128
138
|
|
|
129
|
-
Builds one deterministic top-to-bottom
|
|
139
|
+
Builds one deterministic top-to-bottom diagram per business flow. Dagre owns step
|
|
130
140
|
placement and transition routing; action, decision, and outcome steps preserve
|
|
131
141
|
distinct visual semantics, while labeled decision branches remain visible on
|
|
132
142
|
their transitions. The projector reads normalized flow meaning and owns no
|
|
133
143
|
query or maintenance decisions.
|
|
134
144
|
|
|
145
|
+
### Diagram Layout
|
|
146
|
+
|
|
147
|
+
Relationship and flow projectors share `layoutDiagram` for both initial
|
|
148
|
+
server-side size estimates and browser-measured text dimensions. SVG owns
|
|
149
|
+
shapes and routed lines; an ordinary HTML sibling layer owns complete names,
|
|
150
|
+
summaries, kinds, and branch labels so page translators can read full sentences.
|
|
151
|
+
The same layout positions both layers and connects decision edges to the actual
|
|
152
|
+
diamond boundary.
|
|
153
|
+
|
|
154
|
+
The browser observes card and label sizes. Appending a translation, changing
|
|
155
|
+
fonts, or restoring original text reflows the affected diagram without replacing
|
|
156
|
+
its text DOM. Nodes grow with their content and Dagre reserves the measured
|
|
157
|
+
label space. Translation remains browser presentation rather than a second
|
|
158
|
+
tracked business-map copy.
|
|
159
|
+
|
|
135
160
|
### ViewerPage
|
|
136
161
|
|
|
137
162
|
Owns the compact human inspection surface shared by static export and Web. It
|
|
138
163
|
combines project selection, relationship/flow switching, business-domain or
|
|
139
164
|
flow selection, map statistics, a restrained legend, pan, zoom, and fit-to-view
|
|
140
|
-
around
|
|
141
|
-
|
|
165
|
+
around shared SVG geometry and selectable HTML text. Dragging text uses native
|
|
166
|
+
selection and copying; dragging diagram space pans the map. Cards render stable
|
|
167
|
+
business meaning only. Clicking a node or activating it with the keyboard opens its navigation anchors and
|
|
142
168
|
derived related-flow links in an overlaid desktop side panel or narrow-screen
|
|
143
169
|
bottom panel. Selecting a related flow switches to its projected path. Camera
|
|
144
170
|
coordinates use the SVG `xMidYMid meet` scale and letterbox offsets for both
|
|
145
|
-
pointer zoom
|
|
171
|
+
pointer zoom, pan, and HTML placement, including viewport resizing. A fitted
|
|
172
|
+
camera follows content reflow; an explicitly zoomed or panned camera keeps its
|
|
173
|
+
current view. Its browser interaction state is disposable and never
|
|
146
174
|
enters tracked map data.
|
|
147
175
|
|
|
176
|
+
Static export embeds its complete project model, diagram layers, and the bundled
|
|
177
|
+
Dagre browser runtime, with no network dependency. Web mode initially
|
|
178
|
+
receives only project IDs and display names, then replaces its single current
|
|
179
|
+
model and SVG set when a selection loads. Empty, loading, ready, and unavailable
|
|
180
|
+
states are browser-session state. A monotonically increasing request generation
|
|
181
|
+
and cancellation signal prevent an older project request from replacing a
|
|
182
|
+
newer selection.
|
|
183
|
+
|
|
184
|
+
### ProjectStore And ProjectRegistrationService
|
|
185
|
+
|
|
186
|
+
`ProjectStore` owns the versioned `~/.semantic-atlas/projects.json` document. A
|
|
187
|
+
missing file means an empty project list. It strictly reads normalized absolute
|
|
188
|
+
checkout paths, appends a new path idempotently, and publishes the complete list
|
|
189
|
+
through a unique temporary file and atomic replacement. This disposable local
|
|
190
|
+
configuration is separate from observations and tracked business-map YAML.
|
|
191
|
+
|
|
192
|
+
`ProjectRegistrationService` validates the complete map through
|
|
193
|
+
`MapApplication` before storing its resolved root. A missing, invalid, or
|
|
194
|
+
unresolvable map therefore leaves the project file unchanged.
|
|
195
|
+
|
|
148
196
|
### LocalWebApplication And LocalWebServer
|
|
149
197
|
|
|
150
|
-
`LocalWebApplication`
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
198
|
+
`LocalWebApplication` turns one saved or explicit path set into a session-local
|
|
199
|
+
catalog with opaque project IDs. It renders the initial list without loading a
|
|
200
|
+
map and resolves a selected ID back to its server-only path for one
|
|
201
|
+
`MapApplication.viewerProject` call. Duplicate basenames receive deterministic
|
|
202
|
+
numeric labels without revealing parent or absolute paths. A project load
|
|
203
|
+
failure becomes a safe unavailable result and does not affect another project.
|
|
204
|
+
|
|
205
|
+
`LocalWebServer` binds to `127.0.0.1`, serves GET and HEAD, rejects mutation
|
|
206
|
+
methods, and accepts no repository path from HTTP. Its root serves the Viewer
|
|
207
|
+
shell and catalog; its opaque-ID project endpoint serves one current model and
|
|
208
|
+
SVG set with caching disabled. The server owns transport lifetime only; map
|
|
209
|
+
loading, validation, layout, and HTML remain in their existing owners.
|
|
157
210
|
|
|
158
211
|
### CLI
|
|
159
212
|
|
|
@@ -313,6 +366,9 @@ rather than local build effects.
|
|
|
313
366
|
| Parsed documents | One CLI invocation | Parse phase | Recreated from tracked files |
|
|
314
367
|
| Normalized map with relationships and flows | One CLI invocation | Query/render phase | Recreated after validation |
|
|
315
368
|
| Rendered output | Calling workflow | Reproducible artifact | Regenerated from the graph |
|
|
369
|
+
| Registered project paths | User home | Across Web sessions | Validated `project add` and atomic project-file replacement |
|
|
370
|
+
| Web project catalog | One local Web session | Server lifetime | Recreated from either registered or explicit paths |
|
|
371
|
+
| Current Web project model and SVG | Browser selection | Until the next selection | Loaded through one opaque server-assigned project ID |
|
|
316
372
|
| Bundled Skill payloads | Installed npm package | Package version | Replaced only by exact package installation |
|
|
317
373
|
| Managed user Skills | User home | Across repositories and CLI invocations | Per-Skill `semantic-atlas setup` atomic replacement |
|
|
318
374
|
| Managed Skill markers | Managed Skill directories | Same as each installed payload | Written into each staged copy before activation |
|
|
@@ -362,6 +418,7 @@ lifecycle commands:
|
|
|
362
418
|
semantic-atlas validate [--repo <path>]
|
|
363
419
|
semantic-atlas context <id-or-term> [--repo <path>]
|
|
364
420
|
semantic-atlas render [--repo <path>] [--output <path>]
|
|
421
|
+
semantic-atlas project add [path]
|
|
365
422
|
semantic-atlas web [--repo <path...>] [--port <port>] [--no-open]
|
|
366
423
|
semantic-atlas setup
|
|
367
424
|
semantic-atlas upgrade
|
|
@@ -375,11 +432,13 @@ semantic-atlas --version
|
|
|
375
432
|
```
|
|
376
433
|
|
|
377
434
|
Map commands resolve and report the repository root and map-document set they
|
|
378
|
-
used. `
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
435
|
+
used. `project add` defaults to the current directory, validates the complete
|
|
436
|
+
map, and reports `added` or `already_exists`. Parameterless `web` reads the
|
|
437
|
+
registered list; `web --repo` uses only its explicit temporary paths. `web`
|
|
438
|
+
reports its loopback URL and repository count without exposing roots to the
|
|
439
|
+
browser. Observation commands report the derived repository identity, while
|
|
440
|
+
package lifecycle commands remain repository-independent. Machine output uses
|
|
441
|
+
a versioned envelope with a stable success or error discriminant.
|
|
383
442
|
|
|
384
443
|
`context` returns ambiguity when multiple concepts match the term. Callers can
|
|
385
444
|
then use a stable ID. A missing concept is a bounded map result and routes the
|
|
@@ -463,8 +522,16 @@ Errors fall into stable categories:
|
|
|
463
522
|
summary.
|
|
464
523
|
- `RECONCILIATION_READ_FAILED`: retained candidate and review evidence cannot
|
|
465
524
|
produce a trustworthy reconciliation report.
|
|
466
|
-
- `
|
|
467
|
-
|
|
525
|
+
- `PROJECT_CONFIG_INVALID`: the user-local project file violates its versioned
|
|
526
|
+
shape, normalized absolute-path rule, or uniqueness rule and remains unchanged.
|
|
527
|
+
- `PROJECT_CONFIG_STORAGE_FAILED`: the project file cannot be read or atomically
|
|
528
|
+
replaced; the previous complete file remains authoritative.
|
|
529
|
+
- `WEB_START_FAILED`: the registered list cannot be read, the loopback port
|
|
530
|
+
cannot bind, or the local Viewer cannot start.
|
|
531
|
+
|
|
532
|
+
A selected checkout that is missing or has an invalid map is a project-level
|
|
533
|
+
unavailable result, not `WEB_START_FAILED`. The HTTP response uses a safe
|
|
534
|
+
summary and never forwards a repository path or lower-level error message.
|
|
468
535
|
|
|
469
536
|
Unexpected infrastructure errors propagate to the CLI boundary with a safe
|
|
470
537
|
message and a nonzero exit status. The implementation adds contextual details
|
package/docs/map-format.md
CHANGED
|
@@ -71,6 +71,12 @@ IDs use lowercase dot-separated business vocabulary, for example
|
|
|
71
71
|
`commerce.orders.place-order`. They remain stable when implementation paths or
|
|
72
72
|
semantic parents change. Containment lives in explicit `part_of` relations.
|
|
73
73
|
|
|
74
|
+
Human-facing names, summaries, and branch labels accept Chinese or English.
|
|
75
|
+
Use the author's working language for the single retained description. A Chinese
|
|
76
|
+
node name can keep an English stable ID and English search terms in `aliases`;
|
|
77
|
+
both Chinese names and English aliases participate in the lookup rules below.
|
|
78
|
+
Browser translation changes presentation only and does not write another map.
|
|
79
|
+
|
|
74
80
|
Supported node kinds are:
|
|
75
81
|
|
|
76
82
|
```text
|
package/docs/product-contract.md
CHANGED
|
@@ -4,9 +4,9 @@ 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 public product is released and installed; the
|
|
8
|
-
|
|
9
|
-
acceptance remains in progress.**
|
|
7
|
+
**Status: the public product is released and installed; the current source
|
|
8
|
+
candidate adds persistent manual project registration and on-demand Web
|
|
9
|
+
loading, while longitudinal acceptance remains in progress.**
|
|
10
10
|
|
|
11
11
|
## Purpose
|
|
12
12
|
|
|
@@ -64,13 +64,25 @@ implementation vocabulary differ.
|
|
|
64
64
|
|
|
65
65
|
A person views deterministic projections of the same tracked map to discuss
|
|
66
66
|
business boundaries and relationships. A self-contained export and a local
|
|
67
|
-
read-only Web command share the same interactive Viewer
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
read-only Web command share the same interactive Viewer. The user manually
|
|
68
|
+
registers checkouts with `semantic-atlas project add [path]`; an omitted path
|
|
69
|
+
means the current directory. A parameterless `semantic-atlas web` can then
|
|
70
|
+
start from any directory, list the registered projects, and load only the
|
|
71
|
+
initially selected or newly selected map. An unavailable checkout remains in
|
|
72
|
+
the list and affects only its own view.
|
|
73
|
+
|
|
74
|
+
The explicit `web --repo <paths...>` form remains a temporary project set for
|
|
75
|
+
one session. It neither writes the user-local project file nor implicitly
|
|
76
|
+
merges registered paths. The browser receives service-assigned project IDs and
|
|
77
|
+
display names, never repository paths, and cannot submit a filesystem path.
|
|
78
|
+
Project and business-domain selection, relationship and flow views, pan, zoom,
|
|
79
|
+
fit-to-view, navigation details, and related-flow links remain read-only. The
|
|
80
|
+
visual surface does not become a second authoring or registration format.
|
|
81
|
+
|
|
82
|
+
Diagram text is selectable ordinary HTML that supports whole-page translation.
|
|
83
|
+
When a translator appends Chinese alongside English, cards grow to show the
|
|
84
|
+
complete content and the diagram rearranges nodes, labels, and connecting lines.
|
|
85
|
+
The original tracked map remains the single business-knowledge source.
|
|
74
86
|
|
|
75
87
|
### Post-task maintenance decision and reconciliation
|
|
76
88
|
|
|
@@ -181,8 +193,10 @@ The initial product delivers one coherent path:
|
|
|
181
193
|
8. Exercise the workflow against real engineering tasks, including stale and
|
|
182
194
|
incomplete map cases.
|
|
183
195
|
|
|
184
|
-
|
|
185
|
-
|
|
196
|
+
Map loading, validation, querying, and rendering remain stateless between
|
|
197
|
+
commands. Derived render artifacts and future performance caches are
|
|
198
|
+
reproducible from tracked files. The user-local, versioned project-path list is
|
|
199
|
+
disposable Viewer configuration rather than business knowledge.
|
|
186
200
|
|
|
187
201
|
## Current Non-Goals
|
|
188
202
|
|
|
@@ -200,7 +214,9 @@ The initial product does not provide:
|
|
|
200
214
|
synchronization;
|
|
201
215
|
- a general workflow engine or full visual-diagram authoring system;
|
|
202
216
|
- real-time multi-user map editing;
|
|
203
|
-
- a second visual authoring representation
|
|
217
|
+
- a second visual authoring representation;
|
|
218
|
+
- browser-side project registration or automatic repository discovery;
|
|
219
|
+
- branch and worktree management for registered checkout paths.
|
|
204
220
|
|
|
205
221
|
These boundaries keep the first product centered on better engineering
|
|
206
222
|
judgment. Later capabilities require observed evidence that they improve that
|
|
@@ -238,10 +254,9 @@ human-intervention evidence as acceptance conditions.
|
|
|
238
254
|
The initial product, managed setup, versioned observations, read-only
|
|
239
255
|
reconciliation, public repository, and npm publication are complete. The first
|
|
240
256
|
real target-domain map and reviewed observation pair are in local use. The
|
|
241
|
-
current `semantic-atlas@2.
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
observation, and claim contracts.
|
|
257
|
+
current `semantic-atlas@2.3.0` release adds manual project registration,
|
|
258
|
+
parameterless Web startup, on-demand single-project loading, and project-level
|
|
259
|
+
unavailable states without changing the tracked YAML business-map source.
|
|
245
260
|
Target-repository sharing and longitudinal acceptance remain separate verified
|
|
246
261
|
stages.
|
|
247
262
|
|