@r1z4x/tezgah 1.9.2 → 1.13.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 (445) hide show
  1. package/CHANGELOG.md +415 -1
  2. package/MANIFEST +404 -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 +5 -4
  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 +255 -44
  15. package/bin/tezgah-review-quote +185 -0
  16. package/bin/tezgah-setup +1365 -55
  17. package/bin/tezgah-skill +1 -1
  18. package/bin/tezgah-status +201 -3
  19. package/bin/tezgah-task +258 -20
  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 +3 -3
  24. package/docs/clarity-baseline.json +11 -5
  25. package/docs/contract.md +91 -43
  26. package/docs/environment.md +5 -2
  27. package/docs/evidence.md +109 -17
  28. package/docs/feature-audit.md +2 -2
  29. package/docs/gate.md +60 -33
  30. package/docs/glossary.md +6 -3
  31. package/docs/hosts.md +313 -17
  32. package/docs/index.json +34 -8
  33. package/docs/judge.md +4 -2
  34. package/docs/layers.md +4 -4
  35. package/docs/models.md +37 -9
  36. package/docs/operations.md +141 -5
  37. package/docs/research.md +815 -8
  38. package/docs/skills.md +137 -13
  39. package/docs/status-line.md +121 -1
  40. package/docs/testing.md +3 -1
  41. package/hooks/hooks.json +2 -2
  42. package/hooks/lang/en.json +21 -0
  43. package/hooks/lang/tr.json +22 -1
  44. package/hooks/projects-stop.py +2 -1
  45. package/hooks/tezgah_agents.py +65 -25
  46. package/hooks/tezgah_apps.py +18 -0
  47. package/hooks/tezgah_attest.py +79 -10
  48. package/hooks/tezgah_components.py +4 -0
  49. package/hooks/tezgah_context.py +207 -55
  50. package/hooks/tezgah_extension.py +337 -0
  51. package/hooks/tezgah_gate.py +267 -79
  52. package/hooks/tezgah_integrity.py +864 -143
  53. package/hooks/tezgah_judge.py +6 -4
  54. package/hooks/tezgah_models.py +59 -19
  55. package/hooks/tezgah_orca.py +1 -1
  56. package/hooks/tezgah_paths.py +145 -8
  57. package/hooks/tezgah_policy.py +128 -57
  58. package/hooks/tezgah_rank.py +9 -6
  59. package/hooks/tezgah_replay.py +12 -6
  60. package/hooks/tezgah_research.py +1414 -76
  61. package/hooks/tezgah_research_capture.py +1544 -0
  62. package/hooks/tezgah_research_evidence.py +842 -0
  63. package/hooks/tezgah_research_stats.py +258 -0
  64. package/hooks/tezgah_skill_pick.py +408 -106
  65. package/hooks/tezgah_stack.py +236 -1
  66. package/hooks/tezgah_stopspec.py +8 -1
  67. package/hooks/tezgah_task.py +14 -5
  68. package/hooks/tezgah_taste_ledger.py +1 -1
  69. package/hosts/amp/hook.py +217 -0
  70. package/hosts/amp/tezgah-plugin.ts.in +386 -0
  71. package/hosts/antigravity/hook.py +255 -0
  72. package/hosts/codex/hook.py +2 -1
  73. package/hosts/commandcode/hook.py +239 -0
  74. package/hosts/copilot/hook.py +284 -0
  75. package/hosts/cursor/hook.py +31 -3
  76. package/hosts/droid/hook.py +259 -0
  77. package/hosts/dsh/hooks.json +1 -1
  78. package/hosts/gemini/hook.py +213 -0
  79. package/hosts/goose/hook.py +145 -0
  80. package/hosts/omp/hook.py +4 -1
  81. package/hosts/omp/tezgah-hook.ts.in +30 -7
  82. package/hosts/opencode/plugins/tezgah.js +309 -48
  83. package/hosts/opencode/tui/cli/tui.tsx +100 -0
  84. package/hosts/opencode/tui/tezgah-tui.tsx +2 -1
  85. package/hosts/qwen/hook.py +206 -0
  86. package/output-styles/tezgah.md +20 -15
  87. package/package.json +1 -1
  88. package/skills/ai-research/SKILL.md +21 -14
  89. package/skills/ai-research/SOURCE +7 -5
  90. package/skills/ai-research/index/1-frame.md +6 -6
  91. package/skills/ai-research/index/2-data.md +9 -9
  92. package/skills/ai-research/index/3-train.md +36 -36
  93. package/skills/ai-research/index/4-measure.md +13 -13
  94. package/skills/ai-research/index/5-run.md +11 -11
  95. package/skills/ai-research/index/6-write.md +23 -23
  96. package/skills/ai-research/library.json +104 -104
  97. package/skills/analyze-app/SKILL.md +17 -12
  98. package/skills/design-contract/SKILL.md +42 -7
  99. package/skills/design-contract/data-views.md +2 -2
  100. package/skills/design-library/EVALS.md +1 -1
  101. package/skills/design-library/INDEX.md +39 -39
  102. package/skills/design-library/SKILL.md +19 -13
  103. package/skills/design-library/SOURCE +45 -43
  104. package/skills/feature-audit/SKILL.md +20 -14
  105. package/skills/hallmark/LICENSE +21 -0
  106. package/skills/hallmark/SKILL.md +154 -0
  107. package/skills/hallmark/SOURCE +207 -0
  108. package/skills/hallmark/agents/openai.yaml +13 -0
  109. package/skills/hallmark/references/anatomy.md +71 -0
  110. package/skills/hallmark/references/brand-truth.md +40 -0
  111. package/skills/hallmark/references/comp.md +104 -0
  112. package/skills/hallmark/references/craft.md +116 -0
  113. package/skills/hallmark/references/dark-mode.md +49 -0
  114. package/skills/hallmark/references/data-viz.md +48 -0
  115. package/skills/hallmark/references/design-md.md +53 -0
  116. package/skills/hallmark/references/direction.md +52 -0
  117. package/skills/hallmark/references/export-formats.md +80 -0
  118. package/skills/hallmark/references/flow.md +131 -0
  119. package/skills/hallmark/references/fonts.md +58 -0
  120. package/skills/hallmark/references/gates.md +243 -0
  121. package/skills/hallmark/references/genres/atmospheric.md +24 -0
  122. package/skills/hallmark/references/genres/editorial.md +24 -0
  123. package/skills/hallmark/references/genres/modern-minimal.md +24 -0
  124. package/skills/hallmark/references/genres/playful.md +24 -0
  125. package/skills/hallmark/references/imagery.md +99 -0
  126. package/skills/hallmark/references/interaction-and-states.md +89 -0
  127. package/skills/hallmark/references/layout.md +104 -0
  128. package/skills/hallmark/references/macrostructures/01-bento-grid.md +21 -0
  129. package/skills/hallmark/references/macrostructures/02-long-document.md +35 -0
  130. package/skills/hallmark/references/macrostructures/03-marquee-hero.md +21 -0
  131. package/skills/hallmark/references/macrostructures/04-stat-led.md +21 -0
  132. package/skills/hallmark/references/macrostructures/05-workbench.md +21 -0
  133. package/skills/hallmark/references/macrostructures/06-conversational-faq.md +28 -0
  134. package/skills/hallmark/references/macrostructures/07-manifesto.md +28 -0
  135. package/skills/hallmark/references/macrostructures/08-photographic.md +21 -0
  136. package/skills/hallmark/references/macrostructures/09-quote-led.md +21 -0
  137. package/skills/hallmark/references/macrostructures/10-specimen.md +21 -0
  138. package/skills/hallmark/references/macrostructures/11-catalogue.md +21 -0
  139. package/skills/hallmark/references/macrostructures/12-letter.md +21 -0
  140. package/skills/hallmark/references/macrostructures/13-index-first.md +21 -0
  141. package/skills/hallmark/references/macrostructures/14-narrative-workflow.md +21 -0
  142. package/skills/hallmark/references/macrostructures/15-split-studio.md +21 -0
  143. package/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
  144. package/skills/hallmark/references/macrostructures/17-type-specimen.md +19 -0
  145. package/skills/hallmark/references/macrostructures/18-portfolio-grid.md +21 -0
  146. package/skills/hallmark/references/macrostructures/19-map-diagram.md +21 -0
  147. package/skills/hallmark/references/macrostructures/20-ecosystem-index.md +19 -0
  148. package/skills/hallmark/references/macrostructures/21-component-playground.md +21 -0
  149. package/skills/hallmark/references/macrostructures.md +119 -0
  150. package/skills/hallmark/references/microinteractions.md +80 -0
  151. package/skills/hallmark/references/patterns.md +202 -0
  152. package/skills/hallmark/references/redesign.md +88 -0
  153. package/skills/hallmark/references/responsive.md +46 -0
  154. package/skills/hallmark/references/review-finish.md +19 -0
  155. package/skills/hallmark/references/review-hero.md +20 -0
  156. package/skills/hallmark/references/scroll-choreography.md +110 -0
  157. package/skills/hallmark/references/texture.md +90 -0
  158. package/skills/hallmark/references/themes/README.md +58 -0
  159. package/skills/hallmark/references/themes/almanac.jpg +0 -0
  160. package/skills/hallmark/references/themes/almanac.md +103 -0
  161. package/skills/hallmark/references/themes/arcade.jpg +0 -0
  162. package/skills/hallmark/references/themes/arcade.md +102 -0
  163. package/skills/hallmark/references/themes/atelier.jpg +0 -0
  164. package/skills/hallmark/references/themes/atelier.md +98 -0
  165. package/skills/hallmark/references/themes/bloom.jpg +0 -0
  166. package/skills/hallmark/references/themes/bloom.md +102 -0
  167. package/skills/hallmark/references/themes/blueprint.jpg +0 -0
  168. package/skills/hallmark/references/themes/blueprint.md +103 -0
  169. package/skills/hallmark/references/themes/broadside.jpg +0 -0
  170. package/skills/hallmark/references/themes/broadside.md +108 -0
  171. package/skills/hallmark/references/themes/brutal.jpg +0 -0
  172. package/skills/hallmark/references/themes/brutal.md +95 -0
  173. package/skills/hallmark/references/themes/carnival.jpg +0 -0
  174. package/skills/hallmark/references/themes/carnival.md +104 -0
  175. package/skills/hallmark/references/themes/cobalt.jpg +0 -0
  176. package/skills/hallmark/references/themes/cobalt.md +101 -0
  177. package/skills/hallmark/references/themes/console.jpg +0 -0
  178. package/skills/hallmark/references/themes/console.md +99 -0
  179. package/skills/hallmark/references/themes/coral.jpg +0 -0
  180. package/skills/hallmark/references/themes/coral.md +102 -0
  181. package/skills/hallmark/references/themes/darkroom.jpg +0 -0
  182. package/skills/hallmark/references/themes/darkroom.md +99 -0
  183. package/skills/hallmark/references/themes/dose.jpg +0 -0
  184. package/skills/hallmark/references/themes/dose.md +98 -0
  185. package/skills/hallmark/references/themes/dusk.jpg +0 -0
  186. package/skills/hallmark/references/themes/dusk.md +105 -0
  187. package/skills/hallmark/references/themes/editorial.jpg +0 -0
  188. package/skills/hallmark/references/themes/editorial.md +97 -0
  189. package/skills/hallmark/references/themes/formwork.jpg +0 -0
  190. package/skills/hallmark/references/themes/formwork.md +107 -0
  191. package/skills/hallmark/references/themes/furrow.jpg +0 -0
  192. package/skills/hallmark/references/themes/furrow.md +98 -0
  193. package/skills/hallmark/references/themes/garden.jpg +0 -0
  194. package/skills/hallmark/references/themes/garden.md +97 -0
  195. package/skills/hallmark/references/themes/grid.jpg +0 -0
  196. package/skills/hallmark/references/themes/grid.md +101 -0
  197. package/skills/hallmark/references/themes/halftone.jpg +0 -0
  198. package/skills/hallmark/references/themes/halftone.md +106 -0
  199. package/skills/hallmark/references/themes/hedgerow.jpg +0 -0
  200. package/skills/hallmark/references/themes/hedgerow.md +104 -0
  201. package/skills/hallmark/references/themes/hum.jpg +0 -0
  202. package/skills/hallmark/references/themes/hum.md +99 -0
  203. package/skills/hallmark/references/themes/index.json +2191 -0
  204. package/skills/hallmark/references/themes/ink.jpg +0 -0
  205. package/skills/hallmark/references/themes/ink.md +106 -0
  206. package/skills/hallmark/references/themes/kiln.jpg +0 -0
  207. package/skills/hallmark/references/themes/kiln.md +108 -0
  208. package/skills/hallmark/references/themes/loom.jpg +0 -0
  209. package/skills/hallmark/references/themes/loom.md +106 -0
  210. package/skills/hallmark/references/themes/lumen.jpg +0 -0
  211. package/skills/hallmark/references/themes/lumen.md +103 -0
  212. package/skills/hallmark/references/themes/manifesto.jpg +0 -0
  213. package/skills/hallmark/references/themes/manifesto.md +101 -0
  214. package/skills/hallmark/references/themes/midnight.jpg +0 -0
  215. package/skills/hallmark/references/themes/midnight.md +97 -0
  216. package/skills/hallmark/references/themes/newsprint.jpg +0 -0
  217. package/skills/hallmark/references/themes/newsprint.md +102 -0
  218. package/skills/hallmark/references/themes/overprint.jpg +0 -0
  219. package/skills/hallmark/references/themes/overprint.md +101 -0
  220. package/skills/hallmark/references/themes/pasteup.jpg +0 -0
  221. package/skills/hallmark/references/themes/pasteup.md +100 -0
  222. package/skills/hallmark/references/themes/piste.jpg +0 -0
  223. package/skills/hallmark/references/themes/piste.md +99 -0
  224. package/skills/hallmark/references/themes/ribbon.jpg +0 -0
  225. package/skills/hallmark/references/themes/ribbon.md +106 -0
  226. package/skills/hallmark/references/themes/rim.jpg +0 -0
  227. package/skills/hallmark/references/themes/rim.md +96 -0
  228. package/skills/hallmark/references/themes/riso.jpg +0 -0
  229. package/skills/hallmark/references/themes/riso.md +98 -0
  230. package/skills/hallmark/references/themes/solstice.jpg +0 -0
  231. package/skills/hallmark/references/themes/solstice.md +104 -0
  232. package/skills/hallmark/references/themes/specimen.jpg +0 -0
  233. package/skills/hallmark/references/themes/specimen.md +100 -0
  234. package/skills/hallmark/references/themes/spore.jpg +0 -0
  235. package/skills/hallmark/references/themes/spore.md +104 -0
  236. package/skills/hallmark/references/themes/sport.jpg +0 -0
  237. package/skills/hallmark/references/themes/sport.md +101 -0
  238. package/skills/hallmark/references/themes/squeeze.jpg +0 -0
  239. package/skills/hallmark/references/themes/squeeze.md +99 -0
  240. package/skills/hallmark/references/themes/sticker.jpg +0 -0
  241. package/skills/hallmark/references/themes/sticker.md +106 -0
  242. package/skills/hallmark/references/themes/studio.jpg +0 -0
  243. package/skills/hallmark/references/themes/studio.md +99 -0
  244. package/skills/hallmark/references/themes/terminal.jpg +0 -0
  245. package/skills/hallmark/references/themes/terminal.md +96 -0
  246. package/skills/hallmark/references/themes/terrazzo.jpg +0 -0
  247. package/skills/hallmark/references/themes/terrazzo.md +106 -0
  248. package/skills/hallmark/references/themes/ultraviolet.jpg +0 -0
  249. package/skills/hallmark/references/themes/ultraviolet.md +106 -0
  250. package/skills/hallmark/references/themes/vellum.jpg +0 -0
  251. package/skills/hallmark/references/themes/vellum.md +105 -0
  252. package/skills/hallmark/references/themes/wayfind.jpg +0 -0
  253. package/skills/hallmark/references/themes/wayfind.md +105 -0
  254. package/skills/hallmark/references/themes/werkstatt.jpg +0 -0
  255. package/skills/hallmark/references/themes/werkstatt.md +105 -0
  256. package/skills/hallmark/scripts/capture.mjs +125 -0
  257. package/skills/hallmark/scripts/fixtures/exemplars/atmospheric.html +324 -0
  258. package/skills/hallmark/scripts/fixtures/exemplars/editorial.html +363 -0
  259. package/skills/hallmark/scripts/fixtures/exemplars/modern-minimal.html +527 -0
  260. package/skills/hallmark/scripts/fixtures/exemplars/playful.html +353 -0
  261. package/skills/hallmark/scripts/fixtures/eyebrow-fail/index.html +118 -0
  262. package/skills/hallmark/scripts/fixtures/eyebrow-pass/index.html +137 -0
  263. package/skills/hallmark/scripts/fixtures/kept/after.html +27 -0
  264. package/skills/hallmark/scripts/fixtures/kept/before.html +26 -0
  265. package/skills/hallmark/scripts/fixtures/slopped.html +145 -0
  266. package/skills/hallmark/scripts/fixtures/tailwind-fail/Feature.vue +14 -0
  267. package/skills/hallmark/scripts/fixtures/tailwind-fail/Hero.tsx +33 -0
  268. package/skills/hallmark/scripts/fixtures/tailwind-fail/index.html +74 -0
  269. package/skills/hallmark/scripts/fixtures/tailwind-fail/style.css +6 -0
  270. package/skills/hallmark/scripts/fixtures/tailwind-pass/Hero.tsx +33 -0
  271. package/skills/hallmark/scripts/fixtures/tailwind-pass/index.html +57 -0
  272. package/skills/hallmark/scripts/fixtures/tailwind-pass/style.css +15 -0
  273. package/skills/hallmark/scripts/fixtures/waiver/index.html +54 -0
  274. package/skills/hallmark/scripts/imagegen.mjs +85 -0
  275. package/skills/hallmark/scripts/install-hook.mjs +70 -0
  276. package/skills/hallmark/scripts/install.mjs +141 -0
  277. package/skills/hallmark/scripts/lint-hook.mjs +49 -0
  278. package/skills/hallmark/scripts/photos.json +1 -0
  279. package/skills/hallmark/scripts/picture.mjs +71 -0
  280. package/skills/hallmark/scripts/refcheck.mjs +352 -0
  281. package/skills/hallmark/scripts/sloplint-render.mjs +1252 -0
  282. package/skills/hallmark/scripts/sloplint.mjs +4422 -0
  283. package/skills/hallmark/scripts/theme.mjs +650 -0
  284. package/skills/harness/SKILL.md +17 -8
  285. package/skills/i-have-adhd/SKILL.md +32 -12
  286. package/skills/no-ai-slop/SKILL.md +15 -1
  287. package/skills/plan-add/SKILL.md +38 -27
  288. package/skills/plan-status/SKILL.md +13 -7
  289. package/skills/plan-sync/SKILL.md +18 -12
  290. package/skills/pm-frameworks/SKILL.md +19 -10
  291. package/skills/pm-frameworks/SOURCE +7 -5
  292. package/skills/ponytail/SKILL.md +19 -14
  293. package/skills/product-analysis/SKILL.md +22 -18
  294. package/skills/product-flow/SKILL.md +14 -9
  295. package/skills/research/SKILL.md +97 -48
  296. package/skills/rl-env/SKILL.md +25 -13
  297. package/skills/rl-env/SOURCE +8 -6
  298. package/skills/tezgah-contract/SKILL.md +65 -47
  299. package/statusline.py +20 -9
  300. package/workflows/graph-review.js +14 -2
  301. package/bin/tezgah-skill.py +0 -59
  302. /package/skills/ai-research/0-autoresearch-skill/{SKILL.md → ENTRY.md} +0 -0
  303. /package/skills/ai-research/01-model-architecture/litgpt/{SKILL.md → ENTRY.md} +0 -0
  304. /package/skills/ai-research/01-model-architecture/mamba/{SKILL.md → ENTRY.md} +0 -0
  305. /package/skills/ai-research/01-model-architecture/nanogpt/{SKILL.md → ENTRY.md} +0 -0
  306. /package/skills/ai-research/01-model-architecture/rwkv/{SKILL.md → ENTRY.md} +0 -0
  307. /package/skills/ai-research/01-model-architecture/torchtitan/{SKILL.md → ENTRY.md} +0 -0
  308. /package/skills/ai-research/02-tokenization/huggingface-tokenizers/{SKILL.md → ENTRY.md} +0 -0
  309. /package/skills/ai-research/02-tokenization/sentencepiece/{SKILL.md → ENTRY.md} +0 -0
  310. /package/skills/ai-research/03-fine-tuning/axolotl/{SKILL.md → ENTRY.md} +0 -0
  311. /package/skills/ai-research/03-fine-tuning/llama-factory/{SKILL.md → ENTRY.md} +0 -0
  312. /package/skills/ai-research/03-fine-tuning/peft/{SKILL.md → ENTRY.md} +0 -0
  313. /package/skills/ai-research/03-fine-tuning/unsloth/{SKILL.md → ENTRY.md} +0 -0
  314. /package/skills/ai-research/04-mechanistic-interpretability/nnsight/{SKILL.md → ENTRY.md} +0 -0
  315. /package/skills/ai-research/04-mechanistic-interpretability/pyvene/{SKILL.md → ENTRY.md} +0 -0
  316. /package/skills/ai-research/04-mechanistic-interpretability/saelens/{SKILL.md → ENTRY.md} +0 -0
  317. /package/skills/ai-research/04-mechanistic-interpretability/transformer-lens/{SKILL.md → ENTRY.md} +0 -0
  318. /package/skills/ai-research/05-data-processing/nemo-curator/{SKILL.md → ENTRY.md} +0 -0
  319. /package/skills/ai-research/05-data-processing/ray-data/{SKILL.md → ENTRY.md} +0 -0
  320. /package/skills/ai-research/06-post-training/grpo-rl-training/{SKILL.md → ENTRY.md} +0 -0
  321. /package/skills/ai-research/06-post-training/miles/{SKILL.md → ENTRY.md} +0 -0
  322. /package/skills/ai-research/06-post-training/openrlhf/{SKILL.md → ENTRY.md} +0 -0
  323. /package/skills/ai-research/06-post-training/simpo/{SKILL.md → ENTRY.md} +0 -0
  324. /package/skills/ai-research/06-post-training/slime/{SKILL.md → ENTRY.md} +0 -0
  325. /package/skills/ai-research/06-post-training/torchforge/{SKILL.md → ENTRY.md} +0 -0
  326. /package/skills/ai-research/06-post-training/trl-fine-tuning/{SKILL.md → ENTRY.md} +0 -0
  327. /package/skills/ai-research/06-post-training/verl/{SKILL.md → ENTRY.md} +0 -0
  328. /package/skills/ai-research/07-safety-alignment/constitutional-ai/{SKILL.md → ENTRY.md} +0 -0
  329. /package/skills/ai-research/07-safety-alignment/llamaguard/{SKILL.md → ENTRY.md} +0 -0
  330. /package/skills/ai-research/07-safety-alignment/nemo-guardrails/{SKILL.md → ENTRY.md} +0 -0
  331. /package/skills/ai-research/07-safety-alignment/prompt-guard/{SKILL.md → ENTRY.md} +0 -0
  332. /package/skills/ai-research/08-distributed-training/accelerate/{SKILL.md → ENTRY.md} +0 -0
  333. /package/skills/ai-research/08-distributed-training/deepspeed/{SKILL.md → ENTRY.md} +0 -0
  334. /package/skills/ai-research/08-distributed-training/megatron-core/{SKILL.md → ENTRY.md} +0 -0
  335. /package/skills/ai-research/08-distributed-training/pytorch-fsdp2/{SKILL.md → ENTRY.md} +0 -0
  336. /package/skills/ai-research/08-distributed-training/pytorch-lightning/{SKILL.md → ENTRY.md} +0 -0
  337. /package/skills/ai-research/08-distributed-training/ray-train/{SKILL.md → ENTRY.md} +0 -0
  338. /package/skills/ai-research/09-infrastructure/lambda-labs/{SKILL.md → ENTRY.md} +0 -0
  339. /package/skills/ai-research/09-infrastructure/modal/{SKILL.md → ENTRY.md} +0 -0
  340. /package/skills/ai-research/09-infrastructure/skypilot/{SKILL.md → ENTRY.md} +0 -0
  341. /package/skills/ai-research/10-optimization/awq/{SKILL.md → ENTRY.md} +0 -0
  342. /package/skills/ai-research/10-optimization/bitsandbytes/{SKILL.md → ENTRY.md} +0 -0
  343. /package/skills/ai-research/10-optimization/flash-attention/{SKILL.md → ENTRY.md} +0 -0
  344. /package/skills/ai-research/10-optimization/gguf/{SKILL.md → ENTRY.md} +0 -0
  345. /package/skills/ai-research/10-optimization/gptq/{SKILL.md → ENTRY.md} +0 -0
  346. /package/skills/ai-research/10-optimization/hqq/{SKILL.md → ENTRY.md} +0 -0
  347. /package/skills/ai-research/10-optimization/ml-training-recipes/{SKILL.md → ENTRY.md} +0 -0
  348. /package/skills/ai-research/11-evaluation/bigcode-evaluation-harness/{SKILL.md → ENTRY.md} +0 -0
  349. /package/skills/ai-research/11-evaluation/lm-evaluation-harness/{SKILL.md → ENTRY.md} +0 -0
  350. /package/skills/ai-research/11-evaluation/nemo-evaluator/{SKILL.md → ENTRY.md} +0 -0
  351. /package/skills/ai-research/12-inference-serving/llama-cpp/{SKILL.md → ENTRY.md} +0 -0
  352. /package/skills/ai-research/12-inference-serving/sglang/{SKILL.md → ENTRY.md} +0 -0
  353. /package/skills/ai-research/12-inference-serving/tensorrt-llm/{SKILL.md → ENTRY.md} +0 -0
  354. /package/skills/ai-research/12-inference-serving/vllm/{SKILL.md → ENTRY.md} +0 -0
  355. /package/skills/ai-research/13-mlops/mlflow/{SKILL.md → ENTRY.md} +0 -0
  356. /package/skills/ai-research/13-mlops/swanlab/{SKILL.md → ENTRY.md} +0 -0
  357. /package/skills/ai-research/13-mlops/tensorboard/{SKILL.md → ENTRY.md} +0 -0
  358. /package/skills/ai-research/13-mlops/weights-and-biases/{SKILL.md → ENTRY.md} +0 -0
  359. /package/skills/ai-research/14-agents/a-evolve/{SKILL.md → ENTRY.md} +0 -0
  360. /package/skills/ai-research/14-agents/autogpt/{SKILL.md → ENTRY.md} +0 -0
  361. /package/skills/ai-research/14-agents/crewai/{SKILL.md → ENTRY.md} +0 -0
  362. /package/skills/ai-research/14-agents/langchain/{SKILL.md → ENTRY.md} +0 -0
  363. /package/skills/ai-research/14-agents/llamaindex/{SKILL.md → ENTRY.md} +0 -0
  364. /package/skills/ai-research/15-rag/chroma/{SKILL.md → ENTRY.md} +0 -0
  365. /package/skills/ai-research/15-rag/faiss/{SKILL.md → ENTRY.md} +0 -0
  366. /package/skills/ai-research/15-rag/pinecone/{SKILL.md → ENTRY.md} +0 -0
  367. /package/skills/ai-research/15-rag/qdrant/{SKILL.md → ENTRY.md} +0 -0
  368. /package/skills/ai-research/15-rag/sentence-transformers/{SKILL.md → ENTRY.md} +0 -0
  369. /package/skills/ai-research/16-prompt-engineering/dspy/{SKILL.md → ENTRY.md} +0 -0
  370. /package/skills/ai-research/16-prompt-engineering/guidance/{SKILL.md → ENTRY.md} +0 -0
  371. /package/skills/ai-research/16-prompt-engineering/instructor/{SKILL.md → ENTRY.md} +0 -0
  372. /package/skills/ai-research/16-prompt-engineering/outlines/{SKILL.md → ENTRY.md} +0 -0
  373. /package/skills/ai-research/17-observability/langsmith/{SKILL.md → ENTRY.md} +0 -0
  374. /package/skills/ai-research/17-observability/phoenix/{SKILL.md → ENTRY.md} +0 -0
  375. /package/skills/ai-research/18-multimodal/audiocraft/{SKILL.md → ENTRY.md} +0 -0
  376. /package/skills/ai-research/18-multimodal/blip-2/{SKILL.md → ENTRY.md} +0 -0
  377. /package/skills/ai-research/18-multimodal/clip/{SKILL.md → ENTRY.md} +0 -0
  378. /package/skills/ai-research/18-multimodal/cosmos-policy/{SKILL.md → ENTRY.md} +0 -0
  379. /package/skills/ai-research/18-multimodal/llava/{SKILL.md → ENTRY.md} +0 -0
  380. /package/skills/ai-research/18-multimodal/openpi/{SKILL.md → ENTRY.md} +0 -0
  381. /package/skills/ai-research/18-multimodal/openvla-oft/{SKILL.md → ENTRY.md} +0 -0
  382. /package/skills/ai-research/18-multimodal/segment-anything/{SKILL.md → ENTRY.md} +0 -0
  383. /package/skills/ai-research/18-multimodal/stable-diffusion/{SKILL.md → ENTRY.md} +0 -0
  384. /package/skills/ai-research/18-multimodal/whisper/{SKILL.md → ENTRY.md} +0 -0
  385. /package/skills/ai-research/19-emerging-techniques/knowledge-distillation/{SKILL.md → ENTRY.md} +0 -0
  386. /package/skills/ai-research/19-emerging-techniques/long-context/{SKILL.md → ENTRY.md} +0 -0
  387. /package/skills/ai-research/19-emerging-techniques/model-merging/{SKILL.md → ENTRY.md} +0 -0
  388. /package/skills/ai-research/19-emerging-techniques/model-pruning/{SKILL.md → ENTRY.md} +0 -0
  389. /package/skills/ai-research/19-emerging-techniques/moe-training/{SKILL.md → ENTRY.md} +0 -0
  390. /package/skills/ai-research/19-emerging-techniques/speculative-decoding/{SKILL.md → ENTRY.md} +0 -0
  391. /package/skills/ai-research/20-ml-paper-writing/academic-plotting/{SKILL.md → ENTRY.md} +0 -0
  392. /package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/{SKILL.md → ENTRY.md} +0 -0
  393. /package/skills/ai-research/20-ml-paper-writing/presenting-conference-talks/{SKILL.md → ENTRY.md} +0 -0
  394. /package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/{SKILL.md → ENTRY.md} +0 -0
  395. /package/skills/ai-research/21-research-ideation/brainstorming-research-ideas/{SKILL.md → ENTRY.md} +0 -0
  396. /package/skills/ai-research/21-research-ideation/creative-thinking-for-research/{SKILL.md → ENTRY.md} +0 -0
  397. /package/skills/ai-research/22-agent-native-research-artifact/compiler/{SKILL.md → ENTRY.md} +0 -0
  398. /package/skills/ai-research/22-agent-native-research-artifact/research-manager/{SKILL.md → ENTRY.md} +0 -0
  399. /package/skills/ai-research/22-agent-native-research-artifact/rigor-reviewer/{SKILL.md → ENTRY.md} +0 -0
  400. /package/skills/design-library/adaptive-interfaces/skills/colour-independence/{SKILL.md → ENTRY.md} +0 -0
  401. /package/skills/design-library/adaptive-interfaces/skills/flexible-typography/{SKILL.md → ENTRY.md} +0 -0
  402. /package/skills/design-library/adaptive-interfaces/skills/information-density/{SKILL.md → ENTRY.md} +0 -0
  403. /package/skills/design-library/adaptive-interfaces/skills/preference-audit/{SKILL.md → ENTRY.md} +0 -0
  404. /package/skills/design-library/adaptive-interfaces/skills/responsive-accessibility/{SKILL.md → ENTRY.md} +0 -0
  405. /package/skills/design-library/adaptive-interfaces/skills/responsive-review/{SKILL.md → ENTRY.md} +0 -0
  406. /package/skills/design-library/adaptive-interfaces/skills/simplified-views/{SKILL.md → ENTRY.md} +0 -0
  407. /package/skills/design-library/adaptive-interfaces/skills/specify/{SKILL.md → ENTRY.md} +0 -0
  408. /package/skills/design-library/adaptive-interfaces/skills/user-preference-respect/{SKILL.md → ENTRY.md} +0 -0
  409. /package/skills/design-library/cognitive-accessibility/skills/adaptive-personalisation/{SKILL.md → ENTRY.md} +0 -0
  410. /package/skills/design-library/cognitive-accessibility/skills/assess-load/{SKILL.md → ENTRY.md} +0 -0
  411. /package/skills/design-library/cognitive-accessibility/skills/cognitive-load-assessment/{SKILL.md → ENTRY.md} +0 -0
  412. /package/skills/design-library/cognitive-accessibility/skills/contextual-help-design/{SKILL.md → ENTRY.md} +0 -0
  413. /package/skills/design-library/cognitive-accessibility/skills/error-prevention-recovery/{SKILL.md → ENTRY.md} +0 -0
  414. /package/skills/design-library/cognitive-accessibility/skills/focus-attention-design/{SKILL.md → ENTRY.md} +0 -0
  415. /package/skills/design-library/cognitive-accessibility/skills/memory-load-reduction/{SKILL.md → ENTRY.md} +0 -0
  416. /package/skills/design-library/cognitive-accessibility/skills/plain-language-design/{SKILL.md → ENTRY.md} +0 -0
  417. /package/skills/design-library/cognitive-accessibility/skills/review/{SKILL.md → ENTRY.md} +0 -0
  418. /package/skills/design-library/cognitive-accessibility/skills/simplify/{SKILL.md → ENTRY.md} +0 -0
  419. /package/skills/design-library/cognitive-accessibility/skills/wayfinding-navigation/{SKILL.md → ENTRY.md} +0 -0
  420. /package/skills/design-library/design-research/skills/behavioural-analytics/{SKILL.md → ENTRY.md} +0 -0
  421. /package/skills/design-library/design-research/skills/qual-quant-triangulation/{SKILL.md → ENTRY.md} +0 -0
  422. /package/skills/design-library/inclusive-interaction/skills/audit/{SKILL.md → ENTRY.md} +0 -0
  423. /package/skills/design-library/inclusive-interaction/skills/design-flow/{SKILL.md → ENTRY.md} +0 -0
  424. /package/skills/design-library/inclusive-interaction/skills/feedback-and-status/{SKILL.md → ENTRY.md} +0 -0
  425. /package/skills/design-library/inclusive-interaction/skills/gesture-alternatives/{SKILL.md → ENTRY.md} +0 -0
  426. /package/skills/design-library/inclusive-interaction/skills/keyboard-navigation/{SKILL.md → ENTRY.md} +0 -0
  427. /package/skills/design-library/inclusive-interaction/skills/keyboard-review/{SKILL.md → ENTRY.md} +0 -0
  428. /package/skills/design-library/inclusive-interaction/skills/motion-sensitivity/{SKILL.md → ENTRY.md} +0 -0
  429. /package/skills/design-library/inclusive-interaction/skills/multi-modal-input/{SKILL.md → ENTRY.md} +0 -0
  430. /package/skills/design-library/inclusive-interaction/skills/touch-target-design/{SKILL.md → ENTRY.md} +0 -0
  431. /package/skills/design-library/inclusive-interaction/skills/voice-interaction/{SKILL.md → ENTRY.md} +0 -0
  432. /package/skills/design-library/visual-critique/skills/critique-affordance/{SKILL.md → ENTRY.md} +0 -0
  433. /package/skills/design-library/visual-critique/skills/critique-brand-consistency/{SKILL.md → ENTRY.md} +0 -0
  434. /package/skills/design-library/visual-critique/skills/critique-color/{SKILL.md → ENTRY.md} +0 -0
  435. /package/skills/design-library/visual-critique/skills/critique-composition/{SKILL.md → ENTRY.md} +0 -0
  436. /package/skills/design-library/visual-critique/skills/critique-information-density/{SKILL.md → ENTRY.md} +0 -0
  437. /package/skills/design-library/visual-critique/skills/critique-typography/{SKILL.md → ENTRY.md} +0 -0
  438. /package/skills/design-library/visual-critique/skills/critique-visual-hierarchy/{SKILL.md → ENTRY.md} +0 -0
  439. /package/skills/pm-frameworks/intended-vs-implemented/{SKILL.md → ENTRY.md} +0 -0
  440. /package/skills/pm-frameworks/opportunity-solution-tree/{SKILL.md → ENTRY.md} +0 -0
  441. /package/skills/rl-env/generate-nemo-gym-env/{SKILL.md → ENTRY.md} +0 -0
  442. /package/skills/rl-env/generate-openenv-env/{SKILL.md → ENTRY.md} +0 -0
  443. /package/skills/rl-env/generate-ors-env/{SKILL.md → ENTRY.md} +0 -0
  444. /package/skills/rl-env/generate-verifiers-env/{SKILL.md → ENTRY.md} +0 -0
  445. /package/skills/rl-env/rl-env-from-description/{SKILL.md → ENTRY.md} +0 -0
@@ -20,20 +20,19 @@ import tezgah_research
20
20
  import tezgah_store
21
21
  from tezgah_guard import import_crash_key
22
22
  from tezgah_integrity import (GRANT_KIND, STEP_KINDS, _heredocs, _path as _ledger_path,
23
- _shell_segments, bind_session,
23
+ _shell_commands, bind_session,
24
24
  changed_files, cut, last_check, note,
25
25
  note_compaction, note_turn, outward_classes, redact,
26
26
  scratch_evidence, UNTRUSTED_CHANNEL)
27
27
  from tezgah_lessons import (lesson_key, lines as lesson_lines,
28
28
  tainted as tainted_lessons)
29
- from tezgah_policy import (CONDITIONAL_KEYS, CORE, FANOUT_ACTION, POINTERS,
29
+ from tezgah_policy import (ARMED_ACTIONS, BIN_TOOLS, CONDITIONAL_KEYS, CORE, POINTERS,
30
30
  PROMPT_REMINDER, REPLY_ANY, open_lines_note,
31
31
  pony_level_line)
32
32
  from tezgah_paths import (CACHE, CONTEXT_NUDGE_TOKENS, REPO_MARKS, SWITCHES,
33
33
  ai_research_dir, alts, armed,
34
34
  cache_dir, codegraph_bin, consult_options,
35
35
  ensure_workspace, fallback_cache, have_judge_key, language,
36
- link_workspace,
37
36
  off, orx_bin, packs, pony_level, project_top, root_for,
38
37
  roots, say, tool,
39
38
  work_tree, workspace, workspace_from_repo, worktrees,
@@ -146,7 +145,8 @@ def _fanout():
146
145
 
147
146
 
148
147
  PROMPT_HINTS = tuple((key, _hints(key)) for key in
149
- ("spec", "consult", "research", "product", "graph")) + (
148
+ ("spec", "consult", "research", "product", "design",
149
+ "graph")) + (
150
150
  ("fanout", _fanout()),)
151
151
 
152
152
  # the detached auto-index worker (lock-guarded, retrying); same dir as this file
@@ -174,12 +174,23 @@ CORE_RULES = (
174
174
  ("research", "**Research: route it to OpenResearch.**"),
175
175
  ("product", "**Product analysis: five axes, one evidence class per "
176
176
  "finding.**"),
177
+ ("design", "**Design: UI work reads the design skills.**"),
177
178
  ("attribution", "**No AI attribution, ever, on any host.**"),
178
179
  ("lang", "**Identifiers and messages stay English.**"),
179
180
  ("workspace", "**Workspace: `.tezgah/` only.**"),
180
181
  ("fanout", "**Parallel by default: fan out independent items.**"),
181
182
  )
182
183
 
184
+ # The shipped skill an armed rule leads with: the skill hint when the section
185
+ # search gave no line (`tezgah_skill_pick.rule_hint`, which still asks the
186
+ # skill to carry 3 of the prompt's words). S4Remeasure p08: the Research
187
+ # paragraph names orx's manual, Claude's roster lists `tezgah:research` by name
188
+ # only, and the skill holding the line's protocol was never opened. Product
189
+ # and design are not here: their paragraphs already name a skill per ask, and
190
+ # a lead skill hinted for them was wrong on 3 of 3 S2/S3 prompts it reached
191
+ # (no-ai-slop, feature-audit and analyze-app asks) and right on none.
192
+ RULE_SKILL = {"research": "research"}
193
+
183
194
  # The per-turn reminder's clause for each switchable rule, matched against
184
195
  # PROMPT_REMINDER with its whitespace collapsed. A kill switch drops its clause
185
196
  # here as it drops its paragraph from CORE; a test pins every clause to the
@@ -234,10 +245,9 @@ def render(text, root=""):
234
245
  words.update(REPLY_ANY)
235
246
  for key, word in words.items():
236
247
  text = text.replace("{%s}" % key.upper(), word)
237
- return (text.replace("{CONSULT_BIN}", tool("consult"))
238
- .replace("{CODEGEN_BIN}", tool("codegen"))
239
- .replace("{ORX_BIN}", orx_bin() or "orx")
240
- .replace("{RESEARCH_BIN}", tool("tezgah-research")).replace("{ROUTE_BIN}", tool("tezgah-route"))
248
+ for placeholder, name in BIN_TOOLS.items():
249
+ text = text.replace(placeholder, tool(name))
250
+ return (text.replace("{ORX_BIN}", orx_bin() or "orx")
241
251
  .replace("{AI_RESEARCH_DIR}", ai_research_dir())
242
252
  .replace("{PONY_LEVEL}", _pony_level_line())
243
253
  .replace("{ROOT}", root or ACTIVE_ROOT[0]
@@ -406,6 +416,53 @@ def slug(path):
406
416
  return re.sub(r"[^A-Za-z0-9]+", "-", path).strip("-")
407
417
 
408
418
 
419
+ def seed_index(root):
420
+ """Copy the main checkout's codegraph index into a linked worktree that has
421
+ none (plan 118), so the worker below runs the incremental `sync` on it, not a
422
+ full `init`. Returns the main checkout seeded from, else None.
423
+
424
+ The database stores repo-relative paths only, so a copy is a sound start for
425
+ the worktree's own index (spike: sync 1 s against init 10 s on this repo).
426
+ sqlite's backup API, not a file copy: main's codegraph may be writing. The
427
+ copy lands under a temporary name and is linked into place, so a second
428
+ seeder or a running worker never reads a half-written file. Every failure
429
+ fails open to today's `init`."""
430
+ import shutil
431
+ import sqlite3
432
+ import urllib.parse
433
+ from tezgah_paths import linked_main
434
+ main = linked_main(root)
435
+ src = main and os.path.join(main, ".codegraph", "codegraph.db")
436
+ dst = os.path.join(root, ".codegraph", "codegraph.db")
437
+ if not src or not os.path.isfile(src) or os.path.lexists(dst):
438
+ return None
439
+ tmp = "%s.seed-%d" % (dst, os.getpid())
440
+ try:
441
+ os.makedirs(os.path.dirname(dst), exist_ok=True)
442
+ ignore = os.path.join(main, ".codegraph", ".gitignore")
443
+ if os.path.isfile(ignore) and not os.path.lexists(
444
+ os.path.join(root, ".codegraph", ".gitignore")):
445
+ shutil.copyfile(ignore, os.path.join(root, ".codegraph", ".gitignore"))
446
+ source = sqlite3.connect("file:%s?mode=ro" % urllib.parse.quote(src), uri=True)
447
+ try:
448
+ target = sqlite3.connect(tmp)
449
+ try:
450
+ source.backup(target)
451
+ finally:
452
+ target.close()
453
+ finally:
454
+ source.close()
455
+ os.link(tmp, dst) # refuses when another seeder got there first
456
+ return main
457
+ except Exception:
458
+ return None
459
+ finally:
460
+ try:
461
+ os.remove(tmp)
462
+ except OSError:
463
+ pass
464
+
465
+
409
466
  def autoindex(root):
410
467
  """Detached incremental index. Returns a one-line status for the context."""
411
468
  if root in roots():
@@ -450,6 +507,7 @@ def autoindex(root):
450
507
  except OSError:
451
508
  pass
452
509
  note = "last auto-index failed (see %s)" % log_path
510
+ seeded = seed_index(root)
453
511
  try:
454
512
  log = open(log_path, "ab")
455
513
  # Spawn the lock-guarded worker rather than indexing inline. Two sessions
@@ -465,7 +523,8 @@ def autoindex(root):
465
523
  )
466
524
  except Exception as exc:
467
525
  return "auto-index could not start (%s); index this repo from a shell" % exc
468
- verb = "re-indexing" if stamped else "indexing (first time)"
526
+ verb = ("syncing its copy of %s's index" % seeded if seeded
527
+ else "re-indexing" if stamped else "indexing (first time)")
469
528
  if note:
470
529
  return "%s; %s in background now" % (note, verb)
471
530
  return "%s in background now" % verb
@@ -601,10 +660,11 @@ def task_line(task):
601
660
  handing those steps to the user."""
602
661
  paths = ", ".join(task.get("allowed_paths") or []) or "any path in the repo"
603
662
  return ("Active task %s is in phase `%s`; writes allowed on: %s. Move the "
604
- "phase yourself with `tezgah-task phase <next>` when the work reaches "
605
- "it, and `tezgah-task close %s done` when it is merged - never hand "
663
+ "phase yourself with `%s phase <next>` when the work reaches "
664
+ "it, and `%s close %s done` when it is merged - never hand "
606
665
  "these steps to the user." % (task.get("id"), task.get("phase"),
607
- paths, task.get("id")))
666
+ paths, tool("tezgah-task"),
667
+ tool("tezgah-task"), task.get("id")))
608
668
 
609
669
 
610
670
  # --- the resume block: the live turn state a compact loses -------------------
@@ -636,7 +696,7 @@ RESUME_FILES = 3
636
696
  # session_start, every prompt's `slices` part while any is pending.
637
697
  SLICE_LINES = 3
638
698
  SLICE_CHARS = 160
639
- SLICES_HEAD = "Slices left stopped or open (the journal, `tezgah-task slice reconcile`):"
699
+ SLICES_HEAD = "Slices left stopped or open (the journal, `{TASK_BIN} slice reconcile`):"
640
700
 
641
701
 
642
702
  def _plan_facts(path):
@@ -842,7 +902,7 @@ def lessons(root):
842
902
  for ln in lines[-LESSON_LINES:])
843
903
  if late:
844
904
  more += ("\n(%d of the lines above do not open with their rule; run "
845
- "`tezgah-lessons` for rewrites)" % late)
905
+ "`%s` for rewrites)" % (late, tool("tezgah-lessons")))
846
906
  return ("## Lessons from past mistakes in this repo (.tezgah/lessons.md)\n"
847
907
  + "\n".join("- " + ln for ln in recent) + more + "\n"
848
908
  "These are standing constraints: check the spec and the change "
@@ -964,12 +1024,12 @@ def armed_again(key):
964
1024
  """The one line a matching prompt pays for a paragraph this session was
965
1025
  already shown. The research rule keeps its `{OPEN_LINES}` slot: the open
966
1026
  lines are a fact about the repo now, not rule text the session holds. The
967
- fan-out rule keeps its action (`FANOUT_ACTION`): the rule is a thing to do
968
- on this turn's list, and a bare reminder that it exists was not done."""
1027
+ fan-out, product and design rules keep their action (`ARMED_ACTIONS`): the
1028
+ rule is a thing to do on this turn's ask, and a bare reminder that it exists
1029
+ was not done."""
969
1030
  label = dict(CORE_RULES)[key]
970
- if key == "fanout":
971
- return ("%s Armed again: %s The full rule is in the `tezgah-contract` "
972
- "skill." % (label, FANOUT_ACTION))
1031
+ if key in ARMED_ACTIONS:
1032
+ return "%s Armed again: %s" % (label, ARMED_ACTIONS[key])
973
1033
  return ("%s Armed again: the full rule was given earlier this session and "
974
1034
  "is in the `tezgah-contract` skill.%s"
975
1035
  % (label, "{OPEN_LINES}" if key == "research" else ""))
@@ -1106,6 +1166,9 @@ def switches(cwd):
1106
1166
  if off("spec-off"):
1107
1167
  drop.add("spec")
1108
1168
  disabled.append("spec-off")
1169
+ if off("design-off"):
1170
+ drop.add("design")
1171
+ disabled.append("design-off")
1109
1172
  if off("verify-off"):
1110
1173
  drop.add("integrity")
1111
1174
  disabled.append("verify-off")
@@ -1284,20 +1347,32 @@ def session_of(payload):
1284
1347
  # move to 15500 B. Moved again on 2026-10-13 (plan 105): the fidelity rule says
1285
1348
  # a research, analysis, review or plan ask ends at the plan (+105 B of core), and
1286
1349
  # the fixture's subagent brief reached 5500 B exactly, so subagent_start moves to
1287
- # 5800 B. A
1350
+ # 5800 B. Moved again on 2026-10-22 (plan 126): every CLI the core names is
1351
+ # rendered as its installed path (BIN_TOOLS), since no host but Claude has the
1352
+ # tezgah bin dir on PATH, and the worktree fixture's session start then gave up
1353
+ # its worktrees line (509 B), so the session budgets move to 16000 B. Moved
1354
+ # again on 2026-10-22 (plan 126, second pass): a research ask arms the Research
1355
+ # and Product paragraphs (6239 B on Claude, S4Remeasure p08) and the skill hint
1356
+ # that names the research skill (about 330 B with its path) was the block given
1357
+ # up, so the prompt budget moves to 7000 B. Moved again on 2026-10-28 (plan
1358
+ # 136): the subagent pointer says an owner-only question goes back as
1359
+ # `ESCALATE: owner` (+330 B), the fixture's subagent_start reached 5958 B and
1360
+ # gave up `consult` (205 B), so subagent_start moves to 6100 B. Moved again on
1361
+ # 2026-10-29 (plan 142): the output-shape paragraph says what the host's plan
1362
+ # mode changes (+168 B), and the worktree fixture's session_start gave up its
1363
+ # worktrees line again, so the session budgets move to 16200 B. A
1288
1364
  # budget in bytes, not tokens: this file has no tokenizer and a wrong estimate
1289
1365
  # would be worse than a bound.
1290
- CONTEXT_BUDGET = {"session_start": 15500, "post_compact": 15500,
1291
- "subagent_start": 5800, "user_prompt": 6500}
1366
+ CONTEXT_BUDGET = {"session_start": 16200, "post_compact": 16200,
1367
+ "subagent_start": 6100, "user_prompt": 7000}
1292
1368
  DEFAULT_BUDGET = 13000
1293
1369
  # The blocks in the order they are given up when the budget is exceeded, lowest
1294
1370
  # value first: text another surface already carries (the plan table lives in the
1295
1371
  # plan-status skill, the sibling checkouts in `tezgah-research --all`, the
1296
1372
  # lessons file is on disk, the generated-subagent note is a one-time fact); the
1297
- # per-turn skill hint - a suggestion of which skill to read first, never an
1298
- # instruction, so it yields to the relevant lessons after it - and those lessons,
1299
- # which first shrink to their first lesson (SHRINK); only the lessons a turn
1300
- # still shows are marked seen, so a later turn may still carry the rest. Then
1373
+ # lessons this prompt is about, which first shrink to their first lesson (SHRINK);
1374
+ # only the lessons a turn still shows are marked seen, so a later turn may still
1375
+ # carry the rest. Then
1301
1376
  # the tooling-availability lines, then the live state lines - the stale-graph
1302
1377
  # glance, then the resume
1303
1378
  # block, which outlives every status and availability line because it is the only
@@ -1306,17 +1381,19 @@ DEFAULT_BUDGET = 13000
1306
1381
  # journal's stopped or open slices, which outlive the resume block because after
1307
1382
  # an omp `/clear` they are the one pointer left to delegated work in flight - then
1308
1383
  # the scratch-path warning, which is about evidence the turn may already have
1309
- # claimed - then the active task's phase, which outlives both because a phase is what
1310
- # stops a refused write before it happens - then the delta, and the skill pointer
1311
- # last. A key absent from this tuple is never dropped: the always-on core, the
1384
+ # claimed - then the per-turn skill hint, which names the skill this ask needs
1385
+ # and no other block can work that out (it was the first block given up: 32
1386
+ # live drops, plan 126) - then the active task's phase, which outlives the hint
1387
+ # because a phase is what stops a refused write before it happens - then the
1388
+ # delta, and the skill pointer last. A key absent from this tuple is never dropped: the always-on core, the
1312
1389
  # per-turn reminder and an armed paragraph ARE the rules, and a budget that could
1313
1390
  # spend them would turn bloat into rule loss - which is the failure the budget
1314
1391
  # exists to prevent, not one it may cause.
1315
- DROP_ORDER = ("knowledge", "worktrees", "lessons", "skill", "lessons_turn",
1392
+ DROP_ORDER = ("knowledge", "worktrees", "lessons", "lessons_turn",
1316
1393
  "taste", "plans", "subagents", "steer", "orca", "consult", "research",
1317
1394
  "research_broken", "graph", "offnote", "orchestrate",
1318
- "index", "resume", "slices", "context", "scratch", "task", "delta",
1319
- "pointer")
1395
+ "index", "resume", "slices", "context", "scratch", "skill", "task",
1396
+ "delta", "pointer")
1320
1397
 
1321
1398
 
1322
1399
  def _first_item(text):
@@ -1449,17 +1526,18 @@ GATE_MIN_CALLS = 3
1449
1526
  # The tool names whose every call leaves a PreToolUse row (`began`,
1450
1527
  # tezgah_gate.decision's write and shell branch) and every refused one a `deny`:
1451
1528
  # Claude's write and shell tools, omp's `bash`/`edit`/`write` and Codex's
1452
- # `exec_command`/`apply_patch`. A
1529
+ # `exec_command`/`apply_patch`, Droid's `Execute`/`Create`/`ApplyPatch`. A
1453
1530
  # tool the gate may pass without a row (Read, Grep, Task, WebFetch, an MCP
1454
1531
  # call) is not counted, so its absence from the ledger is never read as a
1455
1532
  # disarmed gate.
1456
1533
  GATED_TOOLS = re.compile(r"(?i)^(?:bash|powershell|pwsh|edit|write|multiedit|"
1457
- r"notebookedit|exec_command|shell|apply_patch)$")
1534
+ r"notebookedit|exec_command|shell|apply_patch|"
1535
+ r"execute|create|applypatch)$")
1458
1536
  GATE_INACTIVE = (
1459
1537
  "tezgah gate inactive on this host: %d gated tool call(s) since this "
1460
1538
  "session's first turn and not one row from the gate, so the shortcut "
1461
1539
  "denials and the Stop check are not running. Say so before claiming a check "
1462
- "passed, run `tezgah-setup --report` yourself and quote its MISS rows.")
1540
+ "passed, run `~/.config/tezgah/bin/tezgah-setup --report` yourself and quote its MISS rows.")
1463
1541
 
1464
1542
 
1465
1543
  def _iso_epoch(value):
@@ -1580,7 +1658,8 @@ def context_nudge(payload, session_id):
1580
1658
  # The ledger kinds a hook other than the tool hooks writes: the prompt hook's
1581
1659
  # turn marker, judge row, lesson rows and disarm row, the Stop hook's claim,
1582
1660
  # refusal, after_block and shape rows and the stop_spec rows of plan 063's shadow
1583
- # (old ledgers only), the subagent-end hook's subagent_end row,
1661
+ # (old ledgers only), the subagent-end hook's subagent_end row, Droid's Stop
1662
+ # `reply_unread` row (a turn end whose reply the transcript did not yield),
1584
1663
  # compaction, the subagent mark and the `subagent_start` lineage row (both from
1585
1664
  # SubagentStart), the omp fork's `forked` row, the guard's crash
1586
1665
  # row (any hook), the damage row any reader writes and the session start's
@@ -1593,7 +1672,7 @@ NOT_TOOL_HOOK = frozenset((b"turn", b"judge", b"claim", b"refusal",
1593
1672
  b"after_block", b"subagent_end", b"stop_spec",
1594
1673
  b"shape", b"compact", b"orch", b"crash", b"route",
1595
1674
  b"spawned", b"forked", b"lesson", b"disarm", b"ledger_damage",
1596
- b"attest", b"subagent_start"))
1675
+ b"attest", b"subagent_start", b"reply_unread"))
1597
1676
  # The rows PostToolUse writes (`note_tool`): they prove the host ran the call,
1598
1677
  # not that the gate saw it - a PostToolUse hook keeps writing them while a
1599
1678
  # broken PreToolUse hook lets every call through - so they are no proof either.
@@ -2100,9 +2179,19 @@ def context_for(event, cwd, payload=None, with_core=True):
2100
2179
  # line at most, each section once per session (`section_hint`).
2101
2180
  if prompt and tezgah_skill_pick:
2102
2181
  hint = tezgah_skill_pick.suggest(prompt, session_id)
2182
+ # the host: omp's bridge and opencode's plugin send it, Claude's
2183
+ # manifest row declares it (`TEZGAH_HOST`, hooks/hooks.json)
2184
+ host = (payload or {}).get("host") if isinstance(payload, dict) else None
2185
+ host = host or os.environ.get("TEZGAH_HOST")
2103
2186
  if not hint:
2104
- host = (payload or {}).get("host") if isinstance(payload, dict) else None
2105
- hint = tezgah_skill_pick.section_hint(prompt, session_id, host=host)
2187
+ hint = tezgah_skill_pick.section_hint(prompt, session_id, host=host,
2188
+ cwd=cwd)
2189
+ for k in CONDITIONAL_KEYS:
2190
+ if hint:
2191
+ break
2192
+ if k in RULE_SKILL and k in conditional and k in matched:
2193
+ hint = tezgah_skill_pick.rule_hint(RULE_SKILL[k], prompt,
2194
+ session_id, host=host)
2106
2195
  if hint:
2107
2196
  parts.append(("skill", hint))
2108
2197
  # C1 and C3 ride this turn because it is the only channel a live state
@@ -2150,7 +2239,7 @@ def context_for(event, cwd, payload=None, with_core=True):
2150
2239
  # next turn and this part is the one that names the work left in flight.
2151
2240
  pending = slice_lines(root, session_id)
2152
2241
  if pending:
2153
- parts.append(("slices", "\n".join([SLICES_HEAD] + pending)))
2242
+ parts.append(("slices", "\n".join([render(SLICES_HEAD)] + pending)))
2154
2243
  # The router's own context: above the threshold, one line asks it to
2155
2244
  # push heavy reading through a slice (orchestrator-flow-audit S2 F1).
2156
2245
  heavy = context_nudge(payload, session_id)
@@ -2260,15 +2349,17 @@ def context_for(event, cwd, payload=None, with_core=True):
2260
2349
  else steering(root, (payload or {}).get("host")))
2261
2350
  if steer:
2262
2351
  parts.append(("steer", steer))
2352
+ # The workspace every per-project artifact lands in: created, ignored by the
2353
+ # project and given its private git before anything writes there. A root is
2354
+ # not a project, the helper returns None outside a work tree, and a linked
2355
+ # worktree is handed the main checkout's as a link rather than a second store
2356
+ # (plan 121). The session start is not the only event that gets here - a
2357
+ # compaction and a delegated agent's first call do too, and a worktree made
2358
+ # outside tezgah takes the link from whichever comes first. On a made
2359
+ # workspace a second call costs three stats and one file read.
2360
+ if ws not in roots():
2361
+ ensure_workspace(root)
2263
2362
  if event in ("session_start", "post_compact"):
2264
- # The workspace every per-project artifact lands in: created, ignored by
2265
- # the project and given its private git before anything writes there.
2266
- # A root is not a project, and the helper returns None outside a work tree.
2267
- if ws not in roots():
2268
- # never link to a `.tezgah` ensure_workspace refused: one the
2269
- # project tracks or a link the clone placed (review of plan 100)
2270
- if ensure_workspace(ws) and ws != root:
2271
- link_workspace(root, ws)
2272
2363
  # The live turn state, first in this region: on a compacted or resumed
2273
2364
  # session it is the one thing the rest of the block cannot re-derive.
2274
2365
  resume = resume_state(root, session_of(payload))
@@ -2367,7 +2458,12 @@ def context_for(event, cwd, payload=None, with_core=True):
2367
2458
  "(each tagged DERIVED, you concluded it, or RETRIEVED, "
2368
2459
  "you read it), Evidence (the path:line or command behind "
2369
2460
  "each), Confidence, Unresolved, Disconfirming, Conflicts. "
2370
- "Full rules: the `tezgah-contract` skill."))
2461
+ "A question only the owner can answer - choosing a variant "
2462
+ "or option a research, analysis or review recommends; a way "
2463
+ "around a tezgah refusal; deciding about another session's "
2464
+ "work (its line, plan or branch) - is never yours: return "
2465
+ "`ESCALATE: owner` with the options and a recommended "
2466
+ "default. Full rules: the `tezgah-contract` skill."))
2371
2467
  else:
2372
2468
  parts.append(("pointer", POINTER_LINE))
2373
2469
  text = budgeted(event, [(key, render(text.strip())) for key, text in parts])
@@ -2408,6 +2504,8 @@ _WRAPPER_ARG = frozenset(("timeout",))
2408
2504
  _OPTION_ARG = frozenset(("-u", "-g", "-k", "-o", "-C", "-h", "-T", "-r", "-t",
2409
2505
  "--user", "--group", "--prompt", "--chdir"))
2410
2506
  _ASSIGNMENT = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*=")
2507
+ # the programs that cannot fail, so the `||` arm behind one never runs
2508
+ NO_FAIL = frozenset(("true", ":"))
2411
2509
 
2412
2510
 
2413
2511
  def _substitutions(text, start, end):
@@ -2435,7 +2533,10 @@ def shell_programs(command, _depth=0):
2435
2533
  """Every word a shell line would run as a program, in order. A closed
2436
2534
  heredoc body is data: a quoted tag's whole, an unquoted tag's all but its
2437
2535
  `$( )` and backtick substitutions, which bash runs. The deny readers keep an
2438
- unquoted body visible whole."""
2536
+ unquoted body visible whole. A `||` arm behind a pipeline that cannot fail
2537
+ (`true` or `:` in its last stage, `SKIP=1 true` included) never runs, so its
2538
+ words are dropped until the next `;`, newline, `&` or substitution close
2539
+ (plan 129)."""
2439
2540
  command = str(command or "")
2440
2541
  text = list(command)
2441
2542
  for h in _heredocs(command):
@@ -2448,9 +2549,33 @@ def shell_programs(command, _depth=0):
2448
2549
  for k in range(h[4], h[5][1]):
2449
2550
  if text[k] != "\n" and k not in keep:
2450
2551
  text[k] = " "
2451
- out = []
2452
- for words in _shell_segments("".join(text)):
2453
- out += _command_words(words, _depth)
2552
+ # `ok` is the whole `&&`/`||` list's failability so far, not one stage's:
2553
+ # `a && b || c` runs `c` when `a` fails, so a `||` arm is dead only when
2554
+ # every link before it cannot fail. A builder (`|`, not `||`) hands the
2555
+ # list its last stage's status, as bash's exit is the pipeline's last.
2556
+ out, alive, safe = [], True, True
2557
+ for words, sep in _shell_commands("".join(text)):
2558
+ if alive:
2559
+ progs = _command_words(words, _depth)
2560
+ out += progs
2561
+ # a pipeline stage's own status is overwritten by the stage after it,
2562
+ # so only the stage that ends the pipeline folds into `safe`; a stage
2563
+ # that was skipped leaves the list's own status standing (a skipped
2564
+ # `&&` arm is why `a && b | true || c` still runs `c` when `a` fails)
2565
+ if "|" in sep and "||" not in sep:
2566
+ continue
2567
+ if alive:
2568
+ # `! cmd` inverts the status, so the arm after a `||` still runs:
2569
+ # a negated command is never "safe" (`! true || p1` runs `p1`)
2570
+ negated = bool(words) and words[0] == "!"
2571
+ safe = safe and not negated and bool(progs) and progs[0] in NO_FAIL
2572
+ # the separator decides the NEXT command, so it is read after this one
2573
+ if "||" in sep:
2574
+ alive, safe = not safe, True
2575
+ elif "&&" in sep:
2576
+ alive = True # the list may still succeed, so its next link may run
2577
+ elif ";" in sep or "\n" in sep or sep == "&" or sep == "":
2578
+ alive, safe = True, True
2454
2579
  return out
2455
2580
 
2456
2581
 
@@ -2831,7 +2956,7 @@ TOOL_USE_MEASURES = frozenset(("consult", "research", "graph", "orch", "judge"))
2831
2956
 
2832
2957
 
2833
2958
  def health_segments(cwd, session_id=None, used_override=None, idx_override=None,
2834
- observable=None):
2959
+ observable=None, manifest=None):
2835
2960
  """The armed/used checklist as structured segments, host-neutral.
2836
2961
 
2837
2962
  Each segment is {"key", "state", "glyph", "text", "group"}, the version
@@ -2861,7 +2986,13 @@ def health_segments(cwd, session_id=None, used_override=None, idx_override=None,
2861
2986
 
2862
2987
  idx_override: an idx glyph the host already resolved (one of "✓↻✗?–"), for a
2863
2988
  redraw that must not fork git for a cosmetic line - omp re-renders on every
2864
- turn_end and tool_result. None probes as before; the other marks stay live."""
2989
+ turn_end and tool_result. None probes as before; the other marks stay live.
2990
+
2991
+ manifest: an extension manifest named outright (the renderer's
2992
+ `--manifest`), read instead of the one discovered from `cwd`. Either way
2993
+ the built-in marks stay and the extension's chips follow them - a manifest
2994
+ that declares `statusline.override` owns where the line is drawn, never
2995
+ what it carries."""
2865
2996
  if session_id:
2866
2997
  bind_session(session_id) # the marks show the switches this session honors
2867
2998
  base, marks = repo_marks(cwd)
@@ -2921,6 +3052,27 @@ def health_segments(cwd, session_id=None, used_override=None, idx_override=None,
2921
3052
  if plan:
2922
3053
  segs.append({"key": "plans", "state": "ready" if "blk" in plan else "info",
2923
3054
  "glyph": "", "text": plan, "group": 3})
3055
+ # A repository's own statusline extension (tezgah_extension): it produces
3056
+ # structured segments, the line renders them after every built-in mark. Its
3057
+ # own `group` is normalized to one cluster past the built-ins, so the
3058
+ # separator reads the same however the extension numbered it. Imported here,
3059
+ # not at the top: a broken extension module costs its chips, never the line.
3060
+ try:
3061
+ import tezgah_extension
3062
+ ext = tezgah_extension.segments(cwd, session_id=session_id,
3063
+ manifest_file=manifest)
3064
+ except Exception:
3065
+ ext = []
3066
+ if ext:
3067
+ next_group = 1 + max((s.get("group", 0) for s in segs), default=-1)
3068
+ for seg in ext:
3069
+ seg["group"] = next_group
3070
+ # The state carries the mark, exactly as it does for a built-in: an
3071
+ # extension that leaves `glyph` out gets the same ✓/○/✗ the core
3072
+ # draws for its own marks, and only names one when it means another.
3073
+ if not seg.get("glyph"):
3074
+ seg["glyph"] = GLYPHS.get(seg.get("state"), "")
3075
+ segs.extend(ext)
2924
3076
  return segs
2925
3077
 
2926
3078