underwrite 0.0.0__tar.gz → 0.1.0__tar.gz

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 (256) hide show
  1. underwrite-0.1.0/LICENSE +202 -0
  2. underwrite-0.1.0/NOTICE +12 -0
  3. underwrite-0.1.0/PKG-INFO +396 -0
  4. underwrite-0.1.0/README.md +381 -0
  5. underwrite-0.1.0/contracts/acceptance_decision.v1.schema.json +337 -0
  6. underwrite-0.1.0/contracts/acceptance_decision.v2.schema.json +355 -0
  7. underwrite-0.1.0/contracts/acceptance_error.v1.schema.json +172 -0
  8. underwrite-0.1.0/contracts/artifact_case.v1.schema.json +66 -0
  9. underwrite-0.1.0/contracts/artifact_inspection.v1.schema.json +247 -0
  10. underwrite-0.1.0/contracts/artifact_inspection_error.v1.schema.json +61 -0
  11. underwrite-0.1.0/contracts/baseline_record.v1.schema.json +1979 -0
  12. underwrite-0.1.0/contracts/binary_run_audit.v1.schema.json +184 -0
  13. underwrite-0.1.0/contracts/binary_run_inventory.v1.schema.json +130 -0
  14. underwrite-0.1.0/contracts/boundary_allowlist.v1.schema.json +64 -0
  15. underwrite-0.1.0/contracts/capabilities.v1.schema.json +90 -0
  16. underwrite-0.1.0/contracts/change_candidate.v1.schema.json +66 -0
  17. underwrite-0.1.0/contracts/cli_result.v1.schema.json +875 -0
  18. underwrite-0.1.0/contracts/common_result_inspection.v1.schema.json +336 -0
  19. underwrite-0.1.0/contracts/common_result_inspection_actions.v1.schema.json +425 -0
  20. underwrite-0.1.0/contracts/declared_claims.v1.schema.json +123 -0
  21. underwrite-0.1.0/contracts/declared_claims.v2.schema.json +127 -0
  22. underwrite-0.1.0/contracts/declared_comparison.v1.schema.json +83 -0
  23. underwrite-0.1.0/contracts/declared_comparison_case.v1.schema.json +69 -0
  24. underwrite-0.1.0/contracts/deepeval_accounting.v1.schema.json +512 -0
  25. underwrite-0.1.0/contracts/deepeval_accounting.v2.schema.json +576 -0
  26. underwrite-0.1.0/contracts/deepeval_bound_record.v1.schema.json +2464 -0
  27. underwrite-0.1.0/contracts/deepeval_metric_bindings.v1.schema.json +517 -0
  28. underwrite-0.1.0/contracts/deepeval_record.v1.schema.json +1574 -0
  29. underwrite-0.1.0/contracts/deepeval_record.v2.schema.json +1642 -0
  30. underwrite-0.1.0/contracts/evidence_error.v1.schema.json +18 -0
  31. underwrite-0.1.0/contracts/evidence_result.v1.schema.json +267 -0
  32. underwrite-0.1.0/contracts/exemptions.v1.schema.json +51 -0
  33. underwrite-0.1.0/contracts/gate_rules.v1.schema.json +179 -0
  34. underwrite-0.1.0/contracts/langfuse_accounting.v1.schema.json +580 -0
  35. underwrite-0.1.0/contracts/langfuse_record.v1.schema.json +1788 -0
  36. underwrite-0.1.0/contracts/langfuse_row_index.v1.schema.json +342 -0
  37. underwrite-0.1.0/contracts/measurement_error.v1.schema.json +64 -0
  38. underwrite-0.1.0/contracts/measurement_policy.v2.schema.json +291 -0
  39. underwrite-0.1.0/contracts/measurement_policy.v3.schema.json +169 -0
  40. underwrite-0.1.0/contracts/measurement_record.v1.schema.json +2537 -0
  41. underwrite-0.1.0/contracts/measurement_replay.v1.schema.json +1670 -0
  42. underwrite-0.1.0/contracts/measurement_semantics.v1.schema.json +251 -0
  43. underwrite-0.1.0/contracts/metric_definition.v1.schema.json +162 -0
  44. underwrite-0.1.0/contracts/observation.v1.schema.json +111 -0
  45. underwrite-0.1.0/contracts/paired_binary_evidence.v1.schema.json +929 -0
  46. underwrite-0.1.0/contracts/paired_binary_input.v1.schema.json +219 -0
  47. underwrite-0.1.0/contracts/paired_binary_policy.v1.schema.json +66 -0
  48. underwrite-0.1.0/contracts/paired_handoff_review.v1.schema.json +3094 -0
  49. underwrite-0.1.0/contracts/paired_review.v1.schema.json +323 -0
  50. underwrite-0.1.0/contracts/paired_review_context.v1.schema.json +157 -0
  51. underwrite-0.1.0/contracts/promptfoo_accounting.v1.schema.json +112 -0
  52. underwrite-0.1.0/contracts/promptfoo_record.v1.schema.json +1276 -0
  53. underwrite-0.1.0/contracts/promptfoo_row_index.v1.schema.json +320 -0
  54. underwrite-0.1.0/contracts/read.v1.schema.json +928 -0
  55. underwrite-0.1.0/contracts/read.v2.schema.json +1057 -0
  56. underwrite-0.1.0/contracts/record_catalog.v1.schema.json +67 -0
  57. underwrite-0.1.0/contracts/record_document.v1.schema.json +78 -0
  58. underwrite-0.1.0/contracts/record_error.v1.schema.json +382 -0
  59. underwrite-0.1.0/contracts/record_spec.v1.schema.json +176 -0
  60. underwrite-0.1.0/contracts/record_verification.v1.schema.json +73 -0
  61. underwrite-0.1.0/contracts/record_view.v1.schema.json +355 -0
  62. underwrite-0.1.0/contracts/release_case.v1.schema.json +145 -0
  63. underwrite-0.1.0/contracts/release_inspection.v1.schema.json +865 -0
  64. underwrite-0.1.0/contracts/release_inspection_error.v1.schema.json +61 -0
  65. underwrite-0.1.0/contracts/result_record.v1.schema.json +180 -0
  66. underwrite-0.1.0/contracts/statistical_seed.v1.schema.json +8 -0
  67. underwrite-0.1.0/pyproject.toml +179 -0
  68. underwrite-0.1.0/pyproject.toml.orig +153 -0
  69. underwrite-0.1.0/src/underwrite/__init__.py +0 -0
  70. underwrite-0.1.0/src/underwrite/_contracts/acceptance_decision.v1.schema.json +337 -0
  71. underwrite-0.1.0/src/underwrite/_contracts/acceptance_decision.v2.schema.json +355 -0
  72. underwrite-0.1.0/src/underwrite/_contracts/acceptance_error.v1.schema.json +172 -0
  73. underwrite-0.1.0/src/underwrite/_contracts/artifact_case.v1.schema.json +66 -0
  74. underwrite-0.1.0/src/underwrite/_contracts/artifact_inspection.v1.schema.json +247 -0
  75. underwrite-0.1.0/src/underwrite/_contracts/artifact_inspection_error.v1.schema.json +61 -0
  76. underwrite-0.1.0/src/underwrite/_contracts/baseline_record.v1.schema.json +1979 -0
  77. underwrite-0.1.0/src/underwrite/_contracts/binary_run_audit.v1.schema.json +184 -0
  78. underwrite-0.1.0/src/underwrite/_contracts/binary_run_inventory.v1.schema.json +130 -0
  79. underwrite-0.1.0/src/underwrite/_contracts/boundary_allowlist.v1.schema.json +64 -0
  80. underwrite-0.1.0/src/underwrite/_contracts/capabilities.v1.schema.json +90 -0
  81. underwrite-0.1.0/src/underwrite/_contracts/change_candidate.v1.schema.json +66 -0
  82. underwrite-0.1.0/src/underwrite/_contracts/cli_result.v1.schema.json +875 -0
  83. underwrite-0.1.0/src/underwrite/_contracts/common_result_inspection.v1.schema.json +336 -0
  84. underwrite-0.1.0/src/underwrite/_contracts/common_result_inspection_actions.v1.schema.json +425 -0
  85. underwrite-0.1.0/src/underwrite/_contracts/declared_claims.v1.schema.json +123 -0
  86. underwrite-0.1.0/src/underwrite/_contracts/declared_claims.v2.schema.json +127 -0
  87. underwrite-0.1.0/src/underwrite/_contracts/declared_comparison.v1.schema.json +83 -0
  88. underwrite-0.1.0/src/underwrite/_contracts/declared_comparison_case.v1.schema.json +69 -0
  89. underwrite-0.1.0/src/underwrite/_contracts/deepeval_accounting.v1.schema.json +512 -0
  90. underwrite-0.1.0/src/underwrite/_contracts/deepeval_accounting.v2.schema.json +576 -0
  91. underwrite-0.1.0/src/underwrite/_contracts/deepeval_bound_record.v1.schema.json +2464 -0
  92. underwrite-0.1.0/src/underwrite/_contracts/deepeval_metric_bindings.v1.schema.json +517 -0
  93. underwrite-0.1.0/src/underwrite/_contracts/deepeval_record.v1.schema.json +1574 -0
  94. underwrite-0.1.0/src/underwrite/_contracts/deepeval_record.v2.schema.json +1642 -0
  95. underwrite-0.1.0/src/underwrite/_contracts/evidence_error.v1.schema.json +18 -0
  96. underwrite-0.1.0/src/underwrite/_contracts/evidence_result.v1.schema.json +267 -0
  97. underwrite-0.1.0/src/underwrite/_contracts/exemptions.v1.schema.json +51 -0
  98. underwrite-0.1.0/src/underwrite/_contracts/gate_rules.v1.schema.json +179 -0
  99. underwrite-0.1.0/src/underwrite/_contracts/langfuse_accounting.v1.schema.json +580 -0
  100. underwrite-0.1.0/src/underwrite/_contracts/langfuse_record.v1.schema.json +1788 -0
  101. underwrite-0.1.0/src/underwrite/_contracts/langfuse_row_index.v1.schema.json +342 -0
  102. underwrite-0.1.0/src/underwrite/_contracts/measurement_error.v1.schema.json +64 -0
  103. underwrite-0.1.0/src/underwrite/_contracts/measurement_policy.v2.schema.json +291 -0
  104. underwrite-0.1.0/src/underwrite/_contracts/measurement_policy.v3.schema.json +169 -0
  105. underwrite-0.1.0/src/underwrite/_contracts/measurement_record.v1.schema.json +2537 -0
  106. underwrite-0.1.0/src/underwrite/_contracts/measurement_replay.v1.schema.json +1670 -0
  107. underwrite-0.1.0/src/underwrite/_contracts/measurement_semantics.v1.schema.json +251 -0
  108. underwrite-0.1.0/src/underwrite/_contracts/metric_definition.v1.schema.json +162 -0
  109. underwrite-0.1.0/src/underwrite/_contracts/observation.v1.schema.json +111 -0
  110. underwrite-0.1.0/src/underwrite/_contracts/paired_binary_evidence.v1.schema.json +929 -0
  111. underwrite-0.1.0/src/underwrite/_contracts/paired_binary_input.v1.schema.json +219 -0
  112. underwrite-0.1.0/src/underwrite/_contracts/paired_binary_policy.v1.schema.json +66 -0
  113. underwrite-0.1.0/src/underwrite/_contracts/paired_handoff_review.v1.schema.json +3094 -0
  114. underwrite-0.1.0/src/underwrite/_contracts/paired_review.v1.schema.json +323 -0
  115. underwrite-0.1.0/src/underwrite/_contracts/paired_review_context.v1.schema.json +157 -0
  116. underwrite-0.1.0/src/underwrite/_contracts/promptfoo_accounting.v1.schema.json +112 -0
  117. underwrite-0.1.0/src/underwrite/_contracts/promptfoo_record.v1.schema.json +1276 -0
  118. underwrite-0.1.0/src/underwrite/_contracts/promptfoo_row_index.v1.schema.json +320 -0
  119. underwrite-0.1.0/src/underwrite/_contracts/read.v1.schema.json +928 -0
  120. underwrite-0.1.0/src/underwrite/_contracts/read.v2.schema.json +1057 -0
  121. underwrite-0.1.0/src/underwrite/_contracts/record_catalog.v1.schema.json +67 -0
  122. underwrite-0.1.0/src/underwrite/_contracts/record_document.v1.schema.json +78 -0
  123. underwrite-0.1.0/src/underwrite/_contracts/record_error.v1.schema.json +382 -0
  124. underwrite-0.1.0/src/underwrite/_contracts/record_spec.v1.schema.json +176 -0
  125. underwrite-0.1.0/src/underwrite/_contracts/record_verification.v1.schema.json +73 -0
  126. underwrite-0.1.0/src/underwrite/_contracts/record_view.v1.schema.json +355 -0
  127. underwrite-0.1.0/src/underwrite/_contracts/release_case.v1.schema.json +145 -0
  128. underwrite-0.1.0/src/underwrite/_contracts/release_inspection.v1.schema.json +865 -0
  129. underwrite-0.1.0/src/underwrite/_contracts/release_inspection_error.v1.schema.json +61 -0
  130. underwrite-0.1.0/src/underwrite/_contracts/result_record.v1.schema.json +180 -0
  131. underwrite-0.1.0/src/underwrite/_contracts/statistical_seed.v1.schema.json +8 -0
  132. underwrite-0.1.0/src/underwrite/_fileio.py +36 -0
  133. underwrite-0.1.0/src/underwrite/_json.py +72 -0
  134. underwrite-0.1.0/src/underwrite/acceptance/__init__.py +0 -0
  135. underwrite-0.1.0/src/underwrite/acceptance/claims.py +231 -0
  136. underwrite-0.1.0/src/underwrite/acceptance/classify.py +159 -0
  137. underwrite-0.1.0/src/underwrite/acceptance/decision.py +290 -0
  138. underwrite-0.1.0/src/underwrite/acceptance/incident.py +137 -0
  139. underwrite-0.1.0/src/underwrite/acceptance/lifecycle.py +49 -0
  140. underwrite-0.1.0/src/underwrite/adjudication/__init__.py +0 -0
  141. underwrite-0.1.0/src/underwrite/cli/__init__.py +0 -0
  142. underwrite-0.1.0/src/underwrite/cli/accept.py +191 -0
  143. underwrite-0.1.0/src/underwrite/cli/audit_baseline.py +40 -0
  144. underwrite-0.1.0/src/underwrite/cli/audit_counts.py +37 -0
  145. underwrite-0.1.0/src/underwrite/cli/audit_deepeval.py +147 -0
  146. underwrite-0.1.0/src/underwrite/cli/audit_langfuse.py +104 -0
  147. underwrite-0.1.0/src/underwrite/cli/audit_promptfoo.py +62 -0
  148. underwrite-0.1.0/src/underwrite/cli/audit_run.py +77 -0
  149. underwrite-0.1.0/src/underwrite/cli/boundary.py +344 -0
  150. underwrite-0.1.0/src/underwrite/cli/capabilities.py +106 -0
  151. underwrite-0.1.0/src/underwrite/cli/commands.py +254 -0
  152. underwrite-0.1.0/src/underwrite/cli/compare_declarations.py +110 -0
  153. underwrite-0.1.0/src/underwrite/cli/evidence.py +146 -0
  154. underwrite-0.1.0/src/underwrite/cli/gate_rules.py +287 -0
  155. underwrite-0.1.0/src/underwrite/cli/handoff_limits.py +11 -0
  156. underwrite-0.1.0/src/underwrite/cli/handoff_review.py +399 -0
  157. underwrite-0.1.0/src/underwrite/cli/inspect_result.py +192 -0
  158. underwrite-0.1.0/src/underwrite/cli/inspection.py +99 -0
  159. underwrite-0.1.0/src/underwrite/cli/instrument.py +147 -0
  160. underwrite-0.1.0/src/underwrite/cli/legacy_input.py +142 -0
  161. underwrite-0.1.0/src/underwrite/cli/local_json.py +126 -0
  162. underwrite-0.1.0/src/underwrite/cli/main.py +539 -0
  163. underwrite-0.1.0/src/underwrite/cli/measure.py +210 -0
  164. underwrite-0.1.0/src/underwrite/cli/measurement_flow.py +114 -0
  165. underwrite-0.1.0/src/underwrite/cli/pair_binary.py +77 -0
  166. underwrite-0.1.0/src/underwrite/cli/prepare_event_policy.py +84 -0
  167. underwrite-0.1.0/src/underwrite/cli/project_baseline.py +73 -0
  168. underwrite-0.1.0/src/underwrite/cli/record_baseline.py +258 -0
  169. underwrite-0.1.0/src/underwrite/cli/record_capture.py +122 -0
  170. underwrite-0.1.0/src/underwrite/cli/record_deepeval.py +330 -0
  171. underwrite-0.1.0/src/underwrite/cli/record_deepeval_bound.py +280 -0
  172. underwrite-0.1.0/src/underwrite/cli/record_langfuse.py +317 -0
  173. underwrite-0.1.0/src/underwrite/cli/record_measure.py +314 -0
  174. underwrite-0.1.0/src/underwrite/cli/record_promptfoo.py +298 -0
  175. underwrite-0.1.0/src/underwrite/cli/records.py +317 -0
  176. underwrite-0.1.0/src/underwrite/cli/release.py +93 -0
  177. underwrite-0.1.0/src/underwrite/cli/render.py +98 -0
  178. underwrite-0.1.0/src/underwrite/cli/replay_measure.py +211 -0
  179. underwrite-0.1.0/src/underwrite/cli/review_pair.py +57 -0
  180. underwrite-0.1.0/src/underwrite/fleet/__init__.py +0 -0
  181. underwrite-0.1.0/src/underwrite/fleet/_pin_storage.py +211 -0
  182. underwrite-0.1.0/src/underwrite/fleet/drift.py +140 -0
  183. underwrite-0.1.0/src/underwrite/fleet/pins.py +575 -0
  184. underwrite-0.1.0/src/underwrite/instrument/__init__.py +0 -0
  185. underwrite-0.1.0/src/underwrite/instrument/evidence/__init__.py +0 -0
  186. underwrite-0.1.0/src/underwrite/instrument/evidence/_resampling.py +80 -0
  187. underwrite-0.1.0/src/underwrite/instrument/evidence/aa.py +408 -0
  188. underwrite-0.1.0/src/underwrite/instrument/evidence/accounting.py +194 -0
  189. underwrite-0.1.0/src/underwrite/instrument/evidence/common_result.py +111 -0
  190. underwrite-0.1.0/src/underwrite/instrument/evidence/controlled.py +178 -0
  191. underwrite-0.1.0/src/underwrite/instrument/evidence/declarations.py +163 -0
  192. underwrite-0.1.0/src/underwrite/instrument/evidence/deepeval_accounting.py +284 -0
  193. underwrite-0.1.0/src/underwrite/instrument/evidence/deepeval_binding.py +161 -0
  194. underwrite-0.1.0/src/underwrite/instrument/evidence/goppi_baseline.py +794 -0
  195. underwrite-0.1.0/src/underwrite/instrument/evidence/goppi_identity.py +17 -0
  196. underwrite-0.1.0/src/underwrite/instrument/evidence/goppi_p7_handoff.py +1970 -0
  197. underwrite-0.1.0/src/underwrite/instrument/evidence/judge.py +492 -0
  198. underwrite-0.1.0/src/underwrite/instrument/evidence/langfuse_accounting.py +235 -0
  199. underwrite-0.1.0/src/underwrite/instrument/evidence/langfuse_row_index.py +80 -0
  200. underwrite-0.1.0/src/underwrite/instrument/evidence/paired.py +352 -0
  201. underwrite-0.1.0/src/underwrite/instrument/evidence/paired_binary.py +669 -0
  202. underwrite-0.1.0/src/underwrite/instrument/evidence/paired_review.py +597 -0
  203. underwrite-0.1.0/src/underwrite/instrument/evidence/retrieval.py +313 -0
  204. underwrite-0.1.0/src/underwrite/instrument/evidence/run_audit.py +425 -0
  205. underwrite-0.1.0/src/underwrite/instrument/evidence/selfcheck.py +153 -0
  206. underwrite-0.1.0/src/underwrite/instrument/evidence/split.py +134 -0
  207. underwrite-0.1.0/src/underwrite/instrument/ingest/__init__.py +0 -0
  208. underwrite-0.1.0/src/underwrite/instrument/ingest/accounting.py +277 -0
  209. underwrite-0.1.0/src/underwrite/instrument/ingest/application.py +153 -0
  210. underwrite-0.1.0/src/underwrite/instrument/ingest/codecs/__init__.py +0 -0
  211. underwrite-0.1.0/src/underwrite/instrument/ingest/codecs/_shape.py +98 -0
  212. underwrite-0.1.0/src/underwrite/instrument/ingest/codecs/deepeval.py +158 -0
  213. underwrite-0.1.0/src/underwrite/instrument/ingest/codecs/evidence_bundle.py +33 -0
  214. underwrite-0.1.0/src/underwrite/instrument/ingest/codecs/inspect.py +217 -0
  215. underwrite-0.1.0/src/underwrite/instrument/ingest/codecs/langfuse.py +161 -0
  216. underwrite-0.1.0/src/underwrite/instrument/ingest/codecs/openinference.py +387 -0
  217. underwrite-0.1.0/src/underwrite/instrument/ingest/codecs/otlp_json.py +337 -0
  218. underwrite-0.1.0/src/underwrite/instrument/ingest/codecs/promptfoo.py +238 -0
  219. underwrite-0.1.0/src/underwrite/instrument/ingest/deepeval_accounting.py +140 -0
  220. underwrite-0.1.0/src/underwrite/instrument/ingest/deepeval_binding.py +131 -0
  221. underwrite-0.1.0/src/underwrite/instrument/ingest/formats.py +52 -0
  222. underwrite-0.1.0/src/underwrite/instrument/ingest/goppi_baseline.py +112 -0
  223. underwrite-0.1.0/src/underwrite/instrument/ingest/goppi_p7_handoff.py +360 -0
  224. underwrite-0.1.0/src/underwrite/instrument/ingest/goppi_pilot.py +840 -0
  225. underwrite-0.1.0/src/underwrite/instrument/ingest/inspection.py +323 -0
  226. underwrite-0.1.0/src/underwrite/instrument/ingest/langfuse_accounting.py +152 -0
  227. underwrite-0.1.0/src/underwrite/instrument/ingest/local_capture.py +294 -0
  228. underwrite-0.1.0/src/underwrite/instrument/ingest/project.py +119 -0
  229. underwrite-0.1.0/src/underwrite/instrument/ingest/release.py +258 -0
  230. underwrite-0.1.0/src/underwrite/instrument/ingest/release_bindings.py +167 -0
  231. underwrite-0.1.0/src/underwrite/instrument/ingest/release_compose.py +326 -0
  232. underwrite-0.1.0/src/underwrite/instrument/ingest/schema.py +92 -0
  233. underwrite-0.1.0/src/underwrite/instrument/ingest/transport.py +138 -0
  234. underwrite-0.1.0/src/underwrite/measurement/__init__.py +0 -0
  235. underwrite-0.1.0/src/underwrite/measurement/availability.py +219 -0
  236. underwrite-0.1.0/src/underwrite/measurement/calibration.py +195 -0
  237. underwrite-0.1.0/src/underwrite/measurement/directional.py +61 -0
  238. underwrite-0.1.0/src/underwrite/measurement/eprocess.py +501 -0
  239. underwrite-0.1.0/src/underwrite/measurement/event_policy.py +105 -0
  240. underwrite-0.1.0/src/underwrite/measurement/event_read.py +328 -0
  241. underwrite-0.1.0/src/underwrite/measurement/jury.py +265 -0
  242. underwrite-0.1.0/src/underwrite/measurement/read.py +260 -0
  243. underwrite-0.1.0/src/underwrite/measurement/read_input.py +394 -0
  244. underwrite-0.1.0/src/underwrite/measurement/stratify.py +230 -0
  245. underwrite-0.1.0/src/underwrite/measurement_contract/__init__.py +0 -0
  246. underwrite-0.1.0/src/underwrite/measurement_contract/read.py +310 -0
  247. underwrite-0.1.0/src/underwrite/measurement_contract/semantics.py +184 -0
  248. underwrite-0.1.0/src/underwrite/service/__init__.py +0 -0
  249. underwrite-0.1.0/src/underwrite/service/_record_errors.py +34 -0
  250. underwrite-0.1.0/src/underwrite/service/_record_format.py +444 -0
  251. underwrite-0.1.0/src/underwrite/service/records.py +1013 -0
  252. underwrite-0.0.0/LICENSE +0 -21
  253. underwrite-0.0.0/PKG-INFO +0 -24
  254. underwrite-0.0.0/README.md +0 -8
  255. underwrite-0.0.0/pyproject.toml +0 -22
  256. underwrite-0.0.0/src/underwrite/__init__.py +0 -6
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,12 @@
1
+ underwrite
2
+ Copyright (C) 2026 ntts9990 (https://github.com/ntts9990)
3
+
4
+ The underwrite app and underwrite-core are licensed under the Apache License,
5
+ Version 2.0. See LICENSE and LICENSING.md for the terms and file-specific scope.
6
+ This notice is informational and does not modify the license.
7
+
8
+ "underwrite" is claimed as a trademark of ntts9990. See TRADEMARKS.md and
9
+ Apache License section 6 for the applicable trademark terms.
10
+
11
+ CODE_OF_CONDUCT.md is adapted from Contributor Covenant 3.0 (CC BY-SA 4.0).
12
+ TRADEMARKS.md is adapted from Model Trademark Guidelines 1.0 (CC BY 4.0).
@@ -0,0 +1,396 @@
1
+ Metadata-Version: 2.4
2
+ Name: underwrite
3
+ Version: 0.1.0
4
+ Summary: Local evidence normalization, measurement, and acceptance checks
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: NOTICE
8
+ Requires-Dist: underwrite-core>=0.1.0,<0.2
9
+ Requires-Dist: jsonschema>=4.26.0
10
+ Requires-Dist: pyyaml>=6.0.3
11
+ Requires-Python: >=3.12
12
+ Project-URL: Repository, https://github.com/ntts9990/underwrite
13
+ Project-URL: Issues, https://github.com/ntts9990/underwrite/issues
14
+ Description-Content-Type: text/markdown
15
+
16
+ <div align="center">
17
+
18
+ <h1><img src="assets/brand/underwrite-logo.png" alt="underwrite" width="640"></h1>
19
+
20
+ ### Know what your eval files actually support.
21
+
22
+ Find mismatches. Keep missing evidence visible. Know what to check next.
23
+
24
+ **Local CLI & Python library · Typed JSON · No server or model calls**
25
+
26
+ [![CI](https://github.com/ntts9990/underwrite/actions/workflows/ci.yml/badge.svg)](https://github.com/ntts9990/underwrite/actions/workflows/ci.yml)
27
+ [![PyPI](https://img.shields.io/pypi/v/underwrite)](https://pypi.org/project/underwrite/)
28
+ [![Python 3.12+](https://img.shields.io/badge/Python-3.12%2B-blue)](https://pypi.org/project/underwrite/)
29
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
30
+
31
+ **[Try it](#quickstart)** · [Use with an agent](#agent-use) · [Supported formats](#supported-formats) · [Docs](#documentation)
32
+
33
+ **English** · [한국어](README.ko.md)
34
+
35
+ </div>
36
+
37
+ Already have evaluation exports from **goppi, Langfuse, DeepEval, or Promptfoo**?
38
+ A score or summary alone does not show whether supplied rows match declared
39
+ totals or whether the planned case inventory is complete. For supported local
40
+ profiles, underwrite checks relationships it can verify and makes unknown
41
+ coverage explicit. It returns typed CLI/Python results with findings, input
42
+ identity, and interpretation limits. You or your agent can use them to request
43
+ the next piece of evidence.
44
+
45
+ Underwrite complements the tools that run evaluations: goppi owns execution,
46
+ trace/verifier binding, and reruns; other producers own their exports and scores.
47
+ Underwrite examines supplied artifacts and can retain selected bytes. It does
48
+ not rerun an agent, independently authenticate a producer, or assign a universal
49
+ quality score. No Docker, dashboard, or provider credentials are needed to
50
+ inspect the supported local files.
51
+
52
+ > [!NOTE]
53
+ > **This README describes the `0.1.0` source tree and matching wheels.** The older
54
+ > PyPI `0.0.1` lacks these workflows; use the source quickstart or matching
55
+ > `0.1.0` app/core wheels. The older build's `pins refresh` needs a separate
56
+ > caution; see [Published installation](#install).
57
+
58
+ ## Quickstart
59
+
60
+ Requires **Python 3.12+** and [uv](https://docs.astral.sh/uv/).
61
+ This checkout is tested with CPython 3.12 on Linux and macOS. File-based CLI
62
+ workflows require Unix/POSIX file APIs, including ordinary artifact reads.
63
+
64
+ **1. Check the file.** Run a bundled synthetic example—no API key or adjacent
65
+ repository required:
66
+
67
+ ```sh
68
+ git clone https://github.com/ntts9990/underwrite.git
69
+ cd underwrite
70
+ uv sync --frozen --all-groups
71
+
72
+ uv run --frozen --no-sync underwrite audit-promptfoo \
73
+ fixtures/examples/evidence/synthetic-promptfoo-count-mismatch.json --json
74
+ ```
75
+
76
+ **2. Read the finding.** The producer summary declares **3 results**, including
77
+ **1 failure**; the file contains **2 rows**, with **0 failure rows**. The command
78
+ reports the difference without guessing which side is wrong. Selected fields
79
+ from its actual output:
80
+
81
+ ```json
82
+ {
83
+ "schema": "promptfoo_accounting.v1",
84
+ "declared_relation": "inconsistent",
85
+ "producer_stats": {"errors": 1, "failures": 1, "successes": 1, "total": 3},
86
+ "row_tallies": {"errors": 1, "failures": 0, "successes": 1, "total": 2},
87
+ "deltas": {"errors": 0, "failures": -1, "successes": 0, "total": -1},
88
+ "findings": [
89
+ {"code": "CATEGORY_COUNT_MISMATCH", "location": "/results/stats/failures", "row_index": null}
90
+ ],
91
+ "limitations": [
92
+ "PLANNED_DENOMINATOR_UNKNOWN",
93
+ "CAUSE_UNKNOWN",
94
+ "SOURCE_CLAIMS_UNVERIFIED",
95
+ "NO_APPROVAL_AUTHORITY"
96
+ ]
97
+ }
98
+ ```
99
+
100
+ **3. Next check.** Compare the export with the producer's run record and planned
101
+ case inventory before claiming that a run was skipped or a failure row is
102
+ missing. `CAUSE_UNKNOWN` and `PLANNED_DENOMINATOR_UNKNOWN` make that limit
103
+ explicit. Exit `0` means the report was produced, not that the counts agree or
104
+ the source's verdict was verified. To keep the input and analysis together,
105
+ [save them in a local record](#keep-results-you-can-return-to).
106
+
107
+ <details>
108
+ <summary><strong>Try the native measurement → acceptance workflow</strong></summary>
109
+
110
+ From the same checkout, run the included synthetic binary-event example:
111
+
112
+ ```sh
113
+ mkdir -p output
114
+ uv run --frozen --no-sync underwrite ingest \
115
+ --format underwrite.evidence-bundle --version v1 \
116
+ --file fixtures/examples/event-measurement/bundle.json --json \
117
+ > output/observation.json
118
+
119
+ uv run --frozen --no-sync underwrite measure \
120
+ --observation output/observation.json \
121
+ --policy fixtures/examples/event-acceptance/policy.json --json \
122
+ > output/read-event.json
123
+
124
+ uv run --frozen --no-sync underwrite accept \
125
+ --candidate fixtures/examples/event-acceptance/candidate-single.json \
126
+ --claims fixtures/examples/event-acceptance/claims.json \
127
+ --read output/read-event.json --json
128
+ ```
129
+
130
+ This measures a synthetic binary-event proportion, not general quality or latency.
131
+ The `read.v2` uses an explicit `measurement_policy.v3`; calibration diagnostics do
132
+ not vote on its verdict. The final classification is `screened`, requires human
133
+ review, and keeps `merge_authorized` false. Repeat `--read` for each required claim.
134
+ See [measurement meaning](AGENT_USAGE.md#measurement-meaning-and-migration).
135
+
136
+ </details>
137
+
138
+ ## Why underwrite?
139
+
140
+ | Question after an evaluation | What underwrite gives you |
141
+ | --- | --- |
142
+ | Does the summary match the supplied records? | Profile-specific accounting: Promptfoo count deltas, DeepEval evaluator errors, or Langfuse score associations. |
143
+ | What is still unknown? | Explicit missingness and limits such as an unknown planned denominator or unverified source claim, so a zero is not silently substituted. |
144
+ | Can this evidence support a measurement? | A separate native binary-event path with declared semantics and policy; external scores do not become a universal quality verdict. |
145
+ | Can I revisit the conclusion? | Typed CLI/Python JSON and optional private records tying selected input bytes to the analysis, with verification and retrieval. |
146
+
147
+ ## How it works
148
+
149
+ ```mermaid
150
+ flowchart LR
151
+ A[Supported local eval file] --> B[Select exact profile]
152
+ B --> C[Check supplied records and missingness]
153
+ C --> D[Typed JSON: finding, identity, limits]
154
+ D --> E[Agent or person gathers next evidence]
155
+ C --> F[Optional private record]
156
+ F --> G[Verify and retrieve]
157
+ H[Native event evidence + policy] --> I[Measure]
158
+ I --> D
159
+ ```
160
+
161
+ The command checks only what its selected profile supports. The calling agent
162
+ interprets the JSON and can pursue the next evidence task; underwrite does not
163
+ apply a proposed change or grant merge authority. Local records keep selected
164
+ inputs and results for later review.
165
+
166
+ ## Agent use
167
+
168
+ Give your coding agent the prepared checkout and an exported artifact. It can
169
+ discover the available routes, execute them, and use the JSON in its response:
170
+
171
+ ```sh
172
+ uv run --frozen --no-sync underwrite --help
173
+ uv run --frozen --no-sync underwrite capabilities --json
174
+ ```
175
+
176
+ Python callers can use
177
+ `underwrite.instrument.ingest.accounting.audit_promptfoo_file(Path(...))` for
178
+ the same result as a dictionary. Select an exact supported profile before
179
+ interpreting any producer-specific field.
180
+
181
+ Example task for an agent with terminal access:
182
+
183
+ > Read `skills/underwrite-review/SKILL.md` in this checkout. Review
184
+ > `fixtures/examples/evidence/synthetic-promptfoo-count-mismatch.json` as a
185
+ > Promptfoo 0.123.0 export. Use `capabilities --json` and `audit-promptfoo`.
186
+ > Report `declared_relation`, `producer_stats`, `row_tallies`, `raw_hash`,
187
+ > `limitations`, and the next useful action. Do not rerun the producer or treat
188
+ > exit `0` as agreement or approval.
189
+
190
+ The optional [underwrite-review skill](skills/underwrite-review/SKILL.md) provides
191
+ reusable guidance for Codex and Claude Code. [Setup and usage](AGENT_USAGE.md#optional-artifact-review-skill)
192
+ are explicit: the skill does not install the CLI or add a background service.
193
+ The same CLI and importable Python APIs are available to your own automation.
194
+
195
+ ## Supported formats
196
+
197
+ Support is for the **specific local payload profiles below**, not every API,
198
+ export, or version offered by each producer. Select the version explicitly.
199
+
200
+ | Your input | Supported profile | Start here |
201
+ | --- | --- | --- |
202
+ | **goppi** | Completed baseline exchange manifest v2; separate paired-handoff route | [`audit-baseline`](AGENT_USAGE.md#audit-a-completed-goppi-baseline-as-common-evidence) for descriptive common JSON · [`project-baseline`](AGENT_USAGE.md#project-a-completed-goppi-baseline-into-event-observations) for native measurement · [`review-handoff`](AGENT_USAGE.md#review-a-completed-paired-handoff-in-one-call) |
203
+ | **Langfuse** | `4.35.0` server blob exports: observations-v2 and scores JSON arrays | [`audit-langfuse`](AGENT_USAGE.md#account-for-langfuse-score-kinds-and-associations), with an optional content-minimized row index |
204
+ | **DeepEval** | Ordinary TestRun JSON, `4.1.1` or `4.2.8` | [`audit-deepeval`](AGENT_USAGE.md#account-for-deepeval-scores-and-evaluator-errors) |
205
+ | **Promptfoo** | Eval output JSON, `0.123.0` or `0.124.1` | [`audit-promptfoo`](AGENT_USAGE.md#source-checkout-pilot-audit-promptfoo-counts) |
206
+ | **External common result** | `evidence_result.v1` JSON from a producer | [`inspect-result`](AGENT_USAGE.md#inspect-an-external-common-result) for contract screening and availability counts, with optional evidence-item `next_action` and declared metric-binding counts |
207
+ | **Native evidence** | `underwrite.evidence-bundle` / `v1` | `ingest` → `measure` → `accept` |
208
+ | **Inspect AI** | `inspect.eval-log` / `0.3.263` | `ingest` |
209
+ | **OpenInference** | `openinference.traces` / `0.1.38` | `ingest` |
210
+ | **OTLP JSON** | `otlp-json.traces` / `0.160.0` | `ingest` |
211
+
212
+ DeepEval accounting defaults to `4.1.1`; select `--version 4.2.8` for that
213
+ profile. For a reusable owner-asserted metric-name pack and common descriptive
214
+ JSON, see the [DeepEval binding workflow](AGENT_USAGE.md#account-for-deepeval-scores-and-evaluator-errors).
215
+ Promptfoo accounting defaults to `0.123.0`; select `--version 0.124.1`
216
+ for that profile. Langfuse's version identifies the server export, not its SDK.
217
+ See [artifact requirements](AGENT_USAGE.md#get-the-right-producer-artifact) and
218
+ [producer checks](EVIDENCE_REVIEW.md) for the tested scope and fixture origins.
219
+
220
+ Generic `ingest` / `project` normalizes supported exports to an observation;
221
+ external observations do not enter the current `measure` path. goppi uses its
222
+ explicit exchange adapters: `audit-baseline` produces descriptive
223
+ `evidence_result.v1` without a policy or directional verdict, while
224
+ `project-baseline` can produce native event observations. `prepare-event-policy`
225
+ binds a consumer configuration while leaving statistical assumptions unknown.
226
+ For an already produced `evidence_result.v1` file, `inspect-result` checks the
227
+ installed contract and item counts without verifying the producer's source or
228
+ bundle, or admitting that result to measurement or acceptance.
229
+ Its optional action view counts recorded next actions for evidence remediation,
230
+ not executed tool calls or an agent trajectory.
231
+
232
+ ## Keep results you can return to
233
+
234
+ Use `records` when you want the analysis and its selected source bytes retained
235
+ together. For example, after the source quickstart:
236
+
237
+ ```sh
238
+ mkdir -p output
239
+ uv run --frozen --no-sync underwrite records audit-promptfoo \
240
+ fixtures/examples/evidence/synthetic-promptfoo-count-mismatch.json \
241
+ --root output/review-store --id demo-001 --json
242
+
243
+ uv run --frozen --no-sync underwrite records read-json \
244
+ --root output/review-store --id demo-001 \
245
+ --name analysis/accounting.json --json
246
+ ```
247
+
248
+ Use a fresh ID for each capture; existing records are never overwritten.
249
+ `records verify` checks stored integrity. `records measure` captures a native
250
+ measurement, and `records replay-measure` recalculates it from verified saved
251
+ inputs using the current engine, without executing the original producer.
252
+ For an exact completed goppi baseline v2 directory, `records audit-baseline`
253
+ captures its five files and the descriptive result together in one call; see
254
+ [the goppi record workflow](STORAGE.md#retain-a-completed-goppi-baseline).
255
+
256
+ Records retain raw inputs, which may contain private content. Choose a private
257
+ local POSIX filesystem and a backup strategy; this checkout's ignored `output/`
258
+ is a demo location, not a backup. [Storage contracts and recovery](STORAGE.md).
259
+
260
+ ## What the result means
261
+
262
+ underwrite keeps different kinds of evidence distinct:
263
+
264
+ | Result | What it establishes |
265
+ | --- | --- |
266
+ | Source accounting | Relationships among the supplied rows, scores, and declared summaries |
267
+ | Byte hashes and record verification | Identity and integrity of selected bytes, not independent provenance |
268
+ | Native measurement | A result under the supplied event definition, population, and statistical assumptions |
269
+ | Acceptance classification | A policy result from declared claims and reads; no merge or deployment authority |
270
+
271
+ `not_measured`, `indeterminate`, and `abstained` remain different states. Missing
272
+ information is explicit. A source score is not automatically a calibrated
273
+ probability, and a successful command is not approval to ship.
274
+
275
+ ## Install
276
+
277
+ For the workflows on this page, use the [source quickstart](#quickstart) or
278
+ matching `0.1.0` app/core wheels. `uv sync` selects the workspace
279
+ `underwrite-core`; locally built wheels must pair app and core from the same
280
+ checkout.
281
+
282
+ <details>
283
+ <summary>Install the older published PyPI 0.0.1</summary>
284
+
285
+ ```sh
286
+ uv tool install 'underwrite==0.0.1'
287
+ underwrite --help
288
+ ```
289
+
290
+ The older published [app](https://pypi.org/project/underwrite/0.0.1/) and
291
+ [core](https://pypi.org/project/underwrite-core/0.0.1/) do not include the
292
+ `0.1.0` measurement, accounting, records, handoff, or `capabilities` workflows.
293
+ Discover installed commands with `--help`. Do not pair a `0.1.0` app wheel with
294
+ the `0.0.1` core.
295
+
296
+ The published `0.0.1` `pins refresh` should not process an untrusted pin
297
+ manifest. A controlled local audit reproduced overwrite of a writable file
298
+ outside the pin registry using a crafted manifest. The `0.1.0` code
299
+ refuses that path before mutation; the older `0.0.1` artifacts do not include
300
+ the correction. The reproduced case required the crafted manifest and a
301
+ writable target file.
302
+
303
+ </details>
304
+
305
+ ## CLI
306
+
307
+ Use `underwrite <command> --help` for options. Alongside the workflows above,
308
+ `inspect` checks artifact manifests, `audit-counts` checks Promptfoo counts through
309
+ a manifest with an expected hash, `check` examines release evidence linkage,
310
+ `absence` checks population presence, `boundary scan` checks configured verdict
311
+ vocabulary, and `drift check` / `pins refresh` work with supplied pin registries.
312
+ [JSON contracts](contracts/) define each command family's results and errors.
313
+
314
+ Legacy `absence` and `drift check` exemption files and `boundary scan` allowlists
315
+ are bounded to 1 MiB, 64 JSON container levels, and 1024 policy entries each.
316
+ `boundary scan` reads at most 4 MiB per selected JSON or JSONL file and 32 MiB
317
+ of captured bytes across the command, including its allowlist. It admits up to
318
+ 4096 selected files, 100000 visited directory entries, 100000 physical JSONL
319
+ lines and 1 MiB per raw line (including its delimiter), and 4096 leaks including
320
+ allowed rows. Its selected JSON or human output is capped at 1 MiB including
321
+ the final newline. Duplicate keys and nonfinite numbers are invalid; supplied
322
+ `--now` and policy expiry dates must be real ASCII `YYYY-MM-DD` dates. Admission
323
+ failures return a typed `UNCONFIGURED` result with exit 2. An absent `--now`
324
+ still yields `NOW_REQUIRED` only when the semantic check needs a clock.
325
+
326
+ `absence` retains `Path.glob` matching and refuses more than 4096 matching
327
+ regular files; it does not bound directory traversal within `Path.glob` or
328
+ suppressed internal filesystem errors. Boundary scans follow an explicitly
329
+ selected directory link and regular file links, but do not descend into a child
330
+ directory link. These selections do not establish path containment against a
331
+ hostile filesystem.
332
+
333
+ `drift check` admits up to 256 manifests and 4096 declared pin files while
334
+ counting at most 100000 visited registry entries. Each manifest is limited to
335
+ 1 MiB and 64 JSON container levels; each selected source or pin copy is limited
336
+ to 4 MiB. The 32 MiB command capture budget includes exemption bytes, manifests,
337
+ and both copies. Read-only inspection follows selected directory and file links;
338
+ it does not create an atomic filesystem snapshot or a hostile-path containment
339
+ guarantee. Missing or nonregular selected copies are reported as DRIFT; malformed,
340
+ unreadable, or excessive registry input returns a typed `UNCONFIGURED` result
341
+ without fabricated population counts.
342
+
343
+ `pins refresh` selects one registry repository and copies committed Git blobs.
344
+ Refresh paths must be normalized relative `/`-separated components; empty, dot,
345
+ parent, backslash, Unicode control/format, oversized, and colliding destinations
346
+ are refused.
347
+ The selected registry and its existing destinations are checked before mutation.
348
+ Each pin is replaced with a new inode under its opened registry parent, and
349
+ `PINS.json` is replaced last. Admission or Git-source failures leave the registry
350
+ unchanged. A later filesystem failure reports `publication: may_be_partial`;
351
+ refresh is not an all-files transaction or a durability guarantee.
352
+ Refresh captures each committed Git blob within 4 MiB and the 32 MiB aggregate
353
+ budget, and checks the fully serialized 1 MiB manifest before its first write.
354
+
355
+ <a id="development-checkout-evidence-pilots"></a>
356
+
357
+ ## Documentation
358
+
359
+ | Explore | Guide |
360
+ | --- | --- |
361
+ | Run from an agent, choose inputs, interpret JSON | [Agent usage](AGENT_USAGE.md) |
362
+ | Compare declarations, paired evidence, and goppi handoffs | [Evidence workflows](AGENT_USAGE.md#source-checkout-pilot-compare-declarations) |
363
+ | Save, verify, retrieve, and recalculate | [Local records](STORAGE.md) |
364
+ | Understand producer fixtures and tested boundaries | [Producer evidence](EVIDENCE_REVIEW.md) |
365
+ | Extend the CLI and pure calculation core | [Contributing](CONTRIBUTING.md) · [Architecture rules](AGENTS.md) |
366
+
367
+ ## Contributing
368
+
369
+ Bring a reproducible artifact, a concrete workflow, or a fix.
370
+ [Open an issue](https://github.com/ntts9990/underwrite/issues) with the producer
371
+ version and expected result; share only sanitized examples. See
372
+ [CONTRIBUTING.md](CONTRIBUTING.md) for local preflight and PR checks, and
373
+ [SECURITY.md](SECURITY.md) for private vulnerability reports.
374
+
375
+ <details>
376
+ <summary>Maintainers: future PyPI releases</summary>
377
+
378
+ Before using OIDC publishing, create the GitHub environment `pypi`, restrict it to
379
+ `main`, and configure a PyPI GitHub Trusted Publisher on **each** package with owner
380
+ `ntts9990`, repository `underwrite`, workflow `publish.yml`, and environment `pypi`.
381
+ Once configured, run **Publish PyPI** manually from `main` in GitHub Actions.
382
+
383
+ The workflow validates both packages, then publishes core before the application;
384
+ only the separate publish job receives OIDC permission. No stored PyPI API token
385
+ is required. Retry a partial upload with the same artifacts: existing registry
386
+ files must match exactly, and changed artifacts require a new version.
387
+
388
+ See the official [uv publishing guide](https://docs.astral.sh/uv/guides/package/)
389
+ and [PyPI Trusted Publisher guide](https://docs.pypi.org/trusted-publishers/using-a-publisher/).
390
+
391
+ </details>
392
+
393
+ ## License
394
+
395
+ [Apache-2.0](LICENSE). [LICENSING.md](LICENSING.md) records the adapted policy
396
+ templates' CC licenses.