semantic-atlas 0.3.0 → 1.0.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 +134 -166
- package/.agents/skills/semantic-atlas/agents/openai.yaml +4 -0
- package/.agents/skills/semantic-atlas/references/observations.md +131 -0
- package/.agents/skills/semantic-atlas/scripts/query-context.mjs +110 -0
- package/.agents/skills/semantic-atlas-maintenance/SKILL.md +93 -0
- package/.agents/skills/semantic-atlas-maintenance/agents/openai.yaml +4 -0
- package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +56 -0
- package/README.md +134 -239
- package/dist/application/map-application.d.ts +24 -0
- package/dist/application/map-application.d.ts.map +1 -0
- package/dist/application/map-application.js +134 -0
- package/dist/application/map-application.js.map +1 -0
- package/dist/cli/bin.js +6 -35
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/observation-commands.d.ts +16 -0
- package/dist/cli/observation-commands.d.ts.map +1 -0
- package/dist/cli/observation-commands.js +118 -0
- package/dist/cli/observation-commands.js.map +1 -0
- package/dist/cli/projection-writer.d.ts +2 -0
- package/dist/cli/projection-writer.d.ts.map +1 -0
- package/dist/cli/projection-writer.js +9 -0
- package/dist/cli/projection-writer.js.map +1 -0
- package/dist/cli/reconciliation-command.d.ts +7 -0
- package/dist/cli/reconciliation-command.d.ts.map +1 -0
- package/dist/cli/reconciliation-command.js +33 -0
- package/dist/cli/reconciliation-command.js.map +1 -0
- package/dist/cli/run-cli.d.ts +21 -0
- package/dist/cli/run-cli.d.ts.map +1 -0
- package/dist/cli/run-cli.js +299 -0
- package/dist/cli/run-cli.js.map +1 -0
- package/dist/contracts/cli.d.ts +166 -1211
- package/dist/contracts/cli.d.ts.map +1 -1
- package/dist/contracts/cli.js +2 -232
- package/dist/contracts/cli.js.map +1 -0
- package/dist/contracts/insights.d.ts +39 -1
- package/dist/contracts/insights.d.ts.map +1 -1
- package/dist/contracts/insights.js +2 -1
- package/dist/contracts/insights.js.map +1 -0
- package/dist/contracts/map.d.ts +154 -0
- package/dist/contracts/map.d.ts.map +1 -0
- package/dist/contracts/map.js +60 -0
- package/dist/contracts/map.js.map +1 -0
- package/dist/contracts/observation.d.ts +649 -0
- package/dist/contracts/observation.d.ts.map +1 -0
- package/dist/contracts/observation.js +140 -0
- package/dist/contracts/observation.js.map +1 -0
- package/dist/contracts/projection.d.ts +7 -0
- package/dist/contracts/projection.d.ts.map +1 -0
- package/dist/contracts/projection.js +2 -0
- package/dist/contracts/projection.js.map +1 -0
- package/dist/contracts/reconciliation.d.ts +40 -0
- package/dist/contracts/reconciliation.d.ts.map +1 -0
- package/dist/contracts/reconciliation.js +2 -0
- package/dist/contracts/reconciliation.js.map +1 -0
- package/dist/index.d.ts +7 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -0
- package/dist/insights/insight-service.d.ts +14 -0
- package/dist/insights/insight-service.d.ts.map +1 -0
- package/dist/insights/insight-service.js +129 -0
- package/dist/insights/insight-service.js.map +1 -0
- package/dist/map/business-graph.d.ts +32 -0
- package/dist/map/business-graph.d.ts.map +1 -0
- package/dist/map/business-graph.js +122 -0
- package/dist/map/business-graph.js.map +1 -0
- package/dist/map/map-document-loader.d.ts +13 -0
- package/dist/map/map-document-loader.d.ts.map +1 -0
- package/dist/map/map-document-loader.js +86 -0
- package/dist/map/map-document-loader.js.map +1 -0
- package/dist/map/map-validator.d.ts +12 -0
- package/dist/map/map-validator.d.ts.map +1 -0
- package/dist/map/map-validator.js +322 -0
- package/dist/map/map-validator.js.map +1 -0
- package/dist/observations/observation-application.d.ts +23 -0
- package/dist/observations/observation-application.d.ts.map +1 -0
- package/dist/observations/observation-application.js +62 -0
- package/dist/observations/observation-application.js.map +1 -0
- package/dist/observations/observation-claim-manager.d.ts +13 -0
- package/dist/observations/observation-claim-manager.d.ts.map +1 -0
- package/dist/observations/observation-claim-manager.js +247 -0
- package/dist/observations/observation-claim-manager.js.map +1 -0
- package/dist/observations/observation-store.d.ts +43 -0
- package/dist/observations/observation-store.d.ts.map +1 -0
- package/dist/observations/observation-store.js +208 -0
- package/dist/observations/observation-store.js.map +1 -0
- package/dist/observations/repository-identity.d.ts +12 -0
- package/dist/observations/repository-identity.d.ts.map +1 -0
- package/dist/observations/repository-identity.js +108 -0
- package/dist/observations/repository-identity.js.map +1 -0
- package/dist/query/context-query-service.d.ts +15 -0
- package/dist/query/context-query-service.d.ts.map +1 -0
- package/dist/query/context-query-service.js +36 -0
- package/dist/query/context-query-service.js.map +1 -0
- package/dist/reconciliation/reconciliation-service.d.ts +10 -0
- package/dist/reconciliation/reconciliation-service.d.ts.map +1 -0
- package/dist/reconciliation/reconciliation-service.js +116 -0
- package/dist/reconciliation/reconciliation-service.js.map +1 -0
- package/dist/rendering/map-projector.d.ts +8 -0
- package/dist/rendering/map-projector.d.ts.map +1 -0
- package/dist/rendering/map-projector.js +386 -0
- package/dist/rendering/map-projector.js.map +1 -0
- package/dist/setup/managed-skill-installer.d.ts +60 -0
- package/dist/setup/managed-skill-installer.d.ts.map +1 -0
- package/dist/setup/managed-skill-installer.js +307 -0
- package/dist/setup/managed-skill-installer.js.map +1 -0
- package/dist/setup/package-identity.d.ts +6 -0
- package/dist/setup/package-identity.d.ts.map +1 -0
- package/dist/setup/package-identity.js +16 -0
- package/dist/setup/package-identity.js.map +1 -0
- package/dist/setup/package-upgrader.d.ts +10 -22
- package/dist/setup/package-upgrader.d.ts.map +1 -1
- package/dist/setup/package-upgrader.js +60 -76
- package/dist/setup/package-upgrader.js.map +1 -0
- package/docs/architecture.md +428 -0
- package/docs/evaluation.md +220 -174
- package/docs/index.md +27 -40
- package/docs/map-format.md +224 -0
- package/docs/observations.md +175 -0
- package/docs/product-contract.md +295 -137
- package/examples/commerce.yaml +204 -0
- package/package.json +31 -30
- package/.agents/skills/semantic-atlas/references/graph-patch.md +0 -190
- package/.agents/skills/semantic-atlas/references/product-feedback.md +0 -34
- package/.agents/skills/semantic-atlas/references/result-routing.md +0 -104
- package/.agents/skills/semantic-atlas/references/snapshot-bootstrap.md +0 -42
- package/.agents/skills/semantic-atlas-insights/SKILL.md +0 -55
- package/README.zh-CN.md +0 -273
- package/dist/business-flow/business-flow-derivation-service.d.ts +0 -11
- package/dist/business-flow/business-flow-derivation-service.d.ts.map +0 -1
- package/dist/business-flow/business-flow-derivation-service.js +0 -151
- package/dist/business-flow/business-flow-draft.d.ts +0 -16
- package/dist/business-flow/business-flow-draft.d.ts.map +0 -1
- package/dist/business-flow/business-flow-draft.js +0 -150
- package/dist/business-flow/framework-business-strategy.d.ts +0 -7
- package/dist/business-flow/framework-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/framework-business-strategy.js +0 -1
- package/dist/business-flow/strategies/bullmq-business-strategy.d.ts +0 -10
- package/dist/business-flow/strategies/bullmq-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/bullmq-business-strategy.js +0 -79
- package/dist/business-flow/strategies/called-operation-derivation.d.ts +0 -13
- package/dist/business-flow/strategies/called-operation-derivation.d.ts.map +0 -1
- package/dist/business-flow/strategies/called-operation-derivation.js +0 -32
- package/dist/business-flow/strategies/graphql-business-strategy.d.ts +0 -8
- package/dist/business-flow/strategies/graphql-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/graphql-business-strategy.js +0 -65
- package/dist/business-flow/strategies/nestjs-business-strategy.d.ts +0 -8
- package/dist/business-flow/strategies/nestjs-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/nestjs-business-strategy.js +0 -72
- package/dist/business-flow/strategies/strategy-helpers.d.ts +0 -32
- package/dist/business-flow/strategies/strategy-helpers.d.ts.map +0 -1
- package/dist/business-flow/strategies/strategy-helpers.js +0 -49
- package/dist/business-flow/strategies/typeorm-business-strategy.d.ts +0 -10
- package/dist/business-flow/strategies/typeorm-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/typeorm-business-strategy.js +0 -136
- package/dist/business-flow/strategies/verified-invariant-strategy.d.ts +0 -5
- package/dist/business-flow/strategies/verified-invariant-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/verified-invariant-strategy.js +0 -38
- package/dist/business-flow/strategies/verified-test-strategy.d.ts +0 -5
- package/dist/business-flow/strategies/verified-test-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/verified-test-strategy.js +0 -26
- package/dist/business-flow/structural-flow-catalog.d.ts +0 -21
- package/dist/business-flow/structural-flow-catalog.d.ts.map +0 -1
- package/dist/business-flow/structural-flow-catalog.js +0 -125
- package/dist/business-flow/types.d.ts +0 -51
- package/dist/business-flow/types.d.ts.map +0 -1
- package/dist/business-flow/types.js +0 -1
- package/dist/cli/argument-parser.d.ts +0 -3
- package/dist/cli/argument-parser.d.ts.map +0 -1
- package/dist/cli/argument-parser.js +0 -200
- package/dist/cli/cli-application.d.ts +0 -39
- package/dist/cli/cli-application.d.ts.map +0 -1
- package/dist/cli/cli-application.js +0 -571
- package/dist/cli/cli-error.d.ts +0 -12
- package/dist/cli/cli-error.d.ts.map +0 -1
- package/dist/cli/cli-error.js +0 -44
- package/dist/cli/cli-presenter.d.ts +0 -14
- package/dist/cli/cli-presenter.d.ts.map +0 -1
- package/dist/cli/cli-presenter.js +0 -36
- package/dist/cli/insights-cli.d.ts +0 -6
- package/dist/cli/insights-cli.d.ts.map +0 -1
- package/dist/cli/insights-cli.js +0 -236
- package/dist/cli/main.d.ts +0 -3
- package/dist/cli/main.d.ts.map +0 -1
- package/dist/cli/main.js +0 -137
- package/dist/cli/standalone-cli.d.ts +0 -3
- package/dist/cli/standalone-cli.d.ts.map +0 -1
- package/dist/cli/standalone-cli.js +0 -96
- package/dist/cli/types.d.ts +0 -49
- package/dist/cli/types.d.ts.map +0 -1
- package/dist/cli/types.js +0 -1
- package/dist/contracts/graph.d.ts +0 -266
- package/dist/contracts/graph.d.ts.map +0 -1
- package/dist/contracts/graph.js +0 -182
- package/dist/contracts/identifiers.d.ts +0 -4
- package/dist/contracts/identifiers.d.ts.map +0 -1
- package/dist/contracts/identifiers.js +0 -7
- package/dist/contracts/public-contracts.d.ts +0 -5
- package/dist/contracts/public-contracts.d.ts.map +0 -1
- package/dist/contracts/public-contracts.js +0 -4
- package/dist/evaluation/comparison.d.ts +0 -30
- package/dist/evaluation/comparison.d.ts.map +0 -1
- package/dist/evaluation/comparison.js +0 -108
- package/dist/evaluation/contracts.d.ts +0 -301
- package/dist/evaluation/contracts.d.ts.map +0 -1
- package/dist/evaluation/contracts.js +0 -413
- package/dist/graph/graph-store.d.ts +0 -55
- package/dist/graph/graph-store.d.ts.map +0 -1
- package/dist/graph/graph-store.js +0 -912
- package/dist/graph/types.d.ts +0 -189
- package/dist/graph/types.d.ts.map +0 -1
- package/dist/graph/types.js +0 -1
- package/dist/insights/contracts.d.ts +0 -266
- package/dist/insights/contracts.d.ts.map +0 -1
- package/dist/insights/contracts.js +0 -124
- package/dist/insights/insights-store.d.ts +0 -73
- package/dist/insights/insights-store.d.ts.map +0 -1
- package/dist/insights/insights-store.js +0 -246
- package/dist/knowledge/business-knowledge-service.d.ts +0 -24
- package/dist/knowledge/business-knowledge-service.d.ts.map +0 -1
- package/dist/knowledge/business-knowledge-service.js +0 -200
- package/dist/knowledge/graph-patch-conflict-error.d.ts +0 -8
- package/dist/knowledge/graph-patch-conflict-error.d.ts.map +0 -1
- package/dist/knowledge/graph-patch-conflict-error.js +0 -12
- package/dist/knowledge/structural-target-binding.d.ts +0 -14
- package/dist/knowledge/structural-target-binding.d.ts.map +0 -1
- package/dist/knowledge/structural-target-binding.js +0 -11
- package/dist/package-metadata.d.ts +0 -2
- package/dist/package-metadata.d.ts.map +0 -1
- package/dist/package-metadata.js +0 -9
- package/dist/repository/git-command.d.ts +0 -3
- package/dist/repository/git-command.d.ts.map +0 -1
- package/dist/repository/git-command.js +0 -25
- package/dist/repository/repository-inspector.d.ts +0 -7
- package/dist/repository/repository-inspector.d.ts.map +0 -1
- package/dist/repository/repository-inspector.js +0 -84
- package/dist/repository/repository-language-support.d.ts +0 -14
- package/dist/repository/repository-language-support.d.ts.map +0 -1
- package/dist/repository/repository-language-support.js +0 -64
- package/dist/repository/types.d.ts +0 -9
- package/dist/repository/types.d.ts.map +0 -1
- package/dist/repository/types.js +0 -1
- package/dist/runtime/sqlite-compatibility-process.d.ts +0 -8
- package/dist/runtime/sqlite-compatibility-process.d.ts.map +0 -1
- package/dist/runtime/sqlite-compatibility-process.js +0 -20
- package/dist/setup/skill-installer.d.ts +0 -20
- package/dist/setup/skill-installer.d.ts.map +0 -1
- package/dist/setup/skill-installer.js +0 -187
- package/dist/snapshots/repository-snapshot.d.ts +0 -4
- package/dist/snapshots/repository-snapshot.d.ts.map +0 -1
- package/dist/snapshots/repository-snapshot.js +0 -119
- package/dist/snapshots/types.d.ts +0 -30
- package/dist/snapshots/types.d.ts.map +0 -1
- package/dist/snapshots/types.js +0 -1
- package/dist/storage/atlas-database.d.ts +0 -19
- package/dist/storage/atlas-database.d.ts.map +0 -1
- package/dist/storage/atlas-database.js +0 -433
- package/dist/storage/snapshot-store.d.ts +0 -19
- package/dist/storage/snapshot-store.d.ts.map +0 -1
- package/dist/storage/snapshot-store.js +0 -74
- package/dist/structural-backend/codegraph-backend.d.ts +0 -57
- package/dist/structural-backend/codegraph-backend.d.ts.map +0 -1
- package/dist/structural-backend/codegraph-backend.js +0 -1230
- package/dist/structural-backend/codegraph-worker-client.d.ts +0 -5
- package/dist/structural-backend/codegraph-worker-client.d.ts.map +0 -1
- package/dist/structural-backend/codegraph-worker-client.js +0 -118
- package/dist/structural-backend/codegraph-worker-protocol.d.ts +0 -35
- package/dist/structural-backend/codegraph-worker-protocol.d.ts.map +0 -1
- package/dist/structural-backend/codegraph-worker-protocol.js +0 -1
- package/dist/structural-backend/codegraph-worker.d.ts +0 -2
- package/dist/structural-backend/codegraph-worker.d.ts.map +0 -1
- package/dist/structural-backend/codegraph-worker.js +0 -131
- package/dist/structural-backend/process-instance.d.ts +0 -18
- package/dist/structural-backend/process-instance.d.ts.map +0 -1
- package/dist/structural-backend/process-instance.js +0 -207
- package/dist/structural-backend/structural-fact-changes.d.ts +0 -7
- package/dist/structural-backend/structural-fact-changes.d.ts.map +0 -1
- package/dist/structural-backend/structural-fact-changes.js +0 -78
- package/dist/structural-backend/structural-projection-bootstrapper.d.ts +0 -10
- package/dist/structural-backend/structural-projection-bootstrapper.d.ts.map +0 -1
- package/dist/structural-backend/structural-projection-bootstrapper.js +0 -295
- package/dist/structural-backend/structural-publication.d.ts +0 -13
- package/dist/structural-backend/structural-publication.d.ts.map +0 -1
- package/dist/structural-backend/structural-publication.js +0 -255
- package/dist/structural-backend/structural-write-lock.d.ts +0 -8
- package/dist/structural-backend/structural-write-lock.d.ts.map +0 -1
- package/dist/structural-backend/structural-write-lock.js +0 -415
- package/dist/structural-backend/types.d.ts +0 -144
- package/dist/structural-backend/types.d.ts.map +0 -1
- package/dist/structural-backend/types.js +0 -11
- package/dist/world/business-map-projector.d.ts +0 -14
- package/dist/world/business-map-projector.d.ts.map +0 -1
- package/dist/world/business-map-projector.js +0 -178
- package/dist/world/types.d.ts +0 -77
- package/dist/world/types.d.ts.map +0 -1
- package/dist/world/types.js +0 -1
- package/dist/world/world-graph-query.d.ts +0 -26
- package/dist/world/world-graph-query.d.ts.map +0 -1
- package/dist/world/world-graph-query.js +0 -250
- package/dist/world/world-model-service.d.ts +0 -21
- package/dist/world/world-model-service.d.ts.map +0 -1
- package/dist/world/world-model-service.js +0 -219
- package/dist/world/world-snapshot-store.d.ts +0 -40
- package/dist/world/world-snapshot-store.d.ts.map +0 -1
- package/dist/world/world-snapshot-store.js +0 -581
- package/docs/README.md +0 -30
- package/docs/architecture/codegraph-backend.md +0 -190
- package/docs/architecture/continuous-business-learning.md +0 -240
- package/docs/contracts/cli-v1.md +0 -164
- package/docs/contracts/graph-model.md +0 -106
- package/docs/contracts/graph-patch-v1.md +0 -105
- package/docs/contracts/insights-v1.md +0 -84
- package/docs/log.md +0 -80
- package/docs/mindmaps/semantic-atlas-overview.drawio +0 -255
- package/docs/mindmaps/semantic-atlas-overview.png +0 -0
- package/docs/mindmaps/semantic-atlas-overview.zh-CN.drawio +0 -255
- package/docs/mindmaps/semantic-atlas-overview.zh-CN.png +0 -0
- package/schemas/cli-envelope-v1.schema.json +0 -1244
- package/schemas/evaluation-plan-v1.schema.json +0 -211
- package/schemas/evaluation-run-v1.schema.json +0 -659
- package/schemas/graph-patch-v1.schema.json +0 -392
- package/schemas/insights-envelope-v1.schema.json +0 -428
|
@@ -1,172 +1,140 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: semantic-atlas
|
|
3
|
-
description:
|
|
4
|
-
compatibility:
|
|
3
|
+
description: Query a repository's advisory business map before broad source discovery for business-changing feature, bug, refactor, and impact-analysis tasks. Use in repositories with docs/business-map files to find likely owners, collaborators, data, invariants, interfaces, and source anchors, then confirm every change-controlling claim in current evidence.
|
|
4
|
+
compatibility: Requires Node.js 24+, a bundled or PATH-compatible semantic-atlas CLI, and repository source access.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Semantic Atlas
|
|
8
8
|
|
|
9
|
-
Use the
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
## Conditional references
|
|
143
|
-
|
|
144
|
-
Load detailed procedures only after their matching observable state:
|
|
145
|
-
|
|
146
|
-
- Read [snapshot bootstrap](references/snapshot-bootstrap.md) only when status
|
|
147
|
-
reports `missing`, `stale`, failed, or incomplete state.
|
|
148
|
-
- Read [result routing](references/result-routing.md) only when a command returns
|
|
149
|
-
an error, warning, `hypothesis`, `unknown`, `unsupported`, `partial`, empty,
|
|
150
|
-
competing, or otherwise `insufficient` result.
|
|
151
|
-
- Read [GraphPatch authoring](references/graph-patch.md) only when the
|
|
152
|
-
knowledge-capture decision identifies durable verified knowledge to persist.
|
|
153
|
-
- Read [product feedback](references/product-feedback.md) only when source
|
|
154
|
-
confirmation shows that Atlas materially blocked or slowed the completed
|
|
155
|
-
task, or produced a confirmed misleading result.
|
|
156
|
-
|
|
157
|
-
## Answer contract
|
|
158
|
-
|
|
159
|
-
Use Atlas internally as context rather than dumping raw envelopes. State the
|
|
160
|
-
relevant business concepts, files, symbols, and relationships; distinguish
|
|
161
|
-
exact evidence from inference; identify unresolved boundaries and their source
|
|
162
|
-
fallback; cite authoritative source and verification; and mention reindexing,
|
|
163
|
-
semantic changes, or learned knowledge when they materially affect the result.
|
|
164
|
-
|
|
165
|
-
## Responsibility boundary
|
|
166
|
-
|
|
167
|
-
Semantic Atlas owns deterministic indexing, revision-aware map queries,
|
|
168
|
-
semantic change records, and evidence-bound business knowledge in local Atlas data.
|
|
169
|
-
The calling Agent owns concept extraction, natural-language reasoning,
|
|
170
|
-
source editing, tests, Git operations, and review. Keep repository-specific
|
|
171
|
-
facts in Atlas or authoritative source and keep this Skill reusable across
|
|
172
|
-
repositories.
|
|
9
|
+
Use the tracked business map as a compact navigation prior. Treat all returned
|
|
10
|
+
nodes, relations, summaries, and anchors as investigation leads; current
|
|
11
|
+
source, tests, tracked product documents, and required runtime evidence decide
|
|
12
|
+
what an engineering change may claim and do.
|
|
13
|
+
|
|
14
|
+
## Choose The Workflow
|
|
15
|
+
|
|
16
|
+
Use this workflow when a task can change business behavior, ownership, shared
|
|
17
|
+
data, an invariant, or an interface. Begin ordinary repository work directly
|
|
18
|
+
when the task is purely mechanical and its exact source boundary is already
|
|
19
|
+
established, such as formatting, a local rename, or generated-file refresh.
|
|
20
|
+
|
|
21
|
+
## Query The Smallest Useful Neighborhood
|
|
22
|
+
|
|
23
|
+
1. Read the task contract and repository instructions. Resolve the repository
|
|
24
|
+
root and keep all commands in the task's assigned worktree.
|
|
25
|
+
2. Choose one distinctive business term from the user-visible behavior. Prefer
|
|
26
|
+
an exact business name or stable task vocabulary over a framework, folder,
|
|
27
|
+
class, or method name.
|
|
28
|
+
3. Before broad source discovery, run the Skill's identity- and
|
|
29
|
+
contract-checking adapter:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
node "<skill-directory>/scripts/query-context.mjs" \
|
|
33
|
+
"<business-term>" --repo "<absolute-repository-root>"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
A package-bundled adapter invokes that package's CLI directly. A managed
|
|
37
|
+
user Skill first requires the PATH CLI version recorded by `setup`, then
|
|
38
|
+
verifies the v1 `context` envelope. This keeps an older command with the
|
|
39
|
+
same executable name from being interpreted as the current product.
|
|
40
|
+
|
|
41
|
+
4. Read the selected concept, ancestors, direct children, incoming and outgoing
|
|
42
|
+
relations, endpoint summaries, and anchors. Record them as hypotheses.
|
|
43
|
+
5. Query a returned stable ID only when a direct owner, upstream action,
|
|
44
|
+
downstream consumer, shared data concept, invariant, or interface could
|
|
45
|
+
change the implementation scope. Stop expanding when the current task has a
|
|
46
|
+
source-confirmable boundary; a complete graph traversal is not required.
|
|
47
|
+
|
|
48
|
+
## Route Map Outcomes
|
|
49
|
+
|
|
50
|
+
- A successful context result supplies likely business scope and source entry
|
|
51
|
+
points. Open the most decisive anchors first, then follow current imports,
|
|
52
|
+
callers, consumers, tests, and product documents as the behavior requires.
|
|
53
|
+
- `CONCEPT_AMBIGUOUS` supplies explicit candidates. Compare their stable IDs,
|
|
54
|
+
names, kinds, and task meaning, then query the matching ID. When current
|
|
55
|
+
behavior is needed to choose, search only the task term and candidate
|
|
56
|
+
vocabulary before selecting.
|
|
57
|
+
- `CONCEPT_NOT_FOUND` and `MAP_NOT_FOUND` are bounded map outcomes. Continue
|
|
58
|
+
with ordinary source discovery using user vocabulary, likely product docs,
|
|
59
|
+
and progressively narrower source searches.
|
|
60
|
+
- `MAP_DOCUMENT_INVALID`, an unavailable CLI, or an infrastructure failure
|
|
61
|
+
makes the map unavailable for this task. Preserve the error as context and
|
|
62
|
+
continue through the repository's normal discovery workflow.
|
|
63
|
+
- A node with no anchors still provides business vocabulary and relations.
|
|
64
|
+
Search its stable name, aliases, neighboring concepts, and interface terms,
|
|
65
|
+
then follow current code structure.
|
|
66
|
+
- A missing or stale file, directory, document, symbol, or search anchor weakens
|
|
67
|
+
that navigation hint. Use the node meaning and direct relations for a bounded
|
|
68
|
+
search, and confirm the replacement location in current evidence.
|
|
69
|
+
|
|
70
|
+
## Build A Current-Evidence Model
|
|
71
|
+
|
|
72
|
+
For every map statement that could control the change:
|
|
73
|
+
|
|
74
|
+
1. Open current source or tests that implement or exercise the behavior.
|
|
75
|
+
2. Open the tracked product document when it owns the durable rule or outcome.
|
|
76
|
+
3. Confirm both endpoints of an invocation, shared-data, invariant, publish, or
|
|
77
|
+
consume relation when that relation expands the required scope.
|
|
78
|
+
4. Use runtime evidence when the conclusion depends on deployed state rather
|
|
79
|
+
than repository behavior.
|
|
80
|
+
5. Classify each relevant hypothesis as confirmed, contradicted, or unresolved.
|
|
81
|
+
Let confirmed current evidence control the implementation. Replace a
|
|
82
|
+
contradicted relation with the source-supported collaborator in the
|
|
83
|
+
task-specific model. Keep unresolved statements out of decisive conclusions.
|
|
84
|
+
|
|
85
|
+
Trace a downstream symptom toward its confirmed upstream cause before editing.
|
|
86
|
+
For shared data or interfaces, inspect every confirmed producer and consumer
|
|
87
|
+
needed to preserve the contract. Keep unrelated neighbors outside the change.
|
|
88
|
+
|
|
89
|
+
## Implement And Verify
|
|
90
|
+
|
|
91
|
+
Continue through the repository's normal engineering workflow after the
|
|
92
|
+
current-evidence model is clear. Implement the confirmed cause and affected
|
|
93
|
+
collaborators, add regression coverage at the public behavior boundary, run
|
|
94
|
+
the repository's required checks, and review the final diff against the task
|
|
95
|
+
scope.
|
|
96
|
+
|
|
97
|
+
Final conclusions identify the business boundary, the decisive current
|
|
98
|
+
evidence, the implemented or proposed scope, and relevant verification. Phrase
|
|
99
|
+
map-only statements as leads or uncertainty rather than current behavior.
|
|
100
|
+
|
|
101
|
+
## Record The Task Observation
|
|
102
|
+
|
|
103
|
+
For business-changing work, read [references/observations.md](references/observations.md)
|
|
104
|
+
and record one task observation after the engineering result and verification
|
|
105
|
+
are known. Use a stable observation ID for the run and reuse the same complete
|
|
106
|
+
document when retrying an interrupted submission.
|
|
107
|
+
|
|
108
|
+
The task observation records the map-query outcome, selected concepts,
|
|
109
|
+
current-evidence dispositions, map-update candidates, and any explicit human
|
|
110
|
+
correction. Independent review owns accuracy judgments, so the task document
|
|
111
|
+
contains investigation evidence rather than a correctness verdict.
|
|
112
|
+
|
|
113
|
+
Submit the complete JSON document through the installed CLI:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
semantic-atlas observe task --stdin [--repo <repository-root>]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Report the recorded or idempotent outcome with the engineering result. When
|
|
120
|
+
the observation command fails, the engineering result remains unchanged;
|
|
121
|
+
report the observation failure separately so review can distinguish delivery
|
|
122
|
+
evidence from missing accuracy evidence.
|
|
123
|
+
|
|
124
|
+
## Report Durable Map Observations Separately
|
|
125
|
+
|
|
126
|
+
Ordinary task completion does not require editing `docs/business-map`. When
|
|
127
|
+
current evidence reveals a stable missing concept, stale anchor, or
|
|
128
|
+
contradicted relation, add a separate map-update candidate to the task report:
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
Map-update candidate: <node, relation, or anchor>
|
|
132
|
+
Business domain: <stable domain ID>
|
|
133
|
+
Disposition: <confirmed, contradicted, or unresolved>
|
|
134
|
+
Current evidence: <repository-relative source, test, or product document>
|
|
135
|
+
Durable correction: <concise proposed business meaning>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Keep the candidate separate from the engineering conclusion so later periodic
|
|
139
|
+
reconciliation can accept, refine, or discard it through the repository's
|
|
140
|
+
normal Git review workflow.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Accuracy Observation Contract
|
|
2
|
+
|
|
3
|
+
Create one immutable task observation after business-changing engineering work
|
|
4
|
+
has reached its current result. Generate `id` once, keep `recordedAt` stable,
|
|
5
|
+
and replay the same document when a submission result is uncertain.
|
|
6
|
+
|
|
7
|
+
## Task Observation
|
|
8
|
+
|
|
9
|
+
The task Agent records investigation evidence. It does not add review verdicts,
|
|
10
|
+
correctness fields, rework judgments, or map-regression judgments. Current task
|
|
11
|
+
observations use schema version 2.
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"schemaVersion": 2,
|
|
16
|
+
"id": "task-observation-unique-id",
|
|
17
|
+
"recordedAt": "2026-08-27T03:00:00.000Z",
|
|
18
|
+
"task": {
|
|
19
|
+
"taskId": "engineering-task-id",
|
|
20
|
+
"runId": "engineering-run-id"
|
|
21
|
+
},
|
|
22
|
+
"map": {
|
|
23
|
+
"queries": [
|
|
24
|
+
{
|
|
25
|
+
"selector": "Place order",
|
|
26
|
+
"outcome": "context",
|
|
27
|
+
"selectedConceptIds": ["commerce.orders.place-order"]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"dispositions": [
|
|
31
|
+
{
|
|
32
|
+
"status": "stale",
|
|
33
|
+
"summary": "Current source moved while the mapped business meaning stayed stable.",
|
|
34
|
+
"evidence": [
|
|
35
|
+
{
|
|
36
|
+
"kind": "source",
|
|
37
|
+
"reference": "src/orders/place-order.ts"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"mapUpdateCandidates": [
|
|
44
|
+
{
|
|
45
|
+
"businessDomainId": "commerce",
|
|
46
|
+
"kind": "anchor",
|
|
47
|
+
"disposition": "confirmed",
|
|
48
|
+
"summary": "Replace the stale source anchor during reconciliation.",
|
|
49
|
+
"evidence": [
|
|
50
|
+
{
|
|
51
|
+
"kind": "source",
|
|
52
|
+
"reference": "src/orders/place-order.ts"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Query outcomes are `context`, `concept_not_found`, `concept_ambiguous`,
|
|
61
|
+
`map_not_found`, or `unavailable`. Only `context` includes one or more
|
|
62
|
+
`selectedConceptIds`. Current-evidence dispositions are `confirmed`, `missing`,
|
|
63
|
+
`stale`, `contradicted`, or `unresolved`. Evidence kinds are `source`, `test`,
|
|
64
|
+
`document`, or `runtime`.
|
|
65
|
+
|
|
66
|
+
Every map-update candidate names its stable `businessDomainId`. Its disposition
|
|
67
|
+
is `confirmed` when current evidence supports the proposed correction,
|
|
68
|
+
`contradicted` when it replaces a mapped statement contradicted by current
|
|
69
|
+
evidence, or `unresolved` when it remains a maintenance lead. Periodic
|
|
70
|
+
maintenance preserves these task-time judgments and linked independent reviews,
|
|
71
|
+
then confirms durable business meaning again before editing canonical YAML.
|
|
72
|
+
Immutable task v1 observations remain readable after package upgrades, but
|
|
73
|
+
their candidates predate these ownership fields and therefore stay outside
|
|
74
|
+
domain reconciliation.
|
|
75
|
+
|
|
76
|
+
When a person explicitly corrects the task, add:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"humanCorrection": {
|
|
81
|
+
"summary": "The user corrected the business boundary.",
|
|
82
|
+
"dimensions": ["business_boundary"]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Correction dimensions are `business_boundary`, `upstream_cause`, `impact`, and
|
|
88
|
+
`map_use`.
|
|
89
|
+
|
|
90
|
+
Submit the document on standard input from the repository or provide `--repo`:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
semantic-atlas observe task --stdin --repo <repository-root>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The first submission returns `recorded`. An exact replay returns `idempotent`.
|
|
97
|
+
The same ID with changed content returns `OBSERVATION_CONFLICT`.
|
|
98
|
+
|
|
99
|
+
## Independent Review Observation
|
|
100
|
+
|
|
101
|
+
An independent reviewer references the retained task observation and owns the
|
|
102
|
+
accuracy assessment:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"schemaVersion": 1,
|
|
107
|
+
"id": "review-observation-unique-id",
|
|
108
|
+
"recordedAt": "2026-08-27T03:30:00.000Z",
|
|
109
|
+
"taskObservationId": "task-observation-unique-id",
|
|
110
|
+
"review": {
|
|
111
|
+
"taskId": "review-task-id",
|
|
112
|
+
"runId": "review-run-id",
|
|
113
|
+
"verdict": "approved",
|
|
114
|
+
"businessBoundary": "correct",
|
|
115
|
+
"upstreamCause": "correct",
|
|
116
|
+
"impactCompleteness": "complete",
|
|
117
|
+
"requiredRework": false,
|
|
118
|
+
"mapCausedRegression": false
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Submit it with:
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
semantic-atlas observe review --stdin --repo <repository-root>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
An approved review cannot contain an incorrect assessed dimension, required
|
|
130
|
+
rework, or a map-caused regression. A `changes_requested` review sets
|
|
131
|
+
`requiredRework` to `true` and can record the failed accuracy dimensions.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { access, readFile } from "node:fs/promises";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
|
|
5
|
+
const arguments_ = process.argv.slice(2);
|
|
6
|
+
if (arguments_.length === 0) {
|
|
7
|
+
fail("Usage: query-context.mjs <business-term> --repo <repository-root>");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const bundledCli = fileURLToPath(
|
|
11
|
+
new URL("../../../../dist/cli/bin.js", import.meta.url),
|
|
12
|
+
);
|
|
13
|
+
const command = await resolveCliCommand();
|
|
14
|
+
const result = spawnSync(command.executable, command.arguments, {
|
|
15
|
+
encoding: "utf8",
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
if (result.error) {
|
|
19
|
+
fail(`Could not run the semantic-atlas CLI: ${result.error.message}`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let envelope;
|
|
23
|
+
try {
|
|
24
|
+
envelope = JSON.parse(result.stdout);
|
|
25
|
+
} catch {
|
|
26
|
+
fail(
|
|
27
|
+
"The available semantic-atlas command does not implement the v1 context contract.",
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (envelope?.schemaVersion !== 1 || envelope?.command !== "context") {
|
|
32
|
+
fail(
|
|
33
|
+
"The available semantic-atlas command returned an incompatible context envelope.",
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
process.stdout.write(result.stdout);
|
|
38
|
+
process.stderr.write(result.stderr);
|
|
39
|
+
process.exitCode = result.status ?? 2;
|
|
40
|
+
|
|
41
|
+
async function resolveCliCommand() {
|
|
42
|
+
const managedIdentity = await readManagedIdentity();
|
|
43
|
+
if (managedIdentity) {
|
|
44
|
+
const versionResult = spawnSync("semantic-atlas", ["--version"], {
|
|
45
|
+
encoding: "utf8",
|
|
46
|
+
});
|
|
47
|
+
if (versionResult.error) {
|
|
48
|
+
fail(`Could not verify the managed semantic-atlas CLI: ${versionResult.error.message}`);
|
|
49
|
+
}
|
|
50
|
+
const installedVersion = versionResult.stdout.trim();
|
|
51
|
+
if (versionResult.status !== 0 || installedVersion !== managedIdentity.packageVersion) {
|
|
52
|
+
fail(
|
|
53
|
+
`The managed Semantic Atlas Skill requires CLI ${managedIdentity.packageVersion}, but ${installedVersion || "no compatible CLI"} is available.`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
executable: "semantic-atlas",
|
|
58
|
+
arguments: ["context", ...arguments_],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (await fileExists(bundledCli)) {
|
|
63
|
+
return {
|
|
64
|
+
executable: process.execPath,
|
|
65
|
+
arguments: [bundledCli, "context", ...arguments_],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
executable: "semantic-atlas",
|
|
71
|
+
arguments: ["context", ...arguments_],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function readManagedIdentity() {
|
|
76
|
+
try {
|
|
77
|
+
const marker = JSON.parse(
|
|
78
|
+
await readFile(
|
|
79
|
+
new URL("../.semantic-atlas-managed.json", import.meta.url),
|
|
80
|
+
"utf8",
|
|
81
|
+
),
|
|
82
|
+
);
|
|
83
|
+
if (
|
|
84
|
+
marker?.schemaVersion === 1
|
|
85
|
+
&& marker?.managedBy === "semantic-atlas"
|
|
86
|
+
&& marker?.skillName === "semantic-atlas"
|
|
87
|
+
&& typeof marker?.packageVersion === "string"
|
|
88
|
+
) {
|
|
89
|
+
return { packageVersion: marker.packageVersion };
|
|
90
|
+
}
|
|
91
|
+
fail("The managed Semantic Atlas Skill has an invalid package identity.");
|
|
92
|
+
} catch (error) {
|
|
93
|
+
if (error?.code === "ENOENT") return undefined;
|
|
94
|
+
fail("The managed Semantic Atlas Skill package identity could not be read.");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async function fileExists(filePath) {
|
|
99
|
+
try {
|
|
100
|
+
await access(filePath);
|
|
101
|
+
return true;
|
|
102
|
+
} catch {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function fail(message) {
|
|
108
|
+
process.stderr.write(`${message}\n`);
|
|
109
|
+
process.exit(2);
|
|
110
|
+
}
|