semantic-atlas 0.4.0 → 2.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.
Files changed (346) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +134 -166
  2. package/.agents/skills/semantic-atlas/agents/openai.yaml +4 -0
  3. package/.agents/skills/semantic-atlas/references/observations.md +130 -0
  4. package/.agents/skills/semantic-atlas/scripts/query-context.mjs +110 -0
  5. package/.agents/skills/semantic-atlas-maintenance/SKILL.md +93 -0
  6. package/.agents/skills/semantic-atlas-maintenance/agents/openai.yaml +4 -0
  7. package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +56 -0
  8. package/README.md +133 -265
  9. package/dist/application/map-application.d.ts +24 -0
  10. package/dist/application/map-application.d.ts.map +1 -0
  11. package/dist/application/map-application.js +134 -0
  12. package/dist/application/map-application.js.map +1 -0
  13. package/dist/cli/bin.js +6 -42
  14. package/dist/cli/bin.js.map +1 -0
  15. package/dist/cli/observation-commands.d.ts +16 -0
  16. package/dist/cli/observation-commands.d.ts.map +1 -0
  17. package/dist/cli/observation-commands.js +118 -0
  18. package/dist/cli/observation-commands.js.map +1 -0
  19. package/dist/cli/projection-writer.d.ts +2 -0
  20. package/dist/cli/projection-writer.d.ts.map +1 -0
  21. package/dist/cli/projection-writer.js +9 -0
  22. package/dist/cli/projection-writer.js.map +1 -0
  23. package/dist/cli/reconciliation-command.d.ts +7 -0
  24. package/dist/cli/reconciliation-command.d.ts.map +1 -0
  25. package/dist/cli/reconciliation-command.js +33 -0
  26. package/dist/cli/reconciliation-command.js.map +1 -0
  27. package/dist/cli/run-cli.d.ts +21 -0
  28. package/dist/cli/run-cli.d.ts.map +1 -0
  29. package/dist/cli/run-cli.js +299 -0
  30. package/dist/cli/run-cli.js.map +1 -0
  31. package/dist/contracts/cli.d.ts +166 -1211
  32. package/dist/contracts/cli.d.ts.map +1 -1
  33. package/dist/contracts/cli.js +2 -232
  34. package/dist/contracts/cli.js.map +1 -0
  35. package/dist/contracts/insights.d.ts +39 -1
  36. package/dist/contracts/insights.d.ts.map +1 -1
  37. package/dist/contracts/insights.js +2 -1
  38. package/dist/contracts/insights.js.map +1 -0
  39. package/dist/contracts/map.d.ts +154 -0
  40. package/dist/contracts/map.d.ts.map +1 -0
  41. package/dist/contracts/map.js +60 -0
  42. package/dist/contracts/map.js.map +1 -0
  43. package/dist/contracts/observation.d.ts +414 -0
  44. package/dist/contracts/observation.d.ts.map +1 -0
  45. package/dist/contracts/observation.js +125 -0
  46. package/dist/contracts/observation.js.map +1 -0
  47. package/dist/contracts/projection.d.ts +7 -0
  48. package/dist/contracts/projection.d.ts.map +1 -0
  49. package/dist/contracts/projection.js +2 -0
  50. package/dist/contracts/projection.js.map +1 -0
  51. package/dist/contracts/reconciliation.d.ts +40 -0
  52. package/dist/contracts/reconciliation.d.ts.map +1 -0
  53. package/dist/contracts/reconciliation.js +2 -0
  54. package/dist/contracts/reconciliation.js.map +1 -0
  55. package/dist/index.d.ts +7 -17
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +3 -9
  58. package/dist/index.js.map +1 -0
  59. package/dist/insights/insight-service.d.ts +14 -0
  60. package/dist/insights/insight-service.d.ts.map +1 -0
  61. package/dist/insights/insight-service.js +129 -0
  62. package/dist/insights/insight-service.js.map +1 -0
  63. package/dist/map/business-graph.d.ts +32 -0
  64. package/dist/map/business-graph.d.ts.map +1 -0
  65. package/dist/map/business-graph.js +122 -0
  66. package/dist/map/business-graph.js.map +1 -0
  67. package/dist/map/map-document-loader.d.ts +13 -0
  68. package/dist/map/map-document-loader.d.ts.map +1 -0
  69. package/dist/map/map-document-loader.js +86 -0
  70. package/dist/map/map-document-loader.js.map +1 -0
  71. package/dist/map/map-validator.d.ts +12 -0
  72. package/dist/map/map-validator.d.ts.map +1 -0
  73. package/dist/map/map-validator.js +322 -0
  74. package/dist/map/map-validator.js.map +1 -0
  75. package/dist/observations/observation-application.d.ts +23 -0
  76. package/dist/observations/observation-application.d.ts.map +1 -0
  77. package/dist/observations/observation-application.js +62 -0
  78. package/dist/observations/observation-application.js.map +1 -0
  79. package/dist/observations/observation-claim-manager.d.ts +17 -0
  80. package/dist/observations/observation-claim-manager.d.ts.map +1 -0
  81. package/dist/observations/observation-claim-manager.js +198 -0
  82. package/dist/observations/observation-claim-manager.js.map +1 -0
  83. package/dist/observations/observation-store.d.ts +43 -0
  84. package/dist/observations/observation-store.d.ts.map +1 -0
  85. package/dist/observations/observation-store.js +213 -0
  86. package/dist/observations/observation-store.js.map +1 -0
  87. package/dist/observations/repository-identity.d.ts +12 -0
  88. package/dist/observations/repository-identity.d.ts.map +1 -0
  89. package/dist/observations/repository-identity.js +108 -0
  90. package/dist/observations/repository-identity.js.map +1 -0
  91. package/dist/query/context-query-service.d.ts +15 -0
  92. package/dist/query/context-query-service.d.ts.map +1 -0
  93. package/dist/query/context-query-service.js +36 -0
  94. package/dist/query/context-query-service.js.map +1 -0
  95. package/dist/reconciliation/reconciliation-service.d.ts +10 -0
  96. package/dist/reconciliation/reconciliation-service.d.ts.map +1 -0
  97. package/dist/reconciliation/reconciliation-service.js +114 -0
  98. package/dist/reconciliation/reconciliation-service.js.map +1 -0
  99. package/dist/rendering/map-projector.d.ts +8 -0
  100. package/dist/rendering/map-projector.d.ts.map +1 -0
  101. package/dist/rendering/map-projector.js +386 -0
  102. package/dist/rendering/map-projector.js.map +1 -0
  103. package/dist/setup/managed-skill-installer.d.ts +60 -0
  104. package/dist/setup/managed-skill-installer.d.ts.map +1 -0
  105. package/dist/setup/managed-skill-installer.js +293 -0
  106. package/dist/setup/managed-skill-installer.js.map +1 -0
  107. package/dist/setup/package-identity.d.ts +6 -0
  108. package/dist/setup/package-identity.d.ts.map +1 -0
  109. package/dist/setup/package-identity.js +16 -0
  110. package/dist/setup/package-identity.js.map +1 -0
  111. package/dist/setup/package-upgrader.d.ts +10 -22
  112. package/dist/setup/package-upgrader.d.ts.map +1 -1
  113. package/dist/setup/package-upgrader.js +60 -76
  114. package/dist/setup/package-upgrader.js.map +1 -0
  115. package/docs/architecture.md +426 -0
  116. package/docs/evaluation.md +220 -174
  117. package/docs/index.md +27 -45
  118. package/docs/map-format.md +225 -0
  119. package/docs/observations.md +167 -0
  120. package/docs/product-contract.md +282 -165
  121. package/examples/commerce.yaml +204 -0
  122. package/package.json +31 -32
  123. package/.agents/skills/semantic-atlas/references/graph-patch.md +0 -190
  124. package/.agents/skills/semantic-atlas/references/product-feedback.md +0 -34
  125. package/.agents/skills/semantic-atlas/references/result-routing.md +0 -104
  126. package/.agents/skills/semantic-atlas/references/snapshot-bootstrap.md +0 -42
  127. package/.agents/skills/semantic-atlas-insights/SKILL.md +0 -55
  128. package/README.zh-CN.md +0 -296
  129. package/dist/business-flow/business-flow-derivation-service.d.ts +0 -11
  130. package/dist/business-flow/business-flow-derivation-service.d.ts.map +0 -1
  131. package/dist/business-flow/business-flow-derivation-service.js +0 -151
  132. package/dist/business-flow/business-flow-draft.d.ts +0 -16
  133. package/dist/business-flow/business-flow-draft.d.ts.map +0 -1
  134. package/dist/business-flow/business-flow-draft.js +0 -150
  135. package/dist/business-flow/framework-business-strategy.d.ts +0 -7
  136. package/dist/business-flow/framework-business-strategy.d.ts.map +0 -1
  137. package/dist/business-flow/framework-business-strategy.js +0 -1
  138. package/dist/business-flow/strategies/bullmq-business-strategy.d.ts +0 -10
  139. package/dist/business-flow/strategies/bullmq-business-strategy.d.ts.map +0 -1
  140. package/dist/business-flow/strategies/bullmq-business-strategy.js +0 -79
  141. package/dist/business-flow/strategies/called-operation-derivation.d.ts +0 -13
  142. package/dist/business-flow/strategies/called-operation-derivation.d.ts.map +0 -1
  143. package/dist/business-flow/strategies/called-operation-derivation.js +0 -32
  144. package/dist/business-flow/strategies/graphql-business-strategy.d.ts +0 -8
  145. package/dist/business-flow/strategies/graphql-business-strategy.d.ts.map +0 -1
  146. package/dist/business-flow/strategies/graphql-business-strategy.js +0 -65
  147. package/dist/business-flow/strategies/nestjs-business-strategy.d.ts +0 -8
  148. package/dist/business-flow/strategies/nestjs-business-strategy.d.ts.map +0 -1
  149. package/dist/business-flow/strategies/nestjs-business-strategy.js +0 -72
  150. package/dist/business-flow/strategies/strategy-helpers.d.ts +0 -32
  151. package/dist/business-flow/strategies/strategy-helpers.d.ts.map +0 -1
  152. package/dist/business-flow/strategies/strategy-helpers.js +0 -49
  153. package/dist/business-flow/strategies/typeorm-business-strategy.d.ts +0 -10
  154. package/dist/business-flow/strategies/typeorm-business-strategy.d.ts.map +0 -1
  155. package/dist/business-flow/strategies/typeorm-business-strategy.js +0 -136
  156. package/dist/business-flow/strategies/verified-invariant-strategy.d.ts +0 -5
  157. package/dist/business-flow/strategies/verified-invariant-strategy.d.ts.map +0 -1
  158. package/dist/business-flow/strategies/verified-invariant-strategy.js +0 -38
  159. package/dist/business-flow/strategies/verified-test-strategy.d.ts +0 -5
  160. package/dist/business-flow/strategies/verified-test-strategy.d.ts.map +0 -1
  161. package/dist/business-flow/strategies/verified-test-strategy.js +0 -26
  162. package/dist/business-flow/structural-flow-catalog.d.ts +0 -21
  163. package/dist/business-flow/structural-flow-catalog.d.ts.map +0 -1
  164. package/dist/business-flow/structural-flow-catalog.js +0 -125
  165. package/dist/business-flow/types.d.ts +0 -51
  166. package/dist/business-flow/types.d.ts.map +0 -1
  167. package/dist/business-flow/types.js +0 -1
  168. package/dist/cli/argument-parser.d.ts +0 -3
  169. package/dist/cli/argument-parser.d.ts.map +0 -1
  170. package/dist/cli/argument-parser.js +0 -200
  171. package/dist/cli/cli-application.d.ts +0 -39
  172. package/dist/cli/cli-application.d.ts.map +0 -1
  173. package/dist/cli/cli-application.js +0 -571
  174. package/dist/cli/cli-error.d.ts +0 -12
  175. package/dist/cli/cli-error.d.ts.map +0 -1
  176. package/dist/cli/cli-error.js +0 -44
  177. package/dist/cli/cli-presenter.d.ts +0 -14
  178. package/dist/cli/cli-presenter.d.ts.map +0 -1
  179. package/dist/cli/cli-presenter.js +0 -36
  180. package/dist/cli/insights-cli.d.ts +0 -6
  181. package/dist/cli/insights-cli.d.ts.map +0 -1
  182. package/dist/cli/insights-cli.js +0 -236
  183. package/dist/cli/main.d.ts +0 -3
  184. package/dist/cli/main.d.ts.map +0 -1
  185. package/dist/cli/main.js +0 -137
  186. package/dist/cli/standalone-cli.d.ts +0 -3
  187. package/dist/cli/standalone-cli.d.ts.map +0 -1
  188. package/dist/cli/standalone-cli.js +0 -104
  189. package/dist/cli/types.d.ts +0 -49
  190. package/dist/cli/types.d.ts.map +0 -1
  191. package/dist/cli/types.js +0 -1
  192. package/dist/cli/web-cli.d.ts +0 -9
  193. package/dist/cli/web-cli.d.ts.map +0 -1
  194. package/dist/cli/web-cli.js +0 -134
  195. package/dist/contracts/graph.d.ts +0 -266
  196. package/dist/contracts/graph.d.ts.map +0 -1
  197. package/dist/contracts/graph.js +0 -182
  198. package/dist/contracts/identifiers.d.ts +0 -4
  199. package/dist/contracts/identifiers.d.ts.map +0 -1
  200. package/dist/contracts/identifiers.js +0 -7
  201. package/dist/contracts/public-contracts.d.ts +0 -5
  202. package/dist/contracts/public-contracts.d.ts.map +0 -1
  203. package/dist/contracts/public-contracts.js +0 -4
  204. package/dist/evaluation/comparison.d.ts +0 -30
  205. package/dist/evaluation/comparison.d.ts.map +0 -1
  206. package/dist/evaluation/comparison.js +0 -108
  207. package/dist/evaluation/contracts.d.ts +0 -301
  208. package/dist/evaluation/contracts.d.ts.map +0 -1
  209. package/dist/evaluation/contracts.js +0 -413
  210. package/dist/graph/graph-store.d.ts +0 -55
  211. package/dist/graph/graph-store.d.ts.map +0 -1
  212. package/dist/graph/graph-store.js +0 -912
  213. package/dist/graph/types.d.ts +0 -189
  214. package/dist/graph/types.d.ts.map +0 -1
  215. package/dist/graph/types.js +0 -1
  216. package/dist/insights/contracts.d.ts +0 -266
  217. package/dist/insights/contracts.d.ts.map +0 -1
  218. package/dist/insights/contracts.js +0 -124
  219. package/dist/insights/insights-store.d.ts +0 -73
  220. package/dist/insights/insights-store.d.ts.map +0 -1
  221. package/dist/insights/insights-store.js +0 -246
  222. package/dist/knowledge/business-knowledge-service.d.ts +0 -24
  223. package/dist/knowledge/business-knowledge-service.d.ts.map +0 -1
  224. package/dist/knowledge/business-knowledge-service.js +0 -200
  225. package/dist/knowledge/graph-patch-conflict-error.d.ts +0 -8
  226. package/dist/knowledge/graph-patch-conflict-error.d.ts.map +0 -1
  227. package/dist/knowledge/graph-patch-conflict-error.js +0 -12
  228. package/dist/knowledge/structural-target-binding.d.ts +0 -14
  229. package/dist/knowledge/structural-target-binding.d.ts.map +0 -1
  230. package/dist/knowledge/structural-target-binding.js +0 -11
  231. package/dist/package-metadata.d.ts +0 -2
  232. package/dist/package-metadata.d.ts.map +0 -1
  233. package/dist/package-metadata.js +0 -9
  234. package/dist/repository/git-command.d.ts +0 -3
  235. package/dist/repository/git-command.d.ts.map +0 -1
  236. package/dist/repository/git-command.js +0 -25
  237. package/dist/repository/repository-inspector.d.ts +0 -8
  238. package/dist/repository/repository-inspector.d.ts.map +0 -1
  239. package/dist/repository/repository-inspector.js +0 -97
  240. package/dist/repository/repository-language-support.d.ts +0 -14
  241. package/dist/repository/repository-language-support.d.ts.map +0 -1
  242. package/dist/repository/repository-language-support.js +0 -64
  243. package/dist/repository/types.d.ts +0 -9
  244. package/dist/repository/types.d.ts.map +0 -1
  245. package/dist/repository/types.js +0 -1
  246. package/dist/runtime/sqlite-compatibility-process.d.ts +0 -8
  247. package/dist/runtime/sqlite-compatibility-process.d.ts.map +0 -1
  248. package/dist/runtime/sqlite-compatibility-process.js +0 -20
  249. package/dist/setup/skill-installer.d.ts +0 -20
  250. package/dist/setup/skill-installer.d.ts.map +0 -1
  251. package/dist/setup/skill-installer.js +0 -187
  252. package/dist/snapshots/repository-snapshot.d.ts +0 -4
  253. package/dist/snapshots/repository-snapshot.d.ts.map +0 -1
  254. package/dist/snapshots/repository-snapshot.js +0 -119
  255. package/dist/snapshots/types.d.ts +0 -30
  256. package/dist/snapshots/types.d.ts.map +0 -1
  257. package/dist/snapshots/types.js +0 -1
  258. package/dist/storage/atlas-database.d.ts +0 -25
  259. package/dist/storage/atlas-database.d.ts.map +0 -1
  260. package/dist/storage/atlas-database.js +0 -483
  261. package/dist/storage/snapshot-store.d.ts +0 -19
  262. package/dist/storage/snapshot-store.d.ts.map +0 -1
  263. package/dist/storage/snapshot-store.js +0 -74
  264. package/dist/structural-backend/codegraph-backend.d.ts +0 -57
  265. package/dist/structural-backend/codegraph-backend.d.ts.map +0 -1
  266. package/dist/structural-backend/codegraph-backend.js +0 -1230
  267. package/dist/structural-backend/codegraph-worker-client.d.ts +0 -5
  268. package/dist/structural-backend/codegraph-worker-client.d.ts.map +0 -1
  269. package/dist/structural-backend/codegraph-worker-client.js +0 -118
  270. package/dist/structural-backend/codegraph-worker-protocol.d.ts +0 -35
  271. package/dist/structural-backend/codegraph-worker-protocol.d.ts.map +0 -1
  272. package/dist/structural-backend/codegraph-worker-protocol.js +0 -1
  273. package/dist/structural-backend/codegraph-worker.d.ts +0 -2
  274. package/dist/structural-backend/codegraph-worker.d.ts.map +0 -1
  275. package/dist/structural-backend/codegraph-worker.js +0 -131
  276. package/dist/structural-backend/process-instance.d.ts +0 -18
  277. package/dist/structural-backend/process-instance.d.ts.map +0 -1
  278. package/dist/structural-backend/process-instance.js +0 -207
  279. package/dist/structural-backend/structural-fact-changes.d.ts +0 -7
  280. package/dist/structural-backend/structural-fact-changes.d.ts.map +0 -1
  281. package/dist/structural-backend/structural-fact-changes.js +0 -78
  282. package/dist/structural-backend/structural-projection-bootstrapper.d.ts +0 -10
  283. package/dist/structural-backend/structural-projection-bootstrapper.d.ts.map +0 -1
  284. package/dist/structural-backend/structural-projection-bootstrapper.js +0 -295
  285. package/dist/structural-backend/structural-publication.d.ts +0 -13
  286. package/dist/structural-backend/structural-publication.d.ts.map +0 -1
  287. package/dist/structural-backend/structural-publication.js +0 -255
  288. package/dist/structural-backend/structural-write-lock.d.ts +0 -8
  289. package/dist/structural-backend/structural-write-lock.d.ts.map +0 -1
  290. package/dist/structural-backend/structural-write-lock.js +0 -415
  291. package/dist/structural-backend/types.d.ts +0 -144
  292. package/dist/structural-backend/types.d.ts.map +0 -1
  293. package/dist/structural-backend/types.js +0 -11
  294. package/dist/web/application/atlas-read-service.d.ts +0 -27
  295. package/dist/web/application/atlas-read-service.d.ts.map +0 -1
  296. package/dist/web/application/atlas-read-service.js +0 -216
  297. package/dist/web/application/primary-repository-catalog.d.ts +0 -15
  298. package/dist/web/application/primary-repository-catalog.d.ts.map +0 -1
  299. package/dist/web/application/primary-repository-catalog.js +0 -202
  300. package/dist/web/application/types.d.ts +0 -41
  301. package/dist/web/application/types.d.ts.map +0 -1
  302. package/dist/web/application/types.js +0 -1
  303. package/dist/web/server/api-router.d.ts +0 -4
  304. package/dist/web/server/api-router.d.ts.map +0 -1
  305. package/dist/web/server/api-router.js +0 -151
  306. package/dist/web/server/local-web-server.d.ts +0 -12
  307. package/dist/web/server/local-web-server.d.ts.map +0 -1
  308. package/dist/web/server/local-web-server.js +0 -100
  309. package/dist/web-client/assets/index-DneaErDj.css +0 -1
  310. package/dist/web-client/assets/index-cze_4vtt.js +0 -2
  311. package/dist/web-client/assets/index-cze_4vtt.js.map +0 -1
  312. package/dist/web-client/index.html +0 -61
  313. package/dist/world/business-map-projector.d.ts +0 -14
  314. package/dist/world/business-map-projector.d.ts.map +0 -1
  315. package/dist/world/business-map-projector.js +0 -178
  316. package/dist/world/types.d.ts +0 -77
  317. package/dist/world/types.d.ts.map +0 -1
  318. package/dist/world/types.js +0 -1
  319. package/dist/world/world-graph-query.d.ts +0 -30
  320. package/dist/world/world-graph-query.d.ts.map +0 -1
  321. package/dist/world/world-graph-query.js +0 -252
  322. package/dist/world/world-model-service.d.ts +0 -21
  323. package/dist/world/world-model-service.d.ts.map +0 -1
  324. package/dist/world/world-model-service.js +0 -219
  325. package/dist/world/world-snapshot-store.d.ts +0 -41
  326. package/dist/world/world-snapshot-store.d.ts.map +0 -1
  327. package/dist/world/world-snapshot-store.js +0 -581
  328. package/docs/README.md +0 -30
  329. package/docs/architecture/codegraph-backend.md +0 -190
  330. package/docs/architecture/continuous-business-learning.md +0 -240
  331. package/docs/architecture/web-viewer.md +0 -225
  332. package/docs/contracts/cli-v1.md +0 -179
  333. package/docs/contracts/graph-model.md +0 -106
  334. package/docs/contracts/graph-patch-v1.md +0 -105
  335. package/docs/contracts/http-api-v1.md +0 -155
  336. package/docs/contracts/insights-v1.md +0 -84
  337. package/docs/log.md +0 -159
  338. package/docs/mindmaps/semantic-atlas-overview.drawio +0 -255
  339. package/docs/mindmaps/semantic-atlas-overview.png +0 -0
  340. package/docs/mindmaps/semantic-atlas-overview.zh-CN.drawio +0 -255
  341. package/docs/mindmaps/semantic-atlas-overview.zh-CN.png +0 -0
  342. package/schemas/cli-envelope-v1.schema.json +0 -1244
  343. package/schemas/evaluation-plan-v1.schema.json +0 -211
  344. package/schemas/evaluation-run-v1.schema.json +0 -659
  345. package/schemas/graph-patch-v1.schema.json +0 -392
  346. package/schemas/insights-envelope-v1.schema.json +0 -428
@@ -1,174 +1,220 @@
1
- # Fresh Agent Evaluation Protocol
2
-
3
- ## Goal
4
-
5
- The evaluation compares an ordinary Fresh Agent source workflow with the same agent using Semantic Atlas. It measures whether Atlas preserves answer correctness and necessary dependency recall while reducing source context. The gate and metrics are fixed in the product contract before results are collected.
6
-
7
- ## Artifacts
8
-
9
- The protocol separates three responsibilities:
10
-
11
- 1. An evaluation plan defines the prompt, immutable fixture revision, framework/category labels, and an oracle of acceptance criteria, required files, and required symbols.
12
- 2. A run record captures the agent identity, mode, timing, source observations, Atlas calls, complete answer text, answer references, and adjudication.
13
- 3. The validator checks the contracts and derives recall, unique opened files, source token usage, and Atlas call count.
14
-
15
- Normative schemas are:
16
-
17
- - `schemas/evaluation-plan-v1.schema.json`;
18
- - `schemas/evaluation-run-v1.schema.json`.
19
-
20
- The official planned cases are in `evaluation/cases/plan.json`. `evaluation/examples/no-atlas-run.json` demonstrates the run format and is not a measured product result.
21
-
22
- ## Reproducible run procedure
23
-
24
- For each case and mode:
25
-
26
- 1. Check out the exact fixture revision recorded by the case.
27
- 2. Start a new agent conversation with no prior task or repository context. Record the agent product and model. Disable host Skills, plugins, apps, hooks, MCP servers, memory, multi-agent delegation, and Skill search while preserving the local Codex authentication and model-provider configuration needed to execute the run.
28
- 3. Give the agent the case prompt and repository only. Keep the oracle, the other mode's result, the Semantic Atlas Skill name, and the Skill body out of the task prompt.
29
- 4. Keep model, agent instructions, tool policy, fixture revision, and task prompt identical for the paired runs. In `atlas` mode, install the candidate under the fixture's ignored `.agents/skills/semantic-atlas` directory and expose the packaged CLI; in `no-atlas` mode, provide neither. Codex must select the candidate through its repository Skill discovery and description matching.
30
- 5. In `no-atlas` mode, use normal source and shell tools and record zero Atlas calls. In `atlas` mode, record each Semantic Atlas command.
31
- 6. Record candidate `SKILL.md` and conditional-reference reads separately as `skillLoads`. Record a `sourceOpens` event whenever repository source text is returned to the agent, including file reads and search snippets. Bind each source event to the successful observer command's global sequence and exit status; failed commands cannot establish source confirmation. Skill instruction text does not count as source context.
32
- 7. Record the number of source tokens exposed by each event using the execution environment's source-input accounting. Put the stable method/version in `sourceTokenMethod`. Count repeated reads again in token totals.
33
- 8. Save the agent's reported files, symbols, and structured knowledge-capture decision. Give an evaluator who did not guide the run the hidden oracle plus a bounded summary derived from the retained Atlas envelopes, successful source observations, result handling, and replayed discovery proof. The evaluator judges both the answer and whether `persist`, `reuse`, `transient`, or `unverified` matches that evidence. It records the evaluated outcome, a separate decision verdict and notes, overall correctness, and failure classifications. A wrong knowledge-capture decision makes the run incorrect with `protocol-violation`.
34
- 9. Audit the complete Codex shell-command sequence. An Atlas run is valid only when it loads the repository Skill, runs `status` before source reads, queries the map before source reads, and opens decisive source afterward. A decisive source file must come from a successful trace-backed observer read or search and occur in the final reported evidence and hidden oracle. Retain each Atlas JSON envelope at its global command sequence, the structured `persist`, `reuse`, `transient`, or `unverified` knowledge-capture decision, and the ordered conditional-reference loads. Every matching state trigger, including one observed after an earlier source read, requires the reference procedure to be loaded; when later source fallback occurs, the load must precede that fallback. A `persist` decision requires GraphPatch authoring after decisive source confirmation; every other decision requires GraphPatch authoring to remain unloaded.
35
- 10. Publish the complete command and discovery evidence, then validate and summarize the baseline with `pnpm evaluation:validate` or pass additional run paths to `scripts/validate-evaluation.ts --baseline`.
36
-
37
- A run is invalid when it lacks exact source-token accounting, is not a fresh context, uses a different fixture revision, sees its oracle, contains an Atlas call in `no-atlas` mode, reads a host instruction, or uses a shell command outside the versioned allowlist. Invalid runs are repeated rather than estimated.
38
-
39
- The published `fresh-agent-v1` run uses the repository-owned source observer and
40
- `tiktoken-o200k_base-v1`. Every observer invocation appends one JSONL record per
41
- returned file. The runner normalizes those atomically appended records to a
42
- strict event sequence. Each run records its command-policy version. The retained
43
- `fresh-agent-shell-allowlist-v4` policy replays the original roots, children, and
44
- structural show grammar, while the current `fresh-agent-shell-allowlist-v5`
45
- policy accepts the business-first map view/search/show and explicit code search
46
- grammar. Both policies accept only observer reads/searches, read-only Semantic
47
- Atlas commands, bounded file-name listings, and content-free availability
48
- probes. Atlas commands must satisfy the complete grammar for their recorded
49
- policy, and `--repo` is prohibited because each process already runs from its
50
- measured fixture. The policies reject alternative readers, arbitrary executables
51
- and wrappers, external instruction paths, command substitution, redirection,
52
- unsupported command composition, and unquoted shell word generation such as
53
- brace, parameter, tilde, or filename expansion. The fixed
54
- `$EVALUATION_OBSERVER` parameter is the only permitted shell expansion. The
55
- runner rejects failed audits before adjudication, and published-result validation
56
- re-audits every recorded command sequence and its derived Atlas calls without
57
- rewriting immutable historical records.
58
-
59
- Runner v5 adds repository-native Skill discovery evidence. It copies the
60
- candidate Skill into only the Atlas fixture through a Git-local ignore rule,
61
- never injects its body into the task prompt, separates `skillLoads` from measured
62
- source, binds every retained Atlas envelope and source observation to the complete
63
- command timeline, and derives the status-map-source workflow audit in
64
- `protocol.skillDiscovery`. Discovery uses only successful trace-backed source
65
- commands, and state-triggered references remain mandatory after source inspection
66
- as well as before the first source fallback.
67
- The runner and published-artifact validator use the same derivation, compare the
68
- stored proof exactly, and require state-triggered references between the matching
69
- Atlas result and source fallback. They also replay the structured knowledge-capture
70
- decision so a missing or unnecessary GraphPatch load fails validation. Independent
71
- adjudication separately evaluates the decision's business meaning from bounded
72
- retained evidence rather than trusting the Agent's label. The public run contract
73
- binds the adjudicated outcome to the answer; a negative decision verdict must make
74
- the run incorrect and carry `protocol-violation`. The observer and shell-safety
75
- rules remain stable while the Atlas command grammar advances through an explicit
76
- policy version.
77
-
78
- ## Metrics
79
-
80
- - Required-file recall is the fraction of oracle files present in `answer.reportedFiles`.
81
- - Required-symbol recall is the fraction of `(file, symbol name)` oracle pairs present in `answer.reportedSymbols`.
82
- - Final-answer correctness is the independent boolean adjudication against the case prompt and oracle.
83
- - Opened source files count unique paths in `observations.sourceOpens`.
84
- - Source input tokens sum every source-open event, including repeated reads.
85
- - Atlas call count is the number of recorded Atlas commands.
86
-
87
- The comparative report shows per-case results and medians by mode. It also classifies failures such as missed dependency, incorrect answer, stale knowledge, unknown boundary mishandling, unsupported source, or protocol violation.
88
-
89
- The release passes this evaluation portion only when every Atlas-assisted case has no lower required-file recall, required-symbol recall, or answer correctness than its paired no-Atlas run; no stale, hypothesis, or unknown fact is represented as exact; and either median unique opened source files or median source input tokens falls by at least 30 percent.
90
-
91
- ## Published result
92
-
93
- The measured `fresh-agent-v1` artifacts are in
94
- `evaluation/results/fresh-agent-v1/`. They contain 24 independently adjudicated
95
- runs over the frozen 12-case matrix. Both modes use Codex CLI 0.146.0 with
96
- `gpt-5.6-sol`, fresh ephemeral contexts, the same fixture commit and task input,
97
- and the same command policy. Atlas mode differs only by the availability of the
98
- Semantic Atlas Skill, CLI, and current worktree-local index. The retained 22
99
- `fresh-agent-runner-v1` records were re-audited from preserved raw command logs;
100
- the affected NestJS provider-contract pair was replaced under
101
- `fresh-agent-runner-v2` with host capabilities explicitly disabled. All 24
102
- published command sequences were subsequently re-audited under the v4
103
- fixture-local Atlas grammar.
104
-
105
- All 12 pairs retained 100 percent required-file recall, required-symbol recall,
106
- and answer correctness. Median unique opened source files fell from 6.5 to 4
107
- (38.46 percent), and median source tokens fell from 1,351 to 688 (49.07
108
- percent). Atlas runs recorded 61 routed partial, unknown, or related boundary
109
- events and no uncertainty-handling failure. The fixed gate passed without being
110
- changed after results were collected.
111
-
112
- These retained artifacts establish the frozen comparative gate; they predate
113
- runner v5 and do not by themselves prove implicit Skill discovery. New candidate
114
- runs must also carry the v5 discovery evidence described above.
115
-
116
- The separately retained
117
- `evaluation/results/fresh-agent-discovery-v5/location-nestjs-provider-atlas.json`
118
- is a complete runner-v5 Atlas run over the same synthetic fixture. A fresh
119
- ephemeral Codex context discovered the repository Skill without prompt-body
120
- injection, completed the status-map-source workflow, and bound two decisive
121
- source observations to successful global commands. Snapshot bootstrap, result
122
- routing, and GraphPatch authoring each have a matching timeline proof. A second
123
- fresh context independently adjudicated both the answer and the structured
124
- knowledge-capture decision from retained evidence. This artifact proves the
125
- discovery protocol; it does not replace or alter the frozen 24-run comparative
126
- metrics.
127
-
128
- Validate the published records with:
129
-
130
- ```sh
131
- pnpm evaluation:results
132
- ```
133
-
134
- Validate the retained runner-v5 discovery artifact with:
135
-
136
- ```sh
137
- pnpm evaluation:discovery
138
- ```
139
-
140
- `pnpm evaluation:run` rebuilds the deterministic fixture repositories, runs 24
141
- new ephemeral Codex contexts plus an independent adjudication context, and
142
- replaces the published run records and report. It requires a working local
143
- Codex login and incurs model usage.
144
-
145
- A protocol repair can replace one independently adjudicated pair and recompute
146
- the complete report while retaining only records that pass the current schema
147
- and command audit:
148
-
149
- ```sh
150
- pnpm evaluation:run -- --case <case-id> --publish-selected
151
- ```
152
-
153
- ## Planned case matrix
154
-
155
- | Category | Case | Frameworks |
156
- | --- | --- | --- |
157
- | Location | Locate a NestJS operation provider | NestJS |
158
- | Location | Locate a GraphQL query implementation | GraphQL |
159
- | Location | Locate a TypeORM entity relation | TypeORM |
160
- | Location | Locate a BullMQ job consumer | BullMQ |
161
- | Location | Trace a GraphQL mutation to a NestJS provider | NestJS, GraphQL |
162
- | Location | Trace a BullMQ job to a TypeORM write | TypeORM, BullMQ |
163
- | Dependency/impact | Assess a NestJS provider contract change | NestJS |
164
- | Dependency/impact | Assess a GraphQL output field change | GraphQL |
165
- | Dependency/impact | Assess a TypeORM column change | TypeORM |
166
- | Dependency/impact | Assess a BullMQ job payload change | BullMQ |
167
- | Dependency/impact | Assess a NestJS and TypeORM transaction change | NestJS, TypeORM |
168
- | Dependency/impact | Assess a GraphQL to BullMQ workflow change | GraphQL, BullMQ |
169
-
170
- The synthetic fixture described by this plan is implemented by later indexing and framework-adapter work. Its stable paths and oracle symbols are already fixed so the gate cannot be tailored after product results are known.
171
-
172
- ## Private real-project cases
173
-
174
- Real-repository prompts, paths, revisions, or answers may be sensitive. Store their plan and run records outside the published repository, or under the ignored `evaluation/private/` directory. The evaluation schema supports a `private` fixture with an opaque `repositoryAlias`; validate such a plan without the `--baseline` flag. The private operator mapping from that alias to a local repository never enters published fixtures. Aggregated reports may publish counts and metrics only after removing identifying paths and answers.
1
+ # Semantic Atlas Evaluation
2
+
3
+ This page defines how the initial product proves that an advisory business map
4
+ improves engineering accuracy and reduces routine human supervision. It applies
5
+ to the CLI, renderer, Agent Skill, and real-project evaluation.
6
+
7
+ **Status: accepted initial protocol; controlled Skill fixtures and the private
8
+ real-project evaluation pass.**
9
+
10
+ ## Evaluation Question
11
+
12
+ The primary question is:
13
+
14
+ > Does an agent that begins with the advisory business map reach a correct,
15
+ > source-supported engineering conclusion more reliably than an agent that
16
+ > begins with ordinary repository discovery, including when the map is stale or
17
+ > incomplete?
18
+
19
+ The evaluation observes investigation cost, but cost does not substitute for
20
+ correctness.
21
+
22
+ ## Accuracy Dimensions
23
+
24
+ ### Business-boundary accuracy
25
+
26
+ The answer identifies the capability, scenario, operation, data, invariant, and
27
+ interface boundaries required by the task. Repository folders or framework
28
+ components do not replace business ownership.
29
+
30
+ ### Root-cause accuracy
31
+
32
+ The agent distinguishes where a symptom appears from the business behavior that
33
+ causes it. It follows an upstream relation when the fix belongs outside the
34
+ initially named module.
35
+
36
+ ### Impact accuracy
37
+
38
+ The agent identifies required incoming and outgoing collaborators, affected
39
+ data, invariants, interfaces, tests, and asynchronous consumers. It avoids
40
+ unsupported expansion into unrelated areas.
41
+
42
+ ### Evidence accuracy
43
+
44
+ Every claim that controls the change is confirmed in current source, tests,
45
+ tracked product documents, or required runtime evidence. Map statements are not
46
+ reported as current implementation facts without confirmation.
47
+
48
+ ### Implementation accuracy
49
+
50
+ The delivered behavior fixes the confirmed cause, covers the required scope,
51
+ passes appropriate tests, and preserves repository contracts.
52
+
53
+ ### Design quality
54
+
55
+ Independent review can follow the main flow, identify each module's stable
56
+ responsibility, and extend the design without working around task-specific
57
+ branches or duplicated mechanisms.
58
+
59
+ ### Human intervention
60
+
61
+ The run records every point where a person must correct product direction,
62
+ business meaning, investigation scope, implementation design, or acceptance.
63
+ Routine progress reporting does not count as intervention; a required decision
64
+ or correction does.
65
+
66
+ ## Required Case Types
67
+
68
+ The first real-project suite contains at least:
69
+
70
+ 1. A downstream symptom whose correct fix belongs to an upstream business
71
+ action.
72
+ 2. A cross-capability feature involving one shared data concept.
73
+ 3. An API, event, queue, or webhook boundary with a downstream consumer.
74
+ 4. A durable invariant that constrains more than one implementation point.
75
+ 5. A missing-map case where the agent must fall back to ordinary discovery.
76
+ 6. A stale-anchor case where the business meaning remains useful but the source
77
+ location changed.
78
+ 7. A contradicted-relation case where current evidence must override the map.
79
+ 8. A code-quality case where the first runnable implementation would create an
80
+ unclear responsibility or unnecessary mechanism.
81
+
82
+ Cases use real repository structure and behavior. Private business facts stay
83
+ inside the private evaluation workspace and are summarized publicly only in
84
+ de-identified form.
85
+
86
+ ## Controlled Skill Fixtures
87
+
88
+ The public repository contains a de-identified miniature engineering system at
89
+ `tests/fixtures/agent-skill/repository`. Its case contract covers an upstream
90
+ root cause, an interface with a downstream consumer, missing map knowledge, an
91
+ ambiguous term, a node without anchors, a stale anchor, and a relation that
92
+ current source contradicts.
93
+
94
+ Automated checks prove that each initial selector produces the intended public
95
+ CLI outcome and that every acceptance oracle points to present source, test, or
96
+ tracked product evidence. Fresh Agent runs then judge the workflow behavior:
97
+ the Agent must begin with the bounded map result, reach the current-evidence
98
+ conclusion, and report durable map discrepancies separately. These fixtures
99
+ protect the Skill contract; they do not replace the private real-project paired
100
+ evaluation defined in this page.
101
+
102
+ ## Paired Execution
103
+
104
+ When practical, run each case in two fresh contexts with the same model,
105
+ repository revision, task wording, tool availability, and acceptance oracle:
106
+
107
+ - `ordinary`: normal repository discovery without the map or its Skill;
108
+ - `map-assisted`: repository-discovered Skill and the tracked advisory map.
109
+
110
+ The task oracle remains unavailable to both task agents. An independent review
111
+ compares their source-supported conclusions and implementation candidates.
112
+
113
+ A paired comparison is useful evidence, not a requirement to manufacture a
114
+ statistical claim from too few real tasks. Every individual map-assisted case
115
+ must still be safe and explainable.
116
+
117
+ ## Stale And Missing Knowledge
118
+
119
+ The suite deliberately mutates map usefulness:
120
+
121
+ - move or rename an anchor while preserving business behavior;
122
+ - omit one required collaborator;
123
+ - retain one relation that current source contradicts;
124
+ - use a task term absent from node names but present in an alias or neighbor;
125
+ - remove the complete map for one ordinary-discovery control.
126
+
127
+ A passing agent notices the limitation, opens current evidence, corrects its
128
+ task-specific model, and avoids presenting the stale statement as current fact.
129
+ The map file does not have to be repaired inside the engineering task.
130
+
131
+ ## Review Record
132
+
133
+ Each run records:
134
+
135
+ - selected map nodes and relationships;
136
+ - map statements used as investigation leads;
137
+ - current files, tests, documents, or runtime evidence opened;
138
+ - confirmed and contradicted map statements;
139
+ - identified business boundary and root cause;
140
+ - required and unrelated impact surfaces;
141
+ - implementation or proposed change;
142
+ - verification performed;
143
+ - independent review findings;
144
+ - human decisions or corrections;
145
+ - optional observations for tokens, opened files, elapsed time, compute cost,
146
+ and map-maintenance effort.
147
+
148
+ ## Initial Acceptance
149
+
150
+ The initial product passes when:
151
+
152
+ - every map-assisted case reaches a correct source-supported conclusion;
153
+ - stale, missing, and contradicted knowledge routes to current evidence without
154
+ an unsupported final claim;
155
+ - required business boundaries and impact surfaces are identified in every
156
+ case;
157
+ - implementation cases pass their behavioral tests and independent code-quality
158
+ review;
159
+ - map-assisted runs require no routine human correction after the task contract
160
+ is established;
161
+ - the paired evidence demonstrates at least one material accuracy improvement,
162
+ such as finding an upstream owner or affected consumer missed by the ordinary
163
+ run;
164
+ - any map-caused regression blocks acceptance and produces a concrete product or
165
+ Skill correction before another measured run.
166
+
167
+ The first acceptance does not require lower token usage, fewer source files,
168
+ shorter runtime, cheaper map maintenance, public publication, or automatic map
169
+ updates.
170
+
171
+ ## Private Real-Project Result
172
+
173
+ The first private evaluation completed on 2026-08-26 against one fixed revision
174
+ of a real service repository. The isolated workspace retained the frozen
175
+ tasks, source-supported oracles, private map, command traces, answers, candidate
176
+ changes, and independent reviews. None of those private artifacts or target
177
+ repository changes entered this repository.
178
+
179
+ The measured suite used four paired cases and eight fresh task-agent contexts.
180
+ Cases combined related concerns while covering all eight required types. Every
181
+ pair used the same model, source revision, task wording, shell tools, and output
182
+ contract; only the ordinary or repository-discovered map workflow differed.
183
+
184
+ The de-identified acceptance results are:
185
+
186
+ - all four map-assisted runs and all four ordinary runs reached the correct,
187
+ source-supported business and engineering conclusion;
188
+ - the map-assisted runs detected the deliberately missing concept, stale source
189
+ anchor, and contradicted relation, then let current evidence control the
190
+ result;
191
+ - no map-assisted run introduced a correctness regression or unsupported final
192
+ business claim;
193
+ - one pair produced a material accuracy improvement: the map-assisted run found
194
+ a tenant-specific volume invariant in a shared-work reuse path that the
195
+ ordinary run missed, expanding the required implementation and regression-test
196
+ scope;
197
+ - both candidates for the implementation case passed the focused behavioral
198
+ suite and received independent code-quality approval;
199
+ - no task agent required a human product, business, investigation, design, or
200
+ acceptance correction after the frozen task contract was established.
201
+
202
+ One provider-routing failure occurred before any measured task work and was
203
+ excluded. Independent adjudication then exposed a mode-scope defect that asked
204
+ the ordinary control to report unavailable map state. The evaluator retained
205
+ that invalid adjudication, applied a general mode-aware correction, and reran
206
+ all four comparisons without changing the measured task inputs or answers.
207
+ These evaluation-harness events do not count as task-agent human intervention.
208
+
209
+ ## Delivery Stages
210
+
211
+ Keep these results separate:
212
+
213
+ 1. deterministic schema, graph, query, and renderer verification;
214
+ 2. packaged CLI and repository Skill verification;
215
+ 3. private real-project accuracy evaluation;
216
+ 4. local integration of accepted changes;
217
+ 5. public release or installation, when separately authorized.
218
+
219
+ An earlier result provides evidence for its own stage and does not imply a later
220
+ stage has completed.
package/docs/index.md CHANGED
@@ -1,48 +1,30 @@
1
- # Semantic Atlas Documentation Index
2
-
3
- This index routes product, architecture, contract, and evaluation questions to
4
- their authoritative pages. Current implementation details remain verifiable in
5
- source and tests.
6
-
7
- ## Product and learning model
8
-
9
- - [Product contract](product-contract.md): product boundary, responsibility
10
- split, lifecycle, storage, and release gates.
11
- - [Continuous business learning](architecture/continuous-business-learning.md):
12
- how business knowledge grows during real work, how provisional roots evolve,
13
- how hierarchy reparenting remains safe, and how one graph projects into
14
- semantically zoomable world and focused views.
15
-
16
- ## Architecture
17
-
18
- - [CodeGraph backend](architecture/codegraph-backend.md): ownership and
19
- consistency boundaries between durable Atlas knowledge and disposable
20
- structural projections.
21
- - [Desktop Web viewer](architecture/web-viewer.md): the human-facing read-only
22
- browser, primary `main`/`master` repository scope, application boundary, and
23
- desktop information architecture.
24
- - [Semantic Atlas overview mind map](mindmaps/semantic-atlas-overview.png):
25
- visual overview; editable sources are available in the same directory.
26
-
27
- ## Public contracts
28
-
29
- - [Graph model](contracts/graph-model.md): node, relation, evidence, certainty,
30
- validity, hierarchy, and traversal semantics.
31
- - [GraphPatch v1](contracts/graph-patch-v1.md): atomic business-knowledge write
32
- contract.
33
- - [CLI v1](contracts/cli-v1.md): deterministic commands, envelopes, warnings,
34
- and exit codes.
35
- - [HTTP API v1](contracts/http-api-v1.md): loopback GET endpoints used by the
36
- bundled desktop Web viewer.
37
- - [Insights v1](contracts/insights-v1.md): local product signals, explicit
38
- feedback, triage, storage boundary, and interpretation.
39
-
40
- ## Evaluation
41
-
42
- - [Evaluation protocol](evaluation.md): fixed Fresh Agent comparison and
43
- evidence requirements.
1
+ # Semantic Atlas Documentation
2
+
3
+ This index routes product, implementation, and evaluation questions to their
4
+ authoritative pages. The queryable map, renderer, repository Agent Skills,
5
+ managed setup, observations, reconciliation, and public release are implemented.
6
+ Target-repository sharing and longitudinal real-use acceptance remain separate
7
+ verified gates.
8
+
9
+ ## Product
10
+
11
+ - [Product contract](product-contract.md): why the product exists, who uses it,
12
+ what the first release contains, and how completion is judged.
13
+ - [Architecture](architecture.md): stable responsibilities, lifecycle,
14
+ dependency direction, collaboration model, and failure semantics.
15
+ - [Map format](map-format.md): tracked graph documents, concepts, relations,
16
+ anchors, validation, and query projections.
17
+ - [Accuracy observations](observations.md): task and independent-review
18
+ evidence schemas, immutable local persistence, replay, privacy, derived
19
+ summaries, and read-only reconciliation candidate reports.
20
+ - [Evaluation](evaluation.md): real-task accuracy, stale-map recovery, code
21
+ quality, and human-intervention evidence.
22
+ - [Delivery plan](delivery-plan.md): integrated initial slices and the ordered,
23
+ separately verified release and real-use gates.
44
24
 
45
25
  ## Maintenance
46
26
 
47
- - [Knowledge-base scope and rules](README.md)
48
- - [Knowledge maintenance log](log.md)
27
+ - [Documentation log](log.md): durable changes to product knowledge and their
28
+ reasons.
29
+ - [Commerce example](../examples/commerce.yaml): illustrative map data only; it
30
+ does not define the normative schema independently of `map-format.md`.