semantic-atlas 0.2.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/.agents/skills/semantic-atlas/SKILL.md +3 -0
- package/.agents/skills/semantic-atlas/references/product-feedback.md +34 -0
- package/.agents/skills/semantic-atlas-insights/SKILL.md +55 -0
- package/README.md +229 -88
- package/README.zh-CN.md +204 -85
- package/dist/cli/argument-parser.js +9 -1
- package/dist/cli/bin.js +17 -2
- package/dist/cli/cli-application.d.ts +1 -0
- package/dist/cli/cli-application.d.ts.map +1 -1
- package/dist/cli/cli-application.js +64 -12
- package/dist/cli/insights-cli.d.ts +6 -0
- package/dist/cli/insights-cli.d.ts.map +1 -0
- package/dist/cli/insights-cli.js +236 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +94 -2
- package/dist/cli/standalone-cli.d.ts.map +1 -1
- package/dist/cli/standalone-cli.js +44 -5
- package/dist/cli/types.d.ts +2 -0
- package/dist/cli/types.d.ts.map +1 -1
- 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/contracts/cli.d.ts +63 -0
- package/dist/contracts/cli.d.ts.map +1 -1
- package/dist/contracts/cli.js +7 -0
- package/dist/contracts/insights.d.ts +2 -0
- package/dist/contracts/insights.d.ts.map +1 -0
- package/dist/contracts/insights.js +1 -0
- package/dist/contracts/public-contracts.d.ts +1 -0
- package/dist/contracts/public-contracts.d.ts.map +1 -1
- package/dist/contracts/public-contracts.js +1 -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/insights/contracts.d.ts +266 -0
- package/dist/insights/contracts.d.ts.map +1 -0
- package/dist/insights/contracts.js +124 -0
- package/dist/insights/insights-store.d.ts +73 -0
- package/dist/insights/insights-store.d.ts.map +1 -0
- package/dist/insights/insights-store.js +246 -0
- 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/setup/package-upgrader.d.ts +54 -0
- package/dist/setup/package-upgrader.d.ts.map +1 -0
- package/dist/setup/package-upgrader.js +169 -0
- package/dist/setup/skill-installer.d.ts +3 -2
- package/dist/setup/skill-installer.d.ts.map +1 -1
- package/dist/setup/skill-installer.js +67 -36
- package/dist/storage/atlas-database.d.ts +8 -1
- package/dist/storage/atlas-database.d.ts.map +1 -1
- package/dist/storage/atlas-database.js +68 -11
- 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 +40 -4
- package/docs/contracts/http-api-v1.md +155 -0
- package/docs/contracts/insights-v1.md +84 -0
- package/docs/index.md +7 -0
- package/docs/log.md +103 -0
- package/docs/product-contract.md +45 -10
- package/package.json +7 -4
- package/schemas/cli-envelope-v1.schema.json +85 -1
- package/schemas/insights-envelope-v1.schema.json +428 -0
|
@@ -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)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Insights Contract v1
|
|
2
|
+
|
|
3
|
+
## Question and scope
|
|
4
|
+
|
|
5
|
+
This page defines the local product-observability interface for Semantic Atlas.
|
|
6
|
+
It answers how a maintainer can evaluate adoption and confirmed friction without
|
|
7
|
+
adding work to a normal engineering task. The current contract is implemented
|
|
8
|
+
by `semantic-atlas insights` and `semantic-atlas feedback report`.
|
|
9
|
+
|
|
10
|
+
Insights are installation-scoped under `~/.semantic-atlas/insights.db`, or the
|
|
11
|
+
absolute `SEMANTIC_ATLAS_HOME` override. They are separate from each
|
|
12
|
+
repository's `atlas.db` knowledge and every worktree's `.atlas` projection.
|
|
13
|
+
|
|
14
|
+
## Data boundary
|
|
15
|
+
|
|
16
|
+
Every completed project command best-effort records one event containing:
|
|
17
|
+
|
|
18
|
+
- repository identity and the current snapshot identity when available;
|
|
19
|
+
- command name, outcome, exit code, stable warning codes, and rounded duration;
|
|
20
|
+
- a generated event ID and timestamp.
|
|
21
|
+
|
|
22
|
+
Events never contain command arguments, prompts, query text, source text, or
|
|
23
|
+
command output. A failure to write an event never changes the project command's
|
|
24
|
+
exit code, JSON response, or standard output.
|
|
25
|
+
|
|
26
|
+
`feedback report --stdin` stores explicit Agent input only when source
|
|
27
|
+
confirmation establishes meaningful product friction or a concrete improvement.
|
|
28
|
+
Each report includes a product classification, observed and expected behavior,
|
|
29
|
+
an optional suggestion, and up to five recent event IDs from the same
|
|
30
|
+
repository. The maintainer must keep this text concise and free of credentials,
|
|
31
|
+
source contents, prompts, command output, and unrelated task detail.
|
|
32
|
+
|
|
33
|
+
## Commands
|
|
34
|
+
|
|
35
|
+
| Command | Result |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `semantic-atlas insights summary [--period <period>]` | Aggregates command outcomes, command names, warning codes, and feedback categories. |
|
|
38
|
+
| `semantic-atlas insights feedback [--period <period>] [--status <status>]` | Lists explicit feedback reports for review. |
|
|
39
|
+
| `semantic-atlas insights feedback update --stdin` | Writes one triage decision: `triaged`, `resolved`, or `dismissed`, with a required explanatory note. |
|
|
40
|
+
| `semantic-atlas feedback report --stdin` | Project-scoped write of one evidence-contextual product report. |
|
|
41
|
+
|
|
42
|
+
The default period is `today`; accepted period values are `today`, `yesterday`,
|
|
43
|
+
`7d`, `30d`, and `all`. Day boundaries use the executing machine's local time,
|
|
44
|
+
and stored timestamps are ISO-8601 UTC. `--pretty` indents insights responses.
|
|
45
|
+
|
|
46
|
+
## Envelope
|
|
47
|
+
|
|
48
|
+
`insights` commands write the strict, repository-independent schema in
|
|
49
|
+
`schemas/insights-envelope-v1.schema.json`:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"schemaVersion": 1,
|
|
54
|
+
"status": "ok",
|
|
55
|
+
"data": {
|
|
56
|
+
"command": "insights.summary",
|
|
57
|
+
"range": {
|
|
58
|
+
"from": "2026-08-20T16:00:00.000Z",
|
|
59
|
+
"to": "2026-08-21T16:00:00.000Z"
|
|
60
|
+
},
|
|
61
|
+
"summary": {
|
|
62
|
+
"commands": { "total": 12, "outcomes": { "ok": 10, "partial": 2, "error": 0 }, "byCommand": [], "warningCodes": [] },
|
|
63
|
+
"feedback": { "total": 1, "byCategory": [] }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The envelope intentionally omits repository and snapshot fields because one
|
|
70
|
+
installation-level query can aggregate many repositories. Individual feedback
|
|
71
|
+
reports retain their hashed repository and nullable snapshot identity.
|
|
72
|
+
|
|
73
|
+
Invalid input returns the same envelope with `status: "error"`,
|
|
74
|
+
`data.error.code: "INVALID_INPUT"`, and exit code `2`. An internal local-store
|
|
75
|
+
failure returns `INTERNAL_ERROR` and exit code `1`. Successful data, including
|
|
76
|
+
an empty range, returns exit code `0`.
|
|
77
|
+
|
|
78
|
+
## Interpretation
|
|
79
|
+
|
|
80
|
+
Command volume and warnings show usage shape; they are not a retrieval-recall
|
|
81
|
+
or task-quality score. Evaluate a product change by connecting trends to
|
|
82
|
+
source-confirmed feedback, reproducible investigations, tests, and fresh-agent
|
|
83
|
+
task evaluation. The `semantic-atlas-insights` Skill provides the daily review
|
|
84
|
+
and triage workflow while the primary Skill stays focused on development work.
|
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,10 @@ 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.
|
|
37
|
+
- [Insights v1](contracts/insights-v1.md): local product signals, explicit
|
|
38
|
+
feedback, triage, storage boundary, and interpretation.
|
|
32
39
|
|
|
33
40
|
## Evaluation
|
|
34
41
|
|
package/docs/log.md
CHANGED
|
@@ -3,6 +3,109 @@
|
|
|
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
|
+
|
|
85
|
+
## [2026-08-21] add | Local product insights and separate maintenance Skill
|
|
86
|
+
|
|
87
|
+
- Added passive, installation-level command observations plus explicit,
|
|
88
|
+
evidence-contextual feedback and a strict `insights` JSON envelope.
|
|
89
|
+
- Kept normal task context lean: the primary Skill loads feedback guidance only
|
|
90
|
+
after confirmed material friction, while a separately installed insights Skill
|
|
91
|
+
owns daily review and feedback triage.
|
|
92
|
+
- Defined the privacy boundary, interpretation limits, and independent
|
|
93
|
+
repository/worktree storage in `contracts/insights-v1.md`.
|
|
94
|
+
- Affected pages: `product-contract.md`, `contracts/cli-v1.md`,
|
|
95
|
+
`contracts/insights-v1.md`, and `index.md`.
|
|
96
|
+
|
|
97
|
+
## [2026-08-20] revise | Business-first README and managed package upgrade
|
|
98
|
+
|
|
99
|
+
- Rebuilt the bilingual README around the product gap between file search and
|
|
100
|
+
business understanding, task-driven learning, and one semantically zoomable
|
|
101
|
+
map.
|
|
102
|
+
- Added repository-independent `upgrade`: resolve npm `latest`, install the
|
|
103
|
+
exact target, verify the new CLI, and synchronize the new package's Skill.
|
|
104
|
+
- Kept `setup` as the repair and synchronization command for the currently
|
|
105
|
+
installed package, including the already-current upgrade path.
|
|
106
|
+
- Affected pages: `README.md`, `README.zh-CN.md`, `product-contract.md`, and
|
|
107
|
+
`contracts/cli-v1.md`.
|
|
108
|
+
|
|
6
109
|
## [2026-08-20] revise | Versioned evaluation command replay
|
|
7
110
|
|
|
8
111
|
- Bound each Fresh Agent run to the command-policy version that produced it.
|
package/docs/product-contract.md
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
# Semantic Atlas
|
|
1
|
+
# Semantic Atlas Product Contract
|
|
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
|
|
|
9
|
-
This document
|
|
13
|
+
This document defines the current product boundary. The versioned machine contracts live in `schemas/`; the storage and integration design is defined in [CodeGraph backend architecture](architecture/codegraph-backend.md).
|
|
10
14
|
|
|
11
15
|
## One-product boundary
|
|
12
16
|
|
|
13
17
|
Users and calling agents interact with one product:
|
|
14
18
|
|
|
15
19
|
- the `semantic-atlas` CLI supplies deterministic, machine-readable operations;
|
|
16
|
-
- the
|
|
20
|
+
- the `semantic-atlas` Skill teaches the calling agent when and how to use those operations;
|
|
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;
|
|
17
24
|
- `@colbymchenry/codegraph` is an internal structural-index dependency behind an Atlas-owned adapter;
|
|
18
25
|
- CodeGraph's CLI, MCP server, storage model, and public types are not exposed as Semantic Atlas workflows.
|
|
19
26
|
|
|
@@ -38,17 +45,32 @@ A normal task adds only the durable business knowledge it verifies while doing t
|
|
|
38
45
|
|
|
39
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.
|
|
40
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
|
+
|
|
41
62
|
## Responsibility boundary
|
|
42
63
|
|
|
43
64
|
| Concern | Semantic Atlas | Calling agent |
|
|
44
65
|
| --- | --- | --- |
|
|
45
|
-
| Product interface | Exposes the `semantic-atlas` CLI and
|
|
46
|
-
|
|
|
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 |
|
|
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 |
|
|
47
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 |
|
|
48
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 |
|
|
49
70
|
| Unified graph | Connects business assertions to structural evidence and returns one Atlas graph contract | Uses graph results as bounded context |
|
|
50
71
|
| Evidence lifecycle | Records source locators and hashes, then derives `valid` or `stale` after indexing | Revalidates or replaces stale assertions |
|
|
51
72
|
| Generated state | Writes durable knowledge under the user Atlas home and disposable structure under ignored `.atlas/` | Edits source and project configuration |
|
|
73
|
+
| Product observability | Best-effort records objective command events and explicit feedback in the installation-level insights store | Reviews signals, validates reports, and chooses product follow-up work |
|
|
52
74
|
| Verification | Reports evidence, freshness, support, and unresolved boundaries | Runs tests, reviews diffs, and judges correctness |
|
|
53
75
|
| Git workflow | Reads Git state for snapshots without changing tracked state | Commits, merges, rebases, reviews, and releases |
|
|
54
76
|
|
|
@@ -60,6 +82,9 @@ Atlas separates repository knowledge from worktree structure:
|
|
|
60
82
|
~/.semantic-atlas/repositories/<repository-id>/
|
|
61
83
|
└── atlas.db repository-wide durable knowledge
|
|
62
84
|
|
|
85
|
+
~/.semantic-atlas/
|
|
86
|
+
└── insights.db installation-level product observations and feedback
|
|
87
|
+
|
|
63
88
|
<worktree>/
|
|
64
89
|
└── .atlas/
|
|
65
90
|
├── .gitignore
|
|
@@ -68,6 +93,7 @@ Atlas separates repository knowledge from worktree structure:
|
|
|
68
93
|
```
|
|
69
94
|
|
|
70
95
|
- The user-level `atlas.db` stores business knowledge, repository snapshots, snapshot-specific evidence bindings and validity, plus one publication chain for each Git directory.
|
|
96
|
+
- The separate user-level `insights.db` stores product command metadata and explicit feedback. It contains no business assertions, structural projection data, command arguments, prompts, source text, or command output.
|
|
71
97
|
- `SEMANTIC_ATLAS_HOME` is the only storage override. It must be absolute; the default is `~/.semantic-atlas`.
|
|
72
98
|
- Atlas prepares `.atlas/.gitignore` so generated state does not change normal Git status. No tracked source file or project configuration is created or modified.
|
|
73
99
|
- Every worktree has an independent CodeGraph index because its checked-out and dirty source state can differ. A missing index is copied from the best compatible sibling through SQLite backup and always incrementally synchronized before publication; full indexing is the fallback.
|
|
@@ -108,13 +134,13 @@ Root placement is provisional. Business keys remain stable vocabulary identifier
|
|
|
108
134
|
|
|
109
135
|
## Supported scope
|
|
110
136
|
|
|
111
|
-
|
|
137
|
+
The current release supports business understanding for TypeScript and JavaScript projects, with initial evaluation coverage for NestJS, GraphQL, TypeORM, and BullMQ flows. CodeGraph supplies the structural coverage available from the pinned dependency version. Atlas reports unsupported or unresolved structure instead of promising complete JavaScript runtime semantics.
|
|
112
138
|
|
|
113
139
|
Framework knowledge is implemented as Atlas-owned business interpretation over structural queries. It focuses on capabilities, operations, interfaces, data flow, rules, tests, and their evidence. Language parsing, cross-file symbol resolution, callers, callees, and file dependencies remain the structural backend's responsibility.
|
|
114
140
|
|
|
115
141
|
## Non-goals
|
|
116
142
|
|
|
117
|
-
|
|
143
|
+
Semantic Atlas does not provide:
|
|
118
144
|
|
|
119
145
|
- a second CodeGraph-facing product, CLI, MCP server, or user workflow;
|
|
120
146
|
- a new compiler, language server, or general-purpose JavaScript runtime analyzer;
|
|
@@ -122,7 +148,8 @@ v0.1 does not provide:
|
|
|
122
148
|
- a language model, embeddings, vector search, or natural-language inference inside the CLI;
|
|
123
149
|
- source editing, test execution, Git mutation, code review, or release automation;
|
|
124
150
|
- exact claims for runtime-only behavior that the structural backend cannot establish;
|
|
125
|
-
- a human-facing IDE,
|
|
151
|
+
- a human-facing IDE, source editor, business-knowledge authoring UI, mobile
|
|
152
|
+
application, or remote collaboration service.
|
|
126
153
|
|
|
127
154
|
## Dependency policy
|
|
128
155
|
|
|
@@ -132,7 +159,7 @@ The fallback order is direct dependency, a small upstream extension, a thin main
|
|
|
132
159
|
|
|
133
160
|
## Release gate
|
|
134
161
|
|
|
135
|
-
|
|
162
|
+
Every public release requires all of the following on the release commit:
|
|
136
163
|
|
|
137
164
|
1. A packaged install uses the pinned CodeGraph SDK through an Atlas-owned adapter and exposes no CodeGraph CLI or MCP workflow.
|
|
138
165
|
2. `semantic-atlas index` creates only ignored `.atlas/` state in the target worktree and leaves tracked files and normal Git status unchanged.
|
|
@@ -144,6 +171,11 @@ The v0.1.0 release requires all of the following on the release commit:
|
|
|
144
171
|
8. Static and Fresh Agent verification of the packaged Semantic Atlas Skill passes.
|
|
145
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.
|
|
146
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.
|
|
147
179
|
|
|
148
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.
|
|
149
181
|
|
|
@@ -152,5 +184,8 @@ The gate is fixed before comparative results are collected. A failed gate create
|
|
|
152
184
|
- [CodeGraph backend architecture](architecture/codegraph-backend.md)
|
|
153
185
|
- [Graph model](contracts/graph-model.md)
|
|
154
186
|
- [CLI v1](contracts/cli-v1.md)
|
|
187
|
+
- [Insights v1](contracts/insights-v1.md)
|
|
188
|
+
- [HTTP API v1](contracts/http-api-v1.md)
|
|
155
189
|
- [GraphPatch v1](contracts/graph-patch-v1.md)
|
|
190
|
+
- [Desktop Web viewer](architecture/web-viewer.md)
|
|
156
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",
|
|
@@ -36,10 +36,12 @@
|
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
".agents/skills/semantic-atlas",
|
|
39
|
+
".agents/skills/semantic-atlas-insights",
|
|
39
40
|
"dist",
|
|
40
41
|
"docs",
|
|
41
42
|
"schemas",
|
|
42
43
|
"README.md",
|
|
44
|
+
"README.zh-CN.md",
|
|
43
45
|
"LICENSE"
|
|
44
46
|
],
|
|
45
47
|
"engines": {
|
|
@@ -58,13 +60,14 @@
|
|
|
58
60
|
"tiktoken": "1.0.22",
|
|
59
61
|
"tsx": "^4.20.6",
|
|
60
62
|
"typescript": "^5.9.0",
|
|
63
|
+
"vite": "^7.3.6",
|
|
61
64
|
"vitest": "^3.2.0"
|
|
62
65
|
},
|
|
63
66
|
"scripts": {
|
|
64
|
-
"build": "tsc -p tsconfig.build.json",
|
|
67
|
+
"build": "tsc -p tsconfig.build.json && vite build",
|
|
65
68
|
"test": "vitest run",
|
|
66
69
|
"test:watch": "vitest",
|
|
67
|
-
"typecheck": "tsc -p tsconfig.json",
|
|
70
|
+
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.web.json",
|
|
68
71
|
"evaluation:validate": "tsx scripts/validate-evaluation.ts --baseline evaluation/cases/plan.json evaluation/examples/no-atlas-run.json",
|
|
69
72
|
"evaluation:discovery": "tsx scripts/validate-evaluation.ts evaluation/cases/plan.json evaluation/results/fresh-agent-discovery-v5/location-nestjs-provider-atlas.json",
|
|
70
73
|
"evaluation:run": "tsx scripts/run-fresh-agent-evaluation.ts",
|
|
@@ -604,6 +604,89 @@
|
|
|
604
604
|
"staleAssertions"
|
|
605
605
|
],
|
|
606
606
|
"additionalProperties": {}
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"type": "object",
|
|
610
|
+
"properties": {
|
|
611
|
+
"command": {
|
|
612
|
+
"type": "string",
|
|
613
|
+
"const": "feedback.report"
|
|
614
|
+
},
|
|
615
|
+
"report": {
|
|
616
|
+
"type": "object",
|
|
617
|
+
"properties": {
|
|
618
|
+
"id": {
|
|
619
|
+
"type": "string",
|
|
620
|
+
"format": "uuid",
|
|
621
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
622
|
+
},
|
|
623
|
+
"kind": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"enum": [
|
|
626
|
+
"problem",
|
|
627
|
+
"suggestion"
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
"category": {
|
|
631
|
+
"type": "string",
|
|
632
|
+
"enum": [
|
|
633
|
+
"misleading-result",
|
|
634
|
+
"missing-knowledge",
|
|
635
|
+
"workflow-friction",
|
|
636
|
+
"performance",
|
|
637
|
+
"cli-error",
|
|
638
|
+
"skill-instruction"
|
|
639
|
+
]
|
|
640
|
+
},
|
|
641
|
+
"impact": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"enum": [
|
|
644
|
+
"blocked",
|
|
645
|
+
"slowed",
|
|
646
|
+
"minor"
|
|
647
|
+
]
|
|
648
|
+
},
|
|
649
|
+
"sourceConfirmed": {
|
|
650
|
+
"type": "boolean"
|
|
651
|
+
},
|
|
652
|
+
"status": {
|
|
653
|
+
"type": "string",
|
|
654
|
+
"enum": [
|
|
655
|
+
"new",
|
|
656
|
+
"triaged",
|
|
657
|
+
"resolved",
|
|
658
|
+
"dismissed"
|
|
659
|
+
]
|
|
660
|
+
},
|
|
661
|
+
"contextEventCount": {
|
|
662
|
+
"type": "integer",
|
|
663
|
+
"minimum": 0,
|
|
664
|
+
"maximum": 9007199254740991
|
|
665
|
+
},
|
|
666
|
+
"createdAt": {
|
|
667
|
+
"type": "string",
|
|
668
|
+
"format": "date-time",
|
|
669
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"required": [
|
|
673
|
+
"id",
|
|
674
|
+
"kind",
|
|
675
|
+
"category",
|
|
676
|
+
"impact",
|
|
677
|
+
"sourceConfirmed",
|
|
678
|
+
"status",
|
|
679
|
+
"contextEventCount",
|
|
680
|
+
"createdAt"
|
|
681
|
+
],
|
|
682
|
+
"additionalProperties": false
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"required": [
|
|
686
|
+
"command",
|
|
687
|
+
"report"
|
|
688
|
+
],
|
|
689
|
+
"additionalProperties": {}
|
|
607
690
|
}
|
|
608
691
|
]
|
|
609
692
|
},
|
|
@@ -670,7 +753,8 @@
|
|
|
670
753
|
"map.show",
|
|
671
754
|
"code.search",
|
|
672
755
|
"learn",
|
|
673
|
-
"changes"
|
|
756
|
+
"changes",
|
|
757
|
+
"feedback.report"
|
|
674
758
|
]
|
|
675
759
|
},
|
|
676
760
|
{
|