@r1z4x/tezgah 1.9.0 → 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.
- package/CHANGELOG.md +98 -1
- package/MANIFEST +382 -144
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.md +1 -1
- package/README.tr.md +1 -1
- package/bin/codegen +5 -2
- package/bin/tezgah-design +288 -1
- package/bin/tezgah-docs +1 -1
- package/bin/tezgah-doctor +39 -2
- package/bin/tezgah-import-ai-research +26 -12
- package/bin/tezgah-ocr-review +296 -0
- package/bin/tezgah-research +216 -40
- package/bin/tezgah-review-quote +185 -0
- package/bin/tezgah-setup +136 -33
- package/bin/tezgah-skill +1 -1
- package/bin/tezgah-status +201 -3
- package/bin/tezgah-task +203 -3
- package/commands/adhd.md +2 -2
- package/commands/ponytail.md +4 -4
- package/docs/architecture.md +2 -2
- package/docs/citations-baseline.json +2 -2
- package/docs/clarity-baseline.json +2 -2
- package/docs/contract.md +87 -42
- package/docs/environment.md +5 -3
- package/docs/evidence.md +28 -9
- package/docs/feature-audit.md +2 -2
- package/docs/gate.md +54 -31
- package/docs/glossary.md +5 -2
- package/docs/hosts.md +17 -3
- package/docs/index.json +34 -8
- package/docs/judge.md +4 -2
- package/docs/layers.md +3 -3
- package/docs/models.md +31 -9
- package/docs/operations.md +148 -8
- package/docs/research.md +786 -5
- package/docs/skills.md +137 -13
- package/docs/status-line.md +115 -1
- package/hooks/hooks.json +1 -1
- package/hooks/lang/en.json +10 -0
- package/hooks/lang/tr.json +11 -1
- package/hooks/tezgah_agents.py +38 -22
- package/hooks/tezgah_apps.py +18 -0
- package/hooks/tezgah_components.py +4 -0
- package/hooks/tezgah_context.py +189 -50
- package/hooks/tezgah_extension.py +337 -0
- package/hooks/tezgah_gate.py +188 -56
- package/hooks/tezgah_integrity.py +652 -105
- package/hooks/tezgah_judge.py +6 -4
- package/hooks/tezgah_models.py +59 -19
- package/hooks/tezgah_orca.py +1 -1
- package/hooks/tezgah_paths.py +102 -6
- package/hooks/tezgah_policy.py +94 -45
- package/hooks/tezgah_rank.py +9 -6
- package/hooks/tezgah_replay.py +4 -4
- package/hooks/tezgah_research.py +1260 -65
- package/hooks/tezgah_research_capture.py +1544 -0
- package/hooks/tezgah_research_evidence.py +842 -0
- package/hooks/tezgah_research_stats.py +258 -0
- package/hooks/tezgah_skill_pick.py +408 -106
- package/hooks/tezgah_stopspec.py +8 -1
- package/hooks/tezgah_task.py +12 -4
- package/hooks/tezgah_taste_ledger.py +1 -1
- package/hosts/cursor/hook.py +29 -2
- package/hosts/opencode/plugins/tezgah.js +307 -46
- package/hosts/opencode/tui/cli/tui.tsx +100 -0
- package/hosts/opencode/tui/tezgah-tui.tsx +2 -1
- package/output-styles/tezgah.md +10 -10
- package/package.json +1 -1
- package/packaging/install.ps1 +36 -3
- package/packaging/install.sh +13 -3
- package/packaging/upgrade.sh +61 -7
- package/skills/ai-research/SKILL.md +21 -14
- package/skills/ai-research/SOURCE +7 -5
- package/skills/ai-research/index/1-frame.md +6 -6
- package/skills/ai-research/index/2-data.md +9 -9
- package/skills/ai-research/index/3-train.md +36 -36
- package/skills/ai-research/index/4-measure.md +13 -13
- package/skills/ai-research/index/5-run.md +11 -11
- package/skills/ai-research/index/6-write.md +23 -23
- package/skills/ai-research/library.json +104 -104
- package/skills/analyze-app/SKILL.md +17 -12
- package/skills/design-contract/SKILL.md +42 -7
- package/skills/design-contract/data-views.md +2 -2
- package/skills/design-library/EVALS.md +1 -1
- package/skills/design-library/INDEX.md +39 -39
- package/skills/design-library/SKILL.md +19 -13
- package/skills/design-library/SOURCE +45 -43
- package/skills/feature-audit/SKILL.md +20 -14
- package/skills/hallmark/LICENSE +21 -0
- package/skills/hallmark/SKILL.md +154 -0
- package/skills/hallmark/SOURCE +207 -0
- package/skills/hallmark/agents/openai.yaml +13 -0
- package/skills/hallmark/references/anatomy.md +71 -0
- package/skills/hallmark/references/brand-truth.md +40 -0
- package/skills/hallmark/references/comp.md +104 -0
- package/skills/hallmark/references/craft.md +116 -0
- package/skills/hallmark/references/dark-mode.md +49 -0
- package/skills/hallmark/references/data-viz.md +48 -0
- package/skills/hallmark/references/design-md.md +53 -0
- package/skills/hallmark/references/direction.md +52 -0
- package/skills/hallmark/references/export-formats.md +80 -0
- package/skills/hallmark/references/flow.md +131 -0
- package/skills/hallmark/references/fonts.md +58 -0
- package/skills/hallmark/references/gates.md +243 -0
- package/skills/hallmark/references/genres/atmospheric.md +24 -0
- package/skills/hallmark/references/genres/editorial.md +24 -0
- package/skills/hallmark/references/genres/modern-minimal.md +24 -0
- package/skills/hallmark/references/genres/playful.md +24 -0
- package/skills/hallmark/references/imagery.md +99 -0
- package/skills/hallmark/references/interaction-and-states.md +89 -0
- package/skills/hallmark/references/layout.md +104 -0
- package/skills/hallmark/references/macrostructures/01-bento-grid.md +21 -0
- package/skills/hallmark/references/macrostructures/02-long-document.md +35 -0
- package/skills/hallmark/references/macrostructures/03-marquee-hero.md +21 -0
- package/skills/hallmark/references/macrostructures/04-stat-led.md +21 -0
- package/skills/hallmark/references/macrostructures/05-workbench.md +21 -0
- package/skills/hallmark/references/macrostructures/06-conversational-faq.md +28 -0
- package/skills/hallmark/references/macrostructures/07-manifesto.md +28 -0
- package/skills/hallmark/references/macrostructures/08-photographic.md +21 -0
- package/skills/hallmark/references/macrostructures/09-quote-led.md +21 -0
- package/skills/hallmark/references/macrostructures/10-specimen.md +21 -0
- package/skills/hallmark/references/macrostructures/11-catalogue.md +21 -0
- package/skills/hallmark/references/macrostructures/12-letter.md +21 -0
- package/skills/hallmark/references/macrostructures/13-index-first.md +21 -0
- package/skills/hallmark/references/macrostructures/14-narrative-workflow.md +21 -0
- package/skills/hallmark/references/macrostructures/15-split-studio.md +21 -0
- package/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
- package/skills/hallmark/references/macrostructures/17-type-specimen.md +19 -0
- package/skills/hallmark/references/macrostructures/18-portfolio-grid.md +21 -0
- package/skills/hallmark/references/macrostructures/19-map-diagram.md +21 -0
- package/skills/hallmark/references/macrostructures/20-ecosystem-index.md +19 -0
- package/skills/hallmark/references/macrostructures/21-component-playground.md +21 -0
- package/skills/hallmark/references/macrostructures.md +119 -0
- package/skills/hallmark/references/microinteractions.md +80 -0
- package/skills/hallmark/references/patterns.md +202 -0
- package/skills/hallmark/references/redesign.md +88 -0
- package/skills/hallmark/references/responsive.md +46 -0
- package/skills/hallmark/references/review-finish.md +19 -0
- package/skills/hallmark/references/review-hero.md +20 -0
- package/skills/hallmark/references/scroll-choreography.md +110 -0
- package/skills/hallmark/references/texture.md +90 -0
- package/skills/hallmark/references/themes/README.md +58 -0
- package/skills/hallmark/references/themes/almanac.jpg +0 -0
- package/skills/hallmark/references/themes/almanac.md +103 -0
- package/skills/hallmark/references/themes/arcade.jpg +0 -0
- package/skills/hallmark/references/themes/arcade.md +102 -0
- package/skills/hallmark/references/themes/atelier.jpg +0 -0
- package/skills/hallmark/references/themes/atelier.md +98 -0
- package/skills/hallmark/references/themes/bloom.jpg +0 -0
- package/skills/hallmark/references/themes/bloom.md +102 -0
- package/skills/hallmark/references/themes/blueprint.jpg +0 -0
- package/skills/hallmark/references/themes/blueprint.md +103 -0
- package/skills/hallmark/references/themes/broadside.jpg +0 -0
- package/skills/hallmark/references/themes/broadside.md +108 -0
- package/skills/hallmark/references/themes/brutal.jpg +0 -0
- package/skills/hallmark/references/themes/brutal.md +95 -0
- package/skills/hallmark/references/themes/carnival.jpg +0 -0
- package/skills/hallmark/references/themes/carnival.md +104 -0
- package/skills/hallmark/references/themes/cobalt.jpg +0 -0
- package/skills/hallmark/references/themes/cobalt.md +101 -0
- package/skills/hallmark/references/themes/console.jpg +0 -0
- package/skills/hallmark/references/themes/console.md +99 -0
- package/skills/hallmark/references/themes/coral.jpg +0 -0
- package/skills/hallmark/references/themes/coral.md +102 -0
- package/skills/hallmark/references/themes/darkroom.jpg +0 -0
- package/skills/hallmark/references/themes/darkroom.md +99 -0
- package/skills/hallmark/references/themes/dose.jpg +0 -0
- package/skills/hallmark/references/themes/dose.md +98 -0
- package/skills/hallmark/references/themes/dusk.jpg +0 -0
- package/skills/hallmark/references/themes/dusk.md +105 -0
- package/skills/hallmark/references/themes/editorial.jpg +0 -0
- package/skills/hallmark/references/themes/editorial.md +97 -0
- package/skills/hallmark/references/themes/formwork.jpg +0 -0
- package/skills/hallmark/references/themes/formwork.md +107 -0
- package/skills/hallmark/references/themes/furrow.jpg +0 -0
- package/skills/hallmark/references/themes/furrow.md +98 -0
- package/skills/hallmark/references/themes/garden.jpg +0 -0
- package/skills/hallmark/references/themes/garden.md +97 -0
- package/skills/hallmark/references/themes/grid.jpg +0 -0
- package/skills/hallmark/references/themes/grid.md +101 -0
- package/skills/hallmark/references/themes/halftone.jpg +0 -0
- package/skills/hallmark/references/themes/halftone.md +106 -0
- package/skills/hallmark/references/themes/hedgerow.jpg +0 -0
- package/skills/hallmark/references/themes/hedgerow.md +104 -0
- package/skills/hallmark/references/themes/hum.jpg +0 -0
- package/skills/hallmark/references/themes/hum.md +99 -0
- package/skills/hallmark/references/themes/index.json +2191 -0
- package/skills/hallmark/references/themes/ink.jpg +0 -0
- package/skills/hallmark/references/themes/ink.md +106 -0
- package/skills/hallmark/references/themes/kiln.jpg +0 -0
- package/skills/hallmark/references/themes/kiln.md +108 -0
- package/skills/hallmark/references/themes/loom.jpg +0 -0
- package/skills/hallmark/references/themes/loom.md +106 -0
- package/skills/hallmark/references/themes/lumen.jpg +0 -0
- package/skills/hallmark/references/themes/lumen.md +103 -0
- package/skills/hallmark/references/themes/manifesto.jpg +0 -0
- package/skills/hallmark/references/themes/manifesto.md +101 -0
- package/skills/hallmark/references/themes/midnight.jpg +0 -0
- package/skills/hallmark/references/themes/midnight.md +97 -0
- package/skills/hallmark/references/themes/newsprint.jpg +0 -0
- package/skills/hallmark/references/themes/newsprint.md +102 -0
- package/skills/hallmark/references/themes/overprint.jpg +0 -0
- package/skills/hallmark/references/themes/overprint.md +101 -0
- package/skills/hallmark/references/themes/pasteup.jpg +0 -0
- package/skills/hallmark/references/themes/pasteup.md +100 -0
- package/skills/hallmark/references/themes/piste.jpg +0 -0
- package/skills/hallmark/references/themes/piste.md +99 -0
- package/skills/hallmark/references/themes/ribbon.jpg +0 -0
- package/skills/hallmark/references/themes/ribbon.md +106 -0
- package/skills/hallmark/references/themes/rim.jpg +0 -0
- package/skills/hallmark/references/themes/rim.md +96 -0
- package/skills/hallmark/references/themes/riso.jpg +0 -0
- package/skills/hallmark/references/themes/riso.md +98 -0
- package/skills/hallmark/references/themes/solstice.jpg +0 -0
- package/skills/hallmark/references/themes/solstice.md +104 -0
- package/skills/hallmark/references/themes/specimen.jpg +0 -0
- package/skills/hallmark/references/themes/specimen.md +100 -0
- package/skills/hallmark/references/themes/spore.jpg +0 -0
- package/skills/hallmark/references/themes/spore.md +104 -0
- package/skills/hallmark/references/themes/sport.jpg +0 -0
- package/skills/hallmark/references/themes/sport.md +101 -0
- package/skills/hallmark/references/themes/squeeze.jpg +0 -0
- package/skills/hallmark/references/themes/squeeze.md +99 -0
- package/skills/hallmark/references/themes/sticker.jpg +0 -0
- package/skills/hallmark/references/themes/sticker.md +106 -0
- package/skills/hallmark/references/themes/studio.jpg +0 -0
- package/skills/hallmark/references/themes/studio.md +99 -0
- package/skills/hallmark/references/themes/terminal.jpg +0 -0
- package/skills/hallmark/references/themes/terminal.md +96 -0
- package/skills/hallmark/references/themes/terrazzo.jpg +0 -0
- package/skills/hallmark/references/themes/terrazzo.md +106 -0
- package/skills/hallmark/references/themes/ultraviolet.jpg +0 -0
- package/skills/hallmark/references/themes/ultraviolet.md +106 -0
- package/skills/hallmark/references/themes/vellum.jpg +0 -0
- package/skills/hallmark/references/themes/vellum.md +105 -0
- package/skills/hallmark/references/themes/wayfind.jpg +0 -0
- package/skills/hallmark/references/themes/wayfind.md +105 -0
- package/skills/hallmark/references/themes/werkstatt.jpg +0 -0
- package/skills/hallmark/references/themes/werkstatt.md +105 -0
- package/skills/hallmark/scripts/capture.mjs +125 -0
- package/skills/hallmark/scripts/fixtures/exemplars/atmospheric.html +324 -0
- package/skills/hallmark/scripts/fixtures/exemplars/editorial.html +363 -0
- package/skills/hallmark/scripts/fixtures/exemplars/modern-minimal.html +527 -0
- package/skills/hallmark/scripts/fixtures/exemplars/playful.html +353 -0
- package/skills/hallmark/scripts/fixtures/eyebrow-fail/index.html +118 -0
- package/skills/hallmark/scripts/fixtures/eyebrow-pass/index.html +137 -0
- package/skills/hallmark/scripts/fixtures/kept/after.html +27 -0
- package/skills/hallmark/scripts/fixtures/kept/before.html +26 -0
- package/skills/hallmark/scripts/fixtures/slopped.html +145 -0
- package/skills/hallmark/scripts/fixtures/tailwind-fail/Feature.vue +14 -0
- package/skills/hallmark/scripts/fixtures/tailwind-fail/Hero.tsx +33 -0
- package/skills/hallmark/scripts/fixtures/tailwind-fail/index.html +74 -0
- package/skills/hallmark/scripts/fixtures/tailwind-fail/style.css +6 -0
- package/skills/hallmark/scripts/fixtures/tailwind-pass/Hero.tsx +33 -0
- package/skills/hallmark/scripts/fixtures/tailwind-pass/index.html +57 -0
- package/skills/hallmark/scripts/fixtures/tailwind-pass/style.css +15 -0
- package/skills/hallmark/scripts/fixtures/waiver/index.html +54 -0
- package/skills/hallmark/scripts/imagegen.mjs +85 -0
- package/skills/hallmark/scripts/install-hook.mjs +70 -0
- package/skills/hallmark/scripts/install.mjs +141 -0
- package/skills/hallmark/scripts/lint-hook.mjs +49 -0
- package/skills/hallmark/scripts/photos.json +1 -0
- package/skills/hallmark/scripts/picture.mjs +71 -0
- package/skills/hallmark/scripts/refcheck.mjs +352 -0
- package/skills/hallmark/scripts/sloplint-render.mjs +1252 -0
- package/skills/hallmark/scripts/sloplint.mjs +4422 -0
- package/skills/hallmark/scripts/theme.mjs +650 -0
- package/skills/harness/SKILL.md +15 -8
- package/skills/i-have-adhd/SKILL.md +22 -11
- package/skills/no-ai-slop/SKILL.md +15 -1
- package/skills/plan-add/SKILL.md +33 -26
- package/skills/plan-status/SKILL.md +13 -7
- package/skills/plan-sync/SKILL.md +18 -12
- package/skills/pm-frameworks/SKILL.md +19 -10
- package/skills/pm-frameworks/SOURCE +7 -5
- package/skills/ponytail/SKILL.md +19 -14
- package/skills/product-analysis/SKILL.md +22 -18
- package/skills/product-flow/SKILL.md +14 -9
- package/skills/research/SKILL.md +75 -39
- package/skills/rl-env/SKILL.md +25 -13
- package/skills/rl-env/SOURCE +8 -6
- package/skills/tezgah-contract/SKILL.md +47 -42
- package/bin/tezgah-skill.py +0 -59
- /package/skills/ai-research/0-autoresearch-skill/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/litgpt/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/mamba/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/nanogpt/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/rwkv/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/torchtitan/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/02-tokenization/huggingface-tokenizers/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/02-tokenization/sentencepiece/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/03-fine-tuning/axolotl/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/03-fine-tuning/llama-factory/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/03-fine-tuning/peft/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/03-fine-tuning/unsloth/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/04-mechanistic-interpretability/nnsight/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/04-mechanistic-interpretability/pyvene/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/04-mechanistic-interpretability/saelens/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/04-mechanistic-interpretability/transformer-lens/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/05-data-processing/nemo-curator/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/05-data-processing/ray-data/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/grpo-rl-training/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/miles/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/openrlhf/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/simpo/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/slime/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/torchforge/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/trl-fine-tuning/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/verl/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/07-safety-alignment/constitutional-ai/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/07-safety-alignment/llamaguard/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/07-safety-alignment/nemo-guardrails/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/07-safety-alignment/prompt-guard/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/accelerate/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/deepspeed/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/megatron-core/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/pytorch-fsdp2/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/pytorch-lightning/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/ray-train/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/09-infrastructure/lambda-labs/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/09-infrastructure/modal/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/09-infrastructure/skypilot/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/awq/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/bitsandbytes/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/flash-attention/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/gguf/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/gptq/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/hqq/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/ml-training-recipes/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/11-evaluation/bigcode-evaluation-harness/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/11-evaluation/lm-evaluation-harness/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/11-evaluation/nemo-evaluator/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/12-inference-serving/llama-cpp/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/12-inference-serving/sglang/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/12-inference-serving/tensorrt-llm/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/12-inference-serving/vllm/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/13-mlops/mlflow/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/13-mlops/swanlab/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/13-mlops/tensorboard/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/13-mlops/weights-and-biases/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/a-evolve/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/autogpt/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/crewai/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/langchain/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/llamaindex/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/chroma/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/faiss/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/pinecone/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/qdrant/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/sentence-transformers/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/16-prompt-engineering/dspy/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/16-prompt-engineering/guidance/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/16-prompt-engineering/instructor/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/16-prompt-engineering/outlines/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/17-observability/langsmith/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/17-observability/phoenix/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/audiocraft/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/blip-2/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/clip/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/cosmos-policy/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/llava/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/openpi/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/openvla-oft/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/segment-anything/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/stable-diffusion/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/whisper/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/knowledge-distillation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/long-context/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/model-merging/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/model-pruning/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/moe-training/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/speculative-decoding/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/20-ml-paper-writing/academic-plotting/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/20-ml-paper-writing/presenting-conference-talks/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/21-research-ideation/brainstorming-research-ideas/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/21-research-ideation/creative-thinking-for-research/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/22-agent-native-research-artifact/compiler/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/22-agent-native-research-artifact/research-manager/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/22-agent-native-research-artifact/rigor-reviewer/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/colour-independence/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/flexible-typography/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/information-density/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/preference-audit/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/responsive-accessibility/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/responsive-review/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/simplified-views/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/specify/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/user-preference-respect/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/adaptive-personalisation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/assess-load/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/cognitive-load-assessment/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/contextual-help-design/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/error-prevention-recovery/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/focus-attention-design/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/memory-load-reduction/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/plain-language-design/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/review/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/simplify/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/wayfinding-navigation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/design-research/skills/behavioural-analytics/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/design-research/skills/qual-quant-triangulation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/audit/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/design-flow/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/feedback-and-status/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/gesture-alternatives/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/keyboard-navigation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/keyboard-review/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/motion-sensitivity/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/multi-modal-input/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/touch-target-design/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/voice-interaction/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-affordance/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-brand-consistency/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-color/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-composition/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-information-density/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-typography/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-visual-hierarchy/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/pm-frameworks/intended-vs-implemented/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/pm-frameworks/opportunity-solution-tree/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/generate-nemo-gym-env/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/generate-openenv-env/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/generate-ors-env/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/generate-verifiers-env/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/rl-env-from-description/{SKILL.md → ENTRY.md} +0 -0
package/hooks/tezgah_context.py
CHANGED
|
@@ -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
|
-
|
|
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,
|
|
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", "
|
|
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
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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 = "
|
|
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
|
|
605
|
-
"it, and
|
|
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,
|
|
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, `
|
|
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
|
-
"`
|
|
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
|
|
968
|
-
on this turn's
|
|
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
|
|
971
|
-
return
|
|
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,26 @@ 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.
|
|
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. A
|
|
1288
1358
|
# budget in bytes, not tokens: this file has no tokenizer and a wrong estimate
|
|
1289
1359
|
# would be worse than a bound.
|
|
1290
|
-
CONTEXT_BUDGET = {"session_start":
|
|
1291
|
-
"subagent_start": 5800, "user_prompt":
|
|
1360
|
+
CONTEXT_BUDGET = {"session_start": 16000, "post_compact": 16000,
|
|
1361
|
+
"subagent_start": 5800, "user_prompt": 7000}
|
|
1292
1362
|
DEFAULT_BUDGET = 13000
|
|
1293
1363
|
# The blocks in the order they are given up when the budget is exceeded, lowest
|
|
1294
1364
|
# value first: text another surface already carries (the plan table lives in the
|
|
1295
1365
|
# plan-status skill, the sibling checkouts in `tezgah-research --all`, the
|
|
1296
1366
|
# lessons file is on disk, the generated-subagent note is a one-time fact); the
|
|
1297
|
-
#
|
|
1298
|
-
#
|
|
1299
|
-
#
|
|
1300
|
-
# still shows are marked seen, so a later turn may still carry the rest. Then
|
|
1367
|
+
# lessons this prompt is about, which first shrink to their first lesson (SHRINK);
|
|
1368
|
+
# only the lessons a turn still shows are marked seen, so a later turn may still
|
|
1369
|
+
# carry the rest. Then
|
|
1301
1370
|
# the tooling-availability lines, then the live state lines - the stale-graph
|
|
1302
1371
|
# glance, then the resume
|
|
1303
1372
|
# block, which outlives every status and availability line because it is the only
|
|
@@ -1306,17 +1375,19 @@ DEFAULT_BUDGET = 13000
|
|
|
1306
1375
|
# journal's stopped or open slices, which outlive the resume block because after
|
|
1307
1376
|
# an omp `/clear` they are the one pointer left to delegated work in flight - then
|
|
1308
1377
|
# the scratch-path warning, which is about evidence the turn may already have
|
|
1309
|
-
# claimed - then the
|
|
1310
|
-
#
|
|
1311
|
-
#
|
|
1378
|
+
# claimed - then the per-turn skill hint, which names the skill this ask needs
|
|
1379
|
+
# and no other block can work that out (it was the first block given up: 32
|
|
1380
|
+
# live drops, plan 126) - then the active task's phase, which outlives the hint
|
|
1381
|
+
# because a phase is what stops a refused write before it happens - then the
|
|
1382
|
+
# delta, and the skill pointer last. A key absent from this tuple is never dropped: the always-on core, the
|
|
1312
1383
|
# per-turn reminder and an armed paragraph ARE the rules, and a budget that could
|
|
1313
1384
|
# spend them would turn bloat into rule loss - which is the failure the budget
|
|
1314
1385
|
# exists to prevent, not one it may cause.
|
|
1315
|
-
DROP_ORDER = ("knowledge", "worktrees", "lessons", "
|
|
1386
|
+
DROP_ORDER = ("knowledge", "worktrees", "lessons", "lessons_turn",
|
|
1316
1387
|
"taste", "plans", "subagents", "steer", "orca", "consult", "research",
|
|
1317
1388
|
"research_broken", "graph", "offnote", "orchestrate",
|
|
1318
|
-
"index", "resume", "slices", "context", "scratch", "
|
|
1319
|
-
"pointer")
|
|
1389
|
+
"index", "resume", "slices", "context", "scratch", "skill", "task",
|
|
1390
|
+
"delta", "pointer")
|
|
1320
1391
|
|
|
1321
1392
|
|
|
1322
1393
|
def _first_item(text):
|
|
@@ -1459,7 +1530,7 @@ GATE_INACTIVE = (
|
|
|
1459
1530
|
"tezgah gate inactive on this host: %d gated tool call(s) since this "
|
|
1460
1531
|
"session's first turn and not one row from the gate, so the shortcut "
|
|
1461
1532
|
"denials and the Stop check are not running. Say so before claiming a check "
|
|
1462
|
-
"passed, run
|
|
1533
|
+
"passed, run `~/.config/tezgah/bin/tezgah-setup --report` yourself and quote its MISS rows.")
|
|
1463
1534
|
|
|
1464
1535
|
|
|
1465
1536
|
def _iso_epoch(value):
|
|
@@ -2100,9 +2171,19 @@ def context_for(event, cwd, payload=None, with_core=True):
|
|
|
2100
2171
|
# line at most, each section once per session (`section_hint`).
|
|
2101
2172
|
if prompt and tezgah_skill_pick:
|
|
2102
2173
|
hint = tezgah_skill_pick.suggest(prompt, session_id)
|
|
2174
|
+
# the host: omp's bridge and opencode's plugin send it, Claude's
|
|
2175
|
+
# manifest row declares it (`TEZGAH_HOST`, hooks/hooks.json)
|
|
2176
|
+
host = (payload or {}).get("host") if isinstance(payload, dict) else None
|
|
2177
|
+
host = host or os.environ.get("TEZGAH_HOST")
|
|
2103
2178
|
if not hint:
|
|
2104
|
-
|
|
2105
|
-
|
|
2179
|
+
hint = tezgah_skill_pick.section_hint(prompt, session_id, host=host,
|
|
2180
|
+
cwd=cwd)
|
|
2181
|
+
for k in CONDITIONAL_KEYS:
|
|
2182
|
+
if hint:
|
|
2183
|
+
break
|
|
2184
|
+
if k in RULE_SKILL and k in conditional and k in matched:
|
|
2185
|
+
hint = tezgah_skill_pick.rule_hint(RULE_SKILL[k], prompt,
|
|
2186
|
+
session_id, host=host)
|
|
2106
2187
|
if hint:
|
|
2107
2188
|
parts.append(("skill", hint))
|
|
2108
2189
|
# C1 and C3 ride this turn because it is the only channel a live state
|
|
@@ -2150,7 +2231,7 @@ def context_for(event, cwd, payload=None, with_core=True):
|
|
|
2150
2231
|
# next turn and this part is the one that names the work left in flight.
|
|
2151
2232
|
pending = slice_lines(root, session_id)
|
|
2152
2233
|
if pending:
|
|
2153
|
-
parts.append(("slices", "\n".join([SLICES_HEAD] + pending)))
|
|
2234
|
+
parts.append(("slices", "\n".join([render(SLICES_HEAD)] + pending)))
|
|
2154
2235
|
# The router's own context: above the threshold, one line asks it to
|
|
2155
2236
|
# push heavy reading through a slice (orchestrator-flow-audit S2 F1).
|
|
2156
2237
|
heavy = context_nudge(payload, session_id)
|
|
@@ -2260,15 +2341,17 @@ def context_for(event, cwd, payload=None, with_core=True):
|
|
|
2260
2341
|
else steering(root, (payload or {}).get("host")))
|
|
2261
2342
|
if steer:
|
|
2262
2343
|
parts.append(("steer", steer))
|
|
2344
|
+
# The workspace every per-project artifact lands in: created, ignored by the
|
|
2345
|
+
# project and given its private git before anything writes there. A root is
|
|
2346
|
+
# not a project, the helper returns None outside a work tree, and a linked
|
|
2347
|
+
# worktree is handed the main checkout's as a link rather than a second store
|
|
2348
|
+
# (plan 121). The session start is not the only event that gets here - a
|
|
2349
|
+
# compaction and a delegated agent's first call do too, and a worktree made
|
|
2350
|
+
# outside tezgah takes the link from whichever comes first. On a made
|
|
2351
|
+
# workspace a second call costs three stats and one file read.
|
|
2352
|
+
if ws not in roots():
|
|
2353
|
+
ensure_workspace(root)
|
|
2263
2354
|
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
2355
|
# The live turn state, first in this region: on a compacted or resumed
|
|
2273
2356
|
# session it is the one thing the rest of the block cannot re-derive.
|
|
2274
2357
|
resume = resume_state(root, session_of(payload))
|
|
@@ -2408,6 +2491,8 @@ _WRAPPER_ARG = frozenset(("timeout",))
|
|
|
2408
2491
|
_OPTION_ARG = frozenset(("-u", "-g", "-k", "-o", "-C", "-h", "-T", "-r", "-t",
|
|
2409
2492
|
"--user", "--group", "--prompt", "--chdir"))
|
|
2410
2493
|
_ASSIGNMENT = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*=")
|
|
2494
|
+
# the programs that cannot fail, so the `||` arm behind one never runs
|
|
2495
|
+
NO_FAIL = frozenset(("true", ":"))
|
|
2411
2496
|
|
|
2412
2497
|
|
|
2413
2498
|
def _substitutions(text, start, end):
|
|
@@ -2435,7 +2520,10 @@ def shell_programs(command, _depth=0):
|
|
|
2435
2520
|
"""Every word a shell line would run as a program, in order. A closed
|
|
2436
2521
|
heredoc body is data: a quoted tag's whole, an unquoted tag's all but its
|
|
2437
2522
|
`$( )` and backtick substitutions, which bash runs. The deny readers keep an
|
|
2438
|
-
unquoted body visible whole.
|
|
2523
|
+
unquoted body visible whole. A `||` arm behind a pipeline that cannot fail
|
|
2524
|
+
(`true` or `:` in its last stage, `SKIP=1 true` included) never runs, so its
|
|
2525
|
+
words are dropped until the next `;`, newline, `&` or substitution close
|
|
2526
|
+
(plan 129)."""
|
|
2439
2527
|
command = str(command or "")
|
|
2440
2528
|
text = list(command)
|
|
2441
2529
|
for h in _heredocs(command):
|
|
@@ -2448,9 +2536,33 @@ def shell_programs(command, _depth=0):
|
|
|
2448
2536
|
for k in range(h[4], h[5][1]):
|
|
2449
2537
|
if text[k] != "\n" and k not in keep:
|
|
2450
2538
|
text[k] = " "
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2539
|
+
# `ok` is the whole `&&`/`||` list's failability so far, not one stage's:
|
|
2540
|
+
# `a && b || c` runs `c` when `a` fails, so a `||` arm is dead only when
|
|
2541
|
+
# every link before it cannot fail. A builder (`|`, not `||`) hands the
|
|
2542
|
+
# list its last stage's status, as bash's exit is the pipeline's last.
|
|
2543
|
+
out, alive, safe = [], True, True
|
|
2544
|
+
for words, sep in _shell_commands("".join(text)):
|
|
2545
|
+
if alive:
|
|
2546
|
+
progs = _command_words(words, _depth)
|
|
2547
|
+
out += progs
|
|
2548
|
+
# a pipeline stage's own status is overwritten by the stage after it,
|
|
2549
|
+
# so only the stage that ends the pipeline folds into `safe`; a stage
|
|
2550
|
+
# that was skipped leaves the list's own status standing (a skipped
|
|
2551
|
+
# `&&` arm is why `a && b | true || c` still runs `c` when `a` fails)
|
|
2552
|
+
if "|" in sep and "||" not in sep:
|
|
2553
|
+
continue
|
|
2554
|
+
if alive:
|
|
2555
|
+
# `! cmd` inverts the status, so the arm after a `||` still runs:
|
|
2556
|
+
# a negated command is never "safe" (`! true || p1` runs `p1`)
|
|
2557
|
+
negated = bool(words) and words[0] == "!"
|
|
2558
|
+
safe = safe and not negated and bool(progs) and progs[0] in NO_FAIL
|
|
2559
|
+
# the separator decides the NEXT command, so it is read after this one
|
|
2560
|
+
if "||" in sep:
|
|
2561
|
+
alive, safe = not safe, True
|
|
2562
|
+
elif "&&" in sep:
|
|
2563
|
+
alive = True # the list may still succeed, so its next link may run
|
|
2564
|
+
elif ";" in sep or "\n" in sep or sep == "&" or sep == "":
|
|
2565
|
+
alive, safe = True, True
|
|
2454
2566
|
return out
|
|
2455
2567
|
|
|
2456
2568
|
|
|
@@ -2831,7 +2943,7 @@ TOOL_USE_MEASURES = frozenset(("consult", "research", "graph", "orch", "judge"))
|
|
|
2831
2943
|
|
|
2832
2944
|
|
|
2833
2945
|
def health_segments(cwd, session_id=None, used_override=None, idx_override=None,
|
|
2834
|
-
observable=None):
|
|
2946
|
+
observable=None, manifest=None):
|
|
2835
2947
|
"""The armed/used checklist as structured segments, host-neutral.
|
|
2836
2948
|
|
|
2837
2949
|
Each segment is {"key", "state", "glyph", "text", "group"}, the version
|
|
@@ -2861,7 +2973,13 @@ def health_segments(cwd, session_id=None, used_override=None, idx_override=None,
|
|
|
2861
2973
|
|
|
2862
2974
|
idx_override: an idx glyph the host already resolved (one of "✓↻✗?–"), for a
|
|
2863
2975
|
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.
|
|
2976
|
+
turn_end and tool_result. None probes as before; the other marks stay live.
|
|
2977
|
+
|
|
2978
|
+
manifest: an extension manifest named outright (the renderer's
|
|
2979
|
+
`--manifest`), read instead of the one discovered from `cwd`. Either way
|
|
2980
|
+
the built-in marks stay and the extension's chips follow them - a manifest
|
|
2981
|
+
that declares `statusline.override` owns where the line is drawn, never
|
|
2982
|
+
what it carries."""
|
|
2865
2983
|
if session_id:
|
|
2866
2984
|
bind_session(session_id) # the marks show the switches this session honors
|
|
2867
2985
|
base, marks = repo_marks(cwd)
|
|
@@ -2921,6 +3039,27 @@ def health_segments(cwd, session_id=None, used_override=None, idx_override=None,
|
|
|
2921
3039
|
if plan:
|
|
2922
3040
|
segs.append({"key": "plans", "state": "ready" if "blk" in plan else "info",
|
|
2923
3041
|
"glyph": "", "text": plan, "group": 3})
|
|
3042
|
+
# A repository's own statusline extension (tezgah_extension): it produces
|
|
3043
|
+
# structured segments, the line renders them after every built-in mark. Its
|
|
3044
|
+
# own `group` is normalized to one cluster past the built-ins, so the
|
|
3045
|
+
# separator reads the same however the extension numbered it. Imported here,
|
|
3046
|
+
# not at the top: a broken extension module costs its chips, never the line.
|
|
3047
|
+
try:
|
|
3048
|
+
import tezgah_extension
|
|
3049
|
+
ext = tezgah_extension.segments(cwd, session_id=session_id,
|
|
3050
|
+
manifest_file=manifest)
|
|
3051
|
+
except Exception:
|
|
3052
|
+
ext = []
|
|
3053
|
+
if ext:
|
|
3054
|
+
next_group = 1 + max((s.get("group", 0) for s in segs), default=-1)
|
|
3055
|
+
for seg in ext:
|
|
3056
|
+
seg["group"] = next_group
|
|
3057
|
+
# The state carries the mark, exactly as it does for a built-in: an
|
|
3058
|
+
# extension that leaves `glyph` out gets the same ✓/○/✗ the core
|
|
3059
|
+
# draws for its own marks, and only names one when it means another.
|
|
3060
|
+
if not seg.get("glyph"):
|
|
3061
|
+
seg["glyph"] = GLYPHS.get(seg.get("state"), "")
|
|
3062
|
+
segs.extend(ext)
|
|
2924
3063
|
return segs
|
|
2925
3064
|
|
|
2926
3065
|
|