ai-capability-framework 1.0.3 → 1.1.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 (246) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +38 -30
  3. package/ROADMAP.md +14 -0
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +32 -1
  6. package/dist/discovery/bindings.d.ts +7 -0
  7. package/dist/discovery/bindings.d.ts.map +1 -0
  8. package/dist/discovery/bindings.js +24 -0
  9. package/dist/discovery/budget.d.ts +17 -0
  10. package/dist/discovery/budget.d.ts.map +1 -0
  11. package/dist/discovery/budget.js +77 -0
  12. package/dist/discovery/configuration.d.ts +10 -0
  13. package/dist/discovery/configuration.d.ts.map +1 -0
  14. package/dist/discovery/configuration.js +63 -0
  15. package/dist/discovery/corpus.d.ts +8 -0
  16. package/dist/discovery/corpus.d.ts.map +1 -0
  17. package/dist/discovery/corpus.js +64 -0
  18. package/dist/discovery/diagnostics.d.ts +15 -0
  19. package/dist/discovery/diagnostics.d.ts.map +1 -0
  20. package/dist/discovery/diagnostics.js +11 -0
  21. package/dist/discovery/discoverer.d.ts +23 -0
  22. package/dist/discovery/discoverer.d.ts.map +1 -0
  23. package/dist/discovery/discoverer.js +261 -0
  24. package/dist/discovery/embedding-configuration.d.ts +12 -0
  25. package/dist/discovery/embedding-configuration.d.ts.map +1 -0
  26. package/dist/discovery/embedding-configuration.js +81 -0
  27. package/dist/discovery/embedding-types.d.ts +75 -0
  28. package/dist/discovery/embedding-types.d.ts.map +1 -0
  29. package/dist/discovery/embedding-types.js +1 -0
  30. package/dist/discovery/embeddings.d.ts +38 -0
  31. package/dist/discovery/embeddings.d.ts.map +1 -0
  32. package/dist/discovery/embeddings.js +71 -0
  33. package/dist/discovery/evaluation-validation.d.ts +8 -0
  34. package/dist/discovery/evaluation-validation.d.ts.map +1 -0
  35. package/dist/discovery/evaluation-validation.js +19 -0
  36. package/dist/discovery/evaluation.d.ts +84 -0
  37. package/dist/discovery/evaluation.d.ts.map +1 -0
  38. package/dist/discovery/evaluation.js +310 -0
  39. package/dist/discovery/export.d.ts +14 -0
  40. package/dist/discovery/export.d.ts.map +1 -0
  41. package/dist/discovery/export.js +81 -0
  42. package/dist/discovery/facade.d.ts +82 -0
  43. package/dist/discovery/facade.d.ts.map +1 -0
  44. package/dist/discovery/facade.js +266 -0
  45. package/dist/discovery/fingerprint.d.ts +71 -0
  46. package/dist/discovery/fingerprint.d.ts.map +1 -0
  47. package/dist/discovery/fingerprint.js +67 -0
  48. package/dist/discovery/index-builder.d.ts +3 -0
  49. package/dist/discovery/index-builder.d.ts.map +1 -0
  50. package/dist/discovery/index-builder.js +129 -0
  51. package/dist/discovery/index-validation.d.ts +12 -0
  52. package/dist/discovery/index-validation.d.ts.map +1 -0
  53. package/dist/discovery/index-validation.js +117 -0
  54. package/dist/discovery/index.d.ts +32 -0
  55. package/dist/discovery/index.d.ts.map +1 -0
  56. package/dist/discovery/index.js +18 -0
  57. package/dist/discovery/json-snapshot.d.ts +3 -0
  58. package/dist/discovery/json-snapshot.d.ts.map +1 -0
  59. package/dist/discovery/json-snapshot.js +11 -0
  60. package/dist/discovery/lexical.d.ts +12 -0
  61. package/dist/discovery/lexical.d.ts.map +1 -0
  62. package/dist/discovery/lexical.js +26 -0
  63. package/dist/discovery/metadata.d.ts +4 -0
  64. package/dist/discovery/metadata.d.ts.map +1 -0
  65. package/dist/discovery/metadata.js +33 -0
  66. package/dist/discovery/ranking.d.ts +7 -0
  67. package/dist/discovery/ranking.d.ts.map +1 -0
  68. package/dist/discovery/ranking.js +68 -0
  69. package/dist/discovery/replay.d.ts +50 -0
  70. package/dist/discovery/replay.d.ts.map +1 -0
  71. package/dist/discovery/replay.js +175 -0
  72. package/dist/discovery/retrieval-policy.d.ts +5 -0
  73. package/dist/discovery/retrieval-policy.d.ts.map +1 -0
  74. package/dist/discovery/retrieval-policy.js +10 -0
  75. package/dist/discovery/router.d.ts +39 -0
  76. package/dist/discovery/router.d.ts.map +1 -0
  77. package/dist/discovery/router.js +98 -0
  78. package/dist/discovery/selection-attempt.d.ts +20 -0
  79. package/dist/discovery/selection-attempt.d.ts.map +1 -0
  80. package/dist/discovery/selection-attempt.js +39 -0
  81. package/dist/discovery/selection-cards.d.ts +12 -0
  82. package/dist/discovery/selection-cards.d.ts.map +1 -0
  83. package/dist/discovery/selection-cards.js +79 -0
  84. package/dist/discovery/selection-configuration.d.ts +18 -0
  85. package/dist/discovery/selection-configuration.d.ts.map +1 -0
  86. package/dist/discovery/selection-configuration.js +71 -0
  87. package/dist/discovery/selection-response.d.ts +13 -0
  88. package/dist/discovery/selection-response.d.ts.map +1 -0
  89. package/dist/discovery/selection-response.js +47 -0
  90. package/dist/discovery/selection-types.d.ts +18 -0
  91. package/dist/discovery/selection-types.d.ts.map +1 -0
  92. package/dist/discovery/selection-types.js +1 -0
  93. package/dist/discovery/selection.d.ts +6 -0
  94. package/dist/discovery/selection.d.ts.map +1 -0
  95. package/dist/discovery/selection.js +145 -0
  96. package/dist/discovery/types.d.ts +291 -0
  97. package/dist/discovery/types.d.ts.map +1 -0
  98. package/dist/discovery/types.js +1 -0
  99. package/dist/discovery/usage.d.ts +2 -0
  100. package/dist/discovery/usage.d.ts.map +1 -0
  101. package/dist/discovery/usage.js +1 -0
  102. package/dist/discovery/vectors.d.ts +5 -0
  103. package/dist/discovery/vectors.d.ts.map +1 -0
  104. package/dist/discovery/vectors.js +43 -0
  105. package/dist/discovery/versions.d.ts +37 -0
  106. package/dist/discovery/versions.d.ts.map +1 -0
  107. package/dist/discovery/versions.js +36 -0
  108. package/dist/evals-live/live-eval-runner.d.ts +1 -0
  109. package/dist/evals-live/live-eval-runner.d.ts.map +1 -1
  110. package/dist/evals-live/live-eval-runner.js +12 -1
  111. package/dist/evals-live/types.d.ts +3 -0
  112. package/dist/evals-live/types.d.ts.map +1 -1
  113. package/dist/generated/manifest-types.d.ts +3655 -0
  114. package/dist/generated/manifest-types.d.ts.map +1 -1
  115. package/dist/loader.d.ts.map +1 -1
  116. package/dist/loader.js +8 -0
  117. package/dist/mcp-server/server.d.ts.map +1 -1
  118. package/dist/mcp-server/server.js +11 -2
  119. package/dist/mcp-server/types.d.ts +4 -0
  120. package/dist/mcp-server/types.d.ts.map +1 -1
  121. package/dist/observability/redaction.d.ts.map +1 -1
  122. package/dist/observability/redaction.js +6 -2
  123. package/dist/observability/types.d.ts +1 -1
  124. package/dist/observability/types.d.ts.map +1 -1
  125. package/dist/openai/index.d.ts +2 -0
  126. package/dist/openai/index.d.ts.map +1 -1
  127. package/dist/openai/index.js +1 -0
  128. package/dist/openai/responses-runner.d.ts +1 -1
  129. package/dist/openai/responses-runner.d.ts.map +1 -1
  130. package/dist/openai/responses-runner.js +134 -7
  131. package/dist/openai/selection-client.d.ts +28 -0
  132. package/dist/openai/selection-client.d.ts.map +1 -0
  133. package/dist/openai/selection-client.js +95 -0
  134. package/dist/openai/tool-loop.js +1 -1
  135. package/dist/openai/types.d.ts +19 -2
  136. package/dist/openai/types.d.ts.map +1 -1
  137. package/dist/replay/discovery-snapshot.d.ts +10 -0
  138. package/dist/replay/discovery-snapshot.d.ts.map +1 -0
  139. package/dist/replay/discovery-snapshot.js +17 -0
  140. package/dist/replay/recorder.d.ts.map +1 -1
  141. package/dist/replay/recorder.js +4 -0
  142. package/dist/replay/redaction.js +5 -1
  143. package/dist/replay/replayer.d.ts.map +1 -1
  144. package/dist/replay/replayer.js +14 -1
  145. package/dist/replay/types.d.ts +3 -0
  146. package/dist/replay/types.d.ts.map +1 -1
  147. package/dist/replay/validation.d.ts.map +1 -1
  148. package/dist/replay/validation.js +6 -0
  149. package/dist/runtime/bounded-json.d.ts +4 -0
  150. package/dist/runtime/bounded-json.d.ts.map +1 -0
  151. package/dist/runtime/bounded-json.js +74 -0
  152. package/dist/runtime/eligibility.d.ts +4 -0
  153. package/dist/runtime/eligibility.d.ts.map +1 -0
  154. package/dist/runtime/eligibility.js +128 -0
  155. package/dist/runtime/index.d.ts +5 -1
  156. package/dist/runtime/index.d.ts.map +1 -1
  157. package/dist/runtime/index.js +2 -0
  158. package/dist/runtime/provider-attempt.d.ts +11 -0
  159. package/dist/runtime/provider-attempt.d.ts.map +1 -0
  160. package/dist/runtime/provider-attempt.js +221 -0
  161. package/dist/runtime/provider-run.d.ts +10 -0
  162. package/dist/runtime/provider-run.d.ts.map +1 -0
  163. package/dist/runtime/provider-run.js +123 -0
  164. package/dist/runtime/provider-stop.d.ts +9 -0
  165. package/dist/runtime/provider-stop.d.ts.map +1 -0
  166. package/dist/runtime/provider-stop.js +28 -0
  167. package/dist/runtime/provider-types.d.ts +189 -0
  168. package/dist/runtime/provider-types.d.ts.map +1 -0
  169. package/dist/runtime/provider-types.js +1 -0
  170. package/dist/runtime/provider-usage.d.ts +9 -0
  171. package/dist/runtime/provider-usage.d.ts.map +1 -0
  172. package/dist/runtime/provider-usage.js +69 -0
  173. package/dist/runtime/router.d.ts.map +1 -1
  174. package/dist/runtime/router.js +3 -118
  175. package/dist/runtime/types.d.ts +9 -0
  176. package/dist/runtime/types.d.ts.map +1 -1
  177. package/dist/types.d.ts +1 -1
  178. package/dist/types.d.ts.map +1 -1
  179. package/dist/validator.d.ts +3 -0
  180. package/dist/validator.d.ts.map +1 -1
  181. package/dist/validator.js +32 -0
  182. package/docs/api/public-api-policy.md +10 -0
  183. package/docs/api/stable-workflow.md +58 -0
  184. package/docs/api.md +7 -0
  185. package/docs/capability-manifests.md +24 -0
  186. package/docs/development.md +22 -0
  187. package/docs/discovery.md +186 -0
  188. package/docs/evals/discovery-live.md +199 -0
  189. package/docs/evals/discovery-qualification.md +158 -0
  190. package/docs/evals/overview.md +9 -0
  191. package/docs/getting-started/installation.md +11 -12
  192. package/docs/getting-started/openai-quickstart.md +16 -5
  193. package/docs/getting-started/provider-neutral-quickstart.md +247 -88
  194. package/docs/getting-started/quickstart.md +8 -30
  195. package/docs/index.md +10 -0
  196. package/docs/release.md +29 -5
  197. package/docs/runtime.md +27 -0
  198. package/docs/start-here.md +23 -134
  199. package/examples/12-capability-discovery-selection/README.md +346 -0
  200. package/examples/12-capability-discovery-selection/customer-cases.mjs +52 -0
  201. package/examples/12-capability-discovery-selection/customer-harness.mjs +91 -0
  202. package/examples/12-capability-discovery-selection/customer-request-example.mjs +320 -0
  203. package/examples/12-capability-discovery-selection/discovery-example.mjs +175 -0
  204. package/examples/12-capability-discovery-selection/discovery-fixtures/three-domains.suite.json +7887 -0
  205. package/examples/12-capability-discovery-selection/discovery-fixtures/three-domains.v2.suite.json +8167 -0
  206. package/examples/12-capability-discovery-selection/discovery-fixtures/three-domains.v3.suite.json +8342 -0
  207. package/examples/12-capability-discovery-selection/evaluation/application.mjs +305 -0
  208. package/examples/12-capability-discovery-selection/evaluation/campaign.mjs +248 -0
  209. package/examples/12-capability-discovery-selection/evaluation/clients.mjs +433 -0
  210. package/examples/12-capability-discovery-selection/evaluation/continuation.mjs +208 -0
  211. package/examples/12-capability-discovery-selection/evaluation/durable-budget.mjs +420 -0
  212. package/examples/12-capability-discovery-selection/evaluation/freeze.mjs +9 -0
  213. package/examples/12-capability-discovery-selection/evaluation/harness.mjs +618 -0
  214. package/examples/12-capability-discovery-selection/evaluation/mock-host.mjs +260 -0
  215. package/examples/12-capability-discovery-selection/evaluation/preflight.mjs +115 -0
  216. package/examples/12-capability-discovery-selection/evaluation/qualification-workflows.mjs +87 -0
  217. package/examples/12-capability-discovery-selection/evaluation/regrade.mjs +281 -0
  218. package/examples/12-capability-discovery-selection/evaluation/report.mjs +517 -0
  219. package/examples/12-capability-discovery-selection/evaluation/runner.mjs +613 -0
  220. package/examples/12-capability-discovery-selection/evaluation/saved-campaign.mjs +385 -0
  221. package/examples/12-capability-discovery-selection/evaluation/wording.mjs +115 -0
  222. package/examples/12-capability-discovery-selection/evaluation/workflow-application.mjs +378 -0
  223. package/examples/12-capability-discovery-selection/evaluation/workflow-cases.mjs +90 -0
  224. package/examples/12-capability-discovery-selection/evaluation-example.mjs +154 -0
  225. package/examples/12-capability-discovery-selection/hybrid-example.mjs +174 -0
  226. package/examples/12-capability-discovery-selection/mock-embeddings.mjs +101 -0
  227. package/examples/12-capability-discovery-selection/mock-selection.mjs +78 -0
  228. package/examples/12-capability-discovery-selection/pipeline-example.mjs +496 -0
  229. package/examples/12-capability-discovery-selection/retrieval-cases.mjs +31 -0
  230. package/examples/12-capability-discovery-selection/run-campaign-mock.mjs +40 -0
  231. package/examples/12-capability-discovery-selection/run-customer-mock.mjs +15 -0
  232. package/examples/12-capability-discovery-selection/run-evaluation-live.mjs +10 -0
  233. package/examples/12-capability-discovery-selection/run-evaluation-mock.mjs +3 -0
  234. package/examples/12-capability-discovery-selection/run-evaluation-regrade.mjs +71 -0
  235. package/examples/12-capability-discovery-selection/run-hybrid-mock.mjs +3 -0
  236. package/examples/12-capability-discovery-selection/run-mock.mjs +3 -0
  237. package/examples/12-capability-discovery-selection/run-pipeline-mock.mjs +2 -0
  238. package/examples/12-capability-discovery-selection/run-selector-mock.mjs +3 -0
  239. package/examples/12-capability-discovery-selection/selection-example.mjs +88 -0
  240. package/package.json +17 -4
  241. package/schemas/discovery/embedding-index.schema.json +71 -0
  242. package/schemas/discovery/eval-observations.schema.json +409 -0
  243. package/schemas/discovery/eval-suite.schema.json +375 -0
  244. package/schemas/discovery/metadata.schema.json +30 -0
  245. package/schemas/discovery/selection-response.schema.json +47 -0
  246. package/schemas/replay/discovery-snapshot.schema.json +335 -0
@@ -0,0 +1,199 @@
1
+ # Evaluating discovery with real models
2
+
3
+ For the completed campaign and its separate offline reassessment, see the
4
+ [qualification report](discovery-qualification.md). Lexical/native is the recommended
5
+ default. Hybrid remains experimental because its incremental-gain gate was not met.
6
+
7
+ Discovery returns an eligible shortlist. Evaluate whether it contains a useful tool,
8
+ whether the model chooses correctly or abstains, and whether the application completes
9
+ the request. Keep these measurements separate.
10
+
11
+ ## Start without provider access
12
+
13
+ ```sh
14
+ npm run eval:discovery:live
15
+ ```
16
+
17
+ This validates the frozen fixture and prints its planned inventory without importing a
18
+ host module, loading an SDK, reading credentials, or calling a provider.
19
+
20
+ The original 240-case suite remains unchanged. Its v2 revision corrects domain schemas
21
+ and lifecycle links and replaces held-out families. Revision 2.1 also aligns explicit
22
+ held-out amounts and quantity changes with their application facts. Version 3 preserves
23
+ all 180 train/calibration requests and labels, supplies verified preparation readiness
24
+ facts, and introduces 60 fresh held-out cases in new families. The original twelve
25
+ workflows remain development regressions; twelve new workflows form the qualification
26
+ schedule. Historical versions and results remain unchanged. All versions load through
27
+ ordinary manifest validation. Evaluation-only capabilities do not add manifests to the
28
+ framework's normal inventory.
29
+
30
+ Use explicit subsets without changing the suite binding:
31
+
32
+ ```ts
33
+ const report = evaluateCapabilityDiscovery({
34
+ suite,
35
+ registry,
36
+ observations,
37
+ caseIds: calibrationCaseIds
38
+ });
39
+ ```
40
+
41
+ Reports retain the full suite fingerprint and add an order-independent scope
42
+ fingerprint. Duplicate/foreign scope IDs and observations outside that scope are
43
+ rejected. Scheduled cases with no observation remain missing; an empty denominator
44
+ remains `null`.
45
+
46
+ ## Supply a host explicitly
47
+
48
+ Live execution requires `--live` and `--config <ignored-host.json>`. The JSON
49
+ configuration contains `campaignId`, `hostModule`, `sdkVersion`, `tokenizerIdentity`,
50
+ `pricing`, an ignored `evidenceDirectory`, and `predecessor`. Keep credentials outside
51
+ it. The predecessor pins the original campaign directory, fingerprint and exact SHA-256
52
+ journal hash. A continuation inherits only its verified remaining allowances. One
53
+ permanent atomic claim prevents multiple campaigns from spending the same remainder;
54
+ matching resume is allowed, sibling continuations are refused.
55
+
56
+ The host module exports `createHostInputs()`, returning an already configured `sdk`, a
57
+ `tokenizer(text)` that counts `cl100k_base` tokens, and the matching `sdkVersion` and
58
+ `tokenizerIdentity`. Install tokenizer tooling in the host environment. The framework
59
+ package acquires no tokenizer or SDK dependency.
60
+
61
+ Supply pricing fields `inputPerMillion`, `outputPerMillion`, `embeddingPerMillion`,
62
+ `tokenCountPerRequest`, `premiumMultiplier`, and an ISO `checkedAt` within the last 24
63
+ hours. Input pricing must conservatively cover cache writes; include applicable regional
64
+ premiums and do not assume cache discounts. Rechecking identical rates does not change
65
+ the campaign binding. Prices are caller-supplied, never inferred from credentials.
66
+
67
+ This reference campaign fixes `gpt-6-luna` with reasoning disabled and
68
+ `text-embedding-3-small` with 1,536 dimensions. These are evaluation settings, not
69
+ framework defaults. The host explicitly uses Responses input counting for the complete
70
+ request, including tools and schemas. Continuations replay full history without stored
71
+ conversations. Token-count HTTP requests are recorded separately from generation usage.
72
+
73
+ Before live work, retain matching offline acceptance evidence at
74
+ `.aicf/discovery-implementation/phase-7a/offline-acceptance.json`. It binds source,
75
+ suite, workflows, and passing build, typecheck, tests, validation, conformance, package,
76
+ and mocked-campaign checks. Run `npm run eval:discovery:campaign:mock` for the complete
77
+ provider-free campaign. Its synthetic choices and vectors cannot qualify a real model.
78
+
79
+ ## Run and resume stages
80
+
81
+ ```sh
82
+ npm run eval:discovery:live -- --config .aicf/host.json --stage all --live
83
+ ```
84
+
85
+ Individual stages are `index`, `train`, `baseline`, `freeze`, `qualify`, and
86
+ `workflows`. `--stage report --config ...` reads matching evidence without loading the
87
+ host or calling providers. The index is an explicit administrative build; serving stages
88
+ never rebuild or repair it.
89
+
90
+ Cases run sequentially with rotating mode order. This rerun fixes the shortlist at eight
91
+ candidates and uses a four-mode calibration baseline; there is no K=4 stage. Fixture,
92
+ prompt, application-contract, grading and schedule bindings are frozen before live work.
93
+ Qualification runs the full suite once and held-out cases three times. Every failed
94
+ trial remains in the report.
95
+
96
+ Resume by using the same configuration and evidence directory. A campaign lock prevents
97
+ concurrent owners. Journal records, artifact hashes, and bindings must match. Pending
98
+ work after a crash is not automatically purchased again. Reconcile uncertain provider
99
+ requests and outstanding reservations before continuing; do not delete evidence to
100
+ manufacture a fresh pass. Lock removal requires verifying the previous owner has
101
+ stopped.
102
+
103
+ The reference caps are 10,000 generation/embedding attempts, 20,000 total HTTP requests,
104
+ 80 million input tokens, 10 million output tokens, and USD 25. All stages share those
105
+ caps, including predecessor work. Capacity preflight checks the entire schedule against
106
+ the remainder before loading live clients. Prior, current and cumulative charges are
107
+ reported separately. Unknown usage retains reserved allowance and stays unknown in
108
+ reports. Accounting failure stops paid work. This journal is a single-owner evaluation
109
+ host, not a distributed production budget service.
110
+
111
+ ## Interpret qualification
112
+
113
+ ### Regrade saved wording offline
114
+
115
+ The example-local regrader corrects bounded wording checks for equivalent dates,
116
+ explicit negation and prospective actions. It assesses every saved workflow without
117
+ rerunning planning, discovery, selection, tools or customer-response generation.
118
+
119
+ Create an ignored input JSON file with these fields:
120
+
121
+ - `schemaVersion`: `"1.0"`.
122
+ - `campaignDirectory` and `reportPath`: paths to the completed campaign
123
+ journal/artifacts directory and original campaign-result JSON, relative to the input
124
+ file.
125
+ - `campaignFingerprint`, `journalHash` and `reportHash`: pinned SHA-256 bindings. The
126
+ journal and report hashes cover their exact bytes and use the `sha256:` prefix.
127
+
128
+ From the repository root, run:
129
+
130
+ ```sh
131
+ node examples/12-capability-discovery-selection/run-evaluation-regrade.mjs \
132
+ --input .aicf/regrade-input.json --output .aicf/regrade-output
133
+ ```
134
+
135
+ The output must be a separate ignored directory. Existing output is accepted only when
136
+ it matches exactly. The command validates immutable artifact hashes, the complete
137
+ version-3 schedule and fixtures, original report reproduction and settled accounting. It
138
+ does not load host configuration, credentials, SDKs or provider clients, and never opens
139
+ a campaign ledger. Missing or incompatible evidence is refused.
140
+
141
+ `regrade.json` records original and revised decisions, each workflow's changed checks,
142
+ checker/source versions and fingerprints. Historical provider usage remains historical;
143
+ regrading usage is separately zero. Actual customer responses, tool receipts and
144
+ fallback use remain unchanged. A corrected assessment can accept saved model wording
145
+ even when the original application delivered a fallback. It cannot erase operational
146
+ failures, unknown usage or unrelated grading failures.
147
+
148
+ This is an offline reassessment of existing evidence, not another live qualification
149
+ trial. Preserve the original report and report revisions separately. Retrieval,
150
+ selection, latency, cohort and hybrid-promotion gates remain unchanged.
151
+
152
+ ### Qualification gates
153
+
154
+ Each mode receives full-suite, held-out, cohort, latency, usage, and workflow results.
155
+ Retrieval false positives differ from false model selections. An eligible competing
156
+ candidate is not itself an authorization violation. Scores never authorize execution.
157
+
158
+ The reference gates require zero safety violations, at least 95% compatible recall and
159
+ selection accuracy, at least 90% selection coverage, at most 1% no-match false
160
+ selection, and p95 ready-task latency at most 15 seconds. Every ready task has a
161
+ 30-second deadline. A critical-cohort decline greater than five percentage points fails
162
+ comparison against that mode's declared calibration baseline, on the full pass and every
163
+ held-out repetition. Each repetition must pass; pooled averages cannot hide one failed
164
+ repetition.
165
+
166
+ Hybrid also needs a measured gain over lexical retrieval at the same shortlist size and
167
+ selection mechanism. Workflow grading checks authorized reads, dependencies, arguments,
168
+ approval-required previews, and customer claims with deterministic handlers and checks.
169
+ No real business action or commit occurs. Planning returns explicit read/prepare tasks
170
+ or terminal clarification with no tasks. The original customer request, ready-task
171
+ objective and authorized prerequisite receipts remain available as untrusted model
172
+ input. Host policy checks each task's operation and verified preparation prerequisites.
173
+ Revocation persists across the complete application run; blocked parent branches stop
174
+ without purchasing dependent work.
175
+
176
+ The application owns response facts: approval comes from prepared-action requirements,
177
+ and missing access, clarification and unavailability remain distinct. It deduplicates
178
+ summary IDs while retaining execution history. A bounded checker validates model wording
179
+ against the synthetic facts; rejected wording is recorded and replaced by a
180
+ deterministic response. A valid fallback can satisfy application delivery while model
181
+ wording still fails. A post-tool provider error retains successful receipts, records
182
+ degraded completion and unknown consumption, and never repeats the action.
183
+
184
+ Reports separate retrieval, selection, planning/dependencies, authorization/lifecycle,
185
+ application delivery, wording and operational reliability. An irrelevant authorized read
186
+ remains an intent failure even when framework authorization worked correctly. All
187
+ components contribute to the overall qualification conjunction. Workflow calls must meet
188
+ the same usage-completeness requirements as standalone trials.
189
+
190
+ Validated plans, task text, dependency associations, dispositions and response-check
191
+ failures are bounded application evidence under the ignored campaign directory.
192
+ Framework trace events remain metadata-only. The wording checker is specific to these
193
+ synthetic fixtures, not a framework prose-verification API.
194
+
195
+ Reports include counts, family coverage, and descriptive confidence intervals. Public
196
+ synthetic families are reproducible, not an independent blind benchmark. Missing cases,
197
+ unresolved accounting, and operational failures remain visible. A complete campaign may
198
+ conclude that a mode is unqualified. No package default or production setting changes
199
+ automatically.
@@ -0,0 +1,158 @@
1
+ # Discovery qualification for 1.1.0-rc.1
2
+
3
+ Stable 1.1.0 reuses these frozen observations without new live trials or retrieval
4
+ changes. The [named lexical/native workflow](../api/stable-workflow.md) now has a stable
5
+ compatibility commitment; the historical prerelease classification below describes the
6
+ assessed release. Hybrid qualification is unchanged.
7
+
8
+ Lexical retrieval with ordinary model tool selection (**lexical/native**) is the
9
+ recommended default. Lexical/dedicated also qualified for the tested configuration; it
10
+ remains an optional additional model call. Hybrid/native and hybrid/dedicated remain
11
+ **experimental and opt-in** because they did not meet the incremental-gain gate.
12
+ Discovery's API classification remains **release-candidate public**.
13
+
14
+ These results qualify a configuration on an authored synthetic dataset. They do not
15
+ establish general production quality, guarantee the first candidate, or authorize an
16
+ action. Applications still own intent decomposition, dependencies, arguments and
17
+ customer responses. Evaluate your own capability corpus and traffic before adoption.
18
+
19
+ ## Tested configuration and assessment history
20
+
21
+ The campaign used suite v3: 240 cases across support, inventory and scheduling, with 80
22
+ per domain and 120/60/60 train/calibration/held-out cases. There are 60 scenario
23
+ families overall and 15 held-out families. Related paraphrases share a partition. The
24
+ fresh held-out families were withheld from calibration; this is not an external blind
25
+ benchmark, and published fixtures are now exposed regression material.
26
+
27
+ The frozen configuration used eight candidates; gpt-6-luna with reasoning effort none
28
+ for planning, selection and ordinary turns; text-embedding-3-small at 1,536 dimensions;
29
+ hybrid weights 0.75 semantic/0.25 lexical; and unavailable on hybrid failure. These are
30
+ campaign settings, not framework model defaults. Model access, explicit indexes and
31
+ finite budgets remain caller-owned. Returned generation model identities matched the
32
+ requested alias; an immutable model snapshot was not available.
33
+
34
+ The full 240-case pass and three 60-case held-out passes were assessed independently,
35
+ including each mode's declared calibration baseline and critical cohorts. Ready-task p95
36
+ had to be at most 15 seconds, with a 30-second absolute deadline. Quality thresholds
37
+ were 95% recall and selected-candidate accuracy, 90% coverage, at most 1% false
38
+ selection on true no-match cases, and zero safety violations. Critical-cohort
39
+ regressions greater than five percentage points failed the gate. No pooled average
40
+ replaced a failed pass.
41
+
42
+ The original workflow assessment was **40/48**, with all four modes unqualified. A
43
+ separately versioned offline wording-checker correction reassessed the same saved
44
+ evidence as **48/48**, or **12/12 per mode**. Seven date-rendering assessments and one
45
+ negated-completion assessment changed. This was not a fresh live trial or a model
46
+ improvement. The eight actual deterministic fallback responses, tool receipts,
47
+ operational failures, original grades and accounting remain unchanged. The earlier,
48
+ different campaign's 22/48 result was not regraded.
49
+
50
+ ## Full-suite results
51
+
52
+ Accuracy is measured on selected answerable matched cases. Coverage retains missed and
53
+ failed decisions in its denominator. Recall uses the suite's answerable cases. The
54
+ remaining cases include true no-match and eligibility-exclusion scenarios.
55
+
56
+ | Mode | Compatible recall at 8 | Selected accuracy | Selection coverage | Ready-task p95 | Revised overall |
57
+ | ----------------- | ---------------------- | ----------------- | ------------------ | -------------- | ----------------------------- |
58
+ | lexical/native | 118/120 | 118/118 | 118/120 | 4.14 s | Qualified |
59
+ | lexical/dedicated | 118/120 | 118/118 | 118/120 | 6.15 s | Qualified |
60
+ | hybrid/native | 120/120 | 120/120 | 120/120 | 4.42 s | Unqualified: incremental gain |
61
+ | hybrid/dedicated | 120/120 | 117/117 | 117/120 | 5.98 s | Unqualified: incremental gain |
62
+
63
+ Case-level descriptive 95% Wilson intervals are below. Paraphrases within families are
64
+ correlated; these are not family-independent uncertainty estimates or guarantees.
65
+
66
+ | Mode | Recall interval | Accuracy interval | Coverage interval |
67
+ | ----------------- | --------------- | ----------------- | ----------------- |
68
+ | lexical/native | 94.13–99.54% | 96.85–100.00% | 94.13–99.54% |
69
+ | lexical/dedicated | 94.13–99.54% | 96.85–100.00% | 94.13–99.54% |
70
+ | hybrid/native | 96.90–100.00% | 96.90–100.00% | 96.90–100.00% |
71
+ | hybrid/dedicated | 96.90–100.00% | 96.82–100.00% | 92.91–99.15% |
72
+
73
+ Every mode made **0/48 false selections** on full-suite true no-match cases (95% Wilson
74
+ interval 0–7.41%). Permission/lifecycle violations, policy-forbidden export, forbidden
75
+ choices, read-to-mutation selections and commit exposure/execution were zero. An
76
+ eligible competing read/prepare candidate in a shortlist is not an execution violation.
77
+
78
+ Retrieval alone still produced candidates for **47/48 lexical** and **48/48 hybrid**
79
+ true no-match cases. Models abstained or otherwise safely declined these requests. This
80
+ high retrieval false-positive rate is a practical reason to retain ordinary model
81
+ selection and clarification rather than automatically execute the highest-scoring tool.
82
+
83
+ Full-suite selection outcomes were 118 selected/49 abstained/73 unperformed for each
84
+ lexical mode; 120/48/72 for hybrid/native; and 117 selected/48 abstained/3 invalid
85
+ outputs/72 unperformed for hybrid/dedicated. Unperformed means no model decision was
86
+ requested; it is not fabricated abstention.
87
+
88
+ ## Held-out repetitions and workflows
89
+
90
+ Each held-out pass had 60 cases, 15 families, 24 answerable cases and 12 true no-match
91
+ cases. Recall was **24/24** for every mode in every pass. Columns show passes 1, 2 and 3
92
+ in order. Consistency counts identical outcome/choice across repetitions, including
93
+ non-answerable cases; it is reported separately from gate results.
94
+
95
+ | Mode | Coverage by pass | Selected accuracy by pass | p95 seconds by pass | Consistent cases |
96
+ | ----------------- | ------------------- | ------------------------- | ------------------- | ---------------- |
97
+ | lexical/native | 24/24; 24/24; 24/24 | 24/24; 24/24; 24/24 | 3.66; 3.64; 3.85 | 57/60 |
98
+ | lexical/dedicated | 24/24; 24/24; 24/24 | 24/24; 24/24; 24/24 | 5.56; 6.22; 5.89 | 59/60 |
99
+ | hybrid/native | 24/24; 24/24; 24/24 | 24/24; 24/24; 24/24 | 4.70; 3.94; 4.25 | 59/60 |
100
+ | hybrid/dedicated | 23/24; 24/24; 23/24 | 23/23; 24/24; 23/23 | 6.39; 5.41; 6.02 | 58/60 |
101
+
102
+ For 24/24, the 95% Wilson interval is 86.20–100%; for 23/24, 79.76–99.26%; and for
103
+ 23/23, 85.69–100%. False selection was 0/12 in every pass (interval 0–24.25%). All
104
+ critical-cohort comparisons and ready-task latency gates passed independently.
105
+
106
+ Hybrid/dedicated retained four invalid selector outputs: three in the full pass and one
107
+ in held-out pass 1. A separate unavailable selector decision in held-out pass 3 also
108
+ remains a failure in coverage. Neither outcome was replaced by a successful rerun.
109
+
110
+ All modes passed the revised 12-workflow assessment. Across the 48 workflows, the
111
+ application performed 24 authorized reads and 12 approval-required preparations, with no
112
+ commit exposure. Application delivery was already 48/48 using eight observed fallbacks;
113
+ the offline correction changed wording-dependent grading only.
114
+
115
+ ## Why hybrid is not promoted
116
+
117
+ Promotion required at least two percentage points higher compatible recall, or at least
118
+ 20% lower model-input tokens at unchanged recall, against lexical retrieval with the
119
+ same candidate limit and selection mechanism. The observed recall increase was **1.67
120
+ percentage points** (120/120 versus 118/120).
121
+
122
+ | Mode | Full-pass model-input tokens |
123
+ | ----------------- | ---------------------------- |
124
+ | lexical/native | 619,786 |
125
+ | lexical/dedicated | 445,346 |
126
+ | hybrid/native | 715,689 |
127
+ | hybrid/dedicated | 466,759 |
128
+
129
+ These model-input counts exclude query-embedding tokens. Hybrid increased model input
130
+ instead of achieving the required reduction. Both hybrid modes therefore remain
131
+ unqualified overall despite passing their matching, workflow and safety gates. No
132
+ ranking weights, thresholds, aliases or labels were tuned to turn this into a pass.
133
+
134
+ The current campaign recorded 3,097 generation/embedding attempts and 5,521 HTTP
135
+ requests including token preflights; reported input/output tokens were 3,889,390/108,203
136
+ with complete current-campaign usage. Earlier campaign evidence retains an unknown-usage
137
+ provider failure and conservative charging. Stage receipts are not added again to
138
+ overlapping run/campaign totals. Offline regrading and release verification purchase
139
+ zero additional model calls.
140
+
141
+ ## Evidence bindings and reproduction
142
+
143
+ The live transport receipts and original model wording remain private. The following
144
+ safe bindings identify the frozen inputs and derived assessment:
145
+
146
+ - Suite v3: `sha256:5e5f0cb1a848b733174e6e2e444e7c3bd8a90680fcd6009c7323d635c3605f69`.
147
+ - Qualification workflows:
148
+ `sha256:8fabf71450f0d3b04a9d4b543d844bc94b0e70e20c698897db127a7d516cff61`.
149
+ - Campaign: `sha256:187b918cea5aecc0ab4075f2770310a0eddc314bf02d5d147008db773e5b6b76`.
150
+ - Original report bytes:
151
+ `sha256:052d0e1abb1d39f527cf0258510058ebd3bc4ef07ff557761df4d447c6ef607e`.
152
+ - Revised report:
153
+ `sha256:f354d381035f6b28b21c3812d45ac69e14e5577c980f93dc53ba7b7a57d89def`.
154
+
155
+ The correction uses synthetic-wording.v2 and workflow-wording-regrade.v1. See the
156
+ [evaluation and offline-regrade commands](discovery-live.md) for reproducible
157
+ provider-free checks and explicit, separately budgeted live execution. No-key examples
158
+ validate integration contracts; they do not recreate these live observations.
@@ -12,3 +12,12 @@ Read:
12
12
  - [Replay and trace-to-golden](replay-and-trace-to-golden.md)
13
13
  - [Live evals](../live-evals.md)
14
14
  - [EvalOps export interfaces](../evalops.md)
15
+
16
+ ## Discovery and selection evaluation
17
+
18
+ Use [discovery evaluation](../discovery.md#offline-evaluation-and-quality) for frozen
19
+ synthetic cases, compatible and forbidden ID sets, separate retrieval/selection metrics,
20
+ and explicit accounting completeness. No-key CI validates contracts; model quality
21
+ requires a separately configured evaluation. The
22
+ [discovery live campaign](discovery-live.md) provides bounded, resumable evaluation with
23
+ caller-supplied clients; its default command remains provider-free.
@@ -1,21 +1,20 @@
1
1
  # Installation
2
2
 
3
- Install the public package:
3
+ Use Node.js 20, 22 or 24. Install the stable package in your application:
4
4
 
5
- ```bash
5
+ ```sh
6
6
  npm install ai-capability-framework
7
7
  ```
8
8
 
9
- For repository development:
9
+ Version 1.1.0 includes the stable lexical/native search-to-tool workflow. The
10
+ [complete quickstart](provider-neutral-quickstart.md) runs with deterministic mocks,
11
+ without a provider SDK, API key, repository checkout or framework build.
10
12
 
11
- ```bash
12
- npm ci
13
- npm run build
14
- npm run validate
15
- ```
13
+ Live calls require caller-supplied model access and explicit configuration. Optional
14
+ SDKs are installed only when your chosen provider integration needs them.
16
15
 
17
- The default examples use fake data and do not call live model providers. Live provider
18
- tests are opt-in and require explicit environment variables documented in the provider
19
- guides.
16
+ For reproducible deployments, pin the tested version in your lockfile. Existing
17
+ prereleases remain available by explicit version; `next` is a separate channel.
20
18
 
21
- Next: [Quickstart](quickstart.md).
19
+ [Framework repository development](../development.md) has separate install/build/check
20
+ commands.
@@ -20,28 +20,39 @@ npm install openai
20
20
  Root and runtime imports remain lightweight:
21
21
 
22
22
  ```ts
23
- import { loadRegistryFromPath } from "ai-capability-framework";
23
+ import {
24
+ loadManifests,
25
+ validateManifests,
26
+ buildRegistry
27
+ } from "ai-capability-framework";
24
28
  import { runOpenAIResponses } from "ai-capability-framework/openai";
25
29
  ```
26
30
 
31
+ Load and validate your manifests with `loadManifests` and `validateManifests`, then pass
32
+ them to `buildRegistry`; the [complete quickstart](provider-neutral-quickstart.md) shows
33
+ runnable code.
34
+
27
35
  ## Mock-Tested Flow
28
36
 
29
- Run the existing mock runtime tests:
37
+ Run the installed no-key customer flow:
30
38
 
31
39
  ```bash
32
- npm run test:openai:mock
40
+ node node_modules/ai-capability-framework/examples/12-capability-discovery-selection/run-customer-mock.mjs
33
41
  ```
34
42
 
35
43
  Expected output excerpt:
36
44
 
37
45
  ```text
38
- Test Files ... passed
46
+ "ordinaryModelTurns": 4
39
47
  ```
40
48
 
41
49
  The OpenAI runtime exports only routed read/prepare tools. Commit tools remain
42
50
  host-controlled through AICF action lifecycle APIs.
43
51
 
44
- ## Live Opt-In
52
+ ## Repository development and live opt-in
53
+
54
+ The commands below are for an optional [framework source checkout](../development.md).
55
+ Normal package consumers supply their own configured client and explicit model.
45
56
 
46
57
  Live tests are skipped unless you explicitly opt in:
47
58