readthrough 0.5.0__tar.gz → 0.6.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 (197) hide show
  1. {readthrough-0.5.0 → readthrough-0.6.0}/AGENTS.md +12 -3
  2. {readthrough-0.5.0 → readthrough-0.6.0}/CHANGELOG.md +50 -2
  3. {readthrough-0.5.0 → readthrough-0.6.0}/PKG-INFO +4 -1
  4. {readthrough-0.5.0 → readthrough-0.6.0}/README.md +3 -0
  5. {readthrough-0.5.0 → readthrough-0.6.0}/docs/guide.md +10 -6
  6. {readthrough-0.5.0 → readthrough-0.6.0}/docs/maintaining.md +4 -4
  7. {readthrough-0.5.0 → readthrough-0.6.0}/pyproject.toml +2 -1
  8. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/analyze.py +38 -20
  9. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/SKILL.md +9 -8
  10. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/web/dashboard.css +1 -0
  11. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/web/dashboard.js +41 -19
  12. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assistants.py +172 -126
  13. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/brief.py +8 -5
  14. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/build.py +8 -80
  15. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/ci.py +48 -31
  16. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/cli.py +157 -80
  17. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/contract.py +30 -27
  18. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/engine.py +69 -49
  19. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/forges/__init__.py +29 -7
  20. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/forges/azure_devops.py +65 -9
  21. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/forges/gitlab.py +2 -2
  22. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/model.py +15 -6
  23. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/onboard_model.py +15 -9
  24. readthrough-0.6.0/src/readthrough/pages.py +84 -0
  25. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/registry.py +1 -1
  26. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/review.py +64 -14
  27. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/runtimes/__init__.py +37 -13
  28. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/runtimes/anthropic.py +12 -7
  29. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/runtimes/copilot.py +7 -7
  30. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/runtimes/openai.py +12 -7
  31. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/serve.py +36 -14
  32. readthrough-0.6.0/src/readthrough/study.py +488 -0
  33. readthrough-0.6.0/src/readthrough/system.py +702 -0
  34. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/web_setup.py +34 -22
  35. {readthrough-0.5.0 → readthrough-0.6.0}/tests/conftest.py +31 -0
  36. readthrough-0.6.0/tests/fixtures/forges/ado/50a19c82ea7a.json +9 -0
  37. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/index.json +5 -0
  38. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_assistants.py +132 -81
  39. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_browser.py +48 -10
  40. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_ci.py +5 -5
  41. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_cli.py +74 -2
  42. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_contract.py +6 -6
  43. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_engine.py +54 -34
  44. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_forges.py +110 -0
  45. readthrough-0.6.0/tests/test_layers.py +107 -0
  46. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_onboard_model.py +10 -10
  47. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_review.py +23 -0
  48. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_runtimes.py +33 -35
  49. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_serve.py +53 -13
  50. readthrough-0.6.0/tests/test_study.py +347 -0
  51. readthrough-0.6.0/tests/test_system.py +326 -0
  52. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_vendor.py +1 -1
  53. readthrough-0.5.0/src/readthrough/study.py +0 -327
  54. readthrough-0.5.0/src/readthrough/system.py +0 -344
  55. readthrough-0.5.0/tests/test_study.py +0 -282
  56. readthrough-0.5.0/tests/test_system.py +0 -157
  57. {readthrough-0.5.0 → readthrough-0.6.0}/.gitignore +0 -0
  58. {readthrough-0.5.0 → readthrough-0.6.0}/CONTRIBUTING.md +0 -0
  59. {readthrough-0.5.0 → readthrough-0.6.0}/LICENSE +0 -0
  60. {readthrough-0.5.0 → readthrough-0.6.0}/docs/profiles.md +0 -0
  61. {readthrough-0.5.0 → readthrough-0.6.0}/examples/README.md +0 -0
  62. {readthrough-0.5.0 → readthrough-0.6.0}/examples/custom_profile_source.py +0 -0
  63. {readthrough-0.5.0 → readthrough-0.6.0}/examples/offline_analysis.py +0 -0
  64. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/__init__.py +0 -0
  65. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/__main__.py +0 -0
  66. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/agents.py +0 -0
  67. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/defaults.toml +0 -0
  68. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/extension/extension.mjs +0 -0
  69. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/extension/readthrough.mjs +0 -0
  70. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/profile-reference.md +0 -0
  71. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/README.md +0 -0
  72. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/cose-base.js +0 -0
  73. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/cytoscape-fcose.js +0 -0
  74. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/cytoscape.min.js +0 -0
  75. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/layout-base.js +0 -0
  76. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/cose-base-LICENSE +0 -0
  77. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/cytoscape-LICENSE +0 -0
  78. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/cytoscape-fcose-LICENSE +0 -0
  79. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/dompurify-LICENSE +0 -0
  80. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/layout-base-LICENSE +0 -0
  81. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/lucide-LICENSE +0 -0
  82. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/marked-LICENSE +0 -0
  83. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/lucide-icons.js +0 -0
  84. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/marked.umd.js +0 -0
  85. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/purify.min.js +0 -0
  86. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/web/dashboard.html +0 -0
  87. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/web/setup.css +0 -0
  88. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/web/setup.html +0 -0
  89. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/web/setup.js +0 -0
  90. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/assets/web/theme.css +0 -0
  91. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/config.py +0 -0
  92. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/faults.py +0 -0
  93. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/files.py +0 -0
  94. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/forges/forgejo.py +0 -0
  95. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/forges/github.py +0 -0
  96. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/ledger.py +0 -0
  97. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/limits.py +0 -0
  98. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/logs.py +0 -0
  99. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/membership.py +0 -0
  100. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/onboard.py +0 -0
  101. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/process.py +0 -0
  102. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/profile.py +0 -0
  103. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/py.typed +0 -0
  104. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/rules.py +0 -0
  105. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/terminals.py +0 -0
  106. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/tuning.py +0 -0
  107. {readthrough-0.5.0 → readthrough-0.6.0}/src/readthrough/usage.py +0 -0
  108. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fake_gh.py +0 -0
  109. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fakes.py +0 -0
  110. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/courier.toml +0 -0
  111. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/README.md +0 -0
  112. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/03be324e4f9e.json +0 -0
  113. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/090629072c7e.json +0 -0
  114. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/0e1fe07a4beb.json +0 -0
  115. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/21609ce43570.json +0 -0
  116. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/23c144c8cae2.json +0 -0
  117. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/2f67f0784d3f.json +0 -0
  118. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/4b737519e721.json +0 -0
  119. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/7f26382a26ef.json +0 -0
  120. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/9221b6d0840a.json +0 -0
  121. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/92c5290eaff1.json +0 -0
  122. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/e71b9e3fc4c0.json +0 -0
  123. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/f3509478d4d7.json +0 -0
  124. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/fc6b5e815e82.json +0 -0
  125. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/0cebf0b65aa5.json +0 -0
  126. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/165113c4eabe.json +0 -0
  127. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/26c499a0bd6b.json +0 -0
  128. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/274a37d8bb25.json +0 -0
  129. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/2e89d19be1f1.json +0 -0
  130. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/39bdce47eea5.json +0 -0
  131. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/4101cf99b3ab.json +0 -0
  132. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/4b5a777cdf98.json +0 -0
  133. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/59c71da3f041.json +0 -0
  134. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/5a273c90feeb.json +0 -0
  135. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/5c250e7135fc.json +0 -0
  136. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/5dd2f033485b.json +0 -0
  137. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/649b79bcdb19.json +0 -0
  138. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/6a44ccb778e2.json +0 -0
  139. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/9389f28310ef.json +0 -0
  140. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/963f7a37840f.json +0 -0
  141. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/a1dcb3f2df5a.json +0 -0
  142. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/a467e70e374c.json +0 -0
  143. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/aad3937bc2be.json +0 -0
  144. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/abf7a246a063.json +0 -0
  145. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/ae2091aa681b.json +0 -0
  146. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/b3bcdf26f5f2.json +0 -0
  147. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/c5f794f6d12a.json +0 -0
  148. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/e97f70ce7e2e.json +0 -0
  149. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/ee76ff2b2aa7.json +0 -0
  150. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/fcd900fc02ac.json +0 -0
  151. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/index.json +0 -0
  152. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/03addf8039b3.json +0 -0
  153. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/054a7bf76049.json +0 -0
  154. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/05a1a7170d04.json +0 -0
  155. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/0603a56f5c6e.json +0 -0
  156. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/1faa33d3d89d.json +0 -0
  157. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/2214b16b333f.json +0 -0
  158. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/229ccc31e324.json +0 -0
  159. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/235e10ac50b2.json +0 -0
  160. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/26c82541d833.json +0 -0
  161. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/293c168adbb5.json +0 -0
  162. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/3a0f3d9a23f8.json +0 -0
  163. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/4f32035198bb.json +0 -0
  164. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/5a7f9f9571ba.json +0 -0
  165. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/5d53ec48c954.json +0 -0
  166. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/6c9d9aaf4865.json +0 -0
  167. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/6d0b7f56058c.json +0 -0
  168. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/6e76cb3a29c6.json +0 -0
  169. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/6f7a226c9418.json +0 -0
  170. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/788d7a59a435.json +0 -0
  171. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/87847cd77255.json +0 -0
  172. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/9159d1034171.json +0 -0
  173. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/93514ae445cf.json +0 -0
  174. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/995df583d679.json +0 -0
  175. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/a103f9259efe.json +0 -0
  176. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/ba7bbd8d7f4d.json +0 -0
  177. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/c0d36d9d5385.json +0 -0
  178. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/cb31d203bf57.json +0 -0
  179. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/d9cf27bbda67.json +0 -0
  180. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/e56b428bb2c2.json +0 -0
  181. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/fe1e852021c5.json +0 -0
  182. {readthrough-0.5.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/index.json +0 -0
  183. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_agents.py +0 -0
  184. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_analyze.py +0 -0
  185. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_commit_messages.py +0 -0
  186. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_e2e.py +0 -0
  187. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_examples.py +0 -0
  188. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_extension.py +0 -0
  189. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_github_faults.py +0 -0
  190. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_jitter.py +0 -0
  191. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_ledger_config.py +0 -0
  192. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_onboard.py +0 -0
  193. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_profile.py +0 -0
  194. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_registry.py +0 -0
  195. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_rules.py +0 -0
  196. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_tuning.py +0 -0
  197. {readthrough-0.5.0 → readthrough-0.6.0}/tests/test_web_setup.py +0 -0
@@ -82,14 +82,15 @@ engine CI uses, else an installed Edge or Chrome; they skip when there is none,
82
82
  the entry, never from the current config. No brand names in `by` or in the UI: the engine is named by what
83
83
  it is. Older logs say `by: copilot`, the assistant's former name; `study.load` reads it as `model` and claims
84
84
  no runtime for it, and the file is never rewritten. Answers are tagged with the aids that preceded them
85
- (`hint`, `brief`) from the log itself, never asserted.
85
+ (`hint`, `brief`) from the log itself, never asserted. Every entry carries the `head` it was about, set by the
86
+ log from what its writer saw (never from a tool's arguments); none means not recorded.
86
87
  - **Model usage goes to the ledger (`usage.py`), in the provider's units.** One line per call, idempotent
87
88
  by call id; tokens, Copilot's multiplier, and AI credits stay separate, a dollar figure must name its price
88
89
  table, and nothing unreported is written as zero. `billed_to` says whose account paid.
89
90
  - **The pages are one served file.** `assets/web/` holds separate `.html`, `.css`, `.js` for editing;
90
- `build.page_source` inlines them, every script carries a per-render nonce, and the CSP runs nothing else.
91
+ `pages.page_source` inlines them, every script carries a per-render nonce, and the CSP runs nothing else.
91
92
  No inline `onclick=`; third-party HTML goes through DOMPurify. Vendored JS lives in `assets/vendor/` with
92
- its license and is listed in `build.VENDOR_SCRIPTS`.
93
+ its license and is listed in `pages.VENDOR_SCRIPTS`.
93
94
  - **What crosses between page and server is declared in `contract.py`** (the payload, the SSE events, the
94
95
  study API) and `test_contract.py` checks both sides: a build has exactly those shapes, the page reads nothing
95
96
  else. Events are notifications; a GET is the truth, and after any gap (`hello` with a new instance, `resync`,
@@ -102,6 +103,14 @@ engine CI uses, else an installed Edge or Chrome; they skip when there is none,
102
103
  runtime loads, installed by `install canvas`) is a client of the CLI alone: it runs the interpreter that
103
104
  installed it with an argument list from a fixed directory, reads, steers, and writes nothing to the log or the
104
105
  ledger; `test_extension.py` keeps its constants and flags in step with `contract.py` and `cli.py`.
106
+ - **A vocabulary is a `StrEnum`** (`model.Availability`, `ci.State`, `study.EntryKind`, `runtimes.Event`'s records), and a
107
+ consumer dispatches with `match` ending in `case _: assert_never(x)`, so the type checker fails on a missing
108
+ member. Compare members with `==`, never `is`: the same value read back from a file or a request is a plain
109
+ `str`, and `is` would be silently false. Parse outside input with `Enum(value)` at the boundary, once.
110
+ - **What `install` puts on the machine is recorded, not migrated.** `system.install` writes a receipt entry (the
111
+ options, the interpreter, and the handles that remove it: a task, an HKCU key, a file) and `system.reconcile`
112
+ converges the machine on the running version, removing a retired piece from its handles alone. A new piece is a
113
+ `PieceKind` with a case in `handles`, `probe`, and `_put`; the type checker finds a missing one.
105
114
  - **Lint is `ruff` with `select = ["ALL"]`** and an ignore list that states each reason in `pyproject.toml`.
106
115
  Suppress per file (with a reason) rather than per line where a whole file legitimately differs. Types are
107
116
  checked by `ty`, pinned exactly; bump it deliberately.
@@ -2,6 +2,54 @@
2
2
 
3
3
  0.4.0 is the first published version; the entries before it are the project's history from before it was public.
4
4
 
5
+ ## 0.6.0 (2026-11-23)
6
+
7
+ ### Added
8
+
9
+ - Every study log entry records the commit it was about: what you write, the head your page showed; what the
10
+ model writes, the commit its turn read; from a terminal, `--head SHA`, else the last build's head. Entries
11
+ written before this say nothing about it, and the file is never rewritten.
12
+ - The brief's study section and its Handoff line set apart evidence about an earlier commit of the PR, and
13
+ evidence whose commit wasn't recorded, and an earlier finding names its commit beside its `path:line`. The
14
+ counts don't change: earlier evidence is labelled, never hidden.
15
+ - The Study tab says when the PR got new commits while you were studying it, and keeps what you write recorded
16
+ against the commit you were reading until you say you've looked; evidence about an earlier commit is tagged
17
+ as such.
18
+ - `readthrough study N` records a quiz from a terminal: `--question` (with `--focus`, `--ref`, `--expect`),
19
+ `--hint`, `--answer`, `--assess` (with `--evidence`), `--reflection`, and `--assess-teachback` (with `--gap`).
20
+ Questions, hints, and grades take `--by model`, and `--model` names the model when the agent knows it; an
21
+ answer after a recorded hint is tagged as aided, as it is on the page.
22
+ - The deep-review skill records its check questions, hints, your answers, its grades, and its teach-back
23
+ assessment in the study log, each against the commit it checked out, and treats evidence from an earlier
24
+ commit as something to recheck rather than skip.
25
+ - `readthrough install` keeps a receipt of what it puts on the machine, and the live server, when a new version
26
+ starts it, brings those pieces up to date and removes what that version no longer installs. Only what the same
27
+ installation put there: another checkout's or a tool install's pieces are left alone, and `doctor` says when the
28
+ server task runs a different readthrough. `readthrough uninstall --all` removes everything readthrough
29
+ installed, whichever installation did it.
30
+
31
+ ### Fixed
32
+
33
+ - On Azure DevOps, the `az` access token was asked for once per process and kept for good, so the live server's
34
+ builds of every Azure DevOps repo failed about an hour after it started ("refuses both the az identity and
35
+ anonymous access") until it was restarted. The token is now asked for again before the expiry `az` reports,
36
+ and one the organization refuses early is replaced once before anonymous access is tried.
37
+ - On Azure DevOps, `readthrough worktree` reported the synthetic merge commit as the PR's head, so the review
38
+ skill told you the PR had moved when it hadn't, and what it recorded read as about an earlier commit. It now
39
+ reports the PR's own head, the merge's second parent; the checkout and its diff are unchanged.
40
+ - The study assistant could read two versions of a PR in one turn: each tool call checked out whatever head the
41
+ latest build had, in the worktree a deep review also uses. A turn now reads one commit throughout, by commit
42
+ rather than checkout, and is told when the PR moved since its last turn.
43
+ - On Windows, `install` registered the server and the link handler through a `pythonw.exe` that a uv before 0.13
44
+ had made a console program, so a terminal window opened at every logon and every link click. It now refuses,
45
+ and says how to recreate the environment.
46
+ - Azure DevOps cuts a PR's description at 400 characters in the PR list, and readthrough analysed and briefed
47
+ that cut text as the whole description. One that reaches the cut (counted as Azure DevOps counts, an emoji
48
+ being two) is now fetched in full.
49
+ - The study assistants looked for the repo's profile without asking the forge, so a repo whose
50
+ `readthrough.toml` is committed upstream got no quiz questions from the rules assistant and no study guidance
51
+ for the model, though its dashboard was built from that profile.
52
+
5
53
  ## 0.5.0 (2026-11-04)
6
54
 
7
55
  ### Added
@@ -160,8 +208,8 @@
160
208
  warnings stay prominent. Its styling no longer spills onto a PR's active-session dot. Onboarding's
161
209
  read-only connection line expands to show the CLI or API and the ordered credential sources; the
162
210
  credential actually used is still shown after checking access.
163
- - The header puts the product first, the repo second, and the small print third: **readthrough / microsoft/vscode ·
164
- 100 of 2,885 open · as of 8:27 PM · @you**. The repo is a quiet pill that opens the switcher (the native select,
211
+ - The header puts the product first, the repo second, and the small print third: `readthrough / microsoft/vscode ·
212
+ 100 of 2,885 open · as of 8:27 PM · @you`. The repo is a quiet pill that opens the switcher (the native select,
165
213
  still keyboard-reachable, laid invisibly over it); the connection is a status chip that reads live, refreshing,
166
214
  offline, or refresh failed, with the next check on hover, and the refresh button spins while a refresh runs
167
215
  instead of growing a label. The tabs no longer breathe while the indicator slides (a selected tab is bolder, so
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: readthrough
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: Lay a repo's open pull requests out on its architecture, then study each one before you review it.
5
5
  Project-URL: Homepage, https://github.com/spencrr/readthrough
6
6
  Project-URL: Documentation, https://github.com/spencrr/readthrough/blob/main/docs/guide.md
@@ -92,6 +92,7 @@ forges/ a registry of forge adapters: github (gh), gitlab, forgejo, az
92
92
  faults.py how outside calls fail, classified from a CLI's stderr or an HTTP status
93
93
  process.py running programs: UTF-8, timeouts, secrets that never reach a log
94
94
  build.py one build: fetch, analyze, write data.json, the dashboard, and the briefs
95
+ pages.py the served pages, assembled from assets/web with the data inlined and a nonce on every script
95
96
  analyze.py lanes, signals, line heuristics, overlaps, and the burn-down plan
96
97
  ci.py which checks are required, failing, or also failing on main
97
98
  brief.py the Markdown brief a reviewer reads before the diff
@@ -112,6 +113,8 @@ assets/web/ the pages as separate HTML, CSS, and JS, inlined into one serv
112
113
  assets/vendor/ Cytoscape, marked, DOMPurify, and Lucide icons, with their licenses
113
114
  ```
114
115
 
116
+ The modules sit in layers, each importing only from the ones below it: the records and limits everything shares; the machine (processes, logs, config, the ledger); the plugins and what they fill in (forges, runtimes, agents, profiles, the study log); reading a PR (analysis, the brief, onboarding, review sessions); the assistants; building a dashboard; and the two entry points, `cli` and `serve`. `tests/test_layers.py` is that table, and fails when a module reaches up.
117
+
115
118
  To extend it: a new forge, a new place profiles can come from, a new review agent, a new terminal, or a new study assistant is a registry entry with an options dataclass, described in [Maintaining readthrough](https://github.com/spencrr/readthrough/blob/main/docs/maintaining.md#plugins). Everything repo-specific is data in a profile, described in [Writing a profile](https://github.com/spencrr/readthrough/blob/main/docs/profiles.md).
116
119
 
117
120
  ## Development
@@ -59,6 +59,7 @@ forges/ a registry of forge adapters: github (gh), gitlab, forgejo, az
59
59
  faults.py how outside calls fail, classified from a CLI's stderr or an HTTP status
60
60
  process.py running programs: UTF-8, timeouts, secrets that never reach a log
61
61
  build.py one build: fetch, analyze, write data.json, the dashboard, and the briefs
62
+ pages.py the served pages, assembled from assets/web with the data inlined and a nonce on every script
62
63
  analyze.py lanes, signals, line heuristics, overlaps, and the burn-down plan
63
64
  ci.py which checks are required, failing, or also failing on main
64
65
  brief.py the Markdown brief a reviewer reads before the diff
@@ -79,6 +80,8 @@ assets/web/ the pages as separate HTML, CSS, and JS, inlined into one serv
79
80
  assets/vendor/ Cytoscape, marked, DOMPurify, and Lucide icons, with their licenses
80
81
  ```
81
82
 
83
+ The modules sit in layers, each importing only from the ones below it: the records and limits everything shares; the machine (processes, logs, config, the ledger); the plugins and what they fill in (forges, runtimes, agents, profiles, the study log); reading a PR (analysis, the brief, onboarding, review sessions); the assistants; building a dashboard; and the two entry points, `cli` and `serve`. `tests/test_layers.py` is that table, and fails when a module reaches up.
84
+
82
85
  To extend it: a new forge, a new place profiles can come from, a new review agent, a new terminal, or a new study assistant is a registry entry with an options dataclass, described in [Maintaining readthrough](https://github.com/spencrr/readthrough/blob/main/docs/maintaining.md#plugins). Everything repo-specific is data in a profile, described in [Writing a profile](https://github.com/spencrr/readthrough/blob/main/docs/profiles.md).
83
86
 
84
87
  ## Development
@@ -31,6 +31,10 @@ Then run `readthrough install`. With nothing named it goes through everything re
31
31
  - `readthrough install protocol` registers a `readthrough://` link handler for your Windows user, so the buttons in the snapshot version can start a review. The live dashboard doesn't need it. No admin rights are needed; it writes a single key under `HKCU\Software\Classes`.
32
32
  - `readthrough install canvas` puts the dashboard beside agent sessions in VS Code's Agents window (see [The dashboard beside the session](#the-dashboard-beside-the-session-experimental)). Offered wherever the Copilot CLI is.
33
33
 
34
+ readthrough keeps a receipt of what it installs (`installed.json` in `~/.readthrough`): each piece, the options it was installed with, the interpreter that installed it, and what it left on the machine (a scheduled task, a registry key, files). When a new version starts the live server, it brings what this install put there up to date (the skill's text, the canvas, a task whose command changed) and removes anything an earlier version installed that this one no longer does. It never adds a piece, and it leaves alone what another readthrough installed (another checkout, or a tool install): `doctor` says when the server task runs a different one. `readthrough install` with nothing named does the same tidying before it offers what's missing.
35
+ take readthrough off a machine, run `readthrough uninstall --all` before `uv tool uninstall readthrough`: a Python package can't run anything when it's removed, so the tasks, the link handler, and the files would otherwise stay.
36
+ Windows, everything that starts in the background (the server at logon, the link handler) runs through the environment's `pythonw.exe`. If that is a console program, which uv before 0.13 made, each start opens a terminal window; `install` refuses then and says how to recreate the environment, and `doctor` flags it.
37
+
34
38
  None of this does anything until you onboard a repo. With the server running, its front page takes you to onboarding.
35
39
 
36
40
  ## Onboarding a repo
@@ -303,13 +307,13 @@ It's one conversation with a single box underneath, and a small indicator at the
303
307
 
304
308
  Tab moves from the box to its buttons, and Ctrl+Enter runs the main one. To keep something, **pin** any message, yours or the model's, and it goes into the brief. A line under the transcript says what's answering (the configured model, or the runtime when GitHub Copilot picks the model per call), and each reply is labelled with the model that actually wrote it.
305
309
 
306
- Everything you write and everything the assistant concludes goes into the PR's **study log**, an append-only record in the repo's `study/` folder. Nothing in it is ever edited or deleted, and every entry says who wrote it: you, the model (and which model, through which runtime), or the rules. When a turn fails (the provider unreachable, the clone missing a commit), the log records that too, against the runtime rather than a model that never answered, so a request without a reply is never mistaken for one you abandoned. Each answer is tagged, from the log itself, with whether a hint or a briefing came before it. The log is rendered as the last section of the brief, so the evidence travels with it: the terminal deep review reads it, and the **Brief** tab shows it. Your quiz score shows next to the PR in the plan and the table; with the rules assistant there is no score, only how many questions you answered and how many of those were unaided.
310
+ Everything you write and everything the assistant concludes goes into the PR's **study log**, an append-only record in the repo's `study/` folder. Nothing in it is ever edited or deleted, and every entry says who wrote it: you, the model (and which model, through which runtime), or the rules. When a turn fails (the provider unreachable, the clone missing a commit), the log records that too, against the runtime rather than a model that never answered, so a request without a reply is never mistaken for one you abandoned. Each answer is tagged, from the log itself, with whether a hint or a briefing came before it. Each entry also records the commit it was about: for what you write, the head your page showed; for the model, the commit its turn read; for a pinned note, whatever it pins was about. Entries from before readthrough recorded this, and any whose commit couldn't be known, say nothing about it. When the PR gets new commits while you study it, the Study tab says so above the box you write in, and what you write stays recorded against the commit you were reading until you choose **I've looked at the new commits**. Evidence about an earlier commit carries a muted *earlier commit* tag, and the plan's quiz badge and the stepper say how much of it there is; nothing is hidden or recounted. The log is rendered as the last section of the brief, so the evidence travels with it: the terminal deep review reads it, and the **Brief** tab shows it. Your quiz score shows next to the PR in the plan and the table; with the rules assistant there is no score, only how many questions you answered and how many of those were unaided.
307
311
 
308
- **What the model can do here.** Each PR gets its own conversation, separate from the deep-review session. On the Copilot SDK it lives in the CLI's session store and survives server restarts; on the API runtimes a restart starts a fresh conversation, which is handed the brief and so the study log's evidence. It runs in the PR's worktree, but with every built-in tool switched off and permission requests refused. It has eight tools of its own. Three read the code: the diff, a file, and a search. Five append to the study log: ask a question, assess an answer, assess a teach-back, add a note, record a finding.
312
+ **What the model can do here.** Each PR gets its own conversation, separate from the deep-review session. On the Copilot SDK it lives in the CLI's session store and survives server restarts; on the API runtimes a restart starts a fresh conversation, which is handed the brief and so the study log's evidence. It runs in the PR's worktree, but with every built-in tool switched off and permission requests refused. It has eight tools of its own. Three read the code: the diff, a file, and a search, all of one commit for the whole turn (the head the dashboard showed when you asked, or the forge's current one when the clone doesn't have it), so a push mid-turn can't mix two versions into one answer, and the next turn is told the PR moved. Five append to the study log: ask a question, assess an answer, assess a teach-back, add a note, record a finding.
309
313
 
310
- **Taking it into a deep review.** The study session and the deep-review session are separate on purpose: they have different tools and different rules (study can't edit or run anything), so resuming one as the other wouldn't fit. What carries over is the evidence. The study log's section of the brief starts with a **Handoff** line (solid on, revisit, unanswered, and teach-back gaps), and the deep review reads it first and spends its time on the weak spots. The study assistant can't edit files, run commands, or reach the network beyond its own provider. File reads are confined to the worktree. If the profile has study guidance, the model gets that too.
314
+ **Taking it into a deep review.** The study session and the deep-review session are separate on purpose: they have different tools and different rules (study can't edit or run anything), so resuming one as the other wouldn't fit. What carries over is the evidence. The study log's section of the brief starts with a **Handoff** line (solid on, revisit, unanswered, and teach-back gaps), and the deep review reads it first and spends its time on the weak spots. After a push, evidence about an earlier commit is set apart in that line ("Before the latest commits ...: solid on Q1 at abc1234"), and so is evidence whose commit wasn't recorded; in the sections below, an earlier answer, teach-back, finding, or note says which commit it was about, a finding right beside its `path:line`. Nothing is hidden or recounted: whether an earlier answer still holds is for the reviewer to check, starting with what the push changed. The study assistant can't edit files, run commands, or reach the network beyond its own provider. It reads files from the commit by their path in the repo, never through the disk. If the profile has study guidance, the model gets that too.
311
315
 
312
- From a terminal, `readthrough study 2897` prints the log, and `--prediction`, `--teachback`, `--note`, and `--finding "major: summary" --at path:line` add to it. The deep-review skill uses these too, so a terminal review and the dashboard build the same record.
316
+ From a terminal, `readthrough study 2897` prints the log, and `--prediction`, `--teachback`, `--note`, and `--finding "major: summary" --at path:line` add to it, each about the last build's head, or the commit `--head SHA` names. So do `--question`, `--hint`, `--answer`, `--assess`, `--reflection`, and `--assess-teachback`: the deep-review skill records its check questions, hints, your answers, and its grades with them, against the commit it checked out, so a terminal review and the dashboard build the same record.
313
317
 
314
318
  ### Why a link handler?
315
319
 
@@ -436,7 +440,7 @@ host = "codeberg.org"
436
440
 
437
441
  gitlab.com throttles anonymous API use per IP address quite hard, so a token (or `glab auth login`) makes a real difference there.
438
442
 
439
- On Azure DevOps, readthrough first asks the organization which Entra tenant it belongs to (an anonymous call the organization refuses, naming the tenant), then asks `az` for a token *in that tenant*. That matters when you're signed in to several: `az` holds a token for your default tenant, and an organization elsewhere would refuse it. `az account get-access-token` never prompts; when `az` has no sign-in for the tenant, readthrough continues anonymously (enough for a public project), `doctor` repeats what `az` said, and its fix line is a sign-in scoped to that one tenant:
443
+ On Azure DevOps, readthrough first asks the organization which Entra tenant it belongs to (an anonymous call the organization refuses, naming the tenant), then asks `az` for a token *in that tenant*, and asks again shortly before that token expires (an hour or so), so a server that runs for days stays signed in. That matters when you're signed in to several: `az` holds a token for your default tenant, and an organization elsewhere would refuse it. `az account get-access-token` never prompts; when `az` has no sign-in for the tenant, readthrough continues anonymously (enough for a public project), `doctor` repeats what `az` said, and its fix line is a sign-in scoped to that one tenant:
440
444
 
441
445
  ```sh
442
446
  az login --tenant <tenant id> --allow-no-subscriptions --scope 499b84ac-1321-427f-aa17-267ca6975798/.default
@@ -509,7 +513,7 @@ Every command except `onboard`, `repos`, `default`, `remove`, `install`, `uninst
509
513
  | `review N [--fresh] [--here] [--vscode] [--print]` | Start or resume the deep-review session |
510
514
  | `worktree N [--remove]` | Check out a PR in its own worktree and print the diff command |
511
515
  | `ledger N [--status S] [--note T] [--clear]` | Record, show, or clear what you did with a PR |
512
- | `study N [--prediction T] [--teachback T] [--note T] [--finding S:T --at P:L]` | Show or add to a PR's study log |
516
+ | `study N [--prediction T] [--question T] [--hint Q T] [--answer Q T] [--assess Q V F] [--reflection [Q:]T] [--teachback T] [--assess-teachback V F] [--note T] [--finding S:T --at P:L] [--by model] [--head SHA]` | Show or add to a PR's study log; `--help` lists the rest |
513
517
  | (browser) `/setup` | Onboard a repo, or change a repo's settings |
514
518
  | `install [skill\|server\|schedule\|protocol\|canvas] [--all]` | Set up the integrations: all that are missing, asking about each, or one |
515
519
  | `uninstall skill\|server\|schedule\|protocol\|canvas` | Undo one |
@@ -115,17 +115,17 @@ Make a value tunable when someone could reasonably want a different one: network
115
115
 
116
116
  ## The pages
117
117
 
118
- The UI lives in `assets/web/`. Each page has its own `.html`, `.css`, and `.js`, and `theme.css` holds the color tokens and base styles they share. `build.page_source(name)` inlines them, and `render_html` and `render_setup` fill in the nonce, the vendored scripts, and the data, so what's served is still one self-contained file that works offline as a snapshot.
118
+ The UI lives in `assets/web/`. Each page has its own `.html`, `.css`, and `.js`, and `theme.css` holds the color tokens and base styles they share. `pages.page_source(name)` inlines them, and `render_html` and `render_setup` fill in the nonce, the vendored scripts, and the data, so what's served is still one self-contained file that works offline as a snapshot.
119
119
 
120
120
  - Every script carries a per-render nonce, and the content security policy runs nothing else. Don't add inline event handlers (`onclick=`); use the delegated listeners.
121
121
  - PR descriptions and comments are third-party HTML. They go through DOMPurify, and `test_browser.py` checks that an `onerror` attribute doesn't survive.
122
122
  - Escape everything else you interpolate with `esc()`.
123
- - Third-party JavaScript is vendored under `assets/vendor/` with its license, and listed in `build.VENDOR_SCRIPTS`. The page itself makes no requests to other sites; the images in a PR's description are the one exception, and `SECURITY.md` says what that means.
123
+ - Third-party JavaScript is vendored under `assets/vendor/` with its license, and listed in `pages.VENDOR_SCRIPTS`. The page itself makes no requests to other sites; the images in a PR's description are the one exception, and `SECURITY.md` says what that means.
124
124
  - Check both themes. New colors go in `theme.css` as tokens if both pages use them, otherwise at the top of the page's CSS.
125
125
 
126
126
  ### The contract with the server
127
127
 
128
- `contract.py` declares everything that crosses between the page and the server, and `test_contract.py` holds both sides to it: a build with every optional part populated must have exactly the declared shapes (an added or dropped field fails the test until the contract says so), and the page's scripts must read only declared fields, listen only for declared events, handle every study event the server can send, and call only routes it serves. So a new field is three edits, in `analyze.py` or `build.py`, in `contract.py`, and in the page, and the test tells you which one you forgot.
128
+ `contract.py` declares everything that crosses between the page and the server, and `test_contract.py` holds both sides to it: a build with every optional part populated must have exactly the declared shapes (an added or dropped field fails the test until the contract says so), and the page's scripts must read only declared fields, listen only for declared events, handle every study event the server can send, and call only routes it serves. The producers are annotated with those records (`analyze.analyze` returns a `PullRequestItem`, `ci.classify` a `CiChecks`, `study.summarize` a `StudySummary`), so the type checker catches a field the contract doesn't name before the test does. So a new field is three edits, in `analyze.py` or `build.py`, in `contract.py`, and in the page, and the checks tell you which one you forgot.
129
129
 
130
130
  The rules the contract states, in short: events are notifications and a GET is the truth, so after any gap (a reconnect, a client that fell behind and was sent `resync`, a server restart seen on `hello`) the page fetches everything it holds again rather than reasoning about what it missed; study entries have per-PR ids that only ever grow, so the page de-duplicates by id and a repeated event is harmless; one assistant turn runs per PR, and a second request gets 409. The shared files behind the API (the study logs, the ledger) are read and written under `files.locked`, a file lock that also covers another process, since a review agent's terminal writes to the same log as the server.
131
131
 
@@ -142,7 +142,7 @@ A forge subclasses `forges.Forge`: class attributes for its name, label, dot-dir
142
142
 
143
143
  A review agent subclasses `agents.Agent`: how to start a session with a given id, name, and prompt and how to resume one by id; where its sessions live and how to read a session's first user message (the PR marker in it is what links the session to a PR); whether a session is open right now, when the agent leaves a trace of that (Copilot does, Claude Code doesn't, and the adapter says `None` rather than `False`); and where its skills go. What ships is what could be run here: Codex or Gemini CLI would be the same shape, verified against their session formats first.
144
144
 
145
- A terminal launcher is a pure function from a `Command` to a `Spawn`; only the Windows ones run on the author's machine, so the others carry the invocation their terminal documents and a note to that effect. A study assistant implements `assistants.Assistant` (`turn` and `stop`) and writes to the log only through the `Harness` it's given, with its own name in `by`; it must never write a verdict unless it read the code to reach it. The model assistant borrows its engine from a `runtimes.Runtime` (`open` a `Conversation`, then `send` prompts and consume `Event`s: text, tool, usage, done, error); a runtime translates the assistant's `ToolSpec`s to its wire format, runs the tool loop, and reports usage in its provider's own units (`runtimes.Usage`), and never touches the log itself. Adding a provider means a new runtime module under `runtimes/` with a dataclass of options, registered in `RUNTIMES`, with a `name` (what the study log records as `runtime`), a `model` property (the configured model, or `None` when the service picks), and `describe()`; the assistant and the drafter need no change, and nothing in the UI or the log names a provider except through those.
145
+ A terminal launcher is a pure function from a `Command` to a `Spawn`; only the Windows ones run on the author's machine, so the others carry the invocation their terminal documents and a note to that effect. A study assistant implements `assistants.Assistant` (`turn` and `stop`) and writes to the log only through the `Harness` it's given, with its own name in `by`; it must never write a verdict unless it read the code to reach it. The model assistant borrows its engine from a `runtimes.Runtime` (`open` a `Conversation`, then `send` prompts and consume `Event`s, one of `Text`, `ToolCall`, `Used`, `Done`, `Failed`, told apart with `match`); a runtime translates the assistant's `ToolSpec`s to its wire format, runs the tool loop, and reports usage in its provider's own units (`runtimes.Usage`), and never touches the log itself. Adding a provider means a new runtime module under `runtimes/` with a dataclass of options, registered in `RUNTIMES`, with a `name` (what the study log records as `runtime`), a `model` property (the configured model, or `None` when the service picks), and `describe()`; the assistant and the drafter need no change, and nothing in the UI or the log names a provider except through those.
146
146
 
147
147
  ## Releasing
148
148
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "readthrough"
7
- version = "0.5.0"
7
+ version = "0.6.0"
8
8
  description = "Lay a repo's open pull requests out on its architecture, then study each one before you review it."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -121,6 +121,7 @@ ignore = [
121
121
  ]
122
122
  # A fake winreg has to spell its functions the way the real one does.
123
123
  "tests/test_system.py" = ["N802"]
124
+ "tests/conftest.py" = ["N802"]
124
125
  # The fake gh is a program: its output is its stdout.
125
126
  "tests/fake_gh.py" = ["T201"]
126
127
  # scripts/ and examples/ are standalone programs, not packages; printing is their output. An example plugin
@@ -8,16 +8,28 @@ from __future__ import annotations
8
8
 
9
9
  import datetime as dt
10
10
  import re
11
+ from collections.abc import Mapping, Sequence
11
12
  from collections.abc import Set as AbstractSet
12
13
  from typing import Any
13
14
 
14
15
  from readthrough import ci
15
- from readthrough.model import Capability, Check, PullRequest
16
+ from readthrough.contract import (
17
+ CiChecks,
18
+ FailingCheck,
19
+ FileRow,
20
+ Flag,
21
+ Overlap,
22
+ PlanSession,
23
+ PullRequestItem,
24
+ Smell,
25
+ Thread,
26
+ )
27
+ from readthrough.model import Availability, Capability, Check, PullRequest
16
28
  from readthrough.profile import Authors, Profile
17
29
  from readthrough.rules import Instruction
18
30
  from readthrough.tuning import PayloadTuning, PlanningTuning, default_tuning
19
31
 
20
- PR = dict[str, Any]
32
+ PR = PullRequestItem
21
33
 
22
34
  # What a gap in the forge's answer means for the PR, by field. Shown as a signal so nobody reads the
23
35
  # resulting default as a fact.
@@ -123,8 +135,8 @@ def strip_brackets(text: str) -> str:
123
135
 
124
136
  def find_smells(
125
137
  added: dict[str, list[tuple[int, str]]], profile: Profile, *, per_file_cap: int = 3, code_chars: int = 160
126
- ) -> list[dict[str, Any]]:
127
- hits: list[dict[str, Any]] = []
138
+ ) -> list[Smell]:
139
+ hits: list[Smell] = []
128
140
  counts: dict[tuple[str, str], int] = {}
129
141
  for path, lines in added.items():
130
142
  is_test = profile.is_test(path)
@@ -251,7 +263,7 @@ def analyze(
251
263
  planning = planning or default_tuning().planning
252
264
  payload = payload or default_tuning().payload
253
265
  by_comp: dict[str, int] = {}
254
- file_rows = []
266
+ file_rows: list[FileRow] = []
255
267
  counted = pr.line_counts.known # else every file weighs one line: the forge gave no counts
256
268
  for f in pr.files:
257
269
  comp = profile.component_of(f.path)
@@ -265,13 +277,17 @@ def analyze(
265
277
  primary = max(code_comps or set(by_comp) or {"other"}, key=lambda c: by_comp.get(c, 0))
266
278
  paths = [f.path for f in pr.files]
267
279
 
268
- flags: list[dict[str, str]] = []
280
+ flags: list[Flag] = []
269
281
 
270
282
  def flag(fid: str, kind: str, msg: str) -> None:
271
283
  flags.append({"id": fid, "kind": kind, "msg": msg})
272
284
 
273
285
  for name, cap in pr.gaps():
274
- how = "not something this forge can tell us" if cap.kind == "unsupported" else f"couldn't be read: {cap.reason}"
286
+ how = (
287
+ "not something this forge can tell us"
288
+ if cap.kind == Availability.UNSUPPORTED
289
+ else f"couldn't be read: {cap.reason}"
290
+ )
275
291
  flag("gap", "info", f"{GAP_MESSAGES[name]}: {how}")
276
292
 
277
293
  unresolved = _unresolved_threads(pr, payload)
@@ -373,7 +389,7 @@ def analyze(
373
389
 
374
390
  def _ci_summary(
375
391
  pr: PullRequest, required_checks: dict[str, Capability[set[str]]], main_failing: AbstractSet[str]
376
- ) -> dict[str, Any]:
392
+ ) -> CiChecks:
377
393
  if not pr.checks.known:
378
394
  return ci.unknown(pr.checks.reason)
379
395
  checks: list[Check] = pr.checks.get([])
@@ -383,19 +399,19 @@ def _ci_summary(
383
399
  return ci.classify(checks, required=required.get(set()) if required else None, main_failing=main_failing)
384
400
 
385
401
 
386
- def _check_names(rows: list[dict[str, Any]]) -> str:
402
+ def _check_names(rows: list[FailingCheck]) -> str:
387
403
  return ", ".join(r["name"] for r in rows[:3]) + (f" and {len(rows) - 3} more" if len(rows) > 3 else "")
388
404
 
389
405
 
390
- def _ci_flags(ci_info: dict[str, Any], flag: Any) -> None:
406
+ def _ci_flags(ci_info: CiChecks, flag: Any) -> None:
391
407
  state, failing = ci_info["state"], ci_info["failing"]
392
408
  names = _check_names
393
409
  own = [r for r in failing if not r["on_main"]]
394
- if state == "failing":
410
+ if state == ci.State.FAILING:
395
411
  flag("ci", "blocker", f"CI failing: {names(own)}")
396
- elif state == "failing-optional":
412
+ elif state == ci.State.FAILING_OPTIONAL:
397
413
  flag("ci-optional", "risk", f"Optional check failing: {names(own)}")
398
- elif state == "not-run":
414
+ elif state == ci.State.NOT_RUN:
399
415
  flag(
400
416
  "ci-not-run",
401
417
  "info",
@@ -409,7 +425,7 @@ def _ci_flags(ci_info: dict[str, Any], flag: Any) -> None:
409
425
  )
410
426
 
411
427
 
412
- def _unresolved_threads(pr: PullRequest, payload: PayloadTuning) -> list[dict[str, Any]]:
428
+ def _unresolved_threads(pr: PullRequest, payload: PayloadTuning) -> list[Thread]:
413
429
  return [
414
430
  {
415
431
  "path": t.path,
@@ -424,7 +440,7 @@ def _unresolved_threads(pr: PullRequest, payload: PayloadTuning) -> list[dict[st
424
440
  ]
425
441
 
426
442
 
427
- def _lane(pr: PullRequest, *, decision: str, viewer: str, flags: list[dict[str, str]], pushed_since_cr: bool) -> str:
443
+ def _lane(pr: PullRequest, *, decision: str, viewer: str, flags: list[Flag], pushed_since_cr: bool) -> str:
428
444
  if pr.author.login == viewer:
429
445
  return "mine"
430
446
  if pr.draft:
@@ -457,13 +473,13 @@ def _priority(
457
473
  else 0
458
474
  )
459
475
  # A green PR can be reviewed with confidence; one with its own optional failures will likely change.
460
- score += {"passing": t.priority_ci_passing, "failing-main": t.priority_ci_failing_on_main,
461
- "failing-optional": t.priority_ci_failing_optional, "not-run": t.priority_ci_not_run}.get(ci_state, 0) # fmt: skip
476
+ score += {ci.State.PASSING: t.priority_ci_passing, ci.State.FAILING_MAIN: t.priority_ci_failing_on_main,
477
+ ci.State.FAILING_OPTIONAL: t.priority_ci_failing_optional, ci.State.NOT_RUN: t.priority_ci_not_run}.get(ci_state, 0) # fmt: skip
462
478
  score += t.priority_closes_issue if closes_issue else 0
463
479
  return round(score, 1)
464
480
 
465
481
 
466
- def compute_overlaps(items: list[PR], profile: Profile) -> list[dict[str, Any]]:
482
+ def compute_overlaps(items: list[PR], profile: Profile) -> list[Overlap]:
467
483
  by_file: dict[str, list[int]] = {}
468
484
  for it in items:
469
485
  for f in it["files"]:
@@ -477,7 +493,7 @@ def compute_overlaps(items: list[PR], profile: Profile) -> list[dict[str, Any]]:
477
493
  return [{"a": a, "b": b, "files": files} for (a, b), files in sorted(pairs.items())]
478
494
 
479
495
 
480
- def plan_sessions(items: list[PR], profile: Profile, *, budget: int = 60) -> list[dict[str, Any]]:
496
+ def plan_sessions(items: list[PR], profile: Profile, *, budget: int = 60) -> list[PlanSession]:
481
497
  """Pack ready PRs into ~budget-minute sessions, one component per session to limit context switching."""
482
498
  groups: dict[str, list[PR]] = {}
483
499
  for it in items:
@@ -508,7 +524,9 @@ def plan_sessions(items: list[PR], profile: Profile, *, budget: int = 60) -> lis
508
524
  ]
509
525
 
510
526
 
511
- def whats_new(previous: dict[str, Any] | None, items: list[PR], ledger: dict[str, Any], viewer: str) -> dict[str, Any]:
527
+ def whats_new(
528
+ previous: dict[str, Any] | None, items: Sequence[Mapping[str, Any]], ledger: dict[str, Any], viewer: str
529
+ ) -> dict[str, Any]:
512
530
  """Summarize what changed since the previous build. Drives the dashboard banner and ``--open auto``."""
513
531
  if not previous:
514
532
  return {"since": None, "opened": [], "closed": [], "needs_you": [], "changed_after_review": []}
@@ -41,39 +41,40 @@ In the commands below, `R` stands for `--repo OWNER/NAME`.
41
41
  ### Phase 0: Prepare (silent)
42
42
 
43
43
  1. `readthrough R profile show`. This is the repo's architecture profile: its layers and components, where its component contracts live, its review guidance, and its test command. Follow the review guidance throughout.
44
- 2. `readthrough R brief N`. If the PR isn't found or the brief looks stale, run `readthrough R build --no-diffs` first. The brief's last section, **Study log**, holds evidence the user has already built, possibly from studying in the dashboard: predictions, quiz answers with verdicts, teach-backs, findings. Use it, starting with its **Handoff** line. Don't re-ask what they've already shown they understand; spend the time on what they got partial or wrong, and on unanswered questions.
45
- 3. `readthrough R worktree N`. This prints the worktree path, head SHA, merge-base, and the diff command. The user's own checkout is never touched. If the head SHA differs from the brief's, say so: the PR moved.
44
+ 2. `readthrough R brief N`. If the PR isn't found or the brief looks stale, run `readthrough R build --no-diffs` first. The brief's last section, **Study log**, holds evidence the user has already built, possibly from studying in the dashboard: predictions, quiz answers with verdicts, teach-backs, findings. Use it, starting with its **Handoff** line. Don't re-ask what they've already shown they understand; spend the time on what they got partial or wrong, and on unanswered questions. Evidence the Handoff puts *before the latest commits* is a starting point, not proof: check what changed since (`git diff <that sha> HEAD -- <its refs>` in the worktree) before you skip it.
45
+ 3. `readthrough R worktree N`. This prints the worktree path, head SHA, merge-base, and the diff command. The user's own checkout is never touched. If the head SHA differs from the brief's, say so: the PR moved. Every `readthrough R study N` command below takes `--head <that sha>`, so what you record is about the commit you both read.
46
46
  4. Read the full diff, the rule files listed under "Rules that apply", and the contract sections the brief quotes. For anything non-trivial, also read the callers of changed public functions (`git grep` in the worktree).
47
47
  5. Silently form your own review: correctness bugs, responsibility bleed against the components' "does not own" lists, rule violations, and test adequacy (would the tests fail on the base branch?). Rank your top 1-3. Write them to the session workspace and **don't show them yet**.
48
48
 
49
49
  ### Phase 1: Predict
50
50
 
51
- Show only the title, a 2-3 line summary of the author's description, and the components touched. Ask: *"Before we look at code, what do you think the riskiest part of this change is, and what test would you want to see?"* Record the answer in the study log, in their words: `readthrough R study N --prediction "<their answer>"`.
51
+ Show only the title, a 2-3 line summary of the author's description, and the components touched. Ask: *"Before we look at code, what do you think the riskiest part of this change is, and what test would you want to see?"* Record the answer in the study log, in their words: `readthrough R study N --prediction "<their answer>" --head <sha>`.
52
52
 
53
53
  ### Phase 2: Guided walk
54
54
 
55
55
  Follow the brief's reading order, in chunks of at most about 5 files. For each chunk:
56
56
  - Explain the **intent** in 2-3 sentences: why it changed, not a narration of the diff.
57
57
  - Show the 1-2 most important hunks with `path:line`.
58
- - Ask **one** check question tied to a component contract or an applicable rule. For example: "This module now writes to the database. Which component should own persistence?" Or: "What happens in this branch if the list is empty?"
59
- - If the answer is wrong or vague, give a hint, not the answer. After a second miss, explain briefly and move on.
58
+ - Ask **one** check question tied to a component contract or an applicable rule. For example: "This module now writes to the database. Which component should own persistence?" Or: "What happens in this branch if the list is empty?" Record it first: `readthrough R study N --question "<question>" --focus <intent|control-flow|responsibility|unhappy-path|tests|risk> --ref path:line --expect "<what a good answer covers>" --by model --head <sha>`, which prints its id (`Q3`). Add `--model <name>` if you know which model you are.
59
+ - Record their answer in their words: `readthrough R study N --answer Q3 "<their answer>" --head <sha>`, then your judgement: `readthrough R study N --assess Q3 <correct|partial|incorrect> "<one to three sentences>" --evidence path:line --by model --head <sha>`.
60
+ - If the answer is wrong or vague, give a hint, not the answer, and record the hint before you give it: `readthrough R study N --hint Q3 "<the hint>" --by model --head <sha>`. An answer after a hint is marked as aided only if the hint is in the log. After a second miss, explain briefly and move on.
60
61
 
61
62
  Tie the change to code the user already knows (base classes, sibling implementations) using `git grep` in the worktree.
62
63
 
63
64
  ### Phase 3: Teach-back
64
65
 
65
- Ask the user to explain the whole PR in 3-4 sentences as if they were briefing a teammate. Record it with `readthrough R study N --teachback "<their words>"`. Name the specific gaps (a missed component, misunderstood control flow). If a gap matters, walk that part again.
66
+ Ask the user to explain the whole PR in 3-4 sentences as if they were briefing a teammate. Record it with `readthrough R study N --teachback "<their words>" --head <sha>`. Name the specific gaps (a missed component, misunderstood control flow), and record your judgement: `readthrough R study N --assess-teachback <correct|partial|incorrect> "<feedback>" --gap "<gap>" --by model --head <sha>`, one `--gap` each. If a gap matters, walk that part again.
66
67
 
67
68
  ### Phase 4: Critique duel
68
69
 
69
70
  1. Ask: *"What are your concerns, if any? List them before I share mine."*
70
71
  2. Show your Phase 0 findings side by side with theirs, grouped as **both found**, **only you**, **only me**. For each "only me" item, give the evidence (`path:line` and the rule or contract) so the user can disagree.
71
72
  3. Settle disputed points empirically when that's cheap. Use the profile's test command (from `profile show`) in the worktree; the profile's review guidance says how to make sure the tests run the PR's code, not the user's checkout. To check whether the PR's tests actually exercise the change, run them against the merge-base source too.
72
- 4. Record each finding the user agreed with: `readthrough R study N --finding "major: <one line>" --at path:line --by model` (severities: blocker, major, minor, question; `model` means you, the agent, wrote it). Use `--by you` for ones the user raised.
73
+ 4. Record each finding the user agreed with: `readthrough R study N --finding "major: <one line>" --at path:line --by model --head <sha>` (severities: blocker, major, minor, question; `model` means you, the agent, wrote it). Use `--by you` for ones the user raised.
73
74
 
74
75
  ### Phase 5: Draft and decide
75
76
 
76
- 1. Draft review comments **only** for points the user agreed with, in their voice, each anchored to `path:line`. Aim for 2-3 high-signal comments, not 15.
77
+ 1. Draft review comments **only** for points the user agreed with, in their voice, each anchored to `path:line`. Aim for 2-3 high-signal comments, not 15. A finding the study log marks as at an earlier commit has an earlier line number: find where that code is now before anchoring a comment to it.
77
78
  2. Ask for the verdict: comment, approve, request changes, or not yet.
78
79
  3. On explicit confirmation, post the review. On GitHub: `gh pr review N -R OWNER/NAME --comment|--approve|--request-changes --body-file <file>`; for inline comments, `gh api repos/OWNER/NAME/pulls/N/reviews` with a `comments` array; if `readthrough config` shows an `account` for the repo, run `gh` as that account (`$env:GH_TOKEN = gh auth token --user <account>`). On GitLab use `glab mr note` / `glab mr approve`; on Azure DevOps `az repos pr set-vote` and `az repos pr update`; on Forgejo, hand the user the drafted comments to post, since there is no signed-in CLI to post through.
79
80
  4. Record the outcome. The ledger pins it to the head SHA, so new commits flag the PR again. If the live dashboard is open, the PR ticks off there within a few seconds:
@@ -73,6 +73,7 @@ main{padding:18px 20px}body.drawer-open main{margin-right:var(--drawer-w,560px)}
73
73
  .sess.live{background:var(--ready);animation:pulse 1.6s infinite}
74
74
  @keyframes pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--ready) 60%,transparent)}70%{box-shadow:0 0 0 6px transparent}100%{box-shadow:0 0 0 0 transparent}}
75
75
  .score{font-size:11.5px;padding:0 7px;border-radius:999px;background:var(--subtle);border:1px solid var(--line);color:var(--mut);margin-left:4px}
76
+ .score.earlier,.tag.earlier{border-style:dashed;opacity:.8}
76
77
  .cib{display:inline-block;min-width:18px;text-align:center;font-size:12px;font-weight:700;border-radius:999px;padding:0 6px;margin-left:4px;border:1px solid var(--line);color:var(--mut)}
77
78
  .cib.failing{color:var(--bad);border-color:color-mix(in srgb,var(--bad) 50%,transparent)}
78
79
  .cib.failing-optional,.cib.not-run{color:var(--warn);border-color:color-mix(in srgb,var(--warn) 50%,transparent)}