semantic-atlas 2.1.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.
- package/.agents/skills/semantic-atlas/SKILL.md +133 -73
- package/.agents/skills/semantic-atlas/agents/openai.yaml +2 -2
- package/.agents/skills/semantic-atlas-maintenance/SKILL.md +35 -12
- package/.agents/skills/semantic-atlas-maintenance/agents/openai.yaml +1 -1
- package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +11 -5
- package/README.md +29 -13
- package/README.zh-CN.md +204 -0
- package/docs/architecture.md +38 -25
- package/docs/evaluation.md +24 -12
- package/docs/index.md +3 -2
- package/docs/map-format.md +6 -4
- package/docs/observations.md +25 -15
- package/docs/product-contract.md +61 -45
- package/package.json +3 -2
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: semantic-atlas
|
|
3
|
-
description:
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
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
|
|
52
|
-
|
|
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.
|
|
55
|
-
behavior is needed to choose
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
##
|
|
94
|
+
## Confirm The Current-Evidence Model
|
|
71
95
|
|
|
72
|
-
For every
|
|
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
|
|
81
|
-
Let confirmed current evidence control the
|
|
82
|
-
|
|
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,
|
|
98
|
-
evidence,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
##
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
##
|
|
181
|
+
## Hand Off Canonical Maintenance
|
|
125
182
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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: "
|
|
4
|
-
default_prompt: "Use $semantic-atlas to
|
|
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
|
|
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.
|
|
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.
|
|
63
|
-
|
|
64
|
-
|
|
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.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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,
|
|
93
|
-
the proposed map change from
|
|
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
|
|
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
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
[](https://github.com/lzj960515/semantic-atlas/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/semantic-atlas)
|
|
5
|
+
[](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
|
|
|
@@ -109,13 +116,16 @@ numbered labels without exposing their parent paths. `Ctrl+C` stops the server.
|
|
|
109
116
|
|
|
110
117
|
For a business-changing engineering task:
|
|
111
118
|
|
|
112
|
-
1.
|
|
113
|
-
2.
|
|
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`.
|
|
114
122
|
3. Confirm every change-controlling claim in current source and tests.
|
|
115
123
|
4. Use tracked product documents for durable intent and runtime evidence for
|
|
116
124
|
state-dependent behavior.
|
|
117
125
|
5. Let current evidence override missing, stale, or contradicted map knowledge.
|
|
118
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.
|
|
119
129
|
|
|
120
130
|
The final engineering conclusion is expected to be more accurate than the map
|
|
121
131
|
that helped locate it.
|
|
@@ -124,18 +134,18 @@ that helped locate it.
|
|
|
124
134
|
|
|
125
135
|
`semantic-atlas setup` installs two package-owned Skills:
|
|
126
136
|
|
|
127
|
-
- `semantic-atlas`
|
|
128
|
-
|
|
137
|
+
- `semantic-atlas` gives every business-changing task a bounded,
|
|
138
|
+
current-evidence understanding workflow, with or without an existing map.
|
|
129
139
|
- `semantic-atlas-maintenance` reviews retained candidates for one business
|
|
130
|
-
domain and prepares a normal reviewed YAML
|
|
140
|
+
domain and prepares a normal reviewed YAML update or initial domain map.
|
|
131
141
|
|
|
132
142
|
Target repositories do not copy these Skills. They share only their business
|
|
133
143
|
maps through Git.
|
|
134
144
|
|
|
135
145
|
## Accuracy Observations
|
|
136
146
|
|
|
137
|
-
|
|
138
|
-
|
|
147
|
+
Every business-changing task records task evidence without changing the
|
|
148
|
+
business map. An independent review records its separate review evidence:
|
|
139
149
|
|
|
140
150
|
```bash
|
|
141
151
|
semantic-atlas observe task --stdin --repo /path/to/repository
|
|
@@ -143,11 +153,13 @@ semantic-atlas observe review --stdin --repo /path/to/repository
|
|
|
143
153
|
semantic-atlas insights summary --repo /path/to/repository --period 4w
|
|
144
154
|
```
|
|
145
155
|
|
|
146
|
-
A task observation records queries
|
|
147
|
-
map corrections, and explicit human corrections.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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.
|
|
151
163
|
|
|
152
164
|
See [accuracy observations](docs/observations.md) for the schemas and evidence
|
|
153
165
|
semantics.
|
|
@@ -162,7 +174,11 @@ The command groups retained candidates by explicit business-domain ownership
|
|
|
162
174
|
while preserving each origin, evidence disposition, and linked independent
|
|
163
175
|
review. It is read-only. The maintenance Skill then confirms one domain against
|
|
164
176
|
current evidence and submits any accepted map correction through an ordinary
|
|
165
|
-
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.
|
|
166
182
|
|
|
167
183
|
## Local Data And Privacy
|
|
168
184
|
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Semantic Atlas
|
|
2
|
+
|
|
3
|
+
[](https://github.com/lzj960515/semantic-atlas/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/semantic-atlas)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
[English](README.md) | 简体中文
|
|
8
|
+
|
|
9
|
+
Semantic Atlas 在编码 Agent 修改代码之前,为它提供一份紧凑的业务地图。
|
|
10
|
+
仓库使用纳入 Git 管理的 YAML 描述稳定的业务域、能力、操作、数据、规则、
|
|
11
|
+
接口及其关系。CLI 负责验证地图、返回适合当前调查的小范围业务邻域,并把
|
|
12
|
+
同一张图渲染给人查看。
|
|
13
|
+
|
|
14
|
+
地图只提供调查线索,不直接代表当前实现。它帮助 Agent 从正确的业务边界
|
|
15
|
+
进入问题;当前源码、测试、纳入版本管理的产品文档,以及必要的运行时证据,
|
|
16
|
+
仍然决定系统现在实际怎样工作。
|
|
17
|
+
受管 Skill 根据业务任务本身决定是否进入理解流程。因此,即使仓库还没有地图,
|
|
18
|
+
Agent 也会建立有边界的当前业务模型,并在证据足够时保留后续维护候选。
|
|
19
|
+
|
|
20
|
+
## 安装
|
|
21
|
+
|
|
22
|
+
Semantic Atlas 需要 Node.js 24。
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install --global semantic-atlas
|
|
26
|
+
semantic-atlas setup
|
|
27
|
+
semantic-atlas --version
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`setup` 会把与当前包完全匹配的工程 Skill 和维护 Skill 安装到
|
|
31
|
+
`~/.agents/skills/`。重复执行时,它会验证已安装内容、修复被修改的受管副本,
|
|
32
|
+
并升级由其他当前版本安装的 Skill。对于无关或格式已经废弃的同名目录,它会
|
|
33
|
+
拒绝覆盖。
|
|
34
|
+
|
|
35
|
+
## 升级
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
semantic-atlas upgrade
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`upgrade` 先解析 npm 当前稳定版本,再安装这个精确版本,验证已安装 CLI 的
|
|
42
|
+
身份,然后让新 CLI 同步两个受管 Skill。因此,可执行程序和 Skill 始终作为
|
|
43
|
+
同一个有版本的产品一起升级。
|
|
44
|
+
|
|
45
|
+
## 添加业务地图
|
|
46
|
+
|
|
47
|
+
目标仓库只需要维护自己纳入 Git 管理的地图文档:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
docs/business-map/*.yaml
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
先为每个稳定业务域建立一个文件:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
schemaVersion: 1
|
|
57
|
+
map:
|
|
58
|
+
id: commerce
|
|
59
|
+
title: Commerce
|
|
60
|
+
summary: Customer-facing product discovery and purchase.
|
|
61
|
+
|
|
62
|
+
nodes:
|
|
63
|
+
- id: commerce
|
|
64
|
+
kind: domain
|
|
65
|
+
name: Commerce
|
|
66
|
+
summary: Customer-facing product discovery and purchase.
|
|
67
|
+
aliases: []
|
|
68
|
+
anchors:
|
|
69
|
+
- kind: directory
|
|
70
|
+
value: src/commerce
|
|
71
|
+
description: Likely source entry point for Commerce behavior.
|
|
72
|
+
|
|
73
|
+
relations: []
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
[地图格式](docs/map-format.md)定义了支持的业务概念、关系、导航锚点、验证规则
|
|
77
|
+
和查找行为。
|
|
78
|
+
|
|
79
|
+
## 查询与渲染
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
semantic-atlas validate --repo /path/to/repository
|
|
83
|
+
semantic-atlas context "Checkout" --repo /path/to/repository
|
|
84
|
+
semantic-atlas render --repo /path/to/repository --output ./business-map.html
|
|
85
|
+
semantic-atlas web --repo /path/to/repository
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`validate` 把所有地图文档作为一张完整图进行检查。`context` 使用带版本的 JSON
|
|
89
|
+
结果返回选中的概念、所属层级、直接输入和输出关系、相关概念及源码导航锚点。
|
|
90
|
+
`render` 从同一个标准化图生成确定性的单文件交互 Viewer。顶部工具栏可以在
|
|
91
|
+
完整项目图和顶层业务域之间切换;拖动可以平移,鼠标滚轮和按钮可以缩放,
|
|
92
|
+
`Fit` 会恢复当前完整视图。卡片默认只显示业务类型、标题和描述,不会让代码
|
|
93
|
+
路径挤占地图空间。点击卡片,或聚焦后按 `Enter`,会在桌面右侧面板或窄屏底部
|
|
94
|
+
面板中显示导航锚点。
|
|
95
|
+
|
|
96
|
+
`web` 会在只读的 `127.0.0.1` 服务上启动同一个 Viewer,并打开默认浏览器。
|
|
97
|
+
一个 `--repo` 参数可以接收多个启动时明确允许的仓库,从而启用项目切换:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
semantic-atlas web --repo /path/to/api /path/to/frontend --port 4310 --no-open
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
浏览器不能提交任意仓库路径。刷新页面会重新读取命令启动时指定仓库中的 YAML。
|
|
104
|
+
目录名相同的仓库会获得稳定的编号标签,同时不会暴露父目录。按 `Ctrl+C` 停止
|
|
105
|
+
服务。
|
|
106
|
+
|
|
107
|
+
## 证据顺序
|
|
108
|
+
|
|
109
|
+
对于可能改变业务行为的工程任务:
|
|
110
|
+
|
|
111
|
+
1. 无论仓库是否已有地图,都先探测能够支持当前任务的最小业务邻域。
|
|
112
|
+
2. 有地图时把返回的业务知识当作调查线索;遇到 `MAP_NOT_FOUND` 时,建立能够
|
|
113
|
+
支持当前任务的最小源码证据模型。
|
|
114
|
+
3. 在当前源码和测试中确认每一条会决定改动范围的结论。
|
|
115
|
+
4. 使用纳入版本管理的产品文档确认稳定意图,使用运行时证据确认依赖环境状态的行为。
|
|
116
|
+
5. 当地图缺失、过期或与当前证据冲突时,以当前证据为准。
|
|
117
|
+
6. 按目标仓库原有的工程流程实现和验证改动。
|
|
118
|
+
7. 记录任务结果,并判断共享业务知识是否需要单独维护;确认无需修改也是完整结果。
|
|
119
|
+
|
|
120
|
+
最终工程结论应当比帮助定位问题的地图更准确。
|
|
121
|
+
|
|
122
|
+
## Agent Skills
|
|
123
|
+
|
|
124
|
+
`semantic-atlas setup` 会安装两个由 npm 包管理的 Skill:
|
|
125
|
+
|
|
126
|
+
- `semantic-atlas` 让每个业务改动任务进入有边界的当前证据理解流程,不要求仓库
|
|
127
|
+
事先存在业务地图。
|
|
128
|
+
- `semantic-atlas-maintenance` 按一个业务域审查保留的候选,并准备普通的、需要
|
|
129
|
+
审查的 YAML 更新或第一份业务域地图。
|
|
130
|
+
|
|
131
|
+
目标仓库不会复制这些 Skill;通过 Git 共享的只有仓库自己的业务地图。
|
|
132
|
+
|
|
133
|
+
## 准确性观测
|
|
134
|
+
|
|
135
|
+
每个业务改动任务都会保存自己的调查证据,而不直接修改业务地图。独立审查会另外
|
|
136
|
+
保存审查证据:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
semantic-atlas observe task --stdin --repo /path/to/repository
|
|
140
|
+
semantic-atlas observe review --stdin --repo /path/to/repository
|
|
141
|
+
semantic-atlas insights summary --repo /path/to/repository --period 4w
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
任务观测记录包括 `map_not_found` 在内的查询结果、当前证据分类、地图修正候选
|
|
145
|
+
和明确的人类纠正。业务知识已经覆盖、改动只涉及实现细节或稳定含义尚不明确时,
|
|
146
|
+
候选列表可以为空。任务不会给自己的准确性打分;独立审查观测负责记录正确性、
|
|
147
|
+
影响完整性、是否需要返工,以及地图是否导致了错误结论。观测 ID 不可变:完全
|
|
148
|
+
相同的重放是幂等的,内容发生变化则会报告冲突。
|
|
149
|
+
|
|
150
|
+
具体 schema 和证据语义见[准确性观测](docs/observations.md)。
|
|
151
|
+
|
|
152
|
+
## 地图校准
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
semantic-atlas reconcile candidates --repo /path/to/repository
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
该命令按明确的业务域归属对保留候选进行分组,同时保留每个来源、证据判断和
|
|
159
|
+
关联的独立审查。命令本身只读。随后,维护 Skill 会选择一个业务域,使用当前
|
|
160
|
+
证据重新确认候选,并把被接受的地图修正作为普通 Git 差异提交独立审查。如果
|
|
161
|
+
仓库还没有地图,有充分证据的候选可以建立第一份有边界的业务域 YAML,而不是
|
|
162
|
+
一次推断整个仓库。代码合入后的维护是正常的保鲜路径;定期校准负责补回遗漏
|
|
163
|
+
观测、累计漂移和常规流程以外的变更。
|
|
164
|
+
|
|
165
|
+
## 本地数据与隐私
|
|
166
|
+
|
|
167
|
+
业务地图保存在目标仓库中。准确性观测以不可变 JSON 文件保存在经过哈希处理的
|
|
168
|
+
本地仓库分区:
|
|
169
|
+
|
|
170
|
+
```text
|
|
171
|
+
~/.semantic-atlas/observations/v1/repositories/<repository-id>/
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
观测文件既不包含仓库路径,也不包含远端 URL。Semantic Atlas 没有远程观测
|
|
175
|
+
服务、账号系统、遥测上传、持久化图数据库或自动修改源码和地图的行为。`setup`
|
|
176
|
+
和观测命令不会向目标仓库添加文件;`render` 只写入调用者明确指定的本地输出;
|
|
177
|
+
`web` 只绑定 loopback,只接受 GET 和 HEAD,并且只读取启动时明确指定的仓库。
|
|
178
|
+
|
|
179
|
+
## 开发
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
pnpm install --frozen-lockfile
|
|
183
|
+
pnpm release:verify
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
候选版本验收会运行契约和源码测试、类型检查、构建、渲染检查、打包隐私检查、
|
|
187
|
+
匿名安装后的完整产品流程、package dry-run 和 Git 差异检查。
|
|
188
|
+
|
|
189
|
+
发布是独立操作。仓库启用不可变 Release 后,带 annotated version tag 的正式
|
|
190
|
+
GitHub Release 会触发受保护的 npm 工作流。工作流先在只读任务中确认这个精确
|
|
191
|
+
Release 不可变,然后才允许检出 tag、进入 npm 凭证边界、重新运行候选验收,
|
|
192
|
+
并通过 npm provenance 发布。
|
|
193
|
+
|
|
194
|
+
## 文档
|
|
195
|
+
|
|
196
|
+
- [产品契约](docs/product-contract.md)
|
|
197
|
+
- [架构](docs/architecture.md)
|
|
198
|
+
- [地图格式](docs/map-format.md)
|
|
199
|
+
- [准确性观测](docs/observations.md)
|
|
200
|
+
- [评估方法](docs/evaluation.md)
|
|
201
|
+
|
|
202
|
+
## 许可证
|
|
203
|
+
|
|
204
|
+
[MIT](LICENSE)
|
package/docs/architecture.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
This page defines the stable responsibilities, data lifecycle, dependency
|
|
4
4
|
direction, and failure semantics for the initial product. It applies to the
|
|
5
|
-
public CLI, renderer, and
|
|
5
|
+
public CLI, renderer, and business-understanding Agent Skill.
|
|
6
6
|
|
|
7
|
-
**Status: query, validation, visual projection,
|
|
7
|
+
**Status: query, validation, visual projection, Agent Skills, managed
|
|
8
8
|
Skill lifecycle, accuracy observations, read-only reconciliation, and public
|
|
9
9
|
release verification are implemented and released.**
|
|
10
10
|
|
|
@@ -25,9 +25,11 @@ MapDocumentLoader -> MapValidator -> BusinessGraph
|
|
|
25
25
|
stable JSON result SVG / static HTML
|
|
26
26
|
|
|
27
27
|
Calling Agent
|
|
28
|
-
->
|
|
29
|
-
->
|
|
28
|
+
-> activates from business task meaning
|
|
29
|
+
-> probes the graph, including the map-not-found outcome
|
|
30
|
+
-> treats available map results as investigation hypotheses
|
|
30
31
|
-> confirms decisive behavior in current repository evidence
|
|
32
|
+
-> records one maintenance disposition
|
|
31
33
|
|
|
32
34
|
published package Skills bundle
|
|
33
35
|
|
|
|
@@ -139,13 +141,14 @@ Owns argument parsing, exit status, machine-readable envelopes, and concise
|
|
|
139
141
|
human presentation. It composes application services and performs no graph
|
|
140
142
|
interpretation of its own.
|
|
141
143
|
|
|
142
|
-
###
|
|
144
|
+
### Business Understanding Agent Skill
|
|
143
145
|
|
|
144
|
-
Owns the
|
|
145
|
-
task
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
Owns the business-understanding workflow for every business-changing task. It
|
|
147
|
+
activates from task meaning, converts a natural-language task into one bounded
|
|
148
|
+
map probe, interprets advisory results or `MAP_NOT_FOUND`, builds the smallest
|
|
149
|
+
current-evidence business model needed for the decision, and continues through
|
|
150
|
+
the repository's normal implementation and verification process. Source editing
|
|
151
|
+
and engineering judgment remain with the calling Agent.
|
|
149
152
|
|
|
150
153
|
The Skill invokes `context` through a small contract-checking adapter. The
|
|
151
154
|
adapter prefers the CLI distributed with the Skill and accepts a PATH command
|
|
@@ -154,13 +157,16 @@ contract when another installed product uses the same executable name.
|
|
|
154
157
|
|
|
155
158
|
### Maintenance Agent Skill
|
|
156
159
|
|
|
157
|
-
Owns periodic candidate triage after
|
|
158
|
-
read-only report. It selects one
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
map
|
|
163
|
-
|
|
160
|
+
Owns post-integration and periodic candidate triage after
|
|
161
|
+
`ReconciliationService` has produced one read-only report. It selects one
|
|
162
|
+
business domain, confirms proposed corrections against current source and
|
|
163
|
+
tracked product meaning, resolves an existing or initial domain-owned YAML
|
|
164
|
+
surface, leaves unresolved and implementation-local observations outside the
|
|
165
|
+
canonical map, and submits any accepted correction as one normal reviewed YAML
|
|
166
|
+
change. A `MAP_NOT_FOUND` repository can bootstrap one bounded domain when
|
|
167
|
+
current evidence establishes its stable identity. Source confirmation, map
|
|
168
|
+
editing, validation, rendering, Git diff, and independent review remain Agent
|
|
169
|
+
and repository responsibilities rather than CLI side effects.
|
|
164
170
|
|
|
165
171
|
### ManagedSkillsInstaller
|
|
166
172
|
|
|
@@ -279,7 +285,7 @@ rather than local build effects.
|
|
|
279
285
|
| Public release identity | Annotated tag and immutable GitHub Release | Permanent remote history | Explicit release command after repository cutover and immutable-release enablement |
|
|
280
286
|
| Published npm package | Protected npm environment | Immutable registry version | GitHub Release workflow with provenance |
|
|
281
287
|
| Task-specific source understanding | Calling agent | Engineering task | Current evidence investigation |
|
|
282
|
-
| Candidate map observation |
|
|
288
|
+
| Candidate map observation | Business-changing task record | Until reconciled | Reviewed by post-integration or periodic maintenance |
|
|
283
289
|
|
|
284
290
|
Map commands remain stateless and branches naturally see the map revision
|
|
285
291
|
tracked with their own source. Observation writers coordinate only one
|
|
@@ -333,7 +339,8 @@ discriminant.
|
|
|
333
339
|
|
|
334
340
|
`context` returns ambiguity when multiple concepts match the term. Callers can
|
|
335
341
|
then use a stable ID. A missing concept is a bounded map result and routes the
|
|
336
|
-
|
|
342
|
+
Agent to a bounded current-evidence business model; it is not a repository
|
|
343
|
+
failure.
|
|
337
344
|
|
|
338
345
|
`setup`, `upgrade`, and `--version` do not discover a repository or load a
|
|
339
346
|
business map. Their results expose the package version and managed Skill paths
|
|
@@ -373,7 +380,8 @@ Errors fall into stable categories:
|
|
|
373
380
|
- `MAP_DOCUMENT_INVALID`: one or more tracked documents cannot form a valid
|
|
374
381
|
graph; the result includes document-local issues.
|
|
375
382
|
- `MAP_NOT_FOUND`: the selected repository has no configured map documents;
|
|
376
|
-
|
|
383
|
+
the understanding Skill builds the smallest source-supported business model
|
|
384
|
+
needed for the task and records the bounded outcome.
|
|
377
385
|
- `CONCEPT_NOT_FOUND`: no concept matches the requested selector; agents use
|
|
378
386
|
bounded source discovery.
|
|
379
387
|
- `CONCEPT_AMBIGUOUS`: multiple concepts match; the result returns stable IDs
|
|
@@ -418,12 +426,17 @@ Ordinary feature branches read their branch's map revision. Durable changes use
|
|
|
418
426
|
normal Git merge behavior. Review focuses on business meaning, stable IDs,
|
|
419
427
|
relationship direction, and whether the update belongs in the shared map.
|
|
420
428
|
|
|
421
|
-
|
|
422
|
-
|
|
429
|
+
Every business-changing task writes its own immutable observation and maintenance
|
|
430
|
+
disposition. Candidate-producing results can enter post-integration maintenance
|
|
431
|
+
as soon as stable reviewed source is available. Periodic reconciliation uses the
|
|
432
|
+
same deterministic report to recover accumulated drift and missed work. Each run
|
|
423
433
|
updates one owning YAML surface for one business domain rather than rewriting
|
|
424
|
-
the complete map. A
|
|
425
|
-
|
|
426
|
-
|
|
434
|
+
the complete map. A no-candidate or no-change run is a valid outcome and does not
|
|
435
|
+
affect an engineering task already completed against current evidence.
|
|
436
|
+
|
|
437
|
+
The understanding and maintenance Skills operate independently of task
|
|
438
|
+
orchestrators. Orchestrators may schedule work but do not decide when an Agent
|
|
439
|
+
needs business understanding.
|
|
427
440
|
|
|
428
441
|
## Current Technology Boundary
|
|
429
442
|
|
package/docs/evaluation.md
CHANGED
|
@@ -11,11 +11,15 @@ real-project evaluation pass.**
|
|
|
11
11
|
|
|
12
12
|
The primary question is:
|
|
13
13
|
|
|
14
|
-
> Does
|
|
15
|
-
> source-supported engineering conclusion
|
|
16
|
-
>
|
|
14
|
+
> Does the business-understanding Skill lead an agent to a correct,
|
|
15
|
+
> source-supported engineering conclusion and maintenance decision without
|
|
16
|
+
> routine human direction, including when the map is absent, stale, or
|
|
17
17
|
> incomplete?
|
|
18
18
|
|
|
19
|
+
A paired map comparison remains useful for measuring whether existing shared
|
|
20
|
+
knowledge improves accuracy over ordinary discovery. It is one evaluation mode,
|
|
21
|
+
not the Skill's activation boundary.
|
|
22
|
+
|
|
19
23
|
The evaluation observes investigation cost, but cost does not substitute for
|
|
20
24
|
correctness.
|
|
21
25
|
|
|
@@ -72,7 +76,8 @@ The first real-project suite contains at least:
|
|
|
72
76
|
2. A cross-capability feature involving one shared data concept.
|
|
73
77
|
3. An API, event, queue, or webhook boundary with a downstream consumer.
|
|
74
78
|
4. A durable invariant that constrains more than one implementation point.
|
|
75
|
-
5. A missing-map case where the
|
|
79
|
+
5. A missing-map case where the Skill still activates and builds a bounded,
|
|
80
|
+
source-supported business model.
|
|
76
81
|
6. A stale-anchor case where the business meaning remains useful but the source
|
|
77
82
|
location changed.
|
|
78
83
|
7. A contradicted-relation case where current evidence must override the map.
|
|
@@ -93,11 +98,13 @@ current source contradicts.
|
|
|
93
98
|
|
|
94
99
|
Automated checks prove that each initial selector produces the intended public
|
|
95
100
|
CLI outcome and that every acceptance oracle points to present source, test, or
|
|
96
|
-
tracked product evidence. Fresh Agent runs then judge
|
|
97
|
-
the Agent must
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
tracked product evidence. Fresh Agent runs then judge both mapped and mapless
|
|
102
|
+
workflow behavior: the Agent must activate from business task meaning, use the
|
|
103
|
+
bounded map outcome, reach the current-evidence conclusion, and report one
|
|
104
|
+
maintenance disposition separately. Mechanical controls must end without
|
|
105
|
+
manufactured business knowledge. These fixtures protect the Skill contract;
|
|
106
|
+
they do not replace the private real-project paired evaluation defined in this
|
|
107
|
+
page.
|
|
101
108
|
|
|
102
109
|
## Paired Execution
|
|
103
110
|
|
|
@@ -105,7 +112,7 @@ When practical, run each case in two fresh contexts with the same model,
|
|
|
105
112
|
repository revision, task wording, tool availability, and acceptance oracle:
|
|
106
113
|
|
|
107
114
|
- `ordinary`: normal repository discovery without the map or its Skill;
|
|
108
|
-
- `map-assisted`:
|
|
115
|
+
- `map-assisted`: the package-managed Skill with the tracked advisory map.
|
|
109
116
|
|
|
110
117
|
The task oracle remains unavailable to both task agents. An independent review
|
|
111
118
|
compares their source-supported conclusions and implementation candidates.
|
|
@@ -122,7 +129,7 @@ The suite deliberately mutates map usefulness:
|
|
|
122
129
|
- omit one required collaborator;
|
|
123
130
|
- retain one relation that current source contradicts;
|
|
124
131
|
- use a task term absent from node names but present in an alias or neighbor;
|
|
125
|
-
- remove the complete map for one
|
|
132
|
+
- remove the complete map for one Skill-enabled mapless case.
|
|
126
133
|
|
|
127
134
|
A passing agent notices the limitation, opens current evidence, corrects its
|
|
128
135
|
task-specific model, and avoids presenting the stale statement as current fact.
|
|
@@ -140,6 +147,7 @@ Each run records:
|
|
|
140
147
|
- required and unrelated impact surfaces;
|
|
141
148
|
- implementation or proposed change;
|
|
142
149
|
- verification performed;
|
|
150
|
+
- post-task maintenance disposition and any durable candidate;
|
|
143
151
|
- independent review findings;
|
|
144
152
|
- human decisions or corrections;
|
|
145
153
|
- optional observations for tokens, opened files, elapsed time, compute cost,
|
|
@@ -152,6 +160,10 @@ The initial product passes when:
|
|
|
152
160
|
- every map-assisted case reaches a correct source-supported conclusion;
|
|
153
161
|
- stale, missing, and contradicted knowledge routes to current evidence without
|
|
154
162
|
an unsupported final claim;
|
|
163
|
+
- a mapless business task still activates the Skill, records `map_not_found`,
|
|
164
|
+
and limits bootstrap knowledge to stable meaning supported by the task;
|
|
165
|
+
- mapped and mapless business tasks choose one maintenance disposition, while a
|
|
166
|
+
mechanical control produces no business-maintenance work;
|
|
155
167
|
- required business boundaries and impact surfaces are identified in every
|
|
156
168
|
case;
|
|
157
169
|
- implementation cases pass their behavioral tests and independent code-quality
|
|
@@ -179,7 +191,7 @@ repository changes entered this repository.
|
|
|
179
191
|
The measured suite used four paired cases and eight fresh task-agent contexts.
|
|
180
192
|
Cases combined related concerns while covering all eight required types. Every
|
|
181
193
|
pair used the same model, source revision, task wording, shell tools, and output
|
|
182
|
-
contract; only the ordinary or
|
|
194
|
+
contract; only the ordinary or package-managed map workflow differed.
|
|
183
195
|
|
|
184
196
|
The de-identified acceptance results are:
|
|
185
197
|
|
package/docs/index.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Semantic Atlas Documentation
|
|
2
2
|
|
|
3
3
|
This index routes product, implementation, and evaluation questions to their
|
|
4
|
-
authoritative pages. The queryable map, renderer,
|
|
5
|
-
managed setup, observations, reconciliation, and
|
|
4
|
+
authoritative pages. The queryable map, renderer, package-managed understanding
|
|
5
|
+
and maintenance Agent Skills, managed setup, observations, reconciliation, and
|
|
6
|
+
public release are implemented.
|
|
6
7
|
Target-repository sharing and longitudinal real-use acceptance remain separate
|
|
7
8
|
verified gates.
|
|
8
9
|
|
package/docs/map-format.md
CHANGED
|
@@ -192,7 +192,7 @@ A selector resolves in this order:
|
|
|
192
192
|
|
|
193
193
|
One match returns a context projection. Multiple matches return ambiguity with
|
|
194
194
|
stable IDs and names. Zero matches returns `CONCEPT_NOT_FOUND` and leaves
|
|
195
|
-
|
|
195
|
+
bounded current-evidence business discovery available.
|
|
196
196
|
|
|
197
197
|
The initial lookup is deterministic and vocabulary-based. Natural-language
|
|
198
198
|
inference belongs to the calling agent, which can issue another bounded term or
|
|
@@ -219,7 +219,9 @@ ID when it needs to expand the investigation.
|
|
|
219
219
|
Agents edit the owning YAML file directly and use `semantic-atlas validate`
|
|
220
220
|
before submitting a map change. Git diff is the review surface.
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
Business-changing engineering tasks record observations outside the canonical
|
|
223
|
+
map and create candidates only for stable meaning that needs maintenance.
|
|
224
|
+
Post-integration or periodic reconciliation confirms candidates in current
|
|
224
225
|
evidence, updates one bounded neighborhood, validates the complete graph, and
|
|
225
|
-
submits the normal repository change for review.
|
|
226
|
+
submits the normal repository change for review. A mapless repository can use
|
|
227
|
+
the same reviewed path to establish one evidence-supported initial domain.
|
package/docs/observations.md
CHANGED
|
@@ -10,16 +10,19 @@ contract.**
|
|
|
10
10
|
|
|
11
11
|
## Authority Boundary
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
Every business-changing engineering or analysis run produces one
|
|
14
|
+
`TaskObservation`, including runs in repositories with no map. It records what
|
|
15
|
+
the task Agent queried, which concepts it selected, how current evidence
|
|
16
|
+
classified map statements, which reconciliation candidates it found, and any
|
|
17
|
+
explicit human correction it received. Its strict schema has no review verdict
|
|
18
|
+
or accuracy fields.
|
|
19
|
+
|
|
20
|
+
An independent-review run produces one `ReviewObservation` that references an
|
|
21
|
+
existing task observation in the same repository partition. It records
|
|
22
|
+
business-boundary correctness, upstream-cause correctness, impact completeness,
|
|
23
|
+
required rework, and whether the map caused a wrong conclusion. Explicit human
|
|
24
|
+
corrections can be retained by either observation while remaining visibly
|
|
25
|
+
attributed as corrections.
|
|
23
26
|
|
|
24
27
|
An approved review expresses an accepted result: assessed dimensions are
|
|
25
28
|
correct or complete, `requiredRework` is `false`, and `mapCausedRegression` is
|
|
@@ -51,6 +54,11 @@ candidate names its stable `businessDomainId` and carries a candidate-specific
|
|
|
51
54
|
disposition are recorded explicitly because they cannot be inferred safely from
|
|
52
55
|
source paths or free-form summaries.
|
|
53
56
|
|
|
57
|
+
`mapUpdateCandidates` may be empty. The engineering result reports whether the
|
|
58
|
+
stable meaning was already represented, remained implementation-local, or could
|
|
59
|
+
not yet be resolved. A non-empty candidate list is reserved for a
|
|
60
|
+
source-supported durable correction owned by a stable business domain.
|
|
61
|
+
|
|
54
62
|
Source, test, and document evidence uses normalized repository-relative paths.
|
|
55
63
|
Runtime references use concise environment-independent evidence labels.
|
|
56
64
|
|
|
@@ -156,12 +164,14 @@ does not edit observations, source, `docs/business-map`, rendered artifacts, or
|
|
|
156
164
|
Git state. The bundled `semantic-atlas-maintenance` Skill selects one business
|
|
157
165
|
domain, rechecks current source and tracked product meaning, and submits any
|
|
158
166
|
accepted correction as a normal reviewed YAML change. Unresolved and
|
|
159
|
-
implementation-local observations remain outside the canonical map.
|
|
167
|
+
implementation-local observations remain outside the canonical map. When the
|
|
168
|
+
repository has no map, the maintenance Skill can turn a supported candidate
|
|
169
|
+
into one bounded initial business-domain YAML.
|
|
160
170
|
|
|
161
171
|
## Engineering Result Semantics
|
|
162
172
|
|
|
163
173
|
Observation recording is a secondary evidence action after the engineering
|
|
164
|
-
result is known. The Skill reports
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
accuracy record.
|
|
174
|
+
result is known. The Skill also reports the post-task maintenance disposition;
|
|
175
|
+
observation failure is reported separately and keeps the engineering result
|
|
176
|
+
unchanged. Independent review can then distinguish a valid engineering delivery
|
|
177
|
+
with missing observation evidence from a successful accuracy record.
|
package/docs/product-contract.md
CHANGED
|
@@ -10,9 +10,10 @@ pilot is in local use and longitudinal acceptance is in progress.**
|
|
|
10
10
|
## Purpose
|
|
11
11
|
|
|
12
12
|
Semantic Atlas helps coding agents make more accurate engineering changes.
|
|
13
|
-
|
|
14
|
-
relationships, data, rules, interfaces, and
|
|
15
|
-
an agent
|
|
13
|
+
Its Agent Skill builds a task-specific understanding of stable business
|
|
14
|
+
boundaries, meaningful concepts, relationships, data, rules, interfaces, and
|
|
15
|
+
likely source entry points before an agent changes code. An existing shared map
|
|
16
|
+
accelerates that work; a missing map starts a bounded current-evidence path.
|
|
16
17
|
|
|
17
18
|
The map is a durable navigation prior rather than a synchronized copy of the
|
|
18
19
|
codebase. Product structure normally changes more slowly than implementation,
|
|
@@ -23,7 +24,8 @@ evidence before changing behavior.
|
|
|
23
24
|
|
|
24
25
|
## Product Outcome
|
|
25
26
|
|
|
26
|
-
The product succeeds when
|
|
27
|
+
The product succeeds when agents using the business-understanding workflow more
|
|
28
|
+
reliably:
|
|
27
29
|
|
|
28
30
|
- enter a task through the correct business boundary;
|
|
29
31
|
- distinguish a downstream symptom from its upstream cause;
|
|
@@ -43,9 +45,9 @@ uses current evidence and is held to a higher accuracy standard than the map.
|
|
|
43
45
|
### Coding agent orientation
|
|
44
46
|
|
|
45
47
|
An agent receives a feature, bug, refactor, or impact question. It queries a
|
|
46
|
-
compact business neighborhood
|
|
47
|
-
|
|
48
|
-
editing.
|
|
48
|
+
compact business neighborhood even when no map documents exist. It follows map
|
|
49
|
+
leads when available, otherwise establishes the smallest source-supported
|
|
50
|
+
business boundary, then opens decisive current evidence before editing.
|
|
49
51
|
|
|
50
52
|
### Root-cause and impact discovery
|
|
51
53
|
|
|
@@ -64,12 +66,16 @@ business meaning by showing type, title, and description; selecting a card
|
|
|
64
66
|
reveals its navigation anchors in a side panel or narrow-screen bottom panel.
|
|
65
67
|
The visual surface does not become a second authoring format.
|
|
66
68
|
|
|
67
|
-
###
|
|
69
|
+
### Post-task maintenance decision and reconciliation
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
Every business-changing task records its map outcome and decides whether stable
|
|
72
|
+
shared knowledge needs maintenance. The decision may be a durable candidate,
|
|
73
|
+
already represented knowledge, an implementation-local result, or unresolved
|
|
74
|
+
meaning. A separate post-integration maintenance task reviews candidates against
|
|
75
|
+
current code and stable product meaning by business domain, then updates tracked
|
|
76
|
+
map files through ordinary Git changes. When no map exists, it can establish one
|
|
77
|
+
evidence-supported initial business domain. Periodic reconciliation recovers
|
|
78
|
+
missed work and accumulated drift.
|
|
73
79
|
|
|
74
80
|
## Shared Business Model
|
|
75
81
|
|
|
@@ -105,15 +111,19 @@ source details until they express durable business meaning.
|
|
|
105
111
|
Tracked map documents are authoritative for the shared map. They are not
|
|
106
112
|
authoritative for current application behavior.
|
|
107
113
|
|
|
108
|
-
Every
|
|
114
|
+
Every business-changing engineering task follows this evidence order:
|
|
109
115
|
|
|
110
|
-
1. The map
|
|
111
|
-
2.
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
1. The Skill probes existing map knowledge from a distinctive business term.
|
|
117
|
+
2. A map proposes likely business scope and relations; `MAP_NOT_FOUND` routes to
|
|
118
|
+
the smallest source-supported business model needed for the task.
|
|
119
|
+
3. Current source and tests confirm implementation behavior.
|
|
120
|
+
4. Tracked product documents confirm durable intent when they own that intent.
|
|
121
|
+
5. Runtime, database, queue, or environment evidence confirms state-dependent
|
|
114
122
|
behavior when the task requires it.
|
|
115
|
-
|
|
123
|
+
6. The agent reports uncertainty when available evidence cannot support a
|
|
116
124
|
decisive conclusion.
|
|
125
|
+
7. The result records one maintenance disposition and creates a candidate only
|
|
126
|
+
for stable business meaning supported by decisive evidence.
|
|
117
127
|
|
|
118
128
|
An outdated path or symbol anchor weakens that navigation hint without
|
|
119
129
|
invalidating unrelated business meaning. A contradiction changes the current
|
|
@@ -126,11 +136,11 @@ Business-map files live in the repository and travel with its branches. Files
|
|
|
126
136
|
are divided by stable business domain so agents can read concurrently and most
|
|
127
137
|
durable updates touch only one owning map.
|
|
128
138
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
protocol.
|
|
139
|
+
Business-changing development tasks record independent observations whether or
|
|
140
|
+
not a map exists. A task records a candidate only when stable business meaning
|
|
141
|
+
requires later maintenance; successful engineering delivery does not depend on
|
|
142
|
+
synchronizing the shared map. Reconciliation uses normal Git diff, review, and
|
|
143
|
+
merge semantics instead of a second transaction or locking protocol.
|
|
134
144
|
|
|
135
145
|
## Initial Product Scope
|
|
136
146
|
|
|
@@ -144,8 +154,9 @@ The initial product delivers one coherent path:
|
|
|
144
154
|
navigation anchors as structured JSON.
|
|
145
155
|
6. Render deterministic interactive human-readable projections from the same
|
|
146
156
|
graph as a portable HTML artifact or loopback Web session.
|
|
147
|
-
7. Package an Agent Skill that
|
|
148
|
-
confirmation
|
|
157
|
+
7. Package an Agent Skill that activates from business task meaning, routes map
|
|
158
|
+
context or `MAP_NOT_FOUND` into current-source confirmation, and makes an
|
|
159
|
+
explicit post-task maintenance decision.
|
|
149
160
|
8. Exercise the workflow against real engineering tasks, including stale and
|
|
150
161
|
incomplete map cases.
|
|
151
162
|
|
|
@@ -182,12 +193,13 @@ the following:
|
|
|
182
193
|
- context queries return the expected business owner, containment, incoming and
|
|
183
194
|
outgoing relationships, and navigation anchors;
|
|
184
195
|
- the renderer produces readable projections from the same normalized graph;
|
|
185
|
-
- a
|
|
186
|
-
|
|
196
|
+
- a package-managed Agent Skill activates for business-changing work with or
|
|
197
|
+
without a map, probes bounded context before broad discovery, and confirms
|
|
198
|
+
every change-controlling claim in current evidence;
|
|
187
199
|
- real task cases cover upstream root cause, cross-capability impact, missing
|
|
188
200
|
map knowledge, stale anchors, and a contradicted relationship;
|
|
189
|
-
-
|
|
190
|
-
introducing unsupported business claims;
|
|
201
|
+
- mapped and mapless Skill runs reach correct source-supported conclusions
|
|
202
|
+
without introducing unsupported business claims;
|
|
191
203
|
- independent review finds the implementation responsibilities readable and
|
|
192
204
|
the public workflow consistent with this contract;
|
|
193
205
|
- delivery remains local: publication, external installation, and migration are
|
|
@@ -202,7 +214,7 @@ human-intervention evidence as acceptance conditions.
|
|
|
202
214
|
The initial product, managed setup, versioned observations, read-only
|
|
203
215
|
reconciliation, public repository, and npm publication are complete. The first
|
|
204
216
|
real target-domain map and reviewed observation pair are in local use. The
|
|
205
|
-
current `semantic-atlas@2.1.
|
|
217
|
+
current `semantic-atlas@2.1.1` release removes one-time predecessor migration
|
|
206
218
|
paths and accepts only current managed Skill, observation, and claim contracts.
|
|
207
219
|
Target-repository sharing and longitudinal acceptance remain separate verified
|
|
208
220
|
stages.
|
|
@@ -245,10 +257,10 @@ Skills must have one verifiable version identity.
|
|
|
245
257
|
Real-use evidence is separate from the Git business map and from business-map
|
|
246
258
|
authority. The product records two immutable, versioned local artifacts:
|
|
247
259
|
|
|
248
|
-
- `TaskObservation`: map query
|
|
249
|
-
classification, explicitly domain-owned map-update
|
|
250
|
-
|
|
251
|
-
Agent. Reads and writes use task artifact v2;
|
|
260
|
+
- `TaskObservation`: map query outcomes including `map_not_found`, selected
|
|
261
|
+
concepts, current-evidence classification, explicitly domain-owned map-update
|
|
262
|
+
candidates when maintenance is warranted, and any explicit human correction
|
|
263
|
+
known to the task Agent. Reads and writes use task artifact v2;
|
|
252
264
|
- `ReviewObservation`: the independent review verdict, correctness of the
|
|
253
265
|
business boundary and upstream cause, impact completeness, required rework,
|
|
254
266
|
and whether the map caused a wrong conclusion.
|
|
@@ -275,24 +287,28 @@ regression, independent-review rework, human correction, and safe recovery from
|
|
|
275
287
|
missing, stale, or contradicted map knowledge. Tokens, files, time, compute, and
|
|
276
288
|
map-maintenance effort remain explanatory measures.
|
|
277
289
|
|
|
278
|
-
###
|
|
290
|
+
### Post-integration maintenance and reconciliation
|
|
279
291
|
|
|
280
|
-
Normal engineering work records
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
292
|
+
Normal engineering work records one task observation and creates durable
|
|
293
|
+
map-update candidates only when the maintenance disposition is `candidate`.
|
|
294
|
+
`reconcile candidates` is read-only and preserves every candidate origin,
|
|
295
|
+
evidence disposition, duplicate provenance, and linked independent review. A
|
|
296
|
+
post-integration maintenance task selects one business domain, checks current
|
|
284
297
|
source and durable product meaning, updates one owning YAML map through normal
|
|
285
|
-
Git review, and leaves unresolved or implementation-local
|
|
286
|
-
|
|
298
|
+
Git review, and leaves unresolved or implementation-local meaning outside the
|
|
299
|
+
canonical map. A mapless repository can create one initial domain-owned YAML
|
|
300
|
+
when current evidence establishes stable identity and bounded meaning. Periodic
|
|
301
|
+
runs provide a fallback for missed observations, accumulated drift, and changes
|
|
302
|
+
outside the normal workflow.
|
|
287
303
|
|
|
288
304
|
### Real-use acceptance
|
|
289
305
|
|
|
290
306
|
The first pilot starts with one stable business domain in a private target
|
|
291
307
|
repository rather than mapping the whole repository. Its initial map is
|
|
292
|
-
independently reviewed before merge.
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
308
|
+
independently reviewed before merge. Task orchestrators keep their own develop,
|
|
309
|
+
independent review, rework, and integration lifecycle. Semantic Atlas activates
|
|
310
|
+
from the Agent's business task, supplies advisory understanding and observation
|
|
311
|
+
evidence, and remains independent of orchestration.
|
|
296
312
|
|
|
297
313
|
Longitudinal acceptance requires at least 20 natural business-changing tasks
|
|
298
314
|
with independent review, at least one period of real code drift, and two
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-atlas",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "A Git-native advisory business map for coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"docs/product-contract.md",
|
|
46
46
|
"examples",
|
|
47
47
|
"LICENSE",
|
|
48
|
-
"README.md"
|
|
48
|
+
"README.md",
|
|
49
|
+
"README.zh-CN.md"
|
|
49
50
|
],
|
|
50
51
|
"engines": {
|
|
51
52
|
"node": ">=24 <25"
|