semantic-atlas 2.1.3 → 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.
Files changed (59) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +47 -9
  2. package/.agents/skills/semantic-atlas/references/observations.md +4 -0
  3. package/.agents/skills/semantic-atlas-maintenance/SKILL.md +23 -6
  4. package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +4 -0
  5. package/README.md +30 -18
  6. package/README.zh-CN.md +24 -18
  7. package/dist/application/map-application.d.ts.map +1 -1
  8. package/dist/application/map-application.js +1 -0
  9. package/dist/application/map-application.js.map +1 -1
  10. package/dist/cli/run-cli.js +1 -0
  11. package/dist/cli/run-cli.js.map +1 -1
  12. package/dist/contracts/cli.d.ts +4 -1
  13. package/dist/contracts/cli.d.ts.map +1 -1
  14. package/dist/contracts/map.d.ts +80 -1
  15. package/dist/contracts/map.d.ts.map +1 -1
  16. package/dist/contracts/map.js +29 -0
  17. package/dist/contracts/map.js.map +1 -1
  18. package/dist/contracts/observation.d.ts +3 -0
  19. package/dist/contracts/observation.d.ts.map +1 -1
  20. package/dist/contracts/observation.js +1 -1
  21. package/dist/contracts/observation.js.map +1 -1
  22. package/dist/contracts/projection.d.ts +1 -0
  23. package/dist/contracts/projection.d.ts.map +1 -1
  24. package/dist/map/business-flow-validator.d.ts +3 -0
  25. package/dist/map/business-flow-validator.d.ts.map +1 -0
  26. package/dist/map/business-flow-validator.js +152 -0
  27. package/dist/map/business-flow-validator.js.map +1 -0
  28. package/dist/map/business-graph.d.ts +3 -1
  29. package/dist/map/business-graph.d.ts.map +1 -1
  30. package/dist/map/business-graph.js +11 -0
  31. package/dist/map/business-graph.js.map +1 -1
  32. package/dist/map/map-validator.d.ts.map +1 -1
  33. package/dist/map/map-validator.js +31 -2
  34. package/dist/map/map-validator.js.map +1 -1
  35. package/dist/query/context-query-service.d.ts.map +1 -1
  36. package/dist/query/context-query-service.js +1 -0
  37. package/dist/query/context-query-service.js.map +1 -1
  38. package/dist/rendering/flow-projector.d.ts +9 -0
  39. package/dist/rendering/flow-projector.d.ts.map +1 -0
  40. package/dist/rendering/flow-projector.js +226 -0
  41. package/dist/rendering/flow-projector.js.map +1 -0
  42. package/dist/rendering/map-projector.d.ts.map +1 -1
  43. package/dist/rendering/map-projector.js +6 -2
  44. package/dist/rendering/map-projector.js.map +1 -1
  45. package/dist/rendering/viewer-browser.d.ts.map +1 -1
  46. package/dist/rendering/viewer-browser.js +95 -6
  47. package/dist/rendering/viewer-browser.js.map +1 -1
  48. package/dist/rendering/viewer-page.d.ts +16 -0
  49. package/dist/rendering/viewer-page.d.ts.map +1 -1
  50. package/dist/rendering/viewer-page.js +79 -7
  51. package/dist/rendering/viewer-page.js.map +1 -1
  52. package/docs/architecture.md +71 -42
  53. package/docs/evaluation.md +18 -3
  54. package/docs/index.md +1 -1
  55. package/docs/map-format.md +99 -5
  56. package/docs/observations.md +3 -1
  57. package/docs/product-contract.md +45 -19
  58. package/examples/commerce.yaml +50 -0
  59. package/package.json +1 -1
@@ -4,9 +4,10 @@ This page defines the stable responsibilities, data lifecycle, dependency
4
4
  direction, and failure semantics for the initial product. It applies to the
5
5
  public CLI, renderer, and business-understanding Agent Skill.
6
6
 
7
- **Status: query, validation, visual projection, Agent Skills, managed
8
- Skill lifecycle, accuracy observations, read-only reconciliation, and public
9
- release verification are implemented and released.**
7
+ **Status: query, validation, visual projection, Agent Skills, managed Skill
8
+ lifecycle, accuracy observations, read-only reconciliation, and public release
9
+ verification are implemented. The business-flow extension is implemented in
10
+ the current source candidate.**
10
11
 
11
12
  ## System Model
12
13
 
@@ -14,15 +15,15 @@ release verification are implemented and released.**
14
15
  tracked map documents
15
16
  |
16
17
  v
17
- MapDocumentLoader -> MapValidator -> BusinessGraph
18
- |
19
- +--------------+--------------+
20
- | |
21
- v v
22
- ContextQueryService MapProjector
23
- | |
24
- v v
25
- stable JSON result SVG / static HTML
18
+ MapDocumentLoader -> MapValidator -> BusinessFlowValidator -> BusinessGraph
19
+ |
20
+ +---------------------------+-------------------+
21
+ | |
22
+ v v
23
+ ContextQueryService MapProjector + FlowProjector
24
+ | |
25
+ v v
26
+ relationship + flow JSON shared relationship / flow Viewer
26
27
 
27
28
  Calling Agent
28
29
  -> activates from business task meaning
@@ -92,19 +93,28 @@ actionable issue that can be collected safely in one run, including duplicate
92
93
  IDs, missing relation endpoints, containment cycles, invalid kinds, and
93
94
  malformed anchors. It owns deterministic validity, not current-source truth.
94
95
 
96
+ ### BusinessFlowValidator
97
+
98
+ Validates scenario ownership, flow and step identity, concept and transition
99
+ references, action/decision/outcome branch shape, and reachability. Cycles are
100
+ valid. It owns structural flow coherence while current source and durable
101
+ product evidence decide whether the described business path is current.
102
+
95
103
  ### BusinessGraph
96
104
 
97
- Holds normalized immutable nodes, relations, aliases, containment indexes, and
98
- incoming/outgoing relation indexes for one command. It exposes domain
99
- operations in terms of business concepts rather than file layout or parser
100
- objects.
105
+ Holds normalized immutable nodes, relations, flows, aliases, containment
106
+ indexes, and incoming/outgoing relation indexes for one command. It exposes
107
+ domain operations in terms of business concepts and scenario paths rather than
108
+ file layout or parser objects. Related flows are derived from scenario
109
+ containment and step concept references.
101
110
 
102
111
  ### ContextQueryService
103
112
 
104
113
  Resolves a concept by stable ID, name, or alias and returns the smallest useful
105
114
  business neighborhood: ancestors, direct children, incoming and outgoing
106
- relations, referenced concepts, summaries, and navigation anchors. It reports
107
- ambiguity explicitly rather than selecting a hidden match.
115
+ relations, referenced concepts, summaries, navigation anchors, and complete
116
+ related flows. It reports ambiguity explicitly rather than selecting a hidden
117
+ match.
108
118
 
109
119
  ### MapProjector
110
120
 
@@ -114,16 +124,26 @@ concepts as visible boundary nodes. Every projection distinguishes semantic
114
124
  containment from directed horizontal relations and preserves stable element
115
125
  identities for repeatable layout and inspection.
116
126
 
127
+ ### FlowProjector
128
+
129
+ Builds one deterministic top-to-bottom SVG per business flow. Dagre owns step
130
+ placement and transition routing; action, decision, and outcome steps preserve
131
+ distinct visual semantics, while labeled decision branches remain visible on
132
+ their transitions. The projector reads normalized flow meaning and owns no
133
+ query or maintenance decisions.
134
+
117
135
  ### ViewerPage
118
136
 
119
137
  Owns the compact human inspection surface shared by static export and Web. It
120
- combines project and business-domain selection, map statistics, a restrained
121
- legend, pan, zoom, and fit-to-view around deterministic SVG projections. Cards
122
- render stable business meaning only. Pointer or keyboard selection opens the
123
- node's navigation anchors in an overlaid desktop side panel or narrow-screen
124
- bottom panel without relaying out the graph. Camera coordinates use the SVG
125
- `xMidYMid meet` scale and letterbox offsets for both pointer zoom and pan. Its
126
- browser interaction state is disposable and never enters tracked map data.
138
+ combines project selection, relationship/flow switching, business-domain or
139
+ flow selection, map statistics, a restrained legend, pan, zoom, and fit-to-view
140
+ around deterministic SVG projections. Cards render stable business meaning
141
+ only. Pointer or keyboard selection opens the node's navigation anchors and
142
+ derived related-flow links in an overlaid desktop side panel or narrow-screen
143
+ bottom panel. Selecting a related flow switches to its projected path. Camera
144
+ coordinates use the SVG `xMidYMid meet` scale and letterbox offsets for both
145
+ pointer zoom and pan. Its browser interaction state is disposable and never
146
+ enters tracked map data.
127
147
 
128
148
  ### LocalWebApplication And LocalWebServer
129
149
 
@@ -146,9 +166,12 @@ interpretation of its own.
146
166
  Owns the business-understanding workflow for every business-changing task. It
147
167
  activates from task meaning, converts a natural-language task into one bounded
148
168
  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.
169
+ current-evidence business model needed for the decision, traces relevant
170
+ business-flow branches before and after the change, and continues through the
171
+ repository's normal implementation and verification process. It classifies a
172
+ source/flow discrepancy before proposing either a code repair or a `flow`
173
+ maintenance candidate. Source editing and engineering judgment remain with the
174
+ calling Agent.
152
175
 
153
176
  The Skill invokes `context` through a small contract-checking adapter. The
154
177
  adapter prefers the CLI distributed with the Skill and accepts a PATH command
@@ -160,13 +183,14 @@ contract when another installed product uses the same executable name.
160
183
  Owns post-integration and periodic candidate triage after
161
184
  `ReconciliationService` has produced one read-only report. It selects one
162
185
  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.
186
+ tracked product meaning, reconstructs `flow` candidates at business granularity,
187
+ resolves an existing or initial domain-owned YAML surface, leaves unresolved
188
+ and implementation-local observations outside the canonical map, and submits
189
+ any accepted correction as one normal reviewed YAML change. A `MAP_NOT_FOUND`
190
+ repository can bootstrap one bounded domain when current evidence establishes
191
+ its stable identity. Source confirmation, map editing, validation, rendering,
192
+ Git diff, and independent review remain Agent and repository responsibilities
193
+ rather than CLI side effects.
170
194
 
171
195
  The Skill keeps Work, Review, and Integration as separate evidence stages. Work
172
196
  prepares classifications and an observation document without consuming any
@@ -287,7 +311,7 @@ rather than local build effects.
287
311
  | --- | --- | --- | --- |
288
312
  | Business-map documents | Target repository | Git history | Normal reviewed file edit |
289
313
  | Parsed documents | One CLI invocation | Parse phase | Recreated from tracked files |
290
- | Normalized graph | One CLI invocation | Query/render phase | Recreated after validation |
314
+ | Normalized map with relationships and flows | One CLI invocation | Query/render phase | Recreated after validation |
291
315
  | Rendered output | Calling workflow | Reproducible artifact | Regenerated from the graph |
292
316
  | Bundled Skill payloads | Installed npm package | Package version | Replaced only by exact package installation |
293
317
  | Managed user Skills | User home | Across repositories and CLI invocations | Per-Skill `semantic-atlas setup` atomic replacement |
@@ -321,7 +345,7 @@ application services
321
345
  filesystem, parser, CLI, and rendering adapters
322
346
  ```
323
347
 
324
- Domain contracts contain concept kinds, relation types, normalized graph
348
+ Domain contracts contain concept kinds, relation and flow types, normalized map
325
349
  objects, selectors, and query results. They do not import CLI, YAML, rendering,
326
350
  filesystem, Git, or framework types.
327
351
 
@@ -360,7 +384,8 @@ discriminant.
360
384
  `context` returns ambiguity when multiple concepts match the term. Callers can
361
385
  then use a stable ID. A missing concept is a bounded map result and routes the
362
386
  Agent to a bounded current-evidence business model; it is not a repository
363
- failure.
387
+ failure. A successful result includes every flow related through scenario
388
+ containment or direct step concept references.
364
389
 
365
390
  `setup`, `upgrade`, and `--version` do not discover a repository or load a
366
391
  business map. Their results expose the package version and managed Skill paths
@@ -390,12 +415,15 @@ checks:
390
415
  - at most one direct `part_of` parent per node;
391
416
  - acyclic `part_of` containment;
392
417
  - well-formed aliases and navigation anchors;
418
+ - unique scenario-owned flow identities and resolvable step references;
419
+ - valid action, decision, and outcome branch shape;
420
+ - reachability of every step from its flow entry while allowing cycles;
393
421
  - deterministic normalization independent of input file order.
394
422
 
395
423
  Validation does not claim that a path exists, a symbol still has the same name,
396
- or a business relation still matches current code. Those are task-time
397
- investigation questions. A separate advisory diagnostic may report obviously
398
- missing paths without changing graph validity.
424
+ or a business relation or flow still matches current behavior. Those are
425
+ task-time investigation questions. A separate advisory diagnostic may report
426
+ obviously missing paths without changing graph validity.
399
427
 
400
428
  ## Error Semantics
401
429
 
@@ -451,7 +479,8 @@ documents load.
451
479
 
452
480
  Ordinary feature branches read their branch's map revision. Durable changes use
453
481
  normal Git merge behavior. Review focuses on business meaning, stable IDs,
454
- relationship direction, and whether the update belongs in the shared map.
482
+ relationship direction, labeled branch outcomes, and whether the update belongs
483
+ in the shared map.
455
484
 
456
485
  Every business-changing task writes its own immutable observation and maintenance
457
486
  disposition. Candidate-producing results can enter post-integration maintenance
@@ -4,8 +4,9 @@ This page defines how the initial product proves that an advisory business map
4
4
  improves engineering accuracy and reduces routine human supervision. It applies
5
5
  to the CLI, renderer, Agent Skill, and real-project evaluation.
6
6
 
7
- **Status: accepted initial protocol; controlled Skill fixtures and the private
8
- real-project evaluation pass.**
7
+ **Status: accepted initial protocol; controlled relationship fixtures and the
8
+ private real-project evaluation pass. Business-flow behavior is covered by the
9
+ current source candidate and still needs longitudinal real-task evidence.**
9
10
 
10
11
  ## Evaluation Question
11
12
 
@@ -43,6 +44,13 @@ The agent identifies required incoming and outgoing collaborators, affected
43
44
  data, invariants, interfaces, tests, and asynchronous consumers. It avoids
44
45
  unsupported expansion into unrelated areas.
45
46
 
47
+ ### Business-path accuracy
48
+
49
+ For a task that intersects a retained flow, the agent identifies the affected
50
+ actions, decisions, labeled branches, and outcomes. A refactor preserves every
51
+ confirmed branch that remains part of the product behavior, while a deliberate
52
+ business change produces an explicit flow-maintenance decision.
53
+
46
54
  ### Evidence accuracy
47
55
 
48
56
  Every claim that controls the change is confirmed in current source, tests,
@@ -83,6 +91,8 @@ The first real-project suite contains at least:
83
91
  7. A contradicted-relation case where current evidence must override the map.
84
92
  8. A code-quality case where the first runnable implementation would create an
85
93
  unclear responsibility or unnecessary mechanism.
94
+ 9. A branch-sensitive refactor where a broad implementation still appears to
95
+ work but violates a retained business decision or outcome.
86
96
 
87
97
  Cases use real repository structure and behavior. Private business facts stay
88
98
  inside the private evaluation workspace and are summarized publicly only in
@@ -94,7 +104,9 @@ The public repository contains a de-identified miniature engineering system at
94
104
  `tests/fixtures/agent-skill/repository`. Its case contract covers an upstream
95
105
  root cause, an interface with a downstream consumer, missing map knowledge, an
96
106
  ambiguous term, a node without anchors, a stale anchor, and a relation that
97
- current source contradicts.
107
+ current source contradicts. The controlled Commerce map also contains one
108
+ authorization flow so contract tests prove that `context` returns relevant
109
+ scenario paths without treating them as current-source truth.
98
110
 
99
111
  Automated checks prove that each initial selector produces the intended public
100
112
  CLI outcome and that every acceptance oracle points to present source, test, or
@@ -140,6 +152,7 @@ The map file does not have to be repaired inside the engineering task.
140
152
  Each run records:
141
153
 
142
154
  - selected map nodes and relationships;
155
+ - related business flows and affected paths;
143
156
  - map statements used as investigation leads;
144
157
  - current files, tests, documents, or runtime evidence opened;
145
158
  - confirmed and contradicted map statements;
@@ -166,6 +179,8 @@ The initial product passes when:
166
179
  mechanical control produces no business-maintenance work;
167
180
  - required business boundaries and impact surfaces are identified in every
168
181
  case;
182
+ - each relevant flow is traced before and after the task, with confirmed
183
+ branches preserved or classified for maintenance;
169
184
  - implementation cases pass their behavioral tests and independent code-quality
170
185
  review;
171
186
  - map-assisted runs require no routine human correction after the task contract
package/docs/index.md CHANGED
@@ -14,7 +14,7 @@ verified gates.
14
14
  - [Architecture](architecture.md): stable responsibilities, lifecycle,
15
15
  dependency direction, collaboration model, and failure semantics.
16
16
  - [Map format](map-format.md): tracked graph documents, concepts, relations,
17
- anchors, validation, and query projections.
17
+ business flows, anchors, validation, and query projections.
18
18
  - [Accuracy observations](observations.md): task, independent-review, and
19
19
  maintenance evidence schemas, immutable local persistence, replay, privacy,
20
20
  derived summaries, and read-only actionable candidate reports.
@@ -1,8 +1,7 @@
1
1
  # Semantic Atlas Map Format
2
2
 
3
- This page defines the initial tracked document model, graph meaning, validation
4
- rules, and context projection. The implementation will publish a machine schema
5
- that follows this contract.
3
+ This page defines the tracked document model, relationship and flow meaning,
4
+ validation rules, and context projection.
6
5
 
7
6
  **Status: implemented by the `schemaVersion: 1` validation and context-query
8
7
  path.**
@@ -47,6 +46,8 @@ relations:
47
46
  type: part_of
48
47
  to: commerce
49
48
  summary: Orders is a durable Commerce capability.
49
+
50
+ flows: []
50
51
  ```
51
52
 
52
53
  Top-level `map` metadata identifies the owning document for diagnostics and
@@ -119,6 +120,86 @@ Relations describe durable business collaboration. They do not encode branch
119
120
  conditions, total order, retry behavior, loops, timing, or runtime execution
120
121
  state.
121
122
 
123
+ ## Business Flow Contract
124
+
125
+ A business flow describes one scenario's business-relevant actions,
126
+ decisions, labeled branches, and outcomes. It complements the relationship
127
+ graph: relations explain which concepts collaborate, while a flow explains how
128
+ one stable business path can reach different results.
129
+
130
+ ```yaml
131
+ flows:
132
+ - id: commerce.orders.place-order-flow
133
+ name: Place order
134
+ summary: Available stock becomes a reserved customer order.
135
+ scenario: commerce.orders.place-order
136
+ startsAt: check-inventory
137
+ steps:
138
+ - id: check-inventory
139
+ kind: decision
140
+ name: Is inventory available?
141
+ summary: Only available stock may proceed to order creation.
142
+ concept: commerce.orders.place-order.check-inventory
143
+ - id: create-order
144
+ kind: action
145
+ name: Create order
146
+ summary: The purchase becomes a durable customer order.
147
+ concept: commerce.orders.place-order.create-order
148
+ - id: order-placed
149
+ kind: outcome
150
+ name: Order placed
151
+ summary: The shopper receives a durable order.
152
+ concept: commerce.orders.order
153
+ - id: order-not-created
154
+ kind: outcome
155
+ name: Order not created
156
+ summary: Unavailable stock ends the attempt without an order.
157
+ transitions:
158
+ - from: check-inventory
159
+ when: available
160
+ to: create-order
161
+ - from: check-inventory
162
+ when: unavailable
163
+ to: order-not-created
164
+ - from: create-order
165
+ to: order-placed
166
+ ```
167
+
168
+ Each flow contains:
169
+
170
+ | Field | Required | Meaning |
171
+ | --- | --- | --- |
172
+ | `id` | yes | Stable repository-wide flow identity |
173
+ | `name` | yes | Human-facing scenario path name |
174
+ | `summary` | yes | Durable business result represented by the flow |
175
+ | `scenario` | yes | Existing `scenario` node that owns the flow |
176
+ | `startsAt` | yes | Entry step ID within the flow |
177
+ | `steps` | yes | One or more business-granularity steps |
178
+ | `transitions` | yes | Directed step connections and decision labels |
179
+ | `notes` | no | Durable qualification or known uncertainty |
180
+
181
+ Step kinds are:
182
+
183
+ - `action`: a meaningful business action with at most one unlabeled next step;
184
+ - `decision`: a business choice with at least two uniquely labeled branches;
185
+ - `outcome`: a business result that ends its path.
186
+
187
+ Each step has an ID unique within its flow, a name, a summary, and an optional
188
+ `concept` reference to an existing graph node. Referencing the same concept is
189
+ what lets the Viewer navigate from a relationship card into related flows;
190
+ there is no separately maintained link list.
191
+
192
+ Record a step when changing it can alter a user-visible result, durable data,
193
+ cost or provider usage, authorization or tenant isolation, an interface, or a
194
+ business outcome. Keep parameter validation, DTO conversion, helpers,
195
+ framework wiring, Service or Queue names, retries, and timing in current-source
196
+ evidence. Cycles are valid when the repeated business path itself is durable.
197
+
198
+ Flows remain advisory knowledge. A source discrepancy starts an investigation
199
+ into whether source regressed, product intent changed, the flow was already
200
+ stale, or available evidence is unresolved. It never synchronizes either side
201
+ automatically.
202
+
122
203
  ## Navigation Anchors
123
204
 
124
205
  Anchors help an agent enter the current repository. They are hints rather than
@@ -168,6 +249,13 @@ The complete repository map must satisfy:
168
249
  10. Aliases are unique for one node after case-insensitive normalization.
169
250
  11. Repository-relative anchors remain relative and normalized.
170
251
  12. Normalized graph order is deterministic across file discovery order.
252
+ 13. Flow IDs are repository-wide unique and each flow belongs to an existing
253
+ `scenario`.
254
+ 14. Step IDs are unique within a flow; `startsAt`, transition endpoints, and
255
+ optional concept references resolve.
256
+ 15. Actions have at most one unlabeled outgoing transition, decisions have at
257
+ least two uniquely labeled outgoing transitions, and outcomes have none.
258
+ 16. Every flow step is reachable from `startsAt`; cycles remain valid.
171
259
 
172
260
  Horizontal relation endpoints follow their business meaning:
173
261
 
@@ -209,7 +297,12 @@ For one selected node, `context` returns:
209
297
  - complete summaries for referenced endpoint nodes;
210
298
  - navigation anchors for all directly returned nodes;
211
299
  - the document IDs that supplied each item;
212
- - advisory anchor diagnostics when requested and available.
300
+ - advisory anchor diagnostics when requested and available;
301
+ - complete related flows, including steps and labeled transitions.
302
+
303
+ A flow is related when it belongs to the selected scenario, belongs to a
304
+ scenario under the selected domain or capability, or directly references the
305
+ selected operation, data, invariant, or interface from one of its steps.
213
306
 
214
307
  The result is intentionally local. The caller can query another returned stable
215
308
  ID when it needs to expand the investigation.
@@ -220,7 +313,8 @@ Agents edit the owning YAML file directly and use `semantic-atlas validate`
220
313
  before submitting a map change. Git diff is the review surface.
221
314
 
222
315
  Business-changing engineering tasks record observations outside the canonical
223
- map and create candidates only for stable meaning that needs maintenance.
316
+ map and create node, relation, anchor, or flow candidates only for stable
317
+ meaning that needs maintenance.
224
318
  Post-integration or periodic reconciliation confirms candidates in current
225
319
  evidence, updates one bounded neighborhood, validates the complete graph, and
226
320
  submits the normal repository change for review. A mapless repository can use
@@ -52,7 +52,9 @@ least one map query with one of these outcomes:
52
52
  Current-evidence dispositions are `confirmed`, `missing`, `stale`,
53
53
  `contradicted`, or `unresolved`. Each disposition and map-update candidate
54
54
  contains evidence references classified as source, test, tracked document, or
55
- runtime evidence. Candidate kinds are node, relation, and anchor. Every
55
+ runtime evidence. Candidate kinds are node, relation, anchor, and flow. A flow
56
+ candidate proposes a durable correction to a scenario's business actions,
57
+ decisions, labeled branches, or outcomes. Every
56
58
  candidate names its stable `businessDomainId` and carries a candidate-specific
57
59
  `confirmed`, `contradicted`, or `unresolved` disposition. Domain ownership and
58
60
  disposition are recorded explicitly because they cannot be inferred safely from
@@ -4,16 +4,19 @@ This page defines the accepted initial product. It answers what Semantic Atlas
4
4
  must improve, how agents and people use it, and which results establish
5
5
  that the product works.
6
6
 
7
- **Status: the public product is released and installed; the first target-domain
8
- pilot is in local use and longitudinal acceptance is in progress.**
7
+ **Status: the public product is released and installed; the business-flow
8
+ extension is implemented in the current source candidate, and longitudinal
9
+ acceptance remains in progress.**
9
10
 
10
11
  ## Purpose
11
12
 
12
13
  Semantic Atlas helps coding agents make more accurate engineering changes.
13
14
  Its Agent Skill builds a task-specific understanding of stable business
14
15
  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
+ likely source entry points before an agent changes code. Scenario flows add the
17
+ business-relevant decisions, branches, and outcomes that relationships alone
18
+ cannot express. An existing shared map accelerates that work; a missing map
19
+ starts a bounded current-evidence path.
17
20
 
18
21
  The map is a durable navigation prior rather than a synchronized copy of the
19
22
  codebase. Product structure normally changes more slowly than implementation,
@@ -31,6 +34,7 @@ reliably:
31
34
  - distinguish a downstream symptom from its upstream cause;
32
35
  - inspect the business collaborators, data, rules, and interfaces needed for a
33
36
  complete change;
37
+ - preserve business-relevant branches and outcomes during refactors;
34
38
  - choose an implementation scope that fixes the cause without unrelated work;
35
39
  - preserve readable responsibilities and maintainable code;
36
40
  - identify when the map is incomplete or contradicted by current evidence;
@@ -61,10 +65,12 @@ implementation vocabulary differ.
61
65
  A person views deterministic projections of the same tracked map to discuss
62
66
  business boundaries and relationships. A self-contained export and a local
63
67
  read-only Web command share the same interactive Viewer, including project and
64
- business-domain selection, pan, zoom, and fit-to-view. Graph cards prioritize
65
- business meaning by showing type, title, and description; selecting a card
66
- reveals its navigation anchors in a side panel or narrow-screen bottom panel.
67
- The visual surface does not become a second authoring format.
68
+ business-domain selection, relationship and flow views, pan, zoom, and
69
+ fit-to-view. Graph cards prioritize business meaning by showing type, title,
70
+ and description; selecting a card reveals its navigation anchors and related
71
+ flows in a side panel or narrow-screen bottom panel. A related flow link
72
+ switches directly to the scenario path. The visual surface does not become a
73
+ second authoring format.
68
74
 
69
75
  ### Post-task maintenance decision and reconciliation
70
76
 
@@ -106,6 +112,19 @@ navigate to, depend on, constrain, read, write, publish, consume, or change it.
106
112
  Methods, helpers, SQL statements, folders, and framework components remain
107
113
  source details until they express durable business meaning.
108
114
 
115
+ ### Business flows
116
+
117
+ A flow belongs to one existing scenario and orders business-granularity
118
+ `action`, `decision`, and `outcome` steps through transitions. Decision
119
+ transitions carry distinct business labels. A step can reference an existing
120
+ concept ID, which derives the relationship-to-flow navigation without a second
121
+ link contract.
122
+
123
+ Flows retain only steps that can change a user-visible result, durable data,
124
+ cost or provider usage, authorization or tenant isolation, an interface, or a
125
+ business outcome. They can express stable loops, but they remain advisory
126
+ knowledge rather than an executable workflow or synchronized copy of source.
127
+
109
128
  ## Authority And Accuracy
110
129
 
111
130
  Tracked map documents are authoritative for the shared map. They are not
@@ -151,9 +170,11 @@ The initial product delivers one coherent path:
151
170
  3. Normalize the complete map in memory.
152
171
  4. Find a business concept by stable ID, name, or alias.
153
172
  5. Return its containment, direct business relations, related concepts, and
154
- navigation anchors as structured JSON.
173
+ navigation anchors as structured JSON, together with complete related
174
+ business flows.
155
175
  6. Render deterministic interactive human-readable projections from the same
156
- graph as a portable HTML artifact or loopback Web session.
176
+ graph as a portable HTML artifact or loopback Web session, with linked
177
+ relationship and flow views.
157
178
  7. Package an Agent Skill that activates from business task meaning, routes map
158
179
  context or `MAP_NOT_FOUND` into current-source confirmation, and makes an
159
180
  explicit post-task maintenance decision.
@@ -175,7 +196,9 @@ The initial product does not provide:
175
196
  - mandatory map updates after every engineering task;
176
197
  - source editing, test execution, Git mutation, code review, or release
177
198
  orchestration;
178
- - branch conditions, retries, loops, timing, or executable workflow state;
199
+ - retry policy, timing, executable workflow state, or automatic source-to-flow
200
+ synchronization;
201
+ - a general workflow engine or full visual-diagram authoring system;
179
202
  - real-time multi-user map editing;
180
203
  - a second visual authoring representation.
181
204
 
@@ -191,8 +214,9 @@ the following:
191
214
  - tracked example and real-project map files load and validate through the
192
215
  public CLI;
193
216
  - context queries return the expected business owner, containment, incoming and
194
- outgoing relationships, and navigation anchors;
195
- - the renderer produces readable projections from the same normalized graph;
217
+ outgoing relationships, navigation anchors, and related flows;
218
+ - the renderer produces readable relationship and flow projections from the
219
+ same normalized map and links shared business concepts between them;
196
220
  - a package-managed Agent Skill activates for business-changing work with or
197
221
  without a map, probes bounded context before broad discovery, and confirms
198
222
  every change-controlling claim in current evidence;
@@ -214,9 +238,10 @@ human-intervention evidence as acceptance conditions.
214
238
  The initial product, managed setup, versioned observations, read-only
215
239
  reconciliation, public repository, and npm publication are complete. The first
216
240
  real target-domain map and reviewed observation pair are in local use. The
217
- current `semantic-atlas@2.1.3` release adds reviewed maintenance outcomes and
218
- the narrow orchestration-status contract while accepting only current managed
219
- Skill, observation, and claim contracts.
241
+ current `semantic-atlas@2.2.0` release adds scenario-owned business flows and a
242
+ linked relationship/flow Viewer while preserving reviewed maintenance outcomes,
243
+ the narrow orchestration-status contract, and current managed Skill,
244
+ observation, and claim contracts.
220
245
  Target-repository sharing and longitudinal acceptance remain separate verified
221
246
  stages.
222
247
 
@@ -259,9 +284,10 @@ Real-use evidence is separate from the Git business map and from business-map
259
284
  authority. The product records three immutable, versioned local artifacts:
260
285
 
261
286
  - `TaskObservation`: map query outcomes including `map_not_found`, selected
262
- concepts, current-evidence classification, explicitly domain-owned map-update
263
- candidates when maintenance is warranted, and any explicit human correction
264
- known to the task Agent. Reads and writes use task artifact v2;
287
+ concepts, current-evidence classification, explicitly domain-owned node,
288
+ relation, anchor, or flow candidates when maintenance is warranted, and any
289
+ explicit human correction known to the task Agent. Reads and writes use task
290
+ artifact v2;
265
291
  - `ReviewObservation`: the independent review verdict, correctness of the
266
292
  business boundary and upstream cause, impact completeness, required rework,
267
293
  and whether the map caused a wrong conclusion;
@@ -202,3 +202,53 @@ relations:
202
202
  type: writes
203
203
  to: commerce.inventory.stock
204
204
  summary: Inventory reservation updates stock availability.
205
+
206
+ flows:
207
+ - id: commerce.orders.place-order-flow
208
+ name: Place order
209
+ summary: Available stock becomes a reserved, durable customer order.
210
+ scenario: commerce.orders.place-order
211
+ startsAt: search-products
212
+ steps:
213
+ - id: search-products
214
+ kind: action
215
+ name: Search products
216
+ summary: The shopper identifies products for the order.
217
+ concept: commerce.orders.place-order.search-products
218
+ - id: check-inventory
219
+ kind: decision
220
+ name: Is inventory available?
221
+ summary: Only available stock may proceed to order creation.
222
+ concept: commerce.orders.place-order.check-inventory
223
+ - id: create-order
224
+ kind: action
225
+ name: Create order
226
+ summary: The purchase becomes a durable customer order.
227
+ concept: commerce.orders.place-order.create-order
228
+ - id: reserve-inventory
229
+ kind: action
230
+ name: Reserve inventory
231
+ summary: Available stock is reserved for the created order.
232
+ concept: commerce.orders.place-order.reserve-inventory
233
+ - id: order-placed
234
+ kind: outcome
235
+ name: Order placed
236
+ summary: The shopper has a durable order backed by reserved stock.
237
+ concept: commerce.orders.order
238
+ - id: order-not-created
239
+ kind: outcome
240
+ name: Order not created
241
+ summary: Unavailable stock ends the attempt without a durable order.
242
+ transitions:
243
+ - from: search-products
244
+ to: check-inventory
245
+ - from: check-inventory
246
+ when: available
247
+ to: create-order
248
+ - from: check-inventory
249
+ when: unavailable
250
+ to: order-not-created
251
+ - from: create-order
252
+ to: reserve-inventory
253
+ - from: reserve-inventory
254
+ to: order-placed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-atlas",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "description": "A Git-native advisory business map for coding agents.",
5
5
  "keywords": [
6
6
  "ai-agents",