semantic-atlas 0.1.4 → 0.3.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 +62 -43
- package/.agents/skills/semantic-atlas/references/graph-patch.md +22 -5
- package/.agents/skills/semantic-atlas/references/product-feedback.md +34 -0
- package/.agents/skills/semantic-atlas/references/result-routing.md +32 -19
- package/.agents/skills/semantic-atlas/references/snapshot-bootstrap.md +17 -32
- package/.agents/skills/semantic-atlas-insights/SKILL.md +55 -0
- package/README.md +209 -80
- package/README.zh-CN.md +187 -81
- package/dist/cli/argument-parser.js +49 -23
- package/dist/cli/bin.js +16 -3
- package/dist/cli/cli-application.d.ts +3 -2
- package/dist/cli/cli-application.d.ts.map +1 -1
- package/dist/cli/cli-application.js +104 -48
- 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 +3 -0
- package/dist/cli/standalone-cli.d.ts.map +1 -0
- package/dist/cli/standalone-cli.js +96 -0
- package/dist/cli/types.d.ts +9 -6
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/contracts/cli.d.ts +473 -1400
- package/dist/contracts/cli.d.ts.map +1 -1
- package/dist/contracts/cli.js +65 -65
- package/dist/contracts/graph.d.ts +4 -0
- package/dist/contracts/graph.d.ts.map +1 -1
- package/dist/contracts/graph.js +2 -2
- 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/evaluation/contracts.d.ts +11 -2
- package/dist/evaluation/contracts.d.ts.map +1 -1
- package/dist/evaluation/contracts.js +7 -2
- package/dist/graph/graph-store.d.ts +3 -1
- package/dist/graph/graph-store.d.ts.map +1 -1
- package/dist/graph/graph-store.js +48 -2
- package/dist/graph/types.d.ts +30 -9
- package/dist/graph/types.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- 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/package-metadata.d.ts +2 -0
- package/dist/package-metadata.d.ts.map +1 -0
- package/dist/package-metadata.js +9 -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 +20 -0
- package/dist/setup/skill-installer.d.ts.map +1 -0
- package/dist/setup/skill-installer.js +187 -0
- package/dist/storage/atlas-database.d.ts +1 -0
- package/dist/storage/atlas-database.d.ts.map +1 -1
- package/dist/storage/atlas-database.js +13 -6
- package/dist/world/business-map-projector.d.ts +14 -0
- package/dist/world/business-map-projector.d.ts.map +1 -0
- package/dist/world/business-map-projector.js +178 -0
- package/dist/world/world-graph-query.d.ts +8 -13
- package/dist/world/world-graph-query.d.ts.map +1 -1
- package/dist/world/world-graph-query.js +26 -229
- package/docs/README.md +30 -0
- package/docs/architecture/codegraph-backend.md +2 -2
- package/docs/architecture/continuous-business-learning.md +240 -0
- package/docs/contracts/cli-v1.md +62 -18
- package/docs/contracts/graph-model.md +11 -7
- package/docs/contracts/graph-patch-v1.md +8 -1
- package/docs/contracts/insights-v1.md +84 -0
- package/docs/evaluation.md +20 -15
- package/docs/index.md +43 -0
- package/docs/log.md +80 -0
- package/docs/product-contract.md +24 -12
- package/package.json +3 -1
- package/schemas/cli-envelope-v1.schema.json +450 -565
- package/schemas/evaluation-run-v1.schema.json +4 -1
- package/schemas/insights-envelope-v1.schema.json +428 -0
package/docs/contracts/cli-v1.md
CHANGED
|
@@ -4,29 +4,58 @@
|
|
|
4
4
|
|
|
5
5
|
The npm package and executable are both named `semantic-atlas`. Development uses Node.js 24; the published CLI supports Node.js 22.12 through 24.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Repository-independent lifecycle commands run before Git, Atlas storage, or
|
|
8
|
+
SQLite is opened:
|
|
9
|
+
|
|
10
|
+
| Command | Contract |
|
|
11
|
+
| --- | --- |
|
|
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
|
+
| `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
|
+
| `-h`, `--help` | Print top-level usage and command help. |
|
|
15
|
+
| `--version` | Print the installed package version. |
|
|
16
|
+
|
|
17
|
+
These commands write conventional text to standard output and diagnostics to
|
|
18
|
+
standard error. `setup` records the package version and a content fingerprint;
|
|
19
|
+
repeated execution verifies the installed files and restores a changed managed
|
|
20
|
+
copy. A directory that does not identify itself as the Semantic Atlas Skill is
|
|
21
|
+
reported as a conflict and left unchanged.
|
|
22
|
+
|
|
23
|
+
`upgrade` resolves a version before mutation and installs
|
|
24
|
+
`semantic-atlas@<resolved-version>` rather than leaving the install step bound to
|
|
25
|
+
a moving tag. It locates the new package through npm's global root and starts its
|
|
26
|
+
CLI through the current Node executable, so Skill synchronization is owned by
|
|
27
|
+
the package that was actually installed. Registry lookup, package installation,
|
|
28
|
+
new-version verification, and Skill synchronization are one fail-closed command:
|
|
29
|
+
any failed step returns exit code `1` and does not report the upgrade as ready.
|
|
30
|
+
These lifecycle commands do not discover a Git repository or open Atlas storage.
|
|
31
|
+
Installation-scoped `insights` commands also avoid Git and repository Atlas
|
|
32
|
+
storage, while opening the separate local insights store described in
|
|
33
|
+
[Insights v1](insights-v1.md).
|
|
34
|
+
|
|
35
|
+
Global project options:
|
|
8
36
|
|
|
9
37
|
- `--repo <path>` selects a directory within the target repository; the default is the current directory.
|
|
10
|
-
- `--pretty` indents JSON without changing fields or values.
|
|
38
|
+
- `--pretty` indents a project or insights JSON envelope without changing fields or values.
|
|
11
39
|
|
|
12
|
-
|
|
40
|
+
Project commands:
|
|
13
41
|
|
|
14
42
|
| Command | Contract |
|
|
15
43
|
| --- | --- |
|
|
16
44
|
| `status` | Report worktree identity, current revision, latest world snapshot, freshness, local store location, language support, and additive structural-backend metadata. |
|
|
17
45
|
| `index` | Build or synchronize the embedded structural index, reconcile Atlas evidence, publish the completed world snapshot, and report changed facts and unknowns. |
|
|
18
|
-
| `map
|
|
19
|
-
| `map
|
|
20
|
-
| `map
|
|
21
|
-
| `
|
|
46
|
+
| `map view [business-key]` | Return the world business frontier, or zoom one level into a selected business region with breadcrumbs, child/context regions, and projected cross-boundary connections. An empty world returns `regions: []` with `BUSINESS_KNOWLEDGE_EMPTY`. |
|
|
47
|
+
| `map search <business-term> [--limit <n>]` | Lexically rank business labels, aliases, summaries, and attached evidence vocabulary; every result is a business node and the default limit is 20. |
|
|
48
|
+
| `map show <business-key>` | Return one business assertion plus its direct business relations and direct structural evidence links. The command does not recursively traverse CodeGraph. |
|
|
49
|
+
| `code search <structural-term> [--limit <n>]` | Return bounded structural symbols and source locations when business knowledge is absent or insufficient; the default limit is 20. |
|
|
22
50
|
| `learn --stdin` | Read one complete GraphPatch v1 JSON value from standard input and apply it atomically. |
|
|
23
51
|
| `changes [--from <snapshot-id>] [--to <snapshot-id>]` | Report net semantic graph changes between persisted Atlas snapshot endpoints, not a raw Git diff. The source must be an ancestor of the target in the publication chain; defaults compare the previous and current snapshots. |
|
|
52
|
+
| `feedback report --stdin` | Store an explicit, evidence-contextual product problem or suggestion after source confirmation. The report links nearby local command-event IDs without storing arguments or output. |
|
|
24
53
|
|
|
25
|
-
`map` commands
|
|
54
|
+
`map` commands expose business navigation. `code search` is the explicit structural fallback. The calling agent extracts concepts, reformulates searches, opens returned source locations, and judges impact.
|
|
26
55
|
|
|
27
56
|
## Response envelope
|
|
28
57
|
|
|
29
|
-
Every command writes one JSON envelope to standard output. The normative discriminated schema is `schemas/cli-envelope-v1.schema.json`.
|
|
58
|
+
Every project command writes one JSON envelope to standard output. The normative discriminated schema is `schemas/cli-envelope-v1.schema.json`.
|
|
30
59
|
|
|
31
60
|
```json
|
|
32
61
|
{
|
|
@@ -56,8 +85,8 @@ Every command writes one JSON envelope to standard output. The normative discrim
|
|
|
56
85
|
|
|
57
86
|
- Successful responses have `status: "ok" | "partial"`, a non-null repository, and command data selected by `data.command`.
|
|
58
87
|
- `snapshot` is `null` before the first successful index. Otherwise it includes the snapshot ID, Git HEAD, creation time, and `current` or `stale` freshness.
|
|
59
|
-
- `partial` means usable data
|
|
60
|
-
- Business map nodes and relations always include `certainty`, derived `validity`, and evidence.
|
|
88
|
+
- `partial` means usable data is accompanied by a warning or contains stale or otherwise bounded knowledge. An empty business map and an index with unresolved structural counts are usable `partial` results, not indexing failures.
|
|
89
|
+
- Business map nodes and direct relations always include `certainty`, derived `validity`, and evidence. Projected connections report contributor counts and certainty/validity distributions without becoming stored assertions. Structural code-search nodes preserve normalized backend provenance and support. Unsupported languages include a reason instead of an approximate analysis.
|
|
61
90
|
- `warnings` contains stable codes and descriptions for non-fatal conditions. Consumers use codes rather than parsing messages.
|
|
62
91
|
- `storeLocation` identifies the repository-wide Atlas knowledge database. The current worktree's `.atlas/codegraph.db` path remains an internal structural-backend detail.
|
|
63
92
|
|
|
@@ -69,12 +98,13 @@ The schema requires these fields while allowing additive fields inside command d
|
|
|
69
98
|
| --- | --- |
|
|
70
99
|
| `status` | `currentRevision`, `freshness`, `storeLocation`, `languages` |
|
|
71
100
|
| `index` | `snapshotId`, fact counts, unknown-boundary counts; backend version and evidence-rebinding counts are additive metadata until promoted by a later schema version |
|
|
72
|
-
| `map.
|
|
73
|
-
| `map.
|
|
74
|
-
| `map.
|
|
75
|
-
| `
|
|
101
|
+
| `map.view` | nullable `focus`, root-to-focus `breadcrumbs`, `regions`, and projected `connections` |
|
|
102
|
+
| `map.search` | `query`, `limit`, scored business-only `results` |
|
|
103
|
+
| `map.show` | business `node` and direct evidence-aware `relations` |
|
|
104
|
+
| `code.search` | `query`, `limit`, scored structural-only `results` with source locations and support |
|
|
76
105
|
| `learn` | `baseSnapshotId`, `snapshotId`, applied operation counts |
|
|
77
106
|
| `changes` | source and target snapshot IDs, node/relation change sets, stale assertions |
|
|
107
|
+
| `feedback.report` | created report ID, classification, source-confirmed flag, status, and linked-event count |
|
|
78
108
|
|
|
79
109
|
`index.facts` uses one structural-fact unit across every publication: one backend node or
|
|
80
110
|
relation is one fact. `added`, `changed`, and `reused` partition the facts in the newly
|
|
@@ -82,7 +112,19 @@ published graph; `removed` counts facts present only in the previous publication
|
|
|
82
112
|
is changed when its stable node identity or relation endpoints remain while its structural
|
|
83
113
|
content, location, or support changes.
|
|
84
114
|
|
|
85
|
-
Map node and relation objects preserve their evidence lifecycle. When evidence cannot uniquely rebind after indexing, a business node can remain addressable by key while its `summary` is returned with `validity: "stale"`; callers therefore cannot confuse vocabulary identity with a current fact.
|
|
115
|
+
Map node and direct relation objects preserve their evidence lifecycle. When evidence cannot uniquely rebind after indexing, a business node can remain addressable by key while its `summary` is returned with `validity: "stale"`; callers therefore cannot confuse vocabulary identity with a current fact.
|
|
116
|
+
|
|
117
|
+
In a world view, `focus` is null, `breadcrumbs` is empty, and every region has role `root`. In a focused view, `focus` is the selected business node, breadcrumbs run from its current root to the focus, direct children have role `child`, and related external branches have role `context`. Every region reports `childCount` and `expandable`.
|
|
118
|
+
|
|
119
|
+
Each connection identifies visible business endpoints and groups summaries by relation type. `directCount` counts stored relations whose endpoints are already visible at this level; `aggregatedCount` counts stored deeper relations lifted to the visible frontier. Certainty and validity objects count the underlying contributors. A relation projected to the same visible region is hidden until the agent zooms further in.
|
|
120
|
+
|
|
121
|
+
`BUSINESS_KNOWLEDGE_EMPTY` is the stable warning code for a current indexed world with no learned business nodes. World `map.view` returns an empty `regions` array in this state. Structural modules and symbols remain discoverable through `code.search`; they are never emitted as business regions.
|
|
122
|
+
|
|
123
|
+
`feedback report --stdin` accepts one strict JSON object with `kind`, `category`,
|
|
124
|
+
`impact`, `observed`, `expected`, optional `suggestion`, and `sourceConfirmed`.
|
|
125
|
+
The report itself is explicit feedback; the surrounding passive command event
|
|
126
|
+
contains only objective metadata. It is operational product data and never a
|
|
127
|
+
GraphPatch or business-world assertion.
|
|
86
128
|
|
|
87
129
|
Change ranges follow the current publication history and fold the requested endpoints into one content comparison. When a content-addressed snapshot was published more than once, `--to` selects its latest occurrence in that history and `--from` selects the latest matching occurrence at or before the target; equal IDs compare the selected occurrence with itself. Paths that have the same presence and content at both endpoints are omitted even if they changed in between, while `staleAssertions` reports the selected target occurrence's final validity state. An unknown target has no change result.
|
|
88
130
|
|
|
@@ -115,6 +157,8 @@ Handled failures have `status: "error"` and structured data:
|
|
|
115
157
|
|
|
116
158
|
Handled nonzero failures still emit a versioned error envelope when a response can be formed. Diagnostics never replace the machine-readable response.
|
|
117
159
|
|
|
118
|
-
##
|
|
160
|
+
## Contract stability
|
|
161
|
+
|
|
162
|
+
This pre-adoption revision directly replaces the earlier roots/children/mixed-search/depth-traversal command set. It exposes no aliases or dual response shapes. The generated schema is the current v1 authority.
|
|
119
163
|
|
|
120
|
-
|
|
164
|
+
After adoption, top-level envelope fields, command discriminants, and required command fields are closed within version 1. Additive fields may appear inside command data and result objects; callers ignore fields they do not understand. A future removed field, changed meaning, enum incompatibility, or operation change requires a new `schemaVersion`. GraphPatch and other input objects remain strict and reject unknown fields.
|
|
@@ -29,7 +29,7 @@ The domains are physically separated by lifecycle: CodeGraph structure lives in
|
|
|
29
29
|
|
|
30
30
|
Repository and snapshot IDs are content identifiers produced by Atlas repository inspection. Public structural IDs are deterministic Atlas references derived from normalized backend identity, path, kind, and qualified name. Backend row IDs remain internal locators and may change after a CodeGraph upgrade or rebuild.
|
|
31
31
|
|
|
32
|
-
Business keys are stable slash-separated keys such as `commerce/orders/place-order`. Labels and aliases form stable vocabulary while evidence-bound summaries can evolve without changing the key.
|
|
32
|
+
Business keys are stable slash-separated keys such as `commerce/orders/place-order`. The slash-separated text is a readable namespace, not hierarchy authority. Labels and aliases form stable vocabulary while evidence-bound summaries and `part_of` placement can evolve without changing the key.
|
|
33
33
|
|
|
34
34
|
## Relation kinds
|
|
35
35
|
|
|
@@ -55,7 +55,7 @@ Business keys are stable slash-separated keys such as `commerce/orders/place-ord
|
|
|
55
55
|
| Business | `constrained_by` | A business node is governed by an invariant |
|
|
56
56
|
| Business | `verified_by` | A business node is checked by an agent-verified structural declaration |
|
|
57
57
|
|
|
58
|
-
All learned relations originate at a business node. `realized_by` and `verified_by` target structural nodes; the other business relations target business nodes. A test directory or filename is structural context only.
|
|
58
|
+
All learned relations originate at a business node. `realized_by` and `verified_by` target structural nodes; the other business relations target business nodes. A test directory or filename is structural context only. `map show` exposes an agent-verified declaration as a direct `verified_by` relation; the declaration remains a `Symbol` when the structural backend cannot identify a test case independently.
|
|
59
59
|
|
|
60
60
|
## Structural support
|
|
61
61
|
|
|
@@ -89,14 +89,18 @@ Validity is derived state and is never accepted as GraphPatch input. Stable busi
|
|
|
89
89
|
|
|
90
90
|
## Unknown boundaries
|
|
91
91
|
|
|
92
|
-
An `UnknownBoundary` records the unresolved operation, backend reason, location, and any finite candidates.
|
|
92
|
+
An `UnknownBoundary` records the unresolved operation, backend reason, location, and any finite candidates. Index results report unresolved-boundary counts and warnings; Atlas never converts a boundary into an exact edge. When a task reaches warned dynamic behavior, the Agent uses bounded `code search` results and authoritative source rather than assuming a missing relationship. Examples include unresolved references, reflection, runtime dependency lookup, dynamic imports, and non-unique string tokens.
|
|
93
93
|
|
|
94
|
-
##
|
|
94
|
+
## Business navigation and structural fallback
|
|
95
95
|
|
|
96
|
-
`map
|
|
96
|
+
`map view` projects one canonical business graph into a visible frontier. Without a focus it exposes all current business nodes with no outgoing `part_of` relation as root regions. With a focus it exposes the focus's direct children, its root-to-focus breadcrumb, and the nearest visible external branches connected to its subtree. Any business kind may be a provisional root; an empty business graph returns no regions rather than structural directories.
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
`part_of` is the current business navigation hierarchy. Each business node has at most one outgoing `part_of` parent, and the hierarchy is acyclic. A later GraphPatch can atomically remove an old parent and add a broader parent while preserving the moved node's key, evidence, descendants, and non-hierarchy relationships. Structural nodes remain a separate evidence and source-navigation domain.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Non-hierarchy relations are stored only at the endpoints the Agent verified. A view lifts deeper endpoints to the visible frontier, hides relations that collapse inside one region, and groups the rest by visible endpoints and relation type. Every summary separates direct and aggregated contributor counts and preserves certainty and validity distributions. These connections are query projections and are never accepted as GraphPatch facts.
|
|
101
|
+
|
|
102
|
+
`map show` accepts one business key and returns only its direct learned relations, including direct `realized_by` and `verified_by` structural evidence. It has no depth option and does not recursively expand the CodeGraph projection.
|
|
103
|
+
|
|
104
|
+
Lexical search has two explicit domains. `map search` ranks Atlas business vocabulary and always returns business nodes. `code search` ranks CodeGraph symbols and paths and always returns structural nodes with current source locations and support. The calling AI uses structural search only when business knowledge is absent or insufficient, then opens source directly. The CLI does not add a language model or pretend lexical scores are business inference.
|
|
101
105
|
|
|
102
106
|
Structural nodes and relations include normalized `support.status` and `support.provenance`. Business assertions use `certainty`, `validity`, and evidence instead. Unknown boundaries keep their structural owner, unresolved operation, support, reason, source location, and finite candidates.
|
|
@@ -65,7 +65,7 @@ GraphPatch is the only public write contract for agent-learned knowledge. It can
|
|
|
65
65
|
|
|
66
66
|
## Operations
|
|
67
67
|
|
|
68
|
-
Business node upserts contain a stable
|
|
68
|
+
Business node upserts contain a stable slash-separated `key`, one of `Capability`, `Scenario`, `Operation`, `Invariant`, `Interface`, or `Data`, plus a label, summary, aliases, certainty, and at least one evidence record. The key is stable vocabulary identity and does not encode authoritative hierarchy; the summary is an assertion governed by certainty and evidence. A node-only patch without assertion evidence is invalid. Removing a node uses `{ "op": "remove", "key": "..." }`.
|
|
69
69
|
|
|
70
70
|
Business relation upserts contain a source reference, relation type, target reference, certainty, and at least one evidence record. Removing a relation supplies its source, type, and target selector. The stable relation identity is that `(from, type, to)` tuple; repeated upserts replace the assertion and its evidence idempotently.
|
|
71
71
|
|
|
@@ -76,6 +76,12 @@ Reference domains make ownership explicit:
|
|
|
76
76
|
|
|
77
77
|
All learned relations originate at a business node. `realized_by` and `verified_by` target structural nodes; `part_of`, `invokes`, `reads`, `writes`, `publishes`, `consumes`, and `constrained_by` target business nodes.
|
|
78
78
|
|
|
79
|
+
### Business hierarchy
|
|
80
|
+
|
|
81
|
+
`part_of` alone defines current parent placement. Every business node may have at most one outgoing `part_of` parent, and the complete `part_of` graph must remain acyclic. A parentless node of any business kind is a current root.
|
|
82
|
+
|
|
83
|
+
Reparent an existing node or subtree in one patch: optionally upsert the new parent, remove the old `part_of` selector, and upsert the new `part_of` relation. Preserve the moved node key. Atlas applies relation removals before validating the final candidate hierarchy, so a valid reparent succeeds atomically while a second parent or cycle rejects the complete patch.
|
|
84
|
+
|
|
79
85
|
## Evidence and certainty
|
|
80
86
|
|
|
81
87
|
Each node or relation evidence item binds an Atlas structural symbol or test reference, normalized repository-relative file, one-based source range, and lowercase SHA-256 content hash. Atlas also records the backend locator and version needed for later rebinding. Evidence must resolve inside the same worktree and match the current completed snapshot exactly.
|
|
@@ -92,6 +98,7 @@ Each node or relation evidence item binds an Atlas structural symbol or test ref
|
|
|
92
98
|
4. Relation endpoints and kinds satisfy the graph contract.
|
|
93
99
|
5. Every node and relation evidence symbol, path, range, and hash belongs to the current repository snapshot.
|
|
94
100
|
6. Removes do not leave dangling business relations.
|
|
101
|
+
7. The final `part_of` hierarchy has at most one parent per node and contains no cycle.
|
|
95
102
|
|
|
96
103
|
The patch is one transaction. Any failure rejects every operation with exit code 5 and a machine-readable error; retries start from a freshly read snapshot. No partial success is exposed.
|
|
97
104
|
|
|
@@ -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/evaluation.md
CHANGED
|
@@ -39,18 +39,22 @@ A run is invalid when it lacks exact source-token accounting, is not a fresh con
|
|
|
39
39
|
The published `fresh-agent-v1` run uses the repository-owned source observer and
|
|
40
40
|
`tiktoken-o200k_base-v1`. Every observer invocation appends one JSONL record per
|
|
41
41
|
returned file. The runner normalizes those atomically appended records to a
|
|
42
|
-
strict event sequence.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
strict event sequence. Each run records its command-policy version. The retained
|
|
43
|
+
`fresh-agent-shell-allowlist-v4` policy replays the original roots, children, and
|
|
44
|
+
structural show grammar, while the current `fresh-agent-shell-allowlist-v5`
|
|
45
|
+
policy accepts the business-first map view/search/show and explicit code search
|
|
46
|
+
grammar. Both policies accept only observer reads/searches, read-only Semantic
|
|
47
|
+
Atlas commands, bounded file-name listings, and content-free availability
|
|
48
|
+
probes. Atlas commands must satisfy the complete grammar for their recorded
|
|
49
|
+
policy, and `--repo` is prohibited because each process already runs from its
|
|
50
|
+
measured fixture. The policies reject alternative readers, arbitrary executables
|
|
51
|
+
and wrappers, external instruction paths, command substitution, redirection,
|
|
52
|
+
unsupported command composition, and unquoted shell word generation such as
|
|
53
|
+
brace, parameter, tilde, or filename expansion. The fixed
|
|
54
|
+
`$EVALUATION_OBSERVER` parameter is the only permitted shell expansion. The
|
|
55
|
+
runner rejects failed audits before adjudication, and published-result validation
|
|
56
|
+
re-audits every recorded command sequence and its derived Atlas calls without
|
|
57
|
+
rewriting immutable historical records.
|
|
54
58
|
|
|
55
59
|
Runner v5 adds repository-native Skill discovery evidence. It copies the
|
|
56
60
|
candidate Skill into only the Atlas fixture through a Git-local ignore rule,
|
|
@@ -67,8 +71,9 @@ decision so a missing or unnecessary GraphPatch load fails validation. Independe
|
|
|
67
71
|
adjudication separately evaluates the decision's business meaning from bounded
|
|
68
72
|
retained evidence rather than trusting the Agent's label. The public run contract
|
|
69
73
|
binds the adjudicated outcome to the answer; a negative decision verdict must make
|
|
70
|
-
the run incorrect and carry `protocol-violation`. The
|
|
71
|
-
|
|
74
|
+
the run incorrect and carry `protocol-violation`. The observer and shell-safety
|
|
75
|
+
rules remain stable while the Atlas command grammar advances through an explicit
|
|
76
|
+
policy version.
|
|
72
77
|
|
|
73
78
|
## Metrics
|
|
74
79
|
|
|
@@ -94,7 +99,7 @@ Semantic Atlas Skill, CLI, and current worktree-local index. The retained 22
|
|
|
94
99
|
`fresh-agent-runner-v1` records were re-audited from preserved raw command logs;
|
|
95
100
|
the affected NestJS provider-contract pair was replaced under
|
|
96
101
|
`fresh-agent-runner-v2` with host capabilities explicitly disabled. All 24
|
|
97
|
-
published command sequences were subsequently re-audited under the
|
|
102
|
+
published command sequences were subsequently re-audited under the v4
|
|
98
103
|
fixture-local Atlas grammar.
|
|
99
104
|
|
|
100
105
|
All 12 pairs retained 100 percent required-file recall, required-symbol recall,
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Semantic Atlas Documentation Index
|
|
2
|
+
|
|
3
|
+
This index routes product, architecture, contract, and evaluation questions to
|
|
4
|
+
their authoritative pages. Current implementation details remain verifiable in
|
|
5
|
+
source and tests.
|
|
6
|
+
|
|
7
|
+
## Product and learning model
|
|
8
|
+
|
|
9
|
+
- [Product contract](product-contract.md): product boundary, responsibility
|
|
10
|
+
split, lifecycle, storage, and release gates.
|
|
11
|
+
- [Continuous business learning](architecture/continuous-business-learning.md):
|
|
12
|
+
how business knowledge grows during real work, how provisional roots evolve,
|
|
13
|
+
how hierarchy reparenting remains safe, and how one graph projects into
|
|
14
|
+
semantically zoomable world and focused views.
|
|
15
|
+
|
|
16
|
+
## Architecture
|
|
17
|
+
|
|
18
|
+
- [CodeGraph backend](architecture/codegraph-backend.md): ownership and
|
|
19
|
+
consistency boundaries between durable Atlas knowledge and disposable
|
|
20
|
+
structural projections.
|
|
21
|
+
- [Semantic Atlas overview mind map](mindmaps/semantic-atlas-overview.png):
|
|
22
|
+
visual overview; editable sources are available in the same directory.
|
|
23
|
+
|
|
24
|
+
## Public contracts
|
|
25
|
+
|
|
26
|
+
- [Graph model](contracts/graph-model.md): node, relation, evidence, certainty,
|
|
27
|
+
validity, hierarchy, and traversal semantics.
|
|
28
|
+
- [GraphPatch v1](contracts/graph-patch-v1.md): atomic business-knowledge write
|
|
29
|
+
contract.
|
|
30
|
+
- [CLI v1](contracts/cli-v1.md): deterministic commands, envelopes, warnings,
|
|
31
|
+
and exit codes.
|
|
32
|
+
- [Insights v1](contracts/insights-v1.md): local product signals, explicit
|
|
33
|
+
feedback, triage, storage boundary, and interpretation.
|
|
34
|
+
|
|
35
|
+
## Evaluation
|
|
36
|
+
|
|
37
|
+
- [Evaluation protocol](evaluation.md): fixed Fresh Agent comparison and
|
|
38
|
+
evidence requirements.
|
|
39
|
+
|
|
40
|
+
## Maintenance
|
|
41
|
+
|
|
42
|
+
- [Knowledge-base scope and rules](README.md)
|
|
43
|
+
- [Knowledge maintenance log](log.md)
|
package/docs/log.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Semantic Atlas Knowledge Maintenance Log
|
|
2
|
+
|
|
3
|
+
This log records material documentation ingestion and revisions. Current
|
|
4
|
+
conclusions live on their owning pages rather than in this chronology.
|
|
5
|
+
|
|
6
|
+
## [2026-08-21] add | Local product insights and separate maintenance Skill
|
|
7
|
+
|
|
8
|
+
- Added passive, installation-level command observations plus explicit,
|
|
9
|
+
evidence-contextual feedback and a strict `insights` JSON envelope.
|
|
10
|
+
- Kept normal task context lean: the primary Skill loads feedback guidance only
|
|
11
|
+
after confirmed material friction, while a separately installed insights Skill
|
|
12
|
+
owns daily review and feedback triage.
|
|
13
|
+
- Defined the privacy boundary, interpretation limits, and independent
|
|
14
|
+
repository/worktree storage in `contracts/insights-v1.md`.
|
|
15
|
+
- Affected pages: `product-contract.md`, `contracts/cli-v1.md`,
|
|
16
|
+
`contracts/insights-v1.md`, and `index.md`.
|
|
17
|
+
|
|
18
|
+
## [2026-08-20] revise | Business-first README and managed package upgrade
|
|
19
|
+
|
|
20
|
+
- Rebuilt the bilingual README around the product gap between file search and
|
|
21
|
+
business understanding, task-driven learning, and one semantically zoomable
|
|
22
|
+
map.
|
|
23
|
+
- Added repository-independent `upgrade`: resolve npm `latest`, install the
|
|
24
|
+
exact target, verify the new CLI, and synchronize the new package's Skill.
|
|
25
|
+
- Kept `setup` as the repair and synchronization command for the currently
|
|
26
|
+
installed package, including the already-current upgrade path.
|
|
27
|
+
- Affected pages: `README.md`, `README.zh-CN.md`, `product-contract.md`, and
|
|
28
|
+
`contracts/cli-v1.md`.
|
|
29
|
+
|
|
30
|
+
## [2026-08-20] revise | Versioned evaluation command replay
|
|
31
|
+
|
|
32
|
+
- Bound each Fresh Agent run to the command-policy version that produced it.
|
|
33
|
+
- Preserved v4 replay for immutable structural-map records and introduced v5
|
|
34
|
+
for the business-first map and explicit code-search grammar.
|
|
35
|
+
- Kept current runs fail-closed against removed commands while allowing release
|
|
36
|
+
validation to re-audit historical evidence without rewriting it.
|
|
37
|
+
- Affected page: `evaluation.md`.
|
|
38
|
+
|
|
39
|
+
## [2026-08-20] revise | Managed Skill setup and CLI discovery
|
|
40
|
+
|
|
41
|
+
- Added repository-independent `setup`, help, and version commands before the
|
|
42
|
+
Git/SQLite lifecycle.
|
|
43
|
+
- Defined `~/.agents/skills/semantic-atlas` as the shared managed target with
|
|
44
|
+
atomic updates, package-version/content markers, and recognized legacy
|
|
45
|
+
`~/.codex/skills/semantic-atlas` migration.
|
|
46
|
+
- Replaced the separate repository Skill-installer journey with the bundled
|
|
47
|
+
npm package workflow and added installed-tarball setup/update verification.
|
|
48
|
+
- Affected pages: `README.md`, `README.zh-CN.md`, `product-contract.md`, and
|
|
49
|
+
`contracts/cli-v1.md`.
|
|
50
|
+
|
|
51
|
+
## [2026-08-20] revise | Semantic zoom and AI-first query contract
|
|
52
|
+
|
|
53
|
+
- Defined one canonical business graph with world/focused visible frontiers,
|
|
54
|
+
breadcrumbs, child/context regions, and evidence-preserving aggregate
|
|
55
|
+
connections.
|
|
56
|
+
- Replaced roots, children, mixed search, structural show, and depth traversal
|
|
57
|
+
with `map view`, business-only search/show, and explicit `code search`.
|
|
58
|
+
- Reframed the public API around the calling Agent's actual self-dogfood path:
|
|
59
|
+
business navigation, bounded code fallback, source confirmation, engineering
|
|
60
|
+
work, and task-driven knowledge capture.
|
|
61
|
+
- Synchronized the product contract, graph model, CLI contract, READMEs, and
|
|
62
|
+
Semantic Atlas Skill without compatibility aliases.
|
|
63
|
+
- Affected pages: `architecture/continuous-business-learning.md`,
|
|
64
|
+
`product-contract.md`, `contracts/graph-model.md`, and `contracts/cli-v1.md`.
|
|
65
|
+
|
|
66
|
+
## [2026-08-20] revise | Continuous business learning and evolving roots
|
|
67
|
+
|
|
68
|
+
- Added the continuous-learning architecture as the owning design for business
|
|
69
|
+
knowledge acquired during real engineering tasks.
|
|
70
|
+
- Defined roots as the current parentless business frontier rather than fixed
|
|
71
|
+
Capability roots or structural-module fallbacks.
|
|
72
|
+
- Defined stable keys, single-parent hierarchy, acyclic placement, and atomic
|
|
73
|
+
reparenting as the first implementation slice.
|
|
74
|
+
- Synchronized the product, graph, GraphPatch, CLI, README, and Agent Skill
|
|
75
|
+
contracts around task-driven learning and the `BUSINESS_KNOWLEDGE_EMPTY`
|
|
76
|
+
fallback.
|
|
77
|
+
- Established the documentation index and knowledge-base maintenance boundary.
|
|
78
|
+
- Affected pages: `architecture/continuous-business-learning.md`,
|
|
79
|
+
`product-contract.md`, `contracts/graph-model.md`, `contracts/graph-patch-v1.md`,
|
|
80
|
+
and `contracts/cli-v1.md`.
|
package/docs/product-contract.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Semantic Atlas
|
|
1
|
+
# Semantic Atlas Product Contract
|
|
2
2
|
|
|
3
3
|
## Purpose and authority
|
|
4
4
|
|
|
@@ -6,14 +6,15 @@ Semantic Atlas is a local project world model used by AI coding agents. It conne
|
|
|
6
6
|
|
|
7
7
|
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
8
|
|
|
9
|
-
This document
|
|
9
|
+
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
10
|
|
|
11
11
|
## One-product boundary
|
|
12
12
|
|
|
13
13
|
Users and calling agents interact with one product:
|
|
14
14
|
|
|
15
15
|
- the `semantic-atlas` CLI supplies deterministic, machine-readable operations;
|
|
16
|
-
- the
|
|
16
|
+
- the `semantic-atlas` Skill teaches the calling agent when and how to use those operations;
|
|
17
|
+
- the separate `semantic-atlas-insights` Skill supports deliberate product review and feedback triage;
|
|
17
18
|
- `@colbymchenry/codegraph` is an internal structural-index dependency behind an Atlas-owned adapter;
|
|
18
19
|
- CodeGraph's CLI, MCP server, storage model, and public types are not exposed as Semantic Atlas workflows.
|
|
19
20
|
|
|
@@ -25,29 +26,31 @@ Atlas interprets CodeGraph results through its own world-graph contract. Replaci
|
|
|
25
26
|
|
|
26
27
|
1. For every supported task that implements, fixes, debugs, refactors, reviews, traces, or assesses business behavior, the agent identifies the exact target worktree and invokes `semantic-atlas status` before broad source discovery.
|
|
27
28
|
2. Atlas commands run serially. A missing, stale, failed, or incomplete snapshot loads the bootstrap procedure and invokes `semantic-atlas index`; a current complete snapshot proceeds directly to map queries.
|
|
28
|
-
3. The agent
|
|
29
|
+
3. The agent starts from `map view`, searches business vocabulary with `map search`, zooms into relevant regions with `map view <business-key>`, and inspects direct evidence with `map show`. When business knowledge is absent or insufficient, `code search` returns a bounded structural source seed set instead of mixing code symbols into the business map.
|
|
29
30
|
4. The agent confirms answer-controlling and change-controlling behavior in authoritative source. Source edits, tests, Git operations, review, and natural-language reasoning remain normal engineering work outside Atlas.
|
|
30
31
|
5. After relevant source changes, the agent reindexes, inspects `changes`, re-queries affected concepts, and confirms the refreshed projection against source and tests.
|
|
31
32
|
6. Before completing the task, the agent makes a knowledge-capture decision. Every newly discovered durable, verified business concept and supported relationship caused by missing or insufficient map knowledge is submitted with `learn --stdin` and verified through `map show`; transient and unverified observations remain task context.
|
|
32
33
|
|
|
33
34
|
Detailed bootstrap, abnormal-result routing, and GraphPatch procedures are state-conditioned Skill references rather than permanently loaded first-use instructions.
|
|
34
35
|
|
|
35
|
-
###
|
|
36
|
+
### Task-driven continuous learning
|
|
36
37
|
|
|
37
|
-
A normal task adds only the
|
|
38
|
+
A normal task adds only the durable business knowledge it verifies while doing the requested engineering work. This makes ordinary work incrementally improve later map queries without requiring a separate repository-wide business-learning phase.
|
|
38
39
|
|
|
39
|
-
An
|
|
40
|
+
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
41
|
|
|
41
42
|
## Responsibility boundary
|
|
42
43
|
|
|
43
44
|
| Concern | Semantic Atlas | Calling agent |
|
|
44
45
|
| --- | --- | --- |
|
|
45
|
-
| Product interface | Exposes the `semantic-atlas` CLI and
|
|
46
|
+
| Product interface | Exposes the `semantic-atlas` CLI and two focused Skills | Chooses the repository, task scope, and maintenance cadence |
|
|
47
|
+
| 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 |
|
|
46
48
|
| 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 |
|
|
47
49
|
| 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 |
|
|
48
50
|
| Unified graph | Connects business assertions to structural evidence and returns one Atlas graph contract | Uses graph results as bounded context |
|
|
49
51
|
| Evidence lifecycle | Records source locators and hashes, then derives `valid` or `stale` after indexing | Revalidates or replaces stale assertions |
|
|
50
52
|
| Generated state | Writes durable knowledge under the user Atlas home and disposable structure under ignored `.atlas/` | Edits source and project configuration |
|
|
53
|
+
| 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 |
|
|
51
54
|
| Verification | Reports evidence, freshness, support, and unresolved boundaries | Runs tests, reviews diffs, and judges correctness |
|
|
52
55
|
| Git workflow | Reads Git state for snapshots without changing tracked state | Commits, merges, rebases, reviews, and releases |
|
|
53
56
|
|
|
@@ -59,6 +62,9 @@ Atlas separates repository knowledge from worktree structure:
|
|
|
59
62
|
~/.semantic-atlas/repositories/<repository-id>/
|
|
60
63
|
└── atlas.db repository-wide durable knowledge
|
|
61
64
|
|
|
65
|
+
~/.semantic-atlas/
|
|
66
|
+
└── insights.db installation-level product observations and feedback
|
|
67
|
+
|
|
62
68
|
<worktree>/
|
|
63
69
|
└── .atlas/
|
|
64
70
|
├── .gitignore
|
|
@@ -67,6 +73,7 @@ Atlas separates repository knowledge from worktree structure:
|
|
|
67
73
|
```
|
|
68
74
|
|
|
69
75
|
- The user-level `atlas.db` stores business knowledge, repository snapshots, snapshot-specific evidence bindings and validity, plus one publication chain for each Git directory.
|
|
76
|
+
- 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.
|
|
70
77
|
- `SEMANTIC_ATLAS_HOME` is the only storage override. It must be absolute; the default is `~/.semantic-atlas`.
|
|
71
78
|
- Atlas prepares `.atlas/.gitignore` so generated state does not change normal Git status. No tracked source file or project configuration is created or modified.
|
|
72
79
|
- 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.
|
|
@@ -101,15 +108,19 @@ The public graph has two ownership domains and one query surface:
|
|
|
101
108
|
|
|
102
109
|
Evidence stores a backend locator together with normalized path, symbol identity, source range, and content hash. A structural rebuild may replace backend rows, so Atlas rebinds evidence after indexing. Failed rebinding produces `stale`; it never silently deletes or upgrades a business assertion.
|
|
103
110
|
|
|
111
|
+
`map view` projects one canonical business graph into the frontier needed by the current task. The world view exposes every current parentless business node as a root region. A focused view exposes direct child regions, breadcrumb context, and cross-boundary business connections aggregated from deeper asserted relations. Projection counts preserve direct versus aggregated contributors plus certainty and validity distributions; projected connections are never persisted as new facts.
|
|
112
|
+
|
|
113
|
+
Root placement is provisional. Business keys remain stable vocabulary identifiers while `part_of` is the hierarchy authority; every node has at most one `part_of` parent and the hierarchy is acyclic. Structural modules and symbols remain available only through explicit `code search` fallback and never substitute for an empty business map.
|
|
114
|
+
|
|
104
115
|
## Supported scope
|
|
105
116
|
|
|
106
|
-
|
|
117
|
+
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.
|
|
107
118
|
|
|
108
119
|
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.
|
|
109
120
|
|
|
110
121
|
## Non-goals
|
|
111
122
|
|
|
112
|
-
|
|
123
|
+
Semantic Atlas does not provide:
|
|
113
124
|
|
|
114
125
|
- a second CodeGraph-facing product, CLI, MCP server, or user workflow;
|
|
115
126
|
- a new compiler, language server, or general-purpose JavaScript runtime analyzer;
|
|
@@ -127,14 +138,14 @@ The fallback order is direct dependency, a small upstream extension, a thin main
|
|
|
127
138
|
|
|
128
139
|
## Release gate
|
|
129
140
|
|
|
130
|
-
|
|
141
|
+
Every public release requires all of the following on the release commit:
|
|
131
142
|
|
|
132
143
|
1. A packaged install uses the pinned CodeGraph SDK through an Atlas-owned adapter and exposes no CodeGraph CLI or MCP workflow.
|
|
133
144
|
2. `semantic-atlas index` creates only ignored `.atlas/` state in the target worktree and leaves tracked files and normal Git status unchanged.
|
|
134
145
|
3. The user Atlas database contains `atlas_*` objects while every worktree CodeGraph database contains none.
|
|
135
146
|
4. Initial index, sibling bootstrap, incremental sync, interrupted index recovery, and worktree deletion preserve Atlas-owned business knowledge.
|
|
136
147
|
5. Business evidence rebinds after stable structural changes and becomes visibly stale after changed or missing evidence.
|
|
137
|
-
6.
|
|
148
|
+
6. Business map views zoom deterministically through one hierarchy, preserve evidence summaries on aggregated connections, and keep business search separate from structural code fallback.
|
|
138
149
|
7. Packaged CLI smoke flows pass on supported Node.js versions and operating systems.
|
|
139
150
|
8. Static and Fresh Agent verification of the packaged Semantic Atlas Skill passes.
|
|
140
151
|
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.
|
|
@@ -147,5 +158,6 @@ The gate is fixed before comparative results are collected. A failed gate create
|
|
|
147
158
|
- [CodeGraph backend architecture](architecture/codegraph-backend.md)
|
|
148
159
|
- [Graph model](contracts/graph-model.md)
|
|
149
160
|
- [CLI v1](contracts/cli-v1.md)
|
|
161
|
+
- [Insights v1](contracts/insights-v1.md)
|
|
150
162
|
- [GraphPatch v1](contracts/graph-patch-v1.md)
|
|
151
163
|
- [Evaluation protocol](evaluation.md)
|