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,106 +0,0 @@
|
|
|
1
|
-
# Graph Model
|
|
2
|
-
|
|
3
|
-
## One graph, two ownership domains
|
|
4
|
-
|
|
5
|
-
Semantic Atlas exposes one world graph. Its two domains have different authorities and write lifecycles:
|
|
6
|
-
|
|
7
|
-
- structural nodes and relations are normalized from the embedded CodeGraph backend and are replaced or synchronized by indexing;
|
|
8
|
-
- business nodes and relations are evidence-bound Atlas assertions changed only through GraphPatch;
|
|
9
|
-
- evidence relations connect the domains and are rebound after indexing.
|
|
10
|
-
|
|
11
|
-
The domains are physically separated by lifecycle: CodeGraph structure lives in the current worktree's disposable `.atlas/codegraph.db`, while repository-wide Atlas knowledge and snapshot bindings live in `~/.semantic-atlas/repositories/<repository-id>/atlas.db`. Atlas does not copy CodeGraph nodes and edges into parallel structural tables. The world-graph query layer composes both stores in memory and returns one versioned Atlas contract.
|
|
12
|
-
|
|
13
|
-
## Node kinds
|
|
14
|
-
|
|
15
|
-
| Domain | Kind | Meaning |
|
|
16
|
-
| --- | --- | --- |
|
|
17
|
-
| Structural | `Repository` | The indexed worktree |
|
|
18
|
-
| Structural | `Module` | A code or framework composition unit |
|
|
19
|
-
| Structural | `File` | A normalized repository-relative source file |
|
|
20
|
-
| Structural | `Symbol` | A normalized CodeGraph declaration such as a class, function, method, field, interface, route, or component |
|
|
21
|
-
| Structural | `Test` | A backend-statically identified test declaration when such identity is available |
|
|
22
|
-
| Structural | `UnknownBoundary` | An unresolved or unsupported structural relationship |
|
|
23
|
-
| Business | `Capability` | A durable business ability |
|
|
24
|
-
| Business | `Scenario` | A user or system scenario within a capability |
|
|
25
|
-
| Business | `Operation` | A business action or use-case step |
|
|
26
|
-
| Business | `Invariant` | A rule that constrains behavior or data |
|
|
27
|
-
| Business | `Interface` | A business-facing API, event, queue, or integration contract |
|
|
28
|
-
| Business | `Data` | A business data concept or persisted record |
|
|
29
|
-
|
|
30
|
-
Repository and snapshot IDs are content identifiers produced by Atlas repository inspection. Public structural IDs are deterministic Atlas references derived from normalized backend identity, path, kind, and qualified name. Backend row IDs remain internal locators and may change after a CodeGraph upgrade or rebuild.
|
|
31
|
-
|
|
32
|
-
Business keys are stable slash-separated keys such as `commerce/orders/place-order`. The slash-separated text is a readable namespace, not hierarchy authority. Labels and aliases form stable vocabulary while evidence-bound summaries and `part_of` placement can evolve without changing the key.
|
|
33
|
-
|
|
34
|
-
## Relation kinds
|
|
35
|
-
|
|
36
|
-
| Domain | Relation | Meaning |
|
|
37
|
-
| --- | --- | --- |
|
|
38
|
-
| Structural | `contains` | A structural container owns a child |
|
|
39
|
-
| Structural | `declares` | A file or module declares a symbol |
|
|
40
|
-
| Structural | `imports` | A file or module imports another unit |
|
|
41
|
-
| Structural | `exports` | A file or module exports a symbol |
|
|
42
|
-
| Structural | `references` | A symbol or file references another symbol |
|
|
43
|
-
| Structural | `calls` | A symbol invokes another symbol |
|
|
44
|
-
| Structural | `extends` | A declaration extends another declaration |
|
|
45
|
-
| Structural | `implements` | A declaration implements a contract |
|
|
46
|
-
| Structural | `instantiates` | A symbol creates an instance |
|
|
47
|
-
| Structural | `decorated_by` | A declaration has a resolved decorator |
|
|
48
|
-
| Business | `part_of` | A business node belongs to another business node |
|
|
49
|
-
| Business | `invokes` | A scenario or operation invokes another operation |
|
|
50
|
-
| Business | `realized_by` | A business node is implemented by a structural node |
|
|
51
|
-
| Business | `reads` | A business action reads business data |
|
|
52
|
-
| Business | `writes` | A business action writes business data |
|
|
53
|
-
| Business | `publishes` | A business action publishes an interface or data contract |
|
|
54
|
-
| Business | `consumes` | A business action consumes an interface or data contract |
|
|
55
|
-
| Business | `constrained_by` | A business node is governed by an invariant |
|
|
56
|
-
| Business | `verified_by` | A business node is checked by an agent-verified structural declaration |
|
|
57
|
-
|
|
58
|
-
All learned relations originate at a business node. `realized_by` and `verified_by` target structural nodes; the other business relations target business nodes. A test directory or filename is structural context only. `map show` exposes an agent-verified declaration as a direct `verified_by` relation; the declaration remains a `Symbol` when the structural backend cannot identify a test case independently.
|
|
59
|
-
|
|
60
|
-
## Structural support
|
|
61
|
-
|
|
62
|
-
Structural results preserve backend provenance. Direct syntax and uniquely resolved relations can be reported as exact structural support. CodeGraph relations with heuristic provenance remain visibly inferred. Unresolved references become `UnknownBoundary` results rather than exact edges.
|
|
63
|
-
|
|
64
|
-
Structural support and business certainty are separate concepts. A structurally exact call edge does not by itself prove a business assertion, and an agent may create an inferred business relation from several exact structural facts.
|
|
65
|
-
|
|
66
|
-
## Evidence, certainty, and validity
|
|
67
|
-
|
|
68
|
-
Every learned business node summary and learned relation has a certainty and one or more evidence records containing:
|
|
69
|
-
|
|
70
|
-
- a public Atlas structural reference and optional internal backend locator;
|
|
71
|
-
- a normalized repository-relative source path;
|
|
72
|
-
- a qualified symbol identity and structural kind when available;
|
|
73
|
-
- a one-based source range;
|
|
74
|
-
- the SHA-256 content hash observed at learning time;
|
|
75
|
-
- the Atlas snapshot and structural-backend version observed at learning time.
|
|
76
|
-
|
|
77
|
-
Evidence does not have a cascading foreign key to CodeGraph rows. Its original locator is repository-wide; every successful worktree publication records a separate snapshot binding. Indexing one branch therefore cannot overwrite another branch's resolved reference or validity.
|
|
78
|
-
|
|
79
|
-
Certainty and validity are independent:
|
|
80
|
-
|
|
81
|
-
- `exact` means the evidence uniquely proves the business assertion;
|
|
82
|
-
- `inferred` means the evidence supports the assertion and includes agent inference;
|
|
83
|
-
- `hypothesis` is exploratory and is never a verified fact;
|
|
84
|
-
- `valid` means every evidence record uniquely rebinds and its source hash still matches;
|
|
85
|
-
- `stale` means at least one evidence record changed, disappeared, or became ambiguous;
|
|
86
|
-
- `unknown` describes an explicit structural boundary rather than a business assertion.
|
|
87
|
-
|
|
88
|
-
Validity is derived state and is never accepted as GraphPatch input. Stable business identity remains navigable while stale summaries and relations stay visibly stale. Certainty never upgrades automatically.
|
|
89
|
-
|
|
90
|
-
## Unknown boundaries
|
|
91
|
-
|
|
92
|
-
An `UnknownBoundary` records the unresolved operation, backend reason, location, and any finite candidates. Index results report unresolved-boundary counts and warnings; Atlas never converts a boundary into an exact edge. When a task reaches warned dynamic behavior, the Agent uses bounded `code search` results and authoritative source rather than assuming a missing relationship. Examples include unresolved references, reflection, runtime dependency lookup, dynamic imports, and non-unique string tokens.
|
|
93
|
-
|
|
94
|
-
## Business navigation and structural fallback
|
|
95
|
-
|
|
96
|
-
`map view` projects one canonical business graph into a visible frontier. Without a focus it exposes all current business nodes with no outgoing `part_of` relation as root regions. With a focus it exposes the focus's direct children, its root-to-focus breadcrumb, and the nearest visible external branches connected to its subtree. Any business kind may be a provisional root; an empty business graph returns no regions rather than structural directories.
|
|
97
|
-
|
|
98
|
-
`part_of` is the current business navigation hierarchy. Each business node has at most one outgoing `part_of` parent, and the hierarchy is acyclic. A later GraphPatch can atomically remove an old parent and add a broader parent while preserving the moved node's key, evidence, descendants, and non-hierarchy relationships. Structural nodes remain a separate evidence and source-navigation domain.
|
|
99
|
-
|
|
100
|
-
Non-hierarchy relations are stored only at the endpoints the Agent verified. A view lifts deeper endpoints to the visible frontier, hides relations that collapse inside one region, and groups the rest by visible endpoints and relation type. Every summary separates direct and aggregated contributor counts and preserves certainty and validity distributions. These connections are query projections and are never accepted as GraphPatch facts.
|
|
101
|
-
|
|
102
|
-
`map show` accepts one business key and returns only its direct learned relations, including direct `realized_by` and `verified_by` structural evidence. It has no depth option and does not recursively expand the CodeGraph projection.
|
|
103
|
-
|
|
104
|
-
Lexical search has two explicit domains. `map search` ranks Atlas business vocabulary and always returns business nodes. `code search` ranks CodeGraph symbols and paths and always returns structural nodes with current source locations and support. The calling AI uses structural search only when business knowledge is absent or insufficient, then opens source directly. The CLI does not add a language model or pretend lexical scores are business inference.
|
|
105
|
-
|
|
106
|
-
Structural nodes and relations include normalized `support.status` and `support.provenance`. Business assertions use `certainty`, `validity`, and evidence instead. Unknown boundaries keep their structural owner, unresolved operation, support, reason, source location, and finite candidates.
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# GraphPatch v1
|
|
2
|
-
|
|
3
|
-
GraphPatch is the only public write contract for agent-learned knowledge. It cannot create, change, or delete CodeGraph-backed structural nodes or relations. The normative input schema is `schemas/graph-patch-v1.schema.json`.
|
|
4
|
-
|
|
5
|
-
## Shape
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{
|
|
9
|
-
"schemaVersion": 1,
|
|
10
|
-
"baseSnapshotId": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
11
|
-
"nodeOperations": [
|
|
12
|
-
{
|
|
13
|
-
"op": "upsert",
|
|
14
|
-
"node": {
|
|
15
|
-
"key": "commerce/orders/place-order",
|
|
16
|
-
"kind": "Operation",
|
|
17
|
-
"label": "Place order",
|
|
18
|
-
"summary": "Validates and creates a customer order.",
|
|
19
|
-
"aliases": ["checkout"],
|
|
20
|
-
"certainty": "exact",
|
|
21
|
-
"evidence": [
|
|
22
|
-
{
|
|
23
|
-
"symbolId": "symbol:src/orders/order.service.ts#OrderService.placeOrder",
|
|
24
|
-
"file": "src/orders/order.service.ts",
|
|
25
|
-
"range": {
|
|
26
|
-
"start": { "line": 18, "column": 3 },
|
|
27
|
-
"end": { "line": 24, "column": 4 }
|
|
28
|
-
},
|
|
29
|
-
"contentHash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"relationOperations": [
|
|
36
|
-
{
|
|
37
|
-
"op": "upsert",
|
|
38
|
-
"relation": {
|
|
39
|
-
"from": {
|
|
40
|
-
"domain": "business",
|
|
41
|
-
"key": "commerce/orders/place-order"
|
|
42
|
-
},
|
|
43
|
-
"type": "realized_by",
|
|
44
|
-
"to": {
|
|
45
|
-
"domain": "structural",
|
|
46
|
-
"id": "symbol:src/orders/order.service.ts#OrderService.placeOrder"
|
|
47
|
-
},
|
|
48
|
-
"certainty": "exact",
|
|
49
|
-
"evidence": [
|
|
50
|
-
{
|
|
51
|
-
"symbolId": "symbol:src/orders/order.service.ts#OrderService.placeOrder",
|
|
52
|
-
"file": "src/orders/order.service.ts",
|
|
53
|
-
"range": {
|
|
54
|
-
"start": { "line": 18, "column": 3 },
|
|
55
|
-
"end": { "line": 24, "column": 4 }
|
|
56
|
-
},
|
|
57
|
-
"contentHash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Operations
|
|
67
|
-
|
|
68
|
-
Business node upserts contain a stable slash-separated `key`, one of `Capability`, `Scenario`, `Operation`, `Invariant`, `Interface`, or `Data`, plus a label, summary, aliases, certainty, and at least one evidence record. The key is stable vocabulary identity and does not encode authoritative hierarchy; the summary is an assertion governed by certainty and evidence. A node-only patch without assertion evidence is invalid. Removing a node uses `{ "op": "remove", "key": "..." }`.
|
|
69
|
-
|
|
70
|
-
Business relation upserts contain a source reference, relation type, target reference, certainty, and at least one evidence record. Removing a relation supplies its source, type, and target selector. The stable relation identity is that `(from, type, to)` tuple; repeated upserts replace the assertion and its evidence idempotently.
|
|
71
|
-
|
|
72
|
-
Reference domains make ownership explicit:
|
|
73
|
-
|
|
74
|
-
- `{ "domain": "business", "key": "..." }` addresses an existing or same-patch business node.
|
|
75
|
-
- `{ "domain": "structural", "id": "symbol:..." }` addresses an Atlas-normalized CodeGraph node in the base snapshot.
|
|
76
|
-
|
|
77
|
-
All learned relations originate at a business node. `realized_by` and `verified_by` target structural nodes; `part_of`, `invokes`, `reads`, `writes`, `publishes`, `consumes`, and `constrained_by` target business nodes.
|
|
78
|
-
|
|
79
|
-
### Business hierarchy
|
|
80
|
-
|
|
81
|
-
`part_of` alone defines current parent placement. Every business node may have at most one outgoing `part_of` parent, and the complete `part_of` graph must remain acyclic. A parentless node of any business kind is a current root.
|
|
82
|
-
|
|
83
|
-
Reparent an existing node or subtree in one patch: optionally upsert the new parent, remove the old `part_of` selector, and upsert the new `part_of` relation. Preserve the moved node key. Atlas applies relation removals before validating the final candidate hierarchy, so a valid reparent succeeds atomically while a second parent or cycle rejects the complete patch.
|
|
84
|
-
|
|
85
|
-
## Evidence and certainty
|
|
86
|
-
|
|
87
|
-
Each node or relation evidence item binds an Atlas structural symbol or test reference, normalized repository-relative file, one-based source range, and lowercase SHA-256 content hash. Atlas also records the backend locator and version needed for later rebinding. Evidence must resolve inside the same worktree and match the current completed snapshot exactly.
|
|
88
|
-
|
|
89
|
-
`exact` means the node summary or relation is uniquely established by evidence. `inferred` means the agent made a supported inference. `hypothesis` records exploration and remains visibly non-factual even while its evidence is current. Certainty never upgrades automatically.
|
|
90
|
-
|
|
91
|
-
## Atomic validation
|
|
92
|
-
|
|
93
|
-
`learn --stdin` performs these checks before writing:
|
|
94
|
-
|
|
95
|
-
1. The schema version and complete JSON value are valid.
|
|
96
|
-
2. `baseSnapshotId` equals the current working-tree snapshot.
|
|
97
|
-
3. Every referenced node exists either in the current snapshot or in the patch.
|
|
98
|
-
4. Relation endpoints and kinds satisfy the graph contract.
|
|
99
|
-
5. Every node and relation evidence symbol, path, range, and hash belongs to the current repository snapshot.
|
|
100
|
-
6. Removes do not leave dangling business relations.
|
|
101
|
-
7. The final `part_of` hierarchy has at most one parent per node and contains no cycle.
|
|
102
|
-
|
|
103
|
-
The patch is one transaction. Any failure rejects every operation with exit code 5 and a machine-readable error; retries start from a freshly read snapshot. No partial success is exposed.
|
|
104
|
-
|
|
105
|
-
Validity is derived rather than accepted from GraphPatch. After later indexing, only node summaries and relations with changed evidence become `stale`. Stable node identity and unaffected assertions remain available, and hypotheses remain hypotheses.
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# Insights Contract v1
|
|
2
|
-
|
|
3
|
-
## Question and scope
|
|
4
|
-
|
|
5
|
-
This page defines the local product-observability interface for Semantic Atlas.
|
|
6
|
-
It answers how a maintainer can evaluate adoption and confirmed friction without
|
|
7
|
-
adding work to a normal engineering task. The current contract is implemented
|
|
8
|
-
by `semantic-atlas insights` and `semantic-atlas feedback report`.
|
|
9
|
-
|
|
10
|
-
Insights are installation-scoped under `~/.semantic-atlas/insights.db`, or the
|
|
11
|
-
absolute `SEMANTIC_ATLAS_HOME` override. They are separate from each
|
|
12
|
-
repository's `atlas.db` knowledge and every worktree's `.atlas` projection.
|
|
13
|
-
|
|
14
|
-
## Data boundary
|
|
15
|
-
|
|
16
|
-
Every completed project command best-effort records one event containing:
|
|
17
|
-
|
|
18
|
-
- repository identity and the current snapshot identity when available;
|
|
19
|
-
- command name, outcome, exit code, stable warning codes, and rounded duration;
|
|
20
|
-
- a generated event ID and timestamp.
|
|
21
|
-
|
|
22
|
-
Events never contain command arguments, prompts, query text, source text, or
|
|
23
|
-
command output. A failure to write an event never changes the project command's
|
|
24
|
-
exit code, JSON response, or standard output.
|
|
25
|
-
|
|
26
|
-
`feedback report --stdin` stores explicit Agent input only when source
|
|
27
|
-
confirmation establishes meaningful product friction or a concrete improvement.
|
|
28
|
-
Each report includes a product classification, observed and expected behavior,
|
|
29
|
-
an optional suggestion, and up to five recent event IDs from the same
|
|
30
|
-
repository. The maintainer must keep this text concise and free of credentials,
|
|
31
|
-
source contents, prompts, command output, and unrelated task detail.
|
|
32
|
-
|
|
33
|
-
## Commands
|
|
34
|
-
|
|
35
|
-
| Command | Result |
|
|
36
|
-
| --- | --- |
|
|
37
|
-
| `semantic-atlas insights summary [--period <period>]` | Aggregates command outcomes, command names, warning codes, and feedback categories. |
|
|
38
|
-
| `semantic-atlas insights feedback [--period <period>] [--status <status>]` | Lists explicit feedback reports for review. |
|
|
39
|
-
| `semantic-atlas insights feedback update --stdin` | Writes one triage decision: `triaged`, `resolved`, or `dismissed`, with a required explanatory note. |
|
|
40
|
-
| `semantic-atlas feedback report --stdin` | Project-scoped write of one evidence-contextual product report. |
|
|
41
|
-
|
|
42
|
-
The default period is `today`; accepted period values are `today`, `yesterday`,
|
|
43
|
-
`7d`, `30d`, and `all`. Day boundaries use the executing machine's local time,
|
|
44
|
-
and stored timestamps are ISO-8601 UTC. `--pretty` indents insights responses.
|
|
45
|
-
|
|
46
|
-
## Envelope
|
|
47
|
-
|
|
48
|
-
`insights` commands write the strict, repository-independent schema in
|
|
49
|
-
`schemas/insights-envelope-v1.schema.json`:
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"schemaVersion": 1,
|
|
54
|
-
"status": "ok",
|
|
55
|
-
"data": {
|
|
56
|
-
"command": "insights.summary",
|
|
57
|
-
"range": {
|
|
58
|
-
"from": "2026-08-20T16:00:00.000Z",
|
|
59
|
-
"to": "2026-08-21T16:00:00.000Z"
|
|
60
|
-
},
|
|
61
|
-
"summary": {
|
|
62
|
-
"commands": { "total": 12, "outcomes": { "ok": 10, "partial": 2, "error": 0 }, "byCommand": [], "warningCodes": [] },
|
|
63
|
-
"feedback": { "total": 1, "byCategory": [] }
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
The envelope intentionally omits repository and snapshot fields because one
|
|
70
|
-
installation-level query can aggregate many repositories. Individual feedback
|
|
71
|
-
reports retain their hashed repository and nullable snapshot identity.
|
|
72
|
-
|
|
73
|
-
Invalid input returns the same envelope with `status: "error"`,
|
|
74
|
-
`data.error.code: "INVALID_INPUT"`, and exit code `2`. An internal local-store
|
|
75
|
-
failure returns `INTERNAL_ERROR` and exit code `1`. Successful data, including
|
|
76
|
-
an empty range, returns exit code `0`.
|
|
77
|
-
|
|
78
|
-
## Interpretation
|
|
79
|
-
|
|
80
|
-
Command volume and warnings show usage shape; they are not a retrieval-recall
|
|
81
|
-
or task-quality score. Evaluate a product change by connecting trends to
|
|
82
|
-
source-confirmed feedback, reproducible investigations, tests, and fresh-agent
|
|
83
|
-
task evaluation. The `semantic-atlas-insights` Skill provides the daily review
|
|
84
|
-
and triage workflow while the primary Skill stays focused on development work.
|
package/docs/log.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Semantic Atlas Knowledge Maintenance Log
|
|
2
|
-
|
|
3
|
-
This log records material documentation ingestion and revisions. Current
|
|
4
|
-
conclusions live on their owning pages rather than in this chronology.
|
|
5
|
-
|
|
6
|
-
## [2026-08-21] add | Local product insights and separate maintenance Skill
|
|
7
|
-
|
|
8
|
-
- Added passive, installation-level command observations plus explicit,
|
|
9
|
-
evidence-contextual feedback and a strict `insights` JSON envelope.
|
|
10
|
-
- Kept normal task context lean: the primary Skill loads feedback guidance only
|
|
11
|
-
after confirmed material friction, while a separately installed insights Skill
|
|
12
|
-
owns daily review and feedback triage.
|
|
13
|
-
- Defined the privacy boundary, interpretation limits, and independent
|
|
14
|
-
repository/worktree storage in `contracts/insights-v1.md`.
|
|
15
|
-
- Affected pages: `product-contract.md`, `contracts/cli-v1.md`,
|
|
16
|
-
`contracts/insights-v1.md`, and `index.md`.
|
|
17
|
-
|
|
18
|
-
## [2026-08-20] revise | Business-first README and managed package upgrade
|
|
19
|
-
|
|
20
|
-
- Rebuilt the bilingual README around the product gap between file search and
|
|
21
|
-
business understanding, task-driven learning, and one semantically zoomable
|
|
22
|
-
map.
|
|
23
|
-
- Added repository-independent `upgrade`: resolve npm `latest`, install the
|
|
24
|
-
exact target, verify the new CLI, and synchronize the new package's Skill.
|
|
25
|
-
- Kept `setup` as the repair and synchronization command for the currently
|
|
26
|
-
installed package, including the already-current upgrade path.
|
|
27
|
-
- Affected pages: `README.md`, `README.zh-CN.md`, `product-contract.md`, and
|
|
28
|
-
`contracts/cli-v1.md`.
|
|
29
|
-
|
|
30
|
-
## [2026-08-20] revise | Versioned evaluation command replay
|
|
31
|
-
|
|
32
|
-
- Bound each Fresh Agent run to the command-policy version that produced it.
|
|
33
|
-
- Preserved v4 replay for immutable structural-map records and introduced v5
|
|
34
|
-
for the business-first map and explicit code-search grammar.
|
|
35
|
-
- Kept current runs fail-closed against removed commands while allowing release
|
|
36
|
-
validation to re-audit historical evidence without rewriting it.
|
|
37
|
-
- Affected page: `evaluation.md`.
|
|
38
|
-
|
|
39
|
-
## [2026-08-20] revise | Managed Skill setup and CLI discovery
|
|
40
|
-
|
|
41
|
-
- Added repository-independent `setup`, help, and version commands before the
|
|
42
|
-
Git/SQLite lifecycle.
|
|
43
|
-
- Defined `~/.agents/skills/semantic-atlas` as the shared managed target with
|
|
44
|
-
atomic updates, package-version/content markers, and recognized legacy
|
|
45
|
-
`~/.codex/skills/semantic-atlas` migration.
|
|
46
|
-
- Replaced the separate repository Skill-installer journey with the bundled
|
|
47
|
-
npm package workflow and added installed-tarball setup/update verification.
|
|
48
|
-
- Affected pages: `README.md`, `README.zh-CN.md`, `product-contract.md`, and
|
|
49
|
-
`contracts/cli-v1.md`.
|
|
50
|
-
|
|
51
|
-
## [2026-08-20] revise | Semantic zoom and AI-first query contract
|
|
52
|
-
|
|
53
|
-
- Defined one canonical business graph with world/focused visible frontiers,
|
|
54
|
-
breadcrumbs, child/context regions, and evidence-preserving aggregate
|
|
55
|
-
connections.
|
|
56
|
-
- Replaced roots, children, mixed search, structural show, and depth traversal
|
|
57
|
-
with `map view`, business-only search/show, and explicit `code search`.
|
|
58
|
-
- Reframed the public API around the calling Agent's actual self-dogfood path:
|
|
59
|
-
business navigation, bounded code fallback, source confirmation, engineering
|
|
60
|
-
work, and task-driven knowledge capture.
|
|
61
|
-
- Synchronized the product contract, graph model, CLI contract, READMEs, and
|
|
62
|
-
Semantic Atlas Skill without compatibility aliases.
|
|
63
|
-
- Affected pages: `architecture/continuous-business-learning.md`,
|
|
64
|
-
`product-contract.md`, `contracts/graph-model.md`, and `contracts/cli-v1.md`.
|
|
65
|
-
|
|
66
|
-
## [2026-08-20] revise | Continuous business learning and evolving roots
|
|
67
|
-
|
|
68
|
-
- Added the continuous-learning architecture as the owning design for business
|
|
69
|
-
knowledge acquired during real engineering tasks.
|
|
70
|
-
- Defined roots as the current parentless business frontier rather than fixed
|
|
71
|
-
Capability roots or structural-module fallbacks.
|
|
72
|
-
- Defined stable keys, single-parent hierarchy, acyclic placement, and atomic
|
|
73
|
-
reparenting as the first implementation slice.
|
|
74
|
-
- Synchronized the product, graph, GraphPatch, CLI, README, and Agent Skill
|
|
75
|
-
contracts around task-driven learning and the `BUSINESS_KNOWLEDGE_EMPTY`
|
|
76
|
-
fallback.
|
|
77
|
-
- Established the documentation index and knowledge-base maintenance boundary.
|
|
78
|
-
- Affected pages: `architecture/continuous-business-learning.md`,
|
|
79
|
-
`product-contract.md`, `contracts/graph-model.md`, `contracts/graph-patch-v1.md`,
|
|
80
|
-
and `contracts/cli-v1.md`.
|