brainlint 0.1.0b1__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 (620) hide show
  1. brainlint-0.1.0b1/.gitignore +10 -0
  2. brainlint-0.1.0b1/LICENSE +21 -0
  3. brainlint-0.1.0b1/PKG-INFO +92 -0
  4. brainlint-0.1.0b1/README.md +75 -0
  5. brainlint-0.1.0b1/corpus/ai-docs/airlint-reviewer-en-astra.md +75 -0
  6. brainlint-0.1.0b1/corpus/ai-docs/airlint-reviewer-en-luna.md +210 -0
  7. brainlint-0.1.0b1/corpus/ai-docs/airlint-reviewer-en-terra.md +159 -0
  8. brainlint-0.1.0b1/corpus/ai-docs/airlint-reviewer-ru-luna.md +177 -0
  9. brainlint-0.1.0b1/corpus/ai-docs/annotations/airlint-reviewer-en-astra.yaml +21 -0
  10. brainlint-0.1.0b1/corpus/ai-docs/annotations/airlint-reviewer-en-luna.yaml +29 -0
  11. brainlint-0.1.0b1/corpus/ai-docs/annotations/airlint-reviewer-en-terra.yaml +18 -0
  12. brainlint-0.1.0b1/corpus/ai-docs/annotations/airlint-reviewer-ru-luna.yaml +28 -0
  13. brainlint-0.1.0b1/corpus/ai-docs/annotations/brainlint-reviewer-en-terra.yaml +17 -0
  14. brainlint-0.1.0b1/corpus/ai-docs/annotations/brainlint-reviewer-ru-astra.yaml +11 -0
  15. brainlint-0.1.0b1/corpus/ai-docs/annotations/brainlint-reviewer-ru-luna.yaml +30 -0
  16. brainlint-0.1.0b1/corpus/ai-docs/annotations/brainlint-reviewer-ru-terra.yaml +19 -0
  17. brainlint-0.1.0b1/corpus/ai-docs/annotations/tutorial-db-index-en-luna.yaml +16 -0
  18. brainlint-0.1.0b1/corpus/ai-docs/annotations/tutorial-event-loop-en-terra.yaml +10 -0
  19. brainlint-0.1.0b1/corpus/ai-docs/annotations/tutorial-git-rebase-ru-astra.yaml +10 -0
  20. brainlint-0.1.0b1/corpus/ai-docs/annotations/tutorial-tls-handshake-ru-luna.yaml +20 -0
  21. brainlint-0.1.0b1/corpus/ai-docs/brainlint-reviewer-en-terra.md +139 -0
  22. brainlint-0.1.0b1/corpus/ai-docs/brainlint-reviewer-ru-astra.md +66 -0
  23. brainlint-0.1.0b1/corpus/ai-docs/brainlint-reviewer-ru-luna.md +226 -0
  24. brainlint-0.1.0b1/corpus/ai-docs/brainlint-reviewer-ru-terra.md +125 -0
  25. brainlint-0.1.0b1/corpus/ai-docs/manifest.yaml +386 -0
  26. brainlint-0.1.0b1/corpus/ai-docs/personas.yaml +86 -0
  27. brainlint-0.1.0b1/corpus/ai-docs/tutorial-db-index-en-luna.md +98 -0
  28. brainlint-0.1.0b1/corpus/ai-docs/tutorial-event-loop-en-terra.md +80 -0
  29. brainlint-0.1.0b1/corpus/ai-docs/tutorial-git-rebase-ru-astra.md +33 -0
  30. brainlint-0.1.0b1/corpus/ai-docs/tutorial-tls-handshake-ru-luna.md +98 -0
  31. brainlint-0.1.0b1/docs/CONCEPT.md +231 -0
  32. brainlint-0.1.0b1/docs/METHODOLOGY.md +186 -0
  33. brainlint-0.1.0b1/docs/WORKFLOW.md +82 -0
  34. brainlint-0.1.0b1/docs/reference.md +209 -0
  35. brainlint-0.1.0b1/docs/research/ai-docs.md +234 -0
  36. brainlint-0.1.0b1/docs/research/answer-order/README.md +39 -0
  37. brainlint-0.1.0b1/docs/research/answer-order/gold.json +200 -0
  38. brainlint-0.1.0b1/docs/research/answer-order/inputs.json +62 -0
  39. brainlint-0.1.0b1/docs/research/answer-order/inputs.sha256 +1 -0
  40. brainlint-0.1.0b1/docs/research/answer-order/predictions.json +1822 -0
  41. brainlint-0.1.0b1/docs/research/answer-order/protocol.md +9 -0
  42. brainlint-0.1.0b1/docs/research/answer-order/responses.json +626 -0
  43. brainlint-0.1.0b1/docs/research/comprehension-audit/README.md +43 -0
  44. brainlint-0.1.0b1/docs/research/comprehension-audit/cases.json +29 -0
  45. brainlint-0.1.0b1/docs/research/comprehension-audit/cases.sha256 +1 -0
  46. brainlint-0.1.0b1/docs/research/comprehension-audit/gear_ratio-absent.json +66 -0
  47. brainlint-0.1.0b1/docs/research/comprehension-audit/gear_ratio-incidental.json +127 -0
  48. brainlint-0.1.0b1/docs/research/comprehension-audit/gear_ratio-late.json +179 -0
  49. brainlint-0.1.0b1/docs/research/comprehension-audit/gear_ratio-worked.json +154 -0
  50. brainlint-0.1.0b1/docs/research/comprehension-audit/protocol.md +9 -0
  51. brainlint-0.1.0b1/docs/research/comprehension-audit/responses.json +114 -0
  52. brainlint-0.1.0b1/docs/research/comprehension-audit/results.jsonl +32 -0
  53. brainlint-0.1.0b1/docs/research/comprehension-audit/round_up-absent.json +192 -0
  54. brainlint-0.1.0b1/docs/research/comprehension-audit/round_up-incidental.json +256 -0
  55. brainlint-0.1.0b1/docs/research/comprehension-audit/round_up-late.json +332 -0
  56. brainlint-0.1.0b1/docs/research/comprehension-audit/round_up-worked.json +298 -0
  57. brainlint-0.1.0b1/docs/research/comprehension-audit/score.py +47 -0
  58. brainlint-0.1.0b1/docs/research/conclusion-measurement-study.md +38 -0
  59. brainlint-0.1.0b1/docs/research/conclusion-support.md +23 -0
  60. brainlint-0.1.0b1/docs/research/consequence/README.md +50 -0
  61. brainlint-0.1.0b1/docs/research/consequence/responses.json +546 -0
  62. brainlint-0.1.0b1/docs/research/consequence/trace.json +2786 -0
  63. brainlint-0.1.0b1/docs/research/consequence/transfer-key.json +98 -0
  64. brainlint-0.1.0b1/docs/research/consequence/transfer.json +86 -0
  65. brainlint-0.1.0b1/docs/research/consequence/transfer.sha256 +1 -0
  66. brainlint-0.1.0b1/docs/research/constrained-beliefs/README.md +34 -0
  67. brainlint-0.1.0b1/docs/research/constrained-beliefs/gold.json +122 -0
  68. brainlint-0.1.0b1/docs/research/constrained-beliefs/inputs.json +274 -0
  69. brainlint-0.1.0b1/docs/research/constrained-beliefs/inputs.sha256 +1 -0
  70. brainlint-0.1.0b1/docs/research/constrained-beliefs/predictions.json +667 -0
  71. brainlint-0.1.0b1/docs/research/constrained-beliefs/protocol.md +9 -0
  72. brainlint-0.1.0b1/docs/research/constrained-beliefs/responses.json +362 -0
  73. brainlint-0.1.0b1/docs/research/decider-comparison/annotated-goals.jsonl +12 -0
  74. brainlint-0.1.0b1/docs/research/decider-comparison/code.csv +29 -0
  75. brainlint-0.1.0b1/docs/research/decider-comparison/decisions.jsonl.gz +0 -0
  76. brainlint-0.1.0b1/docs/research/decider-comparison/expanded-scores.csv +321 -0
  77. brainlint-0.1.0b1/docs/research/decider-comparison/expanded-thresholds.csv +17 -0
  78. brainlint-0.1.0b1/docs/research/decider-comparison/expanded-traffic.csv +33 -0
  79. brainlint-0.1.0b1/docs/research/decider-comparison/expanded.jsonl.gz +0 -0
  80. brainlint-0.1.0b1/docs/research/decider-comparison/scores.csv +289 -0
  81. brainlint-0.1.0b1/docs/research/decider-comparison/supplement/en-12-panel-colour.json +164 -0
  82. brainlint-0.1.0b1/docs/research/decider-comparison/supplement/ru-12-helpful-aside.json +156 -0
  83. brainlint-0.1.0b1/docs/research/decider-comparison/thresholds.csv +17 -0
  84. brainlint-0.1.0b1/docs/research/decider-comparison/traffic.csv +49 -0
  85. brainlint-0.1.0b1/docs/research/decider-comparison.md +91 -0
  86. brainlint-0.1.0b1/docs/research/direct-repair/README.md +24 -0
  87. brainlint-0.1.0b1/docs/research/direct-repair/controls.json +50 -0
  88. brainlint-0.1.0b1/docs/research/direct-repair/hashes.json +8 -0
  89. brainlint-0.1.0b1/docs/research/direct-repair/predictions.json +326 -0
  90. brainlint-0.1.0b1/docs/research/direct-repair/protocol.md +9 -0
  91. brainlint-0.1.0b1/docs/research/direct-repair/responses.json +194 -0
  92. brainlint-0.1.0b1/docs/research/editorial-focus/README.md +72 -0
  93. brainlint-0.1.0b1/docs/research/editorial-focus/cases.json +78 -0
  94. brainlint-0.1.0b1/docs/research/editorial-focus/goals.json +1 -0
  95. brainlint-0.1.0b1/docs/research/editorial-focus/holdout.json +53 -0
  96. brainlint-0.1.0b1/docs/research/editorial-focus/protocol.md +5 -0
  97. brainlint-0.1.0b1/docs/research/editorial-focus/revision-protocol.md +3 -0
  98. brainlint-0.1.0b1/docs/research/event-references.md +28 -0
  99. brainlint-0.1.0b1/docs/research/evidence-audit/README.md +46 -0
  100. brainlint-0.1.0b1/docs/research/evidence-audit/inventory.md +24 -0
  101. brainlint-0.1.0b1/docs/research/evidence-audit/protocol.md +7 -0
  102. brainlint-0.1.0b1/docs/research/evidence-audit/snli.jsonl +71 -0
  103. brainlint-0.1.0b1/docs/research/example-ablation/README.md +58 -0
  104. brainlint-0.1.0b1/docs/research/example-ablation/annotations.json +86 -0
  105. brainlint-0.1.0b1/docs/research/example-ablation/author-output.txt +161 -0
  106. brainlint-0.1.0b1/docs/research/example-ablation/inputs.json +170 -0
  107. brainlint-0.1.0b1/docs/research/example-ablation/protocol.md +7 -0
  108. brainlint-0.1.0b1/docs/research/example-ablation/qa-key.json +128 -0
  109. brainlint-0.1.0b1/docs/research/example-ablation/recordings.json +978 -0
  110. brainlint-0.1.0b1/docs/research/example-ablation/responses.json +162 -0
  111. brainlint-0.1.0b1/docs/research/extraction-strength/README.md +52 -0
  112. brainlint-0.1.0b1/docs/research/extraction-strength/author-output.txt +56 -0
  113. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B01-astra.json +150 -0
  114. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B01-luna.json +228 -0
  115. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B01-none.json +127 -0
  116. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B01-sol.json +202 -0
  117. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B03-astra.json +265 -0
  118. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B03-luna.json +181 -0
  119. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B03-none.json +116 -0
  120. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B03-sol.json +249 -0
  121. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B07-astra.json +88 -0
  122. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B07-luna.json +156 -0
  123. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B07-none.json +87 -0
  124. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B07-sol.json +116 -0
  125. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B09-astra.json +189 -0
  126. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B09-luna.json +244 -0
  127. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B09-none.json +136 -0
  128. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B09-sol.json +265 -0
  129. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B10-astra.json +167 -0
  130. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B10-luna.json +120 -0
  131. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B10-none.json +70 -0
  132. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B10-sol.json +165 -0
  133. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B14-astra.json +243 -0
  134. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B14-luna.json +198 -0
  135. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B14-none.json +104 -0
  136. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B14-sol.json +257 -0
  137. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B17-astra.json +311 -0
  138. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B17-luna.json +302 -0
  139. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B17-none.json +171 -0
  140. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B17-sol.json +290 -0
  141. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B18-astra.json +317 -0
  142. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B18-luna.json +238 -0
  143. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B18-none.json +130 -0
  144. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/B18-sol.json +315 -0
  145. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/P01-astra.json +195 -0
  146. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/P01-luna.json +172 -0
  147. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/P01-none.json +102 -0
  148. brainlint-0.1.0b1/docs/research/extraction-strength/fixtures/P01-sol.json +203 -0
  149. brainlint-0.1.0b1/docs/research/extraction-strength/historical-usage.json +154 -0
  150. brainlint-0.1.0b1/docs/research/extraction-strength/ledger.json +686 -0
  151. brainlint-0.1.0b1/docs/research/extraction-strength/protocol.md +5 -0
  152. brainlint-0.1.0b1/docs/research/extraction-strength/task-trace.json +1820 -0
  153. brainlint-0.1.0b1/docs/research/gate-premise.json +37 -0
  154. brainlint-0.1.0b1/docs/research/hatch-observation.json +50 -0
  155. brainlint-0.1.0b1/docs/research/heading-questions.md +16 -0
  156. brainlint-0.1.0b1/docs/research/instruction-dependency/README.md +30 -0
  157. brainlint-0.1.0b1/docs/research/instruction-dependency/inputs.json +62 -0
  158. brainlint-0.1.0b1/docs/research/instruction-dependency/predictions.json +1231 -0
  159. brainlint-0.1.0b1/docs/research/instruction-dependency/protocol.md +11 -0
  160. brainlint-0.1.0b1/docs/research/instruction-dependency/responses.json +338 -0
  161. brainlint-0.1.0b1/docs/research/literature.md +812 -0
  162. brainlint-0.1.0b1/docs/research/measurement-extraction/README.md +27 -0
  163. brainlint-0.1.0b1/docs/research/measurement-extraction/inputs.json +16 -0
  164. brainlint-0.1.0b1/docs/research/measurement-extraction/predictions.json +1217 -0
  165. brainlint-0.1.0b1/docs/research/measurement-extraction/protocol.md +9 -0
  166. brainlint-0.1.0b1/docs/research/measurement-extraction/responses.json +546 -0
  167. brainlint-0.1.0b1/docs/research/missing-inference.md +37 -0
  168. brainlint-0.1.0b1/docs/research/observation-answer.md +43 -0
  169. brainlint-0.1.0b1/docs/research/openai-apis.md +310 -0
  170. brainlint-0.1.0b1/docs/research/operation-binding/README.md +47 -0
  171. brainlint-0.1.0b1/docs/research/operation-binding/author-output.txt +101 -0
  172. brainlint-0.1.0b1/docs/research/operation-binding/inputs.json +272 -0
  173. brainlint-0.1.0b1/docs/research/operation-binding/protocol.md +7 -0
  174. brainlint-0.1.0b1/docs/research/operation-binding/qa-key.json +188 -0
  175. brainlint-0.1.0b1/docs/research/operation-binding/responses.json +538 -0
  176. brainlint-0.1.0b1/docs/research/ose-pilot/README.md +36 -0
  177. brainlint-0.1.0b1/docs/research/ose-pilot/annotations.yaml +131 -0
  178. brainlint-0.1.0b1/docs/research/ose-pilot/counts.csv +13 -0
  179. brainlint-0.1.0b1/docs/research/ose-pilot/run.py +153 -0
  180. brainlint-0.1.0b1/docs/research/parameters.md +194 -0
  181. brainlint-0.1.0b1/docs/research/parameters.yaml +47 -0
  182. brainlint-0.1.0b1/docs/research/passage-continuity/README.md +47 -0
  183. brainlint-0.1.0b1/docs/research/passage-continuity/controls.json +24 -0
  184. brainlint-0.1.0b1/docs/research/passage-continuity/replay.py +218 -0
  185. brainlint-0.1.0b1/docs/research/probes/2026-12-04/probe-pm.json +4827 -0
  186. brainlint-0.1.0b1/docs/research/probes/2026-12-04/probe.json +4827 -0
  187. brainlint-0.1.0b1/docs/research/publication-transfer/Django-LICENSE +27 -0
  188. brainlint-0.1.0b1/docs/research/publication-transfer/README.md +27 -0
  189. brainlint-0.1.0b1/docs/research/publication-transfer/Rust-LICENSE +25 -0
  190. brainlint-0.1.0b1/docs/research/publication-transfer/audit.jsonl +5 -0
  191. brainlint-0.1.0b1/docs/research/publication-transfer/cli-output.txt +59 -0
  192. brainlint-0.1.0b1/docs/research/publication-transfer/django.yaml +13 -0
  193. brainlint-0.1.0b1/docs/research/publication-transfer/hashes.json +9 -0
  194. brainlint-0.1.0b1/docs/research/publication-transfer/protocol.md +17 -0
  195. brainlint-0.1.0b1/docs/research/publication-transfer/records/django-new.json +1555 -0
  196. brainlint-0.1.0b1/docs/research/publication-transfer/records/django-old.json +2105 -0
  197. brainlint-0.1.0b1/docs/research/publication-transfer/records/rust-control.json +323 -0
  198. brainlint-0.1.0b1/docs/research/publication-transfer/records/rust-new.json +880 -0
  199. brainlint-0.1.0b1/docs/research/publication-transfer/records/rust-old.json +1170 -0
  200. brainlint-0.1.0b1/docs/research/publication-transfer/rust.yaml +13 -0
  201. brainlint-0.1.0b1/docs/research/publication-transfer/texts/django-new.rst +49 -0
  202. brainlint-0.1.0b1/docs/research/publication-transfer/texts/django-old.rst +62 -0
  203. brainlint-0.1.0b1/docs/research/publication-transfer/texts/rust-control.md +23 -0
  204. brainlint-0.1.0b1/docs/research/publication-transfer/texts/rust-new.md +39 -0
  205. brainlint-0.1.0b1/docs/research/publication-transfer/texts/rust-old.md +51 -0
  206. brainlint-0.1.0b1/docs/research/publication-transfer/usage.json +1738 -0
  207. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/README.md +19 -0
  208. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/controls.jsonl +24 -0
  209. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/readme-replay.json +92 -0
  210. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/replay.py +38 -0
  211. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/README.md +52 -0
  212. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/inputs.json +8 -0
  213. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/k1.json +143 -0
  214. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/k2.json +108 -0
  215. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/k3.json +143 -0
  216. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/k4.json +154 -0
  217. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/k5.json +148 -0
  218. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/k6.json +116 -0
  219. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/pm-key.txt +1 -0
  220. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/replay.py +77 -0
  221. brainlint-0.1.0b1/docs/research/purpose-before-mechanism/subtask/responses.json +90 -0
  222. brainlint-0.1.0b1/docs/research/purpose-operation/README.md +27 -0
  223. brainlint-0.1.0b1/docs/research/purpose-operation/gold.json +218 -0
  224. brainlint-0.1.0b1/docs/research/purpose-operation/inputs.json +86 -0
  225. brainlint-0.1.0b1/docs/research/purpose-operation/predictions.json +1020 -0
  226. brainlint-0.1.0b1/docs/research/purpose-operation/protocol.md +11 -0
  227. brainlint-0.1.0b1/docs/research/purpose-operation/responses.json +298 -0
  228. brainlint-0.1.0b1/docs/research/python-example-controls.json +51 -0
  229. brainlint-0.1.0b1/docs/research/python-example.md +29 -0
  230. brainlint-0.1.0b1/docs/research/reader-selection/README.md +55 -0
  231. brainlint-0.1.0b1/docs/research/reader-selection/cases.json +219 -0
  232. brainlint-0.1.0b1/docs/research/reader-selection/context-retest.md +1 -0
  233. brainlint-0.1.0b1/docs/research/reader-selection/fence.json +47 -0
  234. brainlint-0.1.0b1/docs/research/reader-selection/protocol.md +7 -0
  235. brainlint-0.1.0b1/docs/research/reader-selection/responses.jsonl +97 -0
  236. brainlint-0.1.0b1/docs/research/reader-selection/transition-protocol.md +7 -0
  237. brainlint-0.1.0b1/docs/research/reader-selection/transition-responses.jsonl +18 -0
  238. brainlint-0.1.0b1/docs/research/reader-selection/transitions.json +285 -0
  239. brainlint-0.1.0b1/docs/research/reader-selection/transitions.md +58 -0
  240. brainlint-0.1.0b1/docs/research/reference-titles.md +11 -0
  241. brainlint-0.1.0b1/docs/research/related-work.md +55 -0
  242. brainlint-0.1.0b1/docs/research/replay_event_references.py +39 -0
  243. brainlint-0.1.0b1/docs/research/replay_export_premise.py +52 -0
  244. brainlint-0.1.0b1/docs/research/replay_heading_questions.py +45 -0
  245. brainlint-0.1.0b1/docs/research/replay_measurement_support.py +94 -0
  246. brainlint-0.1.0b1/docs/research/replay_reference_titles.py +29 -0
  247. brainlint-0.1.0b1/docs/research/ruadapt-encyclopedia-audit.md +42 -0
  248. brainlint-0.1.0b1/docs/research/shared-edit-advice.md +43 -0
  249. brainlint-0.1.0b1/docs/research/taaco-baseline/README.md +29 -0
  250. brainlint-0.1.0b1/docs/research/taaco-baseline/pairs.csv +57 -0
  251. brainlint-0.1.0b1/docs/research/taaco-baseline/run.py +93 -0
  252. brainlint-0.1.0b1/docs/research/task-evidence/README.md +44 -0
  253. brainlint-0.1.0b1/docs/research/task-evidence/inputs.json +182 -0
  254. brainlint-0.1.0b1/docs/research/task-evidence/judgments.json +128 -0
  255. brainlint-0.1.0b1/docs/research/task-evidence/responses.json +634 -0
  256. brainlint-0.1.0b1/docs/research/unanswered-observations.md +25 -0
  257. brainlint-0.1.0b1/docs/research/worked-concepts/README.md +51 -0
  258. brainlint-0.1.0b1/docs/research/worked-concepts/inputs.json +104 -0
  259. brainlint-0.1.0b1/docs/research/worked-concepts/responses.json +218 -0
  260. brainlint-0.1.0b1/docs/research/worked-concepts/trace.json +2357 -0
  261. brainlint-0.1.0b1/docs/research/worked-example-coverage.md +25 -0
  262. brainlint-0.1.0b1/examples/en/brainlint.yaml +78 -0
  263. brainlint-0.1.0b1/examples/en/event-loop.md +23 -0
  264. brainlint-0.1.0b1/examples/en/fixtures/event-loop.json +769 -0
  265. brainlint-0.1.0b1/examples/en/fixtures/signals.json +29 -0
  266. brainlint-0.1.0b1/examples/ru/brainlint.yaml +65 -0
  267. brainlint-0.1.0b1/examples/ru/fixtures/hash-table.json +742 -0
  268. brainlint-0.1.0b1/examples/ru/fixtures/signals.json +29 -0
  269. brainlint-0.1.0b1/examples/ru/hash-table.md +22 -0
  270. brainlint-0.1.0b1/pyproject.toml +62 -0
  271. brainlint-0.1.0b1/qa/MESSAGES.md +280 -0
  272. brainlint-0.1.0b1/qa/RUBRIC.md +208 -0
  273. brainlint-0.1.0b1/qa/reports/ai-docs-annotation.md +110 -0
  274. brainlint-0.1.0b1/qa/reports/author-reading-chains.md +58 -0
  275. brainlint-0.1.0b1/qa/reports/batch-recording.md +21 -0
  276. brainlint-0.1.0b1/qa/reports/cli-parity.md +123 -0
  277. brainlint-0.1.0b1/qa/reports/concept-review.md +282 -0
  278. brainlint-0.1.0b1/qa/reports/example-learning-ablation.md +36 -0
  279. brainlint-0.1.0b1/qa/reports/feynman-integrated-replay.md +33 -0
  280. brainlint-0.1.0b1/qa/reports/first-run-returns-desk.md +35 -0
  281. brainlint-0.1.0b1/qa/reports/first-run.md +76 -0
  282. brainlint-0.1.0b1/qa/reports/independent-comprehension.md +50 -0
  283. brainlint-0.1.0b1/qa/reports/integrated-extraction-cli.md +210 -0
  284. brainlint-0.1.0b1/qa/reports/integrated-reader-advice.md +159 -0
  285. brainlint-0.1.0b1/qa/reports/observation-grounding.md +35 -0
  286. brainlint-0.1.0b1/qa/reports/offline-recovery.md +27 -0
  287. brainlint-0.1.0b1/qa/reports/optional-decisions.md +196 -0
  288. brainlint-0.1.0b1/qa/reports/passage-edit-trial.md +45 -0
  289. brainlint-0.1.0b1/qa/reports/permission-cuts.md +22 -0
  290. brainlint-0.1.0b1/qa/reports/postpass-author-evaluation.md +145 -0
  291. brainlint-0.1.0b1/qa/reports/public-passages.md +45 -0
  292. brainlint-0.1.0b1/qa/reports/published-bridges.md +40 -0
  293. brainlint-0.1.0b1/qa/reports/purpose-before-mechanism.md +30 -0
  294. brainlint-0.1.0b1/qa/reports/reader-question-ledger.md +37 -0
  295. brainlint-0.1.0b1/qa/reports/readme-first-use.md +45 -0
  296. brainlint-0.1.0b1/qa/reports/recording-provenance.md +28 -0
  297. brainlint-0.1.0b1/qa/reports/rst-and-expanded-evidence.md +37 -0
  298. brainlint-0.1.0b1/qa/reports/task-continuity.md +45 -0
  299. brainlint-0.1.0b1/qa/reports/task-operation-binding.md +33 -0
  300. brainlint-0.1.0b1/qa/reports/terminal-readability.md +45 -0
  301. brainlint-0.1.0b1/qa/reports/three-rule-rechecks.md +29 -0
  302. brainlint-0.1.0b1/qa/samples/example-learning-ablation/README.md +5 -0
  303. brainlint-0.1.0b1/qa/samples/example-learning-ablation/inputs.json +170 -0
  304. brainlint-0.1.0b1/qa/samples/example-learning-ablation/judgments.json +128 -0
  305. brainlint-0.1.0b1/qa/samples/folder-observations/cases.json +436 -0
  306. brainlint-0.1.0b1/qa/samples/independent-comprehension/211-blind.json +38 -0
  307. brainlint-0.1.0b1/qa/samples/independent-comprehension/214-manifest.json +104 -0
  308. brainlint-0.1.0b1/qa/samples/independent-comprehension/README.md +32 -0
  309. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D1.json +55 -0
  310. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D1.txt +9 -0
  311. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D2.json +59 -0
  312. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D2.txt +9 -0
  313. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D3.json +55 -0
  314. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D3.txt +9 -0
  315. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D4.json +55 -0
  316. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D4.txt +9 -0
  317. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D5.json +55 -0
  318. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D5.txt +9 -0
  319. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D6.json +55 -0
  320. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D6.txt +9 -0
  321. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D7.json +55 -0
  322. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/en-D7.txt +9 -0
  323. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D1.json +55 -0
  324. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D1.txt +9 -0
  325. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D2.json +59 -0
  326. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D2.txt +9 -0
  327. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D3.json +55 -0
  328. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D3.txt +9 -0
  329. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D4.json +55 -0
  330. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D4.txt +9 -0
  331. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D5.json +55 -0
  332. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D5.txt +9 -0
  333. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D6.json +55 -0
  334. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D6.txt +9 -0
  335. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D7.json +55 -0
  336. brainlint-0.1.0b1/qa/samples/independent-comprehension/deferral/ru-D7.txt +9 -0
  337. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K1.json +47 -0
  338. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K1.txt +3 -0
  339. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K2.json +47 -0
  340. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K2.txt +3 -0
  341. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K3.json +47 -0
  342. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K3.txt +3 -0
  343. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K4.json +47 -0
  344. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K4.txt +3 -0
  345. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K5.json +47 -0
  346. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K5.txt +3 -0
  347. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K6.json +47 -0
  348. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/K6.txt +3 -0
  349. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/T1.json +55 -0
  350. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/T1.txt +3 -0
  351. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/T2.json +55 -0
  352. brainlint-0.1.0b1/qa/samples/independent-comprehension/dispatch/T2.txt +3 -0
  353. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/en-explicit.json +55 -0
  354. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/en-explicit.txt +5 -0
  355. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/en-repair.json +41 -0
  356. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/en-repair.txt +3 -0
  357. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/en-repeat.json +55 -0
  358. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/en-repeat.txt +5 -0
  359. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/en.yaml +1 -0
  360. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/gear.yaml +1 -0
  361. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/ru-explicit.json +55 -0
  362. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/ru-explicit.txt +5 -0
  363. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/ru-repair.json +41 -0
  364. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/ru-repair.txt +3 -0
  365. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/ru-repeat.json +55 -0
  366. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/ru-repeat.txt +5 -0
  367. brainlint-0.1.0b1/qa/samples/independent-comprehension/provenance/ru.yaml +1 -0
  368. brainlint-0.1.0b1/qa/samples/independent-comprehension/scoring/214-extra-key.json +24 -0
  369. brainlint-0.1.0b1/qa/samples/independent-comprehension/scoring/additional-key.json +7 -0
  370. brainlint-0.1.0b1/qa/samples/independent-comprehension/scoring/frozen-key.json +74 -0
  371. brainlint-0.1.0b1/qa/samples/passage-edits/cases.json +685 -0
  372. brainlint-0.1.0b1/qa/samples/permission-cuts/frozen.json +20 -0
  373. brainlint-0.1.0b1/qa/samples/permission-cuts/replay.py +107 -0
  374. brainlint-0.1.0b1/qa/samples/published-bridges/README.md +8 -0
  375. brainlint-0.1.0b1/qa/samples/published-bridges/en/deleted.json +317 -0
  376. brainlint-0.1.0b1/qa/samples/published-bridges/en/deleted.md +7 -0
  377. brainlint-0.1.0b1/qa/samples/published-bridges/en/intact.json +421 -0
  378. brainlint-0.1.0b1/qa/samples/published-bridges/en/intact.md +8 -0
  379. brainlint-0.1.0b1/qa/samples/published-bridges/en/late.json +396 -0
  380. brainlint-0.1.0b1/qa/samples/published-bridges/en/late.md +8 -0
  381. brainlint-0.1.0b1/qa/samples/published-bridges/ru/deleted.json +476 -0
  382. brainlint-0.1.0b1/qa/samples/published-bridges/ru/deleted.md +40 -0
  383. brainlint-0.1.0b1/qa/samples/published-bridges/ru/intact.json +610 -0
  384. brainlint-0.1.0b1/qa/samples/published-bridges/ru/intact.md +42 -0
  385. brainlint-0.1.0b1/qa/samples/published-bridges/ru/late.json +612 -0
  386. brainlint-0.1.0b1/qa/samples/published-bridges/ru/late.md +43 -0
  387. brainlint-0.1.0b1/qa/samples/purpose-before-mechanism/cases.json +545 -0
  388. brainlint-0.1.0b1/qa/samples/readme-event-loop/edited-record.json +736 -0
  389. brainlint-0.1.0b1/qa/samples/readme-event-loop/edited.md +23 -0
  390. brainlint-0.1.0b1/qa/samples/readme-event-loop/manifest.yaml +5 -0
  391. brainlint-0.1.0b1/qa/samples/readme-event-loop/original-record.json +772 -0
  392. brainlint-0.1.0b1/qa/samples/returns-desk/claim.json +273 -0
  393. brainlint-0.1.0b1/qa/samples/returns-desk/claim.md +11 -0
  394. brainlint-0.1.0b1/qa/samples/returns-desk/edited.json +372 -0
  395. brainlint-0.1.0b1/qa/samples/returns-desk/edited.md +13 -0
  396. brainlint-0.1.0b1/qa/samples/returns-desk/explicit.json +283 -0
  397. brainlint-0.1.0b1/qa/samples/returns-desk/explicit.md +11 -0
  398. brainlint-0.1.0b1/qa/samples/returns-desk/intact.json +362 -0
  399. brainlint-0.1.0b1/qa/samples/returns-desk/intact.md +13 -0
  400. brainlint-0.1.0b1/qa/samples/returns-desk/late.json +332 -0
  401. brainlint-0.1.0b1/qa/samples/returns-desk/late.md +13 -0
  402. brainlint-0.1.0b1/qa/samples/returns-desk/manifest.yaml +4 -0
  403. brainlint-0.1.0b1/qa/samples/returns-desk/missing.json +273 -0
  404. brainlint-0.1.0b1/qa/samples/returns-desk/missing.md +11 -0
  405. brainlint-0.1.0b1/qa/samples/returns-desk/precise.json +356 -0
  406. brainlint-0.1.0b1/qa/samples/returns-desk/precise.md +13 -0
  407. brainlint-0.1.0b1/qa/samples/task-continuity/en-new.json +67 -0
  408. brainlint-0.1.0b1/qa/samples/task-continuity/en-new.rst +12 -0
  409. brainlint-0.1.0b1/qa/samples/task-continuity/en-resume.json +67 -0
  410. brainlint-0.1.0b1/qa/samples/task-continuity/en-resume.rst +12 -0
  411. brainlint-0.1.0b1/qa/samples/task-continuity/en.yaml +11 -0
  412. brainlint-0.1.0b1/qa/samples/task-continuity/judgments.json +153 -0
  413. brainlint-0.1.0b1/qa/samples/task-continuity/replay_study.py +24 -0
  414. brainlint-0.1.0b1/qa/samples/task-continuity/ru-new.json +67 -0
  415. brainlint-0.1.0b1/qa/samples/task-continuity/ru-new.rst +12 -0
  416. brainlint-0.1.0b1/qa/samples/task-continuity/ru-resume.json +67 -0
  417. brainlint-0.1.0b1/qa/samples/task-continuity/ru-resume.rst +12 -0
  418. brainlint-0.1.0b1/qa/samples/task-continuity/ru.yaml +11 -0
  419. brainlint-0.1.0b1/qa/samples/task-operation-binding/README.md +21 -0
  420. brainlint-0.1.0b1/qa/samples/task-operation-binding/inputs.json +272 -0
  421. brainlint-0.1.0b1/qa/samples/task-operation-binding/judgments.json +188 -0
  422. brainlint-0.1.0b1/scripts/answer_order.py +155 -0
  423. brainlint-0.1.0b1/scripts/audit_reader_evidence.py +141 -0
  424. brainlint-0.1.0b1/scripts/check_annotated_goals.py +56 -0
  425. brainlint-0.1.0b1/scripts/compare_deciders.py +86 -0
  426. brainlint-0.1.0b1/scripts/compare_joint.py +121 -0
  427. brainlint-0.1.0b1/scripts/comprehension_audit.py +171 -0
  428. brainlint-0.1.0b1/scripts/consequence.py +169 -0
  429. brainlint-0.1.0b1/scripts/constrained_beliefs.py +150 -0
  430. brainlint-0.1.0b1/scripts/direct_repair.py +155 -0
  431. brainlint-0.1.0b1/scripts/editorial_focus.py +136 -0
  432. brainlint-0.1.0b1/scripts/example_ablation.py +292 -0
  433. brainlint-0.1.0b1/scripts/extraction_strength.py +173 -0
  434. brainlint-0.1.0b1/scripts/generate_ai_docs.py +345 -0
  435. brainlint-0.1.0b1/scripts/instruction_dependency.py +194 -0
  436. brainlint-0.1.0b1/scripts/measurement_extraction.py +179 -0
  437. brainlint-0.1.0b1/scripts/operation_binding.py +263 -0
  438. brainlint-0.1.0b1/scripts/probe_openai.py +390 -0
  439. brainlint-0.1.0b1/scripts/publication_transfer.py +165 -0
  440. brainlint-0.1.0b1/scripts/purpose_operation.py +162 -0
  441. brainlint-0.1.0b1/scripts/reader_gap_locations.py +48 -0
  442. brainlint-0.1.0b1/scripts/reader_selection.py +234 -0
  443. brainlint-0.1.0b1/scripts/reader_transitions.py +226 -0
  444. brainlint-0.1.0b1/scripts/record_decisions.py +142 -0
  445. brainlint-0.1.0b1/scripts/record_golden.py +62 -0
  446. brainlint-0.1.0b1/scripts/replay_decider_comparison.sh +24 -0
  447. brainlint-0.1.0b1/scripts/score_decisions.py +221 -0
  448. brainlint-0.1.0b1/scripts/subtask_observation.py +104 -0
  449. brainlint-0.1.0b1/scripts/task_evidence.py +207 -0
  450. brainlint-0.1.0b1/scripts/unanswered_observations.py +56 -0
  451. brainlint-0.1.0b1/scripts/worked_concepts.py +154 -0
  452. brainlint-0.1.0b1/src/brainlint/__init__.py +64 -0
  453. brainlint-0.1.0b1/src/brainlint/__main__.py +3 -0
  454. brainlint-0.1.0b1/src/brainlint/backends.py +298 -0
  455. brainlint-0.1.0b1/src/brainlint/canonical.py +203 -0
  456. brainlint-0.1.0b1/src/brainlint/cli.py +190 -0
  457. brainlint-0.1.0b1/src/brainlint/config.py +255 -0
  458. brainlint-0.1.0b1/src/brainlint/defaults.yaml +93 -0
  459. brainlint-0.1.0b1/src/brainlint/diagnostics.py +58 -0
  460. brainlint-0.1.0b1/src/brainlint/divergence.py +161 -0
  461. brainlint-0.1.0b1/src/brainlint/experiment.py +124 -0
  462. brainlint-0.1.0b1/src/brainlint/goals.py +139 -0
  463. brainlint-0.1.0b1/src/brainlint/init.py +64 -0
  464. brainlint-0.1.0b1/src/brainlint/lang/__init__.py +50 -0
  465. brainlint-0.1.0b1/src/brainlint/lang/base.py +38 -0
  466. brainlint-0.1.0b1/src/brainlint/lang/en.py +30 -0
  467. brainlint-0.1.0b1/src/brainlint/lang/ru.py +27 -0
  468. brainlint-0.1.0b1/src/brainlint/linter.py +401 -0
  469. brainlint-0.1.0b1/src/brainlint/llm.py +409 -0
  470. brainlint-0.1.0b1/src/brainlint/models.py +389 -0
  471. brainlint-0.1.0b1/src/brainlint/outcomes.py +271 -0
  472. brainlint-0.1.0b1/src/brainlint/passage.py +257 -0
  473. brainlint-0.1.0b1/src/brainlint/personas.py +94 -0
  474. brainlint-0.1.0b1/src/brainlint/pipeline.py +758 -0
  475. brainlint-0.1.0b1/src/brainlint/procedure.py +255 -0
  476. brainlint-0.1.0b1/src/brainlint/prompts.py +296 -0
  477. brainlint-0.1.0b1/src/brainlint/py.typed +0 -0
  478. brainlint-0.1.0b1/src/brainlint/reader.py +65 -0
  479. brainlint-0.1.0b1/src/brainlint/repair.py +124 -0
  480. brainlint-0.1.0b1/src/brainlint/report.py +390 -0
  481. brainlint-0.1.0b1/src/brainlint/rst.py +156 -0
  482. brainlint-0.1.0b1/src/brainlint/rules/__init__.py +25 -0
  483. brainlint-0.1.0b1/src/brainlint/rules/decider.py +244 -0
  484. brainlint-0.1.0b1/src/brainlint/rules/messages.py +85 -0
  485. brainlint-0.1.0b1/src/brainlint/rules/postpass.py +367 -0
  486. brainlint-0.1.0b1/src/brainlint/rules/purpose.py +180 -0
  487. brainlint-0.1.0b1/src/brainlint/rules/registry.py +45 -0
  488. brainlint-0.1.0b1/src/brainlint/sources.py +476 -0
  489. brainlint-0.1.0b1/src/brainlint/splitter.py +192 -0
  490. brainlint-0.1.0b1/src/brainlint/terms.py +125 -0
  491. brainlint-0.1.0b1/tests/__init__.py +0 -0
  492. brainlint-0.1.0b1/tests/conftest.py +40 -0
  493. brainlint-0.1.0b1/tests/fixtures/golden/en-01-overload.json +303 -0
  494. brainlint-0.1.0b1/tests/fixtures/golden/en-02-missing-bridge.json +259 -0
  495. brainlint-0.1.0b1/tests/fixtures/golden/en-03-cold-reference.json +706 -0
  496. brainlint-0.1.0b1/tests/fixtures/golden/en-04-filler.json +336 -0
  497. brainlint-0.1.0b1/tests/fixtures/golden/en-05-reverse-cohesion.json +374 -0
  498. brainlint-0.1.0b1/tests/fixtures/golden/en-06-misconception.json +240 -0
  499. brainlint-0.1.0b1/tests/fixtures/golden/en-07-example-after-dense.json +294 -0
  500. brainlint-0.1.0b1/tests/fixtures/golden/en-08-unmotivated.json +424 -0
  501. brainlint-0.1.0b1/tests/fixtures/golden/en-09-question-first.json +486 -0
  502. brainlint-0.1.0b1/tests/fixtures/golden/en-10-question-heading.json +322 -0
  503. brainlint-0.1.0b1/tests/fixtures/golden/en-11-unknown-copy.json +166 -0
  504. brainlint-0.1.0b1/tests/fixtures/golden/en-12-panel-colour.json +162 -0
  505. brainlint-0.1.0b1/tests/fixtures/golden/en-13-retention.json +144 -0
  506. brainlint-0.1.0b1/tests/fixtures/golden/en-14-file-location.json +292 -0
  507. brainlint-0.1.0b1/tests/fixtures/golden/en-15-open-stack.json +437 -0
  508. brainlint-0.1.0b1/tests/fixtures/golden/ru-01-overload.json +255 -0
  509. brainlint-0.1.0b1/tests/fixtures/golden/ru-02-missing-bridge.json +258 -0
  510. brainlint-0.1.0b1/tests/fixtures/golden/ru-03-filler.json +282 -0
  511. brainlint-0.1.0b1/tests/fixtures/golden/ru-04-unmotivated.json +294 -0
  512. brainlint-0.1.0b1/tests/fixtures/golden/ru-05-misconception.json +283 -0
  513. brainlint-0.1.0b1/tests/fixtures/golden/ru-06-recap.json +804 -0
  514. brainlint-0.1.0b1/tests/fixtures/golden/ru-07-question-first.json +314 -0
  515. brainlint-0.1.0b1/tests/fixtures/golden/ru-08-cold-reference.json +593 -0
  516. brainlint-0.1.0b1/tests/fixtures/golden/ru-09-reverse-cohesion.json +456 -0
  517. brainlint-0.1.0b1/tests/fixtures/golden/ru-10-code-block.json +240 -0
  518. brainlint-0.1.0b1/tests/fixtures/golden/ru-11-known-copy.json +141 -0
  519. brainlint-0.1.0b1/tests/fixtures/golden/ru-12-helpful-aside.json +208 -0
  520. brainlint-0.1.0b1/tests/fixtures/golden/ru-13-retention.json +154 -0
  521. brainlint-0.1.0b1/tests/fixtures/golden/ru-14-file-location.json +278 -0
  522. brainlint-0.1.0b1/tests/fixtures/golden/ru-15-closed-stack.json +421 -0
  523. brainlint-0.1.0b1/tests/fixtures/spring/readers.yaml +20 -0
  524. brainlint-0.1.0b1/tests/fixtures/spring/record.json +129 -0
  525. brainlint-0.1.0b1/tests/fixtures/spring/spring.txt +5 -0
  526. brainlint-0.1.0b1/tests/fixtures/spring/transfer.json +268 -0
  527. brainlint-0.1.0b1/tests/golden/README.md +189 -0
  528. brainlint-0.1.0b1/tests/golden/check_cases.py +195 -0
  529. brainlint-0.1.0b1/tests/golden/en-01-overload.md +6 -0
  530. brainlint-0.1.0b1/tests/golden/en-01-overload.yaml +72 -0
  531. brainlint-0.1.0b1/tests/golden/en-02-missing-bridge.md +5 -0
  532. brainlint-0.1.0b1/tests/golden/en-02-missing-bridge.yaml +70 -0
  533. brainlint-0.1.0b1/tests/golden/en-03-cold-reference.md +11 -0
  534. brainlint-0.1.0b1/tests/golden/en-03-cold-reference.yaml +108 -0
  535. brainlint-0.1.0b1/tests/golden/en-04-filler.md +7 -0
  536. brainlint-0.1.0b1/tests/golden/en-04-filler.yaml +77 -0
  537. brainlint-0.1.0b1/tests/golden/en-05-reverse-cohesion.md +7 -0
  538. brainlint-0.1.0b1/tests/golden/en-05-reverse-cohesion.yaml +79 -0
  539. brainlint-0.1.0b1/tests/golden/en-06-misconception.md +5 -0
  540. brainlint-0.1.0b1/tests/golden/en-06-misconception.yaml +64 -0
  541. brainlint-0.1.0b1/tests/golden/en-07-example-after-dense.md +5 -0
  542. brainlint-0.1.0b1/tests/golden/en-07-example-after-dense.yaml +65 -0
  543. brainlint-0.1.0b1/tests/golden/en-08-unmotivated.md +8 -0
  544. brainlint-0.1.0b1/tests/golden/en-08-unmotivated.yaml +88 -0
  545. brainlint-0.1.0b1/tests/golden/en-09-question-first.md +8 -0
  546. brainlint-0.1.0b1/tests/golden/en-09-question-first.yaml +86 -0
  547. brainlint-0.1.0b1/tests/golden/en-10-question-heading.md +8 -0
  548. brainlint-0.1.0b1/tests/golden/en-10-question-heading.yaml +73 -0
  549. brainlint-0.1.0b1/tests/golden/en-11-unknown-copy.md +5 -0
  550. brainlint-0.1.0b1/tests/golden/en-11-unknown-copy.yaml +89 -0
  551. brainlint-0.1.0b1/tests/golden/en-12-panel-colour.md +5 -0
  552. brainlint-0.1.0b1/tests/golden/en-12-panel-colour.yaml +89 -0
  553. brainlint-0.1.0b1/tests/golden/en-13-retention.md +5 -0
  554. brainlint-0.1.0b1/tests/golden/en-13-retention.yaml +94 -0
  555. brainlint-0.1.0b1/tests/golden/en-14-file-location.md +8 -0
  556. brainlint-0.1.0b1/tests/golden/en-14-file-location.yaml +138 -0
  557. brainlint-0.1.0b1/tests/golden/en-15-open-stack.md +10 -0
  558. brainlint-0.1.0b1/tests/golden/en-15-open-stack.yaml +170 -0
  559. brainlint-0.1.0b1/tests/golden/ru-01-overload.md +5 -0
  560. brainlint-0.1.0b1/tests/golden/ru-01-overload.yaml +67 -0
  561. brainlint-0.1.0b1/tests/golden/ru-02-missing-bridge.md +5 -0
  562. brainlint-0.1.0b1/tests/golden/ru-02-missing-bridge.yaml +67 -0
  563. brainlint-0.1.0b1/tests/golden/ru-03-filler.md +7 -0
  564. brainlint-0.1.0b1/tests/golden/ru-03-filler.yaml +77 -0
  565. brainlint-0.1.0b1/tests/golden/ru-04-unmotivated.md +6 -0
  566. brainlint-0.1.0b1/tests/golden/ru-04-unmotivated.yaml +74 -0
  567. brainlint-0.1.0b1/tests/golden/ru-05-misconception.md +6 -0
  568. brainlint-0.1.0b1/tests/golden/ru-05-misconception.yaml +74 -0
  569. brainlint-0.1.0b1/tests/golden/ru-06-recap.md +14 -0
  570. brainlint-0.1.0b1/tests/golden/ru-06-recap.yaml +109 -0
  571. brainlint-0.1.0b1/tests/golden/ru-07-question-first.md +6 -0
  572. brainlint-0.1.0b1/tests/golden/ru-07-question-first.yaml +74 -0
  573. brainlint-0.1.0b1/tests/golden/ru-08-cold-reference.md +11 -0
  574. brainlint-0.1.0b1/tests/golden/ru-08-cold-reference.yaml +110 -0
  575. brainlint-0.1.0b1/tests/golden/ru-09-reverse-cohesion.md +8 -0
  576. brainlint-0.1.0b1/tests/golden/ru-09-reverse-cohesion.yaml +86 -0
  577. brainlint-0.1.0b1/tests/golden/ru-10-code-block.md +15 -0
  578. brainlint-0.1.0b1/tests/golden/ru-10-code-block.yaml +68 -0
  579. brainlint-0.1.0b1/tests/golden/ru-11-known-copy.md +5 -0
  580. brainlint-0.1.0b1/tests/golden/ru-11-known-copy.yaml +89 -0
  581. brainlint-0.1.0b1/tests/golden/ru-12-helpful-aside.md +5 -0
  582. brainlint-0.1.0b1/tests/golden/ru-12-helpful-aside.yaml +89 -0
  583. brainlint-0.1.0b1/tests/golden/ru-13-retention.md +5 -0
  584. brainlint-0.1.0b1/tests/golden/ru-13-retention.yaml +94 -0
  585. brainlint-0.1.0b1/tests/golden/ru-14-file-location.md +8 -0
  586. brainlint-0.1.0b1/tests/golden/ru-14-file-location.yaml +137 -0
  587. brainlint-0.1.0b1/tests/golden/ru-15-closed-stack.md +10 -0
  588. brainlint-0.1.0b1/tests/golden/ru-15-closed-stack.yaml +169 -0
  589. brainlint-0.1.0b1/tests/golden_runner.py +111 -0
  590. brainlint-0.1.0b1/tests/test_api.py +49 -0
  591. brainlint-0.1.0b1/tests/test_bibliographic_questions.py +13 -0
  592. brainlint-0.1.0b1/tests/test_canonical.py +108 -0
  593. brainlint-0.1.0b1/tests/test_cli.py +328 -0
  594. brainlint-0.1.0b1/tests/test_config.py +103 -0
  595. brainlint-0.1.0b1/tests/test_divergence.py +188 -0
  596. brainlint-0.1.0b1/tests/test_first_run.py +131 -0
  597. brainlint-0.1.0b1/tests/test_goal_predicate.py +166 -0
  598. brainlint-0.1.0b1/tests/test_golden_fixtures.py +48 -0
  599. brainlint-0.1.0b1/tests/test_grouped_evidence.py +37 -0
  600. brainlint-0.1.0b1/tests/test_heading_resolution.py +33 -0
  601. brainlint-0.1.0b1/tests/test_inference_evidence.py +258 -0
  602. brainlint-0.1.0b1/tests/test_llm.py +329 -0
  603. brainlint-0.1.0b1/tests/test_models.py +105 -0
  604. brainlint-0.1.0b1/tests/test_observation_closure.py +59 -0
  605. brainlint-0.1.0b1/tests/test_optional_decisions.py +183 -0
  606. brainlint-0.1.0b1/tests/test_passage.py +254 -0
  607. brainlint-0.1.0b1/tests/test_personas.py +154 -0
  608. brainlint-0.1.0b1/tests/test_pipeline.py +171 -0
  609. brainlint-0.1.0b1/tests/test_postpass.py +215 -0
  610. brainlint-0.1.0b1/tests/test_question_equivalence.py +36 -0
  611. brainlint-0.1.0b1/tests/test_reader_summary.py +620 -0
  612. brainlint-0.1.0b1/tests/test_rst.py +82 -0
  613. brainlint-0.1.0b1/tests/test_rule_decider.py +156 -0
  614. brainlint-0.1.0b1/tests/test_splitter.py +247 -0
  615. brainlint-0.1.0b1/tests/test_spring_diagnostics.py +68 -0
  616. brainlint-0.1.0b1/tests/test_task_evidence_study.py +21 -0
  617. brainlint-0.1.0b1/tests/test_temporal_reference.py +20 -0
  618. brainlint-0.1.0b1/tests/test_term_evidence.py +112 -0
  619. brainlint-0.1.0b1/tests/test_worked_example.py +59 -0
  620. brainlint-0.1.0b1/uv.lock +576 -0
@@ -0,0 +1,10 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ dist/
7
+ build/
8
+ *.egg-info/
9
+ .DS_Store
10
+ .env
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mikhail Podgurskiy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,92 @@
1
+ Metadata-Version: 2.5
2
+ Name: brainlint
3
+ Version: 0.1.0b1
4
+ Summary: A prose linter for explanatory texts that simulates readers sentence by sentence
5
+ Project-URL: Repository, https://github.com/kmmbvnr/brainlint
6
+ Project-URL: Issues, https://github.com/kmmbvnr/brainlint/issues
7
+ Author: Mikhail Podgurskiy
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.12
11
+ Requires-Dist: markdown-it-py>=3.0
12
+ Requires-Dist: mdit-py-plugins>=0.4
13
+ Requires-Dist: openai>=1.60
14
+ Requires-Dist: pydantic>=2.7
15
+ Requires-Dist: pyyaml>=6.0
16
+ Description-Content-Type: text/markdown
17
+
18
+ # brainlint
19
+
20
+ Brainlint helps you find the sentence where a reader may lose the thread of a tutorial. It reads English or Russian one sentence at a time and tracks what the text has explained so far.
21
+
22
+ Consider a JavaScript tutorial that sets a timer with a delay of zero, then prints a message. The next sentence says:
23
+
24
+ > This prints "now" first.
25
+
26
+ A reader who expects the timer to run immediately can see the result and still wonder why it happened.
27
+
28
+ ## Try the example without an API key
29
+
30
+ From a checkout of this repository, use Python 3.12 or later and uv. The first command installs the dependencies. The check itself runs offline using the example's recorded responses.
31
+
32
+ ```sh
33
+ uv sync
34
+ uv run brainlint check examples/en/event-loop.md --config examples/en/brainlint.yaml \
35
+ --fixtures examples/en/fixtures/event-loop.json
36
+ ```
37
+
38
+ One line of the output refers to the sentence above:
39
+
40
+ ```text
41
+ examples/en/event-loop.md:17:1: LOD002 [warning] For target and expert readers, “This” depends on an unstated step: The callback passed to setTimeout runs after the current synchronous code, even when the delay is 0 ms. Supply the missing inference.
42
+ ```
43
+
44
+ Open line 17, column 1. The next sentence already explains that the timer waits in the queue. You could keep the original order, or bring the reason forward:
45
+
46
+ > A delay of zero schedules the timer. JavaScript finishes the current script before it runs the timer callback, so "now" prints first.
47
+
48
+ You may decide your readers already know this. Each warning is a suggestion to check against your audience. In particular, the word “expert” here names one configured profile. A warning for that profile tells you little about what an actual expert would find difficult.
49
+
50
+ ## Check your own article
51
+
52
+ Save your draft as `article.md`. Brainlint reads your OpenAI key from a shell environment variable named `OPENAI_API_KEY`. Once you have set it, run:
53
+
54
+ ```sh
55
+ uv run brainlint check article.md
56
+ ```
57
+
58
+ The default backend sends the article to OpenAI a sentence at a time and bills new requests to your API account. To load the key from a local file, use `uv run --env-file .env brainlint check article.md`. Keep `.env` out of version control.
59
+
60
+ You can start without a config. Brainlint uses a general reader unless the current directory contains `brainlint.yaml`. To describe your audience, run `uv run brainlint init`. Enter the reader's goal and the concepts they already know. For example, a JavaScript programmer may know what a callback is but still need an explanation of the task queue. You can compare several readers in one check. [English example profile](examples/en/brainlint.yaml) · [Russian example profile](examples/ru/brainlint.yaml)
61
+
62
+ ## Read the report
63
+
64
+ - Use `--explain` to see the findings in reading order and the suggested edits for each audience.
65
+ - Use `--reader-summary` to see what readers may take away and which questions remain open. Add `--explain` for every recorded gap, repair and source quotation. Both views use the same extraction.
66
+ - Use `--format json` for diagnostics with paths, lines and columns. The command exits with 0 for a clean run, 1 for findings and 2 for an error.
67
+
68
+ Brainlint can miss a missing premise or flag a passage that readers understand. The evaluation shows examples of both. [Tutorial evaluation](qa/reports/integrated-extraction-cli.md)
69
+
70
+ ## Inputs, recordings and settings
71
+
72
+ Pass a Markdown, plain text or reStructuredText file, or a directory to search recursively. For piped input, use `-` and select its format with `--stdin-format md` or `--stdin-format rst`. Brainlint checks one language per run. Add `--lang ru` for Russian.
73
+
74
+ For a repeatable review, add `--record review.json` when checking an article. To review that version offline, run:
75
+
76
+ ```sh
77
+ uv run brainlint check article.md --backend replay --fixtures review.json
78
+ ```
79
+
80
+ The recording must cover the sentences you check. After an edit, use the OpenAI backend to extract the new text. It caches responses by model, prompt version and reader context in `~/.cache/brainlint`. Set `BRAINLINT_CACHE` to choose another directory.
81
+
82
+ Use `BRAINLINT_OFFLINE=1` for a cache-only run. Recovery requires a complete recording of the article. If you have one in the older format, you can select it when a partial newer recording causes a miss:
83
+
84
+ ```sh
85
+ BRAINLINT_OFFLINE=1 BRAINLINT_OFFLINE_VERSION=extract-v2 uv run brainlint check article.md
86
+ ```
87
+
88
+ Use `extract-v3` to select that version instead. Without a selector, Brainlint looks for the current version first and falls back to the older one on a miss. Each hit must match the full request context.
89
+
90
+ The reference explains each rule, the Python API and the recording format. Optional checks can add model requests. [Configuration and rule reference](docs/reference.md) · [Default settings](src/brainlint/defaults.yaml) · [Decision-layer comparison](docs/research/decider-comparison.md) · [Decision on optional rules](https://github.com/kmmbvnr/brainlint/issues/24#issuecomment-7410897357)
91
+
92
+ For the reader model and its assumptions, see the concept and methodology. Contributors can find the test and review process in the team workflow. [Concept](docs/CONCEPT.md) · [Methodology](docs/METHODOLOGY.md) · [Team workflow](docs/WORKFLOW.md) · [OpenAI data controls](https://developers.openai.com/api/docs/guides/your-data)
@@ -0,0 +1,75 @@
1
+ # brainlint
2
+
3
+ Brainlint helps you find the sentence where a reader may lose the thread of a tutorial. It reads English or Russian one sentence at a time and tracks what the text has explained so far.
4
+
5
+ Consider a JavaScript tutorial that sets a timer with a delay of zero, then prints a message. The next sentence says:
6
+
7
+ > This prints "now" first.
8
+
9
+ A reader who expects the timer to run immediately can see the result and still wonder why it happened.
10
+
11
+ ## Try the example without an API key
12
+
13
+ From a checkout of this repository, use Python 3.12 or later and uv. The first command installs the dependencies. The check itself runs offline using the example's recorded responses.
14
+
15
+ ```sh
16
+ uv sync
17
+ uv run brainlint check examples/en/event-loop.md --config examples/en/brainlint.yaml \
18
+ --fixtures examples/en/fixtures/event-loop.json
19
+ ```
20
+
21
+ One line of the output refers to the sentence above:
22
+
23
+ ```text
24
+ examples/en/event-loop.md:17:1: LOD002 [warning] For target and expert readers, “This” depends on an unstated step: The callback passed to setTimeout runs after the current synchronous code, even when the delay is 0 ms. Supply the missing inference.
25
+ ```
26
+
27
+ Open line 17, column 1. The next sentence already explains that the timer waits in the queue. You could keep the original order, or bring the reason forward:
28
+
29
+ > A delay of zero schedules the timer. JavaScript finishes the current script before it runs the timer callback, so "now" prints first.
30
+
31
+ You may decide your readers already know this. Each warning is a suggestion to check against your audience. In particular, the word “expert” here names one configured profile. A warning for that profile tells you little about what an actual expert would find difficult.
32
+
33
+ ## Check your own article
34
+
35
+ Save your draft as `article.md`. Brainlint reads your OpenAI key from a shell environment variable named `OPENAI_API_KEY`. Once you have set it, run:
36
+
37
+ ```sh
38
+ uv run brainlint check article.md
39
+ ```
40
+
41
+ The default backend sends the article to OpenAI a sentence at a time and bills new requests to your API account. To load the key from a local file, use `uv run --env-file .env brainlint check article.md`. Keep `.env` out of version control.
42
+
43
+ You can start without a config. Brainlint uses a general reader unless the current directory contains `brainlint.yaml`. To describe your audience, run `uv run brainlint init`. Enter the reader's goal and the concepts they already know. For example, a JavaScript programmer may know what a callback is but still need an explanation of the task queue. You can compare several readers in one check. [English example profile](examples/en/brainlint.yaml) · [Russian example profile](examples/ru/brainlint.yaml)
44
+
45
+ ## Read the report
46
+
47
+ - Use `--explain` to see the findings in reading order and the suggested edits for each audience.
48
+ - Use `--reader-summary` to see what readers may take away and which questions remain open. Add `--explain` for every recorded gap, repair and source quotation. Both views use the same extraction.
49
+ - Use `--format json` for diagnostics with paths, lines and columns. The command exits with 0 for a clean run, 1 for findings and 2 for an error.
50
+
51
+ Brainlint can miss a missing premise or flag a passage that readers understand. The evaluation shows examples of both. [Tutorial evaluation](qa/reports/integrated-extraction-cli.md)
52
+
53
+ ## Inputs, recordings and settings
54
+
55
+ Pass a Markdown, plain text or reStructuredText file, or a directory to search recursively. For piped input, use `-` and select its format with `--stdin-format md` or `--stdin-format rst`. Brainlint checks one language per run. Add `--lang ru` for Russian.
56
+
57
+ For a repeatable review, add `--record review.json` when checking an article. To review that version offline, run:
58
+
59
+ ```sh
60
+ uv run brainlint check article.md --backend replay --fixtures review.json
61
+ ```
62
+
63
+ The recording must cover the sentences you check. After an edit, use the OpenAI backend to extract the new text. It caches responses by model, prompt version and reader context in `~/.cache/brainlint`. Set `BRAINLINT_CACHE` to choose another directory.
64
+
65
+ Use `BRAINLINT_OFFLINE=1` for a cache-only run. Recovery requires a complete recording of the article. If you have one in the older format, you can select it when a partial newer recording causes a miss:
66
+
67
+ ```sh
68
+ BRAINLINT_OFFLINE=1 BRAINLINT_OFFLINE_VERSION=extract-v2 uv run brainlint check article.md
69
+ ```
70
+
71
+ Use `extract-v3` to select that version instead. Without a selector, Brainlint looks for the current version first and falls back to the older one on a miss. Each hit must match the full request context.
72
+
73
+ The reference explains each rule, the Python API and the recording format. Optional checks can add model requests. [Configuration and rule reference](docs/reference.md) · [Default settings](src/brainlint/defaults.yaml) · [Decision-layer comparison](docs/research/decider-comparison.md) · [Decision on optional rules](https://github.com/kmmbvnr/brainlint/issues/24#issuecomment-7410897357)
74
+
75
+ For the reader model and its assumptions, see the concept and methodology. Contributors can find the test and review process in the team workflow. [Concept](docs/CONCEPT.md) · [Methodology](docs/METHODOLOGY.md) · [Team workflow](docs/WORKFLOW.md) · [OpenAI data controls](https://developers.openai.com/api/docs/guides/your-data)
@@ -0,0 +1,75 @@
1
+ # Airlint: a reviewer’s guide
2
+
3
+ [Repository snapshot: `0e82956fe4bcc44a1b639ad668623e3794c0007b`](https://github.com/kmmbvnr/airlint/tree/0e82956fe4bcc44a1b639ad668623e3794c0007b)
4
+
5
+ Airlint is a Python linter for prose meant to be read aloud. It marks passages where a reader might stumble over a word junction, run short of breath, or settle into a repetitive cadence. It checks US English by default and Russian with `--lang ru`. A finding is an invitation to **read the marked passage aloud**, not a grammatical error or a prediction about a particular speaker.
6
+
7
+ ## Start with one finding
8
+
9
+ From a checkout of the pinned commit, use Python 3.12 or newer and `uv`:
10
+
11
+ ```sh
12
+ uv sync
13
+ echo "The sixth strict test is over." | uv run airlint check --backend rules -
14
+ ```
15
+
16
+ The expected finding starts at column 5 and names both words: `ART001 Hard junction: at least 6 consecutive consonants in “sixth strict”`. The difficulty is at the transition between words, not in the spelling of *sixth* alone. Try “We finished the sixth of the strict tests.” Separating the words clears the warning.
17
+
18
+ This example exercises pronunciation lookup, a rule decision, and source-location reporting without requiring a speech model. To inspect a longer passage, run `uv run airlint check draft.md --backend rules --explain`. The timeline shows each predicted breath group’s duration and air use. Exit status `1` means the check **completed with findings**; `0` means no findings and `2` means an error.
19
+
20
+ ## How a draft becomes a diagnostic
21
+
22
+ | Stage | Where to look | What matters in review |
23
+ |---|---|---|
24
+ | Select readable text | `src/airlint/sources.py`, `rst.py`, `structure.py` | TXT, Markdown, and reStructuredText are inputs, but not everything on the page is spoken. Markdown code is blanked rather than deleted so later offsets do not shift. Headings and list items introduce reading boundaries even without punctuation. The RST reader does not execute directives or follow includes. |
25
+ | Build a spoken representation | `src/airlint/lang/`, `phonetics.py` | Both language backends produce paragraphs, sentences, tokens, pauses, syllables, and phonemes. Multiple spoken tokens can share one written span: expanding a time such as `9:05` must not move a warning later in the line. |
26
+ | Estimate a reading | `src/airlint/engine.py`, `syntax.py`, language-specific `syntax.py` or `parse.py` and `tts.py` | Speech sounds take time and spend simulated air. Punctuation supplies pauses; syntax can permit a breath where punctuation alone would not. Optional model predictions change the timing evidence and add pitch. |
27
+ | Decide what to flag | `src/airlint/linter.py`, `rules/registry.py`, `rules/`, `lang/en/rules.py` | The linter runs enabled checks. A rule ID identifies an editorial concern across languages; the evidence needed to trigger it can be language-specific. |
28
+ | Report against the original | `src/airlint/diagnostics.py`, `report.py`, `breath_map.py`, `cli.py` | Text and JSON identify source spans; HTML shows findings in context and SVG shows the breath timeline. Offsets count Unicode code points in the decoded original, with any UTF-8 BOM removed. Lines and columns start at 1. |
29
+
30
+ The Python API exposes two useful views of the same draft. `airlint.check_text(text)` returns diagnostics; `airlint.analyze_text(text)` exposes breath groups and a reading summary. If a rhythm finding looks wrong, inspect the groups first: an unexpected boundary upstream can change the result even when the rhythm detector is working as designed.
31
+
32
+ ## What the rules measure
33
+
34
+ | Family | Question | Checks |
35
+ |---|---|---|
36
+ | **AIR** | Can the phrase be carried comfortably? | `AIR001` flags excessive breath demand; `AIR002` flags a long insertion between a subject and its predicate. |
37
+ | **ART** | Which sounds make this passage hard to articulate? | `ART001` checks consonant junctions, `ART002` recurring consonant patterns, and `ART003` stress clashes or long unstressed runs. |
38
+ | **RHY** | What repeats across the reading? | `RHY001` looks for a run of short, chopped groups; `RHY002` for excessive pause time; `RHY003` for repeated falling cadences; `RHY004` for groups of nearly equal duration. Dialogue and list modes relax rhythm checks so intentional short lines are not treated like continuous prose. |
39
+ | **PRO** | Do successive sentences have unusually similar melodies? | `PRO001` compares predicted pitch contour, pitch range, and sentence duration. Without an active speech model it produces no finding. |
40
+
41
+ A **breath group** is speech between two simulated refills, not necessarily a sentence or the text between commas. The default tank holds eight seconds of neutral speech. Sounds spend air at different rates, a full stop resets the tank, and some boundaries offer only a partial refill. A group can therefore exhaust its air in less than eight seconds. This distinction matters when reviewing a threshold change: changing tank capacity is not the same as changing the maximum permitted group duration.
42
+
43
+ ## Language, backend, and configuration
44
+
45
+ **US English** uses pySBD sentence spans, spoken expansions for numerals, and a bundled CMU pronunciation dictionary. A word with unknown pronunciation still contributes estimated time to the breath budget, but that estimate is not evidence of a consonant clash. English articulation checks abstain on guessed or unknown readings; for dictionary variants, a finding must hold across the readings. The base syntax checks recognize delimited modifiers; an explicitly installed spaCy model adds dependency-based checks.
46
+
47
+ **Russian** uses razdel segmentation, normalization of written forms, contextual stress placement and `ё` restoration, then rule-based grapheme-to-phoneme conversion. Pronunciation at a word boundary matters: a vowelless preposition can belong to the following phonological word. The default dependency parser is spaCy, with Stanza available as an alternative. Russian stress and parser resources may require first-use downloads; consult the [setup guide](docs/guide.md) before an offline review.
48
+
49
+ Timing is a separate choice from language or parser:
50
+
51
+ - `--backend rules` forces rule-based durations. Use it to compare changes without the result depending on a locally cached timing model.
52
+ - `--backend auto` uses Kokoro for English or Silero for Russian when available, otherwise warns and falls back to rules.
53
+ - `--backend tts` requires the matching runtime and model. Use it when testing pitch or model-specific timing: a silent fallback would test the wrong behavior.
54
+
55
+ For a reproducible report, record the language, mode, configuration, and **effective** backend. JSON exposes `summary.duration_backend`; English also reports `syntax_backend`. Packaged settings live in `src/airlint/defaults.yaml` and `src/airlint/lang/en/defaults.yaml`. A user YAML file can override individual settings, and explicit CLI flags take precedence. Unknown keys and rule IDs are errors.
56
+
57
+ ## Reviewing a change: behavior versus evidence
58
+
59
+ Start with the [golden cases](tests/golden/cases/) for an observable contract. For example, compare `air001-bureaucratic-no-punctuation.yaml` with `air001-bureaucratic-split.yaml`, then inspect the clause-comma and tight-comma cases. Together they ask a better question than “does a long passage warn?”: **does an edit that gives the reader a plausible breath change the result, without treating every comma as an inhale?** Focused tests under `tests/` cover the engine, language pipelines, CLI, source positions, configuration, and packaging.
60
+
61
+ Run the development checks from the repository root:
62
+
63
+ ```sh
64
+ uv run pytest
65
+ uv run ruff check .
66
+ uv run ruff format --check .
67
+ ```
68
+
69
+ Passing tests establish implemented behavior, not editorial usefulness. For a rule or calibration change, follow the evidence beyond `tests/`:
70
+
71
+ - [Examples](examples/README.md) pair before-and-after drafts with saved output so a reviewer can read the edit and inspect what changed.
72
+ - [QA](qa/README.md) contains the rubric, smoke checks, control passages, gold texts, ratings, and acceptance reports. `qa/llm-baseline/` is a comparison dataset and scoring workflow, not the runtime linter.
73
+ - [Research parameters](docs/research/parameters.yaml) and the [literature review](docs/research/literature.md) distinguish published observations from Airlint’s editorial thresholds. `docs/research/spikes/` holds experiments and their outputs; use `src/airlint/` to determine what actually ships.
74
+
75
+ In particular, do not assume synthetic timing is closer to human timing merely because it comes from a speech model. On 120 independent English recordings, Kokoro found 31 of 45 qualifying punctuation gaps but predicted 31 others readers did not take; mean absolute word-duration error was 89 ms with Kokoro versus 71 ms with rules. The [English acceptance report](qa/reports/224-english-acceptance.md) and [recorded-timing notes](docs/research/english-recorded-timing.md) are useful companions to the tests. A warning that clears on a deliberately difficult example demonstrates a working distinction; how often it helps an editor with an ordinary draft remains a separate question.
@@ -0,0 +1,210 @@
1
+ # Airlint: Repository Guide for Reviewers
2
+
3
+ ## 1. What this project does
4
+
5
+ Airlint is a Python linter for prose that may be difficult to read aloud. It analyzes a draft and reports possible trouble spots: breath groups that run too long, awkward sound sequences, or repetitive timing and intonation.
6
+
7
+ It supports **US English** by default and **Russian** with `--lang ru`. It is an editorial aid, not a proofreader: a warning is a prompt to read a passage aloud, not a claim that the passage is objectively wrong.
8
+
9
+ The main entry points are:
10
+
11
+ - CLI: `airlint check ...`
12
+ - Python API: `airlint.check_text(...)` and `airlint.analyze_text(...)`
13
+ - Rules registry: `airlint.rules.REGISTRY`
14
+
15
+ For a quick product overview, start with [`README.md`](README.md). For user-facing behavior and setup details, see [`docs/guide.md`](docs/guide.md).
16
+
17
+ ## 2. How to read the repository
18
+
19
+ The code and documentation fall into four broad areas:
20
+
21
+ 1. **Runtime package** — `src/airlint/` implements input handling, language processing, timing, rules, and reports.
22
+ 2. **Tests** — `tests/` checks APIs, CLI behavior, language pipelines, individual rules, and representative expected results.
23
+ 3. **Evaluation and research** — `qa/` and `docs/research/` contain datasets, human ratings, recorded-pause comparisons, calibration scripts, and research notes.
24
+ 4. **Project and contributor guidance** — `README.md`, `docs/`, `AGENTS.md`, `pyproject.toml`, and `.github/workflows/`.
25
+
26
+ A helpful reading order for a new reviewer is:
27
+
28
+ 1. `README.md`
29
+ 2. `docs/CONCEPT.md` and `docs/METHODOLOGY.md`
30
+ 3. `docs/WORKFLOW.md` and `AGENTS.md`
31
+ 4. `docs/guide.md`
32
+ 5. The relevant pipeline and rule modules under `src/airlint/`
33
+ 6. Matching tests, golden cases, and QA reports
34
+
35
+ The repository contains many research artifacts and QA records. They are part of the project’s evidence and development history, but they are not all runtime dependencies or part of the regular user workflow.
36
+
37
+ ## 3. The analysis pipeline
38
+
39
+ At a high level, Airlint transforms a source document into a reading model and runs rules over that model:
40
+
41
+ ```text
42
+ source file
43
+ → readable-text extraction and document structure
44
+ → language-specific segmentation and normalization
45
+ → pronunciation, stress, and phonetic representation
46
+ → optional syntax annotations
47
+ → timing, pauses, and simulated breath groups
48
+ → editorial rules
49
+ → diagnostics and reports
50
+ ```
51
+
52
+ The important design constraint is that diagnostics refer to the **original source text**. Offsets are Unicode code-point indices into the decoded text; line and column numbers are 1-based.
53
+
54
+ ### Input and structure
55
+
56
+ - `sources.py` preserves original text while blanking non-prose regions for analysis. Markdown code, front matter, comments, and structural markers can be excluded without shifting offsets.
57
+ - `structure.py` converts document boundaries—such as Markdown paragraphs, list items, and table cells—into reading pauses.
58
+ - `rst.py` extracts readable reStructuredText without executing directives or resolving references.
59
+
60
+ ### Language backends
61
+
62
+ Language-specific processing is behind a backend interface so rules can operate on shared reading data.
63
+
64
+ - `lang/en/` handles US English segmentation, CMUdict pronunciations, syntax, rule-based editorial checks, and optional Kokoro predictions.
65
+ - `lang/ru/` handles Russian segmentation, normalization, stress, grapheme-to-phoneme conversion, parsing, and optional Silero predictions.
66
+ - `lang/base.py` defines the shared backend interface; `lang/__init__.py` provides backend lookup.
67
+
68
+ The common data model is in `phonetics.py`. It represents text as paragraphs and sentences containing tokens and pauses; tokens contain syllables and phonemes. Items carry source offsets. Expanded forms—such as a number spoken as several words—can share the offsets of the original written form.
69
+
70
+ ### Timing and breath groups
71
+
72
+ `engine.py` implements the rule-based “leaky air tank” model. Phoneme duration and air cost depend on configured values such as phoneme class, stress, and phrase position. Pauses consume time and may refill the simulated tank. The resulting breath groups and timeline feed several rules.
73
+
74
+ Optional speech-model backends can provide predicted timing and, in supported cases, pitch. They are opt-in or selected through backend configuration; they are not needed for the basic rules-based analysis.
75
+
76
+ ### Rules and output
77
+
78
+ Rules are registered in `rules/registry.py`. The registry also allows reserved rules to be listed before they are implemented. Implemented rules live mainly in:
79
+
80
+ - `rules/air.py` — breath-related checks
81
+ - `rules/rhy.py` — rhythm checks
82
+ - `rules/art.py` — articulation and stress-pattern checks
83
+ - `rules/pro.py` — pitch-contour monotony
84
+
85
+ `linter.py` runs enabled rules against a text. `diagnostics.py` defines findings and source-position mapping; `report.py` and `breath_map.py` produce output formats and visual timelines.
86
+
87
+ ## 4. Rule families
88
+
89
+ The rule identifiers describe different kinds of possible reading friction:
90
+
91
+ | Prefix | Focus | Examples |
92
+ |---|---|---|
93
+ | `AIR` | Breath demand and phrasing | A breath group may exceed the configured limit; a long subject-to-verb insertion may be hard to hold in memory. |
94
+ | `RHY` | Rhythm and pauses | A passage may be unusually choppy, pause-heavy, cadence-heavy, or mechanically even. |
95
+ | `ART` | Articulation | A word junction may create a dense consonant sequence, repeated onset, or difficult stress pattern. |
96
+ | `PRO` | Pitch and intonation | A sequence of sentences may have overly similar predicted pitch contours; this requires an active pitch-capable backend. |
97
+
98
+ Rule thresholds and other numerical defaults are configuration, not scattered constants. The defaults are in `src/airlint/defaults.yaml` and the English-specific defaults are in `src/airlint/lang/en/defaults.yaml`.
99
+
100
+ The documentation distinguishes measured evidence from editorial choices. For example, research findings inform breath-duration defaults, but the chosen warning threshold remains a configurable heuristic. See `docs/research/parameters.yaml` for the parameter inventory and supporting notes.
101
+
102
+ ## 5. CLI and public API
103
+
104
+ The guide documents the full CLI. Typical commands are:
105
+
106
+ ```sh
107
+ airlint check draft.md
108
+ airlint check draft.md --explain
109
+ airlint check draft.md --format json
110
+ airlint check --lang ru draft.txt
111
+ ```
112
+
113
+ The CLI can report text, JSON, HTML, or SVG output. Its documented exit codes are `0` for no findings, `1` when findings are present, and `2` for an error.
114
+
115
+ The Python API is intended for embedding the same analysis in other tools:
116
+
117
+ ```python
118
+ import airlint
119
+
120
+ diagnostics = airlint.check_text("The gate is open.")
121
+ reading = airlint.analyze_text("She entered the room. Rain fell outside.")
122
+ ```
123
+
124
+ `check_text` returns diagnostics. `analyze_text` exposes the reading model, including breath groups and summary data. See `docs/guide.md` for configuration and API details.
125
+
126
+ ## 6. Optional models and external components
127
+
128
+ The base installation is designed to work with rules-based timing. Optional components add model-backed behavior or parsing:
129
+
130
+ - English neural timing and pitch use Kokoro.
131
+ - Russian neural timing and pitch use Silero.
132
+ - Russian stress placement can use RUAccent or Silero stress.
133
+ - Syntax analysis can use spaCy; Stanza is also documented for Russian.
134
+ - Some English pronunciation and segmentation resources are bundled or installed as dependencies.
135
+
136
+ Model setup and offline behavior are documented in the guide. In particular, model downloads use an explicit cache and are not intended to happen silently during ordinary checks. Review dependency and model changes carefully for size, licensing, download behavior, and reproducibility.
137
+
138
+ ## 7. Tests, QA, and research
139
+
140
+ ### Tests
141
+
142
+ `tests/` includes:
143
+
144
+ - unit and integration coverage for rules, configuration, CLI, APIs, and source handling;
145
+ - language-pipeline tests for English and Russian;
146
+ - golden cases under `tests/golden/`, which pair representative inputs with expected outcomes.
147
+
148
+ When changing a rule, inspect both its implementation and its focused tests or golden cases. When changing offsets, parsing, document extraction, or normalization, also consider tests for source positions and line/column mapping.
149
+
150
+ ### QA and evaluation
151
+
152
+ `qa/` contains material for evaluating behavior beyond ordinary unit tests:
153
+
154
+ - acceptance rubrics and smoke-test guidance;
155
+ - control texts and human-rated material;
156
+ - evaluation and scoring scripts;
157
+ - stored baselines and measurements;
158
+ - reports on specific rule families, languages, and calibration runs.
159
+
160
+ These assets are especially relevant when a change alters thresholds, model behavior, or the balance between missed warnings and false positives. Read the protocol or report associated with a dataset before interpreting its scores.
161
+
162
+ ### Research
163
+
164
+ `docs/research/` documents the evidence, assumptions, and experiments behind timing, phrasing, articulation, and rhythm. The `spikes/` subdirectory contains exploratory scripts, sample inputs, model comparisons, and recorded outputs. Treat these as research artifacts unless a document or code path explicitly connects them to runtime behavior.
165
+
166
+ The `docs/marketing/` directory contains draft outreach and promotional materials; it is not part of the implementation or evaluation pipeline.
167
+
168
+ ## 8. Development and CI
169
+
170
+ The project requires Python 3.12 or newer. The repository uses `uv` for local environment management and includes `uv.lock` for dependency resolution.
171
+
172
+ The guide lists the standard checks:
173
+
174
+ ```sh
175
+ uv run pytest
176
+ uv run ruff check . && uv run ruff format --check .
177
+ ```
178
+
179
+ CI configuration is in `.github/workflows/ci.yml`; the demo workflow is in `.github/workflows/demo.yml`. Check the workflow files for the exact commands and triggers used at this commit.
180
+
181
+ Before making changes, read `AGENTS.md` and `docs/WORKFLOW.md` for repository-specific working conventions. `docs/CONCEPT.md` and `docs/METHODOLOGY.md` explain the intended product and analytical approach; use them to distinguish a deliberate design choice from an implementation defect.
182
+
183
+ ## 9. Reviewer checklist
184
+
185
+ When reviewing a change, consider the following:
186
+
187
+ - **Scope:** Is this a runtime change, a rule change, a documentation update, or an experiment?
188
+ - **Source fidelity:** Do diagnostics still point to the correct original text after normalization, expansion, or document filtering?
189
+ - **Language boundaries:** Does a shared change preserve both English and Russian behavior? Is language-specific logic kept in its backend where appropriate?
190
+ - **Configuration:** Are defaults and thresholds configured consistently? Are invalid or unknown settings rejected as documented?
191
+ - **Model behavior:** Does the change preserve offline operation and make model requirements clear?
192
+ - **Evidence:** Is a threshold or claimed improvement supported by relevant tests, controls, or evaluation reports?
193
+ - **False positives:** Could the rule flag acceptable prose, dialogue, lists, or literary forms? Are abstention cases handled appropriately?
194
+ - **Output compatibility:** Are CLI exit codes, diagnostic fields, and report formats still consistent?
195
+ - **Tests:** Do focused tests and golden cases cover the changed behavior, including relevant edge cases?
196
+
197
+ ## 10. Repository map
198
+
199
+ | Path | Purpose |
200
+ |---|---|
201
+ | `src/airlint/` | Runtime package |
202
+ | `src/airlint/lang/` | Shared language interface and English/Russian implementations |
203
+ | `src/airlint/rules/` | Built-in checks and registry |
204
+ | `tests/` | Automated tests and golden cases |
205
+ | `qa/` | Acceptance data, scoring tools, ratings, and reports |
206
+ | `docs/research/` | Methodology, evidence, calibration, and exploratory experiments |
207
+ | `docs/marketing/` | Draft communications and promotional content |
208
+ | `examples/` | Demonstrations and before/after samples |
209
+ | `.github/workflows/` | CI and demo automation |
210
+ | `pyproject.toml`, `uv.lock` | Project metadata and locked dependencies |