readthrough 0.4.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.4.0 → readthrough-0.6.0}/AGENTS.md +30 -11
  2. {readthrough-0.4.0 → readthrough-0.6.0}/CHANGELOG.md +109 -2
  3. readthrough-0.6.0/CONTRIBUTING.md +39 -0
  4. {readthrough-0.4.0 → readthrough-0.6.0}/PKG-INFO +11 -4
  5. {readthrough-0.4.0 → readthrough-0.6.0}/README.md +10 -3
  6. {readthrough-0.4.0 → readthrough-0.6.0}/docs/guide.md +27 -10
  7. {readthrough-0.4.0 → readthrough-0.6.0}/docs/maintaining.md +15 -12
  8. {readthrough-0.4.0 → readthrough-0.6.0}/pyproject.toml +11 -4
  9. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/agents.py +6 -0
  10. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/analyze.py +38 -20
  11. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/SKILL.md +11 -8
  12. readthrough-0.6.0/src/readthrough/assets/extension/extension.mjs +96 -0
  13. readthrough-0.6.0/src/readthrough/assets/extension/readthrough.mjs +185 -0
  14. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/web/dashboard.css +4 -1
  15. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/web/dashboard.js +92 -24
  16. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/web/setup.css +1 -0
  17. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/web/setup.js +10 -1
  18. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/web/theme.css +2 -0
  19. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assistants.py +172 -126
  20. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/brief.py +8 -5
  21. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/build.py +8 -80
  22. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/ci.py +48 -31
  23. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/cli.py +327 -95
  24. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/contract.py +49 -28
  25. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/engine.py +69 -49
  26. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/forges/__init__.py +29 -7
  27. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/forges/azure_devops.py +65 -9
  28. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/forges/gitlab.py +2 -2
  29. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/model.py +15 -6
  30. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/onboard_model.py +15 -9
  31. readthrough-0.6.0/src/readthrough/pages.py +84 -0
  32. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/registry.py +1 -1
  33. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/review.py +64 -14
  34. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/runtimes/__init__.py +37 -13
  35. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/runtimes/anthropic.py +12 -7
  36. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/runtimes/copilot.py +7 -7
  37. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/runtimes/openai.py +12 -7
  38. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/serve.py +114 -31
  39. readthrough-0.6.0/src/readthrough/study.py +488 -0
  40. readthrough-0.6.0/src/readthrough/system.py +702 -0
  41. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/web_setup.py +45 -23
  42. {readthrough-0.4.0 → readthrough-0.6.0}/tests/conftest.py +41 -0
  43. readthrough-0.6.0/tests/fixtures/forges/ado/50a19c82ea7a.json +9 -0
  44. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/index.json +5 -0
  45. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_assistants.py +132 -81
  46. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_browser.py +213 -16
  47. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_ci.py +5 -5
  48. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_cli.py +249 -5
  49. readthrough-0.6.0/tests/test_commit_messages.py +77 -0
  50. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_contract.py +6 -6
  51. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_engine.py +54 -34
  52. readthrough-0.6.0/tests/test_extension.py +76 -0
  53. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_forges.py +110 -0
  54. readthrough-0.6.0/tests/test_layers.py +107 -0
  55. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_onboard_model.py +10 -10
  56. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_review.py +23 -0
  57. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_runtimes.py +33 -35
  58. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_serve.py +106 -13
  59. readthrough-0.6.0/tests/test_study.py +347 -0
  60. readthrough-0.6.0/tests/test_system.py +326 -0
  61. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_vendor.py +1 -1
  62. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_web_setup.py +11 -1
  63. readthrough-0.4.0/src/readthrough/study.py +0 -327
  64. readthrough-0.4.0/src/readthrough/system.py +0 -205
  65. readthrough-0.4.0/tests/test_study.py +0 -282
  66. readthrough-0.4.0/tests/test_system.py +0 -157
  67. {readthrough-0.4.0 → readthrough-0.6.0}/.gitignore +0 -0
  68. {readthrough-0.4.0 → readthrough-0.6.0}/LICENSE +0 -0
  69. {readthrough-0.4.0 → readthrough-0.6.0}/docs/profiles.md +0 -0
  70. {readthrough-0.4.0 → readthrough-0.6.0}/examples/README.md +0 -0
  71. {readthrough-0.4.0 → readthrough-0.6.0}/examples/custom_profile_source.py +0 -0
  72. {readthrough-0.4.0 → readthrough-0.6.0}/examples/offline_analysis.py +0 -0
  73. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/__init__.py +0 -0
  74. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/__main__.py +0 -0
  75. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/defaults.toml +0 -0
  76. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/profile-reference.md +0 -0
  77. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/README.md +0 -0
  78. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/cose-base.js +0 -0
  79. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/cytoscape-fcose.js +0 -0
  80. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/cytoscape.min.js +0 -0
  81. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/layout-base.js +0 -0
  82. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/cose-base-LICENSE +0 -0
  83. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/cytoscape-LICENSE +0 -0
  84. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/cytoscape-fcose-LICENSE +0 -0
  85. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/dompurify-LICENSE +0 -0
  86. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/layout-base-LICENSE +0 -0
  87. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/lucide-LICENSE +0 -0
  88. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/licenses/marked-LICENSE +0 -0
  89. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/lucide-icons.js +0 -0
  90. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/marked.umd.js +0 -0
  91. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/vendor/purify.min.js +0 -0
  92. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/web/dashboard.html +0 -0
  93. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/assets/web/setup.html +0 -0
  94. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/config.py +0 -0
  95. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/faults.py +0 -0
  96. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/files.py +0 -0
  97. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/forges/forgejo.py +0 -0
  98. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/forges/github.py +0 -0
  99. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/ledger.py +0 -0
  100. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/limits.py +0 -0
  101. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/logs.py +0 -0
  102. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/membership.py +0 -0
  103. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/onboard.py +0 -0
  104. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/process.py +0 -0
  105. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/profile.py +0 -0
  106. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/py.typed +0 -0
  107. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/rules.py +0 -0
  108. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/terminals.py +0 -0
  109. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/tuning.py +0 -0
  110. {readthrough-0.4.0 → readthrough-0.6.0}/src/readthrough/usage.py +0 -0
  111. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fake_gh.py +0 -0
  112. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fakes.py +0 -0
  113. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/courier.toml +0 -0
  114. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/README.md +0 -0
  115. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/03be324e4f9e.json +0 -0
  116. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/090629072c7e.json +0 -0
  117. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/0e1fe07a4beb.json +0 -0
  118. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/21609ce43570.json +0 -0
  119. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/23c144c8cae2.json +0 -0
  120. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/2f67f0784d3f.json +0 -0
  121. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/4b737519e721.json +0 -0
  122. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/7f26382a26ef.json +0 -0
  123. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/9221b6d0840a.json +0 -0
  124. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/92c5290eaff1.json +0 -0
  125. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/e71b9e3fc4c0.json +0 -0
  126. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/f3509478d4d7.json +0 -0
  127. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/ado/fc6b5e815e82.json +0 -0
  128. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/0cebf0b65aa5.json +0 -0
  129. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/165113c4eabe.json +0 -0
  130. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/26c499a0bd6b.json +0 -0
  131. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/274a37d8bb25.json +0 -0
  132. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/2e89d19be1f1.json +0 -0
  133. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/39bdce47eea5.json +0 -0
  134. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/4101cf99b3ab.json +0 -0
  135. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/4b5a777cdf98.json +0 -0
  136. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/59c71da3f041.json +0 -0
  137. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/5a273c90feeb.json +0 -0
  138. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/5c250e7135fc.json +0 -0
  139. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/5dd2f033485b.json +0 -0
  140. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/649b79bcdb19.json +0 -0
  141. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/6a44ccb778e2.json +0 -0
  142. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/9389f28310ef.json +0 -0
  143. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/963f7a37840f.json +0 -0
  144. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/a1dcb3f2df5a.json +0 -0
  145. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/a467e70e374c.json +0 -0
  146. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/aad3937bc2be.json +0 -0
  147. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/abf7a246a063.json +0 -0
  148. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/ae2091aa681b.json +0 -0
  149. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/b3bcdf26f5f2.json +0 -0
  150. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/c5f794f6d12a.json +0 -0
  151. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/e97f70ce7e2e.json +0 -0
  152. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/ee76ff2b2aa7.json +0 -0
  153. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/fcd900fc02ac.json +0 -0
  154. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/forgejo/index.json +0 -0
  155. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/03addf8039b3.json +0 -0
  156. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/054a7bf76049.json +0 -0
  157. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/05a1a7170d04.json +0 -0
  158. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/0603a56f5c6e.json +0 -0
  159. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/1faa33d3d89d.json +0 -0
  160. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/2214b16b333f.json +0 -0
  161. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/229ccc31e324.json +0 -0
  162. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/235e10ac50b2.json +0 -0
  163. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/26c82541d833.json +0 -0
  164. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/293c168adbb5.json +0 -0
  165. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/3a0f3d9a23f8.json +0 -0
  166. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/4f32035198bb.json +0 -0
  167. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/5a7f9f9571ba.json +0 -0
  168. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/5d53ec48c954.json +0 -0
  169. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/6c9d9aaf4865.json +0 -0
  170. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/6d0b7f56058c.json +0 -0
  171. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/6e76cb3a29c6.json +0 -0
  172. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/6f7a226c9418.json +0 -0
  173. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/788d7a59a435.json +0 -0
  174. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/87847cd77255.json +0 -0
  175. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/9159d1034171.json +0 -0
  176. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/93514ae445cf.json +0 -0
  177. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/995df583d679.json +0 -0
  178. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/a103f9259efe.json +0 -0
  179. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/ba7bbd8d7f4d.json +0 -0
  180. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/c0d36d9d5385.json +0 -0
  181. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/cb31d203bf57.json +0 -0
  182. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/d9cf27bbda67.json +0 -0
  183. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/e56b428bb2c2.json +0 -0
  184. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/fe1e852021c5.json +0 -0
  185. {readthrough-0.4.0 → readthrough-0.6.0}/tests/fixtures/forges/gitlab/index.json +0 -0
  186. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_agents.py +0 -0
  187. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_analyze.py +0 -0
  188. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_e2e.py +0 -0
  189. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_examples.py +0 -0
  190. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_github_faults.py +0 -0
  191. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_jitter.py +0 -0
  192. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_ledger_config.py +0 -0
  193. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_onboard.py +0 -0
  194. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_profile.py +0 -0
  195. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_registry.py +0 -0
  196. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_rules.py +0 -0
  197. {readthrough-0.4.0 → readthrough-0.6.0}/tests/test_tuning.py +0 -0
@@ -14,16 +14,17 @@ uv run pytest tests/test_engine.py -q # one file; -k NAME for one test; -m e2
14
14
  uv run readthrough --help # the CLI from the checkout
15
15
  uv build # sdist and wheel into dist/
16
16
  uvx zizmor .github/workflows # lint the workflows; a required check, so keep it clean
17
- git config core.hooksPath .githooks # once per clone: --quick before every commit; push only main, release/*, v* tags
17
+ git config core.hooksPath .githooks # once per clone: runs --quick before every commit
18
18
  uv run python scripts/screenshots.py --repo microsoft/vscode --pr N # redraw docs/img/*.webp from a built repo
19
+ uv run python scripts/screenshot_canvas.py --repo microsoft/PyRIT --pr N # the VS Code canvas shot (Windows; a real session)
19
20
  ```
20
21
 
21
22
  CI (`ci.yml`) runs the same gate through the reusable `test.yml` on Linux, macOS, and Windows for every Python
22
- in its matrix, and sums it up in `gate`; `gate` and `zizmor` (the workflow linter) are the two checks the branch
23
- ruleset requires. The local gate is one cell of that matrix: CI adds the other platforms and Pythons, refuses a
23
+ in its matrix, and sums it up in `gate`; `gate`, `zizmor` (the workflow linter), and `commits` (Conventional Commits on the PR title and each commit) are the checks the branch
24
+ ruleset requires, and a change reaches `main` through a pull request the maintainer (the code owner) has approved, up to date with `main` and rebased or squashed so the history stays linear. Work in progress lives on `dev/<your login>/<topic>` branches, the one namespace a collaborator can create on the repository; they take no checks and may be rewritten freely. The local gate is one cell of that matrix: CI adds the other platforms and Pythons, refuses a
24
25
  stale `uv.lock` (`UV_LOCKED`), and lints the workflows, so run `uv lock` after changing dependencies and
25
- `uvx zizmor` after touching `.github/`. The browser tests skip locally when no Chromium-family browser is
26
- installed; on CI they fail instead, since the hosted runners have one. A release is a `vX.Y.Z` tag on `main`:
26
+ `uvx zizmor` after touching `.github/`. The browser tests run on Playwright's own Chromium (`uv run playwright install chromium`, once), the same
27
+ engine CI uses, else an installed Edge or Chrome; they skip when there is none, and on CI they fail instead. A release is a `vX.Y.Z` tag on `main`:
27
28
  `release.yml` runs the gate again and, after the maintainer approves, publishes to PyPI and GitHub
28
29
  (`docs/maintaining.md`, "Releasing").
29
30
 
@@ -81,19 +82,35 @@ installed; on CI they fail instead, since the hosted runners have one. A release
81
82
  the entry, never from the current config. No brand names in `by` or in the UI: the engine is named by what
82
83
  it is. Older logs say `by: copilot`, the assistant's former name; `study.load` reads it as `model` and claims
83
84
  no runtime for it, and the file is never rewritten. Answers are tagged with the aids that preceded them
84
- (`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.
85
87
  - **Model usage goes to the ledger (`usage.py`), in the provider's units.** One line per call, idempotent
86
88
  by call id; tokens, Copilot's multiplier, and AI credits stay separate, a dollar figure must name its price
87
89
  table, and nothing unreported is written as zero. `billed_to` says whose account paid.
88
90
  - **The pages are one served file.** `assets/web/` holds separate `.html`, `.css`, `.js` for editing;
89
- `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.
90
92
  No inline `onclick=`; third-party HTML goes through DOMPurify. Vendored JS lives in `assets/vendor/` with
91
- its license and is listed in `build.VENDOR_SCRIPTS`.
93
+ its license and is listed in `pages.VENDOR_SCRIPTS`.
92
94
  - **What crosses between page and server is declared in `contract.py`** (the payload, the SSE events, the
93
95
  study API) and `test_contract.py` checks both sides: a build has exactly those shapes, the page reads nothing
94
96
  else. Events are notifications; a GET is the truth, and after any gap (`hello` with a new instance, `resync`,
95
- a reconnect) the page re-fetches what it holds. Shared files (study logs, the ledger) are read and written
96
- under `files.locked`, which also holds against another process.
97
+ a reconnect) the page re-fetches what it holds. The one exception is `focus`, a request to show a PR that a
98
+ missed delivery rightly loses. Shared files (study logs, the ledger) are read and written under
99
+ `files.locked`, which also holds against another process.
100
+ - **Programs drive the server through the CLI, never the page's API.** `serve.json` in the home records the
101
+ running server (port, instance, token) for programs of the same user; `readthrough show` reads it to steer
102
+ open pages, and `repos --json` reports it. The Copilot canvas (`assets/extension/`, two ES modules the Copilot
103
+ runtime loads, installed by `install canvas`) is a client of the CLI alone: it runs the interpreter that
104
+ installed it with an argument list from a fixed directory, reads, steers, and writes nothing to the log or the
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.
97
114
  - **Lint is `ruff` with `select = ["ALL"]`** and an ignore list that states each reason in `pyproject.toml`.
98
115
  Suppress per file (with a reason) rather than per line where a whole file legitimately differs. Types are
99
116
  checked by `ty`, pinned exactly; bump it deliberately.
@@ -109,4 +126,6 @@ installed; on CI they fail instead, since the hosted runners have one. A release
109
126
  builds what gets published uses no package cache (the test jobs may: a coverage report isn't shipped);
110
127
  in-repo workflows are called as `$/.github/workflows/<file>` so they count as pinned. `.github/zizmor.yml`
111
128
  holds the policy and the `zizmor` job fails on any finding.
112
- - **Commits** are one logical change each, with a message a person would write, and no trailers.
129
+ - **Commits** are one logical change each. The subject is Conventional Commits, `type(scope): description`
130
+ (`CONTRIBUTING.md` lists the types; `scripts/commit_messages.py --range origin/main..HEAD` checks what you're
131
+ about to propose); the body is prose a person would write, and there are no trailers.
@@ -1,5 +1,112 @@
1
1
  # Changelog
2
2
 
3
+ 0.4.0 is the first published version; the entries before it are the project's history from before it was public.
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
+
53
+ ## 0.5.0 (2026-11-04)
54
+
55
+ ### Added
56
+
57
+ - The dashboard beside an agent session, as a Copilot canvas (experimental): `readthrough install canvas` adds
58
+ a small Copilot extension that shows the live dashboard next to the chat in VS Code's Agents window and lets
59
+ the agent point it at a PR: on the architecture map alone before the reviewer has predicted, then its brief,
60
+ overview, or study log. Beside a session the page hides the buttons that would start another review and shows
61
+ the study log without a second composer. The extension only runs the `readthrough` CLI, with the interpreter
62
+ that installed it; `doctor` reports a stale copy; `uninstall canvas` removes what was installed, and
63
+ `readthrough install` offers it wherever the Copilot CLI is.
64
+ - `readthrough show N [--panel none|overview|study|brief]` points every open dashboard page (browser tabs and
65
+ canvases) at a PR, through a `focus` event the live server sends; `--client` addresses one page by the name it
66
+ gave on its event stream. The server records where it is in `serve.json` (port, instance, token) for programs
67
+ of the same user, and `/api/health` names its instance.
68
+ - `#map?pr=N` is a deep link to a PR's panel, `panel=` picks its tab, and opening or closing the panel keeps the
69
+ URL current, so any panel can be bookmarked or handed on.
70
+ - `readthrough repos --json`: the live server, the default repo, and each repo's slug and URL, for programs.
71
+ - `CONTRIBUTING.md`, and a check on every pull request that its title and each of its commits follow
72
+ Conventional Commits (`type(scope): description`). The grammar is `scripts/commit_messages.py`, which also
73
+ checks a range locally; Dependabot's pull requests carry `build(deps)` and `ci(deps)` prefixes so they pass.
74
+ The history before this isn't rewritten.
75
+ - `readthrough install` with nothing named sets up the machine in one go: it lists every piece that isn't set up
76
+ (each agent's review skill, the live server at logon, one-click links, the morning nudge), says what each does,
77
+ and asks; `--all` says yes to the recommended ones without asking, and outside a terminal it only reports. The
78
+ same table drives `doctor`, which now points at the one command when two or more pieces are missing, and the
79
+ setup page's side bar, which lists what is left to set up; onboarding ends with the same pointer.
80
+
81
+ ### Fixed
82
+
83
+ - Switching views no longer shifts the page sideways: the views differ in height, so the scrollbar came and went
84
+ with the tab and the layout moved by its width each time. The gutter is reserved now, on the page and in the
85
+ PR panel.
86
+
87
+ ### Changed
88
+
89
+ - Work in progress goes on `dev/<login>/<topic>` branches: the one place a collaborator can create a branch on the
90
+ repository, with no checks required and rewriting allowed. The repository's rulesets are the whole policy now;
91
+ the pre-push hook that kept other branches off the remote is gone.
92
+ - `doctor` reports a missing morning nudge and, on platforms without the automation, the link handler and the
93
+ logon task as optional rather than as problems: they are choices, and nothing is wrong without them.
94
+ - `repo_url` percent-encodes the slug, so a repo whose name has spaces (an Azure DevOps project) gets a URL a
95
+ program can use.
96
+ - The release pipeline marks a release as latest only when its version is the highest released, so a patch to
97
+ an older line doesn't take the badge from a newer one; and when a GitHub release already exists for the tag, it
98
+ is left alone only if it is in every respect (files, title, notes, flags) the one the run would have made, and
99
+ otherwise fails the run instead of lending its approval to someone else's release.
100
+ - The toolchain that builds a release is pinned: `uv` is the version the pinned `setup-uv` action ships a
101
+ checksum for, and the build backend is an exact build constraint in `pyproject.toml`.
102
+ - The documented provenance check names the signing workflow and the tag, not just the owner, so an attestation
103
+ from another workflow or branch no longer passes it.
104
+ - The page picks its view with a switch on the tab's name, so a name from the URL never selects a function by
105
+ lookup.
106
+ - The browser tests prefer Playwright's own Chromium, which CI now installs, so a developer's run and every CI
107
+ cell drive the same engine; an installed Edge or Chrome remains the fallback, and the test report names which
108
+ one ran.
109
+
3
110
  ## 0.4.0 (2026-10-30)
4
111
 
5
112
  ### Added
@@ -101,8 +208,8 @@
101
208
  warnings stay prominent. Its styling no longer spills onto a PR's active-session dot. Onboarding's
102
209
  read-only connection line expands to show the CLI or API and the ordered credential sources; the
103
210
  credential actually used is still shown after checking access.
104
- - The header puts the product first, the repo second, and the small print third: **readthrough / microsoft/vscode ·
105
- 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,
106
213
  still keyboard-reachable, laid invisibly over it); the connection is a status chip that reads live, refreshing,
107
214
  offline, or refresh failed, with the next check on hover, and the refresh button spins while a refresh runs
108
215
  instead of growing a label. The tabs no longer breathe while the indicator slides (a selected tab is bolder, so
@@ -0,0 +1,39 @@
1
+ # Contributing
2
+
3
+ Thanks for looking. The short version: work on a `dev/<your login>/<topic>` branch, open a pull request against
4
+ `main`, and give the pull request a Conventional Commits title. [AGENTS.md](AGENTS.md) has the exact commands,
5
+ including the gate to run before you push, and the conventions that aren't obvious; the maintainers' guide
6
+ (`docs/maintaining.md`) has the rest, and [SECURITY.md](SECURITY.md) says how to report a vulnerability.
7
+
8
+ ## Branches
9
+
10
+ `main` is what ships; `release/X.Y` carries a patch to an older line; `dev/<login>/<topic>` is where work in
11
+ progress lives, under your own GitHub login. Those are the only branch names the repository accepts (a ruleset
12
+ refuses others), and `dev/*` is yours to rebase or rewrite as you like. A change reaches `main` through a pull
13
+ request the maintainer has approved, rebased or squashed so the history stays linear.
14
+
15
+ ## Commit messages
16
+
17
+ Subjects follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/): `type(scope)!: description`.
18
+ A check on every pull request reads the title (a squash makes it the commit) and each commit's subject (a rebase
19
+ lands them as they are); `uv run python scripts/commit_messages.py --range origin/main..HEAD` runs the same check
20
+ locally.
21
+
22
+ - The **type** says what kind of change it is: `feat` (something new for users), `fix` (a bug), `docs`,
23
+ `refactor` (no change in behaviour), `test`, `build` (packaging and dependencies), `ci` (workflows and
24
+ checks), `chore` (nothing else fits; a formatting-only change is one, since ruff owns formatting), `perf`,
25
+ `revert`.
26
+ - The **scope** is optional, lowercase, and names the part touched: `canvas`, `serve`, `page`, `forges`,
27
+ `study`, `cli`, `release`, `deps`, or whatever reads best. Don't agonize over it.
28
+ - A **breaking change** carries `!` after the type or scope, and says what breaks in the body.
29
+ - The **description** says what the change does. Lowercase reads best after the colon, but it isn't checked:
30
+ Dependabot capitalizes, and the specification doesn't mind.
31
+ - The **body** is prose a person would write: what changed and why, the reasoning behind a choice, what was
32
+ considered and rejected. Wrap it at about 110 columns. No trailers.
33
+
34
+ ```text
35
+ fix(serve): refuse a focus for a PR that isn't open
36
+
37
+ The page would have shown a toast and moved on, but the caller had no way to tell the request was pointless.
38
+ The server now answers 404 for a number that isn't in the current payload, and `readthrough show` says so.
39
+ ```
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: readthrough
3
- Version: 0.4.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
@@ -37,7 +37,7 @@ Busy repos have fifty-plus open pull requests. I wanted two things from a queue
37
37
 
38
38
  readthrough does both, for repos on GitHub, GitLab, Forgejo (Codeberg), or Azure DevOps. It pulls the open PRs (the hundred most recently active by default; `limit` raises it) and places each on the repo's architecture (its layers and components), marking which ones come from outside contributors and which have CI trouble. It packs the reviewable ones into hour-long sessions grouped by component, then gives each PR a study brief.
39
39
 
40
- From there you can go two ways. A button on each PR starts a deep-review session in a terminal, in the GitHub Copilot CLI or Claude Code, where you predict what the PR does, answer questions about it, explain it back, and list your concerns before the agent shows you its own. Or you study it right in the dashboard: an assistant quizzes you on the change one question at a time and keeps everything you got right and wrong in an append-only study log that becomes part of the brief. Given a model (GitHub Copilot through the Copilot SDK, or Claude or GPT through their own APIs, including Azure OpenAI), the assistant reads the code and grades your answers; without one, a rules-based assistant asks the questions the repo's profile already carries and never pretends to grade.
40
+ From there you can go two ways. A button on each PR starts a deep-review session in a terminal, in the GitHub Copilot CLI or Claude Code, where you predict what the PR does, answer questions about it, explain it back, and list your concerns before the agent shows you its own. Or you study it right in the dashboard: an assistant quizzes you on the change one question at a time and keeps everything you got right and wrong in an append-only study log that becomes part of the brief. Given a model (GitHub Copilot through the Copilot SDK, or Claude or GPT through their own APIs, including Azure OpenAI), the assistant reads the code and grades your answers; without one, a rules-based assistant asks the questions the repo's profile already carries and never pretends to grade. In VS Code the two meet: the dashboard sits beside the deep-review session, steered by the agent, which puts the PR on the map before you predict and opens its brief after.
41
41
 
42
42
  ![The architecture map of microsoft/vscode, with each open PR placed on the component it changes most](https://raw.githubusercontent.com/spencrr/readthrough/main/docs/img/map.webp)
43
43
 
@@ -54,19 +54,23 @@ uv tool install "readthrough[study]" # from PyPI; drop [study] to skip
54
54
 
55
55
  readthrough onboard microsoft/vscode --accept # map the repo's architecture (edit the draft first if you like)
56
56
  readthrough build --open # fetch the PRs and open the dashboard
57
+ readthrough install # the rest, one question each: the agents' review skill, the VS Code canvas, the live server
57
58
  ```
58
59
 
59
60
  Repos elsewhere take a `--forge`: `readthrough onboard --forge forgejo forgejo/forgejo`, `--forge gitlab gitlab-org/cli`, or `--forge ado organization/project/repository`. Those are read through the platform's REST API, with a token from its own CLI (`glab`, `az`) or an environment variable when there is one, and anonymously otherwise, which is enough for public repos.
60
61
 
61
- That gives you a static dashboard you rebuild when you want. For one that stays fresh, run the live server (`readthrough serve`, or `readthrough install server` to start it at logon on Windows) and open <http://127.0.0.1:8765/>; with nothing onboarded yet it walks you through onboarding, with a model drafting the profile if you like. `readthrough install skill` teaches the review agents the deep-review routine, and `readthrough doctor` tells you what's missing.
62
+ That gives you a static dashboard you rebuild when you want. For one that stays fresh, run the live server (`readthrough serve`, or let `readthrough install` start it at logon on Windows) and open <http://127.0.0.1:8765/>; with nothing onboarded yet it walks you through onboarding, with a model drafting the profile if you like. `readthrough install` offers everything else readthrough can set up on your machine and asks about each (`--all` skips the questions); `readthrough doctor` tells you what's missing afterwards.
62
63
 
63
64
  ![Studying a vscode PR: the prediction, a question the model asked, the answer, and its verdict with evidence](https://raw.githubusercontent.com/spencrr/readthrough/main/docs/img/study.webp)
64
65
 
66
+ ![A deep review in VS Code's Agents window, with the dashboard beside it: the agent has placed the PR on the architecture map and asked for a prediction](https://raw.githubusercontent.com/spencrr/readthrough/main/docs/img/canvas.webp)
67
+
65
68
  ## Docs
66
69
 
67
70
  - [Using readthrough](https://github.com/spencrr/readthrough/blob/main/docs/guide.md): onboarding, the dashboard, deep reviews, studying, keeping it fresh, configuration, and troubleshooting.
68
71
  - [Writing a profile](https://github.com/spencrr/readthrough/blob/main/docs/profiles.md): how to describe a repo's architecture well, and how to share it.
69
72
  - [Maintaining readthrough](https://github.com/spencrr/readthrough/blob/main/docs/maintaining.md): the checks, error handling, logging, settings, plugins, and the pages' structure.
73
+ - [Contributing](CONTRIBUTING.md): branches, commit messages, and the checks a change goes through.
70
74
  - [Working on readthrough](AGENTS.md): the exact commands and the conventions that aren't obvious.
71
75
  - [Examples](examples/): runnable scripts, including one that needs nothing but the standard library.
72
76
  - [Changelog](CHANGELOG.md).
@@ -88,6 +92,7 @@ forges/ a registry of forge adapters: github (gh), gitlab, forgejo, az
88
92
  faults.py how outside calls fail, classified from a CLI's stderr or an HTTP status
89
93
  process.py running programs: UTF-8, timeouts, secrets that never reach a log
90
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
91
96
  analyze.py lanes, signals, line heuristics, overlaps, and the burn-down plan
92
97
  ci.py which checks are required, failing, or also failing on main
93
98
  brief.py the Markdown brief a reviewer reads before the diff
@@ -108,6 +113,8 @@ assets/web/ the pages as separate HTML, CSS, and JS, inlined into one serv
108
113
  assets/vendor/ Cytoscape, marked, DOMPurify, and Lucide icons, with their licenses
109
114
  ```
110
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
+
111
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).
112
119
 
113
120
  ## Development
@@ -120,4 +127,4 @@ git config core.hooksPath .githooks # once: run the checks before every com
120
127
  uv run python scripts/check.py # lint, format, types, and tests with the coverage floor
121
128
  ```
122
129
 
123
- The same gate runs in CI on Linux, macOS, and Windows for every supported Python. The browser tests use an installed Edge or Chrome; locally they skip without one, on CI they fail. See [SECURITY.md](https://github.com/spencrr/readthrough/blob/main/SECURITY.md) for what the tool trusts and how to report a vulnerability.
130
+ The same gate runs in CI on Linux, macOS, and Windows for every supported Python. The browser tests run on Playwright's Chromium (`uv run playwright install chromium`), or an installed Edge or Chrome; locally they skip without one, on CI they fail. See [SECURITY.md](https://github.com/spencrr/readthrough/blob/main/SECURITY.md) for what the tool trusts and how to report a vulnerability.
@@ -4,7 +4,7 @@ Busy repos have fifty-plus open pull requests. I wanted two things from a queue
4
4
 
5
5
  readthrough does both, for repos on GitHub, GitLab, Forgejo (Codeberg), or Azure DevOps. It pulls the open PRs (the hundred most recently active by default; `limit` raises it) and places each on the repo's architecture (its layers and components), marking which ones come from outside contributors and which have CI trouble. It packs the reviewable ones into hour-long sessions grouped by component, then gives each PR a study brief.
6
6
 
7
- From there you can go two ways. A button on each PR starts a deep-review session in a terminal, in the GitHub Copilot CLI or Claude Code, where you predict what the PR does, answer questions about it, explain it back, and list your concerns before the agent shows you its own. Or you study it right in the dashboard: an assistant quizzes you on the change one question at a time and keeps everything you got right and wrong in an append-only study log that becomes part of the brief. Given a model (GitHub Copilot through the Copilot SDK, or Claude or GPT through their own APIs, including Azure OpenAI), the assistant reads the code and grades your answers; without one, a rules-based assistant asks the questions the repo's profile already carries and never pretends to grade.
7
+ From there you can go two ways. A button on each PR starts a deep-review session in a terminal, in the GitHub Copilot CLI or Claude Code, where you predict what the PR does, answer questions about it, explain it back, and list your concerns before the agent shows you its own. Or you study it right in the dashboard: an assistant quizzes you on the change one question at a time and keeps everything you got right and wrong in an append-only study log that becomes part of the brief. Given a model (GitHub Copilot through the Copilot SDK, or Claude or GPT through their own APIs, including Azure OpenAI), the assistant reads the code and grades your answers; without one, a rules-based assistant asks the questions the repo's profile already carries and never pretends to grade. In VS Code the two meet: the dashboard sits beside the deep-review session, steered by the agent, which puts the PR on the map before you predict and opens its brief after.
8
8
 
9
9
  ![The architecture map of microsoft/vscode, with each open PR placed on the component it changes most](https://raw.githubusercontent.com/spencrr/readthrough/main/docs/img/map.webp)
10
10
 
@@ -21,19 +21,23 @@ uv tool install "readthrough[study]" # from PyPI; drop [study] to skip
21
21
 
22
22
  readthrough onboard microsoft/vscode --accept # map the repo's architecture (edit the draft first if you like)
23
23
  readthrough build --open # fetch the PRs and open the dashboard
24
+ readthrough install # the rest, one question each: the agents' review skill, the VS Code canvas, the live server
24
25
  ```
25
26
 
26
27
  Repos elsewhere take a `--forge`: `readthrough onboard --forge forgejo forgejo/forgejo`, `--forge gitlab gitlab-org/cli`, or `--forge ado organization/project/repository`. Those are read through the platform's REST API, with a token from its own CLI (`glab`, `az`) or an environment variable when there is one, and anonymously otherwise, which is enough for public repos.
27
28
 
28
- That gives you a static dashboard you rebuild when you want. For one that stays fresh, run the live server (`readthrough serve`, or `readthrough install server` to start it at logon on Windows) and open <http://127.0.0.1:8765/>; with nothing onboarded yet it walks you through onboarding, with a model drafting the profile if you like. `readthrough install skill` teaches the review agents the deep-review routine, and `readthrough doctor` tells you what's missing.
29
+ That gives you a static dashboard you rebuild when you want. For one that stays fresh, run the live server (`readthrough serve`, or let `readthrough install` start it at logon on Windows) and open <http://127.0.0.1:8765/>; with nothing onboarded yet it walks you through onboarding, with a model drafting the profile if you like. `readthrough install` offers everything else readthrough can set up on your machine and asks about each (`--all` skips the questions); `readthrough doctor` tells you what's missing afterwards.
29
30
 
30
31
  ![Studying a vscode PR: the prediction, a question the model asked, the answer, and its verdict with evidence](https://raw.githubusercontent.com/spencrr/readthrough/main/docs/img/study.webp)
31
32
 
33
+ ![A deep review in VS Code's Agents window, with the dashboard beside it: the agent has placed the PR on the architecture map and asked for a prediction](https://raw.githubusercontent.com/spencrr/readthrough/main/docs/img/canvas.webp)
34
+
32
35
  ## Docs
33
36
 
34
37
  - [Using readthrough](https://github.com/spencrr/readthrough/blob/main/docs/guide.md): onboarding, the dashboard, deep reviews, studying, keeping it fresh, configuration, and troubleshooting.
35
38
  - [Writing a profile](https://github.com/spencrr/readthrough/blob/main/docs/profiles.md): how to describe a repo's architecture well, and how to share it.
36
39
  - [Maintaining readthrough](https://github.com/spencrr/readthrough/blob/main/docs/maintaining.md): the checks, error handling, logging, settings, plugins, and the pages' structure.
40
+ - [Contributing](CONTRIBUTING.md): branches, commit messages, and the checks a change goes through.
37
41
  - [Working on readthrough](AGENTS.md): the exact commands and the conventions that aren't obvious.
38
42
  - [Examples](examples/): runnable scripts, including one that needs nothing but the standard library.
39
43
  - [Changelog](CHANGELOG.md).
@@ -55,6 +59,7 @@ forges/ a registry of forge adapters: github (gh), gitlab, forgejo, az
55
59
  faults.py how outside calls fail, classified from a CLI's stderr or an HTTP status
56
60
  process.py running programs: UTF-8, timeouts, secrets that never reach a log
57
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
58
63
  analyze.py lanes, signals, line heuristics, overlaps, and the burn-down plan
59
64
  ci.py which checks are required, failing, or also failing on main
60
65
  brief.py the Markdown brief a reviewer reads before the diff
@@ -75,6 +80,8 @@ assets/web/ the pages as separate HTML, CSS, and JS, inlined into one serv
75
80
  assets/vendor/ Cytoscape, marked, DOMPurify, and Lucide icons, with their licenses
76
81
  ```
77
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
+
78
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).
79
86
 
80
87
  ## Development
@@ -87,4 +94,4 @@ git config core.hooksPath .githooks # once: run the checks before every com
87
94
  uv run python scripts/check.py # lint, format, types, and tests with the coverage floor
88
95
  ```
89
96
 
90
- The same gate runs in CI on Linux, macOS, and Windows for every supported Python. The browser tests use an installed Edge or Chrome; locally they skip without one, on CI they fail. See [SECURITY.md](https://github.com/spencrr/readthrough/blob/main/SECURITY.md) for what the tool trusts and how to report a vulnerability.
97
+ The same gate runs in CI on Linux, macOS, and Windows for every supported Python. The browser tests run on Playwright's Chromium (`uv run playwright install chromium`), or an installed Edge or Chrome; locally they skip without one, on CI they fail. See [SECURITY.md](https://github.com/spencrr/readthrough/blob/main/SECURITY.md) for what the tool trusts and how to report a vulnerability.
@@ -12,7 +12,7 @@ Install it as a uv tool so `readthrough` is on your PATH. `[study]` adds the Cop
12
12
  uv tool install "readthrough[study]"
13
13
  ```
14
14
 
15
- Releases on PyPI are built by the repository's release workflow from a tagged commit, with signed provenance; `gh attestation verify <downloaded file> --owner spencrr` checks one. For the latest `main` instead, install from the repository: `uv tool install "readthrough[study] @ git+https://github.com/spencrr/readthrough"`.
15
+ Releases on PyPI are built by the repository's release workflow from a tagged commit, with signed provenance; `gh attestation verify <downloaded file> -R spencrr/readthrough --signer-workflow spencrr/readthrough/.github/workflows/release.yml --source-ref refs/tags/vX.Y.Z` checks one. For the latest `main` instead, install from the repository: `uv tool install "readthrough[study] @ git+https://github.com/spencrr/readthrough"`.
16
16
 
17
17
  To work on the tool itself, clone it and install it editable, so edits take effect right away:
18
18
 
@@ -23,12 +23,17 @@ uv tool install -e "~/src/readthrough[study]"
23
23
 
24
24
  If the live server is running, stop it before reinstalling (`readthrough uninstall server`, then `install server` again afterwards). Windows won't let uv replace files the server has open.
25
25
 
26
- Then run the installers. Each one is optional and can be undone with `readthrough uninstall <same thing>`.
26
+ Then run `readthrough install`. With nothing named it goes through everything readthrough can set up on this machine that isn't set up yet, says what each piece does, and asks; `--all` says yes to every recommended piece without asking (the morning nudge isn't one: it opens a browser on a timer, so it stays a question, or `readthrough install schedule`). In a script, or anywhere that isn't a terminal, `readthrough install` without `--all` only lists what it would do. Each piece can also be installed on its own, and undone with `readthrough uninstall <same thing>`:
27
27
 
28
28
  - `readthrough install skill` copies the deep-review instructions into each installed agent's skill directory: `~/.agents/skills/readthrough` for the Copilot CLI and VS Code's agent sessions, `~/.claude/skills/readthrough` for Claude Code (`--agent claude` for just one). Re-run it after pulling changes; `doctor` warns you when an installed copy is out of date.
29
29
  - `readthrough install server` starts the live dashboard now and again every time you log in. Open it with `readthrough open`, or bookmark <http://127.0.0.1:8765/>.
30
30
  - `readthrough install schedule` creates a Task Scheduler entry that refreshes every repo in the morning and opens the dashboard when something needs you. More on this below.
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
+ - `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
+
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.
32
37
 
33
38
  None of this does anything until you onboard a repo. With the server running, its front page takes you to onboarding.
34
39
 
@@ -252,6 +257,16 @@ Sessions are linked to their PR wherever they started. Every prompt readthrough
252
257
 
253
258
  To burn down a whole session, ask Copilot for "burn down session 2 of OWNER/NAME". It gives you a quick overview of how the PRs in that session relate, then runs the routine for each one.
254
259
 
260
+ ### The dashboard beside the session (experimental)
261
+
262
+ In VS Code's Agents window a session can have *canvases*: pages shown beside the chat that the agent can open and steer. `readthrough install canvas` adds one that shows the live dashboard, so the map, a PR's panel, and its study log sit next to the deep review instead of in a browser tab you keep switching to. It needs the live dashboard running (`readthrough serve`, or `readthrough install server` to keep it running), and it appears after the Agents window reloads its extensions.
263
+
264
+ The agent opens the canvas on a repo and points it: in the predict phase it places the PR on the architecture map without opening anything (the map narrows to that one PR, so you see which components it touches and nothing more), and once you've committed it opens the brief, the overview, or the study log. The same page, a browser tab included, answers to `readthrough show 2897` (`--panel none|overview|study|brief`), which is all the agent does. Beside a session the page knows that the session is the deep review: the buttons that would start another one are hidden, and the Study tab shows the log the session writes to rather than a second composer.
265
+
266
+ ![The dashboard beside a deep-review session in VS Code's Agents window, narrowed to the one PR under review](img/canvas.webp)
267
+
268
+ The canvas is a small Copilot extension (two JavaScript files the Copilot runtime loads, under `~/.copilot/extensions/readthrough/`) that only runs the `readthrough` CLI; it records which interpreter installed it, so it keeps working when the editor's PATH doesn't have `readthrough`. `readthrough doctor` says whether the installed copy matches the version you have; `readthrough uninstall canvas` removes exactly what was installed. The canvas API is experimental in the Copilot SDK, so this part of readthrough is too.
269
+
255
270
  ## Studying a PR
256
271
 
257
272
  The deep review is a long, guided conversation in a terminal. The **Study** tab in the PR panel is the lighter version, right in the dashboard, for building understanding a question at a time. It needs the live dashboard.
@@ -292,13 +307,13 @@ It's one conversation with a single box underneath, and a small indicator at the
292
307
 
293
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.
294
309
 
295
- 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.
296
311
 
297
- **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.
298
313
 
299
- **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.
300
315
 
301
- 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.
302
317
 
303
318
  ### Why a link handler?
304
319
 
@@ -425,7 +440,7 @@ host = "codeberg.org"
425
440
 
426
441
  gitlab.com throttles anonymous API use per IP address quite hard, so a token (or `glab auth login`) makes a real difference there.
427
442
 
428
- 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:
429
444
 
430
445
  ```sh
431
446
  az login --tenant <tenant id> --allow-no-subscriptions --scope 499b84ac-1321-427f-aa17-267ca6975798/.default
@@ -486,7 +501,7 @@ Every command except `onboard`, `repos`, `default`, `remove`, `install`, `uninst
486
501
  | Command | What it does |
487
502
  | --- | --- |
488
503
  | `onboard OWNER/NAME [--forge F] [--clone P] [--account A] [--assisted] [--update] [--preview] [--accept] [--force]` | Draft, check, preview, and accept a repo's profile |
489
- | `repos` | List the repos you've onboarded |
504
+ | `repos [--json]` | List the repos you've onboarded (`--json` for programs: the live server, each repo's URL) |
490
505
  | `default OWNER/NAME` | Set the default repo |
491
506
  | `remove OWNER/NAME [--purge]` | Stop tracking a repo |
492
507
  | `profile [show\|check\|sources\|path\|export] [--file F]` | Look at, check, or export the repo's profile |
@@ -494,12 +509,14 @@ Every command except `onboard`, `repos`, `default`, `remove`, `install`, `uninst
494
509
  | `build [--all] [--open [auto\|always\|never]] [--no-diffs]` | Fetch, analyze, and write the snapshot and briefs |
495
510
  | `open` | Open the dashboard (live if the server is up) |
496
511
  | `brief N [--path]` | Print a PR's study brief |
512
+ | `show N [--panel none\|overview\|study\|brief] [--client ID] [--wait S]` | Point every open dashboard page at a PR |
497
513
  | `review N [--fresh] [--here] [--vscode] [--print]` | Start or resume the deep-review session |
498
514
  | `worktree N [--remove]` | Check out a PR in its own worktree and print the diff command |
499
515
  | `ledger N [--status S] [--note T] [--clear]` | Record, show, or clear what you did with a PR |
500
- | `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 |
501
517
  | (browser) `/setup` | Onboard a repo, or change a repo's settings |
502
- | `install` / `uninstall skill\|server\|schedule\|protocol` | Manage the integrations |
518
+ | `install [skill\|server\|schedule\|protocol\|canvas] [--all]` | Set up the integrations: all that are missing, asking about each, or one |
519
+ | `uninstall skill\|server\|schedule\|protocol\|canvas` | Undo one |
503
520
  | `config [--edit] [--defaults] [--check]` | Show, open, explain, or validate the configuration |
504
521
  | `doctor [--bundle]` | Check the setup, or write a debug bundle for a bug report |
505
522
 
@@ -4,7 +4,7 @@ How the code handles failure, where settings live, and how to check a change bef
4
4
 
5
5
  ## Checking a change
6
6
 
7
- The same gate runs on your machine and in CI. `.github/workflows/test.yml` is the gate as a reusable workflow (lint and types on Linux, tests on Linux, macOS, and Windows for every supported Python, then a build that installs the wheel into a clean environment and uploads it as the `dist` artifact); `ci.yml` calls it on every push and PR and adds `gate`, which is green only when everything in it was. `zizmor.yml` lints the workflows themselves and fails on any finding. `gate` and `zizmor` are the two checks the branch ruleset requires. The browser tests fail on CI if the runner has no Chrome or Edge, where locally they would skip:
7
+ The same gate runs on your machine and in CI. `.github/workflows/test.yml` is the gate as a reusable workflow (lint and types on Linux, tests on Linux, macOS, and Windows for every supported Python, then a build that installs the wheel into a clean environment and uploads it as the `dist` artifact); `ci.yml` calls it on every push and PR and adds `gate`, which is green only when everything in it was. `zizmor.yml` lints the workflows themselves and fails on any finding. `commits.yml` checks that a pull request's title and every commit in it follow Conventional Commits (`CONTRIBUTING.md`; the grammar is `scripts/commit_messages.py`, which the tests cover). `gate`, `zizmor`, and `commits` are the checks the branch ruleset requires. The browser tests fail on CI if the runner has no Chrome or Edge, where locally they would skip:
8
8
 
9
9
  ```sh
10
10
  uv run python scripts/check.py # lint, format, types, tests with the coverage floor
@@ -29,7 +29,7 @@ The gates:
29
29
  | types | ty | Pinned to an exact version in the dev group, because it's pre-1.0 and its diagnostics change between releases. Bump it on purpose, with the fixes in the same commit. Covers `src`, `tests`, and `scripts`. Production code is written against `forges.Forge` and the `Protocol`s (`membership.Membership`, `assistants.Assistant`, `assistants.Harness`) rather than a concrete adapter, which is what lets the tests' fakes type-check. |
30
30
  | tests | pytest with pytest-cov | Fails below the floor in `[tool.coverage.report] fail_under`. Raise the floor when coverage goes up; don't lower it to get a change in. |
31
31
 
32
- The browser tests (`tests/test_browser.py`, marked `browser`) drive the real dashboard and setup page in headless Edge or Chrome through Playwright. They use whichever of those is installed and are skipped if neither is. They catch script errors and broken interactions that Python tests can't see. The first time they ran, they found a chart that drew negative-size shapes.
32
+ The browser tests (`tests/test_browser.py`, marked `browser`) drive the real dashboard and setup page in a headless Chromium through Playwright: Playwright's own build first (`uv run playwright install chromium` fetches it), so a run on your machine and a run on CI use the same engine, else an installed Edge or Chrome; they are skipped if there is none. The branded builds are more lenient in places, which is how a test can pass locally and fail on CI; the test report's last line names the engine that ran. They catch script errors and broken interactions that Python tests can't see. The first time they ran, they found a chart that drew negative-size shapes.
33
33
 
34
34
  The end-to-end tests (`tests/test_e2e.py`, marked `e2e`) run the real `readthrough` executable as a subprocess, with `tests/fake_gh.py` standing in for `gh` through `READTHROUGH_GH`. That's the one place the whole program is exercised the way a user runs it: onboarding, a build, studying from the terminal, a second build that must hit the diff cache, `doctor`. The first time it ran, it found that a legitimately empty diff was never cached, so docs-only PRs were re-fetched on every refresh.
35
35
 
@@ -37,7 +37,7 @@ Tests never touch the network, `gh`, git, Copilot, the registry, or the schedule
37
37
 
38
38
  The recordings come from `scripts/probe_forge.py --record`, which runs an adapter against a real public repo (codeberg.org/forgejo/forgejo, gitlab.com/gitlab-org/cli, dev.azure.com/powershell) and writes every response, including the refusals, keyed by request. Re-record when an adapter asks for something new; the tests then need their expectations refreshed, since the data is whatever the forge said that day. Only a few response headers are kept and known identity fields are scrubbed, so a recording holds nothing about whoever made it.
39
39
 
40
- The screenshots in `docs/img/` come from `scripts/screenshots.py`, which serves a repo you've built through the live server, drives headless Edge or Chrome through Playwright at a fixed size in the light theme, and writes WebP (Pillow converts; Playwright writes only PNG and JPEG). They show microsoft/vscode, onboarded into a scratch home: `READTHROUGH_HOME=~/.readthrough-docs readthrough onboard microsoft/vscode --accept`, a build, a real study exchange on one PR, then `scripts/screenshots.py --repo microsoft/vscode --pr <n>`. Re-take them after a visible change to the pages.
40
+ The screenshots in `docs/img/` come from `scripts/screenshots.py`, which serves a repo you've built through the live server, drives headless Edge or Chrome through Playwright at a fixed size in the light theme, and writes WebP (Pillow converts; Playwright writes only PNG and JPEG). They show microsoft/vscode, onboarded into a scratch home: `READTHROUGH_HOME=~/.readthrough-docs readthrough onboard microsoft/vscode --accept`, a build, a real study exchange on one PR, then `scripts/screenshots.py --repo microsoft/vscode --pr <n>`. Re-take them after a visible change to the pages. The one a headless browser can't take, the dashboard beside an agent session (`canvas.webp`), comes from `scripts/screenshot_canvas.py`, Windows only: it starts a second VS Code on a throwaway profile, opens an agent session with a prompt that has the agent open the canvas, and captures the window once you've sent the prompt and the agent has asked its question; the profile is signed in to GitHub once and remembers it.
41
41
 
42
42
  ## Failures
43
43
 
@@ -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 makes no requests to other sites.
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,25 +142,28 @@ 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
 
149
- A release is a `vX.Y.Z` tag on `main` (or on a `release/*` branch, for a patch to an older line). The tag starts `.github/workflows/release.yml`, which checks that the tagged commit is on one of those branches, that the tag is the version in `pyproject.toml`, and that `CHANGELOG.md` has a section for it; runs the whole gate again through `test.yml`; and then waits. Approving the `pypi` environment (Actions → the run → *Review deployments*) lets the last job run: it takes the wheel and sdist the gate built, attests their provenance, uploads them to PyPI through trusted publishing (no token anywhere), and creates the GitHub release with the changelog section as its notes. Nothing in that last job builds anything, and nothing starts it but a tag plus a click, so a leaked push credential can burn runner minutes but can't publish.
149
+ A release is a `vX.Y.Z` tag on `main` (or on a `release/*` branch, for a patch to an older line). The tag starts `.github/workflows/release.yml`, which checks that the tagged commit is on one of those branches, that the tag is the version in `pyproject.toml`, and that `CHANGELOG.md` has a section for it; runs the whole gate again through `test.yml`; and then waits. Approving the `pypi` environment (Actions → the run → *Review deployments*) lets the last job run: it takes the wheel and sdist the gate built, attests their provenance, uploads them to PyPI through trusted publishing (no token anywhere), and creates the GitHub release with the changelog section as its notes. Nothing in that last job builds anything, and nothing starts it but a tag plus a click. Who can do what is set by the repository's rulesets: only an admin creates tags or `release/*` branches (or any branch outside `dev/*`, which is where everyone's work in progress goes, under their own login), and anyone else lands a commit on `main` only through a pull request that the code owner (`.github/CODEOWNERS`: the maintainer) has approved, with the branch brought up to date first so the commit that lands is the one the checks ran on; so a collaborator's credential can't start a release, and a branch run can't enter the `pypi` environment, whose policy admits only `v*` tags. The admin's own credential is the root of trust: a token with the `repo` scope can push the tag and approve the deployment, so there is no gate against it beyond keeping it safe (push with an SSH key, and treat the `gh` login as the credential it is). A GitHub release someone else created for the tag ahead of the pipeline makes the publish job fail rather than pass, since it only leaves an existing release alone when it carries exactly the files it built.
150
150
 
151
151
  1. Bump `version` in `pyproject.toml` and run `uv lock`, so the lockfile names the new version (`UV_LOCKED` in CI refuses a stale one). `readthrough.__version__` reads it from the installed package.
152
152
  2. Add a `## X.Y.Z (YYYY-MM-DD)` section to `CHANGELOG.md`; the release notes are that section, up to the next heading.
153
- 3. Run `uv run python scripts/check.py`, commit, and push `main`. Wait for CI.
154
- 4. `git tag vX.Y.Z && git push origin vX.Y.Z`. Only a repository admin can create a `v*` tag, and once it exists it can't be moved or deleted.
153
+ 3. Run `uv run python scripts/check.py`, commit on a `dev/<login>/*` branch, and land it on `main` through a pull request (nothing reaches `main` any other way). Wait for CI.
154
+ 4. `git tag vX.Y.Z && git push origin vX.Y.Z`. Only a repository admin can create a tag, and once a `v*` tag exists it can't be moved or deleted. The release is marked latest only when its version is the highest released, so a patch to an older line doesn't take the badge from a newer one.
155
155
  5. Approve the deployment when the run reaches `publish`. Then check it from the outside, on a downloaded file rather than a local build:
156
156
 
157
157
  ```sh
158
158
  gh release verify vX.Y.Z # the release is immutable and attested
159
159
  gh release verify-asset vX.Y.Z readthrough-X.Y.Z-py3-none-any.whl # this file is the published asset
160
- gh attestation verify readthrough-X.Y.Z-py3-none-any.whl --owner spencrr # built by release.yml at the tagged commit
160
+ gh attestation verify readthrough-X.Y.Z-py3-none-any.whl -R spencrr/readthrough \
161
+ --signer-workflow spencrr/readthrough/.github/workflows/release.yml --source-ref refs/tags/vX.Y.Z # built by release.yml from this tag
161
162
  uv tool install readthrough==X.Y.Z && readthrough --version
162
163
  ```
163
164
 
164
165
  If the run fails after PyPI accepted the files, fix what failed and re-run the failed job: the upload skips files PyPI already has, and the release step leaves an existing release alone. The tag can't be moved, so a mistake in the release itself means a new patch version.
165
166
 
166
- For a patch to an older line when `main` has unfinished work: `git switch -c release/X.Y vX.Y.0`, cherry-pick with `-x`, release from there, and add the changelog section to `main` by hand.
167
+ For a patch to an older line when `main` has unfinished work: `git switch -c release/X.Y vX.Y.0`, cherry-pick with `-x`, release from there, and add the changelog section to `main` by hand.
168
+
169
+ The toolchain that builds a release is pinned, in two places: `uv` is whatever version the pinned `setup-uv` action ships a checksum for (`version: latest-known`, so Dependabot's bump of the action, after its cooldown, is what moves `uv`), and the build backend is an exact `build-constraint-dependencies` entry in `pyproject.toml`, bumped by hand like `ty`.