semantic-atlas 2.0.0 → 2.1.1

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 (60) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +133 -73
  2. package/.agents/skills/semantic-atlas/agents/openai.yaml +2 -2
  3. package/.agents/skills/semantic-atlas-maintenance/SKILL.md +35 -12
  4. package/.agents/skills/semantic-atlas-maintenance/agents/openai.yaml +1 -1
  5. package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +11 -5
  6. package/README.md +52 -15
  7. package/README.zh-CN.md +204 -0
  8. package/dist/application/map-application.d.ts +11 -0
  9. package/dist/application/map-application.d.ts.map +1 -1
  10. package/dist/application/map-application.js +21 -1
  11. package/dist/application/map-application.js.map +1 -1
  12. package/dist/cli/run-cli.d.ts +2 -0
  13. package/dist/cli/run-cli.d.ts.map +1 -1
  14. package/dist/cli/run-cli.js +47 -2
  15. package/dist/cli/run-cli.js.map +1 -1
  16. package/dist/contracts/cli.d.ts +8 -0
  17. package/dist/contracts/cli.d.ts.map +1 -1
  18. package/dist/map/business-graph.d.ts +1 -0
  19. package/dist/map/business-graph.d.ts.map +1 -1
  20. package/dist/map/business-graph.js +10 -0
  21. package/dist/map/business-graph.js.map +1 -1
  22. package/dist/rendering/html.d.ts +3 -0
  23. package/dist/rendering/html.d.ts.map +1 -0
  24. package/dist/rendering/html.js +12 -0
  25. package/dist/rendering/html.js.map +1 -0
  26. package/dist/rendering/map-camera.d.ts +25 -0
  27. package/dist/rendering/map-camera.d.ts.map +1 -0
  28. package/dist/rendering/map-camera.js +47 -0
  29. package/dist/rendering/map-camera.js.map +1 -0
  30. package/dist/rendering/map-projector.d.ts +8 -1
  31. package/dist/rendering/map-projector.d.ts.map +1 -1
  32. package/dist/rendering/map-projector.js +106 -169
  33. package/dist/rendering/map-projector.js.map +1 -1
  34. package/dist/rendering/viewer-browser.d.ts +2 -0
  35. package/dist/rendering/viewer-browser.d.ts.map +1 -0
  36. package/dist/rendering/viewer-browser.js +279 -0
  37. package/dist/rendering/viewer-browser.js.map +1 -0
  38. package/dist/rendering/viewer-page.d.ts +29 -0
  39. package/dist/rendering/viewer-page.d.ts.map +1 -0
  40. package/dist/rendering/viewer-page.js +438 -0
  41. package/dist/rendering/viewer-page.js.map +1 -0
  42. package/dist/web/local-web-application.d.ts +9 -0
  43. package/dist/web/local-web-application.d.ts.map +1 -0
  44. package/dist/web/local-web-application.js +29 -0
  45. package/dist/web/local-web-application.js.map +1 -0
  46. package/dist/web/local-web-server.d.ts +12 -0
  47. package/dist/web/local-web-server.d.ts.map +1 -0
  48. package/dist/web/local-web-server.js +71 -0
  49. package/dist/web/local-web-server.js.map +1 -0
  50. package/dist/web/web-command-service.d.ts +16 -0
  51. package/dist/web/web-command-service.d.ts.map +1 -0
  52. package/dist/web/web-command-service.js +50 -0
  53. package/dist/web/web-command-service.js.map +1 -0
  54. package/docs/architecture.md +72 -32
  55. package/docs/evaluation.md +24 -12
  56. package/docs/index.md +3 -2
  57. package/docs/map-format.md +6 -4
  58. package/docs/observations.md +25 -15
  59. package/docs/product-contract.md +71 -50
  60. package/package.json +3 -2
@@ -1,24 +1,33 @@
1
1
  ---
2
2
  name: semantic-atlas
3
- description: Query a repository's advisory business map before broad source discovery for business-changing feature, bug, refactor, and impact-analysis tasks. Use in repositories with docs/business-map files to find likely owners, collaborators, data, invariants, interfaces, and source anchors, then confirm every change-controlling claim in current evidence.
3
+ description: Build source-supported business understanding and make maintenance decisions for business-changing engineering tasks, with or without an existing business map. Use for features, bugs, refactors, reviews, and impact analysis to find or establish business boundaries, collaborators, data, invariants, interfaces, and source entry points before broad discovery, then decide whether stable shared knowledge needs maintenance.
4
4
  compatibility: Requires Node.js 24+, a bundled or PATH-compatible semantic-atlas CLI, and repository source access.
5
5
  ---
6
6
 
7
7
  # Semantic Atlas
8
8
 
9
- Use the tracked business map as a compact navigation prior. Treat all returned
10
- nodes, relations, summaries, and anchors as investigation leads; current
11
- source, tests, tracked product documents, and required runtime evidence decide
12
- what an engineering change may claim and do.
9
+ Build the smallest current-evidence business model needed to make an accurate
10
+ engineering decision. An existing map is a compact navigation prior. Missing,
11
+ incomplete, stale, or contradicted map knowledge changes the discovery route;
12
+ it does not remove the need to understand the business boundary.
13
13
 
14
- ## Choose The Workflow
14
+ Current source, tests, tracked product documents, and required runtime evidence
15
+ decide what an engineering change may claim and do. Treat map results as
16
+ investigation leads.
15
17
 
16
- Use this workflow when a task can change business behavior, ownership, shared
17
- data, an invariant, or an interface. Begin ordinary repository work directly
18
- when the task is purely mechanical and its exact source boundary is already
19
- established, such as formatting, a local rename, or generated-file refresh.
18
+ ## Choose The Workflow From The Task
20
19
 
21
- ## Query The Smallest Useful Neighborhood
20
+ Use this workflow when work can change or depend on business behavior,
21
+ ownership, shared data, an invariant, or an interface. This includes feature,
22
+ bug, refactor, impact-analysis, and independent-review work whose correct scope
23
+ requires business judgment.
24
+
25
+ Begin ordinary repository work directly when the task is purely mechanical and
26
+ its exact source boundary is already established, such as formatting, a local
27
+ rename, or generated-file refresh. This is a complete stopping decision and
28
+ produces no shared business-knowledge maintenance work.
29
+
30
+ ## Probe Existing Business Knowledge
22
31
 
23
32
  1. Read the task contract and repository instructions. Resolve the repository
24
33
  root and keep all commands in the task's assigned worktree.
@@ -26,7 +35,7 @@ established, such as formatting, a local rename, or generated-file refresh.
26
35
  an exact business name or stable task vocabulary over a framework, folder,
27
36
  class, or method name.
28
37
  3. Before broad source discovery, run the Skill's identity- and
29
- contract-checking adapter:
38
+ contract-checking adapter whether or not map documents are present:
30
39
 
31
40
  ```bash
32
41
  node "<skill-directory>/scripts/query-context.mjs" \
@@ -35,41 +44,56 @@ established, such as formatting, a local rename, or generated-file refresh.
35
44
 
36
45
  A package-bundled adapter invokes that package's CLI directly. A managed
37
46
  user Skill first requires the PATH CLI version recorded by `setup`, then
38
- verifies the v1 `context` envelope. This keeps an older command with the
47
+ verifies the v1 `context` envelope. This prevents an older command with the
39
48
  same executable name from being interpreted as the current product.
40
49
 
41
- 4. Read the selected concept, ancestors, direct children, incoming and outgoing
42
- relations, endpoint summaries, and anchors. Record them as hypotheses.
43
- 5. Query a returned stable ID only when a direct owner, upstream action,
44
- downstream consumer, shared data concept, invariant, or interface could
45
- change the implementation scope. Stop expanding when the current task has a
46
- source-confirmable boundary; a complete graph traversal is not required.
50
+ 4. Preserve the selector and bounded outcome for the task observation. When a
51
+ context is returned, record the selected stable IDs as hypotheses.
52
+
53
+ ## Build The Business Model With Or Without A Map
47
54
 
48
- ## Route Map Outcomes
55
+ Route the probe result into one current-evidence investigation:
49
56
 
50
57
  - A successful context result supplies likely business scope and source entry
51
- points. Open the most decisive anchors first, then follow current imports,
52
- callers, consumers, tests, and product documents as the behavior requires.
58
+ points. Open the most decisive anchors first. Query another returned stable
59
+ ID only when an owner, upstream action, downstream consumer, shared data
60
+ concept, invariant, or interface could change the implementation scope.
53
61
  - `CONCEPT_AMBIGUOUS` supplies explicit candidates. Compare their stable IDs,
54
- names, kinds, and task meaning, then query the matching ID. When current
55
- behavior is needed to choose, search only the task term and candidate
56
- vocabulary before selecting.
57
- - `CONCEPT_NOT_FOUND` and `MAP_NOT_FOUND` are bounded map outcomes. Continue
58
- with ordinary source discovery using user vocabulary, likely product docs,
59
- and progressively narrower source searches.
62
+ names, kinds, and task meaning, then query the matching ID. Use bounded source
63
+ evidence when current behavior is needed to choose.
64
+ - `CONCEPT_NOT_FOUND` means the repository has a map without this vocabulary.
65
+ Search current product documents and source using the task term, likely
66
+ business synonyms, and directly observed collaborators.
67
+ - `MAP_NOT_FOUND` means the repository has no configured shared business map.
68
+ When the map is absent, build the smallest source-supported business model needed for the task.
69
+ Start from the user-visible outcome, identify only the owning business scope,
70
+ actions, data, rules, and interfaces that current evidence requires, and stop
71
+ when the engineering boundary is source-confirmable. Limit this model to
72
+ business meaning supported by the current task rather than repository-folder
73
+ structure or a complete taxonomy.
60
74
  - `MAP_DOCUMENT_INVALID`, an unavailable CLI, or an infrastructure failure
61
- makes the map unavailable for this task. Preserve the error as context and
62
- continue through the repository's normal discovery workflow.
63
- - A node with no anchors still provides business vocabulary and relations.
64
- Search its stable name, aliases, neighboring concepts, and interface terms,
65
- then follow current code structure.
66
- - A missing or stale file, directory, document, symbol, or search anchor weakens
67
- that navigation hint. Use the node meaning and direct relations for a bounded
68
- search, and confirm the replacement location in current evidence.
75
+ makes map knowledge unavailable for this task. Preserve the failure, build
76
+ the same bounded current-evidence model, and report observation recording as
77
+ unavailable when the CLI boundary cannot accept it.
78
+ - A node without anchors still supplies business vocabulary and relations.
79
+ Search its name, aliases, neighboring concepts, and interface terms, then
80
+ follow current code structure.
81
+ - A missing or stale anchor weakens only that navigation hint. Use current
82
+ evidence to find the replacement location without discarding unrelated
83
+ stable business meaning.
84
+
85
+ For a mapless task, the observation query records the bounded outcome:
86
+
87
+ ```json
88
+ {
89
+ "selector": "<business term>",
90
+ "outcome": "map_not_found"
91
+ }
92
+ ```
69
93
 
70
- ## Build A Current-Evidence Model
94
+ ## Confirm The Current-Evidence Model
71
95
 
72
- For every map statement that could control the change:
96
+ For every statement that could control the change:
73
97
 
74
98
  1. Open current source or tests that implement or exercise the behavior.
75
99
  2. Open the tracked product document when it owns the durable rule or outcome.
@@ -77,10 +101,9 @@ For every map statement that could control the change:
77
101
  consume relation when that relation expands the required scope.
78
102
  4. Use runtime evidence when the conclusion depends on deployed state rather
79
103
  than repository behavior.
80
- 5. Classify each relevant hypothesis as confirmed, contradicted, or unresolved.
81
- Let confirmed current evidence control the implementation. Replace a
82
- contradicted relation with the source-supported collaborator in the
83
- task-specific model. Keep unresolved statements out of decisive conclusions.
104
+ 5. Classify relevant map hypotheses as confirmed, missing, stale,
105
+ contradicted, or unresolved. Let confirmed current evidence control the
106
+ task. Keep unresolved statements out of decisive conclusions.
84
107
 
85
108
  Trace a downstream symptom toward its confirmed upstream cause before editing.
86
109
  For shared data or interfaces, inspect every confirmed producer and consumer
@@ -94,26 +117,60 @@ collaborators, add regression coverage at the public behavior boundary, run
94
117
  the repository's required checks, and review the final diff against the task
95
118
  scope.
96
119
 
97
- Final conclusions identify the business boundary, the decisive current
98
- evidence, the implemented or proposed scope, and relevant verification. Phrase
99
- map-only statements as leads or uncertainty rather than current behavior.
100
-
101
- ## Record The Task Observation
102
-
103
- For business-changing work, read [references/observations.md](references/observations.md)
104
- and record one task observation after the engineering result and verification
105
- are known. Use a stable observation ID for the run and reuse the same complete
106
- document when retrying an interrupted submission.
107
-
108
- The task observation records the map-query outcome, selected concepts,
109
- current-evidence dispositions, map-update candidates, and any explicit human
110
- correction. Independent review owns accuracy judgments, so the task document
111
- contains investigation evidence rather than a correctness verdict.
112
-
113
- Submit the complete JSON document through the installed CLI:
120
+ Final engineering conclusions identify the business boundary, decisive current
121
+ evidence, implementation or review scope, and verification. Phrase map-only
122
+ statements as leads or uncertainty rather than current behavior.
123
+
124
+ ## Decide Post-Task Business-Knowledge Maintenance
125
+
126
+ After the engineering or review result is known, choose one maintenance disposition:
127
+
128
+ - `candidate`: current evidence establishes stable business meaning that the
129
+ shared map omits or represents incorrectly. Record one or more domain-owned
130
+ map-update candidates with decisive evidence.
131
+ - `already_represented`: the shared map still expresses the stable business
132
+ meaning needed by the task. Record no candidate.
133
+ - `implementation_local`: the result changes only helpers, framework wiring,
134
+ source organization, tests, or another non-durable implementation detail.
135
+ Record no candidate.
136
+ - `unresolved`: available evidence cannot establish durable business identity,
137
+ ownership, or relation direction. Preserve the uncertainty without proposing
138
+ a canonical edit.
139
+
140
+ A no-change disposition is a complete result when current shared knowledge
141
+ already represents the durable meaning or the change is implementation-local.
142
+ Add concepts and relations only when current evidence supports their accuracy.
143
+
144
+ For a repository without a map, use `candidate` only when current evidence
145
+ establishes a stable business domain and a bounded reusable concept or relation.
146
+ Use `unresolved` when one task cannot support that identity. Limit bootstrap
147
+ knowledge to the stable meaning established by the current task.
148
+
149
+ ## Record Accuracy Evidence
150
+
151
+ For business-changing work, read
152
+ [references/observations.md](references/observations.md) after the engineering
153
+ or review result and verification are known.
154
+
155
+ - For engineering and analysis work, record one task observation. It contains
156
+ the map-query outcome, selected concepts, current-evidence dispositions,
157
+ map-update candidates from a `candidate` maintenance disposition, and any
158
+ explicit human correction.
159
+ - For independent review, record one review observation that references the
160
+ existing task observation and contains the accuracy verdict. Keep the task
161
+ observation immutable. When no task observation is available, report the
162
+ missing accuracy-evidence link separately from the review verdict.
163
+
164
+ Independent review owns accuracy judgments, so task observations contain
165
+ investigation evidence rather than correctness verdicts. Generate one stable
166
+ observation ID for the run and reuse the same complete document when retrying an
167
+ interrupted submission.
168
+
169
+ Submit the matching complete JSON document through the installed CLI:
114
170
 
115
171
  ```text
116
172
  semantic-atlas observe task --stdin [--repo <repository-root>]
173
+ semantic-atlas observe review --stdin [--repo <repository-root>]
117
174
  ```
118
175
 
119
176
  Report the recorded or idempotent outcome with the engineering result. When
@@ -121,20 +178,23 @@ the observation command fails, the engineering result remains unchanged;
121
178
  report the observation failure separately so review can distinguish delivery
122
179
  evidence from missing accuracy evidence.
123
180
 
124
- ## Report Durable Map Observations Separately
181
+ ## Hand Off Canonical Maintenance
125
182
 
126
- Ordinary task completion does not require editing `docs/business-map`. When
127
- current evidence reveals a stable missing concept, stale anchor, or
128
- contradicted relation, add a separate map-update candidate to the task report:
183
+ Keep canonical map editing in a separate maintenance change after stable reviewed source is available.
184
+ The `semantic-atlas-maintenance` Skill rechecks retained candidates by business
185
+ domain, edits one owning YAML surface, validates the complete graph, renders the
186
+ changed neighborhood, and submits the Git diff for independent review.
129
187
 
130
- ```text
131
- Map-update candidate: <node, relation, or anchor>
132
- Business domain: <stable domain ID>
133
- Disposition: <confirmed, contradicted, or unresolved>
134
- Current evidence: <repository-relative source, test, or product document>
135
- Durable correction: <concise proposed business meaning>
136
- ```
188
+ A post-integration maintenance run can examine retained candidates from
189
+ business-changing results; an empty or no-change run is successful. Periodic
190
+ reconciliation remains a fallback for accumulated drift, missed observations,
191
+ and changes outside the normal engineering workflow. The understanding and
192
+ maintenance contracts run independently of task orchestrators.
193
+
194
+ ## Report The Result
137
195
 
138
- Keep the candidate separate from the engineering conclusion so later periodic
139
- reconciliation can accept, refine, or discard it through the repository's
140
- normal Git review workflow.
196
+ Report the business boundary, decisive current evidence, engineering scope,
197
+ verification, accuracy-observation outcome, and maintenance disposition. For
198
+ `candidate`, include the business domain, proposed durable correction, and
199
+ evidence. For `already_represented`, `implementation_local`, or `unresolved`,
200
+ state the evidence-based reason and record no map-update candidate.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Semantic Atlas"
3
- short_description: "Guide engineering work from business context to current evidence"
4
- default_prompt: "Use $semantic-atlas to map this business-changing task to current repository evidence before implementing it."
3
+ short_description: "Build current-evidence business context for engineering work"
4
+ default_prompt: "Use $semantic-atlas to understand this business-changing task with or without an existing business map, verify it in current evidence, and decide whether shared knowledge needs maintenance."
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: semantic-atlas-maintenance
3
- description: Reconcile retained Semantic Atlas map-update candidates for one business domain into a source-supported, normally reviewed docs/business-map YAML change. Use for periodic map maintenance, drift cleanup, candidate triage, and domain-scoped reconciliation in repositories with a Semantic Atlas business map and local observations.
3
+ description: Reconcile retained Semantic Atlas map-update candidates for one business domain into a source-supported, normally reviewed docs/business-map YAML change, with or without an existing business map. Use for post-integration maintenance, initial-domain bootstrap, drift cleanup, candidate triage, and domain-scoped reconciliation in repositories with local observations.
4
4
  compatibility: Requires Node.js 24+, Git, the current semantic-atlas CLI, retained local observations, and repository source access.
5
5
  ---
6
6
 
@@ -42,7 +42,9 @@ duplicate handling, and clean stopping conditions.
42
42
 
43
43
  ## Confirm Current Business Meaning
44
44
 
45
- 1. Open the selected domain's current `docs/business-map/*.yaml` owner.
45
+ 1. Determine whether the selected domain already has an owning
46
+ `docs/business-map/*.yaml` file. Preserve a `MAP_NOT_FOUND` result as the
47
+ explicit bootstrap state.
46
48
  2. Open every decisive current source, test, or tracked product document named
47
49
  by the candidate origins. Follow current callers or collaborators when the
48
50
  proposed relation changes both business endpoints.
@@ -56,12 +58,30 @@ duplicate handling, and clean stopping conditions.
56
58
  4. Keep discarded and unresolved candidates outside the canonical map. Record
57
59
  their evidence-based reason in the maintenance result.
58
60
 
61
+ ## Resolve One Owning YAML
62
+
63
+ Use the selected business domain as the ownership boundary:
64
+
65
+ - When the domain already has an owning YAML file, edit that file.
66
+ - When the graph exists but the selected domain has no owning file, create one
67
+ domain-owned YAML file that participates in complete-graph validation.
68
+ - When no map documents exist, create one initial business-domain YAML under
69
+ `docs/business-map/`. Establish its stable domain ID, title, summary, root
70
+ node, and bounded accepted concepts from current evidence.
71
+
72
+ Limit the initial map to stable meaning supported by the selected candidates and current evidence.
73
+ Retain cross-domain relations as unresolved until both durable endpoints and
74
+ their owning domains can participate in one valid graph. The first map is a
75
+ reviewable business-domain seed rather than a taxonomy inferred from repository
76
+ structure.
77
+
59
78
  ## Edit One Owning YAML
60
79
 
61
80
  Apply accepted and refined corrections to one owning YAML surface for the
62
- selected business domain. Preserve stable node IDs when business identity is
63
- unchanged, use the source concept's owning file for directed relations, and
64
- keep anchors as navigation hints rather than current-behavior claims.
81
+ selected business domain. This surface can be an existing domain file or the
82
+ new initial domain file. Preserve stable node IDs when business identity is
83
+ unchanged, use the source concept's owning file for directed relations, and keep
84
+ anchors as navigation hints rather than current-behavior claims.
65
85
 
66
86
  Repeated origins for one duplicate candidate produce one map edit. Preserve
67
87
  all originating task and review IDs in the maintenance result so independent
@@ -79,15 +99,18 @@ git diff --check
79
99
  git diff -- docs/business-map/<owning-file>.yaml
80
100
  ```
81
101
 
82
- Inspect the rendered projection for the changed neighborhood. Confirm the Git
83
- diff changes one owning YAML surface and leaves retained observations
84
- unchanged. Submit the ordinary map change for independent review; the reviewer
85
- checks durable business meaning, relation direction, evidence support, complete
86
- graph validity, and the one-domain boundary.
102
+ Inspect the rendered projection for the changed neighborhood. For an initial
103
+ map, confirm that the Viewer presents one bounded business domain rather than a
104
+ repository structure. Confirm the Git diff changes one owning YAML surface and
105
+ leaves retained observations unchanged. Submit the ordinary map change for
106
+ independent review; the reviewer checks durable business meaning, relation
107
+ direction, evidence support, complete graph validity, and the one-domain
108
+ boundary.
87
109
 
88
110
  ## Report The Result
89
111
 
90
112
  Report the selected business domain, candidate origins, each maintenance
91
113
  classification and decisive evidence, the owning YAML file, validation and
92
- render results, the Git diff, and any discarded or unresolved leads. Separate
93
- the proposed map change from independent-review approval and later merge.
114
+ render results, whether this is an initial map or an update, the Git diff, and
115
+ any discarded or unresolved leads. Separate the proposed map change from
116
+ independent-review approval and later merge.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Semantic Atlas Maintenance"
3
3
  short_description: "Review one domain's map candidates against current evidence"
4
- default_prompt: "Use $semantic-atlas-maintenance to reconcile retained candidates for one business domain into a reviewed map change."
4
+ default_prompt: "Use $semantic-atlas-maintenance to reconcile retained candidates for one business domain into a reviewed map update or initial map."
@@ -43,14 +43,20 @@ and leave the candidate unresolved until the owning authority can decide it.
43
43
  relation direction are confirmed.
44
44
  - A missing concept can be added when current evidence establishes stable
45
45
  business identity, ownership, and meaning rather than only a source symbol.
46
+ - A repository with `MAP_NOT_FOUND` can begin with one domain-owned map when
47
+ current evidence establishes that domain and the selected bounded concepts.
48
+ Cross-domain relations wait until both stable endpoints can join one valid
49
+ graph.
46
50
  - A duplicate candidate keeps all provenance but produces one YAML edit.
47
51
  - A transient or implementation-local observation is discarded with a concise
48
52
  evidence-backed reason and produces no map change.
49
53
 
50
54
  ## Keep One Review Surface
51
55
 
52
- Edit one owning `docs/business-map/*.yaml` file for the selected domain. Validate
53
- the complete graph because relation endpoints and containment remain
54
- repository-wide even when the Git diff is local. Render the changed graph and
55
- inspect the selected neighborhood. The final Git diff is the independent
56
- review surface; retained observation artifacts stay unchanged.
56
+ Edit or create one owning `docs/business-map/*.yaml` file for the selected
57
+ domain. An initial map contains only the stable domain and bounded accepted
58
+ meaning supported by current evidence. Validate the complete graph because
59
+ relation endpoints and containment remain repository-wide even when the Git
60
+ diff is local. Render the changed graph and inspect the selected neighborhood.
61
+ The final Git diff is the independent review surface; retained observation
62
+ artifacts stay unchanged.
package/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Semantic Atlas
2
2
 
3
3
  [![CI](https://github.com/lzj960515/semantic-atlas/actions/workflows/ci.yml/badge.svg)](https://github.com/lzj960515/semantic-atlas/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/semantic-atlas.svg)](https://www.npmjs.com/package/semantic-atlas)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
+
7
+ English | [简体中文](README.zh-CN.md)
4
8
 
5
9
  Semantic Atlas gives coding agents a compact map of the business before they
6
10
  change the code. A repository describes stable domains, capabilities,
@@ -11,6 +15,9 @@ renders the same graph for people.
11
15
  The map is deliberately advisory. It helps an agent enter through the right
12
16
  business boundary; current source, tests, tracked product documents, and
13
17
  required runtime evidence still decide what the system does now.
18
+ The installed Skill activates from business-changing task meaning, so a
19
+ repository without a map still receives the same bounded business-understanding
20
+ workflow and can retain a well-supported maintenance candidate.
14
21
 
15
22
  ## Install
16
23
 
@@ -78,24 +85,47 @@ anchors, validation rules, and lookup behavior.
78
85
  semantic-atlas validate --repo /path/to/repository
79
86
  semantic-atlas context "Checkout" --repo /path/to/repository
80
87
  semantic-atlas render --repo /path/to/repository --output ./business-map.html
88
+ semantic-atlas web --repo /path/to/repository
81
89
  ```
82
90
 
83
91
  `validate` checks every map document as one graph. `context` returns the
84
92
  selected concept, containment, direct incoming and outgoing relationships,
85
93
  related concepts, and source-navigation anchors in a versioned JSON envelope.
86
- `render` produces deterministic static HTML from that same normalized graph.
94
+ `render` produces a deterministic, self-contained interactive HTML Viewer from
95
+ that same normalized graph. Its compact toolbar can switch between the complete
96
+ repository graph and each top-level business domain. Drag to pan, use the mouse
97
+ wheel or controls to zoom, and use `Fit` to restore the complete selected view.
98
+ Cards keep business type, title, and description visible without exposing code
99
+ paths in the graph. Click a card, or focus it and press `Enter`, to inspect its
100
+ navigation anchors in a desktop side panel or narrow-screen bottom panel.
101
+
102
+ `web` starts the same Viewer on a read-only `127.0.0.1` server and opens the
103
+ default browser. Pass several explicitly allowed repositories after one
104
+ `--repo` option to enable project switching:
105
+
106
+ ```bash
107
+ semantic-atlas web --repo /path/to/api /path/to/frontend --port 4310 --no-open
108
+ ```
109
+
110
+ The browser cannot provide arbitrary repository paths. Refreshing the page
111
+ reloads the tracked YAML from the repositories supplied when the command
112
+ started. Repositories with the same directory name receive deterministic
113
+ numbered labels without exposing their parent paths. `Ctrl+C` stops the server.
87
114
 
88
115
  ## Evidence Order
89
116
 
90
117
  For a business-changing engineering task:
91
118
 
92
- 1. Query the smallest useful map neighborhood.
93
- 2. Treat concepts, relations, summaries, and anchors as investigation leads.
119
+ 1. Probe the smallest useful map neighborhood whether or not map files exist.
120
+ 2. Use returned map knowledge as investigation leads, or build the smallest
121
+ source-supported business model after `MAP_NOT_FOUND`.
94
122
  3. Confirm every change-controlling claim in current source and tests.
95
123
  4. Use tracked product documents for durable intent and runtime evidence for
96
124
  state-dependent behavior.
97
125
  5. Let current evidence override missing, stale, or contradicted map knowledge.
98
126
  6. Implement and verify through the repository's normal engineering workflow.
127
+ 7. Record the task outcome and decide whether shared business knowledge needs a
128
+ separate maintenance change; a no-change decision is a complete result.
99
129
 
100
130
  The final engineering conclusion is expected to be more accurate than the map
101
131
  that helped locate it.
@@ -104,18 +134,18 @@ that helped locate it.
104
134
 
105
135
  `semantic-atlas setup` installs two package-owned Skills:
106
136
 
107
- - `semantic-atlas` guides business-changing work from a bounded context query
108
- into current-source confirmation.
137
+ - `semantic-atlas` gives every business-changing task a bounded,
138
+ current-evidence understanding workflow, with or without an existing map.
109
139
  - `semantic-atlas-maintenance` reviews retained candidates for one business
110
- domain and prepares a normal reviewed YAML change.
140
+ domain and prepares a normal reviewed YAML update or initial domain map.
111
141
 
112
142
  Target repositories do not copy these Skills. They share only their business
113
143
  maps through Git.
114
144
 
115
145
  ## Accuracy Observations
116
146
 
117
- Normal engineering work can retain task evidence and independent review
118
- evidence without changing the business map:
147
+ Every business-changing task records task evidence without changing the
148
+ business map. An independent review records its separate review evidence:
119
149
 
120
150
  ```bash
121
151
  semantic-atlas observe task --stdin --repo /path/to/repository
@@ -123,11 +153,13 @@ semantic-atlas observe review --stdin --repo /path/to/repository
123
153
  semantic-atlas insights summary --repo /path/to/repository --period 4w
124
154
  ```
125
155
 
126
- A task observation records queries, current-evidence classifications, candidate
127
- map corrections, and explicit human corrections. It never grades its own
128
- accuracy. An independent review observation owns correctness, impact,
129
- required-rework, and map-regression judgments. IDs are immutable: an exact
130
- replay is idempotent and changed content conflicts.
156
+ A task observation records queries including `map_not_found`, current-evidence
157
+ classifications, candidate map corrections, and explicit human corrections. An
158
+ empty candidate list is valid when knowledge is already represented,
159
+ implementation-local, or unresolved. The task never grades its own accuracy.
160
+ An independent review observation owns correctness, impact, required-rework,
161
+ and map-regression judgments. IDs are immutable: an exact replay is idempotent
162
+ and changed content conflicts.
131
163
 
132
164
  See [accuracy observations](docs/observations.md) for the schemas and evidence
133
165
  semantics.
@@ -142,7 +174,11 @@ The command groups retained candidates by explicit business-domain ownership
142
174
  while preserving each origin, evidence disposition, and linked independent
143
175
  review. It is read-only. The maintenance Skill then confirms one domain against
144
176
  current evidence and submits any accepted map correction through an ordinary
145
- Git diff and independent review.
177
+ Git diff and independent review. When no map exists, a supported candidate can
178
+ seed one bounded business-domain YAML instead of a repository-wide taxonomy.
179
+ Post-integration maintenance is the normal freshness path; periodic
180
+ reconciliation recovers missed observations, accumulated drift, and changes
181
+ outside the normal engineering workflow.
146
182
 
147
183
  ## Local Data And Privacy
148
184
 
@@ -157,7 +193,8 @@ Observation files contain neither repository paths nor remote URLs. Semantic
157
193
  Atlas has no remote observation service, account, telemetry upload, persistent
158
194
  graph database, or automatic source/map mutation. `setup` and observation
159
195
  commands do not add files to a target repository; `render` writes only the
160
- explicitly requested local output.
196
+ explicitly requested local output. `web` binds only to loopback, exposes GET
197
+ and HEAD, and reads only the repositories explicitly selected at startup.
161
198
 
162
199
  ## Development
163
200