semantic-atlas 1.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/.agents/skills/semantic-atlas/references/observations.md +2 -3
  2. package/.agents/skills/semantic-atlas-maintenance/SKILL.md +1 -1
  3. package/README.md +26 -6
  4. package/dist/application/map-application.d.ts +11 -0
  5. package/dist/application/map-application.d.ts.map +1 -1
  6. package/dist/application/map-application.js +21 -1
  7. package/dist/application/map-application.js.map +1 -1
  8. package/dist/cli/run-cli.d.ts +2 -0
  9. package/dist/cli/run-cli.d.ts.map +1 -1
  10. package/dist/cli/run-cli.js +47 -2
  11. package/dist/cli/run-cli.js.map +1 -1
  12. package/dist/contracts/cli.d.ts +8 -0
  13. package/dist/contracts/cli.d.ts.map +1 -1
  14. package/dist/contracts/observation.d.ts +0 -235
  15. package/dist/contracts/observation.d.ts.map +1 -1
  16. package/dist/contracts/observation.js +0 -15
  17. package/dist/contracts/observation.js.map +1 -1
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/insights/insight-service.js.map +1 -1
  23. package/dist/map/business-graph.d.ts +1 -0
  24. package/dist/map/business-graph.d.ts.map +1 -1
  25. package/dist/map/business-graph.js +10 -0
  26. package/dist/map/business-graph.js.map +1 -1
  27. package/dist/observations/observation-claim-manager.d.ts +4 -0
  28. package/dist/observations/observation-claim-manager.d.ts.map +1 -1
  29. package/dist/observations/observation-claim-manager.js +11 -60
  30. package/dist/observations/observation-claim-manager.js.map +1 -1
  31. package/dist/observations/observation-store.d.ts +3 -3
  32. package/dist/observations/observation-store.d.ts.map +1 -1
  33. package/dist/observations/observation-store.js +10 -5
  34. package/dist/observations/observation-store.js.map +1 -1
  35. package/dist/reconciliation/reconciliation-service.js +0 -2
  36. package/dist/reconciliation/reconciliation-service.js.map +1 -1
  37. package/dist/rendering/html.d.ts +3 -0
  38. package/dist/rendering/html.d.ts.map +1 -0
  39. package/dist/rendering/html.js +12 -0
  40. package/dist/rendering/html.js.map +1 -0
  41. package/dist/rendering/map-camera.d.ts +25 -0
  42. package/dist/rendering/map-camera.d.ts.map +1 -0
  43. package/dist/rendering/map-camera.js +47 -0
  44. package/dist/rendering/map-camera.js.map +1 -0
  45. package/dist/rendering/map-projector.d.ts +8 -1
  46. package/dist/rendering/map-projector.d.ts.map +1 -1
  47. package/dist/rendering/map-projector.js +106 -169
  48. package/dist/rendering/map-projector.js.map +1 -1
  49. package/dist/rendering/viewer-browser.d.ts +2 -0
  50. package/dist/rendering/viewer-browser.d.ts.map +1 -0
  51. package/dist/rendering/viewer-browser.js +279 -0
  52. package/dist/rendering/viewer-browser.js.map +1 -0
  53. package/dist/rendering/viewer-page.d.ts +29 -0
  54. package/dist/rendering/viewer-page.d.ts.map +1 -0
  55. package/dist/rendering/viewer-page.js +438 -0
  56. package/dist/rendering/viewer-page.js.map +1 -0
  57. package/dist/setup/managed-skill-installer.d.ts.map +1 -1
  58. package/dist/setup/managed-skill-installer.js +9 -23
  59. package/dist/setup/managed-skill-installer.js.map +1 -1
  60. package/dist/web/local-web-application.d.ts +9 -0
  61. package/dist/web/local-web-application.d.ts.map +1 -0
  62. package/dist/web/local-web-application.js +29 -0
  63. package/dist/web/local-web-application.js.map +1 -0
  64. package/dist/web/local-web-server.d.ts +12 -0
  65. package/dist/web/local-web-server.d.ts.map +1 -0
  66. package/dist/web/local-web-server.js +71 -0
  67. package/dist/web/local-web-server.js.map +1 -0
  68. package/dist/web/web-command-service.d.ts +16 -0
  69. package/dist/web/web-command-service.d.ts.map +1 -0
  70. package/dist/web/web-command-service.js +50 -0
  71. package/dist/web/web-command-service.js.map +1 -0
  72. package/docs/architecture.md +50 -25
  73. package/docs/index.md +4 -4
  74. package/docs/map-format.md +2 -1
  75. package/docs/observations.md +9 -17
  76. package/docs/product-contract.md +34 -42
  77. package/package.json +2 -3
@@ -0,0 +1,71 @@
1
+ import { createServer } from "node:http";
2
+ const LOOPBACK_HOST = "127.0.0.1";
3
+ export async function startLocalWebServer(options) {
4
+ await options.application.render();
5
+ const server = createServer((request, response) => {
6
+ void routeRequest(options.application, request.method ?? "GET", request.url ?? "/", response);
7
+ });
8
+ await new Promise((resolve, reject) => {
9
+ server.once("error", reject);
10
+ server.listen(options.port, LOOPBACK_HOST, () => {
11
+ server.off("error", reject);
12
+ resolve();
13
+ });
14
+ });
15
+ const address = server.address();
16
+ if (!address || typeof address === "string") {
17
+ await closeServer(server);
18
+ throw new Error("Could not resolve the local Web server address");
19
+ }
20
+ return {
21
+ url: `http://${LOOPBACK_HOST}:${address.port}`,
22
+ repositoryCount: options.application.repositoryCount,
23
+ close: async () => {
24
+ server.closeIdleConnections();
25
+ await closeServer(server);
26
+ },
27
+ };
28
+ }
29
+ async function routeRequest(application, method, requestUrl, response) {
30
+ if (method !== "GET" && method !== "HEAD") {
31
+ response.writeHead(405, {
32
+ Allow: "GET, HEAD",
33
+ "Content-Type": "text/plain; charset=utf-8",
34
+ });
35
+ response.end("Method not allowed\n");
36
+ return;
37
+ }
38
+ const pathname = new URL(requestUrl, `http://${LOOPBACK_HOST}`).pathname;
39
+ if (pathname === "/health") {
40
+ sendResponse(response, method, 200, "application/json; charset=utf-8", '{"ok":true}\n');
41
+ return;
42
+ }
43
+ if (pathname !== "/") {
44
+ sendResponse(response, method, 404, "text/plain; charset=utf-8", "Not found\n");
45
+ return;
46
+ }
47
+ try {
48
+ const html = await application.render();
49
+ response.setHeader("Content-Security-Policy", "default-src 'none'; style-src 'unsafe-inline'; script-src 'unsafe-inline'; base-uri 'none'; form-action 'none'");
50
+ response.setHeader("X-Content-Type-Options", "nosniff");
51
+ sendResponse(response, method, 200, "text/html; charset=utf-8", html);
52
+ }
53
+ catch {
54
+ sendResponse(response, method, 500, "text/plain; charset=utf-8", "The business map could not be loaded.\n");
55
+ }
56
+ }
57
+ function sendResponse(response, method, status, contentType, body) {
58
+ response.writeHead(status, {
59
+ "Content-Type": contentType,
60
+ "Content-Length": Buffer.byteLength(body),
61
+ });
62
+ response.end(method === "HEAD" ? undefined : body);
63
+ }
64
+ async function closeServer(server) {
65
+ if (!server.listening)
66
+ return;
67
+ await new Promise((resolve, reject) => {
68
+ server.close((error) => error ? reject(error) : resolve());
69
+ });
70
+ }
71
+ //# sourceMappingURL=local-web-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-web-server.js","sourceRoot":"","sources":["../../src/web/local-web-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,WAAW,CAAC;AAG9D,MAAM,aAAa,GAAG,WAAW,CAAC;AAalC,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,OAA8B;IAE9B,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;QAChD,KAAK,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,QAAQ,CAAC,CAAC;IAChG,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE;YAC9C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC5B,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IACjC,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;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B,gHAAgH,CACjH,CAAC;QACF,QAAQ,CAAC,SAAS,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAC;QACxD,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,0BAA0B,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IAAC,MAAM,CAAC;QACP,YAAY,CACV,QAAQ,EACR,MAAM,EACN,GAAG,EACH,2BAA2B,EAC3B,yCAAyC,CAC1C,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CACnB,QAAwB,EACxB,MAAc,EACd,MAAc,EACd,WAAmB,EACnB,IAAY;IAEZ,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE;QACzB,cAAc,EAAE,WAAW;QAC3B,gBAAgB,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;KAC1C,CAAC,CAAC;IACH,QAAQ,CAAC,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACrD,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,MAAuC;IAChE,IAAI,CAAC,MAAM,CAAC,SAAS;QAAE,OAAO;IAC9B,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC1C,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { MapApplication } from "../application/map-application.js";
2
+ export interface StartWebOptions {
3
+ readonly repositoryPaths: readonly string[];
4
+ readonly port: number;
5
+ readonly openBrowser: boolean;
6
+ }
7
+ export interface WebSessionData {
8
+ readonly url: string;
9
+ readonly repositoryCount: number;
10
+ }
11
+ export declare class WebCommandService {
12
+ private readonly mapApplication;
13
+ constructor(mapApplication: MapApplication);
14
+ start(options: StartWebOptions): Promise<WebSessionData>;
15
+ }
16
+ //# sourceMappingURL=web-command-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-command-service.d.ts","sourceRoot":"","sources":["../../src/web/web-command-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAInE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED,qBAAa,iBAAiB;IACT,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAErD,KAAK,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC;CAUtE"}
@@ -0,0 +1,50 @@
1
+ import { spawn } from "node:child_process";
2
+ import { MapApplication } from "../application/map-application.js";
3
+ import { LocalWebApplication } from "./local-web-application.js";
4
+ import { startLocalWebServer } from "./local-web-server.js";
5
+ export class WebCommandService {
6
+ mapApplication;
7
+ constructor(mapApplication) {
8
+ this.mapApplication = mapApplication;
9
+ }
10
+ async start(options) {
11
+ const application = new LocalWebApplication(this.mapApplication, options.repositoryPaths);
12
+ const server = await startLocalWebServer({ application, port: options.port });
13
+ installShutdownHandlers(server);
14
+ if (options.openBrowser)
15
+ openDefaultBrowser(server.url);
16
+ return {
17
+ url: server.url,
18
+ repositoryCount: server.repositoryCount,
19
+ };
20
+ }
21
+ }
22
+ function installShutdownHandlers(server) {
23
+ let closing = false;
24
+ const close = () => {
25
+ if (closing)
26
+ return;
27
+ closing = true;
28
+ void server.close().finally(() => {
29
+ process.exitCode = 0;
30
+ });
31
+ };
32
+ process.once("SIGINT", close);
33
+ process.once("SIGTERM", close);
34
+ }
35
+ function openDefaultBrowser(url) {
36
+ const command = process.platform === "darwin"
37
+ ? { executable: "open", arguments: [url] }
38
+ : process.platform === "win32"
39
+ ? { executable: "cmd", arguments: ["/c", "start", "", url] }
40
+ : { executable: "xdg-open", arguments: [url] };
41
+ const child = spawn(command.executable, command.arguments, {
42
+ detached: true,
43
+ stdio: "ignore",
44
+ });
45
+ child.once("error", () => {
46
+ // The printed loopback URL remains usable when the desktop opener is unavailable.
47
+ });
48
+ child.unref();
49
+ }
50
+ //# sourceMappingURL=web-command-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-command-service.js","sourceRoot":"","sources":["../../src/web/web-command-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAuB,MAAM,uBAAuB,CAAC;AAajF,MAAM,OAAO,iBAAiB;IACQ;IAApC,YAAoC,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAAG,CAAC;IAE/D,KAAK,CAAC,KAAK,CAAC,OAAwB;QACzC,MAAM,WAAW,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;QAC1F,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9E,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,OAAO,CAAC,WAAW;YAAE,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACxD,OAAO;YACL,GAAG,EAAE,MAAM,CAAC,GAAG;Y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CAAC"}
@@ -6,7 +6,7 @@ public CLI, renderer, and repository Agent Skill.
6
6
 
7
7
  **Status: query, validation, visual projection, repository Agents, managed
8
8
  Skill lifecycle, accuracy observations, read-only reconciliation, and public
9
- release-candidate verification are implemented locally.**
9
+ release verification are implemented and released.**
10
10
 
11
11
  ## System Model
12
12
 
@@ -106,10 +106,32 @@ ambiguity explicitly rather than selecting a hidden match.
106
106
 
107
107
  ### MapProjector
108
108
 
109
- Builds deterministic graph projections for people and agents. The first visual
110
- projection distinguishes semantic containment from directed horizontal
111
- relations and preserves stable element identities for repeatable layout and
112
- inspection.
109
+ Builds deterministic repository-wide and top-level-domain graph projections
110
+ for people and agents. A domain projection keeps directly connected external
111
+ concepts as visible boundary nodes. Every projection distinguishes semantic
112
+ containment from directed horizontal relations and preserves stable element
113
+ identities for repeatable layout and inspection.
114
+
115
+ ### ViewerPage
116
+
117
+ Owns the compact human inspection surface shared by static export and Web. It
118
+ combines project and business-domain selection, map statistics, a restrained
119
+ legend, pan, zoom, and fit-to-view around deterministic SVG projections. Cards
120
+ render stable business meaning only. Pointer or keyboard selection opens the
121
+ node's navigation anchors in an overlaid desktop side panel or narrow-screen
122
+ bottom panel without relaying out the graph. Camera coordinates use the SVG
123
+ `xMidYMid meet` scale and letterbox offsets for both pointer zoom and pan. Its
124
+ browser interaction state is disposable and never enters tracked map data.
125
+
126
+ ### LocalWebApplication And LocalWebServer
127
+
128
+ `LocalWebApplication` reloads only the repository paths supplied by the CLI and
129
+ renders the shared Viewer. `LocalWebServer` binds to `127.0.0.1`, serves GET and
130
+ HEAD, rejects mutation methods, and accepts no repository path from HTTP. The
131
+ server owns transport lifetime only; map loading, validation, layout, and HTML
132
+ remain in their existing application and rendering owners. When allowed
133
+ repositories share a basename, `ViewerPage` adds deterministic numeric labels
134
+ without revealing parent or absolute paths.
113
135
 
114
136
  ### CLI
115
137
 
@@ -146,10 +168,10 @@ Coordinates the package's `semantic-atlas` and `semantic-atlas-maintenance`
146
168
  payloads. Each Skill receives one `ManagedSkillInstaller` with the same package
147
169
  identity and its own target directory. The per-Skill installer derives a
148
170
  deterministic payload fingerprint, records package and Skill identity in a
149
- management marker, recognizes the primary Skill's v0.4 marker as a supported
150
- predecessor, and classifies repeated setup as current, repair, upgrade, or
151
- interrupted-swap recovery. It requires recognized ownership before replacing
152
- an existing same-named directory.
171
+ management marker, and classifies repeated setup as current, repair, upgrade,
172
+ or interrupted-swap recovery. It requires the current marker contract before
173
+ replacing an existing same-named directory; obsolete and unrelated directories
174
+ remain untouched.
153
175
 
154
176
  Replacement uses one complete staged directory. The current managed directory
155
177
  moves to a deterministic backup before the staged directory becomes active. A
@@ -163,7 +185,7 @@ Owns the boundary between npm package state and managed Skills state. It reads
163
185
  npm's stable version first, installs an exact `semantic-atlas@<version>` when
164
186
  the current package differs, locates that package through npm's global root,
165
187
  verifies its CLI version through the current Node executable, and invokes that
166
- CLI's `setup`. The old process never copies its own Skills after a package
188
+ CLI's `setup`. The invoking process never copies its own Skills after a package
167
189
  replacement.
168
190
 
169
191
  ### RepositoryIdentityResolver
@@ -184,8 +206,8 @@ observation from the same repository partition before persistence.
184
206
 
185
207
  Owns the observation-ID claim lifecycle. It publishes complete synced owner
186
208
  metadata without overwrite, distinguishes process instances, recovers the
187
- earlier directory claim format, and verifies ownership again before final
188
- observation publication.
209
+ current atomic-file claim format, and verifies ownership again before final
210
+ observation publication. Unknown claim shapes remain in place and fail closed.
189
211
 
190
212
  ### ObservationStore
191
213
 
@@ -194,9 +216,8 @@ manager around each write. The store writes and syncs a complete observation
194
216
  staging file, atomically renames it into place, returns idempotency for an exact
195
217
  replay, and reports a conflict for changed content under an existing ID. Its
196
218
  write boundary accepts current task v2 and review v1 artifacts. Its read
197
- boundary also accepts immutable task v1 artifacts so package upgrades preserve
198
- historical investigation evidence and review references without assigning a
199
- business domain to legacy candidates.
219
+ boundary accepts the same current task and review contracts; unsupported stored
220
+ artifacts fail the read instead of being reinterpreted.
200
221
 
201
222
  ### InsightService
202
223
 
@@ -212,15 +233,14 @@ uses explicit business-domain ownership plus exact candidate kind and summary,
212
233
  preserves each candidate occurrence, evidence disposition, task query record,
213
234
  human correction, and linked independent review, and marks groups with multiple
214
235
  origins as duplicates. It reads repository identity and observations without
215
- loading or editing the business map. Legacy task v1 candidates remain retained
216
- evidence but do not enter a domain group because their ownership is unknown.
236
+ loading or editing the business map.
217
237
 
218
238
  ### Release Candidate Verification
219
239
 
220
240
  The repository-owned release gate composes contract and source tests,
221
241
  typecheck, build, deterministic render checks, packed-tarball privacy, an
222
- anonymous installed-product flow, a public v0.4-to-v1 transition rehearsal,
223
- package dry-run, and Git diff validation. CI invokes the same gate used by a
242
+ anonymous installed-product flow, package dry-run, and Git diff validation. CI
243
+ invokes the same gate used by a
224
244
  release tag so the public package is not validated through a weaker path.
225
245
 
226
246
  ### Release Automation
@@ -235,9 +255,9 @@ environment, checks out the annotated tag, proves that the tag, commit, and
235
255
  stable package version agree, repeats the Release check as defense in depth,
236
256
  runs release-candidate verification, and publishes with provenance. Finally, it
237
257
  reads the exact version, latest tag, shasum, and integrity back from the public
238
- registry. The lease-checked v1 `main` discontinuity, repository setting changes,
239
- tag creation, GitHub Release publication, and npm publication remain explicit
240
- later operations rather than local build effects.
258
+ registry. The fast-forward `main` push, repository setting changes, tag creation,
259
+ GitHub Release publication, and npm publication remain explicit operations
260
+ rather than local build effects.
241
261
 
242
262
  ## Data Lifecycles
243
263
 
@@ -294,6 +314,7 @@ lifecycle commands:
294
314
  semantic-atlas validate [--repo <path>]
295
315
  semantic-atlas context <id-or-term> [--repo <path>]
296
316
  semantic-atlas render [--repo <path>] [--output <path>]
317
+ semantic-atlas web [--repo <path...>] [--port <port>] [--no-open]
297
318
  semantic-atlas setup
298
319
  semantic-atlas upgrade
299
320
  semantic-atlas observe task --stdin [--repo <path>]
@@ -304,9 +325,11 @@ semantic-atlas --version
304
325
  ```
305
326
 
306
327
  Map commands resolve and report the repository root and map-document set they
307
- used. Observation commands report the derived repository identity, while
308
- package lifecycle commands remain repository-independent. Machine output uses
309
- a versioned envelope with a stable success or error discriminant.
328
+ used. `web` reports its loopback URL and repository count without exposing
329
+ those roots to the browser. Observation commands report the derived repository
330
+ identity, while package lifecycle commands remain repository-independent.
331
+ Machine output uses a versioned envelope with a stable success or error
332
+ discriminant.
310
333
 
311
334
  `context` returns ambiguity when multiple concepts match the term. Callers can
312
335
  then use a stable ID. A missing concept is a bounded map result and routes the
@@ -377,6 +400,8 @@ Errors fall into stable categories:
377
400
  summary.
378
401
  - `RECONCILIATION_READ_FAILED`: retained candidate and review evidence cannot
379
402
  produce a trustworthy reconciliation report.
403
+ - `WEB_START_FAILED`: one of the explicitly selected repositories cannot load,
404
+ the loopback port cannot bind, or the local Viewer cannot start.
380
405
 
381
406
  Unexpected infrastructure errors propagate to the CLI boundary with a safe
382
407
  message and a nonzero exit status. The implementation adds contextual details
package/docs/index.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  This index routes product, implementation, and evaluation questions to their
4
4
  authoritative pages. The queryable map, renderer, repository Agent Skills,
5
- managed setup, observations, reconciliation, and local release candidate are
6
- implemented. The approved v1 rollout remains divided into separately verified
7
- repository cutover, publication, target-repository, and real-use gates.
5
+ managed setup, observations, reconciliation, and public release are implemented.
6
+ Target-repository sharing and longitudinal real-use acceptance remain separate
7
+ verified gates.
8
8
 
9
9
  ## Product
10
10
 
@@ -20,7 +20,7 @@ repository cutover, publication, target-repository, and real-use gates.
20
20
  - [Evaluation](evaluation.md): real-task accuracy, stale-map recovery, code
21
21
  quality, and human-intervention evidence.
22
22
  - [Delivery plan](delivery-plan.md): integrated initial slices and the ordered,
23
- separately verified v1 delivery gates.
23
+ separately verified release and real-use gates.
24
24
 
25
25
  ## Maintenance
26
26
 
@@ -4,7 +4,8 @@ This page defines the initial tracked document model, graph meaning, validation
4
4
  rules, and context projection. The implementation will publish a machine schema
5
5
  that follows this contract.
6
6
 
7
- **Status: implemented by the v1 validation and context-query path.**
7
+ **Status: implemented by the `schemaVersion: 1` validation and context-query
8
+ path.**
8
9
 
9
10
  ## Repository Layout
10
11
 
@@ -5,8 +5,8 @@ from real engineering work. The [product contract](product-contract.md#accuracy-
5
5
  owns why observations exist; this page owns their data, persistence, replay,
6
6
  and summary contract.
7
7
 
8
- **Status: implemented as a local v1 rollout candidate with versioned task
9
- artifact compatibility.**
8
+ **Status: implemented with one current task contract and one current review
9
+ contract.**
10
10
 
11
11
  ## Authority Boundary
12
12
 
@@ -51,12 +51,6 @@ candidate names its stable `businessDomainId` and carries a candidate-specific
51
51
  disposition are recorded explicitly because they cannot be inferred safely from
52
52
  source paths or free-form summaries.
53
53
 
54
- Task artifact v1 predates candidate domain ownership and candidate-specific
55
- disposition. The store continues to read those immutable files for insights and
56
- review references. Their investigation evidence remains available, while their
57
- unowned candidates stay outside reconciliation reports because the missing
58
- business domain cannot be inferred safely. New task writes accept only v2.
59
-
60
54
  Source, test, and document evidence uses normalized repository-relative paths.
61
55
  Runtime references use concise environment-independent evidence labels.
62
56
 
@@ -84,8 +78,8 @@ Observations live under the user's local data boundary:
84
78
  ```
85
79
 
86
80
  The directory `v1` identifies the private storage layout. Each artifact's own
87
- `schemaVersion` controls its data contract, so task v1 and v2 files coexist in
88
- the same repository partition without migration writes.
81
+ `schemaVersion` controls its current data contract; unsupported versions make a
82
+ read fail visibly and are never migrated implicitly.
89
83
 
90
84
  This partition is separate from `docs/business-map`, package contents, and Git.
91
85
  Each observation is one JSON file. The implementation uses neither SQLite nor
@@ -103,14 +97,13 @@ semantic-atlas observe review --stdin [--repo <path>]
103
97
  The CLI parses and strictly validates the current complete input before
104
98
  resolving a write destination. Review recording then confirms that its task
105
99
  observation already exists in the same repository partition. The store reads
106
- both retained task versions but serializes only the current task version.
107
- Before publication it writes and syncs claim metadata, exposes the claim
100
+ the same current task version that it writes. Before publication it writes and
101
+ syncs claim metadata, exposes the claim
108
102
  through an atomic, non-overwriting link, then writes and syncs a private
109
103
  observation staging file and atomically renames it into place. A
110
104
  process-instance identity prevents a retrying process from treating its reused
111
- PID as proof that it still owns an earlier claim. Interrupted directory claims
112
- from the earlier local candidate remain recoverable without removing a claim
113
- whose owner is running.
105
+ PID as proof that it still owns an earlier claim. Unsupported claim shapes remain
106
+ untouched and block publication instead of being reinterpreted.
114
107
  Different IDs never share a file or append boundary.
115
108
 
116
109
  The first successful write returns `recorded`. Replaying the same ID and exact
@@ -156,8 +149,7 @@ Exact domain, candidate kind, and candidate summary form a group; every task
156
149
  occurrence remains visible with its candidate position, evidence disposition,
157
150
  task query and evidence record, human correction, and linked independent
158
151
  reviews. Duplicate groups produce one maintenance lead while preserving all
159
- origins. Legacy v1 candidates without explicit business-domain ownership and
160
- observations without a durable candidate remain outside the report.
152
+ origins. Observations without a durable candidate remain outside the report.
161
153
 
162
154
  The command reads repository identity and immutable observation files only. It
163
155
  does not edit observations, source, `docs/business-map`, rendered artifacts, or
@@ -4,8 +4,8 @@ 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 initial local product is accepted and integrated; the v1
8
- real-repository rollout is approved.**
7
+ **Status: the public product is released and installed; the first target-domain
8
+ pilot is in local use and longitudinal acceptance is in progress.**
9
9
 
10
10
  ## Purpose
11
11
 
@@ -57,8 +57,12 @@ implementation vocabulary differ.
57
57
  ### Human inspection
58
58
 
59
59
  A person views deterministic projections of the same tracked map to discuss
60
- business boundaries and relationships. The visual surface does not become a
61
- second authoring format.
60
+ business boundaries and relationships. A self-contained export and a local
61
+ read-only Web command share the same interactive Viewer, including project and
62
+ business-domain selection, pan, zoom, and fit-to-view. Graph cards prioritize
63
+ business meaning by showing type, title, and description; selecting a card
64
+ reveals its navigation anchors in a side panel or narrow-screen bottom panel.
65
+ The visual surface does not become a second authoring format.
62
66
 
63
67
  ### Periodic reconciliation
64
68
 
@@ -138,7 +142,8 @@ The initial product delivers one coherent path:
138
142
  4. Find a business concept by stable ID, name, or alias.
139
143
  5. Return its containment, direct business relations, related concepts, and
140
144
  navigation anchors as structured JSON.
141
- 6. Render deterministic human-readable projections from the same graph.
145
+ 6. Render deterministic interactive human-readable projections from the same
146
+ graph as a portable HTML artifact or loopback Web session.
142
147
  7. Package an Agent Skill that routes map context into current-source
143
148
  confirmation.
144
149
  8. Exercise the workflow against real engineering tasks, including stale and
@@ -194,37 +199,25 @@ human-intervention evidence as acceptance conditions.
194
199
 
195
200
  ## Current Delivery State
196
201
 
197
- The documentation baseline and initial product are integrated. Managed setup,
198
- versioned observations, and read-only reconciliation are included in the v1
199
- candidate. The clean repository now carries the `semantic-atlas@1.0.0` package
200
- identity, public documentation, CI, privacy and transition checks, and a
201
- GitHub-Release-driven npm provenance workflow for independent release review.
202
- The existing `lzj960515/semantic-atlas` repository remains the public product
203
- identity and carries the protected npm environment used by the approved direct
204
- v1 cutover. Review, branch cutover, publication, target-repository changes, and
205
- longitudinal use remain separate verified stages.
206
-
207
- ## V1 Real-Repository Rollout
208
-
209
- The next product stage turns the accepted local candidate into the one installed
210
- Semantic Atlas product used by real engineering repositories.
211
-
212
- ### Product identity and direct cutover
213
-
214
- - The new implementation takes over the npm package name `semantic-atlas` as a
215
- breaking `v1.0.0` release.
216
- - The existing `lzj960515/semantic-atlas` GitHub repository remains the active
217
- repository and keeps its configured release environment and public identity.
218
- - Its `main` branch changes directly from the published v0 line to the clean v1
219
- history through one explicitly authorized, lease-checked history replacement.
220
- This discontinuity is the intended breaking repository upgrade.
221
- - Existing v0 Git tags, GitHub Releases, and npm versions remain available while
222
- the new clean `main`, annotated `v1.0.0` tag, and immutable Release become the
223
- current source identity.
224
- - Local legacy history and recovery bundles are optional operator artifacts,
225
- not cutover prerequisites or release authority.
226
- - The old CLI's supported upgrade path must install v1 and invoke the v1
227
- `setup` successfully.
202
+ The initial product, managed setup, versioned observations, read-only
203
+ reconciliation, public repository, and npm publication are complete. The first
204
+ real target-domain map and reviewed observation pair are in local use. The
205
+ current `semantic-atlas@2.1.0` release removes one-time predecessor migration
206
+ paths and accepts only current managed Skill, observation, and claim contracts.
207
+ Target-repository sharing and longitudinal acceptance remain separate verified
208
+ stages.
209
+
210
+ ## Current Public Release
211
+
212
+ - `lzj960515/semantic-atlas` is the active public source repository and
213
+ `semantic-atlas` is the npm package identity.
214
+ - Releases are normal fast-forward continuations of public `main`.
215
+ - `setup` recognizes package-owned current markers and refuses obsolete or
216
+ unrelated same-named Skill directories.
217
+ - Observation reads and writes use the current task and review schemas; old
218
+ local formats are disposable rather than migration inputs.
219
+ - Existing Git tags, GitHub Releases, and npm versions remain immutable release
220
+ records, not runtime compatibility requirements.
228
221
 
229
222
  ### Installed CLI and managed Skills
230
223
 
@@ -255,8 +248,7 @@ authority. The product records two immutable, versioned local artifacts:
255
248
  - `TaskObservation`: map query and selected concepts, current-evidence
256
249
  classification, explicitly domain-owned map-update candidates with a
257
250
  candidate disposition, and any explicit human correction known to the task
258
- Agent. Current writes use task artifact v2; immutable task v1 evidence remains
259
- readable after upgrade without promoting its unowned candidates;
251
+ Agent. Reads and writes use task artifact v2;
260
252
  - `ReviewObservation`: the independent review verdict, correctness of the
261
253
  business boundary and upstream cause, impact completeness, required rework,
262
254
  and whether the map caused a wrong conclusion.
@@ -314,8 +306,8 @@ tests multiple Agents in independent worktrees reading one map revision and
314
306
  writing independent observations, with canonical map changes deferred to a
315
307
  separate reconciliation task.
316
308
 
317
- ## V1 Delivery Boundary
309
+ ## Delivery Boundary
318
310
 
319
- The [delivery plan](delivery-plan.md) owns the ordered v1 gates. An earlier gate
320
- never implies that a later remote, publication, target-repository, or real-use
321
- gate has completed.
311
+ The [delivery plan](delivery-plan.md) owns the ordered release and real-use
312
+ gates. An earlier gate never implies that a later publication,
313
+ target-repository, or longitudinal-use gate has completed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-atlas",
3
- "version": "1.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "A Git-native advisory business map for coding agents.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -69,12 +69,11 @@
69
69
  "scripts": {
70
70
  "build": "tsc -p tsconfig.build.json",
71
71
  "contracts:check": "vitest run tests/release/release-contract.test.ts",
72
- "release:verify": "pnpm contracts:check && pnpm test && pnpm typecheck && pnpm build && node tests/smoke/built-render.mjs && node tests/smoke/built-skill.mjs && node tests/smoke/packaged-product.mjs && node tests/smoke/v1-transition.mjs && pnpm pack --dry-run && git diff --check",
72
+ "release:verify": "pnpm contracts:check && pnpm test && pnpm typecheck && pnpm build && node tests/smoke/built-render.mjs && node tests/smoke/built-skill.mjs && node tests/smoke/packaged-product.mjs && pnpm pack --dry-run && git diff --check",
73
73
  "test": "vitest run",
74
74
  "test:acceptance": "pnpm release:verify",
75
75
  "test:built": "pnpm build && node tests/smoke/built-render.mjs && node tests/smoke/built-skill.mjs",
76
76
  "test:package": "node tests/smoke/packaged-product.mjs",
77
- "test:transition": "node tests/smoke/v1-transition.mjs",
78
77
  "typecheck": "tsc -p tsconfig.json"
79
78
  }
80
79
  }