semantic-atlas 0.3.0 → 0.4.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/README.md +27 -1
- package/README.zh-CN.md +24 -1
- package/dist/cli/bin.js +12 -5
- package/dist/cli/standalone-cli.d.ts.map +1 -1
- package/dist/cli/standalone-cli.js +8 -0
- package/dist/cli/web-cli.d.ts +9 -0
- package/dist/cli/web-cli.d.ts.map +1 -0
- package/dist/cli/web-cli.js +134 -0
- package/dist/graph/graph-store.d.ts +2 -2
- package/dist/graph/graph-store.d.ts.map +1 -1
- package/dist/graph/graph-store.js +2 -2
- package/dist/repository/repository-inspector.d.ts +1 -0
- package/dist/repository/repository-inspector.d.ts.map +1 -1
- package/dist/repository/repository-inspector.js +13 -0
- package/dist/storage/atlas-database.d.ts +7 -1
- package/dist/storage/atlas-database.d.ts.map +1 -1
- package/dist/storage/atlas-database.js +60 -10
- package/dist/web/application/atlas-read-service.d.ts +27 -0
- package/dist/web/application/atlas-read-service.d.ts.map +1 -0
- package/dist/web/application/atlas-read-service.js +216 -0
- package/dist/web/application/primary-repository-catalog.d.ts +15 -0
- package/dist/web/application/primary-repository-catalog.d.ts.map +1 -0
- package/dist/web/application/primary-repository-catalog.js +202 -0
- package/dist/web/application/types.d.ts +41 -0
- package/dist/web/application/types.d.ts.map +1 -0
- package/dist/web/application/types.js +1 -0
- package/dist/web/server/api-router.d.ts +4 -0
- package/dist/web/server/api-router.d.ts.map +1 -0
- package/dist/web/server/api-router.js +151 -0
- package/dist/web/server/local-web-server.d.ts +12 -0
- package/dist/web/server/local-web-server.d.ts.map +1 -0
- package/dist/web/server/local-web-server.js +100 -0
- package/dist/web-client/assets/index-DneaErDj.css +1 -0
- package/dist/web-client/assets/index-cze_4vtt.js +2 -0
- package/dist/web-client/assets/index-cze_4vtt.js.map +1 -0
- package/dist/web-client/index.html +61 -0
- package/dist/world/world-graph-query.d.ts +5 -1
- package/dist/world/world-graph-query.d.ts.map +1 -1
- package/dist/world/world-graph-query.js +4 -2
- package/dist/world/world-snapshot-store.d.ts +2 -1
- package/dist/world/world-snapshot-store.d.ts.map +1 -1
- package/dist/world/world-snapshot-store.js +2 -2
- package/docs/architecture/web-viewer.md +225 -0
- package/docs/contracts/cli-v1.md +16 -1
- package/docs/contracts/http-api-v1.md +155 -0
- package/docs/index.md +5 -0
- package/docs/log.md +79 -0
- package/docs/product-contract.md +31 -3
- package/package.json +5 -4
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Desktop Web Viewer
|
|
2
|
+
|
|
3
|
+
This page answers how people browse Semantic Atlas business knowledge without
|
|
4
|
+
changing the Agent workflow, graph model, or repository state. It applies to
|
|
5
|
+
the `semantic-atlas web` command, its local HTTP API, and the bundled desktop
|
|
6
|
+
browser interface. Status: implemented in the current package.
|
|
7
|
+
|
|
8
|
+
## Product role
|
|
9
|
+
|
|
10
|
+
The Web viewer is a human-facing, read-only surface over the same Semantic
|
|
11
|
+
Atlas business world used by coding agents. It helps a person select a project,
|
|
12
|
+
read summarized business knowledge, move through the established `part_of`
|
|
13
|
+
hierarchy, search business vocabulary, and inspect direct relationships and
|
|
14
|
+
evidence.
|
|
15
|
+
|
|
16
|
+
The viewer presents business knowledge as a real spatial node map. The map
|
|
17
|
+
metaphor defines topology and interaction rather than a game theme: users see
|
|
18
|
+
business regions positioned on a canvas, follow visible hierarchy and business
|
|
19
|
+
relationship lines, pan and zoom the canvas, and enter a region to reveal its
|
|
20
|
+
next level. The surrounding interface remains a restrained product-development
|
|
21
|
+
UI with project selection, breadcrumb, search, and a detail panel. It does not
|
|
22
|
+
introduce game roles, presentation-specific node kinds, decorative world
|
|
23
|
+
semantics, or a mobile experience.
|
|
24
|
+
|
|
25
|
+
## Stable boundary
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
semantic-atlas web
|
|
29
|
+
|
|
|
30
|
+
v
|
|
31
|
+
LocalWebServer -------- bundled desktop Web application
|
|
32
|
+
|
|
|
33
|
+
v
|
|
34
|
+
AtlasReadService
|
|
35
|
+
|-- PrimaryRepositoryCatalog
|
|
36
|
+
`-- WorldGraphQuery
|
|
37
|
+
|
|
|
38
|
+
v
|
|
39
|
+
existing Atlas repository knowledge and current structural publication
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- `LocalWebServer` owns loopback HTTP, static assets, request validation, and
|
|
43
|
+
API presentation.
|
|
44
|
+
- `AtlasReadService` owns the read use cases shared by HTTP and future CLI
|
|
45
|
+
presentation refactoring. The server calls it directly and never executes
|
|
46
|
+
`semantic-atlas map ...` as a subprocess.
|
|
47
|
+
- `PrimaryRepositoryCatalog` discovers Atlas repositories through Atlas-owned
|
|
48
|
+
storage and Git inspection. It never exposes backend tables to the browser.
|
|
49
|
+
- `WorldGraphQuery` remains the authority for business views, search, direct
|
|
50
|
+
node details, publication consistency, certainty, and validity.
|
|
51
|
+
|
|
52
|
+
The Web slice adds no graph table, node kind, relation kind, evidence format,
|
|
53
|
+
or presentation coordinate to durable Atlas knowledge. Layout is derived in
|
|
54
|
+
the browser for the visible frontier and is disposable.
|
|
55
|
+
|
|
56
|
+
## Primary-branch project scope
|
|
57
|
+
|
|
58
|
+
The Web viewer deliberately ignores linked worktrees. A project is visible
|
|
59
|
+
only when Atlas can resolve its primary working tree and that working tree is
|
|
60
|
+
currently attached to a branch named exactly `main` or `master`.
|
|
61
|
+
|
|
62
|
+
Repository discovery therefore follows these rules:
|
|
63
|
+
|
|
64
|
+
1. Group durable state by Atlas `repositoryId`.
|
|
65
|
+
2. Select only the state whose Git directory is the common Git directory; this
|
|
66
|
+
is the repository's primary working tree.
|
|
67
|
+
3. Inspect that working tree's current branch and retain only `main` or
|
|
68
|
+
`master`.
|
|
69
|
+
4. Return at most one project entry for each repository.
|
|
70
|
+
5. Never return linked-worktree roots, branches, or publication choices through
|
|
71
|
+
the Web project catalog.
|
|
72
|
+
|
|
73
|
+
When a primary working tree moves away from `main` or `master`, the project is
|
|
74
|
+
absent until it returns. The viewer reads the most recent successfully published
|
|
75
|
+
business map for that primary working tree even when newer source changes make
|
|
76
|
+
the publication freshness `stale`. This is a browsing surface, not an indexing
|
|
77
|
+
gate: it never indexes or repairs the repository merely to answer a map request.
|
|
78
|
+
Missing, building, failed, or structurally incomplete publications remain
|
|
79
|
+
unavailable because there is no complete published map to read.
|
|
80
|
+
|
|
81
|
+
## Read-only lifecycle
|
|
82
|
+
|
|
83
|
+
`semantic-atlas web` starts one local server on `127.0.0.1`, optionally opens
|
|
84
|
+
the default browser, and remains active until interrupted. The server exposes
|
|
85
|
+
only the GET operations defined by [HTTP API v1](../contracts/http-api-v1.md).
|
|
86
|
+
|
|
87
|
+
The viewer never:
|
|
88
|
+
|
|
89
|
+
- invokes `index`, `learn`, GraphPatch, feedback mutation, or Git mutation;
|
|
90
|
+
- edits source, tests, configuration, Skills, or generated project state;
|
|
91
|
+
- accepts an arbitrary repository path from an HTTP client;
|
|
92
|
+
- returns linked worktrees or permits branch selection;
|
|
93
|
+
- exposes CodeGraph APIs, storage schema, structural search, or unrestricted
|
|
94
|
+
source traversal.
|
|
95
|
+
|
|
96
|
+
Reads for one repository are serialized. Every map, search, and node request
|
|
97
|
+
uses the most recent complete publication for the current primary `main` or
|
|
98
|
+
`master` working tree and retains the existing publication-change check. A
|
|
99
|
+
publication change during a query fails the request instead of combining two
|
|
100
|
+
snapshots.
|
|
101
|
+
|
|
102
|
+
## Desktop information architecture
|
|
103
|
+
|
|
104
|
+
The first release targets desktop browsers only.
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
+------------------+-----------------------------------------------+
|
|
108
|
+
| Projects | Breadcrumb Search |
|
|
109
|
+
| +-----------------------------------------------+
|
|
110
|
+
| semantic-atlas | |
|
|
111
|
+
| sample-project | Visible business regions and relationships |
|
|
112
|
+
| | |
|
|
113
|
+
| | Detail panel |
|
|
114
|
+
+------------------+-----------------------------------------------+
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
- The left rail lists eligible `main` or `master` projects and their current
|
|
118
|
+
publication state.
|
|
119
|
+
- The header contains the current business breadcrumb and project-scoped
|
|
120
|
+
business search.
|
|
121
|
+
- The main surface starts with the top-level `BusinessMapView`, then reads a
|
|
122
|
+
focused map only when the user enters that region or semantic zoom reaches
|
|
123
|
+
its next level. It does not request or draw the full graph.
|
|
124
|
+
- Selecting a region opens its business summary and direct relationships.
|
|
125
|
+
- Entering an expandable region requests its focused map view. Breadcrumb
|
|
126
|
+
selection returns to an established ancestor.
|
|
127
|
+
- Search ranks existing business vocabulary. Selecting a result focuses its
|
|
128
|
+
map view and node details.
|
|
129
|
+
|
|
130
|
+
Business `kind` remains existing Atlas data. It informs the node color and the
|
|
131
|
+
concise detail panel without adding a competing label to the map. Certainty and
|
|
132
|
+
validity remain part of the read model, while this human browsing surface keeps
|
|
133
|
+
the map focused on business names and available child counts.
|
|
134
|
+
|
|
135
|
+
### Spatial map interaction contract
|
|
136
|
+
|
|
137
|
+
- The project hub is a virtual center. Top-level regions occupy a complete
|
|
138
|
+
deterministic ring; children expand in the outward-facing sector of their
|
|
139
|
+
parent. Existing positions never move when another branch is loaded.
|
|
140
|
+
- Each selected project owns an in-memory map cache containing loaded focused
|
|
141
|
+
maps, parentage, asserted connections, coordinates, camera state, and pending
|
|
142
|
+
reads. It is cleared when the project changes and is never written to Atlas.
|
|
143
|
+
- Hierarchy paths connect a node to its parent using neutral solid lines.
|
|
144
|
+
Asserted or projected business relationships use a distinct highlighted line
|
|
145
|
+
treatment without exposing raw relation labels on the map, so navigation
|
|
146
|
+
topology is not presented as a stored business assertion.
|
|
147
|
+
- Business regions are compact graph nodes, not content cards. Their label,
|
|
148
|
+
and, when present, child count remain visible. Existing `kind`, validity,
|
|
149
|
+
summaries, and evidence stay in the data model or concise detail panel rather
|
|
150
|
+
than competing with business labels on the map. A leaf node has no secondary
|
|
151
|
+
map text; an expandable node shows only its `N 项` child count.
|
|
152
|
+
- Selecting a node opens its details. Selecting an expandable node loads its
|
|
153
|
+
focused map once, moves the camera to it, and zooms to the next semantic
|
|
154
|
+
level; selecting a leaf only centers it and reads its details. Breadcrumbs
|
|
155
|
+
move the camera to loaded ancestors rather than switching a page.
|
|
156
|
+
- Pointer drag pans the canvas. The wheel and controls zoom between `0.2` and
|
|
157
|
+
`4.8`; wheel zoom remains anchored to the pointer. A fit control restores the
|
|
158
|
+
complete loaded map.
|
|
159
|
+
- The map toolbar offers an immersive desktop mode. It hides the project rail,
|
|
160
|
+
surrounding navigation, and detail panel while preserving the selected node,
|
|
161
|
+
loaded map cache, and camera context; the same control or `Escape` restores
|
|
162
|
+
the normal product view.
|
|
163
|
+
- Roots remain visible at every scale. Deeper levels appear at
|
|
164
|
+
`0.55 * 1.6^(depth - 1)` and disappear visually below that threshold without
|
|
165
|
+
deleting their cached maps, nodes, or coordinates. A relationship line is
|
|
166
|
+
visible only while both of its endpoint regions are visible, so semantic
|
|
167
|
+
zoom never leaves a line pointing to a hidden region. Crossing a threshold
|
|
168
|
+
can load the nearby or selected expandable region.
|
|
169
|
+
- Search selection fills any missing focused-map path, then moves the camera to
|
|
170
|
+
the matching node and opens its details; it does not create a separate
|
|
171
|
+
list-based navigation model.
|
|
172
|
+
|
|
173
|
+
A card grid, tree list, or dashboard tile collection does not satisfy the map
|
|
174
|
+
surface contract. Cards may appear in search results or supporting details,
|
|
175
|
+
but they do not replace the spatial node-and-connection canvas.
|
|
176
|
+
|
|
177
|
+
The visual language is a light, neutral product interface with strong
|
|
178
|
+
typography, restrained color, legible topology, thin relationships, and short
|
|
179
|
+
state transitions. It does not use game styling, character metaphors,
|
|
180
|
+
decorative map textures, elaborate animation, or mobile-specific layouts.
|
|
181
|
+
|
|
182
|
+
The desktop viewer uses Simplified Chinese for its fixed interface copy. It
|
|
183
|
+
keeps authored business labels and summaries in their recorded language rather
|
|
184
|
+
than attempting an unreliable browser-side translation. The normal view keeps
|
|
185
|
+
only the project selector, compact path, search, map, camera controls, and a
|
|
186
|
+
small business-detail panel. Decorative branding, project diagnostics, map
|
|
187
|
+
legends, and instructional copy stay outside the primary viewing surface.
|
|
188
|
+
|
|
189
|
+
The detail panel describes the selected business region with its summary, the
|
|
190
|
+
existing business kind in the viewer locale, and nearby business names. It does
|
|
191
|
+
not expose aliases, evidence files, source symbols, certainty or validity
|
|
192
|
+
chips, raw relationship names, or incoming/outgoing direction. Those concepts
|
|
193
|
+
remain part of the read API and Agent evidence model; the human viewer does not
|
|
194
|
+
need them to browse business knowledge. Detail text and related-business names
|
|
195
|
+
wrap within the panel so long recorded labels cannot overflow the layout.
|
|
196
|
+
|
|
197
|
+
## Empty and unavailable states
|
|
198
|
+
|
|
199
|
+
- No eligible repositories: explain that the viewer lists only primary
|
|
200
|
+
`main`/`master` working trees with Atlas state.
|
|
201
|
+
- Missing business knowledge: show the existing
|
|
202
|
+
`BUSINESS_KNOWLEDGE_EMPTY` state without substituting code directories.
|
|
203
|
+
- Stale repository publication: continue to show the most recent complete
|
|
204
|
+
primary-branch map. A later CLI or Agent index can refresh it, but browsing
|
|
205
|
+
remains available in the meantime.
|
|
206
|
+
- Stale assertion: retain the node vocabulary and label the summary or relation
|
|
207
|
+
as stale.
|
|
208
|
+
- Unknown project or node: return a typed not-found response without revealing
|
|
209
|
+
filesystem candidates.
|
|
210
|
+
|
|
211
|
+
## Acceptance boundary
|
|
212
|
+
|
|
213
|
+
The slice is complete when a packaged installation can start
|
|
214
|
+
`semantic-atlas web`, list only primary `main`/`master` repositories, navigate a
|
|
215
|
+
current world and focused views through a pannable and zoomable spatial map,
|
|
216
|
+
search business nodes, inspect one node, serve no mutation endpoint, and leave
|
|
217
|
+
source, Git state, Atlas knowledge, and the Agent CLI behavior unchanged.
|
|
218
|
+
|
|
219
|
+
## Related contracts
|
|
220
|
+
|
|
221
|
+
- [Product contract](../product-contract.md)
|
|
222
|
+
- [Graph model](../contracts/graph-model.md)
|
|
223
|
+
- [CLI v1](../contracts/cli-v1.md)
|
|
224
|
+
- [HTTP API v1](../contracts/http-api-v1.md)
|
|
225
|
+
- [Continuous business learning](continuous-business-learning.md)
|
package/docs/contracts/cli-v1.md
CHANGED
|
@@ -11,6 +11,7 @@ SQLite is opened:
|
|
|
11
11
|
| --- | --- |
|
|
12
12
|
| `setup` | Atomically install or update the exact bundled `semantic-atlas` and `semantic-atlas-insights` Skills at `~/.agents/skills/`. A recognized legacy `~/.codex/skills/semantic-atlas` copy is removed after the shared installation succeeds. |
|
|
13
13
|
| `upgrade` | Resolve npm's `latest` tag, install that exact release globally, verify the new executable, and invoke the new package's `setup`. An already-current package still verifies and repairs its bundled Skills. |
|
|
14
|
+
| `web` | Start the loopback, desktop-only, read-only Web viewer and HTTP API. The project catalog contains only primary working trees on `main` or `master` and excludes linked worktrees. |
|
|
14
15
|
| `-h`, `--help` | Print top-level usage and command help. |
|
|
15
16
|
| `--version` | Print the installed package version. |
|
|
16
17
|
|
|
@@ -27,7 +28,12 @@ CLI through the current Node executable, so Skill synchronization is owned by
|
|
|
27
28
|
the package that was actually installed. Registry lookup, package installation,
|
|
28
29
|
new-version verification, and Skill synchronization are one fail-closed command:
|
|
29
30
|
any failed step returns exit code `1` and does not report the upgrade as ready.
|
|
30
|
-
|
|
31
|
+
`setup` and `upgrade` do not discover a Git repository or open Atlas storage.
|
|
32
|
+
`web` discovers existing Atlas repository stores, validates their primary Git
|
|
33
|
+
working trees, starts on `127.0.0.1`, and remains active until interrupted. It
|
|
34
|
+
does not write a project JSON envelope because its output is the local server
|
|
35
|
+
address and lifecycle diagnostics. The browser uses [HTTP API v1](http-api-v1.md),
|
|
36
|
+
not CLI subprocesses.
|
|
31
37
|
Installation-scoped `insights` commands also avoid Git and repository Atlas
|
|
32
38
|
storage, while opening the separate local insights store described in
|
|
33
39
|
[Insights v1](insights-v1.md).
|
|
@@ -37,6 +43,15 @@ Global project options:
|
|
|
37
43
|
- `--repo <path>` selects a directory within the target repository; the default is the current directory.
|
|
38
44
|
- `--pretty` indents a project or insights JSON envelope without changing fields or values.
|
|
39
45
|
|
|
46
|
+
Web options:
|
|
47
|
+
|
|
48
|
+
- `--port <n>` selects a TCP port from `1` through `65535`; the default is
|
|
49
|
+
`4310`.
|
|
50
|
+
- `--no-open` starts the server without opening the default browser.
|
|
51
|
+
- `--repo <path>` selects the initial project only when the path resolves to an
|
|
52
|
+
eligible primary working tree on `main` or `master`. It does not add or expose
|
|
53
|
+
a linked worktree.
|
|
54
|
+
|
|
40
55
|
Project commands:
|
|
41
56
|
|
|
42
57
|
| Command | Contract |
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# HTTP API Contract v1
|
|
2
|
+
|
|
3
|
+
This page defines the loopback, read-only HTTP interface served by
|
|
4
|
+
`semantic-atlas web`. It applies to the bundled desktop Web application and
|
|
5
|
+
local API consumers. Status: implemented in the current package.
|
|
6
|
+
|
|
7
|
+
## Transport and lifecycle
|
|
8
|
+
|
|
9
|
+
- The server binds to `127.0.0.1` and serves HTTP only for the local machine.
|
|
10
|
+
- The default port is `4310`; `--port` selects another available TCP port.
|
|
11
|
+
- Every API route is under `/api/v1`.
|
|
12
|
+
- API responses use UTF-8 JSON and `Cache-Control: no-store`.
|
|
13
|
+
- Static browser assets are outside `/api/v1` and use GET or HEAD.
|
|
14
|
+
- v1 defines no mutation method or remote-host mode.
|
|
15
|
+
|
|
16
|
+
Every successful API response has this envelope:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"schemaVersion": 1,
|
|
21
|
+
"data": {}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Every handled error has this envelope:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"schemaVersion": 1,
|
|
30
|
+
"error": {
|
|
31
|
+
"code": "PROJECT_NOT_FOUND",
|
|
32
|
+
"message": "The requested project is not available."
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Error codes are stable within v1. Messages are display text and may improve
|
|
38
|
+
without changing the code.
|
|
39
|
+
|
|
40
|
+
## Project identity
|
|
41
|
+
|
|
42
|
+
The API accepts only opaque Atlas repository IDs returned by the project
|
|
43
|
+
catalog. It never accepts a filesystem path from an HTTP request.
|
|
44
|
+
|
|
45
|
+
`GET /api/v1/projects` returns at most one item per repository. Each item is the
|
|
46
|
+
primary working tree currently attached to `main` or `master`; linked worktrees
|
|
47
|
+
are excluded before presentation.
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"schemaVersion": 1,
|
|
52
|
+
"data": {
|
|
53
|
+
"projects": [
|
|
54
|
+
{
|
|
55
|
+
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
56
|
+
"name": "semantic-atlas",
|
|
57
|
+
"root": "/workspace/semantic-atlas",
|
|
58
|
+
"branch": "main",
|
|
59
|
+
"headCommit": "0123456789abcdef0123456789abcdef01234567",
|
|
60
|
+
"snapshotId": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
61
|
+
"freshness": "current",
|
|
62
|
+
"status": "current"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The local root is intentionally visible because the viewer is a local
|
|
70
|
+
developer product and direct source evidence may use that root. It is never
|
|
71
|
+
sent to a remote service by Semantic Atlas.
|
|
72
|
+
|
|
73
|
+
## Operations
|
|
74
|
+
|
|
75
|
+
### List projects
|
|
76
|
+
|
|
77
|
+
```http
|
|
78
|
+
GET /api/v1/projects
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Returns eligible primary-branch repositories sorted by display name and then
|
|
82
|
+
root. Missing, stale, building, and failed publication state remains visible in
|
|
83
|
+
the project summary; only branch and primary-working-tree eligibility filters
|
|
84
|
+
the catalog. A `stale` freshness means source has changed since the last
|
|
85
|
+
successful primary-branch publication; it does not prevent map, search, or
|
|
86
|
+
node reads from serving that latest published map.
|
|
87
|
+
|
|
88
|
+
### Read project status
|
|
89
|
+
|
|
90
|
+
```http
|
|
91
|
+
GET /api/v1/projects/{repositoryId}/status
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Returns repository identity, primary branch, current revision, publication
|
|
95
|
+
freshness, languages, backend completeness, and warnings. It does not expose
|
|
96
|
+
the Atlas database path.
|
|
97
|
+
|
|
98
|
+
### Read a map view
|
|
99
|
+
|
|
100
|
+
```http
|
|
101
|
+
GET /api/v1/projects/{repositoryId}/map
|
|
102
|
+
GET /api/v1/projects/{repositoryId}/map?focus={businessKey}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Returns the existing `BusinessMapView`: focus, breadcrumbs, root/child/context
|
|
106
|
+
regions, child counts, expandability, and projected business connections. The
|
|
107
|
+
API does not add layout coordinates or persist a projection.
|
|
108
|
+
|
|
109
|
+
### Search business knowledge
|
|
110
|
+
|
|
111
|
+
```http
|
|
112
|
+
GET /api/v1/projects/{repositoryId}/search?q={query}&limit={limit}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`q` is required and trimmed. `limit` defaults to `20` and must be an integer
|
|
116
|
+
from `1` through `100`. Results contain only business nodes and lexical ranking
|
|
117
|
+
scores. v1 exposes no structural search route.
|
|
118
|
+
|
|
119
|
+
### Read one business node
|
|
120
|
+
|
|
121
|
+
```http
|
|
122
|
+
GET /api/v1/projects/{repositoryId}/node?key={businessKey}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Returns the existing business assertion and its direct relationships, including
|
|
126
|
+
direct structural evidence already exposed by `map show`. It does not traverse
|
|
127
|
+
the structural graph or accept a depth.
|
|
128
|
+
|
|
129
|
+
## Errors
|
|
130
|
+
|
|
131
|
+
| HTTP status | Code | Meaning |
|
|
132
|
+
| --- | --- | --- |
|
|
133
|
+
| `400` | `INVALID_REQUEST` | Query or path input is missing, malformed, or outside a declared bound. |
|
|
134
|
+
| `404` | `PROJECT_NOT_FOUND` | The ID is not in the eligible primary-branch catalog. |
|
|
135
|
+
| `404` | `BUSINESS_NODE_NOT_FOUND` | The requested business key is absent. |
|
|
136
|
+
| `409` | `ATLAS_STATE_UNAVAILABLE` | The primary publication is missing, building, failed, or structurally incomplete. |
|
|
137
|
+
| `409` | `PUBLICATION_CHANGED` | The repository publication changed during a read. |
|
|
138
|
+
| `405` | `METHOD_NOT_ALLOWED` | The resource does not support the requested method. |
|
|
139
|
+
| `500` | `INTERNAL_ERROR` | An unexpected local failure occurred. |
|
|
140
|
+
|
|
141
|
+
Responses do not include stack traces, backend database paths, linked-worktree
|
|
142
|
+
paths, or candidate repository paths.
|
|
143
|
+
|
|
144
|
+
## Compatibility
|
|
145
|
+
|
|
146
|
+
Additive fields may appear inside successful data objects within v1. Clients
|
|
147
|
+
ignore fields they do not understand. Removing a field, changing field meaning,
|
|
148
|
+
adding a mutation, widening project eligibility, or changing an enum
|
|
149
|
+
incompatibly requires a new API version.
|
|
150
|
+
|
|
151
|
+
## Related pages
|
|
152
|
+
|
|
153
|
+
- [Desktop Web viewer](../architecture/web-viewer.md)
|
|
154
|
+
- [CLI v1](cli-v1.md)
|
|
155
|
+
- [Graph model](graph-model.md)
|
package/docs/index.md
CHANGED
|
@@ -18,6 +18,9 @@ source and tests.
|
|
|
18
18
|
- [CodeGraph backend](architecture/codegraph-backend.md): ownership and
|
|
19
19
|
consistency boundaries between durable Atlas knowledge and disposable
|
|
20
20
|
structural projections.
|
|
21
|
+
- [Desktop Web viewer](architecture/web-viewer.md): the human-facing read-only
|
|
22
|
+
browser, primary `main`/`master` repository scope, application boundary, and
|
|
23
|
+
desktop information architecture.
|
|
21
24
|
- [Semantic Atlas overview mind map](mindmaps/semantic-atlas-overview.png):
|
|
22
25
|
visual overview; editable sources are available in the same directory.
|
|
23
26
|
|
|
@@ -29,6 +32,8 @@ source and tests.
|
|
|
29
32
|
contract.
|
|
30
33
|
- [CLI v1](contracts/cli-v1.md): deterministic commands, envelopes, warnings,
|
|
31
34
|
and exit codes.
|
|
35
|
+
- [HTTP API v1](contracts/http-api-v1.md): loopback GET endpoints used by the
|
|
36
|
+
bundled desktop Web viewer.
|
|
32
37
|
- [Insights v1](contracts/insights-v1.md): local product signals, explicit
|
|
33
38
|
feedback, triage, storage boundary, and interpretation.
|
|
34
39
|
|
package/docs/log.md
CHANGED
|
@@ -3,6 +3,85 @@
|
|
|
3
3
|
This log records material documentation ingestion and revisions. Current
|
|
4
4
|
conclusions live on their owning pages rather than in this chronology.
|
|
5
5
|
|
|
6
|
+
## [2026-08-21] revise | Anonymous Web viewer example
|
|
7
|
+
|
|
8
|
+
- Replaced a local project name in the public Web viewer layout example with a
|
|
9
|
+
neutral project label before npm packaging.
|
|
10
|
+
- Affected page: `architecture/web-viewer.md`.
|
|
11
|
+
|
|
12
|
+
## [2026-08-21] revise | Browse latest primary publication
|
|
13
|
+
|
|
14
|
+
- Defined stale source freshness as non-blocking for the human Web viewer: map,
|
|
15
|
+
search, and node reads serve the latest complete publication on the eligible
|
|
16
|
+
`main` or `master` working tree.
|
|
17
|
+
- Kept missing, building, failed, and structurally incomplete publications
|
|
18
|
+
unavailable because no complete map exists to browse.
|
|
19
|
+
- Defined semantic zoom consistency: a relationship line is visible only while
|
|
20
|
+
both endpoint regions are visible.
|
|
21
|
+
- Affected pages: `architecture/web-viewer.md` and `contracts/http-api-v1.md`.
|
|
22
|
+
|
|
23
|
+
## [2026-08-21] revise | Minimal map node metadata
|
|
24
|
+
|
|
25
|
+
- Removed visible kind and leaf-detail labels from business-map nodes.
|
|
26
|
+
- Kept child counts as the sole optional node secondary text, rendered only
|
|
27
|
+
when an expandable region contains child business regions.
|
|
28
|
+
- Affected page: `architecture/web-viewer.md`.
|
|
29
|
+
|
|
30
|
+
## [2026-08-21] revise | Chinese minimal business viewer
|
|
31
|
+
|
|
32
|
+
- Simplified the human-facing desktop chrome to project selection, path,
|
|
33
|
+
search, map controls, and concise business details; removed decorative and
|
|
34
|
+
diagnostic presentation from the normal viewing surface.
|
|
35
|
+
- Defined Chinese fixed UI copy, localized existing business kinds, and a
|
|
36
|
+
business-only detail panel that omits Agent-facing evidence, certainty,
|
|
37
|
+
validity, source symbols, and raw relation metadata.
|
|
38
|
+
- Defined wrapping behavior for long recorded detail and relationship labels.
|
|
39
|
+
- Affected page: `architecture/web-viewer.md`.
|
|
40
|
+
|
|
41
|
+
## [2026-08-21] revise | Immersive business map view
|
|
42
|
+
|
|
43
|
+
- Added one toolbar control for a desktop-only immersive map view that hides
|
|
44
|
+
surrounding project and detail UI without changing the loaded map or Atlas
|
|
45
|
+
state; the control and `Escape` restore the normal view.
|
|
46
|
+
- Kept `Fit` as a camera action over the loaded map rather than treating it as
|
|
47
|
+
an application-layout switch.
|
|
48
|
+
- Affected page: `architecture/web-viewer.md`.
|
|
49
|
+
|
|
50
|
+
## [2026-08-21] revise | Continuous business map interaction
|
|
51
|
+
|
|
52
|
+
- Replaced the interim region-card grid with a deterministic continuous canvas:
|
|
53
|
+
project roots form a ring and focused children expand outward while previously
|
|
54
|
+
loaded regions retain their positions.
|
|
55
|
+
- Defined the project-local, disposable browser cache; focused-map requests
|
|
56
|
+
load once, retain hierarchy and asserted connections, and are cleared only
|
|
57
|
+
when the selected project changes.
|
|
58
|
+
- Defined pointer-anchored camera zoom, pan, fit, semantic level thresholds,
|
|
59
|
+
focused-region camera movement, and separate hierarchy versus business
|
|
60
|
+
relationship visibility.
|
|
61
|
+
- Affected page: `architecture/web-viewer.md`.
|
|
62
|
+
|
|
63
|
+
## [2026-08-21] add | Desktop read-only Web viewer
|
|
64
|
+
|
|
65
|
+
- Accepted `semantic-atlas web` as a human-facing desktop surface over the
|
|
66
|
+
existing evidence-bound business map.
|
|
67
|
+
- Defined a shared read application boundary and loopback HTTP API instead of
|
|
68
|
+
driving the browser through CLI subprocesses.
|
|
69
|
+
- Restricted project discovery to one primary working tree per repository on
|
|
70
|
+
`main` or `master`; linked worktrees and branch selection remain outside the
|
|
71
|
+
Web product.
|
|
72
|
+
- Kept the viewer read-only and business-oriented with project selection,
|
|
73
|
+
hierarchy navigation, business search, node details, and existing kinds,
|
|
74
|
+
certainty, and validity.
|
|
75
|
+
- Implemented and bundled the loopback server, read application services, and
|
|
76
|
+
desktop client; packaged-installation and browser interaction checks cover
|
|
77
|
+
the project catalog, map navigation, search, node details, and mutation
|
|
78
|
+
rejection.
|
|
79
|
+
- Revised the desktop interaction contract after product review: the main
|
|
80
|
+
surface is a pannable and zoomable spatial node-and-connection map. A card
|
|
81
|
+
grid is a supporting presentation pattern and cannot replace the map canvas.
|
|
82
|
+
- Affected pages: `product-contract.md`, `architecture/web-viewer.md`,
|
|
83
|
+
`contracts/cli-v1.md`, `contracts/http-api-v1.md`, and `index.md`.
|
|
84
|
+
|
|
6
85
|
## [2026-08-21] add | Local product insights and separate maintenance Skill
|
|
7
86
|
|
|
8
87
|
- Added passive, installation-level command observations plus explicit,
|
package/docs/product-contract.md
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose and authority
|
|
4
4
|
|
|
5
|
-
Semantic Atlas is a local project world model used by AI coding agents
|
|
5
|
+
Semantic Atlas is a local project world model used by AI coding agents and by
|
|
6
|
+
people who need a read-only view of established business knowledge. It connects
|
|
7
|
+
code structure to durable business concepts, flows, data, rules, and interfaces
|
|
8
|
+
so an agent can work from business meaning and a person can browse the resulting
|
|
9
|
+
map without reading implementation code first.
|
|
6
10
|
|
|
7
11
|
Source code remains authoritative. Atlas is a revision-aware projection with explicit evidence and validity. A stale, unsupported, unresolved, or insufficient result sends the calling agent back to source inspection.
|
|
8
12
|
|
|
@@ -15,6 +19,8 @@ Users and calling agents interact with one product:
|
|
|
15
19
|
- the `semantic-atlas` CLI supplies deterministic, machine-readable operations;
|
|
16
20
|
- the `semantic-atlas` Skill teaches the calling agent when and how to use those operations;
|
|
17
21
|
- the separate `semantic-atlas-insights` Skill supports deliberate product review and feedback triage;
|
|
22
|
+
- `semantic-atlas web` serves a local desktop viewer and read-only HTTP API over
|
|
23
|
+
eligible primary `main` or `master` working trees;
|
|
18
24
|
- `@colbymchenry/codegraph` is an internal structural-index dependency behind an Atlas-owned adapter;
|
|
19
25
|
- CodeGraph's CLI, MCP server, storage model, and public types are not exposed as Semantic Atlas workflows.
|
|
20
26
|
|
|
@@ -39,11 +45,25 @@ A normal task adds only the durable business knowledge it verifies while doing t
|
|
|
39
45
|
|
|
40
46
|
An indexed repository may legitimately have no business nodes. In that state, the world `map view` returns `regions: []` with `BUSINESS_KNOWLEDGE_EMPTY`; the agent uses `code search` and source as a bounded fallback for the current task. After source and tests establish durable meaning, the agent records only that reusable knowledge. Later tasks may add a broader parent and place an existing root beneath it without changing the existing node identity.
|
|
41
47
|
|
|
48
|
+
### Human read workflow
|
|
49
|
+
|
|
50
|
+
`semantic-atlas web` starts a loopback server and bundled desktop interface. The
|
|
51
|
+
viewer lists one primary working tree per Atlas repository only when that tree
|
|
52
|
+
is on `main` or `master`; linked worktrees and other branches are outside the
|
|
53
|
+
Web product. A person selects a project, reads the world view, enters established
|
|
54
|
+
business regions, searches business vocabulary, and inspects direct node
|
|
55
|
+
details and evidence.
|
|
56
|
+
|
|
57
|
+
The Web surface is read-only. It does not index, learn, submit GraphPatch,
|
|
58
|
+
search arbitrary code, select a worktree, switch branches, or mutate source,
|
|
59
|
+
Git, configuration, Skills, or Atlas knowledge. Its HTTP adapter and the CLI
|
|
60
|
+
call shared Atlas application services rather than invoking one another.
|
|
61
|
+
|
|
42
62
|
## Responsibility boundary
|
|
43
63
|
|
|
44
64
|
| Concern | Semantic Atlas | Calling agent |
|
|
45
65
|
| --- | --- | --- |
|
|
46
|
-
| Product interface | Exposes the `semantic-atlas` CLI
|
|
66
|
+
| Product interface | Exposes the `semantic-atlas` CLI, two focused Skills, and a local desktop read-only Web viewer | Chooses the repository, task scope, and maintenance cadence; people browse eligible primary-branch knowledge without changing it |
|
|
47
67
|
| Installation lifecycle | Ships version-matched primary and insights Skills, synchronizes them through `semantic-atlas setup`, and upgrades the global package plus Skills through `semantic-atlas upgrade` | Performs the initial global npm installation and can invoke setup or upgrade from any directory |
|
|
48
68
|
| Structural code model | Uses the embedded CodeGraph SDK for extraction, cross-file resolution, incremental sync, and structural queries | Reads source when the structural map is insufficient |
|
|
49
69
|
| Business world model | Stores and queries capabilities, scenarios, operations, invariants, interfaces, data, and their relationships | Understands natural language and decides which business assertions are justified |
|
|
@@ -128,7 +148,8 @@ Semantic Atlas does not provide:
|
|
|
128
148
|
- a language model, embeddings, vector search, or natural-language inference inside the CLI;
|
|
129
149
|
- source editing, test execution, Git mutation, code review, or release automation;
|
|
130
150
|
- exact claims for runtime-only behavior that the structural backend cannot establish;
|
|
131
|
-
- a human-facing IDE,
|
|
151
|
+
- a human-facing IDE, source editor, business-knowledge authoring UI, mobile
|
|
152
|
+
application, or remote collaboration service.
|
|
132
153
|
|
|
133
154
|
## Dependency policy
|
|
134
155
|
|
|
@@ -150,6 +171,11 @@ Every public release requires all of the following on the release commit:
|
|
|
150
171
|
8. Static and Fresh Agent verification of the packaged Semantic Atlas Skill passes.
|
|
151
172
|
9. At least 12 paired Fresh Agent business-location and dependency/impact cases preserve necessary-file recall, necessary-symbol recall, and answer correctness while reducing either median unique opened source files or median source input tokens by at least 30 percent.
|
|
152
173
|
10. No evaluated answer presents stale, hypothesis, unresolved, or unsupported knowledge as exact.
|
|
174
|
+
11. The packaged `web` command serves the bundled desktop application and the
|
|
175
|
+
versioned loopback HTTP API without executing CLI map subprocesses.
|
|
176
|
+
12. The Web catalog returns only primary working trees on `main` or `master`,
|
|
177
|
+
excludes linked worktrees, exposes no mutation route, and leaves Agent CLI
|
|
178
|
+
behavior and stored graph contracts unchanged.
|
|
153
179
|
|
|
154
180
|
The gate is fixed before comparative results are collected. A failed gate creates follow-up work; it does not broaden the current task until it passes.
|
|
155
181
|
|
|
@@ -159,5 +185,7 @@ The gate is fixed before comparative results are collected. A failed gate create
|
|
|
159
185
|
- [Graph model](contracts/graph-model.md)
|
|
160
186
|
- [CLI v1](contracts/cli-v1.md)
|
|
161
187
|
- [Insights v1](contracts/insights-v1.md)
|
|
188
|
+
- [HTTP API v1](contracts/http-api-v1.md)
|
|
162
189
|
- [GraphPatch v1](contracts/graph-patch-v1.md)
|
|
190
|
+
- [Desktop Web viewer](architecture/web-viewer.md)
|
|
163
191
|
- [Evaluation protocol](evaluation.md)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-atlas",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A local, revision-aware
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "A local, revision-aware business map for coding agents and read-only human browsing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
7
7
|
"code-analysis",
|
|
@@ -60,13 +60,14 @@
|
|
|
60
60
|
"tiktoken": "1.0.22",
|
|
61
61
|
"tsx": "^4.20.6",
|
|
62
62
|
"typescript": "^5.9.0",
|
|
63
|
+
"vite": "^7.3.6",
|
|
63
64
|
"vitest": "^3.2.0"
|
|
64
65
|
},
|
|
65
66
|
"scripts": {
|
|
66
|
-
"build": "tsc -p tsconfig.build.json",
|
|
67
|
+
"build": "tsc -p tsconfig.build.json && vite build",
|
|
67
68
|
"test": "vitest run",
|
|
68
69
|
"test:watch": "vitest",
|
|
69
|
-
"typecheck": "tsc -p tsconfig.json",
|
|
70
|
+
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.web.json",
|
|
70
71
|
"evaluation:validate": "tsx scripts/validate-evaluation.ts --baseline evaluation/cases/plan.json evaluation/examples/no-atlas-run.json",
|
|
71
72
|
"evaluation:discovery": "tsx scripts/validate-evaluation.ts evaluation/cases/plan.json evaluation/results/fresh-agent-discovery-v5/location-nestjs-provider-atlas.json",
|
|
72
73
|
"evaluation:run": "tsx scripts/run-fresh-agent-evaluation.ts",
|