honestreview 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 (304) hide show
  1. honestreview-0.2.0/LICENSE +21 -0
  2. honestreview-0.2.0/PKG-INFO +170 -0
  3. honestreview-0.2.0/README.md +139 -0
  4. honestreview-0.2.0/pyproject.toml +72 -0
  5. honestreview-0.2.0/setup.cfg +4 -0
  6. honestreview-0.2.0/src/honestreview/__init__.py +85 -0
  7. honestreview-0.2.0/src/honestreview/agent_safety.py +180 -0
  8. honestreview-0.2.0/src/honestreview/ast_scope.py +32 -0
  9. honestreview-0.2.0/src/honestreview/atomic_io.py +20 -0
  10. honestreview-0.2.0/src/honestreview/bash_authored_source.py +151 -0
  11. honestreview-0.2.0/src/honestreview/block_salvage.py +89 -0
  12. honestreview-0.2.0/src/honestreview/bulk_staging.py +230 -0
  13. honestreview-0.2.0/src/honestreview/calibration_gate.py +257 -0
  14. honestreview-0.2.0/src/honestreview/call_intent.py +243 -0
  15. honestreview-0.2.0/src/honestreview/caller_branches.py +290 -0
  16. honestreview-0.2.0/src/honestreview/canonical_concerns.py +262 -0
  17. honestreview-0.2.0/src/honestreview/capability_audit.py +135 -0
  18. honestreview-0.2.0/src/honestreview/catalog_conformance.py +82 -0
  19. honestreview-0.2.0/src/honestreview/catalog_first.py +140 -0
  20. honestreview-0.2.0/src/honestreview/chunking.py +330 -0
  21. honestreview-0.2.0/src/honestreview/ci.py +57 -0
  22. honestreview-0.2.0/src/honestreview/cli.py +248 -0
  23. honestreview-0.2.0/src/honestreview/coding_router.py +173 -0
  24. honestreview-0.2.0/src/honestreview/cohesion_clusters.py +203 -0
  25. honestreview-0.2.0/src/honestreview/contract_crosswalk.py +243 -0
  26. honestreview-0.2.0/src/honestreview/cost_estimate.py +35 -0
  27. honestreview-0.2.0/src/honestreview/critic.py +27 -0
  28. honestreview-0.2.0/src/honestreview/data_contract.py +213 -0
  29. honestreview-0.2.0/src/honestreview/data_review.py +239 -0
  30. honestreview-0.2.0/src/honestreview/defs.py +290 -0
  31. honestreview-0.2.0/src/honestreview/deliverable_versioning.py +251 -0
  32. honestreview-0.2.0/src/honestreview/derived_artifact_integrity.py +171 -0
  33. honestreview-0.2.0/src/honestreview/dispatch.py +408 -0
  34. honestreview-0.2.0/src/honestreview/doctrine/AGENT_SAFETY.md +53 -0
  35. honestreview-0.2.0/src/honestreview/doctrine/BOUNDED_LOCAL_RESOURCES.md +43 -0
  36. honestreview-0.2.0/src/honestreview/doctrine/BULK_STAGING.md +48 -0
  37. honestreview-0.2.0/src/honestreview/doctrine/CALIBRATION_GATE.md +66 -0
  38. honestreview-0.2.0/src/honestreview/doctrine/CALLER_BRANCHES.md +47 -0
  39. honestreview-0.2.0/src/honestreview/doctrine/CANONICAL_FINGERPRINT.md +37 -0
  40. honestreview-0.2.0/src/honestreview/doctrine/CANONICAL_IMPLEMENTATION.md +102 -0
  41. honestreview-0.2.0/src/honestreview/doctrine/CATALOG_FIRST.md +47 -0
  42. honestreview-0.2.0/src/honestreview/doctrine/CLAUDE_BLOCK.md +69 -0
  43. honestreview-0.2.0/src/honestreview/doctrine/CODING_GUIDE.md +312 -0
  44. honestreview-0.2.0/src/honestreview/doctrine/CODING_GUIDE_HTML.md +196 -0
  45. honestreview-0.2.0/src/honestreview/doctrine/CODING_GUIDE_JS.md +210 -0
  46. honestreview-0.2.0/src/honestreview/doctrine/CONCURRENCY_SAFETY.md +55 -0
  47. honestreview-0.2.0/src/honestreview/doctrine/CONFIDENCE_IS_WEAKEST_LINK.md +37 -0
  48. honestreview-0.2.0/src/honestreview/doctrine/DATA_CONTRACT.md +77 -0
  49. honestreview-0.2.0/src/honestreview/doctrine/DATA_MUTATION_GATE.md +45 -0
  50. honestreview-0.2.0/src/honestreview/doctrine/DELIVERABLE_VERSIONING.md +64 -0
  51. honestreview-0.2.0/src/honestreview/doctrine/DERIVED_COPY_FRESHNESS.md +74 -0
  52. honestreview-0.2.0/src/honestreview/doctrine/DESIGN_BY_CONTRACT.md +44 -0
  53. honestreview-0.2.0/src/honestreview/doctrine/DURABILITY.md +107 -0
  54. honestreview-0.2.0/src/honestreview/doctrine/EGRESS_DEIDENTIFICATION.md +66 -0
  55. honestreview-0.2.0/src/honestreview/doctrine/ENTITY_RESOLUTION_AGENTIC.md +67 -0
  56. honestreview-0.2.0/src/honestreview/doctrine/EVIDENCE_TRUNCATION.md +68 -0
  57. honestreview-0.2.0/src/honestreview/doctrine/FAIL_DIRECTION_MATCHES_PURPOSE.md +40 -0
  58. honestreview-0.2.0/src/honestreview/doctrine/FAITHFUL_TESTS.md +84 -0
  59. honestreview-0.2.0/src/honestreview/doctrine/FRESHNESS_NOT_BLIND_TRUST.md +39 -0
  60. honestreview-0.2.0/src/honestreview/doctrine/FRESH_VERIFICATION.md +38 -0
  61. honestreview-0.2.0/src/honestreview/doctrine/GOVERNOR_NOT_GOVERNED.md +37 -0
  62. honestreview-0.2.0/src/honestreview/doctrine/GROUND_IDENTIFIERS.md +48 -0
  63. honestreview-0.2.0/src/honestreview/doctrine/HIERARCHY_DAG_HYGIENE.md +52 -0
  64. honestreview-0.2.0/src/honestreview/doctrine/INTEGRATION_COVERAGE.md +42 -0
  65. honestreview-0.2.0/src/honestreview/doctrine/INTENT_ALIGNMENT.md +42 -0
  66. honestreview-0.2.0/src/honestreview/doctrine/JOIN_KEY_INTEGRITY.md +68 -0
  67. honestreview-0.2.0/src/honestreview/doctrine/KEY_UNIQUENESS.md +59 -0
  68. honestreview-0.2.0/src/honestreview/doctrine/LAW_OF_DEMETER.md +39 -0
  69. honestreview-0.2.0/src/honestreview/doctrine/LINEAGE_TO_ORIGIN.md +57 -0
  70. honestreview-0.2.0/src/honestreview/doctrine/LITERAL_CONTRACT.md +60 -0
  71. honestreview-0.2.0/src/honestreview/doctrine/LOCATE_PARITY.md +45 -0
  72. honestreview-0.2.0/src/honestreview/doctrine/MEASUREMENT_NOT_INVENTION.md +36 -0
  73. honestreview-0.2.0/src/honestreview/doctrine/METRIC_MEASURES_CORPUS.md +38 -0
  74. honestreview-0.2.0/src/honestreview/doctrine/MODEL_PARSIMONY.md +105 -0
  75. honestreview-0.2.0/src/honestreview/doctrine/MODULE_DEPTH.md +40 -0
  76. honestreview-0.2.0/src/honestreview/doctrine/NAME_IS_NOT_MEANING.md +37 -0
  77. honestreview-0.2.0/src/honestreview/doctrine/NAMING.md +57 -0
  78. honestreview-0.2.0/src/honestreview/doctrine/NORMALIZE_AT_BOUNDARY.md +73 -0
  79. honestreview-0.2.0/src/honestreview/doctrine/ONE_EDGE_SCHEMA.md +39 -0
  80. honestreview-0.2.0/src/honestreview/doctrine/PIPELINE_ORDER.md +77 -0
  81. honestreview-0.2.0/src/honestreview/doctrine/PORTS_ADAPTERS.md +61 -0
  82. honestreview-0.2.0/src/honestreview/doctrine/PRESERVE_EXPENSIVE_OUTPUT.md +84 -0
  83. honestreview-0.2.0/src/honestreview/doctrine/PROVENANCE_ON_EVERY_FACT.md +37 -0
  84. honestreview-0.2.0/src/honestreview/doctrine/PROVEN_GATE.md +84 -0
  85. honestreview-0.2.0/src/honestreview/doctrine/RAW_PROVENANCE.md +59 -0
  86. honestreview-0.2.0/src/honestreview/doctrine/REFUSAL_CONTAINMENT.md +43 -0
  87. honestreview-0.2.0/src/honestreview/doctrine/REINVENTION.md +46 -0
  88. honestreview-0.2.0/src/honestreview/doctrine/RETRIEVAL_PROPOSES.md +37 -0
  89. honestreview-0.2.0/src/honestreview/doctrine/SCHEMA_EVOLUTION_COMPAT.md +89 -0
  90. honestreview-0.2.0/src/honestreview/doctrine/SCOPE_CONSERVATION.md +80 -0
  91. honestreview-0.2.0/src/honestreview/doctrine/SECRET_IN_SOURCE.md +40 -0
  92. honestreview-0.2.0/src/honestreview/doctrine/SECURITY_SMELLS.md +42 -0
  93. honestreview-0.2.0/src/honestreview/doctrine/SELF_DESCRIBING_SEAM.md +69 -0
  94. honestreview-0.2.0/src/honestreview/doctrine/SILENT_FAILURES.md +60 -0
  95. honestreview-0.2.0/src/honestreview/doctrine/SINGLE_GATE_SEAM.md +37 -0
  96. honestreview-0.2.0/src/honestreview/doctrine/SOFT_NOT_ARGMAX.md +47 -0
  97. honestreview-0.2.0/src/honestreview/doctrine/SOURCE_OF_TRUTH.md +56 -0
  98. honestreview-0.2.0/src/honestreview/doctrine/STATE_COLLAPSE.md +60 -0
  99. honestreview-0.2.0/src/honestreview/doctrine/TOTAL_FUNCTIONS.md +40 -0
  100. honestreview-0.2.0/src/honestreview/doctrine/TXN_PURITY.md +45 -0
  101. honestreview-0.2.0/src/honestreview/doctrine/UNBOUNDED_EXTERNAL_CALL.md +40 -0
  102. honestreview-0.2.0/src/honestreview/doctrine/UNEARNED_CONFIDENCE.md +62 -0
  103. honestreview-0.2.0/src/honestreview/doctrine/UNGOVERNED_LLM_FAN.md +74 -0
  104. honestreview-0.2.0/src/honestreview/doctrine/UNWIRED_CAPABILITIES.md +60 -0
  105. honestreview-0.2.0/src/honestreview/doctrine/VERIFIER_PARITY.md +40 -0
  106. honestreview-0.2.0/src/honestreview/doctrine/__init__.py +25 -0
  107. honestreview-0.2.0/src/honestreview/doctrine_catalog.py +174 -0
  108. honestreview-0.2.0/src/honestreview/durability.py +280 -0
  109. honestreview-0.2.0/src/honestreview/durability_action.py +139 -0
  110. honestreview-0.2.0/src/honestreview/durability_router.py +234 -0
  111. honestreview-0.2.0/src/honestreview/edit_scope.py +177 -0
  112. honestreview-0.2.0/src/honestreview/egress_deidentification.py +183 -0
  113. honestreview-0.2.0/src/honestreview/enforce.py +201 -0
  114. honestreview-0.2.0/src/honestreview/enforcer_arm.py +154 -0
  115. honestreview-0.2.0/src/honestreview/entity_resolution_agentic.py +190 -0
  116. honestreview-0.2.0/src/honestreview/evidence_truncation.py +216 -0
  117. honestreview-0.2.0/src/honestreview/faithful_tests.py +168 -0
  118. honestreview-0.2.0/src/honestreview/families/html.md +33 -0
  119. honestreview-0.2.0/src/honestreview/families/javascript.md +120 -0
  120. honestreview-0.2.0/src/honestreview/families/python.md +133 -0
  121. honestreview-0.2.0/src/honestreview/find_unwired_capabilities.py +180 -0
  122. honestreview-0.2.0/src/honestreview/finding_ledger.py +263 -0
  123. honestreview-0.2.0/src/honestreview/finding_provenance.py +35 -0
  124. honestreview-0.2.0/src/honestreview/ground_identifiers.py +186 -0
  125. honestreview-0.2.0/src/honestreview/hooks/__init__.py +319 -0
  126. honestreview-0.2.0/src/honestreview/hooks/agent_safety.json +10 -0
  127. honestreview-0.2.0/src/honestreview/hooks/agentic_decisions.json +10 -0
  128. honestreview-0.2.0/src/honestreview/hooks/agentic_decisions.md +50 -0
  129. honestreview-0.2.0/src/honestreview/hooks/bulk_staging.json +10 -0
  130. honestreview-0.2.0/src/honestreview/hooks/caller_branches.json +10 -0
  131. honestreview-0.2.0/src/honestreview/hooks/canonical_concerns.json +10 -0
  132. honestreview-0.2.0/src/honestreview/hooks/catalog_first.json +10 -0
  133. honestreview-0.2.0/src/honestreview/hooks/coding_guide.json +10 -0
  134. honestreview-0.2.0/src/honestreview/hooks/data_contract.json +10 -0
  135. honestreview-0.2.0/src/honestreview/hooks/deliverable_versioning.json +10 -0
  136. honestreview-0.2.0/src/honestreview/hooks/derived_artifact_integrity.json +10 -0
  137. honestreview-0.2.0/src/honestreview/hooks/dispatch.json +12 -0
  138. honestreview-0.2.0/src/honestreview/hooks/drafts/learn_observer.json +10 -0
  139. honestreview-0.2.0/src/honestreview/hooks/durability_action.json +10 -0
  140. honestreview-0.2.0/src/honestreview/hooks/durability_doctrine.json +10 -0
  141. honestreview-0.2.0/src/honestreview/hooks/egress_deidentification.json +10 -0
  142. honestreview-0.2.0/src/honestreview/hooks/entity_resolution_agentic.json +10 -0
  143. honestreview-0.2.0/src/honestreview/hooks/evidence_truncation.json +10 -0
  144. honestreview-0.2.0/src/honestreview/hooks/faithful_tests.json +10 -0
  145. honestreview-0.2.0/src/honestreview/hooks/ground_identifiers.json +10 -0
  146. honestreview-0.2.0/src/honestreview/hooks/index_freshness.json +11 -0
  147. honestreview-0.2.0/src/honestreview/hooks/join_key_integrity.json +10 -0
  148. honestreview-0.2.0/src/honestreview/hooks/key_uniqueness.json +10 -0
  149. honestreview-0.2.0/src/honestreview/hooks/model_parsimony.json +10 -0
  150. honestreview-0.2.0/src/honestreview/hooks/mutation_router.json +10 -0
  151. honestreview-0.2.0/src/honestreview/hooks/naming.json +10 -0
  152. honestreview-0.2.0/src/honestreview/hooks/raw_provenance.json +10 -0
  153. honestreview-0.2.0/src/honestreview/hooks/refusal_containment.json +10 -0
  154. honestreview-0.2.0/src/honestreview/hooks/reinvention.json +10 -0
  155. honestreview-0.2.0/src/honestreview/hooks/schema_evolution_compat.json +10 -0
  156. honestreview-0.2.0/src/honestreview/hooks/secret_in_source.json +10 -0
  157. honestreview-0.2.0/src/honestreview/hooks/self_describing_seam.json +10 -0
  158. honestreview-0.2.0/src/honestreview/hooks/session_scope_check.json +11 -0
  159. honestreview-0.2.0/src/honestreview/hooks/soft_not_argmax.json +10 -0
  160. honestreview-0.2.0/src/honestreview/hooks/source_effect_detect.json +11 -0
  161. honestreview-0.2.0/src/honestreview/hooks/source_effect_snapshot.json +11 -0
  162. honestreview-0.2.0/src/honestreview/hooks/source_transform_router.json +10 -0
  163. honestreview-0.2.0/src/honestreview/hooks/txn_purity.json +10 -0
  164. honestreview-0.2.0/src/honestreview/hooks/unbounded_external_call.json +10 -0
  165. honestreview-0.2.0/src/honestreview/hooks/ungoverned_llm_fan.json +10 -0
  166. honestreview-0.2.0/src/honestreview/index.py +1654 -0
  167. honestreview-0.2.0/src/honestreview/index_freshness.py +58 -0
  168. honestreview-0.2.0/src/honestreview/intent_alignment.py +264 -0
  169. honestreview-0.2.0/src/honestreview/join_key_integrity.py +210 -0
  170. honestreview-0.2.0/src/honestreview/jsonl_io.py +49 -0
  171. honestreview-0.2.0/src/honestreview/key_uniqueness.py +211 -0
  172. honestreview-0.2.0/src/honestreview/lane_route.py +34 -0
  173. honestreview-0.2.0/src/honestreview/learn/__init__.py +12 -0
  174. honestreview-0.2.0/src/honestreview/learn/cli.py +94 -0
  175. honestreview-0.2.0/src/honestreview/learn/conv_recall.py +22 -0
  176. honestreview-0.2.0/src/honestreview/learn/embed.py +54 -0
  177. honestreview-0.2.0/src/honestreview/learn/extract.py +166 -0
  178. honestreview-0.2.0/src/honestreview/learn/ingest.py +56 -0
  179. honestreview-0.2.0/src/honestreview/learn/measure.py +150 -0
  180. honestreview-0.2.0/src/honestreview/learn/observe.py +129 -0
  181. honestreview-0.2.0/src/honestreview/learn/promote.py +144 -0
  182. honestreview-0.2.0/src/honestreview/learn/recall.py +65 -0
  183. honestreview-0.2.0/src/honestreview/learn/store.py +122 -0
  184. honestreview-0.2.0/src/honestreview/literal_contract.py +254 -0
  185. honestreview-0.2.0/src/honestreview/mcp_client.py +166 -0
  186. honestreview-0.2.0/src/honestreview/mcp_server.py +162 -0
  187. honestreview-0.2.0/src/honestreview/model_parsimony.py +243 -0
  188. honestreview-0.2.0/src/honestreview/mutable_proxy.py +237 -0
  189. honestreview-0.2.0/src/honestreview/mutation_router.py +194 -0
  190. honestreview-0.2.0/src/honestreview/panel_integrity.py +83 -0
  191. honestreview-0.2.0/src/honestreview/parallel_judge.py +97 -0
  192. honestreview-0.2.0/src/honestreview/ports_adapters.py +296 -0
  193. honestreview-0.2.0/src/honestreview/precommit.py +241 -0
  194. honestreview-0.2.0/src/honestreview/raw_manifest.py +207 -0
  195. honestreview-0.2.0/src/honestreview/raw_provenance.py +261 -0
  196. honestreview-0.2.0/src/honestreview/raw_provenance_router.py +143 -0
  197. honestreview-0.2.0/src/honestreview/refusal_containment.py +266 -0
  198. honestreview-0.2.0/src/honestreview/refute.py +565 -0
  199. honestreview-0.2.0/src/honestreview/reinvention_check.py +271 -0
  200. honestreview-0.2.0/src/honestreview/rename_apply.py +172 -0
  201. honestreview-0.2.0/src/honestreview/reply_json.py +25 -0
  202. honestreview-0.2.0/src/honestreview/repo_review_panel.py +722 -0
  203. honestreview-0.2.0/src/honestreview/resolve_wave_findings.py +307 -0
  204. honestreview-0.2.0/src/honestreview/review_axes.py +900 -0
  205. honestreview-0.2.0/src/honestreview/review_capability_slice.py +120 -0
  206. honestreview-0.2.0/src/honestreview/review_deadline.py +23 -0
  207. honestreview-0.2.0/src/honestreview/schema_evolution_compat.py +328 -0
  208. honestreview-0.2.0/src/honestreview/secret_in_source.py +208 -0
  209. honestreview-0.2.0/src/honestreview/self_describing_seam.py +199 -0
  210. honestreview-0.2.0/src/honestreview/session_scope_check.py +54 -0
  211. honestreview-0.2.0/src/honestreview/soft_not_argmax.py +211 -0
  212. honestreview-0.2.0/src/honestreview/source_discovery.py +169 -0
  213. honestreview-0.2.0/src/honestreview/source_effect.py +237 -0
  214. honestreview-0.2.0/src/honestreview/source_of_truth.py +230 -0
  215. honestreview-0.2.0/src/honestreview/source_text.py +19 -0
  216. honestreview-0.2.0/src/honestreview/source_transform_router.py +50 -0
  217. honestreview-0.2.0/src/honestreview/state_collapse.py +252 -0
  218. honestreview-0.2.0/src/honestreview/triage_silent_failures.py +302 -0
  219. honestreview-0.2.0/src/honestreview/txn_purity.py +174 -0
  220. honestreview-0.2.0/src/honestreview/unbounded_external_call.py +208 -0
  221. honestreview-0.2.0/src/honestreview/unearned_confidence.py +493 -0
  222. honestreview-0.2.0/src/honestreview/ungoverned_llm_fan.py +228 -0
  223. honestreview-0.2.0/src/honestreview/validate_findings.py +691 -0
  224. honestreview-0.2.0/src/honestreview/value_ledger.py +688 -0
  225. honestreview-0.2.0/src/honestreview/verdict_cache.py +147 -0
  226. honestreview-0.2.0/src/honestreview/verdict_corpus.py +204 -0
  227. honestreview-0.2.0/src/honestreview/virtue_scorecard.py +305 -0
  228. honestreview-0.2.0/src/honestreview/wave_review.py +271 -0
  229. honestreview-0.2.0/src/honestreview.egg-info/PKG-INFO +170 -0
  230. honestreview-0.2.0/src/honestreview.egg-info/SOURCES.txt +302 -0
  231. honestreview-0.2.0/src/honestreview.egg-info/dependency_links.txt +1 -0
  232. honestreview-0.2.0/src/honestreview.egg-info/entry_points.txt +3 -0
  233. honestreview-0.2.0/src/honestreview.egg-info/requires.txt +10 -0
  234. honestreview-0.2.0/src/honestreview.egg-info/top_level.txt +1 -0
  235. honestreview-0.2.0/tests/test_ast_scope.py +60 -0
  236. honestreview-0.2.0/tests/test_atomic_io.py +63 -0
  237. honestreview-0.2.0/tests/test_blocking_routers_expose_a_bypass.py +165 -0
  238. honestreview-0.2.0/tests/test_call_intent.py +99 -0
  239. honestreview-0.2.0/tests/test_canonical_concerns.py +182 -0
  240. honestreview-0.2.0/tests/test_catalog_conformance_rejects_unknown.py +77 -0
  241. honestreview-0.2.0/tests/test_chunking.py +110 -0
  242. honestreview-0.2.0/tests/test_coding_router_scope.py +39 -0
  243. honestreview-0.2.0/tests/test_contract_crosswalk.py +78 -0
  244. honestreview-0.2.0/tests/test_data_contract.py +152 -0
  245. honestreview-0.2.0/tests/test_data_review.py +132 -0
  246. honestreview-0.2.0/tests/test_derived_artifact_integrity.py +134 -0
  247. honestreview-0.2.0/tests/test_dict_contracts.py +57 -0
  248. honestreview-0.2.0/tests/test_dispatch_scoped_e2e.py +78 -0
  249. honestreview-0.2.0/tests/test_durability_router_scope.py +60 -0
  250. honestreview-0.2.0/tests/test_edit_scope.py +97 -0
  251. honestreview-0.2.0/tests/test_egress_deidentification.py +134 -0
  252. honestreview-0.2.0/tests/test_enforce.py +77 -0
  253. honestreview-0.2.0/tests/test_enforcer_arm.py +75 -0
  254. honestreview-0.2.0/tests/test_entity_resolution_agentic.py +136 -0
  255. honestreview-0.2.0/tests/test_evidence_truncation.py +76 -0
  256. honestreview-0.2.0/tests/test_faithful_tests.py +118 -0
  257. honestreview-0.2.0/tests/test_grammar_unavailable_reports_once.py +98 -0
  258. honestreview-0.2.0/tests/test_ground_identifiers_scope.py +93 -0
  259. honestreview-0.2.0/tests/test_heredoc_authored_source_is_judged.py +64 -0
  260. honestreview-0.2.0/tests/test_index.py +171 -0
  261. honestreview-0.2.0/tests/test_index_callcontract.py +70 -0
  262. honestreview-0.2.0/tests/test_index_coverage.py +84 -0
  263. honestreview-0.2.0/tests/test_index_cycles.py +66 -0
  264. honestreview-0.2.0/tests/test_index_deadcode.py +80 -0
  265. honestreview-0.2.0/tests/test_index_dupes.py +72 -0
  266. honestreview-0.2.0/tests/test_index_embed.py +96 -0
  267. honestreview-0.2.0/tests/test_index_freshness.py +94 -0
  268. honestreview-0.2.0/tests/test_index_neardup.py +59 -0
  269. honestreview-0.2.0/tests/test_index_writers.py +76 -0
  270. honestreview-0.2.0/tests/test_install_prunes_unstamped_duplicates.py +95 -0
  271. honestreview-0.2.0/tests/test_intent_alignment.py +84 -0
  272. honestreview-0.2.0/tests/test_invariant_claims_bite.py +69 -0
  273. honestreview-0.2.0/tests/test_join_key_integrity.py +139 -0
  274. honestreview-0.2.0/tests/test_key_uniqueness.py +145 -0
  275. honestreview-0.2.0/tests/test_model_parsimony.py +161 -0
  276. honestreview-0.2.0/tests/test_multilang_review.py +96 -0
  277. honestreview-0.2.0/tests/test_panel_integrity_rejects_collapse.py +78 -0
  278. honestreview-0.2.0/tests/test_parallel_judge.py +115 -0
  279. honestreview-0.2.0/tests/test_refusal_raise_name.py +35 -0
  280. honestreview-0.2.0/tests/test_refute_aggregation.py +100 -0
  281. honestreview-0.2.0/tests/test_refute_parallel_fan.py +131 -0
  282. honestreview-0.2.0/tests/test_rel_under_path_safety.py +82 -0
  283. honestreview-0.2.0/tests/test_resolve_wave_findings.py +66 -0
  284. honestreview-0.2.0/tests/test_review_panel_matrix_fan.py +197 -0
  285. honestreview-0.2.0/tests/test_review_scope_repo_bound.py +114 -0
  286. honestreview-0.2.0/tests/test_schema_evolution_compat.py +191 -0
  287. honestreview-0.2.0/tests/test_scope_no_regression.py +120 -0
  288. honestreview-0.2.0/tests/test_scope_to_repo_preserves_corrupt.py +49 -0
  289. honestreview-0.2.0/tests/test_self_describing_seam.py +157 -0
  290. honestreview-0.2.0/tests/test_soft_not_argmax.py +83 -0
  291. honestreview-0.2.0/tests/test_source_discovery_and_qual_uniqueness.py +132 -0
  292. honestreview-0.2.0/tests/test_source_effect.py +131 -0
  293. honestreview-0.2.0/tests/test_source_text.py +46 -0
  294. honestreview-0.2.0/tests/test_source_transform_guard.py +97 -0
  295. honestreview-0.2.0/tests/test_toolkit_holds_itself_to_it.py +309 -0
  296. honestreview-0.2.0/tests/test_ungoverned_llm_fan.py +160 -0
  297. honestreview-0.2.0/tests/test_validate_findings_durability.py +181 -0
  298. honestreview-0.2.0/tests/test_validate_findings_matrix_fan.py +235 -0
  299. honestreview-0.2.0/tests/test_value_ledger.py +196 -0
  300. honestreview-0.2.0/tests/test_value_ledger_tally_idempotent.py +64 -0
  301. honestreview-0.2.0/tests/test_verdict_cache_contract.py +49 -0
  302. honestreview-0.2.0/tests/test_wave_panel_preserves_every_wave.py +73 -0
  303. honestreview-0.2.0/tests/test_write_time_scope_rollout.py +172 -0
  304. honestreview-0.2.0/tests/test_written_py_full_file.py +55 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ash Damle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,170 @@
1
+ Metadata-Version: 2.4
2
+ Name: honestreview
3
+ Version: 0.2.0
4
+ Summary: Review a repo at the granularity its defects actually live at — and never overstate what you checked
5
+ Author: Ash Damle
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ashdamle/honestreview
8
+ Project-URL: Repository, https://github.com/ashdamle/honestreview
9
+ Project-URL: Issues, https://github.com/ashdamle/honestreview/issues
10
+ Keywords: code-review,static-analysis,llm,doctrine,pre-commit,hooks
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Software Development :: Quality Assurance
18
+ Classifier: Topic :: Software Development :: Testing
19
+ Requires-Python: >=3.11
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: symgrep-codesearch<1,>=0.6
23
+ Requires-Dist: llm-spendguard[anthropic,openai]<1,>=0.11
24
+ Requires-Dist: fastmcp<5,>=2
25
+ Requires-Dist: numpy<3,>=1.24
26
+ Provides-Extra: learn
27
+ Requires-Dist: sentence-transformers<7,>=3; extra == "learn"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7; extra == "dev"
30
+ Dynamic: license-file
31
+
32
+ # honestreview
33
+
34
+ Review a repo at the granularity its defects actually live at — and never overstate what you checked.
35
+
36
+ ## Why
37
+
38
+ A review can only find defects that **fit inside the unit it looks at**.
39
+
40
+ Measured on one codebase: three waves of four-vendor per-file review, ~500 findings, and it missed 13
41
+ functions copy-pasted between two files, four writers of one settings file (three destructive — one of them
42
+ later destroyed the file), and a producer/consumer pair reading and writing different tables.
43
+
44
+ None of that was carelessness. The reviewer was shown **one file at a time**, so a two-file defect was never
45
+ in the room, and no amount of care recovers evidence that is not in the context window. When something is
46
+ missed, the first question is *"was it even in the room?"* — not *"why wasn't it noticed?"*
47
+
48
+ So "I reviewed the repo" means nothing without the axis:
49
+
50
+ | axis | unit in context | finds | blind to |
51
+ |---|---|---|---|
52
+ | **file** | one file | swallowed exception, wrong branch, unguarded index | anything whose other half is elsewhere |
53
+ | **concept** | every implementation of one job, in full | DRIFT — copies that now disagree, one of them wrong | a concept correctly duplicated |
54
+ | **seam** | every writer + reader of one resource | CONTRACT GAPS — each side correct, the gap wrong | anything that is nowhere |
55
+ | **invariant** | the whole repo vs one claim it makes | **ABSENCE** — a discipline present in NO file | nothing structural |
56
+ | **name** | all definitions sharing a bare name | COLLISION / DUPLICATION / PROTOCOL | — |
57
+
58
+ **`invariant` is skipped most and matters most: it is the only axis that can find something MISSING.**
59
+ *"There is no backup before any mutation in this repo"* is true, catastrophic, and appears in zero files.
60
+
61
+ Plus two that cut across all of them: **`silent`** (swallowed failures) and **`unwired`** (capabilities built
62
+ and never connected — worse than a bug, because the code *looks* protected).
63
+
64
+ ## A finding is not a finding until something tried to kill it
65
+
66
+ Raw multi-vendor review over-calls badly. Measured: **60 "dangerous" silent failures became 26** once
67
+ independent refuters were told to knock each one down and default to refuted when unsure — and **2** after a
68
+ truncation bug in the refuter itself was fixed.
69
+
70
+ Three states, kept separate:
71
+
72
+ - **SURVIVED** — attempts to refute it failed. A finding.
73
+ - **REFUTED** — the claim did not hold. Correctly closed.
74
+ - **UNVERIFIED** — the check did not complete. **Neither of the other two.** Collapsing it is how
75
+ *"2 survived, 7 unverified"* got reported as *"9 survived"*.
76
+
77
+ ## Use
78
+
79
+ ```bash
80
+ pip install honestreview # pulls symgrep-codesearch + llm-spendguard + fastmcp from PyPI
81
+ pip install "honestreview[learn]" # + the local sentence-transformers embedder (optional; pulls torch)
82
+
83
+ # honestreview runs UNDER the spendguard gate, so no axis can ever spend ungated. Arm it once:
84
+ spendguard install-hook --venv <your-venv> # then `spendguard doctor` must print: ENFORCING HERE: YES
85
+
86
+ honestreview all <root> # every axis, cheapest-first — ESTIMATE ONLY
87
+ honestreview all <root> --run # actually review
88
+ honestreview invariant <root> --run # the axis that finds what is missing
89
+ honestreview ledger # every pass, every verdict, what is still open
90
+ ```
91
+
92
+ Search-by-meaning (the `concept`/`seam` retrieval) runs in symgrep's own process over MCP/HTTP, so honestreview
93
+ needs neither an embedding model nor `veccore`/`fastembed` in its own environment — point it at a running
94
+ `symgrep-mcp` (or set `$SYMGREP_MCP_URL`). The `[learn]` extra is only for the optional local doctrine-learning
95
+ embedder.
96
+
97
+ **Nothing is spent without `--run`.** Every axis prints a cost and a count first. That is not politeness: a
98
+ review that surprises someone with a bill gets run once and then avoided, and a review nobody runs finds
99
+ nothing.
100
+
101
+ ### As an MCP tool
102
+
103
+ ```bash
104
+ claude mcp add honestreview -- /path/to/venv/bin/honestreview-mcp
105
+ ```
106
+
107
+ This matters more than the CLI. A toolkit you have to remember is used when it *occurs* to someone, and what
108
+ occurs to someone under focus is what they always do — which is how the per-file panel got run three times
109
+ while the cross-file axes, where every missed defect actually was, were never reached.
110
+
111
+ ### As a hook
112
+
113
+ ```bash
114
+ honestreview install-hook # backs up settings.json first, atomically
115
+ ```
116
+
117
+ Ships a family of PreToolUse hooks — authorship hooks that read source at the moment it is written (led by the
118
+ agentic-decision hook, which blocks a mechanical proxy standing in for a judgement) and behavioral hooks that
119
+ judge a Bash action at the moment it runs. **A code hook's matcher includes `Bash` on purpose** — a
120
+ `Write|Edit`-only hook is blind to heredoc-written source, which is how most agent-authored files are created. Measured: a rule against
121
+ regex-decisions sat in three CLAUDE.md files and was violated repeatedly, because every offending file was
122
+ written through a heredoc. Widening the matcher fixed in one edit what instruction had not fixed in fifty.
123
+
124
+ See `src/honestreview/hooks/agentic_decisions.md` for what it catches, the rule that fixed its false positives,
125
+ and its two known over-fire shapes.
126
+
127
+ ### As doctrine
128
+
129
+ ```bash
130
+ honestreview doctrine >> CLAUDE.md # the method, without the tooling
131
+ ```
132
+
133
+ ## What it refuses to do
134
+
135
+ - **Call a pattern's silence a clean bill.** Every report states what it CHECKED and what it did NOT, with a
136
+ denominator. A fixed list of literal spellings reporting "no wrong price found" is a certificate issued by
137
+ a check that never asked the question.
138
+ - **Resolve a judgement with a cutoff.** A confidence grade, a cosine score and a vote tally are magnitudes
139
+ a model produced; the cutoff would be ours. Splits go to an adjudicator that reads the code. Unanimity is
140
+ not a threshold — it is the absence of disagreement.
141
+ - **Decide meaning with a regex.** Regex parses known shapes. It never classifies.
142
+
143
+ ## Depends on
144
+
145
+ - **[symgrep-codesearch]** (imported as `symgrep`) — symbol extraction and search-by-meaning. Deliberately not
146
+ vendored: a second AST layer here would be the exact defect this toolkit detects. Pulls `veccore` transitively.
147
+ - **[llm-spendguard]** (imported as `spendguard`) — the gate. Every call is estimated first, caged, recorded and
148
+ attributable. The distribution is `llm-spendguard`; the unrelated `spendguard` on PyPI is a different project.
149
+
150
+ ## Tests
151
+
152
+ ```bash
153
+ python tests/test_toolkit_holds_itself_to_it.py
154
+ ```
155
+
156
+ A review toolkit that violates its own doctrine is worse than none — it certifies the defect it contains.
157
+ Every assertion in that file is a rule this package states publicly.
158
+
159
+ ## Docs
160
+
161
+ - **`INTENT.md`** — the North Star: what the toolkit is *for* and the invariants it commits to (the
162
+ `intent-alignment` axis reads it to judge the repo against its own purpose).
163
+ - **`docs/ARCHITECTURE.md`** — the HOW: the LOCATE→JUDGE→REFUTE→ACCOUNT pipeline, the two delivery surfaces, and
164
+ the concurrency architecture (`parallel_judge` + the pinned-vendor matrix fans; spendguard owns concurrency).
165
+ - **`docs/SPENDGUARD_INTEGRATION.md`** — the gate contract: matrix fans, `metered_only`, attribution, and how to
166
+ run a deep wave review.
167
+ - **`docs/EFFICIENCY.md`** — the measured cost/latency levers (one retired because measurement falsified it).
168
+ - **`DOCTRINE_CATALOG.md`** — every doctrine, by domain (regenerate with `honestreview doctrines --out
169
+ DOCTRINE_CATALOG.md`); **`docs/DOCTRINE_ROADMAP.md`** — the append-only design log; **`docs/VOCABULARY.md`** —
170
+ what "square" and "cubed" mean.
@@ -0,0 +1,139 @@
1
+ # honestreview
2
+
3
+ Review a repo at the granularity its defects actually live at — and never overstate what you checked.
4
+
5
+ ## Why
6
+
7
+ A review can only find defects that **fit inside the unit it looks at**.
8
+
9
+ Measured on one codebase: three waves of four-vendor per-file review, ~500 findings, and it missed 13
10
+ functions copy-pasted between two files, four writers of one settings file (three destructive — one of them
11
+ later destroyed the file), and a producer/consumer pair reading and writing different tables.
12
+
13
+ None of that was carelessness. The reviewer was shown **one file at a time**, so a two-file defect was never
14
+ in the room, and no amount of care recovers evidence that is not in the context window. When something is
15
+ missed, the first question is *"was it even in the room?"* — not *"why wasn't it noticed?"*
16
+
17
+ So "I reviewed the repo" means nothing without the axis:
18
+
19
+ | axis | unit in context | finds | blind to |
20
+ |---|---|---|---|
21
+ | **file** | one file | swallowed exception, wrong branch, unguarded index | anything whose other half is elsewhere |
22
+ | **concept** | every implementation of one job, in full | DRIFT — copies that now disagree, one of them wrong | a concept correctly duplicated |
23
+ | **seam** | every writer + reader of one resource | CONTRACT GAPS — each side correct, the gap wrong | anything that is nowhere |
24
+ | **invariant** | the whole repo vs one claim it makes | **ABSENCE** — a discipline present in NO file | nothing structural |
25
+ | **name** | all definitions sharing a bare name | COLLISION / DUPLICATION / PROTOCOL | — |
26
+
27
+ **`invariant` is skipped most and matters most: it is the only axis that can find something MISSING.**
28
+ *"There is no backup before any mutation in this repo"* is true, catastrophic, and appears in zero files.
29
+
30
+ Plus two that cut across all of them: **`silent`** (swallowed failures) and **`unwired`** (capabilities built
31
+ and never connected — worse than a bug, because the code *looks* protected).
32
+
33
+ ## A finding is not a finding until something tried to kill it
34
+
35
+ Raw multi-vendor review over-calls badly. Measured: **60 "dangerous" silent failures became 26** once
36
+ independent refuters were told to knock each one down and default to refuted when unsure — and **2** after a
37
+ truncation bug in the refuter itself was fixed.
38
+
39
+ Three states, kept separate:
40
+
41
+ - **SURVIVED** — attempts to refute it failed. A finding.
42
+ - **REFUTED** — the claim did not hold. Correctly closed.
43
+ - **UNVERIFIED** — the check did not complete. **Neither of the other two.** Collapsing it is how
44
+ *"2 survived, 7 unverified"* got reported as *"9 survived"*.
45
+
46
+ ## Use
47
+
48
+ ```bash
49
+ pip install honestreview # pulls symgrep-codesearch + llm-spendguard + fastmcp from PyPI
50
+ pip install "honestreview[learn]" # + the local sentence-transformers embedder (optional; pulls torch)
51
+
52
+ # honestreview runs UNDER the spendguard gate, so no axis can ever spend ungated. Arm it once:
53
+ spendguard install-hook --venv <your-venv> # then `spendguard doctor` must print: ENFORCING HERE: YES
54
+
55
+ honestreview all <root> # every axis, cheapest-first — ESTIMATE ONLY
56
+ honestreview all <root> --run # actually review
57
+ honestreview invariant <root> --run # the axis that finds what is missing
58
+ honestreview ledger # every pass, every verdict, what is still open
59
+ ```
60
+
61
+ Search-by-meaning (the `concept`/`seam` retrieval) runs in symgrep's own process over MCP/HTTP, so honestreview
62
+ needs neither an embedding model nor `veccore`/`fastembed` in its own environment — point it at a running
63
+ `symgrep-mcp` (or set `$SYMGREP_MCP_URL`). The `[learn]` extra is only for the optional local doctrine-learning
64
+ embedder.
65
+
66
+ **Nothing is spent without `--run`.** Every axis prints a cost and a count first. That is not politeness: a
67
+ review that surprises someone with a bill gets run once and then avoided, and a review nobody runs finds
68
+ nothing.
69
+
70
+ ### As an MCP tool
71
+
72
+ ```bash
73
+ claude mcp add honestreview -- /path/to/venv/bin/honestreview-mcp
74
+ ```
75
+
76
+ This matters more than the CLI. A toolkit you have to remember is used when it *occurs* to someone, and what
77
+ occurs to someone under focus is what they always do — which is how the per-file panel got run three times
78
+ while the cross-file axes, where every missed defect actually was, were never reached.
79
+
80
+ ### As a hook
81
+
82
+ ```bash
83
+ honestreview install-hook # backs up settings.json first, atomically
84
+ ```
85
+
86
+ Ships a family of PreToolUse hooks — authorship hooks that read source at the moment it is written (led by the
87
+ agentic-decision hook, which blocks a mechanical proxy standing in for a judgement) and behavioral hooks that
88
+ judge a Bash action at the moment it runs. **A code hook's matcher includes `Bash` on purpose** — a
89
+ `Write|Edit`-only hook is blind to heredoc-written source, which is how most agent-authored files are created. Measured: a rule against
90
+ regex-decisions sat in three CLAUDE.md files and was violated repeatedly, because every offending file was
91
+ written through a heredoc. Widening the matcher fixed in one edit what instruction had not fixed in fifty.
92
+
93
+ See `src/honestreview/hooks/agentic_decisions.md` for what it catches, the rule that fixed its false positives,
94
+ and its two known over-fire shapes.
95
+
96
+ ### As doctrine
97
+
98
+ ```bash
99
+ honestreview doctrine >> CLAUDE.md # the method, without the tooling
100
+ ```
101
+
102
+ ## What it refuses to do
103
+
104
+ - **Call a pattern's silence a clean bill.** Every report states what it CHECKED and what it did NOT, with a
105
+ denominator. A fixed list of literal spellings reporting "no wrong price found" is a certificate issued by
106
+ a check that never asked the question.
107
+ - **Resolve a judgement with a cutoff.** A confidence grade, a cosine score and a vote tally are magnitudes
108
+ a model produced; the cutoff would be ours. Splits go to an adjudicator that reads the code. Unanimity is
109
+ not a threshold — it is the absence of disagreement.
110
+ - **Decide meaning with a regex.** Regex parses known shapes. It never classifies.
111
+
112
+ ## Depends on
113
+
114
+ - **[symgrep-codesearch]** (imported as `symgrep`) — symbol extraction and search-by-meaning. Deliberately not
115
+ vendored: a second AST layer here would be the exact defect this toolkit detects. Pulls `veccore` transitively.
116
+ - **[llm-spendguard]** (imported as `spendguard`) — the gate. Every call is estimated first, caged, recorded and
117
+ attributable. The distribution is `llm-spendguard`; the unrelated `spendguard` on PyPI is a different project.
118
+
119
+ ## Tests
120
+
121
+ ```bash
122
+ python tests/test_toolkit_holds_itself_to_it.py
123
+ ```
124
+
125
+ A review toolkit that violates its own doctrine is worse than none — it certifies the defect it contains.
126
+ Every assertion in that file is a rule this package states publicly.
127
+
128
+ ## Docs
129
+
130
+ - **`INTENT.md`** — the North Star: what the toolkit is *for* and the invariants it commits to (the
131
+ `intent-alignment` axis reads it to judge the repo against its own purpose).
132
+ - **`docs/ARCHITECTURE.md`** — the HOW: the LOCATE→JUDGE→REFUTE→ACCOUNT pipeline, the two delivery surfaces, and
133
+ the concurrency architecture (`parallel_judge` + the pinned-vendor matrix fans; spendguard owns concurrency).
134
+ - **`docs/SPENDGUARD_INTEGRATION.md`** — the gate contract: matrix fans, `metered_only`, attribution, and how to
135
+ run a deep wave review.
136
+ - **`docs/EFFICIENCY.md`** — the measured cost/latency levers (one retired because measurement falsified it).
137
+ - **`DOCTRINE_CATALOG.md`** — every doctrine, by domain (regenerate with `honestreview doctrines --out
138
+ DOCTRINE_CATALOG.md`); **`docs/DOCTRINE_ROADMAP.md`** — the append-only design log; **`docs/VOCABULARY.md`** —
139
+ what "square" and "cubed" mean.
@@ -0,0 +1,72 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"] # >=77: PEP 639 SPDX license expression + license-files
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "honestreview"
7
+ dynamic = ["version"] # SOURCE OF TRUTH: honestreview.__version__ (never a second copy here)
8
+ description = "Review a repo at the granularity its defects actually live at — and never overstate what you checked"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11" # symgrep-codesearch (a hard dep) requires >=3.11; Python 3.9/3.10 EOL-track
11
+ license = "MIT" # PEP 639 SPDX expression (no trove License:: classifier alongside it)
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Ash Damle" }]
14
+ keywords = ["code-review", "static-analysis", "llm", "doctrine", "pre-commit", "hooks"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Topic :: Software Development :: Quality Assurance",
23
+ "Topic :: Software Development :: Testing",
24
+ ]
25
+
26
+ # HARD DEPENDENCIES — none vendored.
27
+ # symgrep-codesearch — symbol extraction and search (import name `symgrep`). A second AST layer here would be the
28
+ # exact defect this toolkit detects; it pulls veccore transitively (do NOT declare veccore).
29
+ # llm-spendguard — the spend gate (import name `spendguard`). Every axis calls models; going through the gate
30
+ # means estimate-first, caged, recorded, attributable. Declared WITH the [openai,anthropic]
31
+ # extras on purpose: the gate enforces by PATCHING a provider SDK, and axis modules call
32
+ # spendguard.require() at IMPORT (fail-closed — it raises if no SDK is patched), so at least one
33
+ # SDK must be present at RUNTIME, not just in dev; the panel also makes metered calls to both
34
+ # vendors. Bare `llm-spendguard` pulls no SDK (its deps are empty), which would raise at import.
35
+ # NOTE: the distribution is `llm-spendguard`, NOT the unrelated `spendguard` PyPI package.
36
+ # fastmcp — the MCP server surface (honestreview-mcp). A stdlib JSON-RPC fallback exists, but fastmcp is
37
+ # the supported path, so it is a hard dep.
38
+ # numpy — vector math for the semantic index (concept/near-dup axes).
39
+ dependencies = [
40
+ "symgrep-codesearch>=0.6,<1",
41
+ "llm-spendguard[openai,anthropic]>=0.11,<1",
42
+ "fastmcp>=2,<5",
43
+ "numpy>=1.24,<3",
44
+ ]
45
+
46
+ [project.optional-dependencies]
47
+ # learn: the LOCAL sentence-transformers embedder (learn/embed.py). Opt-in because it pulls torch (~2 GB); the
48
+ # primary semantic path is symgrep-over-MCP + gated API embeddings, which need neither torch nor this extra.
49
+ learn = ["sentence-transformers>=3,<7"]
50
+ # dev/test: the RUNTIME deps already pull the provider SDKs (llm-spendguard[openai,anthropic]) that the armed gate
51
+ # patches and that the axis modules' import-time spendguard.require() needs — so dev only adds the test runner.
52
+ dev = ["pytest>=7"]
53
+
54
+ [project.urls]
55
+ Homepage = "https://github.com/ashdamle/honestreview"
56
+ Repository = "https://github.com/ashdamle/honestreview"
57
+ Issues = "https://github.com/ashdamle/honestreview/issues"
58
+
59
+ [project.scripts]
60
+ honestreview = "honestreview.cli:main"
61
+ honestreview-mcp = "honestreview.mcp_server:main"
62
+
63
+ [tool.setuptools.dynamic]
64
+ version = { attr = "honestreview.__version__" }
65
+
66
+ [tool.setuptools.packages.find]
67
+ where = ["src"]
68
+
69
+ [tool.setuptools.package-data]
70
+ # Runtime data files read from the installed package (never .py): the doctrine texts, the coding-family rule files
71
+ # (coding_router reads families/<family>.md), and the shipped hook definitions (dispatch globs hooks/*.json).
72
+ honestreview = ["doctrine/*.md", "families/*.md", "hooks/*.json", "hooks/*.md", "hooks/drafts/*.json"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,85 @@
1
+ """honestreview — review a repo at the granularity its defects actually live at, and never overstate what
2
+ you checked.
3
+
4
+ THE TWO IDEAS, both learned by getting them wrong.
5
+
6
+ 1. THE UNIT OF REVIEW MUST MATCH THE UNIT OF THE DEFECT.
7
+ Three waves of a four-vendor review over one codebase produced ~500 findings and missed 13 functions
8
+ copy-pasted between two files, four writers of the same settings file (three of them destructive), and a
9
+ producer/consumer pair writing and reading different tables. Not carelessness — the reviewer was shown
10
+ ONE FILE at a time, so a two-file defect was never in the room. No amount of care recovers evidence that
11
+ is not in the context window. Change the unit instead:
12
+
13
+ FILE one file local defects: a swallowed exception, a wrong branch
14
+ CONCEPT every implementation of one job DRIFT — copies that disagree, one of them now wrong
15
+ SEAM every writer + reader of one CONTRACT GAPS — each side correct, the gap wrong
16
+ resource
17
+ INVARIANT the repo vs one claim it makes ABSENCE — a discipline present in NO file
18
+ NAME all definitions sharing a name COLLISION vs DUPLICATION vs PROTOCOL
19
+
20
+ INVARIANT is the one that gets skipped and matters most: it is the only axis that can find something
21
+ MISSING. "There is no backup before any mutation in this repo" is true, catastrophic, and appears in
22
+ zero files, so the other axes can look forever and never see it.
23
+
24
+ 2. A FINDING IS NOT A FINDING UNTIL SOMETHING TRIED TO KILL IT.
25
+ Raw multi-vendor review over-calls badly — measured: 60 "dangerous" silent failures became 26 after
26
+ independent refuters were told to knock each one down, and 2 after the truncation bug in the refuter was
27
+ fixed. So every axis feeds validation, and the states stay separate: SURVIVED, REFUTED, and UNVERIFIED,
28
+ where UNVERIFIED means the check did not complete and is neither of the other two. Collapsing it is how
29
+ "2 survived, 7 unverified" got reported as "9 survived".
30
+
31
+ WHAT THIS REFUSES TO DO
32
+ · call a mechanical pattern's silence a clean bill — every report states what it checked and what it
33
+ did not, with a denominator
34
+ · resolve a judgement with a hand-picked cutoff — a confidence grade, a cosine score, a vote tally are
35
+ all magnitudes a model produced; the CUTOFF would be ours, and that is the bound this rule exists to
36
+ stop. Splits go to an adjudicator that reads the code.
37
+ · decide meaning with a regex. Regex parses known shapes; it never classifies.
38
+
39
+ Depends on symgrep for symbol extraction (deliberately not vendored — a second AST layer is the exact
40
+ defect this toolkit detects) and on llm-spendguard for the gate, so every call is estimated first, caged,
41
+ and recorded.
42
+ """
43
+
44
+ __version__ = "0.2.0"
45
+
46
+ AXES = ("file", "concept", "seam", "invariant", "name",
47
+ # DURABILITY cluster (doctrine/DURABILITY.md): make loss loud — nothing irreplaceable (progress, data,
48
+ # a finding) may vanish without a warning, a count, a backup, and a named gap.
49
+ "chunking", "durability", "mutable-proxy",
50
+ # RAW PROVENANCE (doctrine/RAW_PROVENANCE.md): raw source is backed up to a durable store ON ARRIVAL,
51
+ # with a manifest, before any extraction or teardown — never raw-only on ephemeral disk.
52
+ "raw-provenance",
53
+ # DECOUPLING cluster: a cross-boundary contract must have a single named home. literal-contract finds
54
+ # the WRITE-side inline literal that lets producer and consumer drift silently (complements seam).
55
+ "literal-contract",
56
+ # SOURCE-OF-TRUTH: one fact has one writer. source-of-truth finds a field assigned by 2+ functions —
57
+ # competing writers that can silently disagree (the upstream cause of a value no reader can trust).
58
+ "source-of-truth",
59
+ # PORTS-ADAPTERS: the domain depends on ports, not concrete infra. ports-adapters finds domain logic
60
+ # that imports an ORM/HTTP-client/driver/SDK directly. Repo-agnostic (import-based, not path-based).
61
+ "ports-adapters",
62
+ # INTERFACE INFORMATIVENESS / No-silent-failure: state-collapse finds a function returning the same
63
+ # falsy sentinel from an error path AND a non-error path, so a caller cannot tell error from absence.
64
+ "state-collapse",
65
+ # CALIBRATION-GATE (doctrine/CALIBRATION_GATE.md): a raw model score (cosine/logit/posterior) consumed
66
+ # AS a probability — softmax(sim) read as P, a marginalization weighted by an un-calibrated score —
67
+ # with no fitted temperature/Platt/isotonic and no reported ECE. Soft evidence needs calibrated weights.
68
+ "calibration-gate",
69
+ # INTENT-ALIGNMENT (doctrine/INTENT_ALIGNMENT.md): the META axis — derive THIS repo's own invariants from
70
+ # its intent docs (README/ARCHITECTURE/DOCTRINE/CLAUDE.md) and judge the repo against them. Enforces the
71
+ # repo's stated purpose, not just generic taste. On-demand; two agentic stages (extract, judge).
72
+ "intent-alignment",
73
+ # DATA-REVIEW (doctrine/MODEL_PARSIMONY.md): the whole-MODEL panel — aggregate every data-model type across
74
+ # the repo's source and judge the model as a whole (parsimony: which types do not earn their place against
75
+ # the rest; contract: loose-typed boundary fields). The cross-file half the per-file data hooks are blind to.
76
+ "data-review")
77
+
78
+ # The BASE review dimensions — the review ENGINE's mechanics (a file, a seam between two files, a named
79
+ # invariant). These are documented by their module docstrings and the tool description, and are NOT adoptable as a
80
+ # standalone doctrine/<NAME>.md. EVERY OTHER axis IS a named doctrine and MUST carry a doctrine md that declares
81
+ # `enforced_by: axis:<name>` — the ADR<->migration invariant in tests/test_toolkit_holds_itself_to_it.py enforces
82
+ # exactly this partition, so an axis cannot be added without either a doctrine md or a deliberate, reviewed entry
83
+ # here. (`name` is NOT foundational — it is the NAMING doctrine's axis; `concept` is NOT foundational — it is
84
+ # CANONICAL_IMPLEMENTATION's review-time axis, the capability-duplication detector.)
85
+ FOUNDATIONAL_AXES = ("file", "seam", "invariant")