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.
Files changed (87) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +3 -0
  2. package/.agents/skills/semantic-atlas/references/product-feedback.md +34 -0
  3. package/.agents/skills/semantic-atlas-insights/SKILL.md +55 -0
  4. package/README.md +229 -88
  5. package/README.zh-CN.md +204 -85
  6. package/dist/cli/argument-parser.js +9 -1
  7. package/dist/cli/bin.js +17 -2
  8. package/dist/cli/cli-application.d.ts +1 -0
  9. package/dist/cli/cli-application.d.ts.map +1 -1
  10. package/dist/cli/cli-application.js +64 -12
  11. package/dist/cli/insights-cli.d.ts +6 -0
  12. package/dist/cli/insights-cli.d.ts.map +1 -0
  13. package/dist/cli/insights-cli.js +236 -0
  14. package/dist/cli/main.d.ts.map +1 -1
  15. package/dist/cli/main.js +94 -2
  16. package/dist/cli/standalone-cli.d.ts.map +1 -1
  17. package/dist/cli/standalone-cli.js +44 -5
  18. package/dist/cli/types.d.ts +2 -0
  19. package/dist/cli/types.d.ts.map +1 -1
  20. package/dist/cli/web-cli.d.ts +9 -0
  21. package/dist/cli/web-cli.d.ts.map +1 -0
  22. package/dist/cli/web-cli.js +134 -0
  23. package/dist/contracts/cli.d.ts +63 -0
  24. package/dist/contracts/cli.d.ts.map +1 -1
  25. package/dist/contracts/cli.js +7 -0
  26. package/dist/contracts/insights.d.ts +2 -0
  27. package/dist/contracts/insights.d.ts.map +1 -0
  28. package/dist/contracts/insights.js +1 -0
  29. package/dist/contracts/public-contracts.d.ts +1 -0
  30. package/dist/contracts/public-contracts.d.ts.map +1 -1
  31. package/dist/contracts/public-contracts.js +1 -0
  32. package/dist/graph/graph-store.d.ts +2 -2
  33. package/dist/graph/graph-store.d.ts.map +1 -1
  34. package/dist/graph/graph-store.js +2 -2
  35. package/dist/insights/contracts.d.ts +266 -0
  36. package/dist/insights/contracts.d.ts.map +1 -0
  37. package/dist/insights/contracts.js +124 -0
  38. package/dist/insights/insights-store.d.ts +73 -0
  39. package/dist/insights/insights-store.d.ts.map +1 -0
  40. package/dist/insights/insights-store.js +246 -0
  41. package/dist/repository/repository-inspector.d.ts +1 -0
  42. package/dist/repository/repository-inspector.d.ts.map +1 -1
  43. package/dist/repository/repository-inspector.js +13 -0
  44. package/dist/setup/package-upgrader.d.ts +54 -0
  45. package/dist/setup/package-upgrader.d.ts.map +1 -0
  46. package/dist/setup/package-upgrader.js +169 -0
  47. package/dist/setup/skill-installer.d.ts +3 -2
  48. package/dist/setup/skill-installer.d.ts.map +1 -1
  49. package/dist/setup/skill-installer.js +67 -36
  50. package/dist/storage/atlas-database.d.ts +8 -1
  51. package/dist/storage/atlas-database.d.ts.map +1 -1
  52. package/dist/storage/atlas-database.js +68 -11
  53. package/dist/web/application/atlas-read-service.d.ts +27 -0
  54. package/dist/web/application/atlas-read-service.d.ts.map +1 -0
  55. package/dist/web/application/atlas-read-service.js +216 -0
  56. package/dist/web/application/primary-repository-catalog.d.ts +15 -0
  57. package/dist/web/application/primary-repository-catalog.d.ts.map +1 -0
  58. package/dist/web/application/primary-repository-catalog.js +202 -0
  59. package/dist/web/application/types.d.ts +41 -0
  60. package/dist/web/application/types.d.ts.map +1 -0
  61. package/dist/web/application/types.js +1 -0
  62. package/dist/web/server/api-router.d.ts +4 -0
  63. package/dist/web/server/api-router.d.ts.map +1 -0
  64. package/dist/web/server/api-router.js +151 -0
  65. package/dist/web/server/local-web-server.d.ts +12 -0
  66. package/dist/web/server/local-web-server.d.ts.map +1 -0
  67. package/dist/web/server/local-web-server.js +100 -0
  68. package/dist/web-client/assets/index-DneaErDj.css +1 -0
  69. package/dist/web-client/assets/index-cze_4vtt.js +2 -0
  70. package/dist/web-client/assets/index-cze_4vtt.js.map +1 -0
  71. package/dist/web-client/index.html +61 -0
  72. package/dist/world/world-graph-query.d.ts +5 -1
  73. package/dist/world/world-graph-query.d.ts.map +1 -1
  74. package/dist/world/world-graph-query.js +4 -2
  75. package/dist/world/world-snapshot-store.d.ts +2 -1
  76. package/dist/world/world-snapshot-store.d.ts.map +1 -1
  77. package/dist/world/world-snapshot-store.js +2 -2
  78. package/docs/architecture/web-viewer.md +225 -0
  79. package/docs/contracts/cli-v1.md +40 -4
  80. package/docs/contracts/http-api-v1.md +155 -0
  81. package/docs/contracts/insights-v1.md +84 -0
  82. package/docs/index.md +7 -0
  83. package/docs/log.md +103 -0
  84. package/docs/product-contract.md +45 -10
  85. package/package.json +7 -4
  86. package/schemas/cli-envelope-v1.schema.json +85 -1
  87. package/schemas/insights-envelope-v1.schema.json +428 -0
@@ -150,6 +150,9 @@ Load detailed procedures only after their matching observable state:
150
150
  competing, or otherwise `insufficient` result.
151
151
  - Read [GraphPatch authoring](references/graph-patch.md) only when the
152
152
  knowledge-capture decision identifies durable verified knowledge to persist.
153
+ - Read [product feedback](references/product-feedback.md) only when source
154
+ confirmation shows that Atlas materially blocked or slowed the completed
155
+ task, or produced a confirmed misleading result.
153
156
 
154
157
  ## Answer contract
155
158
 
@@ -0,0 +1,34 @@
1
+ # Product feedback
2
+
3
+ Use this procedure after the primary engineering task has recovered or reached
4
+ its normal conclusion. It records confirmed product friction without adding a
5
+ step to ordinary development work.
6
+
7
+ Report only an observed, source-confirmed Atlas issue that materially blocked
8
+ or slowed the task, or a concrete improvement that follows from that evidence.
9
+ Keep the report compact and omit prompts, query text, source text, command
10
+ output, credentials, and unrelated task details.
11
+
12
+ Send one JSON value through the project command:
13
+
14
+ ```bash
15
+ semantic-atlas feedback report --stdin <<'JSON'
16
+ {
17
+ "kind": "problem",
18
+ "category": "misleading-result",
19
+ "impact": "slowed",
20
+ "observed": "The cited operation was unrelated after source confirmation.",
21
+ "expected": "The result should identify a narrower evidence path.",
22
+ "sourceConfirmed": true
23
+ }
24
+ JSON
25
+ ```
26
+
27
+ Choose `kind` as `problem` or `suggestion`; use one category from
28
+ `misleading-result`, `missing-knowledge`, `workflow-friction`, `performance`,
29
+ `cli-error`, or `skill-instruction`; and select impact as `blocked`, `slowed`,
30
+ or `minor`. The command links the most recent local command events for that
31
+ repository without storing their arguments or outputs.
32
+
33
+ This feedback is product-operational data, not business knowledge. Continue the
34
+ task's normal knowledge-capture decision independently.
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: semantic-atlas-insights
3
+ description: "Review Semantic Atlas local usage statistics and triage evidence-backed Agent feedback during routine product maintenance, daily operational review, or an Atlas effectiveness evaluation."
4
+ compatibility: "Requires Node.js 22.12 through 24 and the semantic-atlas CLI."
5
+ ---
6
+
7
+ # Semantic Atlas Insights
8
+
9
+ Review the local, installation-scoped evidence that shows whether Semantic
10
+ Atlas is being used and where it creates confirmed friction. This maintenance
11
+ workflow is independent of a normal engineering task's business-understanding
12
+ loop, so load it for a deliberate review rather than routine development work.
13
+
14
+ The store records command name, outcome, exit code, warning codes, duration,
15
+ repository identity, and snapshot identity. It never records command arguments,
16
+ prompts, source text, or command output. Feedback text is explicit Agent input,
17
+ so keep it concise and free of sensitive or unrelated task details.
18
+
19
+ ## Daily review
20
+
21
+ 1. Start with `semantic-atlas insights summary --period yesterday` to inspect
22
+ total commands, outcomes, warning-code counts, and feedback categories.
23
+ 2. Run `semantic-atlas insights feedback --period yesterday --status new` to
24
+ read untriaged reports with their linked local command-event IDs.
25
+ 3. Classify each report from its stated evidence. Start a normal engineering
26
+ investigation only when the report needs reproduction or source confirmation.
27
+ 4. Record the maintenance decision with `semantic-atlas insights feedback update
28
+ --stdin`. Use `triaged` for a confirmed follow-up, `resolved` for a completed
29
+ improvement, and `dismissed` when the evidence does not establish a product
30
+ issue. Include a brief reason in `note`.
31
+
32
+ Use `--period today`, `yesterday`, `7d`, `30d`, or `all` for a scoped review.
33
+ The default period is `today`; `--pretty` formats the versioned JSON envelope.
34
+
35
+ ## Triage input
36
+
37
+ ```bash
38
+ semantic-atlas insights feedback update --stdin <<'JSON'
39
+ {
40
+ "id": "00000000-0000-4000-8000-000000000000",
41
+ "status": "triaged",
42
+ "note": "Reproduce against the reported snapshot before changing the map query."
43
+ }
44
+ JSON
45
+ ```
46
+
47
+ ## Evaluation boundary
48
+
49
+ Treat the metrics as product signals, not a recall or task-quality score by
50
+ themselves. Correlate trends with fresh-agent task evaluation, source-confirmed
51
+ reports, and the relevant repository's tests before making product claims.
52
+
53
+ Semantic Atlas Insights owns local review and feedback triage. The normal
54
+ `semantic-atlas` Skill owns business understanding, source confirmation, and
55
+ knowledge capture during engineering work.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <div align="center">
2
2
  <h1>Semantic Atlas</h1>
3
- <p><strong>A local, evidence-bound world map for AI coding agents.</strong></p>
4
- <p>Connect code structure to verified business meaning, then keep both revision-aware.</p>
3
+ <p><strong>Give your coding agent the business map a senior engineer keeps in their head.</strong></p>
4
+ <p>Navigate by capabilities and behavior, confirm the responsible code, and retain what real engineering work proves.</p>
5
5
 
6
6
  <p>
7
7
  <a href="https://www.npmjs.com/package/semantic-atlas"><img alt="npm version" src="https://img.shields.io/npm/v/semantic-atlas?style=flat-square&color=cb3837"></a>
@@ -13,138 +13,263 @@
13
13
  <p><strong>English</strong> · <a href="./README.zh-CN.md">简体中文</a></p>
14
14
  </div>
15
15
 
16
- ## What is Semantic Atlas?
16
+ ## Code search is not a project understanding model
17
17
 
18
- Semantic Atlas gives coding agents one local map that joins two kinds of project knowledge:
18
+ A file tree tells an agent where code is stored. Keyword search tells it where a
19
+ word appears. Neither tells it the complete business area affected by a product
20
+ change.
19
21
 
20
- - **Structural evidence** from TypeScript and JavaScript: files, symbols, relations, framework entry points, and unresolved boundaries.
21
- - **Agent-verified business knowledge**: capabilities, scenarios, operations, interfaces, data, rules, tests, and the evidence that supports them.
22
+ That gap is why an agent can find the obvious service and still miss a policy,
23
+ consumer, data dependency, or test elsewhere in the repository. Semantic Atlas
24
+ adds the missing layer: a local, evidence-bound business graph connected to the
25
+ code that realizes it.
22
26
 
23
- The `semantic-atlas` CLI provides deterministic, versioned JSON operations. The packaged Codex Skill teaches an agent when to query, when to return to source, and when verified knowledge should be retained.
27
+ | Starting point | What the agent sees |
28
+ | --- | --- |
29
+ | File tree | `src/`, `libs/`, packages, modules, and implementation layout |
30
+ | Keyword search | Files containing the words chosen for this task |
31
+ | Semantic Atlas | Business regions, behavior, rules, data, collaborators, tests, and their source evidence |
32
+
33
+ The goal is not to replace source inspection. It is to make the agent enter the
34
+ source through the right business boundary and leave verified understanding
35
+ behind for the next task.
24
36
 
25
- > **Query first. Confirm in source. Learn only what the evidence proves.**
37
+ ## One map, continuously learned
26
38
 
27
- Source code remains authoritative. Atlas is a revision-aware projection that makes useful context reusable without pretending static analysis knows every runtime behavior.
39
+ ![Semantic Atlas overview showing business knowledge, structural evidence, the Agent loop, explicit uncertainty, and local storage](docs/mindmaps/semantic-atlas-overview.png)
28
40
 
29
- ## Why use it?
41
+ Semantic Atlas keeps one business graph that can be viewed at different semantic
42
+ zoom levels:
30
43
 
31
- - **Start from business meaning.** Find the capability, operation, data, and dependency path before opening a broad slice of the repository.
32
- - **Spend less source context.** Use graph evidence to choose a bounded source seed set, then read only the code needed to decide the task.
33
- - **Keep knowledge honest.** Evidence is tied to a snapshot; changed or missing evidence becomes visibly stale instead of silently remaining current.
34
- - **Preserve uncertainty.** Dynamic dispatch, reflection, unsupported structure, and unresolved targets stay explicit and route the agent back to source.
35
- - **Leave the project untouched.** Durable knowledge stays under `~/.semantic-atlas`; only a disposable CodeGraph projection enters the worktree's ignored `.atlas/` directory. Tracked source and configuration are not rewritten.
44
+ ```text
45
+ Commerce
46
+ └── Orders ─────────────────── works with ─── Customers
47
+ ├── Checkout
48
+ │ └── Place order ─────── reads ───────── Customer profile
49
+ └── After-sales
50
+ └── Refund eligibility ─ constrained by Refund policy
51
+ ```
36
52
 
37
- ## One project world map
53
+ `map view` starts at the current world regions. Focusing a region reveals its
54
+ children, breadcrumbs, and summarized cross-region connections. The agent keeps
55
+ zooming until the operation, data, rule, or test relevant to the task becomes
56
+ visible. This is one canonical map projected at the current level, not a large
57
+ overview plus a collection of disconnected detail maps.
38
58
 
39
- ![Semantic Atlas capability map showing structural evidence, business knowledge, the Agent loop, one unified world map, explicit uncertainty, and local storage](docs/mindmaps/semantic-atlas-overview.png)
59
+ The map grows during normal engineering work:
40
60
 
41
- Atlas stores one canonical business graph rather than separate overview and
42
- detail maps. `map view` shows its current visible frontier: start at parentless
43
- world regions, zoom into a business key, follow breadcrumbs and related context
44
- regions, and keep zooming until the relevant operation, data, or rule is visible.
45
- Cross-region connections summarize the verified deeper relations that contribute
46
- to the current view without persisting invented high-level facts.
61
+ 1. The agent queries what the project already knows.
62
+ 2. Missing knowledge routes it to bounded structural evidence and source.
63
+ 3. The agent implements or investigates the real task and verifies the result.
64
+ 4. Only durable business meaning proven by current source is learned.
65
+ 5. The next task starts with a better map.
47
66
 
48
- ## Quick start
67
+ `index` publishes code structure; it does not guess a repository-wide business
68
+ model. A newly indexed project can honestly have an empty business map. The first
69
+ relevant task may introduce a provisional root such as "Refund eligibility".
70
+ Later work can discover "After-sales" and "Orders" above it and reparent the
71
+ existing node without changing its stable identity or evidence.
49
72
 
50
- Semantic Atlas supports Node.js 22.12 through 24 and Git worktrees containing TypeScript or JavaScript.
73
+ ## What the agent actually does
51
74
 
52
- ### Install the CLI
75
+ Suppose a product request changes refund eligibility. A Semantic Atlas-aware
76
+ agent follows this path:
77
+
78
+ ```text
79
+ status
80
+ -> refresh the structural snapshot when needed
81
+ -> view/search the business map
82
+ -> zoom into the refund region and inspect its evidence
83
+ -> use bounded code search only for gaps
84
+ -> confirm behavior in source and tests
85
+ -> make and verify the change
86
+ -> reindex, inspect semantic changes, and retain durable knowledge
87
+ ```
88
+
89
+ Without an existing refund region, the same workflow begins with a small
90
+ `code search` result instead of pretending that folders are business concepts.
91
+ Once the task establishes the capability, rules, and relationships, later agents
92
+ can navigate there directly.
93
+
94
+ This workflow is delivered as one product:
95
+
96
+ - The **Semantic Atlas Skill** teaches compatible coding agents when to query,
97
+ return to source, and retain knowledge.
98
+ - The **Semantic Atlas Insights Skill** supports a separate daily product review
99
+ and feedback-triage loop, keeping routine development context focused.
100
+ - The **`semantic-atlas` CLI** provides deterministic local JSON operations.
101
+ - The **desktop Web viewer** lets people browse the same established business
102
+ map without changing Atlas knowledge or reading source first.
103
+ - The structural analyzer remains an internal evidence provider. Its directory
104
+ graph, CLI, storage schema, and terminology do not become the business map.
105
+
106
+ ## Install
107
+
108
+ Semantic Atlas supports Node.js 22.12 through 24 and Git repositories containing
109
+ TypeScript or JavaScript.
53
110
 
54
111
  ```sh
55
112
  npm install --global semantic-atlas
56
113
  semantic-atlas setup
57
114
  semantic-atlas --version
58
- semantic-atlas status --repo /path/to/project
115
+ semantic-atlas -h
59
116
  ```
60
117
 
61
- `setup` installs the exact Skill bundled with the current package into
62
- `~/.agents/skills/semantic-atlas`. Run it again after upgrading the npm package
63
- to update the managed Skill. It also removes a recognized legacy copy from
64
- `~/.codex/skills/semantic-atlas`, preventing an older duplicate from taking
65
- precedence. Codex and other compatible agents can then select `$semantic-atlas`
66
- from the task description, or you can invoke it explicitly.
118
+ `setup` atomically installs the primary Skill at
119
+ `~/.agents/skills/semantic-atlas` and the maintenance Skill at
120
+ `~/.agents/skills/semantic-atlas-insights`. Re-running it verifies the managed
121
+ copies and repairs local changes. A recognized legacy copy at
122
+ `~/.codex/skills/semantic-atlas` is removed only after the shared installation
123
+ succeeds.
124
+
125
+ Indexing, querying, and learning stay local and make no model or network calls.
126
+ npm access is used only to install or upgrade Semantic Atlas.
67
127
 
68
- After installation, indexing and queries run locally without model or network calls. npm registry access is needed only to install or update the package.
128
+ ### Upgrade
69
129
 
70
- ### Run the first query
130
+ ```sh
131
+ semantic-atlas upgrade
132
+ ```
133
+
134
+ `upgrade` checks npm's latest stable release, installs that exact resolved
135
+ version globally, verifies the newly installed CLI, and runs the new package's
136
+ `setup`. When the package is already current, it still verifies and synchronizes
137
+ the managed Skill. The command is repository-independent: it does not discover a
138
+ Git project or open Atlas data.
139
+
140
+ ## First project
71
141
 
72
- Run commands serially from the exact target worktree:
142
+ The bundled Skill normally drives these commands for the agent. They are shown
143
+ here to make the lifecycle explicit. Run Atlas commands serially in the exact
144
+ target worktree:
73
145
 
74
146
  ```sh
75
147
  semantic-atlas status
76
148
  semantic-atlas index
77
149
  semantic-atlas map view
78
150
  semantic-atlas map search "checkout" --limit 10
151
+ semantic-atlas map view commerce/orders
152
+ semantic-atlas map show commerce/orders/checkout
153
+ ```
154
+
155
+ If `status` reports `missing`, `stale`, or an incomplete structural backend, run
156
+ `index` before querying. If a current world returns `regions: []` with
157
+ `BUSINESS_KNOWLEDGE_EMPTY`, the project has no verified business knowledge yet.
158
+ The agent then uses a bounded fallback:
159
+
160
+ ```sh
79
161
  semantic-atlas code search "CheckoutService" --limit 10
80
162
  ```
81
163
 
82
- Every project command writes one versioned JSON envelope to standard output.
83
- `setup`, `-h`/`--help`, and `--version` are repository-independent text
84
- commands. Diagnostics stay on standard error, so agents consume stable project
85
- fields and warning codes instead of scraping prose.
164
+ Project commands write one versioned JSON envelope to standard output and keep
165
+ diagnostics on standard error. `setup`, `upgrade`, `-h`/`--help`, and `--version`
166
+ are repository-independent text commands.
86
167
 
87
- On a newly indexed project, the world `map view` may return `regions: []` with
88
- `BUSINESS_KNOWLEDGE_EMPTY`. That is the honest starting state: map commands
89
- contain business knowledge only, while explicit `code search` provides bounded
90
- CodeGraph evidence for the active task.
168
+ ## Browse the business map
91
169
 
92
- ## The Agent loop
170
+ Start the local desktop viewer from any directory:
93
171
 
94
- 1. **Status.** Confirm the exact repository root, snapshot freshness, and structural-backend completeness before broad source discovery.
95
- 2. **Index.** Publish or refresh the worktree-local snapshot when state is missing, stale, failed, or incomplete.
96
- 3. **Query.** Start from the business world, search business vocabulary, zoom through relevant regions, and show direct evidence. Use `code search` only when the business map is absent or insufficient.
97
- 4. **Confirm source.** Open the cited ranges and resolve the decisive behavior in authoritative code. Keep partial, stale, unsupported, and unknown results bounded.
98
- 5. **Do the engineering work.** The calling agent edits code, runs tests, reviews diffs, and owns Git; Atlas performs none of those actions.
99
- 6. **Reconcile and learn.** Reindex after relevant source changes, inspect semantic `changes`, and submit only durable, verified business knowledge through `learn --stdin`. Verify learned nodes with `map show`.
172
+ ```sh
173
+ semantic-atlas web
174
+ ```
100
175
 
101
- This loop grows and reorganizes the business map one verified business area at a time. A parentless operation can be a provisional root; later work can place it beneath a broader concept without changing its stable key or evidence. Atlas does not require an upfront repository-wide business-learning pass.
176
+ The command serves a bundled interface and versioned read-only HTTP API on
177
+ `127.0.0.1:4310`, then opens the default browser. Use `--no-open` to suppress
178
+ browser launch, `--port <n>` to select another loopback port, or `--repo <path>`
179
+ to select an eligible initial project.
102
180
 
103
- When `index` runs for a newly created Git worktree, Atlas automatically copies a compatible sibling CodeGraph projection and performs an incremental sync. Agents do not run a separate initialization command; a full index is used only when no compatible sibling projection is available.
181
+ The project rail contains only each repository's primary working tree when it
182
+ is currently on `main` or `master`. Linked worktrees and other branches never
183
+ appear. The viewer supports project selection, hierarchical business-map
184
+ navigation, business search, and node details with existing kind, certainty,
185
+ validity, relationships, and evidence. It cannot index, learn, modify source,
186
+ operate Git, or change Atlas data.
104
187
 
105
- ## Measured results
188
+ ## Product insights
106
189
 
107
- ### Frozen comparative evaluation
190
+ Normal work does not gain a new reporting step. When source confirmation shows
191
+ that Atlas materially blocked or slowed a task, the primary Skill can record one
192
+ compact, evidence-contextual report. Daily maintenance is handled by the
193
+ separate Insights Skill:
108
194
 
109
- The retained [`fresh-agent-v1` report](evaluation/results/fresh-agent-v1/report.json) covers `framework-evaluation@fixture-v1`: 12 paired cases and 24 fresh-agent runs across NestJS, GraphQL, TypeORM, and BullMQ location and dependency-impact tasks.
195
+ ```sh
196
+ semantic-atlas insights summary --period yesterday
197
+ semantic-atlas insights feedback --period yesterday --status new
198
+ semantic-atlas insights feedback update --stdin
199
+ ```
110
200
 
111
- | Metric | Without Atlas | With Atlas | Fixture result |
112
- | --- | ---: | ---: | --- |
113
- | Final-answer correctness | 100% | 100% | No regression |
114
- | Required-file recall | 100% | 100% | No regression |
115
- | Required-symbol recall | 100% | 100% | No regression |
116
- | Median unique source files opened | 6.5 | 4 | 38.46% fewer |
117
- | Median observed source-input tokens | 1,351 | 688 | 49.07% fewer |
201
+ The local store records objective command metadata such as command name,
202
+ outcome, warning codes, duration, repository identity, and snapshot identity.
203
+ It never records prompts, command arguments, query text, source text, or command
204
+ output. Use the signals with fresh-agent evaluation and source-confirmed reports;
205
+ they show product usage and friction, not a standalone recall score.
118
206
 
119
- The gate was declared before collection and all 61 routed uncertainty events were handled without a failure classification. Read the [evaluation methodology](docs/evaluation.md) and retained runs before interpreting the numbers.
207
+ ## Trust model
120
208
 
121
- These are fixture-scoped comparative results. They do **not** establish universal business accuracy, performance on every repository, or total model-token savings; the token metric counts observed source input under `tiktoken-o200k_base-v1`.
209
+ Semantic Atlas is useful because it preserves the line between evidence and
210
+ understanding:
122
211
 
123
- ### Public workflow validation
212
+ - **Source remains authoritative.** Answer-controlling and change-controlling
213
+ behavior is confirmed in the checked-out code.
214
+ - **Business facts carry evidence.** Learned nodes and relations bind to source
215
+ symbols, ranges, content hashes, certainty, and a repository snapshot.
216
+ - **Change invalidates confidence visibly.** Evidence that can no longer be
217
+ rebound becomes `stale`; it is not silently retained as current truth.
218
+ - **Uncertainty stays explicit.** Dynamic dispatch, reflection, unsupported
219
+ structure, hypotheses, and unresolved targets route the agent back to source.
220
+ - **The target project stays untouched.** Atlas does not edit source, run tests,
221
+ or operate Git. Generated worktree state is ignored and disposable.
124
222
 
125
- An isolated TypeScript project was used to validate the public installation path with the registry-installed CLI and the Skill from this repository:
223
+ ## Local storage
126
224
 
127
- - A first fresh agent completed `missing → index → query → source confirmation → learn`.
128
- - A second fresh agent discovered and reused the persisted knowledge through normal status, business navigation, search, and show commands without receiving the previous answer or repeating `learn`.
129
- - The target revision and ordinary Git status stayed unchanged; durable knowledge lived in the user Atlas home and the worktree contained only ignored CodeGraph state.
225
+ ```text
226
+ ~/.semantic-atlas/repositories/<repository-id>/
227
+ └── atlas.db durable repository business knowledge
130
228
 
131
- This validates installation, the Agent workflow, knowledge reuse, and zero-intrusion behavior in that project. It is not a universal accuracy benchmark or a production-stability claim.
229
+ ~/.semantic-atlas/
230
+ └── insights.db installation-level usage and feedback signals
132
231
 
133
- ## Evidence, uncertainty, and storage
232
+ <worktree>/.atlas/
233
+ ├── .gitignore
234
+ └── codegraph.db disposable structural projection
235
+ ```
134
236
 
135
- | Boundary | Contract |
136
- | --- | --- |
137
- | Source authority | Every answer-controlling claim is confirmed in source; Atlas context never overrides the checked-out code. |
138
- | Evidence validity | Business assertions carry source locators, hashes, certainty, and snapshot-derived validity. Failed rebinding produces `stale`, not silent deletion or promotion. |
139
- | Explicit uncertainty | `UnknownBoundary`, `partial`, `unsupported`, `hypothesis`, and insufficient results narrow source fallback; they are never presented as exact facts. |
140
- | One product | The CLI and Skill expose one Semantic Atlas workflow. CodeGraph stays behind the adapter and its CLI, MCP, schema, and backend types are not public Atlas interfaces. |
141
- | Durable repository knowledge | `~/.semantic-atlas/repositories/<repository-id>/atlas.db` stores repository-wide business knowledge, snapshots, snapshot bindings, validity, and worktree publication state. Set absolute `SEMANTIC_ATLAS_HOME` only when tests or CI need isolation. |
142
- | Disposable worktree projection | Each worktree owns `.atlas/codegraph.db`, containing CodeGraph structure only. A missing projection is bootstrapped from a compatible sibling and incrementally synchronized. |
143
- | Zero intrusion | Atlas prepares `.atlas/.gitignore`, writes no tracked source or project configuration, and does not edit, test, review, commit, merge, or release code. Removing a worktree removes only its disposable projection. |
237
+ Business knowledge is shared across worktrees of the same repository. Structural
238
+ state is separate because each worktree can contain a different commit or dirty
239
+ source. A new worktree can bootstrap from a compatible sibling projection and
240
+ then synchronize incrementally. Removing a worktree removes only its disposable
241
+ projection.
242
+
243
+ Set an absolute `SEMANTIC_ATLAS_HOME` when tests or CI need isolated durable
244
+ state.
245
+
246
+ ## Evidence from the frozen evaluation
247
+
248
+ The retained [`fresh-agent-v1` report](evaluation/results/fresh-agent-v1/report.json)
249
+ contains 12 paired location and dependency-impact cases across NestJS, GraphQL,
250
+ TypeORM, and BullMQ, for 24 fresh-agent runs.
251
+
252
+ | Metric | Without Atlas | With Atlas | Fixture result |
253
+ | --- | ---: | ---: | --- |
254
+ | Final-answer correctness | 100% | 100% | No regression |
255
+ | Required-file recall | 100% | 100% | No regression |
256
+ | Required-symbol recall | 100% | 100% | No regression |
257
+ | Median unique source files opened | 6.5 | 4 | 38.46% fewer |
258
+ | Median observed source-input tokens | 1,351 | 688 | 49.07% fewer |
144
259
 
145
- ## CLI and development
260
+ These are fixture-scoped results, not a claim of universal business accuracy or
261
+ total model-token savings. Read the [evaluation protocol](docs/evaluation.md)
262
+ before interpreting them.
263
+
264
+ ## Command reference
146
265
 
147
266
  ```text
267
+ semantic-atlas setup
268
+ semantic-atlas upgrade
269
+ semantic-atlas -h | --help
270
+ semantic-atlas --version
271
+ semantic-atlas web [--repo <path>] [--port <n>] [--no-open]
272
+
148
273
  semantic-atlas status [--repo <path>] [--pretty]
149
274
  semantic-atlas index [--repo <path>] [--pretty]
150
275
  semantic-atlas map view [business-key] [--repo <path>] [--pretty]
@@ -153,9 +278,20 @@ semantic-atlas map show <business-key> [--repo <path>] [--pretty]
153
278
  semantic-atlas code search <structural-term> [--limit <n>] [--repo <path>] [--pretty]
154
279
  semantic-atlas learn --stdin [--repo <path>] [--pretty]
155
280
  semantic-atlas changes [--from <snapshot-id>] [--to <snapshot-id>] [--repo <path>] [--pretty]
281
+ semantic-atlas feedback report --stdin [--repo <path>] [--pretty]
282
+
283
+ semantic-atlas insights summary [--period today|yesterday|7d|30d|all] [--pretty]
284
+ semantic-atlas insights feedback [--period today|yesterday|7d|30d|all] [--status new|triaged|resolved|dismissed] [--pretty]
285
+ semantic-atlas insights feedback update --stdin [--pretty]
156
286
  ```
157
287
 
158
- Field-level behavior lives in the versioned [CLI v1](docs/contracts/cli-v1.md) and [GraphPatch v1](docs/contracts/graph-patch-v1.md) contracts.
288
+ Field-level behavior is defined by the versioned [CLI v1](docs/contracts/cli-v1.md)
289
+ and [GraphPatch v1](docs/contracts/graph-patch-v1.md) contracts. Product
290
+ observability and feedback behavior are defined by
291
+ [Insights v1](docs/contracts/insights-v1.md). The viewer uses the loopback
292
+ [HTTP API v1](docs/contracts/http-api-v1.md).
293
+
294
+ ## Develop
159
295
 
160
296
  ```sh
161
297
  corepack enable
@@ -166,15 +302,20 @@ pnpm build
166
302
  pnpm package:verify
167
303
  ```
168
304
 
169
- `package:verify` installs the packed artifact into an external temporary consumer and runs the real CLI. `validation:backend` adds the pinned CodeGraph projection, recovery, rebinding, sibling-bootstrap, and worktree-isolation gate.
305
+ `package:verify` installs the packed artifact outside the source checkout and
306
+ runs the real CLI. `validation:backend` adds structural projection, recovery,
307
+ evidence rebinding, sibling bootstrap, and worktree-isolation gates.
170
308
 
171
- ## Reference
309
+ ## Read next
172
310
 
173
311
  - [Product contract](docs/product-contract.md)
312
+ - [Continuous business learning and semantic zoom](docs/architecture/continuous-business-learning.md)
174
313
  - [Graph model](docs/contracts/graph-model.md)
175
- - [CodeGraph backend architecture](docs/architecture/codegraph-backend.md)
176
- - [Fresh Agent evaluation protocol](docs/evaluation.md)
177
- - [Published evaluation artifacts](evaluation/results/fresh-agent-v1/README.md)
314
+ - [CLI v1 contract](docs/contracts/cli-v1.md)
315
+ - [Desktop Web viewer](docs/architecture/web-viewer.md)
316
+ - [HTTP API v1 contract](docs/contracts/http-api-v1.md)
317
+ - [Insights v1 contract](docs/contracts/insights-v1.md)
318
+ - [Evaluation protocol](docs/evaluation.md)
178
319
 
179
320
  ## License
180
321