underwrite 0.1.0__tar.gz → 0.2.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 (320) hide show
  1. underwrite-0.2.0/PKG-INFO +434 -0
  2. underwrite-0.2.0/README.md +419 -0
  3. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/capabilities.v1.schema.json +1 -1
  4. underwrite-0.2.0/contracts/common_result_inspection.v2.schema.json +336 -0
  5. underwrite-0.2.0/contracts/common_result_inspection_actions.v2.schema.json +425 -0
  6. underwrite-0.2.0/contracts/deepeval_accounting.v3.schema.json +1232 -0
  7. underwrite-0.2.0/contracts/deepeval_bound_record.v2.schema.json +2587 -0
  8. underwrite-0.2.0/contracts/deepeval_metric_bindings.v2.schema.json +513 -0
  9. underwrite-0.2.0/contracts/deepeval_record.v3.schema.json +2294 -0
  10. underwrite-0.2.0/contracts/deepeval_trace_index.v1.schema.json +683 -0
  11. underwrite-0.2.0/contracts/deepeval_trace_index.v2.schema.json +703 -0
  12. underwrite-0.2.0/contracts/deepeval_trace_record.v1.schema.json +1749 -0
  13. underwrite-0.2.0/contracts/deepeval_trace_record.v2.schema.json +1765 -0
  14. underwrite-0.2.0/contracts/evidence_result.v2.schema.json +1063 -0
  15. underwrite-0.2.0/contracts/goppi_trajectory_review.v1.schema.json +1589 -0
  16. underwrite-0.2.0/contracts/goppi_trajectory_verifier_response.v1.schema.json +254 -0
  17. underwrite-0.2.0/contracts/langfuse_accounting.v2.schema.json +1849 -0
  18. underwrite-0.2.0/contracts/langfuse_cli_accounting.v1.schema.json +1231 -0
  19. underwrite-0.2.0/contracts/langfuse_cli_record.v1.schema.json +2439 -0
  20. underwrite-0.2.0/contracts/langfuse_cli_row_index.v1.schema.json +897 -0
  21. underwrite-0.2.0/contracts/langfuse_record.v2.schema.json +3057 -0
  22. underwrite-0.2.0/contracts/langfuse_row_index.v2.schema.json +1293 -0
  23. underwrite-0.2.0/contracts/langfuse_row_record.v1.schema.json +3786 -0
  24. underwrite-0.2.0/contracts/promptfoo_accounting.v2.schema.json +270 -0
  25. underwrite-0.2.0/contracts/promptfoo_record.v2.schema.json +1330 -0
  26. underwrite-0.2.0/contracts/promptfoo_row_index.v2.schema.json +369 -0
  27. underwrite-0.2.0/contracts/trajectory_record.v1.schema.json +2621 -0
  28. underwrite-0.2.0/contracts/trajectory_record_read.v1.schema.json +2596 -0
  29. underwrite-0.2.0/contracts/trajectory_verification_history.v1.schema.json +146 -0
  30. {underwrite-0.1.0 → underwrite-0.2.0}/pyproject.toml +33 -1
  31. {underwrite-0.1.0 → underwrite-0.2.0}/pyproject.toml.orig +33 -3
  32. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/capabilities.v1.schema.json +1 -1
  33. underwrite-0.2.0/src/underwrite/_contracts/common_result_inspection.v2.schema.json +336 -0
  34. underwrite-0.2.0/src/underwrite/_contracts/common_result_inspection_actions.v2.schema.json +425 -0
  35. underwrite-0.2.0/src/underwrite/_contracts/deepeval_accounting.v3.schema.json +1232 -0
  36. underwrite-0.2.0/src/underwrite/_contracts/deepeval_bound_record.v2.schema.json +2587 -0
  37. underwrite-0.2.0/src/underwrite/_contracts/deepeval_metric_bindings.v2.schema.json +513 -0
  38. underwrite-0.2.0/src/underwrite/_contracts/deepeval_record.v3.schema.json +2294 -0
  39. underwrite-0.2.0/src/underwrite/_contracts/deepeval_trace_index.v1.schema.json +683 -0
  40. underwrite-0.2.0/src/underwrite/_contracts/deepeval_trace_index.v2.schema.json +703 -0
  41. underwrite-0.2.0/src/underwrite/_contracts/deepeval_trace_record.v1.schema.json +1749 -0
  42. underwrite-0.2.0/src/underwrite/_contracts/deepeval_trace_record.v2.schema.json +1765 -0
  43. underwrite-0.2.0/src/underwrite/_contracts/evidence_result.v2.schema.json +1063 -0
  44. underwrite-0.2.0/src/underwrite/_contracts/goppi_trajectory_review.v1.schema.json +1589 -0
  45. underwrite-0.2.0/src/underwrite/_contracts/goppi_trajectory_verifier_response.v1.schema.json +254 -0
  46. underwrite-0.2.0/src/underwrite/_contracts/langfuse_accounting.v2.schema.json +1849 -0
  47. underwrite-0.2.0/src/underwrite/_contracts/langfuse_cli_accounting.v1.schema.json +1231 -0
  48. underwrite-0.2.0/src/underwrite/_contracts/langfuse_cli_record.v1.schema.json +2439 -0
  49. underwrite-0.2.0/src/underwrite/_contracts/langfuse_cli_row_index.v1.schema.json +897 -0
  50. underwrite-0.2.0/src/underwrite/_contracts/langfuse_record.v2.schema.json +3057 -0
  51. underwrite-0.2.0/src/underwrite/_contracts/langfuse_row_index.v2.schema.json +1293 -0
  52. underwrite-0.2.0/src/underwrite/_contracts/langfuse_row_record.v1.schema.json +3786 -0
  53. underwrite-0.2.0/src/underwrite/_contracts/promptfoo_accounting.v2.schema.json +270 -0
  54. underwrite-0.2.0/src/underwrite/_contracts/promptfoo_record.v2.schema.json +1330 -0
  55. underwrite-0.2.0/src/underwrite/_contracts/promptfoo_row_index.v2.schema.json +369 -0
  56. underwrite-0.2.0/src/underwrite/_contracts/trajectory_record.v1.schema.json +2621 -0
  57. underwrite-0.2.0/src/underwrite/_contracts/trajectory_record_read.v1.schema.json +2596 -0
  58. underwrite-0.2.0/src/underwrite/_contracts/trajectory_verification_history.v1.schema.json +146 -0
  59. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/audit_deepeval.py +90 -17
  60. underwrite-0.2.0/src/underwrite/cli/audit_langfuse.py +171 -0
  61. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/audit_promptfoo.py +19 -12
  62. underwrite-0.2.0/src/underwrite/cli/audit_trajectory.py +80 -0
  63. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/evidence.py +21 -3
  64. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/inspect_result.py +31 -11
  65. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/main.py +194 -23
  66. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/record_deepeval.py +212 -48
  67. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/record_deepeval_bound.py +66 -28
  68. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/record_langfuse.py +154 -31
  69. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/record_promptfoo.py +63 -27
  70. underwrite-0.2.0/src/underwrite/cli/record_trajectory.py +445 -0
  71. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/records.py +18 -0
  72. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/deepeval_binding.py +83 -12
  73. underwrite-0.2.0/src/underwrite/instrument/evidence/deepeval_compat.py +165 -0
  74. underwrite-0.2.0/src/underwrite/instrument/evidence/deepeval_trace.py +351 -0
  75. underwrite-0.2.0/src/underwrite/instrument/evidence/goppi_trajectory.py +693 -0
  76. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/langfuse_accounting.py +19 -1
  77. underwrite-0.2.0/src/underwrite/instrument/evidence/langfuse_cli.py +466 -0
  78. underwrite-0.2.0/src/underwrite/instrument/evidence/langfuse_compat.py +274 -0
  79. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/langfuse_row_index.py +14 -10
  80. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/paired_binary.py +0 -6
  81. underwrite-0.2.0/src/underwrite/instrument/evidence/promptfoo_compat.py +145 -0
  82. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/accounting.py +71 -18
  83. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/application.py +12 -0
  84. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/deepeval_accounting.py +14 -13
  85. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/deepeval_binding.py +37 -13
  86. underwrite-0.2.0/src/underwrite/instrument/ingest/deepeval_compat.py +84 -0
  87. underwrite-0.2.0/src/underwrite/instrument/ingest/deepeval_trace.py +96 -0
  88. underwrite-0.2.0/src/underwrite/instrument/ingest/goppi_trajectory.py +408 -0
  89. underwrite-0.2.0/src/underwrite/instrument/ingest/goppi_verifier.py +126 -0
  90. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/langfuse_accounting.py +86 -16
  91. underwrite-0.2.0/src/underwrite/instrument/ingest/langfuse_cli.py +131 -0
  92. underwrite-0.2.0/src/underwrite/instrument/ingest/langfuse_compat.py +121 -0
  93. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/local_capture.py +113 -1
  94. underwrite-0.1.0/PKG-INFO +0 -396
  95. underwrite-0.1.0/README.md +0 -381
  96. underwrite-0.1.0/src/underwrite/cli/audit_langfuse.py +0 -104
  97. {underwrite-0.1.0 → underwrite-0.2.0}/LICENSE +0 -0
  98. {underwrite-0.1.0 → underwrite-0.2.0}/NOTICE +0 -0
  99. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/acceptance_decision.v1.schema.json +0 -0
  100. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/acceptance_decision.v2.schema.json +0 -0
  101. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/acceptance_error.v1.schema.json +0 -0
  102. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/artifact_case.v1.schema.json +0 -0
  103. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/artifact_inspection.v1.schema.json +0 -0
  104. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/artifact_inspection_error.v1.schema.json +0 -0
  105. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/baseline_record.v1.schema.json +0 -0
  106. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/binary_run_audit.v1.schema.json +0 -0
  107. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/binary_run_inventory.v1.schema.json +0 -0
  108. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/boundary_allowlist.v1.schema.json +0 -0
  109. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/change_candidate.v1.schema.json +0 -0
  110. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/cli_result.v1.schema.json +0 -0
  111. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/common_result_inspection.v1.schema.json +0 -0
  112. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/common_result_inspection_actions.v1.schema.json +0 -0
  113. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/declared_claims.v1.schema.json +0 -0
  114. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/declared_claims.v2.schema.json +0 -0
  115. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/declared_comparison.v1.schema.json +0 -0
  116. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/declared_comparison_case.v1.schema.json +0 -0
  117. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/deepeval_accounting.v1.schema.json +0 -0
  118. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/deepeval_accounting.v2.schema.json +0 -0
  119. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/deepeval_bound_record.v1.schema.json +0 -0
  120. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/deepeval_metric_bindings.v1.schema.json +0 -0
  121. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/deepeval_record.v1.schema.json +0 -0
  122. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/deepeval_record.v2.schema.json +0 -0
  123. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/evidence_error.v1.schema.json +0 -0
  124. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/evidence_result.v1.schema.json +0 -0
  125. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/exemptions.v1.schema.json +0 -0
  126. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/gate_rules.v1.schema.json +0 -0
  127. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/langfuse_accounting.v1.schema.json +0 -0
  128. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/langfuse_record.v1.schema.json +0 -0
  129. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/langfuse_row_index.v1.schema.json +0 -0
  130. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/measurement_error.v1.schema.json +0 -0
  131. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/measurement_policy.v2.schema.json +0 -0
  132. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/measurement_policy.v3.schema.json +0 -0
  133. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/measurement_record.v1.schema.json +0 -0
  134. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/measurement_replay.v1.schema.json +0 -0
  135. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/measurement_semantics.v1.schema.json +0 -0
  136. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/metric_definition.v1.schema.json +0 -0
  137. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/observation.v1.schema.json +0 -0
  138. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/paired_binary_evidence.v1.schema.json +0 -0
  139. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/paired_binary_input.v1.schema.json +0 -0
  140. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/paired_binary_policy.v1.schema.json +0 -0
  141. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/paired_handoff_review.v1.schema.json +0 -0
  142. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/paired_review.v1.schema.json +0 -0
  143. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/paired_review_context.v1.schema.json +0 -0
  144. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/promptfoo_accounting.v1.schema.json +0 -0
  145. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/promptfoo_record.v1.schema.json +0 -0
  146. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/promptfoo_row_index.v1.schema.json +0 -0
  147. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/read.v1.schema.json +0 -0
  148. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/read.v2.schema.json +0 -0
  149. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/record_catalog.v1.schema.json +0 -0
  150. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/record_document.v1.schema.json +0 -0
  151. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/record_error.v1.schema.json +0 -0
  152. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/record_spec.v1.schema.json +0 -0
  153. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/record_verification.v1.schema.json +0 -0
  154. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/record_view.v1.schema.json +0 -0
  155. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/release_case.v1.schema.json +0 -0
  156. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/release_inspection.v1.schema.json +0 -0
  157. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/release_inspection_error.v1.schema.json +0 -0
  158. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/result_record.v1.schema.json +0 -0
  159. {underwrite-0.1.0 → underwrite-0.2.0}/contracts/statistical_seed.v1.schema.json +0 -0
  160. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/__init__.py +0 -0
  161. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/acceptance_decision.v1.schema.json +0 -0
  162. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/acceptance_decision.v2.schema.json +0 -0
  163. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/acceptance_error.v1.schema.json +0 -0
  164. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/artifact_case.v1.schema.json +0 -0
  165. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/artifact_inspection.v1.schema.json +0 -0
  166. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/artifact_inspection_error.v1.schema.json +0 -0
  167. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/baseline_record.v1.schema.json +0 -0
  168. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/binary_run_audit.v1.schema.json +0 -0
  169. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/binary_run_inventory.v1.schema.json +0 -0
  170. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/boundary_allowlist.v1.schema.json +0 -0
  171. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/change_candidate.v1.schema.json +0 -0
  172. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/cli_result.v1.schema.json +0 -0
  173. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/common_result_inspection.v1.schema.json +0 -0
  174. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/common_result_inspection_actions.v1.schema.json +0 -0
  175. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/declared_claims.v1.schema.json +0 -0
  176. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/declared_claims.v2.schema.json +0 -0
  177. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/declared_comparison.v1.schema.json +0 -0
  178. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/declared_comparison_case.v1.schema.json +0 -0
  179. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/deepeval_accounting.v1.schema.json +0 -0
  180. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/deepeval_accounting.v2.schema.json +0 -0
  181. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/deepeval_bound_record.v1.schema.json +0 -0
  182. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/deepeval_metric_bindings.v1.schema.json +0 -0
  183. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/deepeval_record.v1.schema.json +0 -0
  184. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/deepeval_record.v2.schema.json +0 -0
  185. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/evidence_error.v1.schema.json +0 -0
  186. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/evidence_result.v1.schema.json +0 -0
  187. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/exemptions.v1.schema.json +0 -0
  188. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/gate_rules.v1.schema.json +0 -0
  189. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/langfuse_accounting.v1.schema.json +0 -0
  190. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/langfuse_record.v1.schema.json +0 -0
  191. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/langfuse_row_index.v1.schema.json +0 -0
  192. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/measurement_error.v1.schema.json +0 -0
  193. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/measurement_policy.v2.schema.json +0 -0
  194. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/measurement_policy.v3.schema.json +0 -0
  195. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/measurement_record.v1.schema.json +0 -0
  196. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/measurement_replay.v1.schema.json +0 -0
  197. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/measurement_semantics.v1.schema.json +0 -0
  198. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/metric_definition.v1.schema.json +0 -0
  199. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/observation.v1.schema.json +0 -0
  200. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/paired_binary_evidence.v1.schema.json +0 -0
  201. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/paired_binary_input.v1.schema.json +0 -0
  202. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/paired_binary_policy.v1.schema.json +0 -0
  203. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/paired_handoff_review.v1.schema.json +0 -0
  204. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/paired_review.v1.schema.json +0 -0
  205. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/paired_review_context.v1.schema.json +0 -0
  206. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/promptfoo_accounting.v1.schema.json +0 -0
  207. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/promptfoo_record.v1.schema.json +0 -0
  208. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/promptfoo_row_index.v1.schema.json +0 -0
  209. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/read.v1.schema.json +0 -0
  210. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/read.v2.schema.json +0 -0
  211. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/record_catalog.v1.schema.json +0 -0
  212. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/record_document.v1.schema.json +0 -0
  213. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/record_error.v1.schema.json +0 -0
  214. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/record_spec.v1.schema.json +0 -0
  215. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/record_verification.v1.schema.json +0 -0
  216. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/record_view.v1.schema.json +0 -0
  217. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/release_case.v1.schema.json +0 -0
  218. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/release_inspection.v1.schema.json +0 -0
  219. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/release_inspection_error.v1.schema.json +0 -0
  220. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/result_record.v1.schema.json +0 -0
  221. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_contracts/statistical_seed.v1.schema.json +0 -0
  222. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_fileio.py +0 -0
  223. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/_json.py +0 -0
  224. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/acceptance/__init__.py +0 -0
  225. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/acceptance/claims.py +0 -0
  226. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/acceptance/classify.py +0 -0
  227. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/acceptance/decision.py +0 -0
  228. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/acceptance/incident.py +0 -0
  229. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/acceptance/lifecycle.py +0 -0
  230. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/adjudication/__init__.py +0 -0
  231. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/__init__.py +0 -0
  232. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/accept.py +0 -0
  233. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/audit_baseline.py +0 -0
  234. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/audit_counts.py +0 -0
  235. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/audit_run.py +0 -0
  236. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/boundary.py +0 -0
  237. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/capabilities.py +0 -0
  238. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/commands.py +0 -0
  239. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/compare_declarations.py +0 -0
  240. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/gate_rules.py +0 -0
  241. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/handoff_limits.py +0 -0
  242. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/handoff_review.py +0 -0
  243. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/inspection.py +0 -0
  244. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/instrument.py +0 -0
  245. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/legacy_input.py +0 -0
  246. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/local_json.py +0 -0
  247. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/measure.py +0 -0
  248. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/measurement_flow.py +0 -0
  249. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/pair_binary.py +0 -0
  250. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/prepare_event_policy.py +0 -0
  251. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/project_baseline.py +0 -0
  252. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/record_baseline.py +0 -0
  253. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/record_capture.py +0 -0
  254. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/record_measure.py +0 -0
  255. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/release.py +0 -0
  256. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/render.py +0 -0
  257. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/replay_measure.py +0 -0
  258. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/cli/review_pair.py +0 -0
  259. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/fleet/__init__.py +0 -0
  260. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/fleet/_pin_storage.py +0 -0
  261. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/fleet/drift.py +0 -0
  262. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/fleet/pins.py +0 -0
  263. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/__init__.py +0 -0
  264. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/__init__.py +0 -0
  265. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/_resampling.py +0 -0
  266. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/aa.py +0 -0
  267. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/accounting.py +0 -0
  268. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/common_result.py +0 -0
  269. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/controlled.py +0 -0
  270. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/declarations.py +0 -0
  271. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/deepeval_accounting.py +0 -0
  272. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/goppi_baseline.py +0 -0
  273. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/goppi_identity.py +0 -0
  274. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/goppi_p7_handoff.py +0 -0
  275. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/judge.py +0 -0
  276. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/paired.py +0 -0
  277. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/paired_review.py +0 -0
  278. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/retrieval.py +0 -0
  279. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/run_audit.py +0 -0
  280. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/selfcheck.py +0 -0
  281. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/evidence/split.py +0 -0
  282. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/__init__.py +0 -0
  283. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/codecs/__init__.py +0 -0
  284. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/codecs/_shape.py +0 -0
  285. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/codecs/deepeval.py +0 -0
  286. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/codecs/evidence_bundle.py +0 -0
  287. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/codecs/inspect.py +0 -0
  288. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/codecs/langfuse.py +0 -0
  289. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/codecs/openinference.py +0 -0
  290. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/codecs/otlp_json.py +0 -0
  291. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/codecs/promptfoo.py +0 -0
  292. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/formats.py +0 -0
  293. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/goppi_baseline.py +0 -0
  294. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/goppi_p7_handoff.py +0 -0
  295. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/goppi_pilot.py +0 -0
  296. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/inspection.py +0 -0
  297. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/project.py +0 -0
  298. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/release.py +0 -0
  299. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/release_bindings.py +0 -0
  300. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/release_compose.py +0 -0
  301. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/schema.py +0 -0
  302. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/instrument/ingest/transport.py +0 -0
  303. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/__init__.py +0 -0
  304. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/availability.py +0 -0
  305. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/calibration.py +0 -0
  306. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/directional.py +0 -0
  307. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/eprocess.py +0 -0
  308. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/event_policy.py +0 -0
  309. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/event_read.py +0 -0
  310. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/jury.py +0 -0
  311. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/read.py +0 -0
  312. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/read_input.py +0 -0
  313. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement/stratify.py +0 -0
  314. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement_contract/__init__.py +0 -0
  315. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement_contract/read.py +0 -0
  316. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/measurement_contract/semantics.py +0 -0
  317. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/service/__init__.py +0 -0
  318. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/service/_record_errors.py +0 -0
  319. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/service/_record_format.py +0 -0
  320. {underwrite-0.1.0 → underwrite-0.2.0}/src/underwrite/service/records.py +0 -0
@@ -0,0 +1,434 @@
1
+ Metadata-Version: 2.4
2
+ Name: underwrite
3
+ Version: 0.2.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="https://raw.githubusercontent.com/ntts9990/underwrite/main/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 · JSON results · 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)](https://github.com/ntts9990/underwrite/blob/main/LICENSE)
30
+
31
+ **[Try it](#quickstart)** · [Use with an agent](#agent-use) · [Supported formats](#supported-formats) · [Docs](#documentation)
32
+
33
+ **English** · [한국어](https://github.com/ntts9990/underwrite/blob/main/README.ko.md)
34
+
35
+ </div>
36
+
37
+ Evaluation tools run evaluations and export result files. Underwrite reads the
38
+ local files it supports and shows what those files establish, what remains
39
+ unknown, and what evidence to check next. For example, it checks whether
40
+ Promptfoo’s reported totals agree with its supplied result rows. You or your
41
+ coding agent use the JSON result to investigate and decide. You can also save
42
+ selected inputs with the result for later review.
43
+
44
+ Underwrite does not rerun evaluations, independently prove a producer's verdict,
45
+ or assign one quality score across tools. Checking supported local files needs
46
+ no Docker, dashboard, or provider credentials.
47
+
48
+ > [!NOTE]
49
+ > **This guide targets `underwrite==0.2.0`.** [Install the CLI](#installed-package--020)
50
+ > for automatic input handling, focused evidence views and retained trajectory review.
51
+ > A [source checkout](#development-checkout--current-main) is optional for repository
52
+ > examples and development. Use `capabilities --json` to confirm the installed routes.
53
+ > Upgrading from 0.1.1? Read the [migration guide](https://github.com/ntts9990/underwrite/blob/main/MIGRATION.md).
54
+ > The older `0.0.1` has a separate pin-manifest caution; see [Install](#install).
55
+
56
+ ## Quickstart
57
+
58
+ Requires **Python 3.12+** and [uv](https://docs.astral.sh/uv/); the optional
59
+ synthetic download below uses `curl`.
60
+ File-based CLI workflows are tested with CPython 3.12 on Linux and macOS. They
61
+ require Unix/POSIX file APIs, including for ordinary artifact reads.
62
+
63
+ ### Installed package · 0.2.0
64
+
65
+ **1. Install and check a file.** The app-only install resolves a compatible
66
+ `underwrite-core` automatically. Download the public synthetic example; no
67
+ checkout or API key is needed:
68
+
69
+ ```sh
70
+ uv tool install 'underwrite==0.2.0'
71
+ underwrite capabilities --json
72
+ example_dir=$(mktemp -d)
73
+ curl -fsSLo "$example_dir/promptfoo.json" \
74
+ https://raw.githubusercontent.com/ntts9990/underwrite/cb913d39bce628b93dcd3b06fcc4ce36f9dc66af/fixtures/examples/evidence/synthetic-promptfoo-count-mismatch.json
75
+ underwrite audit-promptfoo "$example_dir/promptfoo.json" --json
76
+ ```
77
+
78
+ The same `uv tool install` command updates an older uv-managed `underwrite`
79
+ tool without `--force`. If your shell cannot find `underwrite`, run
80
+ `uv tool update-shell` and open a new shell.
81
+
82
+ **2. Read the finding.** The producer summary declares **3 results**, including
83
+ **1 failure**; the file contains **2 rows**, with **0 failure rows**. The command
84
+ reports the difference without guessing which side is wrong. Selected fields
85
+ from its actual output:
86
+
87
+ ```json
88
+ {
89
+ "schema": "promptfoo_accounting.v2",
90
+ "declared_relation": "inconsistent",
91
+ "producer_stats": {"errors": 1, "failures": 1, "successes": 1, "total": 3},
92
+ "row_tallies": {"errors": 1, "failures": 0, "successes": 1, "total": 2},
93
+ "deltas": {"errors": 0, "failures": -1, "successes": 0, "total": -1},
94
+ "findings": [
95
+ {"code": "CATEGORY_COUNT_MISMATCH", "location": "/results/stats/failures", "row_index": null}
96
+ ],
97
+ "limitations": [
98
+ "PLANNED_DENOMINATOR_UNKNOWN",
99
+ "CAUSE_UNKNOWN",
100
+ "SOURCE_CLAIMS_UNVERIFIED",
101
+ "UNCONSUMED_FIELDS_AND_POPULATIONS_NOT_ANALYZED",
102
+ "SOURCE_HASH_AND_VERSION_LINKABLE",
103
+ "NO_APPROVAL_AUTHORITY"
104
+ ]
105
+ }
106
+ ```
107
+
108
+ **3. Next check.** Compare the export with the producer's run record and planned
109
+ case inventory before claiming that a run was skipped or a failure row is
110
+ missing. `CAUSE_UNKNOWN` and `PLANNED_DENOMINATOR_UNKNOWN` make that limit
111
+ explicit. Exit `0` means the report was produced, not that the counts agree or
112
+ the source's verdict was verified. To keep the input and analysis together,
113
+ [save them in a local record](#keep-results-you-can-return-to).
114
+
115
+ For your own completed Promptfoo export, replace the path and use a
116
+ [supported input shape](#supported-formats). The downloaded file is a
117
+ constructed example, not an unchanged producer export.
118
+
119
+ ### Development checkout · current main
120
+
121
+ Use a checkout to work on the source or run repository examples. Run its commands
122
+ through `uv run` inside that directory, keeping the installed tool separate. If you
123
+ already have a checkout, open its root and start at `uv sync` below:
124
+
125
+ ```sh
126
+ git clone https://github.com/ntts9990/underwrite.git
127
+ cd underwrite
128
+ uv sync --frozen --all-groups
129
+ uv run --frozen --no-sync underwrite capabilities --json
130
+ uv run --frozen --no-sync underwrite audit-promptfoo \
131
+ fixtures/examples/evidence/synthetic-promptfoo-count-mismatch.json --json
132
+ ```
133
+
134
+ This uses the same synthetic counts as above: 3 declared results versus 2 rows.
135
+ The automatic reader produces `promptfoo_accounting.v2` and preserves this
136
+ fixture's declared `0.123.0` version as an unverified source claim. Inputs without
137
+ a version declaration retain an unknown release. No version flag, producer
138
+ installation, Goppi, or provider call is needed for this example.
139
+ Use this `uv run --frozen --no-sync underwrite` prefix for all checkout commands.
140
+ See [included workflows](#included-in-020) for the other routes.
141
+
142
+ <details>
143
+ <summary><strong>Try the native measurement → acceptance workflow</strong></summary>
144
+
145
+ After preparing the checkout above, run this example from its root. Its policies
146
+ and fixtures live in the repository, outside the installed package:
147
+
148
+ ```sh
149
+ mkdir -p output
150
+ uv run --frozen --no-sync underwrite ingest \
151
+ --format underwrite.evidence-bundle --version v1 \
152
+ --file fixtures/examples/event-measurement/bundle.json --json \
153
+ > output/observation.json
154
+
155
+ uv run --frozen --no-sync underwrite measure \
156
+ --observation output/observation.json \
157
+ --policy fixtures/examples/event-acceptance/policy.json --json \
158
+ > output/read-event.json
159
+
160
+ uv run --frozen --no-sync underwrite accept \
161
+ --candidate fixtures/examples/event-acceptance/candidate-single.json \
162
+ --claims fixtures/examples/event-acceptance/claims.json \
163
+ --read output/read-event.json --json
164
+ ```
165
+
166
+ This measures a synthetic binary-event proportion, not general quality or latency.
167
+ The `read.v2` uses an explicit `measurement_policy.v3`; calibration diagnostics do
168
+ not vote on its verdict. The final classification is `screened`, requires human
169
+ review, and keeps `merge_authorized` false. Repeat `--read` for each required claim.
170
+ See [measurement meaning](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#measurement-meaning-and-migration).
171
+
172
+ </details>
173
+
174
+ ## Why underwrite?
175
+
176
+ | Question after an evaluation | What underwrite gives you |
177
+ | --- | --- |
178
+ | Does the summary match the supplied records? | Compare Promptfoo declared counts with rows. Separately account for DeepEval scored rows and evaluator errors, or Langfuse score associations; their aggregate summaries are not assumed checked. |
179
+ | What is still unknown? | See when planned cases are unknown or source claims are unverified; unknown is not counted as zero. |
180
+ | Can this evidence support a measurement? | Use the separate native binary-event path with a declared event and policy; external scores are not a universal quality verdict. |
181
+ | Can I revisit the conclusion? | Save selected input bytes and the analysis in a private record, then verify and retrieve them later. |
182
+
183
+ ## How it works
184
+
185
+ - **Evaluation tool:** runs the evaluation and exports result files.
186
+ - **Underwrite:** checks the supplied results, returns JSON with findings and
187
+ unanswered questions, and can save selected original files with the result.
188
+ - **You or your agent:** check the missing evidence and decide what to do next.
189
+
190
+ Each command checks only its selected input profile. Source verdicts remain
191
+ source claims; Underwrite does not apply changes or grant merge authority. Its
192
+ separate native binary-event workflow measures only a declared event under an
193
+ explicit policy, not arbitrary external scores.
194
+
195
+ ## Agent use
196
+
197
+ Give your coding agent a completed local export and your chosen entry path.
198
+ Have it inspect `capabilities --json` and the command's `--help` using that same
199
+ executable: `underwrite` for the published tool, or
200
+ `uv run --frozen --no-sync underwrite` from the checkout. Package version alone
201
+ does not identify the available workflows.
202
+
203
+ Python callers can use
204
+ `underwrite.instrument.ingest.accounting.audit_promptfoo_file(Path(...))` in
205
+ the chosen environment. Automatic intake selects a supported reader from the
206
+ input shape without guessing a producer release. Use explicit historical selectors
207
+ when reproducing an older contract, as described in the migration guide.
208
+
209
+ Example task for an agent with terminal access:
210
+
211
+ > Review `/absolute/path/to/completed-promptfoo-export.json` using our selected
212
+ > Underwrite entry path. Inspect its capabilities and help, then use the
213
+ > supported accounting route. Use automatic intake when advertised; otherwise
214
+ > require evidence of a supported published profile rather than guessing a version.
215
+ > Report count differences, input identity, missing evidence, interpretation
216
+ > limits, and the next useful check. Do not rerun the producer or treat exit `0`
217
+ > as agreement or approval.
218
+
219
+ The optional [underwrite-review skill](https://github.com/ntts9990/underwrite/blob/main/skills/underwrite-review/SKILL.md) provides
220
+ reusable guidance for Codex and Claude Code. [Setup and usage](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#optional-artifact-review-skill)
221
+ are explicit: the skill lives in the repository, not the PyPI package, and does
222
+ not install the CLI or add a background service.
223
+ The same CLI and importable Python APIs are available to your own automation.
224
+
225
+ ## Supported formats
226
+
227
+ Support covers selected local payloads, not every producer API, export, or
228
+ version. Use capabilities from your chosen executable and the linked workflows
229
+ for exact input requirements.
230
+
231
+ ### Supported profiles · 0.2.0
232
+
233
+ | Your input | Supported profile | Start here |
234
+ | --- | --- | --- |
235
+ | **Goppi** | Completed baseline exchange manifest v2; P7 handoff; adopted paired trajectory | [`audit-baseline`](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#audit-a-completed-goppi-baseline-as-common-evidence) · [`project-baseline`](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#project-a-completed-goppi-baseline-into-event-observations) · [`review-handoff`](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#review-a-completed-paired-handoff-in-one-call) · [`audit-trajectory`](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#compare-a-goppi-paired-trajectory) |
236
+ | **Langfuse** | Compatible blob arrays or official-CLI list captures; automatic pair selection | [`audit-langfuse`](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#account-for-langfuse-score-kinds-and-associations) |
237
+ | **DeepEval** | Compatible TestRun; automatic accounting, optional trace view and meaning bindings | [`audit-deepeval`](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#account-for-deepeval-scores-and-evaluator-errors) |
238
+ | **Promptfoo** | SummaryV3 eval output; automatic intake, historical selectors retained | [`audit-promptfoo`](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#audit-promptfoo-counts) |
239
+ | **External common result** | `evidence_result.v1` or `evidence_result.v2` | [`inspect-result`](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#inspect-an-external-common-result) |
240
+ | **Native evidence** | `underwrite.evidence-bundle` / `v1` | `ingest` → `measure` → `accept` |
241
+ | **Inspect AI** | `inspect.eval-log` / `0.3.263` | `ingest` |
242
+ | **OpenInference** | `openinference.traces` / `0.1.38` | `ingest` |
243
+ | **OTLP JSON** | `otlp-json.traces` / `0.160.0` | `ingest` |
244
+
245
+ ### Included in 0.2.0
246
+
247
+ - **Automatic intake:** compatible Promptfoo SummaryV3, DeepEval TestRun, and
248
+ Langfuse blob arrays or [official-CLI list captures](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#read-official-langfuse-cli-captures-offline)
249
+ without selecting a producer version/profile. Actual producer release stays
250
+ unknown when the payload does not establish it; explicit selectors remain for
251
+ reproducing older contracts.
252
+ - **Focused views and storage:** selected DeepEval trace structure, version-neutral
253
+ `deepeval_metric_bindings.v2` packs, and Langfuse row-index recording. Follow the
254
+ linked producer workflows above for their separate contracts and limits.
255
+ - **Common results:** `inspect-result` also accepts `evidence_result.v2`.
256
+ - **Goppi steps:** [`audit-trajectory`](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#compare-a-goppi-paired-trajectory)
257
+ compares recorded tool states and evaluation results from a paired+trajectory
258
+ export, including runs that stopped early. This optional route requires installed
259
+ Goppi for offline verification; it does not run providers, establish causality,
260
+ or measure retry effects. [`records audit-trajectory`](https://github.com/ntts9990/underwrite/blob/main/STORAGE.md#retain-a-goppi-paired-trajectory)
261
+ retains the same inputs and result; `records read-trajectory` reopens them
262
+ without Goppi or the original export.
263
+
264
+ See [artifact requirements](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#get-the-right-producer-artifact) and
265
+ [producer checks](https://github.com/ntts9990/underwrite/blob/main/EVIDENCE_REVIEW.md)
266
+ for fixture origins and tested scope. A controlled fixture does not prove
267
+ live-server interoperability or export completeness.
268
+
269
+ Moving from published 0.1.1? See the [migration guide](https://github.com/ntts9990/underwrite/blob/main/MIGRATION.md)
270
+ for changed default JSON contracts, historical selectors, and existing records.
271
+
272
+ Generic `ingest` / `project` normalizes supported exports; external observations
273
+ do not enter the current `measure` path. Goppi `audit-baseline` produces
274
+ descriptive common evidence, while `project-baseline` can produce native event
275
+ observations. `inspect-result` screens the installed common-result contract and
276
+ counts items without verifying source truth or admitting them to measurement
277
+ or acceptance. Its action view counts recorded next checks, not executed tools.
278
+
279
+ ## Keep results you can return to
280
+
281
+ Use `records` when you want the analysis and its selected source bytes retained
282
+ together. This example uses the **published package** with a completed local
283
+ Promptfoo export:
284
+
285
+ ```sh
286
+ underwrite records audit-promptfoo /path/to/promptfoo-output.json \
287
+ --root ./review-store --id review-001 --json
288
+
289
+ underwrite records read-json \
290
+ --root ./review-store --id review-001 \
291
+ --name analysis/accounting.json --json
292
+ ```
293
+
294
+ Automatic intake needs no producer version flag. In a checkout, prefix both
295
+ commands with `uv run --frozen --no-sync`. Use a fresh ID for each capture;
296
+ existing records are never overwritten.
297
+ `records verify` checks stored integrity. `records measure` captures a native
298
+ measurement, and `records replay-measure` recalculates it from verified saved
299
+ inputs using the current engine, without executing the original producer.
300
+ For an exact completed goppi baseline v2 directory, `records audit-baseline`
301
+ captures its five files and the descriptive result together in one call; see
302
+ [the goppi record workflow](https://github.com/ntts9990/underwrite/blob/main/STORAGE.md#retain-a-completed-goppi-baseline).
303
+
304
+ Records retain raw inputs, which may contain private content. Choose a private
305
+ local POSIX filesystem and a backup strategy; `./review-store` is only an example
306
+ location, not a backup. [Storage contracts and recovery](https://github.com/ntts9990/underwrite/blob/main/STORAGE.md).
307
+
308
+ ## What the result means
309
+
310
+ underwrite keeps different kinds of evidence distinct:
311
+
312
+ | Result | What it establishes |
313
+ | --- | --- |
314
+ | Source accounting | Relationships among the supplied rows, scores, and declared summaries |
315
+ | Byte hashes and record verification | Identity and integrity of selected bytes, not independent provenance |
316
+ | Native measurement | A result under the supplied event definition, population, and statistical assumptions |
317
+ | Acceptance classification | A policy result from declared claims and reads; no merge or deployment authority |
318
+
319
+ `not_measured`, `indeterminate`, and `abstained` remain different states. Missing
320
+ information is explicit. A source score is not automatically a calibrated
321
+ probability, and a successful command is not approval to ship.
322
+
323
+ ## Install
324
+
325
+ Install the versioned app; its dependency resolves the compatible core. Use
326
+ `underwrite --help` and `underwrite capabilities --json` to see the installed
327
+ profiles:
328
+
329
+ ```sh
330
+ uv tool install 'underwrite==0.2.0'
331
+ underwrite --help
332
+ underwrite capabilities --json
333
+ ```
334
+
335
+ The same `uv tool install` command updates an older uv-managed installation
336
+ without `--force`. If the executable is not on `PATH`, run `uv tool update-shell`
337
+ and open a new shell.
338
+
339
+ For the importable Python API, install into a Python 3.12 environment instead:
340
+
341
+ ```sh
342
+ uv venv --python 3.12 .venv
343
+ uv pip install --python .venv/bin/python 'underwrite==0.2.0'
344
+ .venv/bin/python - <<'PY'
345
+ from pathlib import Path
346
+ from underwrite.instrument.ingest.accounting import audit_promptfoo_file
347
+
348
+ result = audit_promptfoo_file(Path("/path/to/promptfoo-output.json"))
349
+ print(result["declared_relation"])
350
+ PY
351
+ ```
352
+
353
+ The installed distributions contain runtime code and schemas. The guide,
354
+ synthetic fixtures, optional agent skill, and contributor tools live in the
355
+ GitHub repository and require a checkout if you want to run those examples.
356
+
357
+ <details>
358
+ <summary>Historical 0.0.1 and its pin-manifest caution</summary>
359
+
360
+ The older published [app](https://pypi.org/project/underwrite/0.0.1/) and
361
+ [core](https://pypi.org/project/underwrite-core/0.0.1/) do not include the
362
+ `0.1.0` measurement, accounting, records, handoff, or `capabilities` workflows.
363
+ Discover installed commands with `--help`. Do not pair a `0.1.0` app wheel with
364
+ the `0.0.1` core.
365
+
366
+ The published `0.0.1` `pins refresh` should not process an untrusted pin
367
+ manifest. A controlled local audit reproduced overwrite of a writable file
368
+ outside the pin registry using a crafted manifest. The `0.1.0` code
369
+ refuses that path before mutation; the older `0.0.1` artifacts do not include
370
+ the correction. The reproduced case required the crafted manifest and a
371
+ writable target file.
372
+
373
+ </details>
374
+
375
+ ## CLI
376
+
377
+ Use `underwrite <command> --help` for options. Alongside the workflows above,
378
+ `inspect` checks artifact manifests, `audit-counts` checks Promptfoo counts through
379
+ a manifest with an expected hash, `check` examines release evidence linkage,
380
+ `absence` checks population presence, `boundary scan` checks configured verdict
381
+ vocabulary, and `drift check` / `pins refresh` work with supplied pin registries.
382
+ [JSON contracts](https://github.com/ntts9990/underwrite/tree/main/contracts/) define each command family's results and errors.
383
+
384
+ For scan and pin resource limits and filesystem-selection caveats, see
385
+ [Scan and pin limits](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#scan-and-pin-limits).
386
+
387
+ <a id="development-checkout-evidence-pilots"></a>
388
+
389
+ ## Documentation
390
+
391
+ These guides and examples are on GitHub, outside the runtime wheel. The installed
392
+ package includes the schemas needed for its CLI and Python APIs.
393
+
394
+ | Explore | Guide |
395
+ | --- | --- |
396
+ | Run from an agent, choose inputs, interpret JSON | [Agent usage](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md) |
397
+ | Compare declarations, paired evidence, and goppi handoffs | [Evidence workflows](https://github.com/ntts9990/underwrite/blob/main/AGENT_USAGE.md#source-checkout-pilot-compare-declarations) |
398
+ | Save, verify, retrieve, and recalculate | [Local records](https://github.com/ntts9990/underwrite/blob/main/STORAGE.md) |
399
+ | Understand producer fixtures and tested boundaries | [Producer evidence](https://github.com/ntts9990/underwrite/blob/main/EVIDENCE_REVIEW.md) |
400
+ | Extend the CLI and pure calculation core | [Contributing](https://github.com/ntts9990/underwrite/blob/main/CONTRIBUTING.md) · [Architecture rules](https://github.com/ntts9990/underwrite/blob/main/AGENTS.md) |
401
+
402
+ ## Contributing
403
+
404
+ Bring a reproducible artifact, a concrete workflow, or a fix.
405
+ [Open an issue](https://github.com/ntts9990/underwrite/issues) with the producer
406
+ version and expected result; share only sanitized examples. See
407
+ [CONTRIBUTING.md](https://github.com/ntts9990/underwrite/blob/main/CONTRIBUTING.md) for local preflight and PR checks, and
408
+ [SECURITY.md](https://github.com/ntts9990/underwrite/blob/main/SECURITY.md) for private vulnerability reports.
409
+
410
+ <details>
411
+ <summary>Maintainers: future PyPI releases</summary>
412
+
413
+ Before using OIDC publishing, create the GitHub environment `pypi`, restrict it to
414
+ `main`, and configure a PyPI GitHub Trusted Publisher on **each** package with owner
415
+ `ntts9990`, repository `underwrite`, workflow `publish.yml`, and environment `pypi`.
416
+ Once configured, run **Publish PyPI** manually from `main` in GitHub Actions.
417
+
418
+ The workflow validates both packages and defaults to publishing only the app
419
+ (`publish_core: false`), after testing it with the published compatible core. Select
420
+ `publish_core: true` only for an explicitly approved core release; core upload must
421
+ succeed before app upload. The unchanged core remains `0.1.1` for this app release.
422
+ Only the publish job receives OIDC permission; no stored PyPI token is required.
423
+ Retry partial uploads with identical artifacts. Existing registry files must match
424
+ exactly; never re-upload a rebuilt, different archive under an existing version.
425
+
426
+ See the official [uv publishing guide](https://docs.astral.sh/uv/guides/package/)
427
+ and [PyPI Trusted Publisher guide](https://docs.pypi.org/trusted-publishers/using-a-publisher/).
428
+
429
+ </details>
430
+
431
+ ## License
432
+
433
+ [Apache-2.0](https://github.com/ntts9990/underwrite/blob/main/LICENSE). [LICENSING.md](https://github.com/ntts9990/underwrite/blob/main/LICENSING.md) records the adapted policy
434
+ templates' CC licenses.