semantic-atlas 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/semantic-atlas/SKILL.md +47 -9
- package/.agents/skills/semantic-atlas/references/observations.md +4 -0
- package/.agents/skills/semantic-atlas-maintenance/SKILL.md +126 -84
- package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +59 -0
- package/README.md +53 -27
- package/README.zh-CN.md +42 -27
- package/dist/application/map-application.d.ts.map +1 -1
- package/dist/application/map-application.js +1 -0
- package/dist/application/map-application.js.map +1 -1
- package/dist/cli/observation-commands.d.ts +2 -1
- package/dist/cli/observation-commands.d.ts.map +1 -1
- package/dist/cli/observation-commands.js +19 -1
- package/dist/cli/observation-commands.js.map +1 -1
- package/dist/cli/reconciliation-command.d.ts +2 -1
- package/dist/cli/reconciliation-command.d.ts.map +1 -1
- package/dist/cli/reconciliation-command.js +32 -8
- package/dist/cli/reconciliation-command.js.map +1 -1
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +21 -4
- package/dist/cli/run-cli.js.map +1 -1
- package/dist/contracts/cli.d.ts +14 -1
- package/dist/contracts/cli.d.ts.map +1 -1
- package/dist/contracts/map.d.ts +80 -1
- package/dist/contracts/map.d.ts.map +1 -1
- package/dist/contracts/map.js +29 -0
- package/dist/contracts/map.js.map +1 -1
- package/dist/contracts/observation.d.ts +113 -1
- package/dist/contracts/observation.d.ts.map +1 -1
- package/dist/contracts/observation.js +71 -1
- package/dist/contracts/observation.js.map +1 -1
- package/dist/contracts/projection.d.ts +1 -0
- package/dist/contracts/projection.d.ts.map +1 -1
- package/dist/contracts/reconciliation.d.ts +11 -1
- package/dist/contracts/reconciliation.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/map/business-flow-validator.d.ts +3 -0
- package/dist/map/business-flow-validator.d.ts.map +1 -0
- package/dist/map/business-flow-validator.js +152 -0
- package/dist/map/business-flow-validator.js.map +1 -0
- package/dist/map/business-graph.d.ts +3 -1
- package/dist/map/business-graph.d.ts.map +1 -1
- package/dist/map/business-graph.js +11 -0
- package/dist/map/business-graph.js.map +1 -1
- package/dist/map/map-validator.d.ts.map +1 -1
- package/dist/map/map-validator.js +31 -2
- package/dist/map/map-validator.js.map +1 -1
- package/dist/observations/observation-application.d.ts +6 -0
- package/dist/observations/observation-application.d.ts.map +1 -1
- package/dist/observations/observation-application.js +34 -1
- package/dist/observations/observation-application.js.map +1 -1
- package/dist/observations/observation-store.d.ts +8 -1
- package/dist/observations/observation-store.d.ts.map +1 -1
- package/dist/observations/observation-store.js +22 -4
- package/dist/observations/observation-store.js.map +1 -1
- package/dist/query/context-query-service.d.ts.map +1 -1
- package/dist/query/context-query-service.js +1 -0
- package/dist/query/context-query-service.js.map +1 -1
- package/dist/reconciliation/reconciliation-service.d.ts +1 -0
- package/dist/reconciliation/reconciliation-service.d.ts.map +1 -1
- package/dist/reconciliation/reconciliation-service.js +56 -3
- package/dist/reconciliation/reconciliation-service.js.map +1 -1
- package/dist/rendering/flow-projector.d.ts +9 -0
- package/dist/rendering/flow-projector.d.ts.map +1 -0
- package/dist/rendering/flow-projector.js +226 -0
- package/dist/rendering/flow-projector.js.map +1 -0
- package/dist/rendering/map-projector.d.ts.map +1 -1
- package/dist/rendering/map-projector.js +6 -2
- package/dist/rendering/map-projector.js.map +1 -1
- package/dist/rendering/viewer-browser.d.ts.map +1 -1
- package/dist/rendering/viewer-browser.js +95 -6
- package/dist/rendering/viewer-browser.js.map +1 -1
- package/dist/rendering/viewer-page.d.ts +16 -0
- package/dist/rendering/viewer-page.d.ts.map +1 -1
- package/dist/rendering/viewer-page.js +79 -7
- package/dist/rendering/viewer-page.js.map +1 -1
- package/docs/architecture.md +120 -64
- package/docs/evaluation.md +18 -3
- package/docs/index.md +4 -4
- package/docs/map-format.md +99 -5
- package/docs/observations.md +54 -20
- package/docs/product-contract.md +64 -24
- package/examples/commerce.yaml +50 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: semantic-atlas
|
|
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.
|
|
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, business flows, 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
|
|
|
@@ -55,9 +55,11 @@ produces no shared business-knowledge maintenance work.
|
|
|
55
55
|
Route the probe result into one current-evidence investigation:
|
|
56
56
|
|
|
57
57
|
- A successful context result supplies likely business scope and source entry
|
|
58
|
-
points.
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
points. It can also return related business flows in `context.data.flows`.
|
|
59
|
+
Open the most decisive anchors first. Query another returned stable ID only
|
|
60
|
+
when an owner, upstream action, downstream consumer, shared data concept,
|
|
61
|
+
invariant, interface, or business-relevant path could change the
|
|
62
|
+
implementation scope.
|
|
61
63
|
- `CONCEPT_AMBIGUOUS` supplies explicit candidates. Compare their stable IDs,
|
|
62
64
|
names, kinds, and task meaning, then query the matching ID. Use bounded source
|
|
63
65
|
evidence when current behavior is needed to choose.
|
|
@@ -109,6 +111,38 @@ Trace a downstream symptom toward its confirmed upstream cause before editing.
|
|
|
109
111
|
For shared data or interfaces, inspect every confirmed producer and consumer
|
|
110
112
|
needed to preserve the contract. Keep unrelated neighbors outside the change.
|
|
111
113
|
|
|
114
|
+
## Check Relevant Business Flows
|
|
115
|
+
|
|
116
|
+
Use each returned flow as a compact hypothesis about the business-relevant
|
|
117
|
+
actions, decisions, branches, and outcomes in one scenario. Follow only the
|
|
118
|
+
flows and paths that intersect the task; ordinary relation context remains
|
|
119
|
+
sufficient when no flow is relevant.
|
|
120
|
+
|
|
121
|
+
1. Before editing, trace each relevant path from `startsAt` through its labeled
|
|
122
|
+
decisions to the outcomes that could change. Give special attention to paths
|
|
123
|
+
controlling durable data, provider usage or cost, authorization or tenant
|
|
124
|
+
isolation, interfaces, and user-visible results.
|
|
125
|
+
2. Confirm every step or branch that controls the engineering decision in
|
|
126
|
+
current source, tests, tracked product documents, or required runtime
|
|
127
|
+
evidence. Flow order is an investigation lead rather than current execution
|
|
128
|
+
truth.
|
|
129
|
+
3. After implementation or review, trace the affected paths again. Check that
|
|
130
|
+
preserved branches still reach their intended outcomes and that an intended
|
|
131
|
+
product change has a clear durable meaning.
|
|
132
|
+
4. Classify a discrepancy before changing either side:
|
|
133
|
+
- repair source when implementation accidentally breaks the confirmed
|
|
134
|
+
business path;
|
|
135
|
+
- propose a flow update when confirmed product intent changed the durable
|
|
136
|
+
business path;
|
|
137
|
+
- propose a flow correction when decisive current evidence establishes that
|
|
138
|
+
the retained path was already stale;
|
|
139
|
+
- preserve the discrepancy as unresolved when available evidence cannot
|
|
140
|
+
choose the durable behavior;
|
|
141
|
+
- keep the flow unchanged when only implementation structure changed.
|
|
142
|
+
|
|
143
|
+
Keep routine parameter validation, DTO conversion, helpers, framework wiring,
|
|
144
|
+
and Service or Queue names in source rather than flow steps.
|
|
145
|
+
|
|
112
146
|
## Implement And Verify
|
|
113
147
|
|
|
114
148
|
Continue through the repository's normal engineering workflow after the
|
|
@@ -127,7 +161,9 @@ After the engineering or review result is known, choose one maintenance disposit
|
|
|
127
161
|
|
|
128
162
|
- `candidate`: current evidence establishes stable business meaning that the
|
|
129
163
|
shared map omits or represents incorrectly. Record one or more domain-owned
|
|
130
|
-
map-update candidates with decisive evidence.
|
|
164
|
+
map-update candidates with decisive evidence. Use `kind: "flow"` when the
|
|
165
|
+
durable correction concerns a scenario's actions, decisions, labeled
|
|
166
|
+
branches, or outcomes.
|
|
131
167
|
- `already_represented`: the shared map still expresses the stable business
|
|
132
168
|
meaning needed by the task. Record no candidate.
|
|
133
169
|
- `implementation_local`: the result changes only helpers, framework wiring,
|
|
@@ -139,12 +175,14 @@ After the engineering or review result is known, choose one maintenance disposit
|
|
|
139
175
|
|
|
140
176
|
A no-change disposition is a complete result when current shared knowledge
|
|
141
177
|
already represents the durable meaning or the change is implementation-local.
|
|
142
|
-
Add concepts and
|
|
178
|
+
Add concepts, relations, and flows only when current evidence supports their
|
|
179
|
+
accuracy. When no relevant flow changed, record no flow candidate.
|
|
143
180
|
|
|
144
181
|
For a repository without a map, use `candidate` only when current evidence
|
|
145
|
-
establishes a stable business domain and a bounded reusable concept
|
|
146
|
-
Use `unresolved` when one task cannot support that identity.
|
|
147
|
-
knowledge to the stable meaning established by the current
|
|
182
|
+
establishes a stable business domain and a bounded reusable concept, relation,
|
|
183
|
+
or business path. Use `unresolved` when one task cannot support that identity.
|
|
184
|
+
Limit bootstrap knowledge to the stable meaning established by the current
|
|
185
|
+
task.
|
|
148
186
|
|
|
149
187
|
## Record Accuracy Evidence
|
|
150
188
|
|
|
@@ -69,6 +69,10 @@ is `confirmed` when current evidence supports the proposed correction,
|
|
|
69
69
|
evidence, or `unresolved` when it remains a maintenance lead. Periodic
|
|
70
70
|
maintenance preserves these task-time judgments and linked independent reviews,
|
|
71
71
|
then confirms durable business meaning again before editing canonical YAML.
|
|
72
|
+
Candidate kinds are `node`, `relation`, `anchor`, and `flow`. Use `flow` for
|
|
73
|
+
a stable scenario path whose business actions, decisions, labeled branches, or
|
|
74
|
+
outcomes need reconciliation. An implementation-only control-flow change does
|
|
75
|
+
not create a flow candidate.
|
|
72
76
|
Stored task observations must match this current schema; unsupported local
|
|
73
77
|
artifacts fail visibly and are never migrated or promoted into reconciliation.
|
|
74
78
|
|
|
@@ -1,95 +1,96 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: semantic-atlas-maintenance
|
|
3
|
-
description: Reconcile
|
|
3
|
+
description: Reconcile current Semantic Atlas candidates for one business domain into a source-supported reviewed map update or evidence conclusion, then record the result after integration. Use for post-integration maintenance, initial-domain bootstrap, drift cleanup, candidate triage, and domain-scoped reconciliation with or without an existing business map.
|
|
4
4
|
compatibility: Requires Node.js 24+, Git, the current semantic-atlas CLI, retained local observations, and repository source access.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Semantic Atlas Maintenance
|
|
8
8
|
|
|
9
|
-
Turn
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
Turn current candidate leads for one business domain into one independently
|
|
10
|
+
reviewable map update or evidence conclusion. Current source, tests, tracked product documents,
|
|
11
|
+
and required runtime evidence decide the result. Candidate
|
|
12
|
+
provenance explains where to investigate; it does not authorize a map edit.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Read [references/reconciliation.md](references/reconciliation.md) before
|
|
15
|
+
classifying candidates. It defines evidence meaning, durable-content tests,
|
|
16
|
+
duplicate handling, maintenance-observation fields, and stopping conditions.
|
|
17
|
+
|
|
18
|
+
## Work Phase
|
|
19
|
+
|
|
20
|
+
### Load Current Actionable Candidates
|
|
15
21
|
|
|
16
|
-
1. Resolve the repository root and
|
|
17
|
-
|
|
18
|
-
2. Run the read-only report:
|
|
22
|
+
1. Resolve the repository root and work only in the assigned worktree.
|
|
23
|
+
2. Run:
|
|
19
24
|
|
|
20
25
|
```bash
|
|
21
26
|
semantic-atlas reconcile candidates --repo <absolute-repository-root>
|
|
22
27
|
```
|
|
23
28
|
|
|
24
|
-
3. Confirm the
|
|
25
|
-
|
|
26
|
-
`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
29
|
+
3. Confirm the v1 `reconcile candidates` envelope. Select one business domain
|
|
30
|
+
from `data.domains`. Read each origin's exact `taskObservationId` and
|
|
31
|
+
`candidateIndex`, task evidence, linked independent reviews, duplicate
|
|
32
|
+
provenance, and any earlier unresolved maintenance history.
|
|
33
|
+
Treat task-time `confirmed`, `contradicted`, and `unresolved` dispositions as
|
|
34
|
+
investigation inputs rather than maintenance conclusions. A candidate with
|
|
35
|
+
`kind: "flow"` proposes a correction to one stable business scenario path.
|
|
36
|
+
4. When `data.domains` is empty, finish with a no-change result. A positive
|
|
37
|
+
`waitingForEvidenceOccurrences` means prior investigation remains retained
|
|
38
|
+
but does not justify immediately repeating the same work.
|
|
39
|
+
|
|
40
|
+
### Confirm Current Business Meaning
|
|
41
|
+
|
|
42
|
+
Open every decisive current source, test, or tracked product document named by
|
|
43
|
+
the selected origins. Follow current callers and collaborators when a proposed
|
|
44
|
+
relation changes both endpoints. Use runtime evidence when deployed state owns
|
|
45
|
+
the conclusion.
|
|
46
|
+
|
|
47
|
+
For a flow candidate, reconstruct the durable scenario in business terms: the
|
|
48
|
+
business-relevant actions, decisions, branches, and outcomes that can change
|
|
49
|
+
user results, durable data, cost or provider usage, authorization or isolation,
|
|
50
|
+
or interfaces. Keep flow steps at business granularity; leave parameter
|
|
51
|
+
validation, DTO conversion, helpers, framework wiring, and Service or Queue
|
|
52
|
+
names in source. Treat a source diff as evidence to investigate and retain the
|
|
53
|
+
existing flow until tracked product intent or durable current evidence supports
|
|
54
|
+
a change.
|
|
55
|
+
|
|
56
|
+
Classify every selected origin:
|
|
57
|
+
|
|
58
|
+
- `accepted`: current evidence supports the proposed durable correction;
|
|
59
|
+
- `refined`: current evidence supports a narrower or differently worded durable
|
|
60
|
+
correction;
|
|
61
|
+
- `discarded`: current evidence shows implementation-local, obsolete, or
|
|
62
|
+
unsupported meaning that does not belong in the shared map;
|
|
63
|
+
- `unresolved`: available evidence cannot yet establish stable business meaning.
|
|
64
|
+
|
|
65
|
+
Keep discarded and unresolved results outside the canonical map. A correct
|
|
66
|
+
discard or unresolved conclusion is a complete work result and may have no Git
|
|
67
|
+
change.
|
|
68
|
+
|
|
69
|
+
### Resolve And Edit One Owning YAML
|
|
70
|
+
|
|
71
|
+
- Edit the selected domain's existing owning `docs/business-map/*.yaml` file.
|
|
72
|
+
- When the graph exists without an owning file for this domain, create one
|
|
73
|
+
domain-owned YAML that participates in complete-graph validation.
|
|
68
74
|
- When no map documents exist, create one initial business-domain YAML under
|
|
69
75
|
`docs/business-map/`. Establish its stable domain ID, title, summary, root
|
|
70
|
-
node, and bounded accepted
|
|
76
|
+
node, and only the bounded accepted or refined meaning supported by current
|
|
77
|
+
evidence. Preserve `MAP_NOT_FOUND` as the explicit bootstrap condition.
|
|
71
78
|
|
|
72
79
|
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
|
-
|
|
78
|
-
## Edit One Owning YAML
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
Limit the run to one owning YAML. Preserve stable node IDs when business
|
|
82
|
+
identity is unchanged, declare directed relations from the source concept's
|
|
83
|
+
owning file, and keep anchors as navigation hints. One duplicate candidate
|
|
84
|
+
group produces one map edit while its maintenance draft retains every exact
|
|
85
|
+
origin.
|
|
85
86
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
Apply an accepted or refined flow correction in the same domain-owned YAML as
|
|
88
|
+
its scenario. Reference existing business concept IDs from flow steps and keep
|
|
89
|
+
the scenario's stable identity when its business meaning remains unchanged.
|
|
89
90
|
|
|
90
|
-
|
|
91
|
+
### Validate And Prepare The Review Candidate
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
When the map changes, run:
|
|
93
94
|
|
|
94
95
|
```bash
|
|
95
96
|
semantic-atlas validate --repo <absolute-repository-root>
|
|
@@ -99,18 +100,59 @@ git diff --check
|
|
|
99
100
|
git diff -- docs/business-map/<owning-file>.yaml
|
|
100
101
|
```
|
|
101
102
|
|
|
102
|
-
Inspect the
|
|
103
|
+
Inspect the changed neighborhood in the Viewer. Confirm the Git diff changes at
|
|
104
|
+
most one owning YAML and leaves retained observations unchanged. For an initial
|
|
103
105
|
map, confirm that the Viewer presents one bounded business domain rather than a
|
|
104
|
-
repository structure.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
independent
|
|
106
|
+
repository structure. For a flow correction, inspect the affected path,
|
|
107
|
+
decision labels, branches, outcomes, and relationship-to-flow links. Commit the
|
|
108
|
+
map candidate through the host workflow.
|
|
109
|
+
|
|
110
|
+
Prepare, but do not record, one maintenance-observation JSON document. It
|
|
111
|
+
contains the maintenance task/run identity, selected `businessDomainId`, every
|
|
112
|
+
exact candidate source, classification, reason, and current evidence. Accepted
|
|
113
|
+
or refined results reserve `mapChange.owningMapPath`; the Integration Phase adds
|
|
114
|
+
the real `mergedCommit`.
|
|
115
|
+
|
|
116
|
+
Do not record a terminal maintenance observation during the Work Phase. At this
|
|
117
|
+
point the classification and YAML are proposals that have not completed
|
|
118
|
+
independent review and integration.
|
|
119
|
+
|
|
120
|
+
Report the selected domain, origins, classifications, evidence, owning YAML,
|
|
121
|
+
validation and render results, Git candidate, and the prepared observation to
|
|
122
|
+
the host workflow.
|
|
123
|
+
|
|
124
|
+
## Review Phase
|
|
125
|
+
|
|
126
|
+
Use the host workflow's ordinary independent review. Review durable business
|
|
127
|
+
meaning, relation direction, flow branch meaning, evidence support,
|
|
128
|
+
complete-graph validity, exact candidate coverage, one-domain ownership, and
|
|
129
|
+
whether discarded or unresolved conclusions correctly avoid a map edit.
|
|
130
|
+
|
|
131
|
+
Changes requested return to the normal Work Phase. Approval authorizes the host
|
|
132
|
+
workflow to enter Integration Phase; it does not itself consume candidates.
|
|
133
|
+
|
|
134
|
+
## Integration Phase
|
|
135
|
+
|
|
136
|
+
1. Re-read the approved work and review evidence.
|
|
137
|
+
2. When a map candidate exists, merge it through the repository's normal Git
|
|
138
|
+
flow and capture the actual `mergedCommit`. Put that commit and the one
|
|
139
|
+
`owningMapPath` into `mapChange`.
|
|
140
|
+
3. When every result is discarded or unresolved, keep `mapChange` absent and
|
|
141
|
+
continue only after the no-change conclusion has passed independent review.
|
|
142
|
+
4. Send the complete JSON document through standard input:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
semantic-atlas observe maintenance --stdin --repo <absolute-repository-root>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
5. Require a `recorded` or `idempotent` success response before reporting the
|
|
149
|
+
maintenance task complete. Reuse the exact observation ID and document on an
|
|
150
|
+
uncertain retry. The same ID with changed content is a conflict.
|
|
151
|
+
6. Rerun `semantic-atlas reconcile candidates --repo` when confirming the
|
|
152
|
+
result. Accepted, refined, and discarded origins disappear from actionable
|
|
153
|
+
candidates. Unresolved origins remain retained as waiting for new evidence
|
|
154
|
+
and do not immediately schedule the same work again.
|
|
155
|
+
|
|
156
|
+
If the map merged but observation recording failed, preserve the merged Git
|
|
157
|
+
result and keep the task incomplete. Resume or retry the Integration Phase with
|
|
158
|
+
the exact same observation document until the idempotent record succeeds.
|
|
@@ -14,6 +14,8 @@ Every origin retains:
|
|
|
14
14
|
- the task's map queries and current-evidence dispositions;
|
|
15
15
|
- any task or review human correction;
|
|
16
16
|
- every linked independent review and its accuracy assessment.
|
|
17
|
+
- earlier unresolved maintenance classifications and current evidence, when
|
|
18
|
+
the candidate group has become actionable again through a new origin.
|
|
17
19
|
|
|
18
20
|
`confirmed` says task-time evidence supported the proposed correction.
|
|
19
21
|
`contradicted` says current evidence contradicted the mapped statement that the
|
|
@@ -43,6 +45,10 @@ and leave the candidate unresolved until the owning authority can decide it.
|
|
|
43
45
|
relation direction are confirmed.
|
|
44
46
|
- A missing concept can be added when current evidence establishes stable
|
|
45
47
|
business identity, ownership, and meaning rather than only a source symbol.
|
|
48
|
+
- A flow can be added or corrected when durable evidence establishes the
|
|
49
|
+
scenario's business-relevant actions, decisions, labeled branches, and
|
|
50
|
+
outcomes. Keep the flow at business granularity and classify a source
|
|
51
|
+
discrepancy before changing the canonical path.
|
|
46
52
|
- A repository with `MAP_NOT_FOUND` can begin with one domain-owned map when
|
|
47
53
|
current evidence establishes that domain and the selected bounded concepts.
|
|
48
54
|
Cross-domain relations wait until both stable endpoints can join one valid
|
|
@@ -60,3 +66,56 @@ relation endpoints and containment remain repository-wide even when the Git
|
|
|
60
66
|
diff is local. Render the changed graph and inspect the selected neighborhood.
|
|
61
67
|
The final Git diff is the independent review surface; retained observation
|
|
62
68
|
artifacts stay unchanged.
|
|
69
|
+
|
|
70
|
+
## Record The Reviewed Outcome
|
|
71
|
+
|
|
72
|
+
One maintenance result identifies an exact source with both
|
|
73
|
+
`taskObservationId` and zero-based `candidateIndex`. Repeated summaries do not
|
|
74
|
+
replace this identity. The command rejects a missing source or a source owned by
|
|
75
|
+
another `businessDomainId`.
|
|
76
|
+
|
|
77
|
+
Use this shape after independent review and integration:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"schemaVersion": 1,
|
|
82
|
+
"id": "maintenance-observation-id",
|
|
83
|
+
"recordedAt": "2026-08-31T08:00:00.000Z",
|
|
84
|
+
"maintenance": {
|
|
85
|
+
"taskId": "maintenance-task-id",
|
|
86
|
+
"runId": "integration-run-id"
|
|
87
|
+
},
|
|
88
|
+
"businessDomainId": "commerce",
|
|
89
|
+
"results": [
|
|
90
|
+
{
|
|
91
|
+
"candidate": {
|
|
92
|
+
"taskObservationId": "task-observation-id",
|
|
93
|
+
"candidateIndex": 0
|
|
94
|
+
},
|
|
95
|
+
"status": "accepted",
|
|
96
|
+
"reason": "Current source confirms the durable business meaning.",
|
|
97
|
+
"evidence": [
|
|
98
|
+
{ "kind": "source", "reference": "src/orders/place-order.ts" }
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"mapChange": {
|
|
103
|
+
"owningMapPath": "docs/business-map/commerce.yaml",
|
|
104
|
+
"mergedCommit": "MERGED_COMMIT_HEX"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Replace `MERGED_COMMIT_HEX` with the full hexadecimal commit that actually
|
|
110
|
+
merged the reviewed map change before submitting the observation.
|
|
111
|
+
|
|
112
|
+
`accepted` and `refined` require `mapChange`; a document containing only
|
|
113
|
+
`discarded` and `unresolved` results omits it. Every result needs a concise
|
|
114
|
+
reason and at least one current evidence reference. One document lists each
|
|
115
|
+
exact candidate source once.
|
|
116
|
+
|
|
117
|
+
The reconciliation report exposes only actionable groups in `domains`.
|
|
118
|
+
`waitingForEvidenceOccurrences` counts unresolved sources for which no new
|
|
119
|
+
origin has appeared. A new origin with the same domain, kind, and summary makes
|
|
120
|
+
the group actionable again and returns the earlier unresolved history beside
|
|
121
|
+
the new evidence.
|
package/README.md
CHANGED
|
@@ -9,8 +9,9 @@ English | [简体中文](README.zh-CN.md)
|
|
|
9
9
|
Semantic Atlas gives coding agents a compact map of the business before they
|
|
10
10
|
change the code. A repository describes stable domains, capabilities,
|
|
11
11
|
operations, data, rules, interfaces, and their relationships in tracked YAML.
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Scenario flows add business-relevant actions, decisions, branches, and outcomes
|
|
13
|
+
to the same documents. The CLI validates the map, returns a small neighborhood
|
|
14
|
+
and its related flows for investigation, and renders both views for people.
|
|
14
15
|
|
|
15
16
|
The map is deliberately advisory. It helps an agent enter through the right
|
|
16
17
|
business boundary; current source, tests, tracked product documents, and
|
|
@@ -74,10 +75,11 @@ nodes:
|
|
|
74
75
|
description: Likely source entry point for Commerce behavior.
|
|
75
76
|
|
|
76
77
|
relations: []
|
|
78
|
+
flows: []
|
|
77
79
|
```
|
|
78
80
|
|
|
79
81
|
The [map format](docs/map-format.md) defines supported concepts, relations,
|
|
80
|
-
anchors, validation rules, and lookup behavior.
|
|
82
|
+
business flows, anchors, validation rules, and lookup behavior.
|
|
81
83
|
|
|
82
84
|
## Query And Render
|
|
83
85
|
|
|
@@ -90,14 +92,16 @@ semantic-atlas web --repo /path/to/repository
|
|
|
90
92
|
|
|
91
93
|
`validate` checks every map document as one graph. `context` returns the
|
|
92
94
|
selected concept, containment, direct incoming and outgoing relationships,
|
|
93
|
-
related concepts,
|
|
95
|
+
related concepts, source-navigation anchors, and complete related flows in a
|
|
96
|
+
versioned JSON envelope.
|
|
94
97
|
`render` produces a deterministic, self-contained interactive HTML Viewer from
|
|
95
|
-
that same normalized
|
|
96
|
-
|
|
97
|
-
wheel or controls to zoom, and use `Fit` to restore the
|
|
98
|
-
Cards keep business type, title, and description visible
|
|
99
|
-
paths in the graph. Click a card, or focus it and press
|
|
100
|
-
navigation anchors in a desktop side
|
|
98
|
+
that same normalized map. Its compact toolbar switches between Relationships
|
|
99
|
+
and Flows; each view then selects a business domain or scenario flow. Drag to pan,
|
|
100
|
+
use the mouse wheel or controls to zoom, and use `Fit` to restore the
|
|
101
|
+
complete selected view. Cards keep business type, title, and description visible
|
|
102
|
+
without exposing code paths in the graph. Click a card, or focus it and press
|
|
103
|
+
`Enter`, to inspect its navigation anchors and related flows in a desktop side
|
|
104
|
+
panel or narrow-screen bottom panel. A related-flow link opens the actual flow.
|
|
101
105
|
|
|
102
106
|
`web` starts the same Viewer on a read-only `127.0.0.1` server and opens the
|
|
103
107
|
default browser. Pass several explicitly allowed repositories after one
|
|
@@ -119,12 +123,15 @@ For a business-changing engineering task:
|
|
|
119
123
|
1. Probe the smallest useful map neighborhood whether or not map files exist.
|
|
120
124
|
2. Use returned map knowledge as investigation leads, or build the smallest
|
|
121
125
|
source-supported business model after `MAP_NOT_FOUND`.
|
|
122
|
-
3.
|
|
123
|
-
|
|
126
|
+
3. Trace any related business flow and identify the decisions, branches, and
|
|
127
|
+
outcomes that the task can affect.
|
|
128
|
+
4. Confirm every change-controlling claim in current source and tests.
|
|
129
|
+
5. Use tracked product documents for durable intent and runtime evidence for
|
|
124
130
|
state-dependent behavior.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
6. Let current evidence override missing, stale, or contradicted map knowledge.
|
|
132
|
+
7. Implement, verify, and recheck the affected business paths through the
|
|
133
|
+
repository's normal engineering workflow.
|
|
134
|
+
8. Record the task outcome and decide whether shared business knowledge needs a
|
|
128
135
|
separate maintenance change; a no-change decision is a complete result.
|
|
129
136
|
|
|
130
137
|
The final engineering conclusion is expected to be more accurate than the map
|
|
@@ -135,9 +142,11 @@ that helped locate it.
|
|
|
135
142
|
`semantic-atlas setup` installs two package-owned Skills:
|
|
136
143
|
|
|
137
144
|
- `semantic-atlas` gives every business-changing task a bounded,
|
|
138
|
-
current-evidence understanding workflow,
|
|
145
|
+
current-evidence understanding workflow, including relevant flow branches,
|
|
146
|
+
with or without an existing map.
|
|
139
147
|
- `semantic-atlas-maintenance` reviews retained candidates for one business
|
|
140
|
-
domain and prepares a normal reviewed YAML
|
|
148
|
+
domain, including flow corrections, and prepares a normal reviewed YAML
|
|
149
|
+
update or initial domain map.
|
|
141
150
|
|
|
142
151
|
Target repositories do not copy these Skills. They share only their business
|
|
143
152
|
maps through Git.
|
|
@@ -145,21 +154,26 @@ maps through Git.
|
|
|
145
154
|
## Accuracy Observations
|
|
146
155
|
|
|
147
156
|
Every business-changing task records task evidence without changing the
|
|
148
|
-
business map.
|
|
157
|
+
business map. Independent review records separate review evidence, and a
|
|
158
|
+
reviewed maintenance run records what happened to each exact candidate origin:
|
|
149
159
|
|
|
150
160
|
```bash
|
|
151
161
|
semantic-atlas observe task --stdin --repo /path/to/repository
|
|
152
162
|
semantic-atlas observe review --stdin --repo /path/to/repository
|
|
163
|
+
semantic-atlas observe maintenance --stdin --repo /path/to/repository
|
|
153
164
|
semantic-atlas insights summary --repo /path/to/repository --period 4w
|
|
154
165
|
```
|
|
155
166
|
|
|
156
167
|
A task observation records queries including `map_not_found`, current-evidence
|
|
157
168
|
classifications, candidate map corrections, and explicit human corrections. An
|
|
158
|
-
|
|
169
|
+
eligible correction can target a node, relation, anchor, or flow. An empty
|
|
170
|
+
candidate list is valid when knowledge is already represented,
|
|
159
171
|
implementation-local, or unresolved. The task never grades its own accuracy.
|
|
160
172
|
An independent review observation owns correctness, impact, required-rework,
|
|
161
|
-
and map-regression judgments.
|
|
162
|
-
|
|
173
|
+
and map-regression judgments. A maintenance observation records `accepted`,
|
|
174
|
+
`refined`, `discarded`, or `unresolved` results only after review and
|
|
175
|
+
integration. IDs are immutable: an exact replay is idempotent and changed
|
|
176
|
+
content conflicts.
|
|
163
177
|
|
|
164
178
|
See [accuracy observations](docs/observations.md) for the schemas and evidence
|
|
165
179
|
semantics.
|
|
@@ -167,15 +181,27 @@ semantics.
|
|
|
167
181
|
## Reconciliation
|
|
168
182
|
|
|
169
183
|
```bash
|
|
184
|
+
semantic-atlas reconcile status --repo /path/to/repository
|
|
170
185
|
semantic-atlas reconcile candidates --repo /path/to/repository
|
|
171
186
|
```
|
|
172
187
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
188
|
+
`reconcile status` returns only whether the repository currently has at least
|
|
189
|
+
one actionable candidate. It reads task and maintenance observations, leaving
|
|
190
|
+
candidate details, Review evidence, and business-domain selection inside the
|
|
191
|
+
maintenance workflow. This is the narrow orchestration contract.
|
|
192
|
+
|
|
193
|
+
`reconcile candidates` returns current actionable candidates by explicit
|
|
194
|
+
business-domain ownership while preserving each origin, evidence disposition,
|
|
195
|
+
linked independent review, and earlier unresolved investigation. Accepted, refined,
|
|
196
|
+
and discarded origins are terminal. An unresolved origin waits for new evidence
|
|
197
|
+
instead of immediately producing the same task again. Both commands are read-only.
|
|
198
|
+
The maintenance Skill then confirms one domain against current evidence,
|
|
199
|
+
submits any accepted map correction through an ordinary Git diff and independent
|
|
200
|
+
review, and records the reviewed outcome after integration. When no map exists,
|
|
201
|
+
a supported candidate can seed one bounded business-domain YAML instead of a
|
|
202
|
+
repository-wide taxonomy.
|
|
203
|
+
Flow candidates are checked as stable business paths rather than copied
|
|
204
|
+
implementation control flow.
|
|
179
205
|
Post-integration maintenance is the normal freshness path; periodic
|
|
180
206
|
reconciliation recovers missed observations, accumulated drift, and changes
|
|
181
207
|
outside the normal engineering workflow.
|