@r1z4x/tezgah 1.9.2 → 1.11.0

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 (426) hide show
  1. package/CHANGELOG.md +83 -1
  2. package/MANIFEST +382 -144
  3. package/README.de.md +1 -1
  4. package/README.es.md +1 -1
  5. package/README.fr.md +1 -1
  6. package/README.md +1 -1
  7. package/README.tr.md +1 -1
  8. package/bin/codegen +5 -2
  9. package/bin/tezgah-design +288 -1
  10. package/bin/tezgah-docs +1 -1
  11. package/bin/tezgah-doctor +39 -2
  12. package/bin/tezgah-import-ai-research +26 -12
  13. package/bin/tezgah-ocr-review +296 -0
  14. package/bin/tezgah-research +216 -40
  15. package/bin/tezgah-review-quote +185 -0
  16. package/bin/tezgah-setup +136 -33
  17. package/bin/tezgah-skill +1 -1
  18. package/bin/tezgah-status +201 -3
  19. package/bin/tezgah-task +203 -3
  20. package/commands/adhd.md +2 -2
  21. package/commands/ponytail.md +4 -4
  22. package/docs/architecture.md +2 -2
  23. package/docs/citations-baseline.json +2 -2
  24. package/docs/clarity-baseline.json +2 -2
  25. package/docs/contract.md +87 -42
  26. package/docs/environment.md +2 -0
  27. package/docs/evidence.md +28 -9
  28. package/docs/feature-audit.md +2 -2
  29. package/docs/gate.md +54 -31
  30. package/docs/glossary.md +5 -2
  31. package/docs/hosts.md +17 -3
  32. package/docs/index.json +34 -8
  33. package/docs/judge.md +4 -2
  34. package/docs/layers.md +3 -3
  35. package/docs/models.md +31 -9
  36. package/docs/operations.md +126 -1
  37. package/docs/research.md +786 -5
  38. package/docs/skills.md +137 -13
  39. package/docs/status-line.md +115 -1
  40. package/hooks/hooks.json +1 -1
  41. package/hooks/lang/en.json +10 -0
  42. package/hooks/lang/tr.json +11 -1
  43. package/hooks/tezgah_agents.py +38 -22
  44. package/hooks/tezgah_apps.py +18 -0
  45. package/hooks/tezgah_components.py +4 -0
  46. package/hooks/tezgah_context.py +189 -50
  47. package/hooks/tezgah_extension.py +337 -0
  48. package/hooks/tezgah_gate.py +188 -56
  49. package/hooks/tezgah_integrity.py +652 -105
  50. package/hooks/tezgah_judge.py +6 -4
  51. package/hooks/tezgah_models.py +59 -19
  52. package/hooks/tezgah_orca.py +1 -1
  53. package/hooks/tezgah_paths.py +102 -6
  54. package/hooks/tezgah_policy.py +94 -45
  55. package/hooks/tezgah_rank.py +9 -6
  56. package/hooks/tezgah_replay.py +4 -4
  57. package/hooks/tezgah_research.py +1260 -65
  58. package/hooks/tezgah_research_capture.py +1544 -0
  59. package/hooks/tezgah_research_evidence.py +842 -0
  60. package/hooks/tezgah_research_stats.py +258 -0
  61. package/hooks/tezgah_skill_pick.py +408 -106
  62. package/hooks/tezgah_stopspec.py +8 -1
  63. package/hooks/tezgah_task.py +12 -4
  64. package/hooks/tezgah_taste_ledger.py +1 -1
  65. package/hosts/cursor/hook.py +29 -2
  66. package/hosts/opencode/plugins/tezgah.js +307 -46
  67. package/hosts/opencode/tui/cli/tui.tsx +100 -0
  68. package/hosts/opencode/tui/tezgah-tui.tsx +2 -1
  69. package/output-styles/tezgah.md +10 -10
  70. package/package.json +1 -1
  71. package/skills/ai-research/SKILL.md +21 -14
  72. package/skills/ai-research/SOURCE +7 -5
  73. package/skills/ai-research/index/1-frame.md +6 -6
  74. package/skills/ai-research/index/2-data.md +9 -9
  75. package/skills/ai-research/index/3-train.md +36 -36
  76. package/skills/ai-research/index/4-measure.md +13 -13
  77. package/skills/ai-research/index/5-run.md +11 -11
  78. package/skills/ai-research/index/6-write.md +23 -23
  79. package/skills/ai-research/library.json +104 -104
  80. package/skills/analyze-app/SKILL.md +17 -12
  81. package/skills/design-contract/SKILL.md +42 -7
  82. package/skills/design-contract/data-views.md +2 -2
  83. package/skills/design-library/EVALS.md +1 -1
  84. package/skills/design-library/INDEX.md +39 -39
  85. package/skills/design-library/SKILL.md +19 -13
  86. package/skills/design-library/SOURCE +45 -43
  87. package/skills/feature-audit/SKILL.md +20 -14
  88. package/skills/hallmark/LICENSE +21 -0
  89. package/skills/hallmark/SKILL.md +154 -0
  90. package/skills/hallmark/SOURCE +207 -0
  91. package/skills/hallmark/agents/openai.yaml +13 -0
  92. package/skills/hallmark/references/anatomy.md +71 -0
  93. package/skills/hallmark/references/brand-truth.md +40 -0
  94. package/skills/hallmark/references/comp.md +104 -0
  95. package/skills/hallmark/references/craft.md +116 -0
  96. package/skills/hallmark/references/dark-mode.md +49 -0
  97. package/skills/hallmark/references/data-viz.md +48 -0
  98. package/skills/hallmark/references/design-md.md +53 -0
  99. package/skills/hallmark/references/direction.md +52 -0
  100. package/skills/hallmark/references/export-formats.md +80 -0
  101. package/skills/hallmark/references/flow.md +131 -0
  102. package/skills/hallmark/references/fonts.md +58 -0
  103. package/skills/hallmark/references/gates.md +243 -0
  104. package/skills/hallmark/references/genres/atmospheric.md +24 -0
  105. package/skills/hallmark/references/genres/editorial.md +24 -0
  106. package/skills/hallmark/references/genres/modern-minimal.md +24 -0
  107. package/skills/hallmark/references/genres/playful.md +24 -0
  108. package/skills/hallmark/references/imagery.md +99 -0
  109. package/skills/hallmark/references/interaction-and-states.md +89 -0
  110. package/skills/hallmark/references/layout.md +104 -0
  111. package/skills/hallmark/references/macrostructures/01-bento-grid.md +21 -0
  112. package/skills/hallmark/references/macrostructures/02-long-document.md +35 -0
  113. package/skills/hallmark/references/macrostructures/03-marquee-hero.md +21 -0
  114. package/skills/hallmark/references/macrostructures/04-stat-led.md +21 -0
  115. package/skills/hallmark/references/macrostructures/05-workbench.md +21 -0
  116. package/skills/hallmark/references/macrostructures/06-conversational-faq.md +28 -0
  117. package/skills/hallmark/references/macrostructures/07-manifesto.md +28 -0
  118. package/skills/hallmark/references/macrostructures/08-photographic.md +21 -0
  119. package/skills/hallmark/references/macrostructures/09-quote-led.md +21 -0
  120. package/skills/hallmark/references/macrostructures/10-specimen.md +21 -0
  121. package/skills/hallmark/references/macrostructures/11-catalogue.md +21 -0
  122. package/skills/hallmark/references/macrostructures/12-letter.md +21 -0
  123. package/skills/hallmark/references/macrostructures/13-index-first.md +21 -0
  124. package/skills/hallmark/references/macrostructures/14-narrative-workflow.md +21 -0
  125. package/skills/hallmark/references/macrostructures/15-split-studio.md +21 -0
  126. package/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
  127. package/skills/hallmark/references/macrostructures/17-type-specimen.md +19 -0
  128. package/skills/hallmark/references/macrostructures/18-portfolio-grid.md +21 -0
  129. package/skills/hallmark/references/macrostructures/19-map-diagram.md +21 -0
  130. package/skills/hallmark/references/macrostructures/20-ecosystem-index.md +19 -0
  131. package/skills/hallmark/references/macrostructures/21-component-playground.md +21 -0
  132. package/skills/hallmark/references/macrostructures.md +119 -0
  133. package/skills/hallmark/references/microinteractions.md +80 -0
  134. package/skills/hallmark/references/patterns.md +202 -0
  135. package/skills/hallmark/references/redesign.md +88 -0
  136. package/skills/hallmark/references/responsive.md +46 -0
  137. package/skills/hallmark/references/review-finish.md +19 -0
  138. package/skills/hallmark/references/review-hero.md +20 -0
  139. package/skills/hallmark/references/scroll-choreography.md +110 -0
  140. package/skills/hallmark/references/texture.md +90 -0
  141. package/skills/hallmark/references/themes/README.md +58 -0
  142. package/skills/hallmark/references/themes/almanac.jpg +0 -0
  143. package/skills/hallmark/references/themes/almanac.md +103 -0
  144. package/skills/hallmark/references/themes/arcade.jpg +0 -0
  145. package/skills/hallmark/references/themes/arcade.md +102 -0
  146. package/skills/hallmark/references/themes/atelier.jpg +0 -0
  147. package/skills/hallmark/references/themes/atelier.md +98 -0
  148. package/skills/hallmark/references/themes/bloom.jpg +0 -0
  149. package/skills/hallmark/references/themes/bloom.md +102 -0
  150. package/skills/hallmark/references/themes/blueprint.jpg +0 -0
  151. package/skills/hallmark/references/themes/blueprint.md +103 -0
  152. package/skills/hallmark/references/themes/broadside.jpg +0 -0
  153. package/skills/hallmark/references/themes/broadside.md +108 -0
  154. package/skills/hallmark/references/themes/brutal.jpg +0 -0
  155. package/skills/hallmark/references/themes/brutal.md +95 -0
  156. package/skills/hallmark/references/themes/carnival.jpg +0 -0
  157. package/skills/hallmark/references/themes/carnival.md +104 -0
  158. package/skills/hallmark/references/themes/cobalt.jpg +0 -0
  159. package/skills/hallmark/references/themes/cobalt.md +101 -0
  160. package/skills/hallmark/references/themes/console.jpg +0 -0
  161. package/skills/hallmark/references/themes/console.md +99 -0
  162. package/skills/hallmark/references/themes/coral.jpg +0 -0
  163. package/skills/hallmark/references/themes/coral.md +102 -0
  164. package/skills/hallmark/references/themes/darkroom.jpg +0 -0
  165. package/skills/hallmark/references/themes/darkroom.md +99 -0
  166. package/skills/hallmark/references/themes/dose.jpg +0 -0
  167. package/skills/hallmark/references/themes/dose.md +98 -0
  168. package/skills/hallmark/references/themes/dusk.jpg +0 -0
  169. package/skills/hallmark/references/themes/dusk.md +105 -0
  170. package/skills/hallmark/references/themes/editorial.jpg +0 -0
  171. package/skills/hallmark/references/themes/editorial.md +97 -0
  172. package/skills/hallmark/references/themes/formwork.jpg +0 -0
  173. package/skills/hallmark/references/themes/formwork.md +107 -0
  174. package/skills/hallmark/references/themes/furrow.jpg +0 -0
  175. package/skills/hallmark/references/themes/furrow.md +98 -0
  176. package/skills/hallmark/references/themes/garden.jpg +0 -0
  177. package/skills/hallmark/references/themes/garden.md +97 -0
  178. package/skills/hallmark/references/themes/grid.jpg +0 -0
  179. package/skills/hallmark/references/themes/grid.md +101 -0
  180. package/skills/hallmark/references/themes/halftone.jpg +0 -0
  181. package/skills/hallmark/references/themes/halftone.md +106 -0
  182. package/skills/hallmark/references/themes/hedgerow.jpg +0 -0
  183. package/skills/hallmark/references/themes/hedgerow.md +104 -0
  184. package/skills/hallmark/references/themes/hum.jpg +0 -0
  185. package/skills/hallmark/references/themes/hum.md +99 -0
  186. package/skills/hallmark/references/themes/index.json +2191 -0
  187. package/skills/hallmark/references/themes/ink.jpg +0 -0
  188. package/skills/hallmark/references/themes/ink.md +106 -0
  189. package/skills/hallmark/references/themes/kiln.jpg +0 -0
  190. package/skills/hallmark/references/themes/kiln.md +108 -0
  191. package/skills/hallmark/references/themes/loom.jpg +0 -0
  192. package/skills/hallmark/references/themes/loom.md +106 -0
  193. package/skills/hallmark/references/themes/lumen.jpg +0 -0
  194. package/skills/hallmark/references/themes/lumen.md +103 -0
  195. package/skills/hallmark/references/themes/manifesto.jpg +0 -0
  196. package/skills/hallmark/references/themes/manifesto.md +101 -0
  197. package/skills/hallmark/references/themes/midnight.jpg +0 -0
  198. package/skills/hallmark/references/themes/midnight.md +97 -0
  199. package/skills/hallmark/references/themes/newsprint.jpg +0 -0
  200. package/skills/hallmark/references/themes/newsprint.md +102 -0
  201. package/skills/hallmark/references/themes/overprint.jpg +0 -0
  202. package/skills/hallmark/references/themes/overprint.md +101 -0
  203. package/skills/hallmark/references/themes/pasteup.jpg +0 -0
  204. package/skills/hallmark/references/themes/pasteup.md +100 -0
  205. package/skills/hallmark/references/themes/piste.jpg +0 -0
  206. package/skills/hallmark/references/themes/piste.md +99 -0
  207. package/skills/hallmark/references/themes/ribbon.jpg +0 -0
  208. package/skills/hallmark/references/themes/ribbon.md +106 -0
  209. package/skills/hallmark/references/themes/rim.jpg +0 -0
  210. package/skills/hallmark/references/themes/rim.md +96 -0
  211. package/skills/hallmark/references/themes/riso.jpg +0 -0
  212. package/skills/hallmark/references/themes/riso.md +98 -0
  213. package/skills/hallmark/references/themes/solstice.jpg +0 -0
  214. package/skills/hallmark/references/themes/solstice.md +104 -0
  215. package/skills/hallmark/references/themes/specimen.jpg +0 -0
  216. package/skills/hallmark/references/themes/specimen.md +100 -0
  217. package/skills/hallmark/references/themes/spore.jpg +0 -0
  218. package/skills/hallmark/references/themes/spore.md +104 -0
  219. package/skills/hallmark/references/themes/sport.jpg +0 -0
  220. package/skills/hallmark/references/themes/sport.md +101 -0
  221. package/skills/hallmark/references/themes/squeeze.jpg +0 -0
  222. package/skills/hallmark/references/themes/squeeze.md +99 -0
  223. package/skills/hallmark/references/themes/sticker.jpg +0 -0
  224. package/skills/hallmark/references/themes/sticker.md +106 -0
  225. package/skills/hallmark/references/themes/studio.jpg +0 -0
  226. package/skills/hallmark/references/themes/studio.md +99 -0
  227. package/skills/hallmark/references/themes/terminal.jpg +0 -0
  228. package/skills/hallmark/references/themes/terminal.md +96 -0
  229. package/skills/hallmark/references/themes/terrazzo.jpg +0 -0
  230. package/skills/hallmark/references/themes/terrazzo.md +106 -0
  231. package/skills/hallmark/references/themes/ultraviolet.jpg +0 -0
  232. package/skills/hallmark/references/themes/ultraviolet.md +106 -0
  233. package/skills/hallmark/references/themes/vellum.jpg +0 -0
  234. package/skills/hallmark/references/themes/vellum.md +105 -0
  235. package/skills/hallmark/references/themes/wayfind.jpg +0 -0
  236. package/skills/hallmark/references/themes/wayfind.md +105 -0
  237. package/skills/hallmark/references/themes/werkstatt.jpg +0 -0
  238. package/skills/hallmark/references/themes/werkstatt.md +105 -0
  239. package/skills/hallmark/scripts/capture.mjs +125 -0
  240. package/skills/hallmark/scripts/fixtures/exemplars/atmospheric.html +324 -0
  241. package/skills/hallmark/scripts/fixtures/exemplars/editorial.html +363 -0
  242. package/skills/hallmark/scripts/fixtures/exemplars/modern-minimal.html +527 -0
  243. package/skills/hallmark/scripts/fixtures/exemplars/playful.html +353 -0
  244. package/skills/hallmark/scripts/fixtures/eyebrow-fail/index.html +118 -0
  245. package/skills/hallmark/scripts/fixtures/eyebrow-pass/index.html +137 -0
  246. package/skills/hallmark/scripts/fixtures/kept/after.html +27 -0
  247. package/skills/hallmark/scripts/fixtures/kept/before.html +26 -0
  248. package/skills/hallmark/scripts/fixtures/slopped.html +145 -0
  249. package/skills/hallmark/scripts/fixtures/tailwind-fail/Feature.vue +14 -0
  250. package/skills/hallmark/scripts/fixtures/tailwind-fail/Hero.tsx +33 -0
  251. package/skills/hallmark/scripts/fixtures/tailwind-fail/index.html +74 -0
  252. package/skills/hallmark/scripts/fixtures/tailwind-fail/style.css +6 -0
  253. package/skills/hallmark/scripts/fixtures/tailwind-pass/Hero.tsx +33 -0
  254. package/skills/hallmark/scripts/fixtures/tailwind-pass/index.html +57 -0
  255. package/skills/hallmark/scripts/fixtures/tailwind-pass/style.css +15 -0
  256. package/skills/hallmark/scripts/fixtures/waiver/index.html +54 -0
  257. package/skills/hallmark/scripts/imagegen.mjs +85 -0
  258. package/skills/hallmark/scripts/install-hook.mjs +70 -0
  259. package/skills/hallmark/scripts/install.mjs +141 -0
  260. package/skills/hallmark/scripts/lint-hook.mjs +49 -0
  261. package/skills/hallmark/scripts/photos.json +1 -0
  262. package/skills/hallmark/scripts/picture.mjs +71 -0
  263. package/skills/hallmark/scripts/refcheck.mjs +352 -0
  264. package/skills/hallmark/scripts/sloplint-render.mjs +1252 -0
  265. package/skills/hallmark/scripts/sloplint.mjs +4422 -0
  266. package/skills/hallmark/scripts/theme.mjs +650 -0
  267. package/skills/harness/SKILL.md +15 -8
  268. package/skills/i-have-adhd/SKILL.md +22 -11
  269. package/skills/no-ai-slop/SKILL.md +15 -1
  270. package/skills/plan-add/SKILL.md +33 -26
  271. package/skills/plan-status/SKILL.md +13 -7
  272. package/skills/plan-sync/SKILL.md +18 -12
  273. package/skills/pm-frameworks/SKILL.md +19 -10
  274. package/skills/pm-frameworks/SOURCE +7 -5
  275. package/skills/ponytail/SKILL.md +19 -14
  276. package/skills/product-analysis/SKILL.md +22 -18
  277. package/skills/product-flow/SKILL.md +14 -9
  278. package/skills/research/SKILL.md +75 -39
  279. package/skills/rl-env/SKILL.md +25 -13
  280. package/skills/rl-env/SOURCE +8 -6
  281. package/skills/tezgah-contract/SKILL.md +47 -42
  282. package/bin/tezgah-skill.py +0 -59
  283. /package/skills/ai-research/0-autoresearch-skill/{SKILL.md → ENTRY.md} +0 -0
  284. /package/skills/ai-research/01-model-architecture/litgpt/{SKILL.md → ENTRY.md} +0 -0
  285. /package/skills/ai-research/01-model-architecture/mamba/{SKILL.md → ENTRY.md} +0 -0
  286. /package/skills/ai-research/01-model-architecture/nanogpt/{SKILL.md → ENTRY.md} +0 -0
  287. /package/skills/ai-research/01-model-architecture/rwkv/{SKILL.md → ENTRY.md} +0 -0
  288. /package/skills/ai-research/01-model-architecture/torchtitan/{SKILL.md → ENTRY.md} +0 -0
  289. /package/skills/ai-research/02-tokenization/huggingface-tokenizers/{SKILL.md → ENTRY.md} +0 -0
  290. /package/skills/ai-research/02-tokenization/sentencepiece/{SKILL.md → ENTRY.md} +0 -0
  291. /package/skills/ai-research/03-fine-tuning/axolotl/{SKILL.md → ENTRY.md} +0 -0
  292. /package/skills/ai-research/03-fine-tuning/llama-factory/{SKILL.md → ENTRY.md} +0 -0
  293. /package/skills/ai-research/03-fine-tuning/peft/{SKILL.md → ENTRY.md} +0 -0
  294. /package/skills/ai-research/03-fine-tuning/unsloth/{SKILL.md → ENTRY.md} +0 -0
  295. /package/skills/ai-research/04-mechanistic-interpretability/nnsight/{SKILL.md → ENTRY.md} +0 -0
  296. /package/skills/ai-research/04-mechanistic-interpretability/pyvene/{SKILL.md → ENTRY.md} +0 -0
  297. /package/skills/ai-research/04-mechanistic-interpretability/saelens/{SKILL.md → ENTRY.md} +0 -0
  298. /package/skills/ai-research/04-mechanistic-interpretability/transformer-lens/{SKILL.md → ENTRY.md} +0 -0
  299. /package/skills/ai-research/05-data-processing/nemo-curator/{SKILL.md → ENTRY.md} +0 -0
  300. /package/skills/ai-research/05-data-processing/ray-data/{SKILL.md → ENTRY.md} +0 -0
  301. /package/skills/ai-research/06-post-training/grpo-rl-training/{SKILL.md → ENTRY.md} +0 -0
  302. /package/skills/ai-research/06-post-training/miles/{SKILL.md → ENTRY.md} +0 -0
  303. /package/skills/ai-research/06-post-training/openrlhf/{SKILL.md → ENTRY.md} +0 -0
  304. /package/skills/ai-research/06-post-training/simpo/{SKILL.md → ENTRY.md} +0 -0
  305. /package/skills/ai-research/06-post-training/slime/{SKILL.md → ENTRY.md} +0 -0
  306. /package/skills/ai-research/06-post-training/torchforge/{SKILL.md → ENTRY.md} +0 -0
  307. /package/skills/ai-research/06-post-training/trl-fine-tuning/{SKILL.md → ENTRY.md} +0 -0
  308. /package/skills/ai-research/06-post-training/verl/{SKILL.md → ENTRY.md} +0 -0
  309. /package/skills/ai-research/07-safety-alignment/constitutional-ai/{SKILL.md → ENTRY.md} +0 -0
  310. /package/skills/ai-research/07-safety-alignment/llamaguard/{SKILL.md → ENTRY.md} +0 -0
  311. /package/skills/ai-research/07-safety-alignment/nemo-guardrails/{SKILL.md → ENTRY.md} +0 -0
  312. /package/skills/ai-research/07-safety-alignment/prompt-guard/{SKILL.md → ENTRY.md} +0 -0
  313. /package/skills/ai-research/08-distributed-training/accelerate/{SKILL.md → ENTRY.md} +0 -0
  314. /package/skills/ai-research/08-distributed-training/deepspeed/{SKILL.md → ENTRY.md} +0 -0
  315. /package/skills/ai-research/08-distributed-training/megatron-core/{SKILL.md → ENTRY.md} +0 -0
  316. /package/skills/ai-research/08-distributed-training/pytorch-fsdp2/{SKILL.md → ENTRY.md} +0 -0
  317. /package/skills/ai-research/08-distributed-training/pytorch-lightning/{SKILL.md → ENTRY.md} +0 -0
  318. /package/skills/ai-research/08-distributed-training/ray-train/{SKILL.md → ENTRY.md} +0 -0
  319. /package/skills/ai-research/09-infrastructure/lambda-labs/{SKILL.md → ENTRY.md} +0 -0
  320. /package/skills/ai-research/09-infrastructure/modal/{SKILL.md → ENTRY.md} +0 -0
  321. /package/skills/ai-research/09-infrastructure/skypilot/{SKILL.md → ENTRY.md} +0 -0
  322. /package/skills/ai-research/10-optimization/awq/{SKILL.md → ENTRY.md} +0 -0
  323. /package/skills/ai-research/10-optimization/bitsandbytes/{SKILL.md → ENTRY.md} +0 -0
  324. /package/skills/ai-research/10-optimization/flash-attention/{SKILL.md → ENTRY.md} +0 -0
  325. /package/skills/ai-research/10-optimization/gguf/{SKILL.md → ENTRY.md} +0 -0
  326. /package/skills/ai-research/10-optimization/gptq/{SKILL.md → ENTRY.md} +0 -0
  327. /package/skills/ai-research/10-optimization/hqq/{SKILL.md → ENTRY.md} +0 -0
  328. /package/skills/ai-research/10-optimization/ml-training-recipes/{SKILL.md → ENTRY.md} +0 -0
  329. /package/skills/ai-research/11-evaluation/bigcode-evaluation-harness/{SKILL.md → ENTRY.md} +0 -0
  330. /package/skills/ai-research/11-evaluation/lm-evaluation-harness/{SKILL.md → ENTRY.md} +0 -0
  331. /package/skills/ai-research/11-evaluation/nemo-evaluator/{SKILL.md → ENTRY.md} +0 -0
  332. /package/skills/ai-research/12-inference-serving/llama-cpp/{SKILL.md → ENTRY.md} +0 -0
  333. /package/skills/ai-research/12-inference-serving/sglang/{SKILL.md → ENTRY.md} +0 -0
  334. /package/skills/ai-research/12-inference-serving/tensorrt-llm/{SKILL.md → ENTRY.md} +0 -0
  335. /package/skills/ai-research/12-inference-serving/vllm/{SKILL.md → ENTRY.md} +0 -0
  336. /package/skills/ai-research/13-mlops/mlflow/{SKILL.md → ENTRY.md} +0 -0
  337. /package/skills/ai-research/13-mlops/swanlab/{SKILL.md → ENTRY.md} +0 -0
  338. /package/skills/ai-research/13-mlops/tensorboard/{SKILL.md → ENTRY.md} +0 -0
  339. /package/skills/ai-research/13-mlops/weights-and-biases/{SKILL.md → ENTRY.md} +0 -0
  340. /package/skills/ai-research/14-agents/a-evolve/{SKILL.md → ENTRY.md} +0 -0
  341. /package/skills/ai-research/14-agents/autogpt/{SKILL.md → ENTRY.md} +0 -0
  342. /package/skills/ai-research/14-agents/crewai/{SKILL.md → ENTRY.md} +0 -0
  343. /package/skills/ai-research/14-agents/langchain/{SKILL.md → ENTRY.md} +0 -0
  344. /package/skills/ai-research/14-agents/llamaindex/{SKILL.md → ENTRY.md} +0 -0
  345. /package/skills/ai-research/15-rag/chroma/{SKILL.md → ENTRY.md} +0 -0
  346. /package/skills/ai-research/15-rag/faiss/{SKILL.md → ENTRY.md} +0 -0
  347. /package/skills/ai-research/15-rag/pinecone/{SKILL.md → ENTRY.md} +0 -0
  348. /package/skills/ai-research/15-rag/qdrant/{SKILL.md → ENTRY.md} +0 -0
  349. /package/skills/ai-research/15-rag/sentence-transformers/{SKILL.md → ENTRY.md} +0 -0
  350. /package/skills/ai-research/16-prompt-engineering/dspy/{SKILL.md → ENTRY.md} +0 -0
  351. /package/skills/ai-research/16-prompt-engineering/guidance/{SKILL.md → ENTRY.md} +0 -0
  352. /package/skills/ai-research/16-prompt-engineering/instructor/{SKILL.md → ENTRY.md} +0 -0
  353. /package/skills/ai-research/16-prompt-engineering/outlines/{SKILL.md → ENTRY.md} +0 -0
  354. /package/skills/ai-research/17-observability/langsmith/{SKILL.md → ENTRY.md} +0 -0
  355. /package/skills/ai-research/17-observability/phoenix/{SKILL.md → ENTRY.md} +0 -0
  356. /package/skills/ai-research/18-multimodal/audiocraft/{SKILL.md → ENTRY.md} +0 -0
  357. /package/skills/ai-research/18-multimodal/blip-2/{SKILL.md → ENTRY.md} +0 -0
  358. /package/skills/ai-research/18-multimodal/clip/{SKILL.md → ENTRY.md} +0 -0
  359. /package/skills/ai-research/18-multimodal/cosmos-policy/{SKILL.md → ENTRY.md} +0 -0
  360. /package/skills/ai-research/18-multimodal/llava/{SKILL.md → ENTRY.md} +0 -0
  361. /package/skills/ai-research/18-multimodal/openpi/{SKILL.md → ENTRY.md} +0 -0
  362. /package/skills/ai-research/18-multimodal/openvla-oft/{SKILL.md → ENTRY.md} +0 -0
  363. /package/skills/ai-research/18-multimodal/segment-anything/{SKILL.md → ENTRY.md} +0 -0
  364. /package/skills/ai-research/18-multimodal/stable-diffusion/{SKILL.md → ENTRY.md} +0 -0
  365. /package/skills/ai-research/18-multimodal/whisper/{SKILL.md → ENTRY.md} +0 -0
  366. /package/skills/ai-research/19-emerging-techniques/knowledge-distillation/{SKILL.md → ENTRY.md} +0 -0
  367. /package/skills/ai-research/19-emerging-techniques/long-context/{SKILL.md → ENTRY.md} +0 -0
  368. /package/skills/ai-research/19-emerging-techniques/model-merging/{SKILL.md → ENTRY.md} +0 -0
  369. /package/skills/ai-research/19-emerging-techniques/model-pruning/{SKILL.md → ENTRY.md} +0 -0
  370. /package/skills/ai-research/19-emerging-techniques/moe-training/{SKILL.md → ENTRY.md} +0 -0
  371. /package/skills/ai-research/19-emerging-techniques/speculative-decoding/{SKILL.md → ENTRY.md} +0 -0
  372. /package/skills/ai-research/20-ml-paper-writing/academic-plotting/{SKILL.md → ENTRY.md} +0 -0
  373. /package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/{SKILL.md → ENTRY.md} +0 -0
  374. /package/skills/ai-research/20-ml-paper-writing/presenting-conference-talks/{SKILL.md → ENTRY.md} +0 -0
  375. /package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/{SKILL.md → ENTRY.md} +0 -0
  376. /package/skills/ai-research/21-research-ideation/brainstorming-research-ideas/{SKILL.md → ENTRY.md} +0 -0
  377. /package/skills/ai-research/21-research-ideation/creative-thinking-for-research/{SKILL.md → ENTRY.md} +0 -0
  378. /package/skills/ai-research/22-agent-native-research-artifact/compiler/{SKILL.md → ENTRY.md} +0 -0
  379. /package/skills/ai-research/22-agent-native-research-artifact/research-manager/{SKILL.md → ENTRY.md} +0 -0
  380. /package/skills/ai-research/22-agent-native-research-artifact/rigor-reviewer/{SKILL.md → ENTRY.md} +0 -0
  381. /package/skills/design-library/adaptive-interfaces/skills/colour-independence/{SKILL.md → ENTRY.md} +0 -0
  382. /package/skills/design-library/adaptive-interfaces/skills/flexible-typography/{SKILL.md → ENTRY.md} +0 -0
  383. /package/skills/design-library/adaptive-interfaces/skills/information-density/{SKILL.md → ENTRY.md} +0 -0
  384. /package/skills/design-library/adaptive-interfaces/skills/preference-audit/{SKILL.md → ENTRY.md} +0 -0
  385. /package/skills/design-library/adaptive-interfaces/skills/responsive-accessibility/{SKILL.md → ENTRY.md} +0 -0
  386. /package/skills/design-library/adaptive-interfaces/skills/responsive-review/{SKILL.md → ENTRY.md} +0 -0
  387. /package/skills/design-library/adaptive-interfaces/skills/simplified-views/{SKILL.md → ENTRY.md} +0 -0
  388. /package/skills/design-library/adaptive-interfaces/skills/specify/{SKILL.md → ENTRY.md} +0 -0
  389. /package/skills/design-library/adaptive-interfaces/skills/user-preference-respect/{SKILL.md → ENTRY.md} +0 -0
  390. /package/skills/design-library/cognitive-accessibility/skills/adaptive-personalisation/{SKILL.md → ENTRY.md} +0 -0
  391. /package/skills/design-library/cognitive-accessibility/skills/assess-load/{SKILL.md → ENTRY.md} +0 -0
  392. /package/skills/design-library/cognitive-accessibility/skills/cognitive-load-assessment/{SKILL.md → ENTRY.md} +0 -0
  393. /package/skills/design-library/cognitive-accessibility/skills/contextual-help-design/{SKILL.md → ENTRY.md} +0 -0
  394. /package/skills/design-library/cognitive-accessibility/skills/error-prevention-recovery/{SKILL.md → ENTRY.md} +0 -0
  395. /package/skills/design-library/cognitive-accessibility/skills/focus-attention-design/{SKILL.md → ENTRY.md} +0 -0
  396. /package/skills/design-library/cognitive-accessibility/skills/memory-load-reduction/{SKILL.md → ENTRY.md} +0 -0
  397. /package/skills/design-library/cognitive-accessibility/skills/plain-language-design/{SKILL.md → ENTRY.md} +0 -0
  398. /package/skills/design-library/cognitive-accessibility/skills/review/{SKILL.md → ENTRY.md} +0 -0
  399. /package/skills/design-library/cognitive-accessibility/skills/simplify/{SKILL.md → ENTRY.md} +0 -0
  400. /package/skills/design-library/cognitive-accessibility/skills/wayfinding-navigation/{SKILL.md → ENTRY.md} +0 -0
  401. /package/skills/design-library/design-research/skills/behavioural-analytics/{SKILL.md → ENTRY.md} +0 -0
  402. /package/skills/design-library/design-research/skills/qual-quant-triangulation/{SKILL.md → ENTRY.md} +0 -0
  403. /package/skills/design-library/inclusive-interaction/skills/audit/{SKILL.md → ENTRY.md} +0 -0
  404. /package/skills/design-library/inclusive-interaction/skills/design-flow/{SKILL.md → ENTRY.md} +0 -0
  405. /package/skills/design-library/inclusive-interaction/skills/feedback-and-status/{SKILL.md → ENTRY.md} +0 -0
  406. /package/skills/design-library/inclusive-interaction/skills/gesture-alternatives/{SKILL.md → ENTRY.md} +0 -0
  407. /package/skills/design-library/inclusive-interaction/skills/keyboard-navigation/{SKILL.md → ENTRY.md} +0 -0
  408. /package/skills/design-library/inclusive-interaction/skills/keyboard-review/{SKILL.md → ENTRY.md} +0 -0
  409. /package/skills/design-library/inclusive-interaction/skills/motion-sensitivity/{SKILL.md → ENTRY.md} +0 -0
  410. /package/skills/design-library/inclusive-interaction/skills/multi-modal-input/{SKILL.md → ENTRY.md} +0 -0
  411. /package/skills/design-library/inclusive-interaction/skills/touch-target-design/{SKILL.md → ENTRY.md} +0 -0
  412. /package/skills/design-library/inclusive-interaction/skills/voice-interaction/{SKILL.md → ENTRY.md} +0 -0
  413. /package/skills/design-library/visual-critique/skills/critique-affordance/{SKILL.md → ENTRY.md} +0 -0
  414. /package/skills/design-library/visual-critique/skills/critique-brand-consistency/{SKILL.md → ENTRY.md} +0 -0
  415. /package/skills/design-library/visual-critique/skills/critique-color/{SKILL.md → ENTRY.md} +0 -0
  416. /package/skills/design-library/visual-critique/skills/critique-composition/{SKILL.md → ENTRY.md} +0 -0
  417. /package/skills/design-library/visual-critique/skills/critique-information-density/{SKILL.md → ENTRY.md} +0 -0
  418. /package/skills/design-library/visual-critique/skills/critique-typography/{SKILL.md → ENTRY.md} +0 -0
  419. /package/skills/design-library/visual-critique/skills/critique-visual-hierarchy/{SKILL.md → ENTRY.md} +0 -0
  420. /package/skills/pm-frameworks/intended-vs-implemented/{SKILL.md → ENTRY.md} +0 -0
  421. /package/skills/pm-frameworks/opportunity-solution-tree/{SKILL.md → ENTRY.md} +0 -0
  422. /package/skills/rl-env/generate-nemo-gym-env/{SKILL.md → ENTRY.md} +0 -0
  423. /package/skills/rl-env/generate-openenv-env/{SKILL.md → ENTRY.md} +0 -0
  424. /package/skills/rl-env/generate-ors-env/{SKILL.md → ENTRY.md} +0 -0
  425. /package/skills/rl-env/generate-verifiers-env/{SKILL.md → ENTRY.md} +0 -0
  426. /package/skills/rl-env/rl-env-from-description/{SKILL.md → ENTRY.md} +0 -0
package/bin/tezgah-task CHANGED
@@ -122,7 +122,10 @@ history) is printed as `not judged` and the exit is 1. `review ... approve`
122
122
  is refused while a record whose id or agent is that reviewer is not done.
123
123
 
124
124
  Exit codes: 0 ok, 1 a refusal or a problem - one `FAIL <what>` line per problem,
125
- with nothing written - 2 misuse.
125
+ with nothing written - 2 misuse. In a repository whose `tezgah.owner` says
126
+ `tasks: off` (or `harness: excluded`) every command above that writes a record
127
+ is refused, and the read-only ones still answer
128
+ (`bin/tezgah-task::owner_mark`).
126
129
  """
127
130
  import glob
128
131
  import json
@@ -136,7 +139,12 @@ import time
136
139
  HERE = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
137
140
  sys.path.insert(0, os.path.join(HERE, "hooks"))
138
141
  import tezgah_task as tt # noqa: E402
139
- from tezgah_paths import project_top, say, work_tree # noqa: E402
142
+ from tezgah_paths import config, ocr_bin, omp_bin, project_top, say, work_tree # noqa: E402
143
+
144
+ # Mirrors hooks/tezgah_gate.py::PLAN_TRUNKS: the gate reads these as unplanned
145
+ # whatever a plan declares, so `start --branch` refuses them (plan 113). Not
146
+ # imported: the gate hook pulls in every rule module for this one tuple.
147
+ PLAN_TRUNKS = ("main", "master")
140
148
 
141
149
 
142
150
  def repo_root(path):
@@ -152,6 +160,43 @@ def repo_root(path):
152
160
  return os.path.realpath(path)
153
161
 
154
162
 
163
+ # Commands that write a plan's record. A repository that carries `tezgah.owner`
164
+ # saying `tasks: off` (or `harness: excluded`) keeps its records to itself: the
165
+ # phase would arm nothing there - `tezgah_task._phased` answers no task
166
+ # (`hooks/tezgah_paths.py::tasks_disabled`) - so writing one would report
167
+ # success for a guard that never fired. `writes_a_record` reads both tuples, and
168
+ # the read-only commands are untouched.
169
+ RECORD_COMMANDS = ("start", "phase", "allow", "stop", "review", "close",
170
+ "tick", "note", "spike", "unmet")
171
+ # The journal's own writers, and `sweep`, which clears an orphan `phase:` and
172
+ # closes the slices of the worktrees it prunes. The rest of `slice` only reads
173
+ # (stats, board, merge-plan), and so does `status`.
174
+ SLICE_WRITERS = ("open", "done", "stop", "reconcile", "resume")
175
+
176
+
177
+ def writes_a_record(cmd, rest):
178
+ """True when this invocation writes the task machine's records: the plan
179
+ file, the slice journal, or the phases and slices `sweep` clears. The
180
+ readers write none, so a repository that is not this harness's still answers
181
+ them (`status`, `slice stats`, `slice board`, `slice merge-plan`)."""
182
+ if cmd in RECORD_COMMANDS:
183
+ return True
184
+ if cmd == "slice":
185
+ return bool(rest) and rest[0] in SLICE_WRITERS
186
+ return cmd == "sweep"
187
+
188
+
189
+ def owner_mark(root):
190
+ """Why this repository's records are not this machine's to write, else
191
+ None. Through `tasks_disabled`, so the CLI and the gate read one answer."""
192
+ from tezgah_paths import OWNER_MARKER, tasks_disabled
193
+ if not tasks_disabled(root):
194
+ return None
195
+ return ("%s says `tasks: off` in %s: its records are the repository's own, so "
196
+ "this machine writes none there - edit them directly"
197
+ % (root, os.path.join(root, OWNER_MARKER)))
198
+
199
+
155
200
  def misuse(message):
156
201
  """Misuse exits 2, so a caller can tell it from a record that refuses."""
157
202
  print("tezgah-task: %s" % message, file=sys.stderr)
@@ -434,6 +479,139 @@ MERGE_CHECKS = (
434
479
  "python3 skills/plan-add/render_table.py --acceptance --strict"),
435
480
  )
436
481
 
482
+ # OCR's texts vendored with tezgah (plan 125): the review prompt each per-group
483
+ # reviewer reads as an appendix, the filter prompt the refuter pass follows
484
+ OCR_PROMPTS = os.path.join(HERE, "third_party", "open-code-review", "prompts")
485
+
486
+
487
+ def ocr_json(ocr, args):
488
+ """One `ocr delegate ... --format json` answer as a dict, or the reason it
489
+ is not one: a non-zero exit, a timeout, output that is not a JSON object."""
490
+ try:
491
+ out = subprocess.run([ocr, "delegate"] + args, capture_output=True,
492
+ text=True, timeout=30,
493
+ env=dict(os.environ, OCR_NO_UPDATE="1"))
494
+ except subprocess.TimeoutExpired:
495
+ return "`ocr delegate %s` timed out after 30 s" % args[0]
496
+ except OSError as exc:
497
+ return "`ocr delegate %s` did not start: %s" % (args[0], exc)
498
+ if out.returncode:
499
+ return "`ocr delegate %s` exited %d" % (args[0], out.returncode)
500
+ try:
501
+ data = json.loads(out.stdout)
502
+ except ValueError:
503
+ data = None
504
+ return data if isinstance(data, dict) else \
505
+ "`ocr delegate %s` printed no JSON object" % args[0]
506
+
507
+
508
+ def ocr_spec(where, base):
509
+ """OCR's deterministic review spec for `base..HEAD`: (preview, rule groups,
510
+ the rule command), the reason it is skipped, or None without `ocr` or with
511
+ the `ocr` feature not enabled (`tezgah-setup --enable ocr`) - the step is
512
+ then today's."""
513
+ ocr = ocr_bin()
514
+ if ocr is None or "ocr" not in (config().get("features") or []):
515
+ return None
516
+ if base == "<base>":
517
+ return "no diff base to preview"
518
+ preview = ocr_json(ocr, ["preview", "--format", "json", "--from", base,
519
+ "--to", "HEAD", "--repo", where])
520
+ if isinstance(preview, str):
521
+ return preview
522
+ # the JSON shape this reader was written against (OCR 375f64c / 1.13.2)
523
+ if preview.get("schema_version") != "1":
524
+ return "`ocr delegate preview` schema_version %r is not \"1\"" % (
525
+ preview.get("schema_version"),)
526
+ files = preview.get("reviewable_files")
527
+ excluded = preview.get("excluded_files", [])
528
+ if not isinstance(files, list) or not isinstance(excluded, list):
529
+ return "`ocr delegate preview` JSON has no file lists"
530
+ # a row with no string path is dropped here, so neither the rule argv nor
531
+ # the printed list can meet a None
532
+ files = [f for f in files if isinstance(f, dict) and isinstance(f.get("path"), str)]
533
+ preview["reviewable_files"] = files
534
+ paths = [f["path"] for f in files]
535
+ groups = []
536
+ # `--` ends OCR's options, so a changed file named like a flag stays a path
537
+ rule_cmd = [ocr, "delegate", "rule", "--format", "json", "--repo", where, "--"] + paths
538
+ if paths:
539
+ rule = ocr_json(ocr, rule_cmd[2:])
540
+ if isinstance(rule, str):
541
+ return rule
542
+ if rule.get("schema_version") != "1":
543
+ return "`ocr delegate rule` schema_version %r is not \"1\"" % (
544
+ rule.get("schema_version"),)
545
+ groups = rule.get("groups")
546
+ if not isinstance(groups, list):
547
+ return "`ocr delegate rule` JSON has no groups"
548
+ return preview, groups, rule_cmd
549
+
550
+
551
+ def print_ocr_spec(where, base):
552
+ """Step 2's OCR lines: the reviewable files, the exclusions (still in scope),
553
+ one reviewer per rule group, the refuter pass and the quote check. Prints
554
+ nothing without `ocr`, one `OCR spec skipped:` line when it fails."""
555
+ spec = ocr_spec(where, base)
556
+ if spec is None:
557
+ return
558
+ if isinstance(spec, str):
559
+ print(" OCR spec skipped: %s" % spec)
560
+ return
561
+ preview, groups, rule_cmd = spec
562
+ paths = [f.get("path") for f in preview["reviewable_files"] if isinstance(f, dict)]
563
+ print(" OCR review spec (`ocr delegate`; its output is input to the "
564
+ "review, never a verdict):")
565
+ print(" - reviewable files (%d): %s" % (len(paths), ", ".join(paths) or "none"))
566
+ out = ["%s (%s)" % (f.get("path"), f.get("exclude_reason", "no reason"))
567
+ for f in preview.get("excluded_files", []) if isinstance(f, dict)]
568
+ print(" - excluded by OCR, NOT covered by OCR rules but still in the "
569
+ "reviewer's scope (tests and docs stay in scope; one more "
570
+ "tezgah-reviewer reads them over the dimensions above): %s"
571
+ % (", ".join(out) or "none"))
572
+ if groups:
573
+ # OCR's own bundling below its LLM-grouping threshold (task_template.json
574
+ # GROUPING_MIN_FILES 4, GROUPING_BUNDLE_LINE_THRESHOLD 200): fewer than 4
575
+ # files are one bundle under 200 changed lines, else one file each.
576
+ churn = sum(n for f in preview["reviewable_files"]
577
+ for n in (f.get("insertions"), f.get("deletions"))
578
+ if isinstance(n, int) and not isinstance(n, bool))
579
+ if len(paths) < 4 and churn < 200:
580
+ who = ("one tezgah-reviewer for the whole small change set (%d files, "
581
+ "%d changed lines), its brief carrying every group's rule text"
582
+ % (len(paths), churn))
583
+ elif len(paths) < 4:
584
+ who = "one tezgah-reviewer per file, in ONE message"
585
+ else:
586
+ who = "one tezgah-reviewer per rule group below, in ONE message"
587
+ print(" - instead of one reviewer per dimension, spawn %s: a brief "
588
+ "carries its group's rule text verbatim (`groups[].rule` of `%s`) "
589
+ "and names %s as an appendix to read; each reviewer accounts for "
590
+ "every file it owns as reviewed or skipped-with-reason"
591
+ % (who, shlex.join(rule_cmd),
592
+ os.path.join(OCR_PROMPTS, "main_task_system.md")))
593
+ for g in groups:
594
+ if isinstance(g, dict):
595
+ print(" - rule group %s: source %s, pattern %s, files %s"
596
+ % (g.get("group_id"), g.get("source"), g.get("pattern"),
597
+ ", ".join(g.get("files") or []) or "none"))
598
+ else:
599
+ print(" - no OCR rule group: the dimension fan-out above stands")
600
+ print(" - refuter pass: after merging the findings, one fresh "
601
+ "tezgah-reviewer reads %s as its instructions and removes only "
602
+ "findings the diff proves wrong"
603
+ % os.path.join(OCR_PROMPTS, "review_filter_task_system.md"))
604
+ print(" - quote check: `tezgah-review-quote --repo %s --from %s "
605
+ "FINDINGS.json` over the merged findings (a JSON list of path, quote, "
606
+ "start_line, end_line); an `unlocated` finding goes back to its "
607
+ "reviewer" % (shlex.quote(where), base))
608
+ # V4, omp only: OCR's own loop on omp's model; candidates, never findings
609
+ if os.environ.get("OMPCODE") and omp_bin():
610
+ print(" - omp: `tezgah-ocr-review --repo %s --from %s --to HEAD "
611
+ "--output OCR.json` runs OCR's own review on omp's model; hand its "
612
+ "comments to the reviewers as candidates to confirm or refute, "
613
+ "never as findings" % (shlex.quote(where), base))
614
+
437
615
 
438
616
  def verification_steps(text, path):
439
617
  """What the verification phase requires before the plan is done: the plan's
@@ -510,6 +688,7 @@ def verification_steps(text, path):
510
688
  "without a new round, or recorded fix-later under ## State only "
511
689
  "when it waits on a user decision (%s), and the verdict is "
512
690
  "`approve`" % say()["decision"])
691
+ print_ocr_spec(where, base)
513
692
  print(" 3. record its verdict: `tezgah-task review %s <reviewer> approve|changes`"
514
693
  " (records the reviewed sha);"
515
694
  " `tezgah-task close %s done` refuses without an approve" % (ident, ident))
@@ -552,6 +731,11 @@ def cmd_start(args):
552
731
  if i + 1 >= len(rest) or rest[i + 1].startswith("--"):
553
732
  return misuse("--branch needs the branch name to bind the plan to")
554
733
  branch = rest[i + 1]
734
+ if branch in PLAN_TRUNKS:
735
+ return misuse("--branch %s: a trunk (%s) never binds a plan - the gate "
736
+ "reads every PLAN_TRUNKS name as unplanned; bind a "
737
+ "plan/NNN-slug branch instead"
738
+ % (branch, ", ".join(PLAN_TRUNKS)))
555
739
  i += 2
556
740
  continue
557
741
  if rest[i] == ANY_PATH:
@@ -619,7 +803,19 @@ def cmd_start(args):
619
803
  bad = write_fields(path, **fields)
620
804
  if bad:
621
805
  return problems(bad)
622
- return show(path)
806
+ shown = show(path)
807
+ top = repo_root(os.getcwd())
808
+ if main_root(top) != top:
809
+ # a worktree bound to a plan gets its graph now, seeded from the main
810
+ # checkout's (plan 118); an index that cannot start costs the line, never
811
+ # the start the record already holds
812
+ try:
813
+ from tezgah_context import autoindex, under
814
+ if under(top):
815
+ print("graph: %s" % autoindex(top))
816
+ except Exception:
817
+ pass
818
+ return shown
623
819
 
624
820
 
625
821
  def cmd_phase(args):
@@ -1814,6 +2010,10 @@ def main(argv):
1814
2010
  print(__doc__, file=sys.stderr)
1815
2011
  return 2
1816
2012
  cmd, rest = argv[1], argv[2:]
2013
+ if writes_a_record(cmd, rest):
2014
+ mark = owner_mark(repo_root(os.getcwd()))
2015
+ if mark:
2016
+ return problems([mark])
1817
2017
  if cmd == "start":
1818
2018
  return cmd_start(rest)
1819
2019
  if cmd == "phase":
package/commands/adhd.md CHANGED
@@ -1,4 +1,4 @@
1
- Run `tezgah-adhd $ARGUMENTS` and report the one line it prints.
1
+ Run `~/.config/tezgah/bin/tezgah-adhd $ARGUMENTS` and report the one line it prints.
2
2
 
3
3
  The installed CLI owns the state: it writes or removes
4
4
  `~/.config/tezgah/adhd-off`, the kill switch that drops the act-on-it rule from
@@ -6,7 +6,7 @@ the text every host injects. Never create or delete that file by hand, and never
6
6
  edit any other rule's switch from here.
7
7
 
8
8
  ```sh
9
- adhd=$(command -v tezgah-adhd || echo "$HOME/.config/tezgah/bin/tezgah-adhd")
9
+ adhd="$HOME/.config/tezgah/bin/tezgah-adhd"
10
10
  "$adhd" $ARGUMENTS
11
11
  ```
12
12
 
@@ -1,12 +1,12 @@
1
- Run `tezgah-pony $ARGUMENTS` and report the one line it prints.
1
+ Run `~/.config/tezgah/bin/tezgah-pony $ARGUMENTS` and report the one line it prints.
2
2
 
3
3
  The installed CLI is the source of truth for the level, and it owns the state
4
4
  file (`~/.config/tezgah/ponytail.level`) - never edit that file by hand, and do
5
- not argue for a level: the user's argument is the decision. Resolve the command
6
- first, because this machine may not have tezgah's bin dir on PATH:
5
+ not argue for a level: the user's argument is the decision. Run the installed path,
6
+ because this machine may not have tezgah's bin dir on PATH:
7
7
 
8
8
  ```sh
9
- pony=$(command -v tezgah-pony || echo "$HOME/.config/tezgah/bin/tezgah-pony")
9
+ pony="$HOME/.config/tezgah/bin/tezgah-pony"
10
10
  "$pony" $ARGUMENTS
11
11
  ```
12
12
 
@@ -27,7 +27,7 @@ nothing about a host's event names or output envelope.
27
27
  | Module | Owns | Point at |
28
28
  |---|---|---|
29
29
  | `tezgah_context.py` | the one builder of injected text; event normalisation to `session_start`/`user_prompt`/`subagent_start`/`post_compact`; the status segments and the used marks | `hooks/tezgah_context.py:2-7`, `hooks/tezgah_context.py::context_for` |
30
- | `tezgah_policy.py` | the contract itself, as strings: `CORE`, the conditional paragraphs, the pointer line, the per-turn reminder, and the long-form blocks the on-demand skill mirrors | `hooks/tezgah_policy.py:2-16`, `hooks/tezgah_policy.py::CORE`, `hooks/tezgah_policy.py::CONDITIONAL_KEYS` |
30
+ | `tezgah_policy.py` | the contract itself, as strings: `CORE`, the conditional paragraphs, the pointer line, the per-turn reminder, and the long-form blocks the on-demand skill mirrors | `hooks/tezgah_policy.py:2-18`, `hooks/tezgah_policy.py::CORE`, `hooks/tezgah_policy.py::CONDITIONAL_KEYS` |
31
31
  | `tezgah_gate.py` | the tool gate: explorer refusal, the one-time grep nudge, attribution and test-disable denies, loop/retry ceilings | `hooks/tezgah_gate.py:2-91`, `hooks/tezgah_gate.py::decision` |
32
32
  | `tezgah_integrity.py` | the evidence ledger, redaction, the anti-shortcut parser and the Stop rule | `hooks/tezgah_integrity.py:2-24`, `hooks/tezgah_integrity.py::note_tool`, `hooks/tezgah_integrity.py::stop_reason` |
33
33
  | `tezgah_guard.py` | the one catch around an entry point's call into the core, so a crash costs an envelope rather than a session, and the `crash` ledger row that keeps it countable | `hooks/tezgah_guard.py:2-26`, `hooks/tezgah_guard.py::safe` |
@@ -54,7 +54,7 @@ passes Codex's tool names through a translation table before calling the gate
54
54
  the same split in another language: the TypeScript extension is "only the
55
55
  bridge" and substitutes the absolute path of
56
56
  the Python half (`hosts/omp/tezgah-hook.ts.in:5-7`), whose `handle()` dispatches
57
- every event (`hosts/omp/hook.py::handle`). Cursor (`hosts/cursor/hook.py:2-40`) and
57
+ every event (`hosts/omp/hook.py::handle`). Cursor (`hosts/cursor/hook.py:2-43`) and
58
58
  opencode (`hosts/opencode/plugins/tezgah.js:1-57`) follow the same rule; opencode
59
59
  is the one host whose plugin cannot call the core in process, so it shells out
60
60
  through `bin/tezgah-context` and `bin/tezgah-capture` instead of copying it
@@ -21,7 +21,7 @@
21
21
  "unjudged": 2
22
22
  },
23
23
  "docs/gate.md": {
24
- "unjudged": 39
24
+ "unjudged": 29
25
25
  },
26
26
  "docs/glossary.md": {
27
27
  "unjudged": 12
@@ -36,7 +36,7 @@
36
36
  "unjudged": 21
37
37
  },
38
38
  "docs/skills.md": {
39
- "unjudged": 7
39
+ "unjudged": 9
40
40
  },
41
41
  "docs/status-line.md": {
42
42
  "unjudged": 9
@@ -18,7 +18,7 @@
18
18
  "semicolons": 9
19
19
  },
20
20
  "docs/contract.md": {
21
- "long_sentences": 42,
21
+ "long_sentences": 41,
22
22
  "passive": 25,
23
23
  "replace_words": 0,
24
24
  "semicolons": 29
@@ -90,7 +90,7 @@
90
90
  "semicolons": 77
91
91
  },
92
92
  "docs/skills.md": {
93
- "long_sentences": 36,
93
+ "long_sentences": 35,
94
94
  "passive": 18,
95
95
  "replace_words": 0,
96
96
  "semicolons": 16
package/docs/contract.md CHANGED
@@ -9,16 +9,24 @@ used here are defined once in [glossary.md](glossary.md); which host gets which
9
9
  surface is [hosts.md](hosts.md).
10
10
 
11
11
  Every string is a module constant in `hooks/tezgah_policy.py`, so that every
12
- host says the same thing (`hooks/tezgah_policy.py:14-15`); path placeholders
12
+ host says the same thing (`hooks/tezgah_policy.py:19-20`); path placeholders
13
13
  (`{ROOT}`, `{CONSULT_BIN}`, `{ORX_BIN}`, …) are filled at injection time by
14
14
  `render()` (`hooks/tezgah_context.py::render`).
15
+ Every tezgah CLI the injected text names is a placeholder in `BIN_TOOLS`
16
+ (`hooks/tezgah_policy.py::BIN_TOOLS`): `{CONSULT_BIN}`, `{CODEGEN_BIN}`,
17
+ `{RESEARCH_BIN}`, `{ROUTE_BIN}`, `{SKILL_BIN}`, `{DESIGN_BIN}`, `{TASK_BIN}`,
18
+ `{PONY_BIN}`, `{ADHD_BIN}` and `{LESSONS_BIN}`.
19
+ `render()` fills each with the installed absolute path, `tezgah_paths.tool(<name>)`.
20
+ A bare `tezgah-pony` in the text failed on a host whose shell PATH lacks
21
+ `~/.config/tezgah/bin`.
22
+ The hookless static copies spell the same path from `~`.
15
23
 
16
24
  ## The five surfaces
17
25
 
18
26
  | Surface | Text | Paid |
19
27
  |---|---|---|
20
- | always-on core | `CORE` (`hooks/tezgah_policy.py::CORE`) minus the six conditional paragraphs, plus the pointer line | once per session: `session_start` and `post_compact` |
21
- | conditional paragraph | one of the six keyed by `CONDITIONAL_KEYS` (`hooks/tezgah_policy.py::CONDITIONAL_KEYS`) | in full on the first turn of a session whose prompt matches its task class; a later match pays one line (`hooks/tezgah_context.py::armed_again`) until a compaction or `ARMED_RESURFACE` turns (`hooks/tezgah_context.py::ARMED_RESURFACE`) bring the full text back |
28
+ | always-on core | `CORE` (`hooks/tezgah_policy.py::CORE`) minus the seven conditional paragraphs, plus the pointer line | once per session: `session_start` and `post_compact` |
29
+ | conditional paragraph | one of the seven keyed by `CONDITIONAL_KEYS` (`hooks/tezgah_policy.py::CONDITIONAL_KEYS`) | in full on the first turn of a session whose prompt matches its task class; a later match pays one line (`hooks/tezgah_context.py::armed_again`) until a compaction or `ARMED_RESURFACE` turns (`hooks/tezgah_context.py::ARMED_RESURFACE`) bring the full text back |
22
30
  | per-turn reminder | `PROMPT_REMINDER` (`hooks/tezgah_policy.py::PROMPT_REMINDER`) | every user prompt |
23
31
  | skill suggestion | one `<skill_relevance>` line naming at most one installed skill and the SECTION of it that matches the turn (`skill://<name>:<start>-<end>` plus the absolute path), written by `suggest` (`hooks/tezgah_skill_pick.py::suggest`) when `skill-suggest-on` is armed, else by the model-free section search (`hooks/tezgah_skill_pick.py::section_hint`), default on | only on a turn the judgement answers with a skill, or whose prompt one section covers (each section once per session) |
24
32
  | on-demand full contract | the long-form blocks of `hooks/tezgah_policy.py` (`EXEC`, `CONSULT`, `RESEARCH`, …), shipped hand-kept as `skills/tezgah-contract/SKILL.md` | only when the session loads that skill |
@@ -69,10 +77,19 @@ uses no model and is on by default (`hooks/tezgah_skill_pick.py::section_hint`,
69
77
  rebuilds only when a SKILL.md's stat moves. The line needs a top section that
70
78
  carries 60% of the prompt's distinct content terms, and at least three. It
71
79
  names each section once per session and drops the absolute path on omp, whose
72
- read tool resolves `skill://`. Measured on this machine: 6-15 ms warm, and
73
- 1.36 s for the one cold rebuild over 7 502 sections. The line costs 196-239
74
- bytes on omp and 245-320 elsewhere. It is not a judgement, so `judge-off` leaves it on,
75
- and `reminder-off` drops it with the per-turn text. The always-on core also
80
+ read tool resolves `skill://`. On Claude it names the Skill tool's
81
+ `tezgah:<name>`. It also carries the skill's description, which Claude's roster
82
+ cuts for 20 of 21 tezgah skills. For `harness` it names Claude's own
83
+ `workflow-authoring` as the skill it precedes
84
+ (`hooks/tezgah_skill_pick.py::NATIVE_TWIN`). A hint for `i-have-adhd` ends with
85
+ that rule's first-line clause on every host
86
+ (`hooks/tezgah_skill_pick.py::IN_FORCE`). The core states the rule, and replies
87
+ to an adhd ask still opened on a diagnosis. Measured on this
88
+ machine: 6-15 ms warm, and 1.36 s for the one cold rebuild over 7 502 sections.
89
+ The line costs 187-201 bytes on omp, 264-287 on other hosts and 450-483 on
90
+ Claude, plus 231 for the `i-have-adhd` clause. It is not a judgement, so
91
+ `judge-off` leaves it on, and `reminder-off` drops it with the per-turn text.
92
+ The always-on core also
76
93
  sends every session to the same search by hand. Run `tezgah-skill <words>`
77
94
  before working a topic a skill covers, then read only the returned range.
78
95
 
@@ -187,36 +204,40 @@ change with an executable oracle - a checker, a gate rule, a parser - spends the
187
204
  same budget. Its round one is four direction-led reviewers, and each claim
188
205
  becomes a fixture that runs before it counts. That population is a tentative
189
206
  default, measured on two research lines with a written flip
190
- (`skills/tezgah-contract/SKILL.md:532-563`).
207
+ (`skills/tezgah-contract/SKILL.md:537-568`). With the opt-in `ocr` feature, round
208
+ one also gets an OCR review spec: OCR's file selection, its rule groups and a
209
+ refuter pass. The spec is input to the review, never a verdict
210
+ ([operations](operations.md#opt-in-ocr-review-spec-ocr),
211
+ `bin/tezgah-task::print_ocr_spec`).
191
212
 
192
213
  ## Composition order of the always-on core
193
214
 
194
215
  Paragraphs are concatenated in the order they appear in `CORE` and identified by
195
216
  the bold label each starts with (`CORE_RULES`, `hooks/tezgah_context.py::CORE_RULES`).
196
217
  That order, with the line each label sits on in `hooks/tezgah_policy.py`:
197
- `**{REPLY_LANG}, BLUF.**` :713, `**Ponytail (minimal code).**` :722, `**Output shape:
198
- ADHD-friendly.**` :739, `**Deliver the whole ask; never the shortcut.**` :763,
199
- `**Integrity: evidence, or a named blocker.**` :778, `**Loop discipline.**` :811,
200
- `**Spec before building.**` :820 *(conditional)*, `**Lessons ledger: stop
201
- repeating mistakes.**` :834, `**Code discovery: graph first.**` :842
202
- *(conditional)*, `**Consult before irreversible.**` :851 *(conditional)*,
203
- `**Research: route it to OpenResearch.**` :869 *(conditional)*, `**Product
204
- analysis: five axes, one evidence class per finding.**` :896 *(conditional)*,
205
- `**No AI attribution, ever, on any host.**` :931, `**Identifiers and messages
206
- stay English.**` :941, `**Session scope: the user's repo, not tezgah.**` :947,
207
- ``**Workspace: `.tezgah/` only.**`` :958, `**Parallel by default: fan out
208
- independent items.**` :965 *(conditional)*,
209
- `**Kill switches:**` :990. The first label renders as `**Turkish, BLUF.**` under
218
+ `**{REPLY_LANG}, BLUF.**` :802, `**Ponytail (minimal code).**` :811, `**Output shape:
219
+ ADHD-friendly.**` :828, `**Deliver the whole ask; never the shortcut.**` :852,
220
+ `**Integrity: evidence, or a named blocker.**` :869, `**Loop discipline.**` :915,
221
+ `**Spec before building.**` :925 *(conditional)*, `**Lessons ledger: stop
222
+ repeating mistakes.**` :939, `**Code discovery: graph first.**` :947
223
+ *(conditional)*, `**Consult before irreversible.**` :956 *(conditional)*,
224
+ `**Research: route it to OpenResearch.**` :974 *(conditional)*, `**Product
225
+ analysis: five axes, one evidence class per finding.**` :1003 *(conditional)*,
226
+ `**Design: UI work reads the design skills.**` :1039 *(conditional)*,
227
+ `**No AI attribution, ever, on any host.**` :1048, `**Identifiers and messages
228
+ stay English.**` :1058, `**Session scope: the user's repo, not tezgah.**` :1064,
229
+ ``**Workspace: `.tezgah/` only.**`` :1075, `**Parallel by default: fan out
230
+ independent items.**` :1082 *(conditional)*,
231
+ `**Kill switches:**` :1112. The first label renders as `**Turkish, BLUF.**` under
210
232
  `language` `tr`.
211
233
 
212
- `always_on_core()` (`hooks/tezgah_context.py::always_on_core`) drops the six
213
- conditional paragraphs and appends `POINTERS` (`hooks/tezgah_policy.py::POINTERS`):
214
- one line each saying the rule exists and where its full text lives — spec-first,
215
- a second opinion, OpenResearch routing, product analysis, the code graph, parallel
216
- fan-out, and the
217
- per-repo design contract `bin/tezgah-design` checks a UI change against (the one
218
- pointer with no conditional paragraph behind it, because the Stop rule's `no
219
- ui_ok` class is what asks for the check). That is
234
+ `always_on_core()` (`hooks/tezgah_context.py::always_on_core`) drops the seven
235
+ conditional paragraphs and appends `POINTERS` (`hooks/tezgah_policy.py::POINTERS`).
236
+ That is one line each saying the rule exists and where its full text lives.
237
+ The lines cover spec-first, a second opinion, OpenResearch routing, product analysis
238
+ (`product-analysis`, `pm-frameworks`), the code graph, parallel fan-out and design.
239
+ The design pointer names the `design-contract` skill and the per-repo design
240
+ contract `bin/tezgah-design` checks a UI change against. That is
220
241
  what a host with no prompt-time hook writes into a static file: opencode's
221
242
  `~/.config/tezgah/opencode-contract.md` (`bin/tezgah-setup::OPENCODE_CONTRACT`) and omp's
222
243
  managed `RULES.md` (`bin/tezgah-setup::STATIC_RULES`). Claude gets it from the
@@ -338,12 +359,13 @@ sentence of the rule.
338
359
  | research | Owner decision ADR 010 (2026-10-05): no new research rule until plan 062 reports. |
339
360
  | product | Owner decision ADR 010 (2026-10-05): no new research rule until plan 062 reports. The product rule is the research route. |
340
361
  | fanout | A refusal cannot see a serial run that should have been parallel: nothing is called that a gate could deny. The prompt-shape arming (`hooks/tezgah_context.py::PROMPT_HINTS`) and the generated specialists line are the mechanism. |
362
+ | design | A refusal cannot see which skill a UI turn read. The prompt arming (`hooks/tezgah_context.py::PROMPT_HINTS`) is the mechanism, and the Stop rule's `no ui_ok` class asks for the design check. |
341
363
  | scope | no decision |
342
364
 
343
365
  ## Arming the conditional paragraphs, and the per-turn reminder
344
366
 
345
367
  `PROMPT_HINTS` (`hooks/tezgah_context.py::PROMPT_HINTS`) is one compiled pattern per key
346
- — `spec`, `consult`, `research`, `product`, `graph`, `fanout` — and `classify_prompt()` returns the keys
368
+ — `spec`, `consult`, `research`, `product`, `design`, `graph`, `fanout` — and `classify_prompt()` returns the keys
347
369
  a prompt matches (`hooks/tezgah_context.py::classify_prompt`). It also adds `product`
348
370
  for a data ask: a dashboard, a chart or a metric to choose. The check reads each
349
371
  clause on its own (`hooks/tezgah_context.py::_data_ask`). A code marker in that
@@ -357,8 +379,15 @@ say "do it with subagents, in parallel". On that turn only, the matching
357
379
  paragraphs are appended after the reminder
358
380
  (`hooks/tezgah_context.py::context_for`); a session that never asks such a question
359
381
  pays the one-line pointer instead. A later match in the same session pays one
360
- line. The fan-out line still names the action
361
- (`hooks/tezgah_context.py::armed_again`). The patterns carry Turkish stems because the
382
+ line (`hooks/tezgah_context.py::armed_again`). For `fanout`, `product` and
383
+ `design` that line carries the rule's action from `ARMED_ACTIONS`
384
+ (`hooks/tezgah_policy.py::ARMED_ACTIONS`), not a bare "Armed again".
385
+ The product line names `product-analysis`, `pm-frameworks`, `feature-audit`,
386
+ `analyze-app` and `product-flow`.
387
+ The design line names `design-contract`, `design-library`, `analyze-app` and
388
+ `feature-audit`, and sends UI build work to a worker that loads `design-contract`.
389
+ A bare reminder did not work.
390
+ In one 40-turn session the product skills came up on 3 turns, against 20 in fresh sessions (plan 126). The patterns carry Turkish stems because the
362
391
  user writes Turkish, and a plain prompt arms nothing. The same prompt arms the
363
392
  same rules on every host (`tests/test_context.py::ArmingConformance.test_all_hosts_arm_the_same_rules`) and each advisory
364
393
  rule keeps a pointer line in the always-on text (`tests/test_context.py::ArmingConformance.test_every_advisory_rule_has_an_always_on_pointer`).
@@ -422,6 +451,7 @@ a keyword match, not intent: "don't touch `verify-off`" names the switch too.
422
451
  | `ponytail-auto.off` | `**Ponytail (minimal code).**` | `hooks/tezgah_context.py::switches` |
423
452
  | `adhd-off` | `**Output shape: ADHD-friendly.**` | `hooks/tezgah_context.py::switches` |
424
453
  | `spec-off` | `**Spec before building.**` | `hooks/tezgah_context.py::switches` |
454
+ | `design-off` | `**Design: UI work reads the design skills.**` | `hooks/tezgah_context.py::switches` |
425
455
  | `verify-off` | `**Integrity: evidence…**`, and the per-turn evidence-scope line with it | `hooks/tezgah_context.py::switches`, `hooks/tezgah_context.py::context_for` |
426
456
  | `consult-off` | `**Consult before irreversible.**` | `hooks/tezgah_context.py::switches` |
427
457
  | `research-off` | `**Research: route it to OpenResearch.**` | `hooks/tezgah_context.py::switches` |
@@ -445,6 +475,15 @@ ignore the matching section in `tezgah-contract` — that skill is loaded
445
475
  separately and would otherwise re-arm the rule. `tezgah-adhd off` writes the same
446
476
  channel as the file (`bin/tezgah-adhd::SWITCH`); the ponytail *level* is not a switch.
447
477
 
478
+ One more file in a repository's own tree is not a rule switch either. A
479
+ `tezgah.owner` at the repository's top says who owns the workspace, and its two
480
+ settings turn seams off rather than dropping a paragraph. `tasks: off` stops the
481
+ plan and task machine there: no active task, no per-turn phase line, and no
482
+ `tezgah-task` command that writes a record
483
+ (`hooks/tezgah_paths.py::tasks_disabled`). The scope gate, research and lessons
484
+ keep reading the repository. `harness: excluded` makes `root_for` answer None,
485
+ so nothing here runs at all (`hooks/tezgah_paths.py::harness_excluded`).
486
+
448
487
  `**Deliver the whole ask**`, the sycophancy ban and the attribution ban are
449
488
  invariants: no switch touches them, and `tests/test_context.py::KillSwitchEnforcement.test_fidelity_and_the_sycophancy_ban_are_invariants` asserts
450
489
  they survive every other switch being off.
@@ -503,8 +542,8 @@ brief carries the same caller-list floor (`hooks/tezgah_agents.py`), and
503
542
 
504
543
  ## When the injected text grows too large
505
544
 
506
- Each event has a byte budget: `session_start` and `post_compact` 15500,
507
- `user_prompt` 6500, `subagent_start` 5500, anything else 13000
545
+ Each event has a byte budget: `session_start` and `post_compact` 16000,
546
+ `user_prompt` 7000, `subagent_start` 5800, anything else 13000
508
547
  (`hooks/tezgah_context.py::CONTEXT_BUDGET`). The rationale and the measured
509
548
  sizes sit beside it. In an empty fixture repo, `session_start` with the core
510
549
  builds 9842 B before the ponytail and ADHD rules went inline and 10884 B after
@@ -519,21 +558,27 @@ active-task line. The session budgets moved to 14500 B, the prompt budget to 650
519
558
  The Ask policy (plan 086, S3) added 913 B to the core. At 14500 B the healthy
520
559
  fixture then gave up a lessons, plans or knowledge block. The session budgets moved to 15500 B.
521
560
  The subagent brief stays the same size.
561
+ A research ask arms the Research and Product paragraphs: 6239 B on Claude
562
+ (S4Remeasure p08). At 6500 B the skill hint naming the research skill was the
563
+ block given up. The prompt budget moved to 7000 B (2026-10-22).
522
564
  `SkillRulesInForceAtSessionStart` (`tests/test_context.py`) pins the rules
523
565
  themselves, not the size. A
524
- `user_prompt` that arms all five conditional rules
525
- for the first time builds 7503 B. That is over its budget on purpose: an armed paragraph
566
+ `user_prompt` that arms all seven conditional rules
567
+ for the first time builds 11979 B. That figure comes from a fixture repo with one lesson and one plan. That is over its budget on purpose: an armed paragraph
526
568
  is never dropped, and every later match in the session pays one line. The
527
569
  budget is a byte count, not a token estimate.
528
570
 
529
571
  Over budget, `budgeted()` gives up blocks in `DROP_ORDER`, lowest value
530
572
  first — the text another surface already carries (project knowledge, the
531
- sibling-checkout line, lessons), the skill hint (a suggestion, never an
532
- instruction), the per-turn relevant lessons and the plan table first, then the Orca line, the tooling-availability lines and the live graph
533
- glance, then the resume state (it outlives those because it is the only one that
534
- says what this session was doing, and it still yields to a rule), then the
535
- evidence-scope warning, the task phase, the delta, and the skill pointer last
536
- (`hooks/tezgah_context.py::DROP_ORDER`). Any key absent from that tuple is
573
+ sibling-checkout line, lessons), the per-turn relevant lessons and the plan
574
+ table first, then the Orca line, the tooling-availability lines and the live graph
575
+ glance, then the index line and the resume state (it outlives those because it
576
+ is the only one that says what this session was doing, and it still yields to a
577
+ rule), then the evidence-scope warning, the skill hint, the task phase, the
578
+ delta, and the skill pointer last (`hooks/tezgah_context.py::DROP_ORDER`).
579
+ The skill hint moved from near the front to after `lessons_turn` and `index`.
580
+ It names the skill this ask needs, and no other block can work that out.
581
+ It was the first block given up in 32 logged live drops (plan 126). Any key absent from that tuple is
537
582
  never dropped: the core, the reminder, the armed paragraphs and the user's pinned
538
583
  constraints are the rules, and
539
584
  a budget able to spend them would turn bloat into rule loss. The note naming what
@@ -53,6 +53,7 @@ the kill switches are files, not variables, and live in
53
53
  |---|---|---|---|
54
54
  | `TEZGAH_CODEGRAPH_BIN` | `hooks/tezgah_paths.py::codegraph_bin` | the config file, then `codegraph` on PATH | The codegraph executable the index and the graph marks use. |
55
55
  | `TEZGAH_ORX_BIN` | `hooks/tezgah_paths.py::orx_bin` | `orx` on PATH | The OpenResearch CLI the research rule routes to. |
56
+ | `TEZGAH_OCR_BIN` | `hooks/tezgah_paths.py::ocr_bin` | `ocr` on PATH | The open-code-review CLI the opt-in OCR review spec runs ([operations](operations.md#opt-in-ocr-review-spec-ocr)). |
56
57
  | `TEZGAH_ORCA_BIN` | `hooks/tezgah_orca.py::cli` | `ORCA_CLI_COMMAND`, then `$ORCA_CLI_BIN_DIR/orca`, then `orca` on PATH (`orca-ide` on Linux outside Orca), then the macOS app's CLI | The Orca CLI `tezgah-status --orca` and `tezgah-setup --status` ask. A missing path is no CLI, never a fallback: the test suite points it at one. |
57
58
  | `TEZGAH_OMP_BIN` | `hooks/tezgah_paths.py::omp_bin` | `omp` on PATH | The omp binary the installer, the model table, consult's session-model lookup and the judgement seam's session call run; tests point it at a stand-in. |
58
59
  | `TEZGAH_CLAUDE_BIN` | `claude_bin`, `hooks/tezgah_paths.py::claude_bin` | `claude` on PATH | The Claude Code CLI `--install` registers the plugin with (`claude plugin`) and the judgement seam asks in a Claude Code session; the test suite points it at a path that does not exist, or at a stand-in. |
@@ -116,6 +117,7 @@ the kill switches are files, not variables, and live in
116
117
  | `CODEX_THREAD_ID`, `CURSOR_CONVERSATION_ID` | `bin/tezgah-route` | set by Codex and Cursor in their agent shells | The session `tezgah-route` writes its rows under when `TEZGAH_SESSION` is unset. When two of the three name different sessions, an inherited id is present and no row is written. |
117
118
  | `CLAUDE_ENV_FILE` | `hooks/projects-auto-init.py::main` | set by Claude Code for SessionStart hooks | The file Claude sources before each Bash call; `export_session` appends `TEZGAH_SESSION` to it. |
118
119
  | `TEZGAH_CORE_IN_FILE` | `hooks/projects-auto-init.py::core_is_in_a_file`, `hooks/hooks.json` | unset | `1` (set by the Claude plugin's hook rows) drops the core rules from the injection when the host's static file really carries the tezgah block; a file without it falls back to the hook. |
120
+ | `TEZGAH_HOST` | `hooks/tezgah_context.py::context_for`, `hooks/hooks.json` | unset | `claude` (set by the Claude plugin's UserPromptSubmit row; the payload names no host) makes the skill hint name the Skill tool's `tezgah:<name>` beside the path instead of a `skill://` address (`hooks/tezgah_skill_pick.py::_emit`). A host that sends `host` in the payload (omp, opencode) is not read from here. |
119
121
  | `TEZGAH_NESTED` | `hooks/tezgah_integrity.py::_shape_block`, `bin/consult` | unset | Set by consult on the agent CLIs it runs: that session's Stop rule does not fire. |
120
122
  | `TEZGAH_CALL_OUTCOME` | `hooks/projects-posttooluse.py::main`, `hosts/dsh/hooks.json` | unset | `none` (dsh's Task rows) records the call's outcome as unknown instead of as a pass. |
121
123
  | `CLAUDE_PROJECT_DIR` | `hooks/projects-auto-init.py::main` | the process cwd | The project dir when the hook payload carries no `cwd`. |