polyvoice 0.6.5__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 (260) hide show
  1. polyvoice-0.6.5/.cargo/config.toml +10 -0
  2. polyvoice-0.6.5/.coad/GOAL_CONTRACT.template +52 -0
  3. polyvoice-0.6.5/.coad/HANDOFF.template +52 -0
  4. polyvoice-0.6.5/.coad/INTEGRATION.template +39 -0
  5. polyvoice-0.6.5/.coad/LEDGER.md +46 -0
  6. polyvoice-0.6.5/.coad/PROOF.template +33 -0
  7. polyvoice-0.6.5/.coad/README.md +18 -0
  8. polyvoice-0.6.5/.coad/REVIEW.template +42 -0
  9. polyvoice-0.6.5/.coad/TASK_CONTRACT.template +48 -0
  10. polyvoice-0.6.5/.coad/WRITE_LEASE.template +74 -0
  11. polyvoice-0.6.5/.coad/completed/HANDOFF.record +57 -0
  12. polyvoice-0.6.5/.coad/completed/LEASE_DER.record +39 -0
  13. polyvoice-0.6.5/.coad/completed/MIGRATION_LEASE.record +36 -0
  14. polyvoice-0.6.5/.coad/completed/PROOF.record +42 -0
  15. polyvoice-0.6.5/.coad/completed/REVIEW.record +19 -0
  16. polyvoice-0.6.5/.coad/completed/TASK_DER_BENCH_UNIFICATION.record +78 -0
  17. polyvoice-0.6.5/.github/workflows/ci.yml +274 -0
  18. polyvoice-0.6.5/.github/workflows/fuzz.yml +26 -0
  19. polyvoice-0.6.5/.github/workflows/python.yml +35 -0
  20. polyvoice-0.6.5/.github/workflows/release.yml +106 -0
  21. polyvoice-0.6.5/.gitignore +63 -0
  22. polyvoice-0.6.5/AGENTS.md +162 -0
  23. polyvoice-0.6.5/AGENT_FLOW.md +83 -0
  24. polyvoice-0.6.5/CHANGELOG.md +520 -0
  25. polyvoice-0.6.5/COAD_PROJECT_STANDARD.md +142 -0
  26. polyvoice-0.6.5/CONTRIBUTING.md +60 -0
  27. polyvoice-0.6.5/Cargo.lock +3011 -0
  28. polyvoice-0.6.5/Cargo.toml +146 -0
  29. polyvoice-0.6.5/LICENSE +21 -0
  30. polyvoice-0.6.5/PKG-INFO +177 -0
  31. polyvoice-0.6.5/PRODUCTION-READINESS.md +177 -0
  32. polyvoice-0.6.5/README.md +161 -0
  33. polyvoice-0.6.5/VERSION +1 -0
  34. polyvoice-0.6.5/benches/der_ami.rs +57 -0
  35. polyvoice-0.6.5/benchmarks/README.md +104 -0
  36. polyvoice-0.6.5/benchmarks/results/ami-test-single-20260516.json +49 -0
  37. polyvoice-0.6.5/benchmarks/results/voxconverse-test-10files-20260516.json +175 -0
  38. polyvoice-0.6.5/benchmarks/results/voxconverse-test-3-20260516.json +34 -0
  39. polyvoice-0.6.5/benchmarks/results/voxconverse_kmeans_232files_2026-05-21.json +2092 -0
  40. polyvoice-0.6.5/docs/API.md +182 -0
  41. polyvoice-0.6.5/docs/FORMALISM.md +78 -0
  42. polyvoice-0.6.5/docs/GLOSSARY.md +29 -0
  43. polyvoice-0.6.5/docs/MIGRATING-FROM-0.5.md +116 -0
  44. polyvoice-0.6.5/docs/PIPELINE.md +47 -0
  45. polyvoice-0.6.5/docs/SEVERITY.md +39 -0
  46. polyvoice-0.6.5/docs/assets/demo.gif +0 -0
  47. polyvoice-0.6.5/docs/security/audit-2026-05-08.md +243 -0
  48. polyvoice-0.6.5/docs/strategy/2026-05-07-diarization-competitor-analysis.md +95 -0
  49. polyvoice-0.6.5/docs/strategy/2026-05-07-perfect-diarization-roadmap.md +343 -0
  50. polyvoice-0.6.5/docs/strategy/2026-05-07-perfect-diarization-spec.md +289 -0
  51. polyvoice-0.6.5/docs/strategy/dead-code-cleanup-plan.md +224 -0
  52. polyvoice-0.6.5/docs/strategy/m5-quantization-notes.md +133 -0
  53. polyvoice-0.6.5/docs/strategy/model-signing-plan.md +400 -0
  54. polyvoice-0.6.5/docs/strategy/python-wheel-validation.md +151 -0
  55. polyvoice-0.6.5/examples/ffi_usage.c +53 -0
  56. polyvoice-0.6.5/examples/hybrid_benchmark.rs +182 -0
  57. polyvoice-0.6.5/include/polyvoice.h +56 -0
  58. polyvoice-0.6.5/models/.gitkeep +0 -0
  59. polyvoice-0.6.5/models/cam_pp_fp32.onnx.minisig +4 -0
  60. polyvoice-0.6.5/models/ecapa_tdnn.onnx.minisig +4 -0
  61. polyvoice-0.6.5/models/ecapa_tdnn_mel.onnx.minisig +4 -0
  62. polyvoice-0.6.5/models/ecapa_tdnn_mel_v2.onnx.minisig +4 -0
  63. polyvoice-0.6.5/models/ecapa_tdnn_mel_v3.onnx.minisig +4 -0
  64. polyvoice-0.6.5/models/int8/.gitkeep +0 -0
  65. polyvoice-0.6.5/models/int8/cam_pp_int8.onnx.minisig +4 -0
  66. polyvoice-0.6.5/models/int8/powerset_int8.onnx.minisig +4 -0
  67. polyvoice-0.6.5/models/int8/resnet34_int8.onnx.minisig +4 -0
  68. polyvoice-0.6.5/models/powerset_fp32.onnx.minisig +4 -0
  69. polyvoice-0.6.5/models/signing.pub +2 -0
  70. polyvoice-0.6.5/models/silero_vad.onnx.minisig +4 -0
  71. polyvoice-0.6.5/models/wespeaker_resnet34.onnx.minisig +4 -0
  72. polyvoice-0.6.5/polyvoice/__init__.py +6 -0
  73. polyvoice-0.6.5/proptest-regressions/bin/polyvoice.txt +8 -0
  74. polyvoice-0.6.5/proptest-regressions/window/mod.txt +8 -0
  75. polyvoice-0.6.5/pyproject.toml +28 -0
  76. polyvoice-0.6.5/python/.gitignore +8 -0
  77. polyvoice-0.6.5/python/Cargo.lock +1455 -0
  78. polyvoice-0.6.5/python/Cargo.toml +14 -0
  79. polyvoice-0.6.5/python/README.md +161 -0
  80. polyvoice-0.6.5/python/requirements-dev.txt +17 -0
  81. polyvoice-0.6.5/python/src/lib.rs +100 -0
  82. polyvoice-0.6.5/python/tests/test_pipeline.py +106 -0
  83. polyvoice-0.6.5/python/tests/test_quantize_smoke.py +91 -0
  84. polyvoice-0.6.5/python/tests/test_smoke.py +15 -0
  85. polyvoice-0.6.5/python/tests/test_validate_smoke.py +51 -0
  86. polyvoice-0.6.5/scripts/download-ami-test-single.sh +48 -0
  87. polyvoice-0.6.5/scripts/download-ami-test.sh +94 -0
  88. polyvoice-0.6.5/scripts/download-models.sh +29 -0
  89. polyvoice-0.6.5/scripts/download-voxceleb1-subset.sh +67 -0
  90. polyvoice-0.6.5/scripts/download-voxconverse-dev.sh +69 -0
  91. polyvoice-0.6.5/scripts/download-voxconverse-test.sh +86 -0
  92. polyvoice-0.6.5/scripts/extract-voxconverse-hf.py +29 -0
  93. polyvoice-0.6.5/scripts/quantize-models.sh +96 -0
  94. polyvoice-0.6.5/scripts/quantize_models.py +217 -0
  95. polyvoice-0.6.5/scripts/release-check.sh +31 -0
  96. polyvoice-0.6.5/scripts/release-gate.sh +130 -0
  97. polyvoice-0.6.5/scripts/run-der-baseline.sh +19 -0
  98. polyvoice-0.6.5/scripts/sign-models.sh +133 -0
  99. polyvoice-0.6.5/scripts/validate-int8.sh +85 -0
  100. polyvoice-0.6.5/scripts/validate_int8.py +406 -0
  101. polyvoice-0.6.5/src/ahc/MODULE_CONTRACT.md +92 -0
  102. polyvoice-0.6.5/src/ahc/README.md +32 -0
  103. polyvoice-0.6.5/src/ahc/TODO.md +17 -0
  104. polyvoice-0.6.5/src/ahc/mod.rs +275 -0
  105. polyvoice-0.6.5/src/bin/MODULE_CONTRACT.md +109 -0
  106. polyvoice-0.6.5/src/bin/README.md +43 -0
  107. polyvoice-0.6.5/src/bin/TODO.md +16 -0
  108. polyvoice-0.6.5/src/bin/polyvoice-bench.rs +343 -0
  109. polyvoice-0.6.5/src/bin/polyvoice.rs +304 -0
  110. polyvoice-0.6.5/src/cluster/MODULE_CONTRACT.md +85 -0
  111. polyvoice-0.6.5/src/cluster/README.md +30 -0
  112. polyvoice-0.6.5/src/cluster/TODO.md +13 -0
  113. polyvoice-0.6.5/src/cluster/mod.rs +349 -0
  114. polyvoice-0.6.5/src/clusterer/MODULE_CONTRACT.md +109 -0
  115. polyvoice-0.6.5/src/clusterer/README.md +35 -0
  116. polyvoice-0.6.5/src/clusterer/TODO.md +14 -0
  117. polyvoice-0.6.5/src/clusterer/mod.rs +488 -0
  118. polyvoice-0.6.5/src/der/MODULE_CONTRACT.md +143 -0
  119. polyvoice-0.6.5/src/der/README.md +50 -0
  120. polyvoice-0.6.5/src/der/TODO.md +22 -0
  121. polyvoice-0.6.5/src/der/mod.rs +328 -0
  122. polyvoice-0.6.5/src/ecapa/MODULE_CONTRACT.md +95 -0
  123. polyvoice-0.6.5/src/ecapa/README.md +31 -0
  124. polyvoice-0.6.5/src/ecapa/TODO.md +15 -0
  125. polyvoice-0.6.5/src/ecapa/mod.rs +173 -0
  126. polyvoice-0.6.5/src/embedder/MODULE_CONTRACT.md +147 -0
  127. polyvoice-0.6.5/src/embedder/README.md +39 -0
  128. polyvoice-0.6.5/src/embedder/TODO.md +14 -0
  129. polyvoice-0.6.5/src/embedder/mod.rs +509 -0
  130. polyvoice-0.6.5/src/embedding/MODULE_CONTRACT.md +105 -0
  131. polyvoice-0.6.5/src/embedding/README.md +30 -0
  132. polyvoice-0.6.5/src/embedding/TODO.md +13 -0
  133. polyvoice-0.6.5/src/embedding/mod.rs +98 -0
  134. polyvoice-0.6.5/src/features/MODULE_CONTRACT.md +95 -0
  135. polyvoice-0.6.5/src/features/README.md +30 -0
  136. polyvoice-0.6.5/src/features/TODO.md +14 -0
  137. polyvoice-0.6.5/src/features/mod.rs +344 -0
  138. polyvoice-0.6.5/src/ffi/MODULE_CONTRACT.md +126 -0
  139. polyvoice-0.6.5/src/ffi/README.md +35 -0
  140. polyvoice-0.6.5/src/ffi/TODO.md +16 -0
  141. polyvoice-0.6.5/src/ffi/mod.rs +217 -0
  142. polyvoice-0.6.5/src/kmeans/MODULE_CONTRACT.md +100 -0
  143. polyvoice-0.6.5/src/kmeans/README.md +28 -0
  144. polyvoice-0.6.5/src/kmeans/TODO.md +13 -0
  145. polyvoice-0.6.5/src/kmeans/mod.rs +305 -0
  146. polyvoice-0.6.5/src/lib.rs +126 -0
  147. polyvoice-0.6.5/src/models/MODULE_CONTRACT.md +150 -0
  148. polyvoice-0.6.5/src/models/README.md +39 -0
  149. polyvoice-0.6.5/src/models/TODO.md +14 -0
  150. polyvoice-0.6.5/src/models/download.rs +335 -0
  151. polyvoice-0.6.5/src/models/manifest.rs +219 -0
  152. polyvoice-0.6.5/src/models/manifest.toml +111 -0
  153. polyvoice-0.6.5/src/models/mod.rs +365 -0
  154. polyvoice-0.6.5/src/models/signing.pub.base64 +1 -0
  155. polyvoice-0.6.5/src/models/verify.rs +196 -0
  156. polyvoice-0.6.5/src/onnx/MODULE_CONTRACT.md +105 -0
  157. polyvoice-0.6.5/src/onnx/README.md +31 -0
  158. polyvoice-0.6.5/src/onnx/TODO.md +11 -0
  159. polyvoice-0.6.5/src/onnx/mod.rs +298 -0
  160. polyvoice-0.6.5/src/overlap/MODULE_CONTRACT.md +89 -0
  161. polyvoice-0.6.5/src/overlap/README.md +28 -0
  162. polyvoice-0.6.5/src/overlap/TODO.md +11 -0
  163. polyvoice-0.6.5/src/overlap/mod.rs +185 -0
  164. polyvoice-0.6.5/src/pipeline/MODULE_CONTRACT.md +125 -0
  165. polyvoice-0.6.5/src/pipeline/README.md +33 -0
  166. polyvoice-0.6.5/src/pipeline/TODO.md +14 -0
  167. polyvoice-0.6.5/src/pipeline/mod.rs +197 -0
  168. polyvoice-0.6.5/src/pipeline_v2/builder.rs +338 -0
  169. polyvoice-0.6.5/src/pipeline_v2/config.rs +122 -0
  170. polyvoice-0.6.5/src/pipeline_v2/hybrid.rs +392 -0
  171. polyvoice-0.6.5/src/pipeline_v2/mocks.rs +102 -0
  172. polyvoice-0.6.5/src/pipeline_v2/mod.rs +335 -0
  173. polyvoice-0.6.5/src/resegmentation/MODULE_CONTRACT.md +111 -0
  174. polyvoice-0.6.5/src/resegmentation/README.md +33 -0
  175. polyvoice-0.6.5/src/resegmentation/TODO.md +13 -0
  176. polyvoice-0.6.5/src/resegmentation/mod.rs +752 -0
  177. polyvoice-0.6.5/src/rttm/MODULE_CONTRACT.md +138 -0
  178. polyvoice-0.6.5/src/rttm/README.md +32 -0
  179. polyvoice-0.6.5/src/rttm/TODO.md +11 -0
  180. polyvoice-0.6.5/src/rttm/mod.rs +257 -0
  181. polyvoice-0.6.5/src/segmentation/MODULE_CONTRACT.md +142 -0
  182. polyvoice-0.6.5/src/segmentation/README.md +36 -0
  183. polyvoice-0.6.5/src/segmentation/TODO.md +14 -0
  184. polyvoice-0.6.5/src/segmentation/aggregator.rs +642 -0
  185. polyvoice-0.6.5/src/segmentation/decoder.rs +253 -0
  186. polyvoice-0.6.5/src/segmentation/hungarian.rs +172 -0
  187. polyvoice-0.6.5/src/segmentation/mod.rs +170 -0
  188. polyvoice-0.6.5/src/segmentation/powerset.rs +212 -0
  189. polyvoice-0.6.5/src/silero_vad/MODULE_CONTRACT.md +92 -0
  190. polyvoice-0.6.5/src/silero_vad/README.md +29 -0
  191. polyvoice-0.6.5/src/silero_vad/TODO.md +11 -0
  192. polyvoice-0.6.5/src/silero_vad/mod.rs +144 -0
  193. polyvoice-0.6.5/src/spectral/MODULE_CONTRACT.md +81 -0
  194. polyvoice-0.6.5/src/spectral/README.md +29 -0
  195. polyvoice-0.6.5/src/spectral/TODO.md +11 -0
  196. polyvoice-0.6.5/src/spectral/mod.rs +312 -0
  197. polyvoice-0.6.5/src/streaming/MODULE_CONTRACT.md +102 -0
  198. polyvoice-0.6.5/src/streaming/README.md +34 -0
  199. polyvoice-0.6.5/src/streaming/TODO.md +13 -0
  200. polyvoice-0.6.5/src/streaming/mod.rs +355 -0
  201. polyvoice-0.6.5/src/types/MODULE_CONTRACT.md +154 -0
  202. polyvoice-0.6.5/src/types/README.md +36 -0
  203. polyvoice-0.6.5/src/types/TODO.md +14 -0
  204. polyvoice-0.6.5/src/types/mod.rs +526 -0
  205. polyvoice-0.6.5/src/utils/MODULE_CONTRACT.md +133 -0
  206. polyvoice-0.6.5/src/utils/README.md +29 -0
  207. polyvoice-0.6.5/src/utils/TODO.md +18 -0
  208. polyvoice-0.6.5/src/utils/mod.rs +215 -0
  209. polyvoice-0.6.5/src/vad/MODULE_CONTRACT.md +132 -0
  210. polyvoice-0.6.5/src/vad/README.md +33 -0
  211. polyvoice-0.6.5/src/vad/TODO.md +13 -0
  212. polyvoice-0.6.5/src/vad/mod.rs +288 -0
  213. polyvoice-0.6.5/src/wav/MODULE_CONTRACT.md +86 -0
  214. polyvoice-0.6.5/src/wav/README.md +28 -0
  215. polyvoice-0.6.5/src/wav/TODO.md +11 -0
  216. polyvoice-0.6.5/src/wav/mod.rs +106 -0
  217. polyvoice-0.6.5/src/window/MODULE_CONTRACT.md +86 -0
  218. polyvoice-0.6.5/src/window/README.md +29 -0
  219. polyvoice-0.6.5/src/window/TODO.md +11 -0
  220. polyvoice-0.6.5/src/window/mod.rs +324 -0
  221. polyvoice-0.6.5/tests/chaos_test.rs +284 -0
  222. polyvoice-0.6.5/tests/cli_smoke_test.rs +113 -0
  223. polyvoice-0.6.5/tests/clusterer_test.rs +59 -0
  224. polyvoice-0.6.5/tests/der_ami_baseline_test.rs +59 -0
  225. polyvoice-0.6.5/tests/der_baseline.json +123 -0
  226. polyvoice-0.6.5/tests/der_baseline_test.rs +87 -0
  227. polyvoice-0.6.5/tests/der_regression_test.rs +206 -0
  228. polyvoice-0.6.5/tests/der_v2_baseline_test.rs +143 -0
  229. polyvoice-0.6.5/tests/e2e_smoke_test.rs +124 -0
  230. polyvoice-0.6.5/tests/embedder_test.rs +64 -0
  231. polyvoice-0.6.5/tests/ffi_memory.py +153 -0
  232. polyvoice-0.6.5/tests/ffi_smoke_test.rs +33 -0
  233. polyvoice-0.6.5/tests/hybrid_diagnostics.rs +515 -0
  234. polyvoice-0.6.5/tests/hybrid_embedder_sweep.rs +116 -0
  235. polyvoice-0.6.5/tests/hybrid_voxconverse_full.rs +133 -0
  236. polyvoice-0.6.5/tests/hybrid_window_sweep.rs +93 -0
  237. polyvoice-0.6.5/tests/loom_pool.rs +147 -0
  238. polyvoice-0.6.5/tests/m5_manifest_smoke_test.rs +119 -0
  239. polyvoice-0.6.5/tests/miri_resegmentation.rs +99 -0
  240. polyvoice-0.6.5/tests/perf_regression_test.rs +171 -0
  241. polyvoice-0.6.5/tests/pipeline_v2_aorju.rs +88 -0
  242. polyvoice-0.6.5/tests/pipeline_v2_debug.rs +390 -0
  243. polyvoice-0.6.5/tests/pipeline_v2_hybrid_test.rs +485 -0
  244. polyvoice-0.6.5/tests/pipeline_v2_integration.rs +131 -0
  245. polyvoice-0.6.5/tests/pipeline_v2_longform_debug.rs +232 -0
  246. polyvoice-0.6.5/tests/pipeline_v2_vs_hybrid.rs +108 -0
  247. polyvoice-0.6.5/tests/property_ahc_test.proptest-regressions +7 -0
  248. polyvoice-0.6.5/tests/property_ahc_test.rs +75 -0
  249. polyvoice-0.6.5/tests/property_der_test.proptest-regressions +7 -0
  250. polyvoice-0.6.5/tests/property_der_test.rs +74 -0
  251. polyvoice-0.6.5/tests/property_kmeans_test.proptest-regressions +7 -0
  252. polyvoice-0.6.5/tests/property_kmeans_test.rs +45 -0
  253. polyvoice-0.6.5/tests/property_types_test.proptest-regressions +7 -0
  254. polyvoice-0.6.5/tests/property_types_test.rs +61 -0
  255. polyvoice-0.6.5/tests/property_utils_test.rs +67 -0
  256. polyvoice-0.6.5/tests/registry_test.rs +48 -0
  257. polyvoice-0.6.5/tests/resegmentation_test.rs +328 -0
  258. polyvoice-0.6.5/tests/segmenter_test.rs +73 -0
  259. polyvoice-0.6.5/tests/test_ahc.rs +66 -0
  260. polyvoice-0.6.5/tests/test_wav.rs +64 -0
@@ -0,0 +1,10 @@
1
+ [build]
2
+ rustflags = ["-D", "warnings"]
3
+
4
+ [env]
5
+ RUST_BACKTRACE = "1"
6
+
7
+ [alias]
8
+ check-all = "clippy --all-targets --all-features -- -D warnings"
9
+ test-all = "test --all-features"
10
+ doc-check = "doc --no-deps --all-features"
@@ -0,0 +1,52 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: goal_contract
4
+ goal_id:
5
+ objective:
6
+ status: proposed
7
+ risk: medium
8
+ goal_class: feature
9
+ delivery:
10
+ max_parallel_agents: 3
11
+ allow_external_side_effects: false
12
+ require_contract_updates: true
13
+ budget:
14
+ time:
15
+ tokens:
16
+ cost:
17
+ readiness_oracle:
18
+ type: test_suite
19
+ claim: All tests pass and coad check passes
20
+ required_proof:
21
+ - cargo test
22
+ - coad check .
23
+ decomposition:
24
+ strategy: module_owned
25
+ tasks:
26
+ - <task-id>
27
+ contracts:
28
+ modules:
29
+ - <module>
30
+ tasks:
31
+ - <task-contract-path>
32
+ proofs:
33
+ - <proof-contract-path>
34
+ reviews:
35
+ - <review-contract-path>
36
+ integration:
37
+ - <integration-contract-path>
38
+ ---
39
+
40
+ # Goal: <goal-id>
41
+
42
+ ## Intent
43
+
44
+ Explain the user-visible outcome and constraints.
45
+
46
+ ## Readiness Oracle
47
+
48
+ Explain what proves the goal is ready.
49
+
50
+ ## Decomposition Notes
51
+
52
+ Explain why the task split is safe for orchestration.
@@ -0,0 +1,52 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: handoff_contract
4
+ task_id:
5
+ status: complete
6
+ changed_files: []
7
+ proof_results: []
8
+ contract_updates: []
9
+ decisions: []
10
+ known_gaps: []
11
+ follow_up_tasks: []
12
+ ---
13
+
14
+ # Handoff: <task-id>
15
+
16
+ ## Summary
17
+
18
+ Briefly state what changed and why.
19
+
20
+ ## Evidence
21
+
22
+ List proof results and artifact paths.
23
+
24
+ ## Next Work
25
+
26
+ List follow-up task contracts or state `none`.
27
+
28
+ ## Template
29
+
30
+ ```markdown
31
+ Module: src/<module>
32
+ Workcell: leaf
33
+ Write scope:
34
+ - src/<module>/mod.rs
35
+ - src/<module>/TODO.md
36
+ nChanged files:
37
+ - src/<module>/mod.rs
38
+ Contracts/context updated:
39
+ - src/<module>/TODO.md (marked task done)
40
+ Surfaces changed:
41
+ - <none | name of changed surface>
42
+ Consumers affected:
43
+ - <none | list affected consumers>
44
+ Invariants checked:
45
+ - <invariant-id>: <result>
46
+ Proof run:
47
+ - <command>: <result>
48
+ Known gaps:
49
+ - <none | list gaps>
50
+ Recommended next step:
51
+ - <action>
52
+ ```
@@ -0,0 +1,39 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: integration_contract
4
+ integration_id:
5
+ baseline: main
6
+ policy:
7
+ require_clean_history: true
8
+ require_signed_commits: false
9
+ tasks: []
10
+ merge_order: []
11
+ required_before_integration:
12
+ - all task proof contracts pass
13
+ - all blocking review findings resolved
14
+ - no write-scope conflicts remain
15
+ final_verification:
16
+ - cargo test
17
+ - cargo clippy --all-targets --all-features -- -D warnings
18
+ - coad check .
19
+ release_evidence:
20
+ required:
21
+ - final_diff
22
+ - final_test_output
23
+ - contract_drift_report
24
+ terminal_statuses:
25
+ - ready
26
+ - not_ready
27
+ - blocked
28
+ - failed
29
+ ---
30
+
31
+ # Integration: <integration-id>
32
+
33
+ ## Plan
34
+
35
+ Describe integration order, conflict handling, and final proof.
36
+
37
+ ## Terminal Status
38
+
39
+ State final readiness and evidence.
@@ -0,0 +1,46 @@
1
+ # COAD Execution Ledger — polyvoice
2
+
3
+ > Level 4 artifact: completed agent work is recorded here with proof evidence.
4
+
5
+ ## Ledger Format
6
+
7
+ ```markdown
8
+ | Date | Task ID | Owner | Module(s) | Change Class | Proof | Status |
9
+ ```
10
+
11
+ ## Entries
12
+
13
+ | Date | Task ID | Owner | Module(s) | Change Class | Proof | Status |
14
+ |------|---------|-------|-----------|--------------|-------|--------|
15
+ | 2026-05-16 | der-bench-unification-001 | agent-alpha | src/der, benches/der_ami | internal_refactor | bench-compiles, bench-runs | completed |
16
+
17
+ ### 2026-05-16 — der-bench-unification-001
18
+
19
+ **Objective**: Remove duplicate DER implementation from `benches/der_ami.rs` and
20
+ replace with `polyvoice::der::compute_der_from_rttm`.
21
+
22
+ **Changed files**:
23
+ - `benches/der_ami.rs`
24
+ - `src/der/TODO.md`
25
+
26
+ **Proof artifacts**:
27
+ - `cargo check --bench der_ami` — compiles
28
+ - `cargo bench --bench der_ami -- --sample-size 10` — assertions pass
29
+ - perfect hypothesis DER = 0.0%
30
+ - confused hypothesis DER = 27.8%
31
+
32
+ **Contract updates**:
33
+ - `src/der/TODO.md` — item moved from Known Gaps to done
34
+
35
+ **Handoff**: `.coad/completed/HANDOFF.record`
36
+ **Review**: `.coad/completed/REVIEW.record`
37
+ **Proof**: `.coad/completed/PROOF.record`
38
+
39
+ ---
40
+
41
+ ## Ledger Rules
42
+
43
+ 1. Every completed Level 3 task is appended to this ledger.
44
+ 2. Proof artifacts must be reproducible (commands, not chat claims).
45
+ 3. If a task is reverted, add a reversal entry with reference to original.
46
+ 4. The ledger is append-only; do not delete historical entries.
@@ -0,0 +1,33 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: proof_contract
4
+ proof_id:
5
+ claim: <claim being proven>
6
+ required:
7
+ - kind: unit-test
8
+ target:
9
+ command:
10
+ blocks_readiness: true
11
+ accepted_missing: []
12
+ artifacts: []
13
+ ---
14
+
15
+ # Proof: <proof-id>
16
+
17
+ ## Claim
18
+
19
+ State the exact claim this proof accepts or rejects.
20
+
21
+ ## Evidence
22
+
23
+ List command outputs, artifact paths, review reports, or manual verification records.
24
+
25
+ ## Example
26
+
27
+ ```
28
+ Claim: DER of identical ref/hyp is exactly 0.
29
+ Evidence:
30
+ - cargo test --test property_der_test::der_identical_ref_hyp_is_zero
31
+ test der_identical_ref_hyp_is_zero ... ok
32
+ - 1000 proptest cases passed
33
+ ```
@@ -0,0 +1,18 @@
1
+ # .coad/
2
+
3
+ COAD orchestration contracts and templates for polyvoice.
4
+
5
+ This directory contains reusable templates for coordinated agent work:
6
+ - **TASK_CONTRACT.md** — scoped work assignment for a leaf workcell
7
+ - **PROOF.md** — evidence that a claim holds
8
+ - **HANDOFF.md** — transfer of completed work between agents
9
+ - **REVIEW.md** — structured review of a task
10
+ - **INTEGRATION.md** — multi-task integration plan
11
+ - **GOAL_CONTRACT.md** — top-level goal decomposition
12
+ - **WRITE_LEASE.md** — temporary write authority for a workcell
13
+
14
+ Usage: copy the relevant template, fill in the fields, and place it in the
15
+ workcell directory or in `.coad/active/` during coordinated work.
16
+
17
+ See `COAD_PROJECT_STANDARD.md` for adoption levels and `AGENT_FLOW.md` for
18
+ the agent protocol.
@@ -0,0 +1,42 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: review_contract
4
+ review_id:
5
+ target_task:
6
+ required_reviewers:
7
+ - role: composite_orchestrator
8
+ scope: module boundary + cross-module impact
9
+ findings:
10
+ severity_levels:
11
+ - blocker
12
+ - high
13
+ - medium
14
+ - low
15
+ acceptance:
16
+ blocks_on:
17
+ - blocker
18
+ - high
19
+ requires_no_unresolved_questions: true
20
+ outputs:
21
+ - review_report
22
+ - follow_up_task_contracts
23
+ ---
24
+
25
+ # Review: <review-id>
26
+
27
+ ## Checklist
28
+
29
+ 1. Does the change stay inside declared module ownership?
30
+ 2. Did it alter public or internal surfaces?
31
+ 3. Are consumers updated or explicitly unaffected?
32
+ 4. Are invariants preserved?
33
+ 5. Is proof strong enough for the change class?
34
+ 6. Did module context change when the module changed?
35
+
36
+ ## Findings
37
+
38
+ List findings first, ordered by severity.
39
+
40
+ ## Outcome
41
+
42
+ State `pass`, `blocked`, or `pass_with_known_gaps`.
@@ -0,0 +1,48 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: task_contract
4
+ task_id:
5
+ objective:
6
+ owner_role: leaf_write_agent
7
+ status: pending
8
+ risk: low
9
+ change_class: internal_refactor
10
+ modules:
11
+ - <affected module>
12
+ read_scope:
13
+ - <files to read>
14
+ write_scope:
15
+ - <files to edit>
16
+ dependencies: []
17
+ allowed_mutations:
18
+ - <safe changes>
19
+ forbidden_mutations:
20
+ - <changes that require escalation>
21
+ acceptance:
22
+ - <criteria for done>
23
+ proof:
24
+ required:
25
+ - proof_id:
26
+ kind: unit-test
27
+ target:
28
+ command:
29
+ handoff:
30
+ required_fields:
31
+ - changed_files
32
+ - proof_results
33
+ - contract_updates
34
+ - known_gaps
35
+ ---
36
+
37
+ # Task: <task-id>
38
+
39
+ ## Context
40
+
41
+ Explain only what the worker needs to execute this task safely.
42
+ Reference the relevant `MODULE_CONTRACT.md`, `README.md`, and `TODO.md`.
43
+
44
+ ## Exit Criteria
45
+
46
+ - **complete**: All acceptance criteria met, proof commands pass, contracts updated.
47
+ - **blocked**: External dependency or unclear ownership — escalate to orchestrator.
48
+ - **not_ready**: Preconditions not satisfied — do not start work.
@@ -0,0 +1,74 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: write_lease
4
+ lease_id:
5
+ workcell:
6
+ module:
7
+ type: leaf
8
+ owner:
9
+ agent_id:
10
+ role: leaf_write_agent
11
+ task:
12
+ objective:
13
+ affected_surfaces: []
14
+ invariants_touched: []
15
+ read_scope:
16
+ - <list files/modules agent may read for context>
17
+ write_scope:
18
+ - <list files agent may mutate>
19
+ expiry:
20
+ condition: <completion | timeout | human_cancellation>
21
+ deadline: <ISO 8601 or relative>
22
+ proof_required:
23
+ - <command or check that must pass before handoff>
24
+ parent_orchestrator:
25
+ agent_id:
26
+ escalation_path: <how to escalate conflicts>
27
+ ---
28
+
29
+ # Write Lease
30
+
31
+ ## Rules
32
+
33
+ 1. One leaf workcell → one active write lease at a time.
34
+ 2. The owner may only mutate files in `write_scope`.
35
+ 3. The owner must preserve all invariants listed in the workcell contract.
36
+ 4. Before expiry, the owner must run all `proof_required` commands.
37
+ 5. Read-only agents may work in parallel without a lease.
38
+ 6. Cross-workcell changes require a migration lease from the parent orchestrator.
39
+
40
+ ## Example
41
+
42
+ ```yaml
43
+ lease_id: fix-der-collar-001
44
+ workcell:
45
+ module: src/der
46
+ type: leaf
47
+ owner:
48
+ agent_id: agent-alpha
49
+ role: leaf_write_agent
50
+ task:
51
+ objective: Fix collar boundary handling for 0.0s edge case
52
+ affected_surfaces:
53
+ - build_collar_mask
54
+ invariants_touched:
55
+ - collar-reduces-der
56
+ read_scope:
57
+ - src/der/mod.rs
58
+ - src/der/MODULE_CONTRACT.md
59
+ - src/der/README.md
60
+ - src/der/TODO.md
61
+ - tests/der_baseline_test.rs
62
+ write_scope:
63
+ - src/der/mod.rs
64
+ - src/der/TODO.md
65
+ expiry:
66
+ condition: completion
67
+ deadline: "2026-05-17T12:00:00Z"
68
+ proof_required:
69
+ - cargo test --lib der
70
+ - cargo test --test property_der_test
71
+ parent_orchestrator:
72
+ agent_id: agent-lead
73
+ escalation_path: "Ping in #polyvoice-dev or open migration lease"
74
+ ```
@@ -0,0 +1,57 @@
1
+ # Handoff: der-bench-unification-001
2
+
3
+ ## Summary
4
+
5
+ Removed duplicate DER implementation from `benches/der_ami.rs` and replaced it
6
+ with `polyvoice::der::compute_der_from_rttm`. Added a helper `to_speaker_turns`
7
+ to map bench hypothesis tuples to `SpeakerTurn`s.
8
+
9
+ ## Evidence
10
+
11
+ - `cargo check --bench der_ami` — compiles cleanly.
12
+ - `cargo bench --bench der_ami -- --sample-size 10` — assertions pass:
13
+ - perfect hypothesis DER = 0.0% (< 5%)
14
+ - confused hypothesis DER = 27.8% (> 10%)
15
+ - benchmark throughput: ~48 µs/iteration
16
+
17
+ ## Changed Files
18
+
19
+ - `benches/der_ami.rs` — removed local `compute_der`, added `to_speaker_turns`,
20
+ uses `polyvoice::der::compute_der_from_rttm`
21
+ - `src/der/TODO.md` — marked bench unification as done
22
+
23
+ ## Contracts/Context Updated
24
+
25
+ - `src/der/TODO.md` — moved item from Known Gaps to Current (done)
26
+
27
+ ## Surfaces Changed
28
+
29
+ - `benches/der_ami.rs` internal surface only (no public API changes)
30
+
31
+ ## Consumers Affected
32
+
33
+ - None (bench is a build target, not a library consumer)
34
+
35
+ ## Invariants Checked
36
+
37
+ - `der-range`: DER results remain in [0, 1]
38
+ - `identical-zero`: perfect hypothesis → DER ≈ 0
39
+ - `collar-reduces-der`: bench still exercises collar logic via `compute_der_from_rttm`
40
+
41
+ ## Proof Run
42
+
43
+ ```bash
44
+ cargo check --bench der_ami # OK
45
+ cargo bench --bench der_ami -- --sample-size 10 # OK
46
+ coad check . # OK
47
+ cargo test --lib # 62 passed
48
+ cargo clippy --all-targets --all-features -- -D warnings # OK
49
+ ```
50
+
51
+ ## Known Gaps
52
+
53
+ - None for this task.
54
+
55
+ ## Recommended Next Step
56
+
57
+ Archive this handoff record to `.coad/completed/` after review.
@@ -0,0 +1,39 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: write_lease
4
+ lease_id: lease-der-bench-001
5
+ workcell:
6
+ module: src/der
7
+ type: leaf
8
+ owner:
9
+ agent_id: agent-alpha
10
+ role: leaf_write_agent
11
+ task:
12
+ objective: Update src/der TODO to reflect bench unification work
13
+ affected_surfaces:
14
+ - src/der/TODO.md
15
+ invariants_touched: []
16
+ read_scope:
17
+ - src/der/mod.rs
18
+ - src/der/MODULE_CONTRACT.md
19
+ - src/der/README.md
20
+ - src/der/TODO.md
21
+ write_scope:
22
+ - src/der/TODO.md
23
+ expiry:
24
+ condition: completion
25
+ deadline: "2026-05-16T22:00:00Z"
26
+ proof_required:
27
+ - coad check .
28
+ parent_orchestrator:
29
+ agent_id: agent-lead
30
+ escalation_path: "Ping in #polyvoice-dev or open migration lease"
31
+ ---
32
+
33
+ # Write Lease: src/der
34
+
35
+ ## Rules
36
+
37
+ 1. Only mutate `src/der/TODO.md`.
38
+ 2. Do not change `src/der/mod.rs` or any public surfaces.
39
+ 3. Run `coad check .` before handoff.
@@ -0,0 +1,36 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: migration_lease
4
+ migration_id: mig-der-bench-001
5
+ objective: >
6
+ Cross-workcell change: benches/der_ami.rs uses src/der public surface.
7
+ Requires temporary write access to bench file while respecting src/der
8
+ invariants.
9
+ affected_workcells:
10
+ - module: src/der
11
+ reason: Consumer proof verification (bench still passes).
12
+ - module: benches/der_ami
13
+ reason: Implementation file being refactored.
14
+ temporary_write_scope:
15
+ - benches/der_ami.rs
16
+ paused_child_work:
17
+ - none
18
+ proof_required:
19
+ - cargo check --bench der_ami
20
+ - cargo bench --bench der_ami
21
+ integration_owner: agent-lead
22
+ approved_by: agent-lead
23
+ ---
24
+
25
+ # Migration Lease: DER bench unification
26
+
27
+ ## Justification
28
+
29
+ Ordinary leaf-local work is insufficient because the change replaces a
30
+ private bench implementation with a public cross-module surface call.
31
+ The bench file is not a leaf workcell but is a consumer of src/der.
32
+
33
+ ## Rollback Plan
34
+
35
+ If bench assertions fail after the change, revert to original
36
+ benches/der_ami.rs and escalate to src/der owner for behavior review.
@@ -0,0 +1,42 @@
1
+ # Proof: der-bench-unification-001
2
+
3
+ ## Claim
4
+
5
+ `benches/der_ami.rs` no longer contains a duplicate DER implementation and
6
+ successfully uses `polyvoice::der::compute_der_from_rttm` while preserving
7
+ all bench assertions.
8
+
9
+ ## Evidence
10
+
11
+ ### Static Check: Compilation
12
+
13
+ ```bash
14
+ $ cargo check --bench der_ami
15
+ Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.21s
16
+ ```
17
+
18
+ ### Benchmark: Assertions Pass
19
+
20
+ ```bash
21
+ $ cargo bench --bench der_ami -- --sample-size 10
22
+ Synthetic DER (perfect): 0.0%
23
+ Synthetic DER (confused): 27.8%
24
+ der_synthetic time: [47.741 µs 47.981 µs 48.157 µs]
25
+ ```
26
+
27
+ ### Repository Validation
28
+
29
+ ```bash
30
+ $ coad check .
31
+ coad check: pass
32
+
33
+ $ cargo test --lib
34
+ test result: ok. 62 passed; 0 failed; 0 ignored
35
+
36
+ $ cargo clippy --all-targets --all-features -- -D warnings
37
+ Finished `dev` profile [unoptimized + debuginfo] target(s)
38
+ ```
39
+
40
+ ## Verdict
41
+
42
+ Claim **accepted**. Bench unification is complete and verified.
@@ -0,0 +1,19 @@
1
+ # Review: der-bench-unification-001
2
+
3
+ ## Checklist
4
+
5
+ 1. ✅ Change stays inside declared scope (benches/der_ami.rs + src/der/TODO.md)
6
+ 2. ✅ No public surfaces altered
7
+ 3. ✅ Consumers unaffected (bench is not a library consumer)
8
+ 4. ✅ Invariants preserved (DER semantics unchanged)
9
+ 5. ✅ Proof strong enough (compiles + bench assertions pass)
10
+ 6. ✅ Module context updated (TODO.md marked done)
11
+
12
+ ## Findings
13
+
14
+ - **low**: Consider adding a dedicated `criterion` bench for `compute_der` in
15
+ isolation (micro-benchmark on synthetic data) as noted in `src/der/TODO.md`.
16
+
17
+ ## Outcome
18
+
19
+ **pass**
@@ -0,0 +1,78 @@
1
+ ---
2
+ schema_version: 1
3
+ kind: task_contract
4
+ task_id: der-bench-unification-001
5
+ objective: >
6
+ Remove duplicate DER implementation from benches/der_ami.rs and replace it
7
+ with polyvoice::der::compute_der_from_rttm. Eliminates maintenance risk
8
+ from divergent DER logic.
9
+ owner_role: leaf_write_agent
10
+ status: in_progress
11
+ risk: low
12
+ change_class: internal_refactor
13
+ modules:
14
+ - src/der
15
+ - benches/der_ami
16
+ read_scope:
17
+ - src/der/mod.rs
18
+ - src/der/MODULE_CONTRACT.md
19
+ - src/der/TODO.md
20
+ - src/der/README.md
21
+ - benches/der_ami.rs
22
+ - src/types/mod.rs
23
+ write_scope:
24
+ - benches/der_ami.rs
25
+ - src/der/TODO.md
26
+ dependencies:
27
+ - src/types (SpeakerTurn, SpeakerId, TimeRange data shapes)
28
+ - src/der (compute_der_from_rttm public surface)
29
+ allowed_mutations:
30
+ - Replace local compute_der in bench with crate call.
31
+ - Add use statements for polyvoice types in bench.
32
+ - Update src/der/TODO.md to mark task done.
33
+ forbidden_mutations:
34
+ - Changing compute_der_from_rttm signature or behavior.
35
+ - Changing bench assertions or thresholds.
36
+ - Modifying src/der/mod.rs implementation.
37
+ acceptance:
38
+ - benches/der_ami.rs no longer contains a local compute_der function.
39
+ - bench still compiles: cargo bench --bench der_ami compiles.
40
+ - bench assertions still pass on synthetic data.
41
+ - coad check . passes.
42
+ proof:
43
+ required:
44
+ - proof_id: bench-compiles
45
+ kind: static-check
46
+ target: benches/der_ami.rs
47
+ command: cargo check --bench der_ami
48
+ - proof_id: bench-runs
49
+ kind: benchmark
50
+ target: benches/der_ami.rs
51
+ command: cargo bench --bench der_ami
52
+ handoff:
53
+ required_fields:
54
+ - changed_files
55
+ - proof_results
56
+ - contract_updates
57
+ - known_gaps
58
+ ---
59
+
60
+ # Task: Unify DER computation in benchmark
61
+
62
+ ## Context
63
+
64
+ `benches/der_ami.rs` maintains its own simplified 100ms-resolution DER impl.
65
+ This diverges from `src/der/mod.rs` and is a maintenance risk (tracked in
66
+ `src/der/TODO.md` Known Gaps and `docs/strategy/dead-code-cleanup-plan.md`).
67
+
68
+ `src/der::compute_der_from_rttm` accepts `&[(f64, f64, &str)]` for reference
69
+ and `&[SpeakerTurn]` for hypothesis — compatible with bench data after a
70
+ lightweight mapping of hypothesis tuples to SpeakerTurns.
71
+
72
+ ## Exit Criteria
73
+
74
+ - **complete**: Local compute_der removed, bench uses crate function,
75
+ assertions pass, TODO updated.
76
+ - **blocked**: If compute_der_from_rttm behavior differs enough to break
77
+ bench assertions — escalate to src/der owner for invariant review.
78
+ - **not_ready**: If src/der contract or tests are failing — do not start.