@r1z4x/tezgah 1.0.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 +738 -0
- package/LICENSE +21 -0
- package/MANIFEST +753 -0
- package/README.de.md +169 -0
- package/README.es.md +168 -0
- package/README.fr.md +166 -0
- package/README.md +161 -0
- package/README.tr.md +163 -0
- package/agents/tezgah-reviewer.md +70 -0
- package/bin/codegen +337 -0
- package/bin/consult +797 -0
- package/bin/tezgah-adhd +50 -0
- package/bin/tezgah-agents +45 -0
- package/bin/tezgah-capture +66 -0
- package/bin/tezgah-context +96 -0
- package/bin/tezgah-decisions +213 -0
- package/bin/tezgah-design +953 -0
- package/bin/tezgah-docs +1199 -0
- package/bin/tezgah-doctor +497 -0
- package/bin/tezgah-dsh +37 -0
- package/bin/tezgah-dsh.cmd +70 -0
- package/bin/tezgah-gate +75 -0
- package/bin/tezgah-import-ai-research +439 -0
- package/bin/tezgah-index +32 -0
- package/bin/tezgah-lessons +148 -0
- package/bin/tezgah-mcp +322 -0
- package/bin/tezgah-migrate +324 -0
- package/bin/tezgah-pony +50 -0
- package/bin/tezgah-research +772 -0
- package/bin/tezgah-rollback +93 -0
- package/bin/tezgah-route +124 -0
- package/bin/tezgah-setup +5798 -0
- package/bin/tezgah-status +383 -0
- package/bin/tezgah-task +607 -0
- package/bin/tezgah-taste +423 -0
- package/bin/tezgah-triage +485 -0
- package/bin/tezgah.js +36 -0
- package/commands/adhd.md +21 -0
- package/commands/ponytail.md +21 -0
- package/docs/README.md +112 -0
- package/docs/architecture.md +226 -0
- package/docs/citations-baseline.json +59 -0
- package/docs/clarity-baseline.json +116 -0
- package/docs/contract.md +416 -0
- package/docs/environment.md +141 -0
- package/docs/evidence.md +831 -0
- package/docs/feature-audit.md +139 -0
- package/docs/gate.md +407 -0
- package/docs/glossary.md +201 -0
- package/docs/hosts.md +400 -0
- package/docs/index.json +471 -0
- package/docs/judge.md +193 -0
- package/docs/layers.md +189 -0
- package/docs/models.md +160 -0
- package/docs/operations.md +666 -0
- package/docs/research.md +809 -0
- package/docs/results/paired-outcome-2026-10.jsonl +254 -0
- package/docs/results/paired-outcome-2026-10.md +204 -0
- package/docs/skills.md +236 -0
- package/docs/status-line.md +315 -0
- package/docs/testing.md +287 -0
- package/docs/vision.md +117 -0
- package/hooks/hooks.json +33 -0
- package/hooks/projects-auto-init.py +98 -0
- package/hooks/projects-posttooluse.py +149 -0
- package/hooks/projects-pretooluse.py +40 -0
- package/hooks/projects-stop.py +60 -0
- package/hooks/tezgah_agents.py +817 -0
- package/hooks/tezgah_apps.py +266 -0
- package/hooks/tezgah_attest.py +255 -0
- package/hooks/tezgah_clarity.py +171 -0
- package/hooks/tezgah_components.py +140 -0
- package/hooks/tezgah_context.py +2953 -0
- package/hooks/tezgah_embed.py +765 -0
- package/hooks/tezgah_gate.py +2736 -0
- package/hooks/tezgah_guard.py +177 -0
- package/hooks/tezgah_index.py +124 -0
- package/hooks/tezgah_integrity.py +5141 -0
- package/hooks/tezgah_judge.py +487 -0
- package/hooks/tezgah_lang.py +230 -0
- package/hooks/tezgah_lessons.py +210 -0
- package/hooks/tezgah_models.py +855 -0
- package/hooks/tezgah_paths.py +1132 -0
- package/hooks/tezgah_policy.py +1039 -0
- package/hooks/tezgah_rank.py +77 -0
- package/hooks/tezgah_replay.py +1109 -0
- package/hooks/tezgah_research.py +5176 -0
- package/hooks/tezgah_shapes.py +305 -0
- package/hooks/tezgah_skill_pick.py +227 -0
- package/hooks/tezgah_snapshot.py +490 -0
- package/hooks/tezgah_stopspec.py +320 -0
- package/hooks/tezgah_task.py +458 -0
- package/hooks/tezgah_taste.py +201 -0
- package/hooks/tezgah_untrusted.py +112 -0
- package/hooks/tezgah_update.py +430 -0
- package/hosts/codex/hook.py +268 -0
- package/hosts/codex/hooks.json +26 -0
- package/hosts/cursor/hook.py +461 -0
- package/hosts/cursor/hooks.json +44 -0
- package/hosts/dsh/hooks.json +21 -0
- package/hosts/dsh/statusline/lib/client.js +138 -0
- package/hosts/dsh/statusline/lib/index.js +104 -0
- package/hosts/dsh/statusline/package.json +28 -0
- package/hosts/omp/hook.py +277 -0
- package/hosts/omp/tezgah-hook.ts.in +701 -0
- package/hosts/opencode/plugins/tezgah.js +2742 -0
- package/hosts/opencode/tui/tezgah-tui.tsx +151 -0
- package/output-styles/tezgah.md +142 -0
- package/package.json +32 -0
- package/packaging/build.sh +342 -0
- package/packaging/install.ps1 +166 -0
- package/packaging/install.sh +56 -0
- package/packaging/upgrade.sh +142 -0
- package/skills/ai-research/0-autoresearch-skill/SKILL.md +411 -0
- package/skills/ai-research/0-autoresearch-skill/references/agent-continuity.md +95 -0
- package/skills/ai-research/0-autoresearch-skill/references/progress-reporting.md +166 -0
- package/skills/ai-research/0-autoresearch-skill/references/skill-routing.md +219 -0
- package/skills/ai-research/0-autoresearch-skill/templates/findings.md +44 -0
- package/skills/ai-research/0-autoresearch-skill/templates/research-log.md +41 -0
- package/skills/ai-research/01-model-architecture/litgpt/SKILL.md +469 -0
- package/skills/ai-research/01-model-architecture/litgpt/references/custom-models.md +569 -0
- package/skills/ai-research/01-model-architecture/litgpt/references/distributed-training.md +452 -0
- package/skills/ai-research/01-model-architecture/litgpt/references/supported-models.md +337 -0
- package/skills/ai-research/01-model-architecture/litgpt/references/training-recipes.md +620 -0
- package/skills/ai-research/01-model-architecture/mamba/SKILL.md +260 -0
- package/skills/ai-research/01-model-architecture/mamba/references/architecture-details.md +207 -0
- package/skills/ai-research/01-model-architecture/mamba/references/benchmarks.md +256 -0
- package/skills/ai-research/01-model-architecture/mamba/references/training-guide.md +389 -0
- package/skills/ai-research/01-model-architecture/nanogpt/SKILL.md +290 -0
- package/skills/ai-research/01-model-architecture/nanogpt/references/architecture.md +383 -0
- package/skills/ai-research/01-model-architecture/nanogpt/references/data.md +477 -0
- package/skills/ai-research/01-model-architecture/nanogpt/references/training.md +565 -0
- package/skills/ai-research/01-model-architecture/rwkv/SKILL.md +260 -0
- package/skills/ai-research/01-model-architecture/rwkv/references/architecture-details.md +345 -0
- package/skills/ai-research/01-model-architecture/rwkv/references/rwkv7.md +387 -0
- package/skills/ai-research/01-model-architecture/rwkv/references/state-management.md +370 -0
- package/skills/ai-research/01-model-architecture/torchtitan/SKILL.md +358 -0
- package/skills/ai-research/01-model-architecture/torchtitan/references/checkpoint.md +182 -0
- package/skills/ai-research/01-model-architecture/torchtitan/references/custom-models.md +259 -0
- package/skills/ai-research/01-model-architecture/torchtitan/references/float8.md +134 -0
- package/skills/ai-research/01-model-architecture/torchtitan/references/fsdp.md +127 -0
- package/skills/ai-research/02-tokenization/huggingface-tokenizers/SKILL.md +516 -0
- package/skills/ai-research/02-tokenization/huggingface-tokenizers/references/algorithms.md +654 -0
- package/skills/ai-research/02-tokenization/huggingface-tokenizers/references/integration.md +638 -0
- package/skills/ai-research/02-tokenization/huggingface-tokenizers/references/pipeline.md +724 -0
- package/skills/ai-research/02-tokenization/huggingface-tokenizers/references/training.md +566 -0
- package/skills/ai-research/02-tokenization/sentencepiece/SKILL.md +235 -0
- package/skills/ai-research/02-tokenization/sentencepiece/references/algorithms.md +201 -0
- package/skills/ai-research/02-tokenization/sentencepiece/references/training.md +305 -0
- package/skills/ai-research/03-fine-tuning/axolotl/SKILL.md +158 -0
- package/skills/ai-research/03-fine-tuning/axolotl/references/api.md +5549 -0
- package/skills/ai-research/03-fine-tuning/axolotl/references/dataset-formats.md +1030 -0
- package/skills/ai-research/03-fine-tuning/axolotl/references/index.md +16 -0
- package/skills/ai-research/03-fine-tuning/axolotl/references/other.md +3564 -0
- package/skills/ai-research/03-fine-tuning/llama-factory/SKILL.md +80 -0
- package/skills/ai-research/03-fine-tuning/llama-factory/references/_images.md +24 -0
- package/skills/ai-research/03-fine-tuning/llama-factory/references/advanced.md +1056 -0
- package/skills/ai-research/03-fine-tuning/llama-factory/references/getting_started.md +350 -0
- package/skills/ai-research/03-fine-tuning/llama-factory/references/index.md +20 -0
- package/skills/ai-research/03-fine-tuning/llama-factory/references/other.md +32 -0
- package/skills/ai-research/03-fine-tuning/peft/SKILL.md +431 -0
- package/skills/ai-research/03-fine-tuning/peft/references/advanced-usage.md +515 -0
- package/skills/ai-research/03-fine-tuning/peft/references/troubleshooting.md +481 -0
- package/skills/ai-research/03-fine-tuning/unsloth/SKILL.md +80 -0
- package/skills/ai-research/03-fine-tuning/unsloth/references/index.md +8 -0
- package/skills/ai-research/03-fine-tuning/unsloth/references/llms.md +83 -0
- package/skills/ai-research/04-mechanistic-interpretability/nnsight/SKILL.md +436 -0
- package/skills/ai-research/04-mechanistic-interpretability/nnsight/references/README.md +79 -0
- package/skills/ai-research/04-mechanistic-interpretability/nnsight/references/api.md +345 -0
- package/skills/ai-research/04-mechanistic-interpretability/nnsight/references/tutorials.md +301 -0
- package/skills/ai-research/04-mechanistic-interpretability/pyvene/SKILL.md +473 -0
- package/skills/ai-research/04-mechanistic-interpretability/pyvene/references/README.md +74 -0
- package/skills/ai-research/04-mechanistic-interpretability/pyvene/references/api.md +384 -0
- package/skills/ai-research/04-mechanistic-interpretability/pyvene/references/tutorials.md +377 -0
- package/skills/ai-research/04-mechanistic-interpretability/saelens/SKILL.md +386 -0
- package/skills/ai-research/04-mechanistic-interpretability/saelens/references/README.md +71 -0
- package/skills/ai-research/04-mechanistic-interpretability/saelens/references/api.md +334 -0
- package/skills/ai-research/04-mechanistic-interpretability/saelens/references/tutorials.md +319 -0
- package/skills/ai-research/04-mechanistic-interpretability/transformer-lens/SKILL.md +346 -0
- package/skills/ai-research/04-mechanistic-interpretability/transformer-lens/references/README.md +55 -0
- package/skills/ai-research/04-mechanistic-interpretability/transformer-lens/references/api.md +363 -0
- package/skills/ai-research/04-mechanistic-interpretability/transformer-lens/references/tutorials.md +340 -0
- package/skills/ai-research/05-data-processing/nemo-curator/SKILL.md +383 -0
- package/skills/ai-research/05-data-processing/nemo-curator/references/deduplication.md +88 -0
- package/skills/ai-research/05-data-processing/nemo-curator/references/filtering.md +103 -0
- package/skills/ai-research/05-data-processing/ray-data/SKILL.md +326 -0
- package/skills/ai-research/05-data-processing/ray-data/references/integration.md +83 -0
- package/skills/ai-research/05-data-processing/ray-data/references/transformations.md +84 -0
- package/skills/ai-research/06-post-training/grpo-rl-training/README.md +98 -0
- package/skills/ai-research/06-post-training/grpo-rl-training/SKILL.md +572 -0
- package/skills/ai-research/06-post-training/miles/SKILL.md +315 -0
- package/skills/ai-research/06-post-training/miles/references/api-reference.md +142 -0
- package/skills/ai-research/06-post-training/miles/references/troubleshooting.md +353 -0
- package/skills/ai-research/06-post-training/openrlhf/SKILL.md +249 -0
- package/skills/ai-research/06-post-training/openrlhf/references/algorithm-comparison.md +405 -0
- package/skills/ai-research/06-post-training/openrlhf/references/custom-rewards.md +531 -0
- package/skills/ai-research/06-post-training/openrlhf/references/hybrid-engine.md +288 -0
- package/skills/ai-research/06-post-training/openrlhf/references/multi-node-training.md +455 -0
- package/skills/ai-research/06-post-training/simpo/SKILL.md +219 -0
- package/skills/ai-research/06-post-training/simpo/references/datasets.md +479 -0
- package/skills/ai-research/06-post-training/simpo/references/hyperparameters.md +453 -0
- package/skills/ai-research/06-post-training/simpo/references/loss-functions.md +351 -0
- package/skills/ai-research/06-post-training/slime/SKILL.md +464 -0
- package/skills/ai-research/06-post-training/slime/references/api-reference.md +393 -0
- package/skills/ai-research/06-post-training/slime/references/troubleshooting.md +387 -0
- package/skills/ai-research/06-post-training/torchforge/SKILL.md +433 -0
- package/skills/ai-research/06-post-training/torchforge/references/api-reference.md +328 -0
- package/skills/ai-research/06-post-training/torchforge/references/troubleshooting.md +410 -0
- package/skills/ai-research/06-post-training/trl-fine-tuning/SKILL.md +455 -0
- package/skills/ai-research/06-post-training/trl-fine-tuning/references/dpo-variants.md +228 -0
- package/skills/ai-research/06-post-training/trl-fine-tuning/references/online-rl.md +83 -0
- package/skills/ai-research/06-post-training/trl-fine-tuning/references/reward-modeling.md +123 -0
- package/skills/ai-research/06-post-training/trl-fine-tuning/references/sft-training.md +169 -0
- package/skills/ai-research/06-post-training/verl/SKILL.md +391 -0
- package/skills/ai-research/06-post-training/verl/references/api-reference.md +302 -0
- package/skills/ai-research/06-post-training/verl/references/troubleshooting.md +392 -0
- package/skills/ai-research/07-safety-alignment/constitutional-ai/SKILL.md +290 -0
- package/skills/ai-research/07-safety-alignment/llamaguard/SKILL.md +337 -0
- package/skills/ai-research/07-safety-alignment/nemo-guardrails/SKILL.md +297 -0
- package/skills/ai-research/07-safety-alignment/prompt-guard/SKILL.md +312 -0
- package/skills/ai-research/08-distributed-training/accelerate/SKILL.md +332 -0
- package/skills/ai-research/08-distributed-training/accelerate/references/custom-plugins.md +454 -0
- package/skills/ai-research/08-distributed-training/accelerate/references/megatron-integration.md +490 -0
- package/skills/ai-research/08-distributed-training/accelerate/references/performance.md +526 -0
- package/skills/ai-research/08-distributed-training/deepspeed/SKILL.md +141 -0
- package/skills/ai-research/08-distributed-training/deepspeed/references/08.md +18 -0
- package/skills/ai-research/08-distributed-training/deepspeed/references/09.md +174 -0
- package/skills/ai-research/08-distributed-training/deepspeed/references/2020.md +379 -0
- package/skills/ai-research/08-distributed-training/deepspeed/references/2023.md +280 -0
- package/skills/ai-research/08-distributed-training/deepspeed/references/assets.md +180 -0
- package/skills/ai-research/08-distributed-training/deepspeed/references/index.md +36 -0
- package/skills/ai-research/08-distributed-training/deepspeed/references/mii.md +119 -0
- package/skills/ai-research/08-distributed-training/deepspeed/references/other.md +1192 -0
- package/skills/ai-research/08-distributed-training/megatron-core/SKILL.md +366 -0
- package/skills/ai-research/08-distributed-training/megatron-core/references/benchmarks.md +250 -0
- package/skills/ai-research/08-distributed-training/megatron-core/references/parallelism-guide.md +405 -0
- package/skills/ai-research/08-distributed-training/megatron-core/references/production-examples.md +474 -0
- package/skills/ai-research/08-distributed-training/megatron-core/references/training-recipes.md +548 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/SKILL.md +231 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_dcp_async_recipe.md +14 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_dcp_overview.md +19 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_dcp_recipe.md +18 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_ddp_notes.md +10 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_device_mesh_tutorial.md +22 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_examples_fsdp2.md +15 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_fsdp1_api.md +9 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_fsdp2_tutorial.md +45 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_fully_shard_api.md +49 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/pytorch_tp_tutorial.md +22 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/ray_train_fsdp2_example.md +13 -0
- package/skills/ai-research/08-distributed-training/pytorch-fsdp2/references/torchtitan_fsdp_notes.md +14 -0
- package/skills/ai-research/08-distributed-training/pytorch-lightning/SKILL.md +346 -0
- package/skills/ai-research/08-distributed-training/pytorch-lightning/references/callbacks.md +437 -0
- package/skills/ai-research/08-distributed-training/pytorch-lightning/references/distributed.md +491 -0
- package/skills/ai-research/08-distributed-training/pytorch-lightning/references/hyperparameter-tuning.md +557 -0
- package/skills/ai-research/08-distributed-training/ray-train/SKILL.md +406 -0
- package/skills/ai-research/08-distributed-training/ray-train/references/multi-node.md +629 -0
- package/skills/ai-research/09-infrastructure/lambda-labs/SKILL.md +545 -0
- package/skills/ai-research/09-infrastructure/lambda-labs/references/advanced-usage.md +612 -0
- package/skills/ai-research/09-infrastructure/lambda-labs/references/troubleshooting.md +531 -0
- package/skills/ai-research/09-infrastructure/modal/SKILL.md +341 -0
- package/skills/ai-research/09-infrastructure/modal/references/advanced-usage.md +504 -0
- package/skills/ai-research/09-infrastructure/modal/references/troubleshooting.md +495 -0
- package/skills/ai-research/09-infrastructure/skypilot/SKILL.md +509 -0
- package/skills/ai-research/09-infrastructure/skypilot/references/advanced-usage.md +492 -0
- package/skills/ai-research/09-infrastructure/skypilot/references/troubleshooting.md +571 -0
- package/skills/ai-research/10-optimization/awq/SKILL.md +310 -0
- package/skills/ai-research/10-optimization/awq/references/advanced-usage.md +325 -0
- package/skills/ai-research/10-optimization/awq/references/troubleshooting.md +345 -0
- package/skills/ai-research/10-optimization/bitsandbytes/SKILL.md +411 -0
- package/skills/ai-research/10-optimization/bitsandbytes/references/memory-optimization.md +522 -0
- package/skills/ai-research/10-optimization/bitsandbytes/references/qlora-training.md +522 -0
- package/skills/ai-research/10-optimization/bitsandbytes/references/quantization-formats.md +448 -0
- package/skills/ai-research/10-optimization/flash-attention/SKILL.md +367 -0
- package/skills/ai-research/10-optimization/flash-attention/references/benchmarks.md +216 -0
- package/skills/ai-research/10-optimization/flash-attention/references/transformers-integration.md +294 -0
- package/skills/ai-research/10-optimization/gguf/SKILL.md +427 -0
- package/skills/ai-research/10-optimization/gguf/references/advanced-usage.md +505 -0
- package/skills/ai-research/10-optimization/gguf/references/troubleshooting.md +443 -0
- package/skills/ai-research/10-optimization/gptq/SKILL.md +450 -0
- package/skills/ai-research/10-optimization/gptq/references/calibration.md +338 -0
- package/skills/ai-research/10-optimization/gptq/references/integration.md +130 -0
- package/skills/ai-research/10-optimization/gptq/references/troubleshooting.md +96 -0
- package/skills/ai-research/10-optimization/hqq/SKILL.md +445 -0
- package/skills/ai-research/10-optimization/hqq/references/advanced-usage.md +529 -0
- package/skills/ai-research/10-optimization/hqq/references/troubleshooting.md +504 -0
- package/skills/ai-research/10-optimization/ml-training-recipes/SKILL.md +319 -0
- package/skills/ai-research/10-optimization/ml-training-recipes/references/architecture.md +320 -0
- package/skills/ai-research/10-optimization/ml-training-recipes/references/biomedical.md +498 -0
- package/skills/ai-research/10-optimization/ml-training-recipes/references/domain-specific.md +626 -0
- package/skills/ai-research/10-optimization/ml-training-recipes/references/experiment-loop.md +129 -0
- package/skills/ai-research/10-optimization/ml-training-recipes/references/optimizers.md +330 -0
- package/skills/ai-research/10-optimization/ml-training-recipes/references/scaling-and-selection.md +428 -0
- package/skills/ai-research/11-evaluation/bigcode-evaluation-harness/SKILL.md +405 -0
- package/skills/ai-research/11-evaluation/bigcode-evaluation-harness/references/benchmarks.md +394 -0
- package/skills/ai-research/11-evaluation/bigcode-evaluation-harness/references/custom-tasks.md +425 -0
- package/skills/ai-research/11-evaluation/bigcode-evaluation-harness/references/issues.md +395 -0
- package/skills/ai-research/11-evaluation/lm-evaluation-harness/SKILL.md +490 -0
- package/skills/ai-research/11-evaluation/lm-evaluation-harness/references/api-evaluation.md +491 -0
- package/skills/ai-research/11-evaluation/lm-evaluation-harness/references/benchmark-guide.md +489 -0
- package/skills/ai-research/11-evaluation/lm-evaluation-harness/references/custom-tasks.md +603 -0
- package/skills/ai-research/11-evaluation/lm-evaluation-harness/references/distributed-eval.md +520 -0
- package/skills/ai-research/11-evaluation/nemo-evaluator/SKILL.md +494 -0
- package/skills/ai-research/11-evaluation/nemo-evaluator/references/adapter-system.md +341 -0
- package/skills/ai-research/11-evaluation/nemo-evaluator/references/configuration.md +448 -0
- package/skills/ai-research/11-evaluation/nemo-evaluator/references/custom-benchmarks.md +316 -0
- package/skills/ai-research/11-evaluation/nemo-evaluator/references/execution-backends.md +362 -0
- package/skills/ai-research/12-inference-serving/llama-cpp/SKILL.md +258 -0
- package/skills/ai-research/12-inference-serving/llama-cpp/references/optimization.md +90 -0
- package/skills/ai-research/12-inference-serving/llama-cpp/references/quantization.md +214 -0
- package/skills/ai-research/12-inference-serving/llama-cpp/references/server.md +126 -0
- package/skills/ai-research/12-inference-serving/sglang/SKILL.md +442 -0
- package/skills/ai-research/12-inference-serving/sglang/references/deployment.md +491 -0
- package/skills/ai-research/12-inference-serving/sglang/references/radix-attention.md +414 -0
- package/skills/ai-research/12-inference-serving/sglang/references/structured-generation.md +542 -0
- package/skills/ai-research/12-inference-serving/tensorrt-llm/SKILL.md +187 -0
- package/skills/ai-research/12-inference-serving/tensorrt-llm/references/multi-gpu.md +299 -0
- package/skills/ai-research/12-inference-serving/tensorrt-llm/references/optimization.md +243 -0
- package/skills/ai-research/12-inference-serving/tensorrt-llm/references/serving.md +471 -0
- package/skills/ai-research/12-inference-serving/vllm/SKILL.md +364 -0
- package/skills/ai-research/12-inference-serving/vllm/references/optimization.md +227 -0
- package/skills/ai-research/12-inference-serving/vllm/references/quantization.md +285 -0
- package/skills/ai-research/12-inference-serving/vllm/references/server-deployment.md +256 -0
- package/skills/ai-research/12-inference-serving/vllm/references/troubleshooting.md +448 -0
- package/skills/ai-research/13-mlops/mlflow/SKILL.md +704 -0
- package/skills/ai-research/13-mlops/mlflow/references/deployment.md +745 -0
- package/skills/ai-research/13-mlops/mlflow/references/model-registry.md +771 -0
- package/skills/ai-research/13-mlops/mlflow/references/tracking.md +681 -0
- package/skills/ai-research/13-mlops/swanlab/SKILL.md +406 -0
- package/skills/ai-research/13-mlops/swanlab/references/integrations.md +305 -0
- package/skills/ai-research/13-mlops/swanlab/references/visualization.md +234 -0
- package/skills/ai-research/13-mlops/tensorboard/SKILL.md +629 -0
- package/skills/ai-research/13-mlops/tensorboard/references/integrations.md +639 -0
- package/skills/ai-research/13-mlops/tensorboard/references/profiling.md +546 -0
- package/skills/ai-research/13-mlops/tensorboard/references/visualization.md +621 -0
- package/skills/ai-research/13-mlops/weights-and-biases/SKILL.md +590 -0
- package/skills/ai-research/13-mlops/weights-and-biases/references/artifacts.md +585 -0
- package/skills/ai-research/13-mlops/weights-and-biases/references/integrations.md +701 -0
- package/skills/ai-research/13-mlops/weights-and-biases/references/sweeps.md +848 -0
- package/skills/ai-research/14-agents/a-evolve/SKILL.md +383 -0
- package/skills/ai-research/14-agents/a-evolve/references/README.md +831 -0
- package/skills/ai-research/14-agents/a-evolve/references/api.md +594 -0
- package/skills/ai-research/14-agents/a-evolve/references/architecture.md +417 -0
- package/skills/ai-research/14-agents/a-evolve/references/design-patterns.md +462 -0
- package/skills/ai-research/14-agents/a-evolve/references/examples.md +352 -0
- package/skills/ai-research/14-agents/a-evolve/references/issues.md +591 -0
- package/skills/ai-research/14-agents/a-evolve/references/releases.md +112 -0
- package/skills/ai-research/14-agents/a-evolve/references/tutorials.md +819 -0
- package/skills/ai-research/14-agents/autogpt/SKILL.md +403 -0
- package/skills/ai-research/14-agents/autogpt/references/advanced-usage.md +536 -0
- package/skills/ai-research/14-agents/autogpt/references/troubleshooting.md +421 -0
- package/skills/ai-research/14-agents/crewai/SKILL.md +498 -0
- package/skills/ai-research/14-agents/crewai/references/flows.md +439 -0
- package/skills/ai-research/14-agents/crewai/references/tools.md +430 -0
- package/skills/ai-research/14-agents/crewai/references/troubleshooting.md +481 -0
- package/skills/ai-research/14-agents/langchain/SKILL.md +480 -0
- package/skills/ai-research/14-agents/langchain/references/agents.md +500 -0
- package/skills/ai-research/14-agents/langchain/references/integration.md +563 -0
- package/skills/ai-research/14-agents/langchain/references/rag.md +601 -0
- package/skills/ai-research/14-agents/llamaindex/SKILL.md +569 -0
- package/skills/ai-research/14-agents/llamaindex/references/agents.md +84 -0
- package/skills/ai-research/14-agents/llamaindex/references/data_connectors.md +109 -0
- package/skills/ai-research/14-agents/llamaindex/references/query_engines.md +407 -0
- package/skills/ai-research/15-rag/chroma/SKILL.md +406 -0
- package/skills/ai-research/15-rag/chroma/references/integration.md +39 -0
- package/skills/ai-research/15-rag/faiss/SKILL.md +221 -0
- package/skills/ai-research/15-rag/faiss/references/index_types.md +281 -0
- package/skills/ai-research/15-rag/pinecone/SKILL.md +358 -0
- package/skills/ai-research/15-rag/pinecone/references/deployment.md +182 -0
- package/skills/ai-research/15-rag/qdrant/SKILL.md +493 -0
- package/skills/ai-research/15-rag/qdrant/references/advanced-usage.md +649 -0
- package/skills/ai-research/15-rag/qdrant/references/troubleshooting.md +632 -0
- package/skills/ai-research/15-rag/sentence-transformers/SKILL.md +255 -0
- package/skills/ai-research/15-rag/sentence-transformers/references/models.md +124 -0
- package/skills/ai-research/16-prompt-engineering/dspy/SKILL.md +590 -0
- package/skills/ai-research/16-prompt-engineering/dspy/references/examples.md +664 -0
- package/skills/ai-research/16-prompt-engineering/dspy/references/modules.md +476 -0
- package/skills/ai-research/16-prompt-engineering/dspy/references/optimizers.md +567 -0
- package/skills/ai-research/16-prompt-engineering/guidance/SKILL.md +572 -0
- package/skills/ai-research/16-prompt-engineering/guidance/references/backends.md +555 -0
- package/skills/ai-research/16-prompt-engineering/guidance/references/constraints.md +675 -0
- package/skills/ai-research/16-prompt-engineering/guidance/references/examples.md +768 -0
- package/skills/ai-research/16-prompt-engineering/instructor/SKILL.md +740 -0
- package/skills/ai-research/16-prompt-engineering/instructor/references/examples.md +108 -0
- package/skills/ai-research/16-prompt-engineering/instructor/references/providers.md +71 -0
- package/skills/ai-research/16-prompt-engineering/instructor/references/validation.md +607 -0
- package/skills/ai-research/16-prompt-engineering/outlines/SKILL.md +652 -0
- package/skills/ai-research/16-prompt-engineering/outlines/references/backends.md +616 -0
- package/skills/ai-research/16-prompt-engineering/outlines/references/examples.md +774 -0
- package/skills/ai-research/16-prompt-engineering/outlines/references/json_generation.md +653 -0
- package/skills/ai-research/17-observability/langsmith/SKILL.md +422 -0
- package/skills/ai-research/17-observability/langsmith/references/advanced-usage.md +549 -0
- package/skills/ai-research/17-observability/langsmith/references/troubleshooting.md +538 -0
- package/skills/ai-research/17-observability/phoenix/SKILL.md +475 -0
- package/skills/ai-research/17-observability/phoenix/references/advanced-usage.md +620 -0
- package/skills/ai-research/17-observability/phoenix/references/troubleshooting.md +539 -0
- package/skills/ai-research/18-multimodal/audiocraft/SKILL.md +564 -0
- package/skills/ai-research/18-multimodal/audiocraft/references/advanced-usage.md +667 -0
- package/skills/ai-research/18-multimodal/audiocraft/references/troubleshooting.md +505 -0
- package/skills/ai-research/18-multimodal/blip-2/SKILL.md +564 -0
- package/skills/ai-research/18-multimodal/blip-2/references/advanced-usage.md +681 -0
- package/skills/ai-research/18-multimodal/blip-2/references/troubleshooting.md +527 -0
- package/skills/ai-research/18-multimodal/clip/SKILL.md +253 -0
- package/skills/ai-research/18-multimodal/clip/references/applications.md +208 -0
- package/skills/ai-research/18-multimodal/cosmos-policy/SKILL.md +402 -0
- package/skills/ai-research/18-multimodal/cosmos-policy/references/libero-commands.md +175 -0
- package/skills/ai-research/18-multimodal/cosmos-policy/references/robocasa-commands.md +147 -0
- package/skills/ai-research/18-multimodal/llava/SKILL.md +304 -0
- package/skills/ai-research/18-multimodal/llava/references/training.md +198 -0
- package/skills/ai-research/18-multimodal/openpi/SKILL.md +480 -0
- package/skills/ai-research/18-multimodal/openpi/references/checkpoints-and-env-map.md +86 -0
- package/skills/ai-research/18-multimodal/openpi/references/config-recipes.md +50 -0
- package/skills/ai-research/18-multimodal/openpi/references/pytorch-gotchas.md +49 -0
- package/skills/ai-research/18-multimodal/openpi/references/remote-client-pattern.md +48 -0
- package/skills/ai-research/18-multimodal/openpi/references/training-debugging.md +46 -0
- package/skills/ai-research/18-multimodal/openvla-oft/SKILL.md +441 -0
- package/skills/ai-research/18-multimodal/openvla-oft/references/aloha-workflow.md +141 -0
- package/skills/ai-research/18-multimodal/openvla-oft/references/config-troubleshooting.md +97 -0
- package/skills/ai-research/18-multimodal/openvla-oft/references/libero-workflow.md +115 -0
- package/skills/ai-research/18-multimodal/openvla-oft/references/paper-and-checkpoints.md +84 -0
- package/skills/ai-research/18-multimodal/segment-anything/SKILL.md +500 -0
- package/skills/ai-research/18-multimodal/segment-anything/references/advanced-usage.md +590 -0
- package/skills/ai-research/18-multimodal/segment-anything/references/troubleshooting.md +485 -0
- package/skills/ai-research/18-multimodal/stable-diffusion/SKILL.md +519 -0
- package/skills/ai-research/18-multimodal/stable-diffusion/references/advanced-usage.md +717 -0
- package/skills/ai-research/18-multimodal/stable-diffusion/references/troubleshooting.md +556 -0
- package/skills/ai-research/18-multimodal/whisper/SKILL.md +317 -0
- package/skills/ai-research/18-multimodal/whisper/references/languages.md +190 -0
- package/skills/ai-research/19-emerging-techniques/knowledge-distillation/SKILL.md +458 -0
- package/skills/ai-research/19-emerging-techniques/knowledge-distillation/references/minillm.md +335 -0
- package/skills/ai-research/19-emerging-techniques/long-context/SKILL.md +536 -0
- package/skills/ai-research/19-emerging-techniques/long-context/references/extension_methods.md +469 -0
- package/skills/ai-research/19-emerging-techniques/long-context/references/fine_tuning.md +612 -0
- package/skills/ai-research/19-emerging-techniques/long-context/references/rope.md +403 -0
- package/skills/ai-research/19-emerging-techniques/model-merging/SKILL.md +497 -0
- package/skills/ai-research/19-emerging-techniques/model-merging/references/coefficient-tuning.md +415 -0
- package/skills/ai-research/19-emerging-techniques/model-merging/references/evaluation.md +463 -0
- package/skills/ai-research/19-emerging-techniques/model-merging/references/examples.md +429 -0
- package/skills/ai-research/19-emerging-techniques/model-merging/references/methods.md +353 -0
- package/skills/ai-research/19-emerging-techniques/model-pruning/SKILL.md +495 -0
- package/skills/ai-research/19-emerging-techniques/model-pruning/references/wanda.md +348 -0
- package/skills/ai-research/19-emerging-techniques/moe-training/SKILL.md +526 -0
- package/skills/ai-research/19-emerging-techniques/moe-training/references/architectures.md +433 -0
- package/skills/ai-research/19-emerging-techniques/moe-training/references/inference.md +349 -0
- package/skills/ai-research/19-emerging-techniques/moe-training/references/training.md +426 -0
- package/skills/ai-research/19-emerging-techniques/speculative-decoding/SKILL.md +467 -0
- package/skills/ai-research/19-emerging-techniques/speculative-decoding/references/lookahead.md +310 -0
- package/skills/ai-research/19-emerging-techniques/speculative-decoding/references/medusa.md +351 -0
- package/skills/ai-research/20-ml-paper-writing/academic-plotting/SKILL.md +479 -0
- package/skills/ai-research/20-ml-paper-writing/academic-plotting/references/data-visualization.md +509 -0
- package/skills/ai-research/20-ml-paper-writing/academic-plotting/references/diagram-generation.md +395 -0
- package/skills/ai-research/20-ml-paper-writing/academic-plotting/references/style-guide.md +305 -0
- package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/SKILL.md +982 -0
- package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/references/checklists.md +348 -0
- package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/references/citation-workflow.md +563 -0
- package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/references/reviewer-guidelines.md +349 -0
- package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/references/sources.md +165 -0
- package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/references/writing-guide.md +477 -0
- package/skills/ai-research/20-ml-paper-writing/presenting-conference-talks/SKILL.md +298 -0
- package/skills/ai-research/20-ml-paper-writing/presenting-conference-talks/references/slide-templates.md +505 -0
- package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/SKILL.md +270 -0
- package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/references/checklist.md +279 -0
- package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/references/reviewer-guidelines.md +116 -0
- package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/references/section-blueprints.md +400 -0
- package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/references/systems-conferences.md +261 -0
- package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/references/writing-patterns.md +231 -0
- package/skills/ai-research/21-research-ideation/brainstorming-research-ideas/SKILL.md +384 -0
- package/skills/ai-research/21-research-ideation/creative-thinking-for-research/SKILL.md +366 -0
- package/skills/ai-research/22-agent-native-research-artifact/compiler/SKILL.md +245 -0
- package/skills/ai-research/22-agent-native-research-artifact/compiler/references/ara-schema.md +439 -0
- package/skills/ai-research/22-agent-native-research-artifact/compiler/references/exploration-tree-spec.md +125 -0
- package/skills/ai-research/22-agent-native-research-artifact/compiler/references/validation-checklist.md +149 -0
- package/skills/ai-research/22-agent-native-research-artifact/research-manager/SKILL.md +324 -0
- package/skills/ai-research/22-agent-native-research-artifact/research-manager/references/event-taxonomy.md +124 -0
- package/skills/ai-research/22-agent-native-research-artifact/research-manager/references/provenance-tags.md +190 -0
- package/skills/ai-research/22-agent-native-research-artifact/research-manager/references/session-protocol.md +162 -0
- package/skills/ai-research/22-agent-native-research-artifact/rigor-reviewer/SKILL.md +322 -0
- package/skills/ai-research/22-agent-native-research-artifact/rigor-reviewer/references/review-dimensions.md +182 -0
- package/skills/ai-research/SKILL.md +101 -0
- package/skills/ai-research/SOURCE +38 -0
- package/skills/ai-research/index/1-frame.md +18 -0
- package/skills/ai-research/index/2-data.md +21 -0
- package/skills/ai-research/index/3-train.md +48 -0
- package/skills/ai-research/index/4-measure.md +25 -0
- package/skills/ai-research/index/5-run.md +23 -0
- package/skills/ai-research/index/6-write.md +35 -0
- package/skills/ai-research/library.json +3456 -0
- package/skills/analyze-app/EVALS.md +82 -0
- package/skills/analyze-app/SKILL.md +188 -0
- package/skills/design-contract/EVALS.md +80 -0
- package/skills/design-contract/SKILL.md +171 -0
- package/skills/design-library/EVALS.md +85 -0
- package/skills/design-library/INDEX.md +59 -0
- package/skills/design-library/SKILL.md +58 -0
- package/skills/design-library/SOURCE +131 -0
- package/skills/design-library/adaptive-interfaces/skills/colour-independence/SKILL.md +90 -0
- package/skills/design-library/adaptive-interfaces/skills/flexible-typography/SKILL.md +83 -0
- package/skills/design-library/adaptive-interfaces/skills/information-density/SKILL.md +87 -0
- package/skills/design-library/adaptive-interfaces/skills/preference-audit/SKILL.md +70 -0
- package/skills/design-library/adaptive-interfaces/skills/responsive-accessibility/SKILL.md +86 -0
- package/skills/design-library/adaptive-interfaces/skills/responsive-review/SKILL.md +76 -0
- package/skills/design-library/adaptive-interfaces/skills/simplified-views/SKILL.md +97 -0
- package/skills/design-library/adaptive-interfaces/skills/specify/SKILL.md +63 -0
- package/skills/design-library/adaptive-interfaces/skills/user-preference-respect/SKILL.md +100 -0
- package/skills/design-library/cognitive-accessibility/skills/adaptive-personalisation/SKILL.md +61 -0
- package/skills/design-library/cognitive-accessibility/skills/assess-load/SKILL.md +48 -0
- package/skills/design-library/cognitive-accessibility/skills/cognitive-load-assessment/SKILL.md +60 -0
- package/skills/design-library/cognitive-accessibility/skills/contextual-help-design/SKILL.md +61 -0
- package/skills/design-library/cognitive-accessibility/skills/error-prevention-recovery/SKILL.md +71 -0
- package/skills/design-library/cognitive-accessibility/skills/focus-attention-design/SKILL.md +67 -0
- package/skills/design-library/cognitive-accessibility/skills/memory-load-reduction/SKILL.md +60 -0
- package/skills/design-library/cognitive-accessibility/skills/plain-language-design/SKILL.md +78 -0
- package/skills/design-library/cognitive-accessibility/skills/review/SKILL.md +56 -0
- package/skills/design-library/cognitive-accessibility/skills/simplify/SKILL.md +39 -0
- package/skills/design-library/cognitive-accessibility/skills/wayfinding-navigation/SKILL.md +64 -0
- package/skills/design-library/design-research/skills/behavioural-analytics/SKILL.md +33 -0
- package/skills/design-library/design-research/skills/qual-quant-triangulation/SKILL.md +33 -0
- package/skills/design-library/inclusive-interaction/skills/audit/SKILL.md +50 -0
- package/skills/design-library/inclusive-interaction/skills/design-flow/SKILL.md +58 -0
- package/skills/design-library/inclusive-interaction/skills/feedback-and-status/SKILL.md +76 -0
- package/skills/design-library/inclusive-interaction/skills/gesture-alternatives/SKILL.md +70 -0
- package/skills/design-library/inclusive-interaction/skills/keyboard-navigation/SKILL.md +99 -0
- package/skills/design-library/inclusive-interaction/skills/keyboard-review/SKILL.md +54 -0
- package/skills/design-library/inclusive-interaction/skills/motion-sensitivity/SKILL.md +79 -0
- package/skills/design-library/inclusive-interaction/skills/multi-modal-input/SKILL.md +70 -0
- package/skills/design-library/inclusive-interaction/skills/touch-target-design/SKILL.md +71 -0
- package/skills/design-library/inclusive-interaction/skills/voice-interaction/SKILL.md +68 -0
- package/skills/design-library/visual-critique/skills/critique-affordance/SKILL.md +45 -0
- package/skills/design-library/visual-critique/skills/critique-brand-consistency/SKILL.md +42 -0
- package/skills/design-library/visual-critique/skills/critique-color/SKILL.md +44 -0
- package/skills/design-library/visual-critique/skills/critique-composition/SKILL.md +46 -0
- package/skills/design-library/visual-critique/skills/critique-information-density/SKILL.md +45 -0
- package/skills/design-library/visual-critique/skills/critique-typography/SKILL.md +45 -0
- package/skills/design-library/visual-critique/skills/critique-visual-hierarchy/SKILL.md +40 -0
- package/skills/feature-audit/EVALS.md +83 -0
- package/skills/feature-audit/SKILL.md +326 -0
- package/skills/harness/EVALS.md +81 -0
- package/skills/harness/SKILL.md +88 -0
- package/skills/i-have-adhd/EVALS.md +80 -0
- package/skills/i-have-adhd/SKILL.md +183 -0
- package/skills/no-ai-slop/EVALS.md +89 -0
- package/skills/no-ai-slop/SKILL.md +209 -0
- package/skills/no-ai-slop/eval.md +52 -0
- package/skills/plan-add/EVALS.md +79 -0
- package/skills/plan-add/SKILL.md +179 -0
- package/skills/plan-add/render_table.py +72 -0
- package/skills/plan-status/EVALS.md +78 -0
- package/skills/plan-status/SKILL.md +52 -0
- package/skills/plan-sync/EVALS.md +80 -0
- package/skills/plan-sync/SKILL.md +69 -0
- package/skills/pm-frameworks/SKILL.md +33 -0
- package/skills/pm-frameworks/SOURCE +39 -0
- package/skills/pm-frameworks/intended-vs-implemented/SKILL.md +42 -0
- package/skills/pm-frameworks/opportunity-solution-tree/SKILL.md +64 -0
- package/skills/ponytail/EVALS.md +80 -0
- package/skills/ponytail/SKILL.md +124 -0
- package/skills/product-analysis/EVALS.md +103 -0
- package/skills/product-analysis/SKILL.md +361 -0
- package/skills/research/EVALS.md +104 -0
- package/skills/research/SKILL.md +570 -0
- package/skills/rl-env/SKILL.md +53 -0
- package/skills/rl-env/SOURCE +41 -0
- package/skills/rl-env/generate-nemo-gym-env/SKILL.md +169 -0
- package/skills/rl-env/generate-nemo-gym-env/references/architecture.md +114 -0
- package/skills/rl-env/generate-openenv-env/SKILL.md +183 -0
- package/skills/rl-env/generate-openenv-env/references/architecture.md +82 -0
- package/skills/rl-env/generate-ors-env/SKILL.md +209 -0
- package/skills/rl-env/generate-ors-env/references/architecture.md +113 -0
- package/skills/rl-env/generate-verifiers-env/SKILL.md +188 -0
- package/skills/rl-env/generate-verifiers-env/references/architecture.md +119 -0
- package/skills/rl-env/rl-env-from-description/SKILL.md +124 -0
- package/skills/rl-env/rl-env-from-description/references/interview.md +75 -0
- package/skills/rl-env/rl-env-from-description/references/nemo_gym.md +41 -0
- package/skills/rl-env/rl-env-from-description/references/openenv.md +35 -0
- package/skills/rl-env/rl-env-from-description/references/ors.md +50 -0
- package/skills/rl-env/rl-env-from-description/references/verifiers.md +39 -0
- package/skills/tezgah-contract/EVALS.md +78 -0
- package/skills/tezgah-contract/SKILL.md +792 -0
- package/statusline.py +129 -0
- package/workflows/graph-impact.js +153 -0
- package/workflows/graph-map.js +158 -0
- package/workflows/graph-review.js +170 -0
package/docs/contract.md
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
# Contract: what a session is told, and how a rule is disarmed
|
|
2
|
+
|
|
3
|
+
The rule layer of tezgah: the text a session receives, the order it arrives in,
|
|
4
|
+
the file each piece is written from, and the switch that takes one out. Read it
|
|
5
|
+
when you add or edit a rule, when you need to know whether a session was really
|
|
6
|
+
told something, or when a session behaves as if a rule were missing. The
|
|
7
|
+
user-facing side of the same contract is [README.md](../README.md); the words
|
|
8
|
+
used here are defined once in [glossary.md](glossary.md); which host gets which
|
|
9
|
+
surface is [hosts.md](hosts.md).
|
|
10
|
+
|
|
11
|
+
Every string is a module constant in `hooks/tezgah_policy.py`, so that every
|
|
12
|
+
host says the same thing (`hooks/tezgah_policy.py:14-15`); path placeholders
|
|
13
|
+
(`{ROOT}`, `{CONSULT_BIN}`, `{ORX_BIN}`, …) are filled at injection time by
|
|
14
|
+
`render()` (`hooks/tezgah_context.py::render`).
|
|
15
|
+
|
|
16
|
+
## The five surfaces
|
|
17
|
+
|
|
18
|
+
| Surface | Text | Paid |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| always-on core | `CORE` (`hooks/tezgah_policy.py::CORE`) minus the five conditional paragraphs, plus the pointer line | once per session: `session_start` and `post_compact` |
|
|
21
|
+
| conditional paragraph | one of the five keyed by `CONDITIONAL_KEYS` (`hooks/tezgah_policy.py::CONDITIONAL_KEYS`) | in full on the first turn of a session whose prompt matches its task class; a later match pays one line (`hooks/tezgah_context.py::armed_again`) until a compaction or `ARMED_RESURFACE` turns (`hooks/tezgah_context.py::ARMED_RESURFACE`) bring the full text back |
|
|
22
|
+
| per-turn reminder | `PROMPT_REMINDER` (`hooks/tezgah_policy.py::PROMPT_REMINDER`) | every user prompt |
|
|
23
|
+
| skill suggestion | one `<skill_relevance>` line naming at most one installed skill, written by `suggest` (`hooks/tezgah_skill_pick.py::suggest`); off unless `skill-suggest-on` is armed | only on a turn the judgement answers with a skill |
|
|
24
|
+
| on-demand full contract | the long-form blocks of `hooks/tezgah_policy.py` (`EXEC`, `CONSULT`, `RESEARCH`, …), shipped hand-kept as `skills/tezgah-contract/SKILL.md` | only when the session loads that skill |
|
|
25
|
+
|
|
26
|
+
The skill suggestion is the one surface a judgement writes rather than a constant.
|
|
27
|
+
The roster reaches a session as an index of host-truncated one-liners, so which
|
|
28
|
+
entry to look at first is the turn's own weak spot; one batched judgement request
|
|
29
|
+
answers it - TypeSafe, or the OpenRouter fallback when no TypeSafe key resolves
|
|
30
|
+
(`credential()`, `hooks/tezgah_judge.py::credential`) - a Choice across the installed
|
|
31
|
+
skill names plus `none`, and one Noul
|
|
32
|
+
asking whether the turn wants a skill at all - and the winner is appended after
|
|
33
|
+
the armed paragraphs as a hint to look at first, never as an instruction to load
|
|
34
|
+
(`hooks/tezgah_skill_pick.py:41-75` is the whole configuration, wired into
|
|
35
|
+
`context_for` at `hooks/tezgah_context.py::context_for`). Measured cost of the line
|
|
36
|
+
itself: 305-317 characters, about 78 tokens of prompt. Measured cost of the
|
|
37
|
+
judgement: one call per unanswered prompt, 909-915 input tokens, 0.77-0.81 s,
|
|
38
|
+
$0.000038 at $0.042/1M on three live judgements. It is OFF UNLESS ARMED -
|
|
39
|
+
`skill-suggest-on` in `~/.config/tezgah`, the same place the kill switches live -
|
|
40
|
+
because a labelled set of 28 prompts through an independent chooser was measured
|
|
41
|
+
at 0 of 20 wrong with no hint at all, so the line's benefit on this 13-skill
|
|
42
|
+
roster is unproven while its cost is measured; arming it is a decision the user
|
|
43
|
+
makes, and an unarmed install asks nothing. It changes nothing else - no
|
|
44
|
+
credential, a `none` answer, a slash command, a failed or stalled call, or the
|
|
45
|
+
absence of the arming file appends no bytes at all, and the same prompt in one
|
|
46
|
+
session is never paid for twice (`tests/test_skill_pick.py`). The host's own
|
|
47
|
+
roster text is left untouched: that is what a session matches on and what its
|
|
48
|
+
prefix cache covers, which is the whole reason the upstream recipe keeps it.
|
|
49
|
+
|
|
50
|
+
`context_for(event, …)` is the one dispatcher (`hooks/tezgah_context.py::context_for`):
|
|
51
|
+
`session_start`/`post_compact` build core plus live state, `user_prompt` builds
|
|
52
|
+
the reminder, whatever was armed and any skill hint, `subagent_start` builds a short brief
|
|
53
|
+
(`hooks/tezgah_context.py::context_for`). Outside every configured root it returns `None`
|
|
54
|
+
(`hooks/tezgah_context.py::context_for`). A host whose static always-on file already
|
|
55
|
+
carries the core passes `with_core=False` so the session does not pay for the
|
|
56
|
+
contract twice (`hooks/tezgah_context.py::context_for`); a delegated agent gets
|
|
57
|
+
`subagent_core()`, which keeps every always-on label and its opening sentence -
|
|
58
|
+
two where the operative clause is the second, counted by `BRIEF_SENTENCES`
|
|
59
|
+
(`hooks/tezgah_context.py::BRIEF_SENTENCES`) and cut from CORE's own text - and
|
|
60
|
+
carries the two always-on blocks that are not labelled rules - the on-demand
|
|
61
|
+
pointer line and the kill-switch list - in its header, because its header claims
|
|
62
|
+
every rule is in force and a delegate that cannot name a switch cannot tell its
|
|
63
|
+
caller how to disarm one (`hooks/tezgah_context.py::subagent_core`).
|
|
64
|
+
|
|
65
|
+
One block on those two events is not a standing rule but the live turn state.
|
|
66
|
+
`session_start` and `post_compact` also build `resume_state`: a plan's
|
|
67
|
+
`## State` and `## Next`, the branch's last three commits, the newest
|
|
68
|
+
`verify_ok`/`verify_fail` the session ledger holds, and the files the last turn
|
|
69
|
+
changed. The plan named is the one the checked-out `plan/...` branch owns, and
|
|
70
|
+
when the checkout owns none the lowest-id open plan is offered as what it is -
|
|
71
|
+
`open plan NNN (not this branch)` - because another plan's Next read as the
|
|
72
|
+
active one would invent a task. It is what a session that compacts, or resumes the next morning, would
|
|
73
|
+
otherwise lose - the contract, the plans and the lessons arrive, but not what the
|
|
74
|
+
turn was doing. It is written as a state of the world and never as an order. Each
|
|
75
|
+
part is silent when its fact is unknown and the block is left out whole when
|
|
76
|
+
every part is empty. On Claude it reaches the model through SessionStart, which
|
|
77
|
+
fires again as `SessionStart:compact` after a compaction and delivers its
|
|
78
|
+
`additionalContext`. It does NOT go out on PostCompact: a real compaction on
|
|
79
|
+
Claude Code 2.1.283 showed the host rejecting a PostCompact envelope
|
|
80
|
+
("Hook JSON output validation failed - hookSpecificOutput.hookEventName:
|
|
81
|
+
expected one of ...") and printing the raw JSON into the transcript as a failed
|
|
82
|
+
hook, so `hooks/projects-auto-init.py` builds the block on that event - which is
|
|
83
|
+
where the compaction is recorded - and prints nothing.
|
|
84
|
+
|
|
85
|
+
The same event is where a compaction is recorded rather than only answered. When
|
|
86
|
+
the host hands the PostCompact payload a summary - Claude's `compact_summary`,
|
|
87
|
+
the text the model is about to receive - the shared funnel writes one ledger row
|
|
88
|
+
holding the summary's length, a 12-hex digest of it, the host's `trigger`
|
|
89
|
+
(`manual` or `auto`) and how many of the constraint lines tezgah injects (the
|
|
90
|
+
pointer line, the active plan's line when the repo keeps an open plan, and each
|
|
91
|
+
constraint the user issued this session) the summary still carries, out of how
|
|
92
|
+
many were injected. The text itself is
|
|
93
|
+
never stored: the summary is the whole conversation by proxy and the ledger is a
|
|
94
|
+
redacted channel, so a row must not be readable as prose. The count is a report
|
|
95
|
+
and never a refusal - a compaction that dropped a rule is a finding to report,
|
|
96
|
+
not a turn to block - and `tezgah-status --counters` folds the rows into
|
|
97
|
+
`compactions`, `compact_chars` and `compact_constraint_rate`
|
|
98
|
+
([evidence.md](evidence.md#the-kinds-by-what-reads-them)).
|
|
99
|
+
|
|
100
|
+
A user constraint is the clause a prompt states it in: "don't touch
|
|
101
|
+
hooks.json", "ask before pushing", "README'ye dokunma", "bana sormadan push
|
|
102
|
+
etme". A closed set of imperative shapes matches it (`CONSTRAINT_SHAPES`,
|
|
103
|
+
`hooks/tezgah_context.py::CONSTRAINT_SHAPES`, read by `user_constraints`,
|
|
104
|
+
`hooks/tezgah_context.py::user_constraints`). The turn stamp keeps the clause
|
|
105
|
+
from the shape to its sentence's end, redacted and cut to 120 characters, and
|
|
106
|
+
never the prompt. It keeps the five newest. A shape that starts inside quotes,
|
|
107
|
+
inline code, a fenced block or a `>` line does not count. A quoted object after
|
|
108
|
+
a plain "don't touch" does. The recogniser skips a prompt over 12,000
|
|
109
|
+
characters (`CONSTRAINT_PROMPT_MAX`, `hooks/tezgah_context.py::CONSTRAINT_PROMPT_MAX`).
|
|
110
|
+
Pasted material is not the user's constraint. `post_compact` and `session_start`
|
|
111
|
+
restate the clauses as one block
|
|
112
|
+
(`pinned_block`, `hooks/tezgah_context.py::pinned_block`). The compaction count
|
|
113
|
+
looks for each clause's object phrase, the words a paraphrasing summary keeps
|
|
114
|
+
(`constraint_needle`, `hooks/tezgah_context.py::constraint_needle`). The shapes are
|
|
115
|
+
precise rather than complete. `tests/constraint-fixtures.md` lists the real
|
|
116
|
+
prompts the shapes ran on, the misses and the known false positives.
|
|
117
|
+
|
|
118
|
+
One per-turn line is not a rule but a check on the turn's own evidence. When the
|
|
119
|
+
ledger says every check that passed in this session ran in a scratch or stand-in
|
|
120
|
+
path - `/tmp/`, `/var/folders/`, `$TMPDIR`, or a path segment naming a
|
|
121
|
+
`fixture`/`fake`/`stub`/`sample`/`demo` (`SCRATCH_PATH`,
|
|
122
|
+
`hooks/tezgah_integrity.py::SCRATCH_PATH`; `scratch_evidence`,
|
|
123
|
+
`hooks/tezgah_integrity.py::scratch_evidence`) - the turn is told the command and the
|
|
124
|
+
rule: evidence from a scratch path is evidence about the code path, so a claim
|
|
125
|
+
about the running system needs a check that ran against it (`SCRATCH_REMINDER`,
|
|
126
|
+
`hooks/tezgah_context.py::SCRATCH_REMINDER`, appended at `hooks/tezgah_context.py::context_for`).
|
|
127
|
+
It is a reminder and not a block because whether a scratch script exercises the
|
|
128
|
+
real system is not decidable from the command; one passing check against a real
|
|
129
|
+
path makes the reader answer `None`, so a session that also ran the real thing is
|
|
130
|
+
never told this; and a ledger with no such row costs no bytes. `verify-off` drops
|
|
131
|
+
it with the integrity rule it restates.
|
|
132
|
+
|
|
133
|
+
The on-demand contract also carries detail the core has no budget for. One is
|
|
134
|
+
the review rule: a change with an executable oracle - a checker, a gate rule, a
|
|
135
|
+
parser - is reviewed by four direction-led reviewers whose every claim is built
|
|
136
|
+
as a fixture and run before it counts, a tentative default measured on two
|
|
137
|
+
research lines with a written flip; everything else keeps one fresh reviewer
|
|
138
|
+
(`skills/tezgah-contract/SKILL.md:503-527`).
|
|
139
|
+
|
|
140
|
+
## Composition order of the always-on core
|
|
141
|
+
|
|
142
|
+
Paragraphs are concatenated in the order they appear in `CORE` and identified by
|
|
143
|
+
the bold label each starts with (`CORE_RULES`, `hooks/tezgah_context.py::CORE_RULES`).
|
|
144
|
+
That order, with the line each label sits on in `hooks/tezgah_policy.py`:
|
|
145
|
+
`**{REPLY_LANG}, BLUF.**` :637, `**Ponytail (minimal code).**` :645, `**Output shape:
|
|
146
|
+
ADHD-friendly.**` :656, `**Deliver the whole ask; never the shortcut.**` :670,
|
|
147
|
+
`**Integrity: evidence, or "doğrulanmadı".**` :684, `**Loop discipline.**` :700,
|
|
148
|
+
`**Spec before building.**` :709 *(conditional)*, `**Lessons ledger: stop
|
|
149
|
+
repeating mistakes.**` :723, `**Code discovery: graph first.**` :731
|
|
150
|
+
*(conditional)*, `**Consult before irreversible.**` :740 *(conditional)*,
|
|
151
|
+
`**Research: route it to OpenResearch.**` :756 *(conditional)*, `**Product
|
|
152
|
+
analysis: five axes, one evidence class per finding.**` :772 *(conditional)*,
|
|
153
|
+
`**No AI attribution, ever, on any host.**` :805, `**Identifiers and messages
|
|
154
|
+
stay English.**` :815, `**Session scope: the user's repo, not tezgah.**` :821,
|
|
155
|
+
`**Kill switches:**` :837. The first label renders as `**Turkish, BLUF.**` under
|
|
156
|
+
the default `reply_lang`.
|
|
157
|
+
|
|
158
|
+
`always_on_core()` (`hooks/tezgah_context.py::always_on_core`) drops the five
|
|
159
|
+
conditional paragraphs and appends `POINTERS` (`hooks/tezgah_policy.py::POINTERS`):
|
|
160
|
+
one line each saying the rule exists and where its full text lives — spec-first,
|
|
161
|
+
a second opinion, OpenResearch routing, product analysis, the code graph, and the
|
|
162
|
+
per-repo design contract `bin/tezgah-design` checks a UI change against (the one
|
|
163
|
+
pointer with no conditional paragraph behind it, because the Stop rule's `no
|
|
164
|
+
ui_ok` class is what asks for the check). That is
|
|
165
|
+
what a host with no prompt-time hook writes into a static file: opencode's
|
|
166
|
+
`~/.config/tezgah/opencode-contract.md` (`bin/tezgah-setup::OPENCODE_CONTRACT`) and omp's
|
|
167
|
+
managed `RULES.md` (`bin/tezgah-setup::STATIC_RULES`). Claude gets it from the
|
|
168
|
+
managed block in `~/.claude/CLAUDE.md` (its global memory file, and the reason
|
|
169
|
+
its session-start hook drops the core: `TEZGAH_CORE_IN_FILE`) and from
|
|
170
|
+
`output-styles/tezgah.md` where a build loads plugin output styles
|
|
171
|
+
(`output-styles/tezgah.md:11-12`); Codex gets it from the managed block in its
|
|
172
|
+
global instructions file; Cursor receives the same core from its session-start
|
|
173
|
+
hook (`hosts/cursor/hook.py:5`, `hosts/cursor/hook.py::dispatch`). `core_for()`
|
|
174
|
+
(`hooks/tezgah_context.py::core_for`) is that text with the kill-switch filtering
|
|
175
|
+
applied, and it also returns the names of the switches that fired.
|
|
176
|
+
|
|
177
|
+
## What each always-on rule is for
|
|
178
|
+
|
|
179
|
+
- **Turkish, BLUF.** Every user-facing reply is Turkish even when the prompt is English, outcome first; code, commits, docs and subagent prompts stay English. That is the default. `reply_lang` in `~/.config/tezgah/config.json` picks another: `tr`, `en` or `any`. `tezgah-setup --install --reply-lang` sets it, and the label follows it. The value is the switch. The Stop rule checks the language only under `tr`: under `en` and `any` it judges none.
|
|
180
|
+
- **Ponytail (minimal code).** Take the laziest rung that holds (YAGNI → reuse → stdlib → platform → installed dependency → one line), never simplify away validation, error handling or security. A non-default level rides the reminder (`hooks/tezgah_context.py::_pony_level_line`).
|
|
181
|
+
- **Output shape: ADHD-friendly.** The action or answer is the first line, multi-step work is a numbered list whose position is restated, an estimate is in concrete units. Two upstream rules were rewritten rather than imported verbatim because they collided with rules already in force: the state restatement points at the todo list instead of duplicating it, and a time estimate can no longer be read as a measurement.
|
|
182
|
+
- **Deliver the whole ask; never the shortcut.** The request is a floor: no cheaper stand-in, no silent scope cut, no token gesture reported as done.
|
|
183
|
+
- **Integrity: evidence, or "doğrulanmadı".** A done/tested claim holds only if the check ran in this session and its output was seen; the mechanical half is enforced by [gate.md](gate.md).
|
|
184
|
+
- **Loop discipline.** Never repeat an identical failing command; three attempts is the ceiling, then report what is still unknown.
|
|
185
|
+
- **Lessons ledger: stop repeating mistakes.** `.tezgah/lessons.md` lines are standing constraints; the recent ones are injected at session start, and up to three older ones a prompt shares words with ride that turn, each once per session when the host sends a session id (a compaction resets that, because the compacted context no longer holds them; without an id every matching turn carries them). Write a line rule first, `<rule> - <incident>` (`LESSON_SEPARATOR`, `hooks/tezgah_context.py::LESSON_SEPARATOR`). The session block counts the shown lines that do not open with their rule. A line ending `|| enforced_by: <rule|test>` leaves both blocks while that gate rule or test is on (`hooks/tezgah_lessons.py::lines`). That one reader serves the context, the gate and the CLI. It cuts that clause, a `|| check: ...` clause and an `@<sha> <path>` stamp off each line (`hooks/tezgah_lessons.py::parse`). None of them changes the key, the per-turn digest, the cut or the ranking. The gate records a line written after untrusted text in the same turn as a `lesson_tainted` row ([evidence.md](evidence.md)). That line still rides both blocks, behind a per-line data label (`hooks/tezgah_context.py::LESSON_TAINTED`). ADR 010 makes it a row, never a refusal. `bin/tezgah-lessons` proposes rewrites, merges and retirements, and never writes the file.
|
|
186
|
+
- **No AI attribution, ever, on any host.** Nothing persisted or published may name a model, vendor or "AI" as author, co-author, generator or helper; one already in pushed history is reported.
|
|
187
|
+
- **Identifiers and messages stay English.** A branch, a plan slug, a commit subject, a PR or issue title is in the repository - often a public one - from the moment it exists, so the gate refuses one that is not English - any non-ASCII letter, or a Turkish word from a curated list - and names the English to write instead (`hooks/tezgah_policy.py::CORE`, [gate.md](gate.md#language-an-identifier-or-message-that-is-not-english)). The word list behind it is a heuristic, not a language detector, and the rule says so where it refuses.
|
|
188
|
+
- **Session scope: the user's repo, not tezgah.** The session never maintains tezgah itself; a missing capability is one line plus the documented fallback.
|
|
189
|
+
- **Kill switches.** The switch list itself, so a session can tell the user how to disarm a rule it is asked to ignore; pinned against the shipped skill by `tests/test_skills.py::SkillStandards`.
|
|
190
|
+
|
|
191
|
+
## Which mechanism enforces each always-on rule
|
|
192
|
+
|
|
193
|
+
`tezgah-status --enforcers` prints one row per always-on rule. A row names the
|
|
194
|
+
gate rules (`gate:`) and Stop classes (`stop:`) that refuse on the rule. It
|
|
195
|
+
also names the shape flags (`flag:`) that only record it, or says `none`. The
|
|
196
|
+
rows come from the bold heads of `CORE`. The links come from the code
|
|
197
|
+
(`bin/tezgah-docs::enforcer_links`). An enforcer links to a rule when its name
|
|
198
|
+
is the rule's `CORE_RULES` key. It also links when a switch guards it and that
|
|
199
|
+
switch's branch of `hooks/tezgah_context.py::switches` drops the rule's
|
|
200
|
+
paragraph. A Stop class with no switch of its own rides the Stop hook's
|
|
201
|
+
`verify-off`. The code cannot state four links, so
|
|
202
|
+
`bin/tezgah-docs::HAND_LINKS` writes them. They are `explorer` for graph-first,
|
|
203
|
+
`retry` for loop discipline, `placating opener` for the Deliver rule, and the
|
|
204
|
+
shape flags for the output-shape rule. The report also lists the enforcers tied
|
|
205
|
+
to no always-on rule, such as `task`, `secret` and `plan`.
|
|
206
|
+
|
|
207
|
+
Each enforcer shows its guards in brackets: the switches and environment
|
|
208
|
+
conditions of the `if` tests around it (`bin/tezgah-docs::_guarded_returns`).
|
|
209
|
+
The switch a whole hook reads first, `pretooluse-off` or the Stop hook's
|
|
210
|
+
`verify-off`, is not shown. A row's status is one of four:
|
|
211
|
+
|
|
212
|
+
- `enforced`: at least one refusing enforcer stays armed while the rule's text
|
|
213
|
+
is in force.
|
|
214
|
+
- `partial`: every refusing enforcer has a guard that can remove it while the
|
|
215
|
+
text stays, or the table below names a part nothing covers.
|
|
216
|
+
- `records`: only shape flags, which refuse nothing.
|
|
217
|
+
- `prose-only`: no enforcer at all.
|
|
218
|
+
|
|
219
|
+
The table below records why a rule is prose-only, and which part of a partial
|
|
220
|
+
rule no enforcer covers. `bin/tezgah-docs --citations` and
|
|
221
|
+
`tests/test_enforcers.py` fail on a prose-only or records-only rule with no
|
|
222
|
+
row, and on a row naming no rule. A coverage row exists only where someone
|
|
223
|
+
reviewed the gap, so `enforced` says a refusal exists, not that it covers every
|
|
224
|
+
sentence of the rule.
|
|
225
|
+
|
|
226
|
+
| rule | decision |
|
|
227
|
+
|---|---|
|
|
228
|
+
| exec | Only the reply language is refused, and only under `reply_lang` `tr`. Answer-first (BLUF) has no mechanism. |
|
|
229
|
+
| fidelity | Only the placating opener is refused, and only while the output-shape switches are on. Delivering the whole ask has no mechanism. |
|
|
230
|
+
| loop | Only an identical repeat is refused, under `verify-off`. Re-running a check that already passed is not refused. |
|
|
231
|
+
| ponytail | no decision |
|
|
232
|
+
| spec | no decision |
|
|
233
|
+
| lessons | Owner decision ADR 010 (2026-10-05): a tainted lesson costs a row, never a refusal. |
|
|
234
|
+
| consult | The owner removed the consent rule on 2026-09-26 ([gate.md](gate.md#what-the-gate-deliberately-does-not-catch)). The per-turn reminder carries the clause instead. |
|
|
235
|
+
| research | Owner decision ADR 010 (2026-10-05): no new research rule until plan 062 reports. |
|
|
236
|
+
| product | Owner decision ADR 010 (2026-10-05): no new research rule until plan 062 reports. The product rule is the research route. |
|
|
237
|
+
| scope | no decision |
|
|
238
|
+
|
|
239
|
+
## Arming the conditional paragraphs, and the per-turn reminder
|
|
240
|
+
|
|
241
|
+
`PROMPT_HINTS` (`hooks/tezgah_context.py::PROMPT_HINTS`) is one compiled pattern per key
|
|
242
|
+
— `spec`, `consult`, `research`, `product`, `graph` — and `classify_prompt()` returns the keys
|
|
243
|
+
a prompt matches (`hooks/tezgah_context.py::classify_prompt`). On that turn only, the
|
|
244
|
+
matching paragraphs are appended after the reminder
|
|
245
|
+
(`hooks/tezgah_context.py::context_for`); a session that never asks such a question
|
|
246
|
+
pays the one-line pointer instead. The patterns carry Turkish stems because the
|
|
247
|
+
user writes Turkish, and a plain prompt arms nothing. The same prompt arms the
|
|
248
|
+
same rules on every host (`tests/test_context.py::ArmingConformance.test_all_hosts_arm_the_same_rules`) and each advisory
|
|
249
|
+
rule keeps a pointer line in the always-on text (`tests/test_context.py::ArmingConformance.test_every_advisory_rule_has_an_always_on_pointer`).
|
|
250
|
+
|
|
251
|
+
`PROMPT_REMINDER` is the compact restatement of the invariants. It stays
|
|
252
|
+
inside the `<harness-reminder>` envelope the hosts and
|
|
253
|
+
tests look for (`hooks/tezgah_policy.py::PROMPT_REMINDER`), with its `{PONY_LEVEL}` slot naming a non-default ponytail level
|
|
254
|
+
(`hooks/tezgah_context.py::_pony_level_line`). It names three conditional rules
|
|
255
|
+
nowhere: spec, graph and research reach a turn through their armed paragraph.
|
|
256
|
+
Consult keeps its short clause. A terse irreversible ask ("push it to main")
|
|
257
|
+
arms no paragraph, and no gate enforces the rule. The session-start text ends with the pointer
|
|
258
|
+
telling the model to load `tezgah-contract` for the deep detail
|
|
259
|
+
(`hooks/tezgah_context.py::context_for`), whose two appendixes apply only on a machine
|
|
260
|
+
missing the code graph or every consult option (`hooks/tezgah_policy.py::NO_GRAPH`, `hooks/tezgah_policy.py::NO_CONSULT`).
|
|
261
|
+
|
|
262
|
+
## How a rule is disarmed
|
|
263
|
+
|
|
264
|
+
A kill switch removes the rule's text, not just a status mark
|
|
265
|
+
(`hooks/tezgah_context.py::core_split`). `off()` checks `~/.config/tezgah` and the
|
|
266
|
+
legacy `~/.claude` (`hooks/tezgah_paths.py::OFF_DIRS`, `hooks/tezgah_paths.py::off`); the drop itself
|
|
267
|
+
happens in `core_split()`.
|
|
268
|
+
|
|
269
|
+
The session latches a switch (`hooks/tezgah_paths.py::latch`). A hook that knows
|
|
270
|
+
its session binds the session's ledger first
|
|
271
|
+
(`hooks/tezgah_integrity.py::bind_session`). From then on `off()` ignores a
|
|
272
|
+
switch file whose ctime or mtime is newer than the ledger's first row. The agent
|
|
273
|
+
under the rules writes files too. Without the latch, a switch it made mid-session
|
|
274
|
+
would disarm the rule that judges it. The check reads ctime: `touch -t` sets
|
|
275
|
+
mtime back, and nothing sets ctime back. A switch made mid-session counts in that session in
|
|
276
|
+
three cases:
|
|
277
|
+
|
|
278
|
+
- the user's prompt names it as a word (`verify-off`). `note_turn` writes an
|
|
279
|
+
`authorized` row, and the switch counts from that turn on. While a tool call
|
|
280
|
+
is in flight it writes none, and marks the turn row `inflight`
|
|
281
|
+
(`hooks/tezgah_integrity.py::_in_flight`). A host hands its prompt hook a
|
|
282
|
+
prompt between calls. An unanswered call older than ten minutes no longer
|
|
283
|
+
counts, since a host writes no answer for a call the user interrupted.
|
|
284
|
+
- it is the stand-down `tezgah-setup --uninstall --full` writes into
|
|
285
|
+
`pretooluse-off` (`hooks/tezgah_paths.py::STAND_DOWN`).
|
|
286
|
+
- it appeared within the first row's second, because the row's `ts` holds whole
|
|
287
|
+
seconds.
|
|
288
|
+
|
|
289
|
+
Otherwise a switch made mid-session counts from the next session on. A CLI and
|
|
290
|
+
a hook with no session id bind nothing and read the file alone, as before. The
|
|
291
|
+
opencode plugin answers the same way (`off(name, sessionID)`). A prompt match is
|
|
292
|
+
a keyword match, not intent: "don't touch `verify-off`" names the switch too.
|
|
293
|
+
|
|
294
|
+
| Switch file | Rule it removes | Where the drop is implemented |
|
|
295
|
+
|---|---|---|
|
|
296
|
+
| `exec-mode.off` | `**{REPLY_LANG}, BLUF.**` | `hooks/tezgah_context.py::switches` |
|
|
297
|
+
| `ponytail-auto.off` | `**Ponytail (minimal code).**` | `hooks/tezgah_context.py::switches` |
|
|
298
|
+
| `adhd-off` | `**Output shape: ADHD-friendly.**` | `hooks/tezgah_context.py::switches` |
|
|
299
|
+
| `spec-off` | `**Spec before building.**` | `hooks/tezgah_context.py::switches` |
|
|
300
|
+
| `verify-off` | `**Integrity: evidence…**`, and the per-turn evidence-scope line with it | `hooks/tezgah_context.py::switches`, `hooks/tezgah_context.py::context_for` |
|
|
301
|
+
| `consult-off` | `**Consult before irreversible.**` | `hooks/tezgah_context.py::switches` |
|
|
302
|
+
| `research-off` | `**Research: route it to OpenResearch.**` | `hooks/tezgah_context.py::switches` |
|
|
303
|
+
| `orchestrate-off` | the orchestration section of the on-demand skill (there is no core paragraph) | `hooks/tezgah_context.py::switches` disables it, `hooks/tezgah_context.py::context_for` injects "Orchestration is off", and the skill-ignore note is `hooks/tezgah_context.py::context_for` |
|
|
304
|
+
| `reminder-off` | the per-turn reminder | `hooks/tezgah_context.py::context_for` returns `None` |
|
|
305
|
+
| `judge-off` | the judgement seam: the snapshot triage, the docs page fallback and the skill hint | `hooks/tezgah_judge.py::available` — `available()` is asked before any call, so an armed switch makes no request at all |
|
|
306
|
+
| `triage-off` | the snapshot triage alone (`bin/tezgah-triage`), leaving the docs fallback and the skill hint armed | `bin/tezgah-triage::off_reason` — `off_reason()` answers this switch before the seam's, so the analyze-app loop reads the tree instead of paying for a judgement |
|
|
307
|
+
| `docs-judge-off` | the docs page fallback alone (`bin/tezgah-docs`), leaving the triage and the skill hint armed | `bin/tezgah-docs::off` — `off()` answers this switch first, so a query the index cannot place is ranked by shared words instead (`ranked`), and exits 1 only when no page shares one |
|
|
308
|
+
| `lang-off` | `**Identifiers and messages stay English.**` | `hooks/tezgah_context.py::switches` drops the paragraph; the gate's own check reads the same switch (`hooks/tezgah_gate.py::decision`) |
|
|
309
|
+
| `pretooluse-off` | the gate's denials, not a rule | [gate.md](gate.md) |
|
|
310
|
+
| `.no-ponytail` | `**Ponytail (minimal code).**` | `hooks/tezgah_context.py::switches` |
|
|
311
|
+
| `.no-adhd` | `**Output shape: ADHD-friendly.**` | `hooks/tezgah_context.py::switches` |
|
|
312
|
+
| `.no-graph` | `**Code discovery: graph first.**` | `hooks/tezgah_context.py::switches` |
|
|
313
|
+
| `.no-lessons` | `**Lessons ledger: stop repeating mistakes.**` | `hooks/tezgah_context.py::switches`, and neither the session's lessons block (`hooks/tezgah_context.py::lessons`) nor the per-turn one (`relevant_lessons`) is injected |
|
|
314
|
+
|
|
315
|
+
The last four are per-repo [marks](glossary.md#per-repo-mark), read by
|
|
316
|
+
`repo_marks()`, walking up to the enclosing [root](glossary.md#root)
|
|
317
|
+
(`hooks/tezgah_context.py::repo_marks`). Every switch that fired is named back to the
|
|
318
|
+
session at start (`hooks/tezgah_context.py::context_for`) and per turn (`hooks/tezgah_context.py::context_for`), with the instruction to
|
|
319
|
+
ignore the matching section in `tezgah-contract` — that skill is loaded
|
|
320
|
+
separately and would otherwise re-arm the rule. `tezgah-adhd off` writes the same
|
|
321
|
+
channel as the file (`bin/tezgah-adhd::SWITCH`); the ponytail *level* is not a switch.
|
|
322
|
+
|
|
323
|
+
`**Deliver the whole ask**`, the sycophancy ban and the attribution ban are
|
|
324
|
+
invariants: no switch touches them, and `tests/test_context.py::KillSwitchEnforcement.test_fidelity_and_the_sycophancy_ban_are_invariants` asserts
|
|
325
|
+
they survive every other switch being off.
|
|
326
|
+
|
|
327
|
+
## Adding a rule
|
|
328
|
+
|
|
329
|
+
1. Write the full text as a constant in `hooks/tezgah_policy.py`.
|
|
330
|
+
2. If not every session should pay it, add the key to `CONDITIONAL_KEYS`
|
|
331
|
+
(`hooks/tezgah_policy.py::CONDITIONAL_KEYS`), a pattern to `PROMPT_HINTS`
|
|
332
|
+
(`hooks/tezgah_context.py::PROMPT_HINTS`) and a line to `POINTERS`
|
|
333
|
+
(`hooks/tezgah_policy.py::POINTERS`); the two halves are asserted together
|
|
334
|
+
(`tests/test_context.py::ArmingConformance`).
|
|
335
|
+
3. Put the paragraph in `CORE` with its bold label and add the `(key, label)`
|
|
336
|
+
pair to `CORE_RULES` (`hooks/tezgah_context.py::CORE_RULES`). The label is the
|
|
337
|
+
contract: `core_split()` matches paragraphs by it and `subagent_core()` builds
|
|
338
|
+
the brief from it, so a label edit fails loudly instead of silently dropping
|
|
339
|
+
a rule.
|
|
340
|
+
4. If the rule names a kill switch, add the drop to `core_split()` and list the
|
|
341
|
+
switch in the `**Kill switches:**` paragraph (`hooks/tezgah_policy.py::CORE`).
|
|
342
|
+
5. Mirror the full text into `skills/tezgah-contract/SKILL.md`, and regenerate
|
|
343
|
+
`output-styles/tezgah.md` from a fresh Python process when the paragraph is
|
|
344
|
+
always-on — a warm interpreter serves a stale `CORE`.
|
|
345
|
+
6. Last step, the tests that pin it: add the label to `KillSwitchEnforcement`
|
|
346
|
+
(`tests/test_context.py::KillSwitchEnforcement`) and, for a conditional rule, to the
|
|
347
|
+
`ArmingConformance` label map (`tests/test_context.py::ArmingConformance`); then run the mirror pair —
|
|
348
|
+
`OutputStyleMirrorsCore.test_body_is_the_always_on_core`
|
|
349
|
+
(`tests/test_context.py::OutputStyleMirrorsCore`) and
|
|
350
|
+
`ContractParity.test_every_rule_and_heading_in_the_contract_reaches_the_skill`
|
|
351
|
+
(`tests/test_setup.py::ContractParity.test_every_rule_and_heading_in_the_contract_reaches_the_skill`).
|
|
352
|
+
|
|
353
|
+
## The two copies that must stay in step
|
|
354
|
+
|
|
355
|
+
| Copy A | Copy B | Test that fails when only one changed |
|
|
356
|
+
|---|---|---|
|
|
357
|
+
| `CORE`, via `always_on_core()` | `output-styles/tezgah.md` (Claude's hookless duplicate) | `tests/test_context.py::OutputStyleMirrorsCore` |
|
|
358
|
+
| the long-form blocks of `hooks/tezgah_policy.py` (`EXEC`, `CONSULT`, …) | `skills/tezgah-contract/SKILL.md` | `tests/test_setup.py::ContractParity` |
|
|
359
|
+
|
|
360
|
+
Drift between the source and what a host reads is caught on the rendered side:
|
|
361
|
+
`~/.config/tezgah/contract.sha256` holds one `<sha> <path>` line per rendered
|
|
362
|
+
artifact (the managed blocks of `CLAUDE.md`, `AGENTS.md`, `RULES.md`, and
|
|
363
|
+
opencode's contract and skill routers), and `--report` compares each artifact's
|
|
364
|
+
bytes with a fresh render. That notices that the text a session gets changed;
|
|
365
|
+
`ContractParity` is what notices that only one of the pair above changed, which
|
|
366
|
+
is the drift that actually happens (`tests/test_setup.py::ContractParity`).
|
|
367
|
+
`tezgah-setup --refresh` re-renders every armed host's artifact, not only
|
|
368
|
+
opencode's, and drops the paragraph of any global kill switch that is on
|
|
369
|
+
(`refresh_contract`, `bin/tezgah-setup::refresh_contract`).
|
|
370
|
+
|
|
371
|
+
The skill may hold more than the contract. Two rules live only in the skill
|
|
372
|
+
today. The graph rule says an empty caller list is not proof that a change is
|
|
373
|
+
safe. The gate section adds evidence adequacy: a check counts only if it can
|
|
374
|
+
fail on the claim it backs. `ContractParity` reads one way, from the
|
|
375
|
+
contract to the skill, so these extra rules pass it. The generated reviewer
|
|
376
|
+
brief carries the same caller-list floor (`hooks/tezgah_agents.py`), and
|
|
377
|
+
`tests/test_agents.py` asserts it on every host.
|
|
378
|
+
|
|
379
|
+
## When the injected text grows too large
|
|
380
|
+
|
|
381
|
+
Each event has a byte budget: `session_start` and `post_compact` 12000,
|
|
382
|
+
`user_prompt` 6000, `subagent_start` 5500, anything else 12000
|
|
383
|
+
(`hooks/tezgah_context.py::CONTEXT_BUDGET`). The rationale and the measured
|
|
384
|
+
sizes sit beside it. A fixture repo builds 10066 B at `session_start` and about
|
|
385
|
+
5150 B at `subagent_start`. A `user_prompt` that arms all five conditional rules
|
|
386
|
+
for the first time builds 7503 B. That is over its budget on purpose: an armed paragraph
|
|
387
|
+
is never dropped, and every later match in the session pays one line. The
|
|
388
|
+
budget is a byte count, not a token estimate.
|
|
389
|
+
|
|
390
|
+
Over budget, `budgeted()` gives up blocks in `DROP_ORDER`, lowest value
|
|
391
|
+
first — the text another surface already carries (project knowledge, the
|
|
392
|
+
sibling-checkout line, lessons), the skill hint (a suggestion, never an
|
|
393
|
+
instruction), the per-turn relevant lessons and the plan table first, then the tooling-availability lines and the live graph
|
|
394
|
+
glance, then the resume state (it outlives those because it is the only one that
|
|
395
|
+
says what this session was doing, and it still yields to a rule), then the
|
|
396
|
+
evidence-scope warning, the task phase, the delta, and the skill pointer last
|
|
397
|
+
(`hooks/tezgah_context.py::DROP_ORDER`). Any key absent from that tuple is
|
|
398
|
+
never dropped: the core, the reminder, the armed paragraphs and the user's pinned
|
|
399
|
+
constraints are the rules, and
|
|
400
|
+
a budget able to spend them would turn bloat into rule loss. The note naming what
|
|
401
|
+
went is appended after the count, so the sentence explaining the trim cannot force
|
|
402
|
+
another one, and it says so when what remains is still over the limit
|
|
403
|
+
(`_drop_note`, `hooks/tezgah_context.py::_drop_note`); the drop is logged to `~/.cache/tezgah/context-drops.log`, truncated
|
|
404
|
+
to its last 200 lines (`hooks/tezgah_context.py::log_drop`). Its row says
|
|
405
|
+
`kind=omitted`. One block shrinks before it goes. The per-turn relevant lessons
|
|
406
|
+
keep their first lesson (`SHRINK`, `hooks/tezgah_context.py::SHRINK`), a row that says
|
|
407
|
+
`kind=truncated`. The budget drops them only when that still does not fit. The
|
|
408
|
+
session remembers only the lessons a turn still shows.
|
|
409
|
+
|
|
410
|
+
## Source of truth
|
|
411
|
+
|
|
412
|
+
- `hooks/tezgah_policy.py` — `CORE`, `CONDITIONAL_KEYS`, `POINTERS`, `PROMPT_REMINDER`, and the long-form blocks they are built from
|
|
413
|
+
- `hooks/tezgah_context.py` — `CORE_RULES`, `PROMPT_HINTS`, `classify_prompt`, `core_split`, `core_for`, `always_on_core`, `subagent_core`, `BRIEF_SENTENCES`, `armed_again`, `ARMED_RESURFACE`, `user_constraints`, `constraint_lines`, `context_for`, `repo_marks`, `CONTEXT_BUDGET`, `DROP_ORDER`, `budgeted`, `log_drop`
|
|
414
|
+
- `hooks/tezgah_paths.py` — `OFF_DIRS`, `off()`, the ponytail level path; `bin/tezgah-setup` — `install_common`, `opencode_contract`, `refresh_contract`, the omp `RULES.md` writer, `--refresh`; `bin/tezgah-adhd` — the CLI that writes the `adhd-off` switch
|
|
415
|
+
- `skills/tezgah-contract/SKILL.md` — the on-demand full contract; `output-styles/tezgah.md` — Claude's always-on duplicate of the core
|
|
416
|
+
- `tests/test_context.py`, `tests/test_setup.py`, `tests/test_skills.py` — the label, kill-switch, budget and mirror tests
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Environment variables
|
|
2
|
+
|
|
3
|
+
Every environment variable tezgah reads, in one table per concern: what reads it,
|
|
4
|
+
what it defaults to, and what setting it changes. For someone pinning an install
|
|
5
|
+
in CI, repointing an endpoint in a test, or wondering why a hook ignores the
|
|
6
|
+
Python on PATH. A variable not on this page is not read by tezgah; one read by a
|
|
7
|
+
host and only passed through (such as `HOME` or `PATH`) is left out.
|
|
8
|
+
|
|
9
|
+
Nothing loads a `.env` file: a variable reaches tezgah only through the
|
|
10
|
+
environment of the process that started it - the shell, the host, or the host's
|
|
11
|
+
hook runner. A hook's environment is fixed when the host starts it, so a change
|
|
12
|
+
takes effect in the next session, not the running one.
|
|
13
|
+
|
|
14
|
+
The per-flag installer reference is in [operations](operations.md#installer-flags);
|
|
15
|
+
the kill switches are files, not variables, and live in
|
|
16
|
+
[contract](contract.md).
|
|
17
|
+
|
|
18
|
+
## Install, upgrade and packaging
|
|
19
|
+
|
|
20
|
+
| Variable | Read by | Default | Effect |
|
|
21
|
+
|---|---|---|---|
|
|
22
|
+
| `TEZGAH_PREFIX` | `packaging/install.sh:26`, `packaging/upgrade.sh`, `packaging/install.ps1`, `bin/tezgah-setup::default_prefix` | `$XDG_DATA_HOME/tezgah`, else `%LOCALAPPDATA%\tezgah` on Windows, else `~/.local/share/tezgah` | Where the artifact install unpacks its versions and the `current` link; `tezgah-setup` treats it as the install prefix. |
|
|
23
|
+
| `TEZGAH_VERSION` | `packaging/install.sh`, `packaging/upgrade.sh`, `packaging/install.ps1`, `packaging/build.sh:70` | the newest GitHub release; `build.sh` falls back to `VERSION`/the CHANGELOG | The version to install, or the version `build.sh` stamps when `--version` is not given. |
|
|
24
|
+
| `TEZGAH_REPO` | `packaging/install.sh:12`, `packaging/upgrade.sh`, `packaging/install.ps1` | `r1z4x/tezgah` | The GitHub repository releases are fetched from. |
|
|
25
|
+
| `TEZGAH_UPDATE_URL` | `hooks/tezgah_update.py` | `https://github.com/<TEZGAH_REPO>/releases/latest` | Where the daily release check reads the newest tag: from the redirect, or from a JSON body's `tag_name`. Tests point it at a `file://` fixture. |
|
|
26
|
+
| `TEZGAH_UPDATE_CHECK` | `hooks/tezgah_update.py` | unset | `0` turns off the update chip and the daily check. The test suite sets it, so no test reaches the network. |
|
|
27
|
+
| `TEZGAH_DIST` | `packaging/upgrade.sh:74`, `packaging/install.ps1` | unset: the release URL | A directory holding `tezgah-<V>.tar.gz` and its `.sha256` (what `build.sh --out` writes) used instead of the release download; CI exercises the real fetch-verify-unpack path with it. |
|
|
28
|
+
| `TEZGAH_GH` | `packaging/upgrade.sh` | `gh` on PATH | The `gh` that checks the tarball's build provenance (`gh attestation verify`). A path that does not exist reads as no `gh`: the upgrade prints `provenance not checked` and goes on. Tests point it at a stand-in. |
|
|
29
|
+
| `TEZGAH_NO_DEPS` | `bin/tezgah-setup::main` | unset | Any value but empty or `0` is `--no-deps`: the optional tools (codegraph, orx, host CLIs) are not installed. |
|
|
30
|
+
| `TEZGAH_NO_SYMLINK` | `bin/tezgah-setup::symlinks_refused` | unset | Any value but empty or `0` writes the copy layout a machine without symlinks gets, on a machine that has them. |
|
|
31
|
+
| `TEZGAH_PYTHON` | `hooks/tezgah_paths.py::python_cmd`, `bin/tezgah.js`, `bin/tezgah-dsh.cmd`, `hooks/hooks.json`, `hosts/*/hooks.json`, `hosts/omp/tezgah-hook.ts.in`, `hosts/opencode/plugins/tezgah.js`, `packaging/build.sh` | this process's interpreter, then `python3`/`python`/`py` on PATH | The interpreter every host hook and the npm shim start; pin it when the right Python is not first on PATH. |
|
|
32
|
+
|
|
33
|
+
## Where tezgah and the hosts keep state
|
|
34
|
+
|
|
35
|
+
| Variable | Read by | Default | Effect |
|
|
36
|
+
|---|---|---|---|
|
|
37
|
+
| `TEZGAH_ROOTS` | `hooks/tezgah_paths.py::roots`, `bin/tezgah-setup`, `hosts/opencode/plugins/tezgah.js` | `roots` in `~/.config/tezgah/config.json`, else `~/Projects` | The directories tezgah is armed over, `os.pathsep`-separated (`;` on Windows, the opencode plugin included); it outranks the config file. |
|
|
38
|
+
| `XDG_CONFIG_HOME` | `hooks/tezgah_paths.py::CONFIG_DIR`, `bin/tezgah-doctor`, `bin/tezgah-dsh.cmd`, `hosts/opencode/plugins/tezgah.js` | `~/.config` | Parent of tezgah's config dir (kill switches, `bin/` links, config) and of opencode's. |
|
|
39
|
+
| `XDG_DATA_HOME` | `bin/tezgah-setup::default_prefix`, `packaging/install.sh`, `packaging/upgrade.sh` | `~/.local/share` | Parent of the default install prefix. |
|
|
40
|
+
| `XDG_CACHE_HOME` | `hooks/tezgah_apps.py::ARTIFACTS` | `~/.cache` | Parent of the app-analysis artifact dir. |
|
|
41
|
+
| `TEZGAH_DEBUG` | `hooks/tezgah_guard.py` | unset | `1` makes every hook process append one line to `<cache>/debug.log` (host, script, each guarded call's outcome or exception class, elapsed ms; no prompt or tool text), created 0600 and swept by `tezgah-doctor --clean`. Off, it costs one environment read. |
|
|
42
|
+
| `TEZGAH_FALLBACK_CACHE` | `hooks/tezgah_paths.py::fallback_cache` | `<tempdir>/tezgah` | The cache a sandboxed hook writes when its normal cache dir is denied; a test knob. |
|
|
43
|
+
| `TEZGAH_ARTIFACTS` | `hooks/tezgah_apps.py::ARTIFACTS` | `$XDG_CACHE_HOME/tezgah/apps` | Where `analyze-app` screenshots, traces and tree dumps land. |
|
|
44
|
+
| `TEZGAH_NO_EXCLUDE` | `hooks/tezgah_agents.py::ensure_exclude` | unset | `1` stops tezgah adding its generated-agent dirs to the repository's `.git/info/exclude`. |
|
|
45
|
+
| `CODEX_HOME` | `hooks/tezgah_paths.py::HOST_DIRS` | `~/.codex` | The Codex home tezgah installs into and checks; the same variable Codex itself reads. |
|
|
46
|
+
| `DSH_HOME` | `hooks/tezgah_paths.py::HOST_DIRS`, `bin/tezgah-dsh`, `bin/tezgah-dsh.cmd` | `~/.dsh` | The dsh home tezgah installs into, and where `tezgah-dsh` looks for the CLI. |
|
|
47
|
+
| `TEZGAH_OPENCODE_DATA` | `bin/tezgah-setup::OPENCODE_DATA`, `bin/tezgah-doctor` | `~/.local/share/opencode` | opencode's data dir: its session database for `tezgah-doctor` and the installer. |
|
|
48
|
+
|
|
49
|
+
## Which binary runs
|
|
50
|
+
|
|
51
|
+
| Variable | Read by | Default | Effect |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| `TEZGAH_CODEGRAPH_BIN` | `hooks/tezgah_paths.py::codegraph_bin` | the config file, then `codegraph` on PATH | The codegraph executable the index and the graph marks use. |
|
|
54
|
+
| `TEZGAH_ORX_BIN` | `hooks/tezgah_paths.py::orx_bin` | `orx` on PATH | The OpenResearch CLI the research rule routes to. |
|
|
55
|
+
| `TEZGAH_OMP_BIN` | `hooks/tezgah_paths.py::omp_bin` | `omp` on PATH | The omp binary the installer, the model table and consult's session-model lookup run. |
|
|
56
|
+
| `TEZGAH_CLAUDE_BIN` | `claude_bin`, `hooks/tezgah_paths.py::claude_bin` | `claude` on PATH | The Claude Code CLI `--install` registers the plugin with (`claude plugin`); the test suite points it at a path that does not exist. |
|
|
57
|
+
| `TEZGAH_DSH_BIN` | `bin/tezgah-setup::reconcile_json_servers` | the profile-local entry, then `bin/tezgah-dsh`, then npx | How the installer invokes the dsh CLI. |
|
|
58
|
+
| `TEZGAH_INDEX_BIN` | `bin/tezgah-dsh:19`, `bin/tezgah-dsh.cmd` | `~/.config/tezgah/bin/tezgah-index` | The index worker `tezgah-dsh` warms before it starts dsh. |
|
|
59
|
+
| `TEZGAH_STATUS_BIN` | `hosts/dsh/statusline/lib/index.js:24`, `hosts/opencode/tui/tezgah-tui.tsx` | `~/.config/tezgah/bin/tezgah-status` | The status renderer the dsh status line and the opencode TUI call. |
|
|
60
|
+
| `TEZGAH_CONSULT_CLIS` | `hooks/tezgah_paths.py::consult_options` | unset: every agent CLI on PATH counts | Comma list of the agent CLIs that may count as consult members (empty: none); pins the answer in tests and CI. |
|
|
61
|
+
|
|
62
|
+
## Index worker
|
|
63
|
+
|
|
64
|
+
| Variable | Read by | Default | Effect |
|
|
65
|
+
|---|---|---|---|
|
|
66
|
+
| `TEZGAH_INDEX_TIMEOUT` | `hooks/tezgah_index.py::RUN_TIMEOUT` | `600` (seconds) | How long one index attempt may run before its process group is killed. Must be a number. |
|
|
67
|
+
| `TEZGAH_INDEX_RETRIES` | `hooks/tezgah_index.py::RETRIES` | `5` | Attempts the detached index worker makes. Must be an integer. |
|
|
68
|
+
| `TEZGAH_INDEX_RETRY_DELAY` | `hooks/tezgah_index.py::DELAY` | `3` (seconds) | The pause between attempts. Must be a number. |
|
|
69
|
+
|
|
70
|
+
## Model credentials and endpoints
|
|
71
|
+
|
|
72
|
+
| Variable | Read by | Default | Effect |
|
|
73
|
+
|---|---|---|---|
|
|
74
|
+
| `TYPESAFE_API_KEY` | `hooks/tezgah_judge.py::key`, `hooks/tezgah_paths.py` | `~/.config/typesafe/key` | The judgement seam's first credential; omp also reads it for its own judge. |
|
|
75
|
+
| `OPENROUTER_API_KEY` | `hooks/tezgah_judge.py::openrouter_key`, `bin/consult`, `bin/codegen`, `hooks/tezgah_models.py` | `~/.config/openrouter/key` | The seam's chat fallback, consult's and codegen's `openrouter` provider, and omp's `any` family. |
|
|
76
|
+
| `DEEPSEEK_API_KEY`, `INCEPTION_API_KEY` | `bin/consult`, `bin/codegen`, `hooks/tezgah_replay.py::label_model` | `~/.config/deepseek/key`, `~/.config/inception/key` | The `deepseek` and `inception` providers of consult and codegen; `DEEPSEEK_API_KEY` alone is also the replay sheet's `--provider deepseek` rater. |
|
|
77
|
+
| `ANTHROPIC_OAUTH_TOKEN`, `ANTHROPIC_API_KEY`, `ZAI_API_KEY` | `hooks/tezgah_models.py::OMP_AUTH` | omp's own auth store | Read as presence only: whether omp can run the `anthropic` or `zai` model family, so the model table can pick a row omp will run. |
|
|
78
|
+
| `TEZGAH_TYPESAFE_URL` | `hooks/tezgah_judge.py::endpoint` | `https://api.typesafe.ai/v1/systemone` | Repoints the seam's TypeSafe endpoint (tests). Plain `http` is refused unless the host is this machine; a cross-host redirect is refused. |
|
|
79
|
+
| `TEZGAH_OPENROUTER_URL` | `hooks/tezgah_judge.py::openrouter_url` | OpenRouter's chat-completions URL | Repoints the seam's chat fallback (tests). Plain `http` is refused unless the host is this machine. |
|
|
80
|
+
| `TEZGAH_DEEPSEEK_URL` | `hooks/tezgah_replay.py::_deepseek` | `https://api.deepseek.com/chat/completions` | Repoints the replay sheet's `--provider deepseek` rater (tests). Plain `http` is refused unless the host is this machine. |
|
|
81
|
+
| `TEZGAH_JUDGE_MODEL` | `hooks/tezgah_judge.py::fallback_model` | the cheap `any` row of the models table | The model the seam's chat fallback asks. |
|
|
82
|
+
|
|
83
|
+
## consult and codegen
|
|
84
|
+
|
|
85
|
+
| Variable | Read by | Default | Effect |
|
|
86
|
+
|---|---|---|---|
|
|
87
|
+
| `CONSULT_URL` | `bin/consult::endpoint` | the provider's URL | Repoints every HTTP member. Plain `http` is refused unless the host is this machine (failure class `plain-http`); the bearer token is dropped on a redirect to another host. |
|
|
88
|
+
| `CONSULT_MODELS` | `bin/consult::defaults` | the provider's default list | Comma list of `openrouter` models for the panel. |
|
|
89
|
+
| `CONSULT_JUDGE` | `bin/consult::main` | the recorded referee, else an available member outside the panel | The member that referees, after `--judge`. With none outside the panel a panel member referees and the run prints a note. |
|
|
90
|
+
| `CONSULT_SEED` | `bin/consult::referee_packet` | unset (a fresh shuffle) | Fixes the shuffled order of the anonymised answers the referee reads (tests). |
|
|
91
|
+
| `CONSULT_SESSION_MODEL` | `bin/consult::session_model` | omp's own record of the session model, read only on omp (`OMPCODE`) | The model this session runs on, so the panel skips it. |
|
|
92
|
+
| `OMPCODE`, `CLAUDECODE` | `bin/consult::own_cli` | set by the host | Names the calling host's own CLI, so consult does not ask the session to second-guess itself (omp sets both; `OMPCODE` wins). `OMPCODE` is also what lets consult read omp's session model. |
|
|
93
|
+
| `CODEGEN_URL` | `bin/codegen::ask` | the provider's URL | Repoints codegen's endpoint. Plain `http` is refused unless the host is this machine (`127.0.0.1`, `localhost`); a redirect to another host is refused. |
|
|
94
|
+
| `CODEGEN_MODEL` | `bin/codegen::MODEL` | the cheap `any` row of the models table | The model codegen drafts with. |
|
|
95
|
+
|
|
96
|
+
## Status line
|
|
97
|
+
|
|
98
|
+
| Variable | Read by | Default | Effect |
|
|
99
|
+
|---|---|---|---|
|
|
100
|
+
| `NO_COLOR` | `hooks/tezgah_context.py::color_default`, `hosts/omp/tezgah-hook.ts.in` | unset | Any value renders the status line without ANSI colour. |
|
|
101
|
+
| `TEZGAH_STATUS_COLOR` | `hooks/tezgah_context.py::color_default`, `hosts/omp/tezgah-hook.ts.in` | unset | `0` is the same opt-out as `NO_COLOR`, for tezgah alone. |
|
|
102
|
+
| `TEZGAH_STATUS_ANIMATE` | `hosts/omp/tezgah-hook.ts.in:65` | unset (animated) | `0` keeps omp's status colours and drops the motion. |
|
|
103
|
+
| `TEZGAH_STATUS_HOST` | `statusline.py::HOST` | `claude` | `cursor` renders for Cursor (the same as `--cursor`). |
|
|
104
|
+
| `TEZGAH_STATUS_LEGEND` | `statusline.py:127` | unset | `1` prints the mark legend under the line. |
|
|
105
|
+
|
|
106
|
+
## Set by tezgah or the host, not by a user
|
|
107
|
+
|
|
108
|
+
| Variable | Read by | Default | Effect |
|
|
109
|
+
|---|---|---|---|
|
|
110
|
+
| `TEZGAH_SESSION` | `bin/tezgah-status::main`, `bin/tezgah-docs`, `bin/tezgah-route`, `bin/tezgah-triage`, `hosts/omp/tezgah-hook.ts.in` | unset; the omp hook exports it to its shells | The session id `tezgah-docs`, `tezgah-route` and `tezgah-triage` write their ledger rows under, and the id `tezgah-status` lights its "used" marks from when none is passed. |
|
|
111
|
+
| `TEZGAH_CORE_IN_FILE` | `hooks/projects-auto-init.py::core_is_in_a_file`, `hooks/hooks.json` | unset | `1` (set by the Claude plugin's hook rows) drops the core rules from the injection when the host's static file really carries the tezgah block; a file without it falls back to the hook. |
|
|
112
|
+
| `TEZGAH_NESTED` | `hooks/tezgah_integrity.py::_shape_block`, `bin/consult` | unset | Set by consult on the agent CLIs it runs: that session's Stop rule does not fire. |
|
|
113
|
+
| `TEZGAH_CALL_OUTCOME` | `hooks/projects-posttooluse.py::main`, `hosts/dsh/hooks.json` | unset | `none` (dsh's Task rows) records the call's outcome as unknown instead of as a pass. |
|
|
114
|
+
| `CLAUDE_PROJECT_DIR` | `hooks/projects-auto-init.py::main` | the process cwd | The project dir when the hook payload carries no `cwd`. |
|
|
115
|
+
| `PLAYWRIGHT_BROWSERS_PATH`, `LOCALAPPDATA` | `hooks/tezgah_apps.py::_browser_caches`, `bin/tezgah-setup::default_prefix` (`LOCALAPPDATA` only) | Playwright's own cache dirs | Where `analyze-app` looks for an installed browser before it reports one missing; on Windows `LOCALAPPDATA` is also the parent of the default install prefix. |
|
|
116
|
+
|
|
117
|
+
## Test knob
|
|
118
|
+
|
|
119
|
+
| Variable | Read by | Default | Effect |
|
|
120
|
+
|---|---|---|---|
|
|
121
|
+
| `TEZGAH_E2E_STRICT` | `tests/e2e_*.py`, `.github/workflows/ci.yml` | unset (a missing prerequisite is a SKIP) | `1` turns an end-to-end script's SKIP into a FAIL; CI sets it. |
|
|
122
|
+
|
|
123
|
+
## Debugging
|
|
124
|
+
|
|
125
|
+
| Variable | Read by | Default | Effect |
|
|
126
|
+
|---|---|---|---|
|
|
127
|
+
| `TEZGAH_DEBUG` | `hooks/tezgah_guard.py` | unset (off) | Any value but empty or `0` makes every hook process append one line to `<cache>/debug.log` (created 0600): `<epoch> host=<codex\|cursor\|omp\|claude/dsh> script=<entry script> calls=<core fn>:<answer\|none\|ExceptionClass>,... ms=<elapsed>`. `answer` means the core returned something (a deny reason, a context block, a block decision). No prompt or tool text is written. Off, it costs one environment read. `tezgah-doctor --clean` removes the file once it has gone untouched for `--retention-days` (default 30). |
|
|
128
|
+
|
|
129
|
+
## Source of truth
|
|
130
|
+
|
|
131
|
+
`hooks/tezgah_paths.py`, `hooks/tezgah_judge.py`, `hooks/tezgah_models.py`,
|
|
132
|
+
`hooks/tezgah_index.py`, `hooks/tezgah_apps.py`, `hooks/tezgah_agents.py`,
|
|
133
|
+
`hooks/tezgah_context.py`, `hooks/tezgah_integrity.py`,
|
|
134
|
+
`hooks/projects-auto-init.py`, `hooks/projects-posttooluse.py`, `statusline.py`,
|
|
135
|
+
`bin/tezgah-setup`, `bin/consult`, `bin/codegen`, `bin/tezgah-status`,
|
|
136
|
+
`bin/tezgah-doctor`, `bin/tezgah-dsh`, `bin/tezgah.js`, `packaging/install.sh`,
|
|
137
|
+
`packaging/upgrade.sh`, `packaging/install.ps1`, `packaging/build.sh`,
|
|
138
|
+
`hosts/omp/tezgah-hook.ts.in`, `hosts/opencode/plugins/tezgah.js`,
|
|
139
|
+
`hosts/dsh/statusline/lib/index.js`. The list was taken by searching the shipped
|
|
140
|
+
code for `os.environ`, `getenv`, `process.env`, `$env:` and `${...}` reads; re-run
|
|
141
|
+
that search after adding a variable and add its row here.
|