@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
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
# Operations: install, upgrade, repair
|
|
2
|
+
|
|
3
|
+
This is the operator's page: how to arm tezgah, prove each
|
|
4
|
+
[host](glossary.md#host) is wired, and what to check first when one is not.
|
|
5
|
+
`bin/tezgah-setup` is the one entry point; what a host receives is
|
|
6
|
+
[hosts.md](hosts.md), what a session is told is [contract.md](contract.md), and
|
|
7
|
+
every environment variable the installer and the hooks read is
|
|
8
|
+
[environment.md](environment.md).
|
|
9
|
+
|
|
10
|
+
## Installer flags
|
|
11
|
+
|
|
12
|
+
The parser's own arguments (`bin/tezgah-setup::main`); a bare run with no
|
|
13
|
+
argument prints the wizard on a terminal and the report on a pipe (`bin/tezgah-setup::report`).
|
|
14
|
+
Lines below are of `bin/tezgah-setup`; the early branches (`bin/tezgah-setup::main`) return
|
|
15
|
+
before an install is considered.
|
|
16
|
+
|
|
17
|
+
| Flag | What it does |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `--install` | Arm the `--hosts` (default: every detected host): writes `~/.config/tezgah/config.json`, the contract hash, the `~/.config/tezgah/bin` symlinks and every host file, then prints the report. Installs the missing optional tools first unless `--no-deps`; third-party host CLIs (cursor-agent, pnpm, dsh) only with `--host-deps`, otherwise their exact install command is printed. Exits 1 when a requested tool is still missing, naming the cause (`installer failed with exit N`, or `exited 0 but not on PATH`) (`bin/tezgah-setup::main`, `bin/tezgah-setup::install_all`, `bin/tezgah-setup::install_deps`). It also exits 1 when a planned host is left unarmed, and names it under `not armed:`. Only the arming rows count: hooks wired, the contract current, and the row a host's own CLI arms where that CLI exists: omp's extension row with an omp CLI, Claude's `plugin copy current` with a `claude` CLI. Codex `hooks trusted` and the provider-key rows stay out, because a correct fresh install leaves them MISS (`ARMING_ROWS`, `arming_miss()`). A host config that does not parse as a JSON object is refused: the run names the file and the parse error, never writes it, and exits 1 (`read_config()`); tezgah's own `config.json` is refused the same way. Claude is registered through its own CLI (`register_claude_plugin()`): the run renders `.claude-plugin/{plugin,marketplace}.json` from the release version into the tree it runs from (untracked; a pair under another marketplace name is kept), runs `claude plugin marketplace add <tree>` (a directory source pinned to that tree) and `claude plugin install tezgah@tezgah-local`, and skips both when any `tezgah@*` row is already in `installed_plugins.json`, because a second row fires every hook twice. `--reply-lang tr|en|any` stores `reply_lang` in `config.json`; without it the stored value stays, and a config with none reads as `tr`. |
|
|
20
|
+
| `--wizard` | Ask the install questions and write only after the final yes; the other flags supply the defaults, so `--wizard --hosts omp` asks only the rest (`bin/tezgah-setup::wizard`). |
|
|
21
|
+
| `--report` | Print what is armed, per host, and stop (`bin/tezgah-setup::main`, `bin/tezgah-setup::report`). |
|
|
22
|
+
| `--report --live` | Proves the hooks run, not only that they are written (audit Phase 1.2). For each host, one synthetic PostToolUse (`true`) goes through that host's own wiring: the command in `~/.codex/hooks.json`, `~/.cursor/hooks.json`, the enabled Claude plugin copy's `hooks/hooks.json` (with `CLAUDE_PLUGIN_ROOT`), the hooks.json named by dsh's `cordis.patch.yml`; the opencode plugin is imported with node the way opencode imports it; the omp extension `.ts` is loaded with node `--experimental-strip-types` after checking it is in omp's `extensions` list. A ledger row for a dedicated `tezgah-live-<pid>-<ms>` session must appear; the event runs against a throwaway root (`TEZGAH_ROOTS`) and every cache file named for that session is deleted afterwards. A second probe per host proves the gate: one PreToolUse for `git commit --no-verify -m x` through the same wiring must come back as that host's deny (Claude, Codex and dsh `permissionDecision: deny`, Cursor `permission: deny`, omp `block: true`, opencode a throw) and leave a `deny` row in the ledger; under `pretooluse-off` or `verify-off` it reads UNVERIFIED and names the switch (`live_probe()`, `LIVE_DENY_COMMAND`). The omp bridge must also match a fresh render byte for byte, from the renderer the install writes with (`omp_bridge()`). Rows read `ok live <host>` / `ok live <host> deny`, `MISS live <host>: <cause>` (no tezgah command in the host file, the command wrote no row, no deny envelope or no deny row, a hand-edited omp bridge, Codex does not trust tezgah's group) or `UNVERIFIED live <host>: <why>` (node missing or older than 22.6, the omp CLI did not answer, a switch that stands the refusal down). It exits 1 when any host is MISS; UNVERIFIED never fails the run and is never shown as ok. No model is called. |
|
|
23
|
+
| `--refresh` | Re-render every always-on contract artifact of the armed hosts - the managed blocks of `CLAUDE.md`, Codex's `AGENTS.md` and omp's `RULES.md`, opencode's contract and skill routers - after a policy edit or a kill switch; prints the paths it refreshed, else `contract is current`. Before the first install there is no hash record, so it changes nothing (`refresh_contract`, `bin/tezgah-setup::refresh_contract`). |
|
|
24
|
+
| `--uninstall` | Remove everything tezgah installed — per host the wiring it wrote, plus (a full run) the Claude plugin copy with its registry rows, the generated config state, the kill switches, the caches and the versioned install tree — then verify the removal; nonzero exit while anything tezgah wrote survives (`bin/tezgah-setup::verify_uninstall`, `bin/tezgah-setup::uninstall`). |
|
|
25
|
+
| `--adopt` | Move pre-tezgah wiring aside instead of deleting it; alone it stops there, with `--install` it runs first (`bin/tezgah-setup::main`, `bin/tezgah-setup::adopt`). |
|
|
26
|
+
| `--sync` | Copy this checkout over every installed Claude plugin [copy](glossary.md#plugin-copy) (`bin/tezgah-setup::sync`). Each copy is built in a staging tree beside the plugin cache and swapped in with two renames, its `.git` carried over, so a failed or killed sync leaves the previous copy whole (`bin/tezgah-setup::_swap`). Every copied file is 0644, or 0755 when the tree marks it executable, whatever mode the source has (`bin/tezgah-setup::_copy_normalised`). |
|
|
27
|
+
| `--hook-entries` | Print, as JSON, the tezgah-owned hook entries this tree arms per armed host - what `tezgah update` asks the new tree for (`bin/tezgah-setup::hook_entries`). |
|
|
28
|
+
| `--status [PATH]` | Print the armed/used checklist for PATH (default cwd) and stop — the same line as `bin/tezgah-status` (`bin/tezgah-setup::main`, `hooks/tezgah_context.py::health_lines`). It also prints the report's `config.json hosts (...) match the hosts wired (...)` row when the recorded list and the wiring on disk disagree (`hosts_row`), and nothing when they agree: install health is checked here, not only in a full report. |
|
|
29
|
+
| `--agents [PATH]` | Regenerate PATH's per-repo subagent set (default cwd); outside a [root](glossary.md#root) it prints `no agents generated` (`bin/tezgah-setup::main`). |
|
|
30
|
+
| `--write-manifest` | Regenerate the tracked `MANIFEST` from `git ls-files` and stop — the release step, its only writer, and it says so on a tree with no `.git` rather than writing an empty listing (`bin/tezgah-setup::write_manifest`, `bin/tezgah-setup::plugin_files`). |
|
|
31
|
+
| `--write-plugin-agents` | Re-render the plugin's tracked `agents/*.md` from the role bodies `hooks/tezgah_agents.py` generates per repo, and stop — the release step that keeps the shipped reviewer from drifting from the generated one; `tests/test_agents.py` fails until it has run (`write_plugin_agents`, `plugin_agents`). |
|
|
32
|
+
| `--deps` | Install the missing optional tools and stop; with `--install` the install already does it. Like `--install` and `--enable`, it exits 1 when a requested tool is still missing (`bin/tezgah-setup::main`). |
|
|
33
|
+
| `--host-deps` | With `--install` or `--deps`, also install the missing third-party host CLIs (cursor-agent, pnpm, dsh). They are opt-in because each one is a vendor `curl \| sh` that uninstall does not take back. Every installer runs with a 600 s timeout, each `curl` with `--max-time 300` and each pipeline under `pipefail`, so a stalled or refused download fails instead of hanging or reading as success (audit M-9). |
|
|
34
|
+
| `--mcp-schemas` | Measure the MCP tool-schema band by asking each registered server (`initialize` + `tools/list`) and stop (`bin/tezgah-setup::main`, `bin/tezgah-setup::mcp_schema_report`). |
|
|
35
|
+
| `--no-deps` | Skip the optional-tool install; `TEZGAH_NO_DEPS` is the same switch for CI (`bin/tezgah-setup::main`, `bin/tezgah-setup::install_deps`). |
|
|
36
|
+
| `--devtools` | Also wire the optional Chrome DevTools MCP (`bin/tezgah-setup::DEVTOOLS_FEATURE`). |
|
|
37
|
+
| `--features` | Print every feature id with its default, its selection and its dependency state; an unmet one names why and the command that would satisfy it (`features_report`, `bin/tezgah-setup::features_report`). |
|
|
38
|
+
| `--enable ID[,ID]`, `--disable ID[,ID]` | Select or deselect features and persist the choice in `config.json`. An enable satisfies the named features' dependencies in the same run (an embedding id fetches and converts its model, see [below](#opt-in-embedding-relevance)); a disable runs no installer and removes only a file tezgah made for the row (`select_features`, `bin/tezgah-setup::select_features`). |
|
|
39
|
+
| `--dry-run` | Print what the optional-tool install would run, and run none of it (`bin/tezgah-setup::install_deps`). |
|
|
40
|
+
| `--prefix DIR` | Set the install prefix for this run: where a released artifact unpacks, and the second root a farm link may resolve into along with the checkout. It wins over `TEZGAH_PREFIX`, which wins over `$XDG_DATA_HOME/tezgah`, which wins over `~/.local/share/tezgah` (`bin/tezgah-setup::main`, `bin/tezgah-setup::INSTALL_PREFIX`). |
|
|
41
|
+
| `--upgrade [VERSION]` | Move the install tree to VERSION (default: the newest release): `packaging/upgrade.sh` fetches it, checksum-verifies it, checks its build provenance with `gh attestation verify` when `gh` is on PATH (and says `provenance not checked` when it is not), unpacks `<prefix>/<VERSION>` and flips `current`, then the installer re-runs **from the new tree** after the hook-entry change is printed; `--dry-run` prints every step and runs none (`bin/tezgah-setup::upgrade`). |
|
|
42
|
+
| `update` | `tezgah update [--dry-run]` moves this install to the newest release through the channel it came from, then re-arms the hosts from the new tree. A release prefix goes through `--upgrade`. A Homebrew keg runs `brew upgrade r1z4x/tezgah/tezgah`, an npm tree runs `npm install -g @r1z4x/tezgah@latest`, and a git checkout runs `git pull --ff-only` (`update()`, `hooks/tezgah_update.py`). Before re-arming it prints every tezgah hook entry the new tree adds, removes or changes, per host. Paths compare with the tree root taken out, so a move to the new release's own path is no change. A real change on a terminal waits for a yes; Enter is no. A piped run goes on without asking (decision 12; `hooks/tezgah_update.py::confirm_rearm`). A no exits 1 after the fetch and says what it left. A checkout or an npm package is replaced in place, and the prefix's `current` already points at the new tree, so there the hooks run the new code and only the changed entries wait. A Homebrew keg is new beside the old one, so hooks wired to the old keg's path run the old code until the re-arm (`NOT_REARMED`, `hooks/tezgah_update.py::NOT_REARMED`). |
|
|
43
|
+
| `--version` | Print the plugin version and exit (`bin/tezgah-setup::main`, `hooks/tezgah_context.py::version`). |
|
|
44
|
+
| `--roots R` | Set the roots for this install, `os.pathsep`-separated. Without `--install` it exits 1: `--roots only means something with --install` (`bin/tezgah-setup::main`). |
|
|
45
|
+
| `--hosts H` | Comma-separated subset of `claude,codex,opencode,cursor,dsh,omp`; an unknown name exits 1 before anything is written, and naming hosts switches off the re-detection that follows a tool install (`bin/tezgah-setup::main`, `bin/tezgah-setup::install_all`). |
|
|
46
|
+
| `-h`, `--help` | Usage and the list above (`bin/tezgah-setup::main`). |
|
|
47
|
+
|
|
48
|
+
A green `--report` says the wiring is on disk; `--report --live` says it ran. What it cannot cover is the host binary itself: it runs the command the host would run, not the host, so a host that refuses to load its own config (a Claude plugin disabled in the UI after the check, a dsh build whose bridge drops the event) still needs a real session to show.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## Install from the artifact
|
|
52
|
+
|
|
53
|
+
What a user receives is a release tarball, not this checkout:
|
|
54
|
+
`dist/tezgah-<version>.tar.gz` beside `dist/tezgah-<version>.tar.gz.sha256`,
|
|
55
|
+
built by `packaging/build.sh` from the tracked `MANIFEST` plus a generated
|
|
56
|
+
`VERSION`, both written into the payload (`packaging/build.sh:4`,
|
|
57
|
+
`packaging/build.sh:61`, `packaging/build.sh:137`). A version unpacks at
|
|
58
|
+
`<prefix>/<version>` and `<prefix>/current` is a symlink to the active one, so a
|
|
59
|
+
team can stay on one version and a rollback is one tree away: the older version is
|
|
60
|
+
never removed, and going back is
|
|
61
|
+
`ln -sfn <prefix>/<previous> <prefix>/current` (`packaging/upgrade.sh:9-11`,
|
|
62
|
+
`packaging/upgrade.sh:118-137`). The prefix is `~/.local/share/tezgah` unless
|
|
63
|
+
`TEZGAH_PREFIX` or `$XDG_DATA_HOME` says otherwise (`packaging/upgrade.sh:63`),
|
|
64
|
+
and `bin/tezgah-setup --prefix DIR` wins over both (`bin/tezgah-setup::INSTALL_PREFIX`).
|
|
65
|
+
A farm link counts as tezgah's when it resolves into the checkout **or** into the
|
|
66
|
+
install root, which is what keeps an upgrade from orphaning the wiring
|
|
67
|
+
(`is_tezgah_link()`, `bin/tezgah-setup::is_tezgah_link`).
|
|
68
|
+
|
|
69
|
+
| Step | Command |
|
|
70
|
+
|---|---|
|
|
71
|
+
| first install, POSIX | `curl -fsSL https://raw.githubusercontent.com/r1z4x/tezgah/v<version>/packaging/install.sh \| sh -s -- --version <version>` |
|
|
72
|
+
| from a tarball you hold | unpack it, then `sh packaging/install.sh --version <version>` — it finds `upgrade.sh` beside itself (`packaging/install.sh:30-32`) |
|
|
73
|
+
| first install, Windows | `$env:TEZGAH_VERSION = '<version>'; irm https://raw.githubusercontent.com/r1z4x/tezgah/v<version>/packaging/install.ps1 \| iex` |
|
|
74
|
+
| upgrade | `tezgah update` (any channel), `bin/tezgah-setup --upgrade [VERSION]` from the installed tree, or `sh packaging/upgrade.sh --version X.Y.Z` |
|
|
75
|
+
|
|
76
|
+
`packaging/install.sh` is a bootstrap, never a second implementation: it runs
|
|
77
|
+
`packaging/upgrade.sh` — the one place a version is fetched, checksum-verified,
|
|
78
|
+
unpacked and made current — and then starts `bin/tezgah-setup --install` from the
|
|
79
|
+
tree that just became current (`packaging/install.sh:44-56`). `upgrade.sh`
|
|
80
|
+
compares the digest it fetched against the artifact before unpacking anything and
|
|
81
|
+
stops, printing both, on a mismatch (`packaging/upgrade.sh:88-96`). It then
|
|
82
|
+
checks the tarball's build provenance with `gh attestation verify` when `gh` is
|
|
83
|
+
on PATH. Without `gh` it prints `provenance not checked`, and a `gh` that cannot
|
|
84
|
+
answer is a warning: the checksum stays the gate.
|
|
85
|
+
`TEZGAH_DIST` points `upgrade.sh` and `install.ps1` at a directory holding
|
|
86
|
+
`tezgah-<version>.tar.gz` + `.sha256` instead of the release URL — the seam that
|
|
87
|
+
installs a locally built artifact with no published release, which is what CI
|
|
88
|
+
uses (`packaging/upgrade.sh:17-21`, `packaging/upgrade.sh:74-78`).
|
|
89
|
+
|
|
90
|
+
Windows goes through `packaging/install.ps1`, which assumes no `sh`, no `python3`
|
|
91
|
+
and no symlink privilege: it unpacks with the `tar.exe` that Windows 10 1803+
|
|
92
|
+
ships, materialises `current` as a directory junction, copies the tree where a
|
|
93
|
+
junction is refused, and starts the installer with the first of `py -3`,
|
|
94
|
+
`python`, `python3` it finds, passing `--prefix` on (`packaging/install.ps1:12-23`,
|
|
95
|
+
`packaging/install.ps1:128-163`). The installer knows both shapes of `current`
|
|
96
|
+
(`bin/tezgah-setup::running_prefix`). A junction answers to
|
|
97
|
+
`os.path.isjunction`, or to its reparse tag below Python 3.12. A copy is the
|
|
98
|
+
running tree at `<prefix>/current` with no `.git`, whose `VERSION` names a
|
|
99
|
+
version tree beside it. A checkout cloned as `current` is not a copy. So
|
|
100
|
+
`tezgah update` finds the release prefix and `--uninstall` removes it.
|
|
101
|
+
`--upgrade` on Windows runs `install.ps1 -NoInstall` in place of
|
|
102
|
+
`packaging/upgrade.sh` and then re-arms from the new tree. A missing `bash` (or
|
|
103
|
+
`powershell`) is a refusal that names it (`bin/tezgah-setup::upgrade`).
|
|
104
|
+
|
|
105
|
+
An unpacked tree lists itself without git. `plugin_files()` reads `git ls-files`
|
|
106
|
+
in a checkout and falls back to the tracked `MANIFEST` where there is no `.git`; a
|
|
107
|
+
missing or empty manifest answers `None`, which is what makes `--sync` refuse
|
|
108
|
+
instead of emptying a copy it cannot refill (`plugin_files()`,
|
|
109
|
+
`bin/tezgah-setup::plugin_files`). `MANIFEST` is written by `--write-manifest`, its
|
|
110
|
+
only writer, from the same filter the reader applies — `managed()` — so the
|
|
111
|
+
listing and its reader cannot disagree (`managed()`, `bin/tezgah-setup::managed`,
|
|
112
|
+
`write_manifest()`, `bin/tezgah-setup::write_manifest`). The payload also carries
|
|
113
|
+
`VERSION`, which is what a tree with no `.claude-plugin/` answers from
|
|
114
|
+
(`version()`, `hooks/tezgah_context.py::version`).
|
|
115
|
+
|
|
116
|
+
## A first install from a checkout
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
git clone https://github.com/r1z4x/tezgah.git ~/Projects/tezgah
|
|
120
|
+
cd ~/Projects/tezgah && bin/tezgah-setup --install
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`--install` arms every host it detects; the optional integrations belong to the
|
|
124
|
+
[README's Install section](../README.md#install). On a terminal the bare
|
|
125
|
+
`bin/tezgah-setup` is the wizard: it asks which hosts, the roots, whether to
|
|
126
|
+
install the missing optional tools (host CLIs only with `--host-deps`) and whether to wire the DevTools MCP, prints
|
|
127
|
+
the plan, and writes only after a yes (`bin/tezgah-setup::wizard`). A pre-tezgah setup is
|
|
128
|
+
named under `predecessor wiring still present` and retired by `--adopt`
|
|
129
|
+
(`bin/tezgah-setup::adopt`); narrow it with `--hosts omp`, `--roots ~/work:~/oss`, `--dry-run`.
|
|
130
|
+
|
|
131
|
+
An install from a checkout is a live symlink into that working tree, so a half-finished edit or a branch switch there crashes the sessions running on it (the `crash` ledger rows of 09-20..09-21 were names removed mid-edit) - do tezgah maintenance in a `git worktree`, never in the installed checkout.
|
|
132
|
+
|
|
133
|
+
The `~/.config/tezgah/bin` farm carries `tezgah-mcp` and `tezgah-design` beside the other CLIs; two are left out on purpose: `tezgah-dsh` is wired as `~/.local/bin/dsh` (`dsh_launcher`), and `tezgah-import-ai-research` is dev-time only (its docstring). The report's `config.json hosts (...) match the hosts wired (...)` row (`hosts_row`) reads `MISS` when the recorded host list differs from the hosts whose wiring is on disk; `--upgrade`, `--enable`/`--disable` and a full uninstall act on the recorded list, so the row only reports it - `--install --hosts ...` records the list you choose.
|
|
134
|
+
|
|
135
|
+
A successful run prints, in order: `dependencies:`, a line per missing optional
|
|
136
|
+
tool with the vendor command it runs — over the network, no sudo
|
|
137
|
+
(`bin/tezgah-setup::install_deps`) — or `all optional tools present` (the run is appended to
|
|
138
|
+
`~/.config/tezgah/install.log`, `bin/tezgah-setup::_dep_log`); `installing for: <hosts>`
|
|
139
|
+
(`bin/tezgah-setup::install_all`); the common block — config and roots, the contract sha, one `ok` line
|
|
140
|
+
per `~/.config/tezgah/bin` symlink, the app artifacts dir (`bin/tezgah-setup::install_common`);
|
|
141
|
+
`openresearch (orx):`, a line per host orx has a harness for (`bin/tezgah-setup::install_openresearch`); one
|
|
142
|
+
`ok` line per link or write inside each host's block (`bin/tezgah-setup::INSTALLERS` — a write that
|
|
143
|
+
met a real file in the way says so instead, `bin/tezgah-setup::link`); then the report and the
|
|
144
|
+
context budget table (`bin/tezgah-setup::report`, `bin/tezgah-setup::context_budget_report`). Its tail:
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
omp:
|
|
148
|
+
ok status line answers
|
|
149
|
+
context budget (always-on text; ~tokens = chars/4):
|
|
150
|
+
MCP tool schemas run --mcp-schemas to measure
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Verify: the report and `--status`
|
|
154
|
+
|
|
155
|
+
`--report` (or a piped bare run) answers one question per host: is it wired? It
|
|
156
|
+
prints the checkout, the roots and where they came from (`TEZGAH_ROOTS`, `config`
|
|
157
|
+
or `default`), a common block (config, the code-graph binary, the consult options, a codegen key,
|
|
158
|
+
`orx`, `npx`, the artifacts dir, `git`, the manifest, a stale-contract line), one
|
|
159
|
+
block per host, then the budget (`bin/tezgah-setup::report`). Each block is
|
|
160
|
+
`host_checks_<host>` (`bin/tezgah-setup::HOST_CHECKS`), and those rows are the source of truth for
|
|
161
|
+
"is this host armed" (`AGENTS.md:136-137`) — not the presence of a directory, and
|
|
162
|
+
not the status line. A row can read ` MISS ` too: claude's `plugin copy current`
|
|
163
|
+
row fails on a machine with no copy at all, because an absent copy is not a
|
|
164
|
+
current one (`bin/tezgah-setup::host_checks_claude`).
|
|
165
|
+
|
|
166
|
+
`--status [PATH]` answers a different question — which rules are in force in that
|
|
167
|
+
repo — as one line of marks rendered by the same code every status line uses
|
|
168
|
+
(`hooks/tezgah_context.py::health_lines`, `hooks/tezgah_context.py::render_line`). Mark meanings are in
|
|
169
|
+
[status-line.md](status-line.md); `bin/tezgah-status` is that checklist with
|
|
170
|
+
`--json`, `--legend` and `--observable=`. It carries the report's host-list row
|
|
171
|
+
too, from the same `hosts_row`, so the mismatch reaches the surface a session
|
|
172
|
+
checks its own health with. Two places deliberately do not: the status line's
|
|
173
|
+
marks are the armed/used checklist and are redrawn by a fresh process on every
|
|
174
|
+
host (omp re-renders per tool result), while "wired" is `HOST_CHECKS`, the
|
|
175
|
+
installer's own reading of six host files — a second reading of it in `hooks/`
|
|
176
|
+
would be the drift `AGENTS.md` names as the report's source of truth; and
|
|
177
|
+
`bin/tezgah-doctor` accounts for the bytes the hosts' stores hold and never reads
|
|
178
|
+
a host's config, so a wiring row there would belong to a different tool.
|
|
179
|
+
|
|
180
|
+
## Upgrading
|
|
181
|
+
|
|
182
|
+
The version lives in `.claude-plugin/plugin.json` when that untracked local
|
|
183
|
+
manifest is present, else in the newest `## [x.y.z]` heading of `CHANGELOG.md`
|
|
184
|
+
(`hooks/tezgah_context.py::version`); `.gitignore:16-19` is why it is not in the repository, and
|
|
185
|
+
`RELEASING.md:19-24` is how a release bumps it. A `--install` that registers
|
|
186
|
+
Claude renders the pair into its tree. The version comes from `VERSION` or that
|
|
187
|
+
heading, never from the pair itself. A pair the install rendered follows the
|
|
188
|
+
version when it moves.
|
|
189
|
+
|
|
190
|
+
An installed version moves with one command, and nothing moves it on tezgah's own
|
|
191
|
+
initiative: a session may not install, upgrade or restart tezgah's own
|
|
192
|
+
installation (`hooks/tezgah_policy.py::CORE`). `bin/tezgah-setup --upgrade
|
|
193
|
+
[VERSION]` runs `packaging/upgrade.sh --version V --prefix P`, then re-runs the
|
|
194
|
+
installer **from the new tree** — this process started from the old one, so its
|
|
195
|
+
farm links would point back into it — with the hosts and roots already in
|
|
196
|
+
`config.json`, so the install questions are not asked twice; the previous version
|
|
197
|
+
stays installed, so a rollback is a `current` flip (`upgrade()`,
|
|
198
|
+
`bin/tezgah-setup::upgrade`). It is the flag's only caller: no other flag
|
|
199
|
+
upgrades tezgah as a side effect of another. `--upgrade --dry-run` prints the
|
|
200
|
+
fetch, the flip and the re-arm and runs none of the three
|
|
201
|
+
(`bin/tezgah-setup::upgrade`).
|
|
202
|
+
|
|
203
|
+
The status line says when a newer release is out. A `↑X.Y.Z` chip sits beside
|
|
204
|
+
the logo, in the version's own group, on every surface (`notice_segments()`,
|
|
205
|
+
`hooks/tezgah_update.py`). A redraw only reads `~/.cache/tezgah/update.json`.
|
|
206
|
+
When that file is a day old, the redraw stamps it and starts one detached
|
|
207
|
+
check against the GitHub releases endpoint. An offline check writes nothing,
|
|
208
|
+
and the next day asks again. `tezgah update` is the command the chip points
|
|
209
|
+
at, and it is the only thing that moves the install. The
|
|
210
|
+
`~/.config/tezgah/update-check-off` switch stops both the check and the chip.
|
|
211
|
+
`tezgah` is also a farm link and a Homebrew name, so the command reads the same
|
|
212
|
+
on npm, Homebrew and a checkout.
|
|
213
|
+
The chip offers the public release to an install on any retired 0.x (0.1.0 to
|
|
214
|
+
0.33.0, `hooks/tezgah_update.py::RETIRED`), and reads `↑1.0.0 (line reset)`.
|
|
215
|
+
|
|
216
|
+
After a change to the contract text (`hooks/tezgah_policy.py`,
|
|
217
|
+
`hooks/tezgah_context.py`, `skills/tezgah-contract/SKILL.md`):
|
|
218
|
+
|
|
219
|
+
- `--install` re-renders every host file, the opencode contract and the skill
|
|
220
|
+
router, and rewrites `~/.config/tezgah/contract.sha256`, which holds one
|
|
221
|
+
`<sha> <path>` line per rendered artifact - the managed blocks of
|
|
222
|
+
`CLAUDE.md`, `AGENTS.md` and `RULES.md`, `opencode-contract.md` and the
|
|
223
|
+
`opencode-skills*.md` routers - rather than one hash over the sources
|
|
224
|
+
(`bin/tezgah-setup::record_shas`, `bin/tezgah-setup::contract_artifacts`).
|
|
225
|
+
- `--refresh` does that without a reinstall, for every armed host's static
|
|
226
|
+
block and not only opencode's (`refresh_contract`). opencode has no
|
|
227
|
+
session-start hook, so its plugin runs it once per session
|
|
228
|
+
(`hosts/opencode/plugins/tezgah.js:2633-2637`). Until 2026-10-02 it
|
|
229
|
+
re-rendered opencode's files alone and reset the one shared hash, so a rule
|
|
230
|
+
edit left the other static files stale while `--report` went green (audit
|
|
231
|
+
M-5).
|
|
232
|
+
- `--report` compares each artifact's bytes with a fresh render and prints
|
|
233
|
+
`always-on contract stale: <path>` for each one that differs; the
|
|
234
|
+
"carries the contract" rows make the same byte comparison.
|
|
235
|
+
- A global kill switch (`adhd-off`, `verify-off`, `spec-off`, `consult-off`,
|
|
236
|
+
`research-off`, `exec-mode.off`, `ponytail-auto.off`, `lang-off`,
|
|
237
|
+
`workspace-off`) removes its paragraph from the static files on the next
|
|
238
|
+
`--refresh` or `--install`; a per-repo `.no-*` mark leaves the global files
|
|
239
|
+
alone, because they serve every repository (audit L-1).
|
|
240
|
+
- `--sync` copies the checkout over the Claude plugin copy, because Claude Code
|
|
241
|
+
runs `~/.claude/plugins/cache/<owner>/tezgah/<version>/` and never this
|
|
242
|
+
checkout (`bin/tezgah-setup::sync`); `--install` refreshes a stale copy itself
|
|
243
|
+
(`bin/tezgah-setup::refresh_plugin_copy`). Then restart Claude — hooks are read once per session.
|
|
244
|
+
|
|
245
|
+
From the user's side a stale copy looks like this: Claude keeps applying the old
|
|
246
|
+
rules while `--report` shows ` MISS plugin copy current (every copied file
|
|
247
|
+
matches)`. That row compares a sha256 over every tracked file `sync` copies —
|
|
248
|
+
not the version number both trees report, and not a single file: a one-file hash
|
|
249
|
+
cannot see a change to another hook, which is how a gate change once left the
|
|
250
|
+
installed copy running the previous rules while `--install` printed `ok`
|
|
251
|
+
(`bin/tezgah-setup::plugin_copy_current`, `bin/tezgah-setup::tree_sha`). Recognising a copy
|
|
252
|
+
at all is still the presence of one file (`bin/tezgah-setup::plugin_copies`).
|
|
253
|
+
|
|
254
|
+
## Uninstall and adopt
|
|
255
|
+
|
|
256
|
+
`--uninstall` removes everything tezgah installed, then proves the removal. The
|
|
257
|
+
run is **full** when it covers every host `config.json` records as armed, and
|
|
258
|
+
**partial** otherwise (`uninstall()`, `bin/tezgah-setup::uninstall`). Both runs
|
|
259
|
+
take the host wiring back - the skill symlinks, hook entries, managed blocks,
|
|
260
|
+
MCP rows and status-line keys each host's own installer wrote
|
|
261
|
+
(`bin/tezgah-setup::UNINSTALLERS`), plus the farm links and the generated repo agent
|
|
262
|
+
files (`bin/tezgah-setup::remove_generated_state`, `bin/tezgah-setup::_marker_agents_files`). A link — or an entry the installer
|
|
263
|
+
materialised where a platform refuses symlinks — counts as tezgah's only when it
|
|
264
|
+
resolves inside this checkout or the install root, so a file you put in the same
|
|
265
|
+
place is kept (`is_tezgah_entry()`, `bin/tezgah-setup::is_tezgah_entry`), and
|
|
266
|
+
`~/.claude/settings.json` loses only the keys tezgah added
|
|
267
|
+
(`bin/tezgah-setup::unwire_claude_settings`).
|
|
268
|
+
|
|
269
|
+
A **full** run also takes everything the wiring was serving from:
|
|
270
|
+
|
|
271
|
+
- the Claude plugin copy under `~/.claude/plugins/cache` and its rows in
|
|
272
|
+
`installed_plugins.json` — the tree Claude actually runs and the registry row
|
|
273
|
+
that makes it keep loading both outlived every other removal, which is how an
|
|
274
|
+
uninstalled tezgah kept applying its rules (`remove_plugin_copies()`,
|
|
275
|
+
`bin/tezgah-setup::remove_plugin_copies`). A marketplace row sourced from a tezgah tree
|
|
276
|
+
goes with them once nothing else installs from it.
|
|
277
|
+
- the `~/.config/tezgah` generated state: config, contract hash, install log,
|
|
278
|
+
materialised ledger, the generated opencode files, and every kill switch —
|
|
279
|
+
the canonical ones with the dir, the legacy `~/.claude` ones by name
|
|
280
|
+
(`remove_generated_state()`, `bin/tezgah-setup::remove_generated_state`;
|
|
281
|
+
`sweep_legacy_switches()`, `bin/tezgah-setup::sweep_legacy_switches`).
|
|
282
|
+
- both state caches (`~/.cache/tezgah` and the sandbox fallback).
|
|
283
|
+
- the versioned install tree: every `<prefix>/<version>` carrying
|
|
284
|
+
`bin/tezgah-setup` plus the `current` flip (`remove_install_tree()`,
|
|
285
|
+
`bin/tezgah-setup::remove_install_tree`).
|
|
286
|
+
|
|
287
|
+
Kept in every run: the user's own files, every `.tezgah-bak` backup
|
|
288
|
+
outside the config dir (the timestamped ones too), `~/.config/tezgah/adopted/` (the only copy of the
|
|
289
|
+
predecessor wiring adopt moved aside), and every repository's `.tezgah/`
|
|
290
|
+
research state. A **partial** run also keeps config.json and the install tree,
|
|
291
|
+
because the hosts still armed read both at runtime, and says so. It also leaves
|
|
292
|
+
the gate armed: only a full run writes `pretooluse-off` while it removes the
|
|
293
|
+
hooks. A partial run used to write it too and never take it back, so the hosts
|
|
294
|
+
still armed lost the whole gate (audit H-2, ENV-01). The orx skill
|
|
295
|
+
shims come from orx's own installer, so they are never listed for removal
|
|
296
|
+
(`bin/tezgah-setup::install_openresearch`).
|
|
297
|
+
|
|
298
|
+
Every run ends in a verify pass that re-derives the removal from the filesystem
|
|
299
|
+
alone — one line per claim, and the exit code is 1 while anything tezgah wrote
|
|
300
|
+
survives (`verify_uninstall()`, `bin/tezgah-setup::verify_uninstall`), so a leftover can
|
|
301
|
+
never read as a clean uninstall. It ends by naming what needs a restart and, in
|
|
302
|
+
a git checkout whose own `.mcp.json` registers the tezgah MCP server, saying that
|
|
303
|
+
that file is the source tree's dev config, not an install artifact. An npm or
|
|
304
|
+
artifact install does not ship `.mcp.json` (it is neither in package.json
|
|
305
|
+
`files` nor in `MANIFEST`), so it never prints that note (audit L-12).
|
|
306
|
+
`tests/e2e_docker_cycle.py` makes the same claim in a clean container with an
|
|
307
|
+
independent path scan that imports nothing of tezgah's.
|
|
308
|
+
|
|
309
|
+
`--adopt` moves, never deletes: `~/.codex/projects-harness`, the old codex bin
|
|
310
|
+
shims that exec'd it, the older harness's `~/.claude/hooks/cbm-*` files (a
|
|
311
|
+
name that predates tezgah's own graph engine; the probe stays because
|
|
312
|
+
those files are the thing adopt has to retire), the hook entries in
|
|
313
|
+
`~/.codex/hooks.json` and `~/.claude/settings.json` that called them, and the
|
|
314
|
+
projects-harness marker block in a root's `AGENTS.md` — a block that points
|
|
315
|
+
every session at a POLICY.md inside the moved harness, so leaving it is leaving
|
|
316
|
+
a dead pointer — all go to `~/.config/tezgah/adopted/<timestamp>/`
|
|
317
|
+
(`bin/tezgah-setup::adopt`). `predecessors()` is what
|
|
318
|
+
the report prints and what adopt retires (`bin/tezgah-setup::predecessors`). Under the wizard adopt
|
|
319
|
+
waits for the yes: a declined plan leaves the predecessor wiring exactly where it
|
|
320
|
+
was (`bin/tezgah-setup::wizard`).
|
|
321
|
+
|
|
322
|
+
## Migrate legacy state: `tezgah-migrate`
|
|
323
|
+
|
|
324
|
+
Per-project tezgah state lives only under `<repo>/.tezgah/`, ignored by the
|
|
325
|
+
project and versioned by its own private repository at `.tezgah/.git`. Older
|
|
326
|
+
installs left it elsewhere: a `.tezgah/` the project tracked, a root `plans/`,
|
|
327
|
+
`analysis/` or `research/`. `bin/tezgah-migrate` finds those and moves them
|
|
328
|
+
(`bin/tezgah-migrate::make_plan`):
|
|
329
|
+
|
|
330
|
+
- a tracked `.tezgah/` is untracked with `git rm -r --cached` and stays on disk;
|
|
331
|
+
- a root `plans/` in tezgah plan format (an `open/` or `done/` directory, or a
|
|
332
|
+
README with the status markers, `bin/tezgah-migrate::is_plan_tree`) goes into
|
|
333
|
+
`.tezgah/plans/`, `analysis/` into `.tezgah/analysis/`, and `research/` into
|
|
334
|
+
`.tezgah/analysis/imported-research/`; a tracked source is removed from the
|
|
335
|
+
index, an untracked one is moved;
|
|
336
|
+
- project-owned knowledge (`CLAUDE.md`, `AGENTS.md`, nested rule files,
|
|
337
|
+
`docs/research/`, `.claude/agents|skills|commands`, `.agents/`, `skills/`)
|
|
338
|
+
stays where it is and is indexed in `.tezgah/analysis/project-knowledge.md`
|
|
339
|
+
with its file count and first heading (`bin/tezgah-migrate::knowledge_index`);
|
|
340
|
+
- the workspace is ensured (`/.tezgah/` and `/.codegraph/` in `.gitignore`,
|
|
341
|
+
`git init` in `.tezgah`) and its content committed there as `import from
|
|
342
|
+
project history <short sha>`.
|
|
343
|
+
|
|
344
|
+
A file whose name already exists at the destination with other content is
|
|
345
|
+
reported as `skip` and left in place; an identical duplicate only loses its
|
|
346
|
+
source (`bin/tezgah-migrate::plan_move`).
|
|
347
|
+
|
|
348
|
+
With no `--repo` it walks every repository directly under each configured root
|
|
349
|
+
whose `.git` is a directory, skipping the tezgah checkout
|
|
350
|
+
(`bin/tezgah-migrate::discover`). It is a dry run by default: one `would` line per
|
|
351
|
+
action and a `=` summary per repo. `--apply` first writes every path it will
|
|
352
|
+
touch to `~/.config/tezgah/backups/<repo>-<UTC stamp>.tar.gz`
|
|
353
|
+
(`bin/tezgah-migrate::write_backup`), then performs the actions. It never commits in the
|
|
354
|
+
project repository and never pushes: the result is an uncommitted change to
|
|
355
|
+
review. A second `--apply` finds nothing to do.
|
|
356
|
+
|
|
357
|
+
```sh
|
|
358
|
+
tezgah-migrate # dry run over every root
|
|
359
|
+
tezgah-migrate --apply --repo ~/Projects/app
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## Health pass: `tezgah-doctor`
|
|
363
|
+
|
|
364
|
+
`bin/tezgah-doctor` reports the stores that grow without bound — opencode's SQLite
|
|
365
|
+
session/event database and each indexed repository's `.codegraph` database — and
|
|
366
|
+
the hosts' own state, which it never touches (`bin/tezgah-doctor:2-31`), read-only
|
|
367
|
+
by default, with `--json` for a script and `--coverage` for the files the graph
|
|
368
|
+
does not hold.
|
|
369
|
+
|
|
370
|
+
| Invocation | What it does |
|
|
371
|
+
|---|---|
|
|
372
|
+
| `tezgah-doctor` | nothing: sizes, session and event counts, whether opencode is running, the two context-hygiene settings, the `.codegraph` bytes and index presence per repository, and the three host state dirs (`bin/tezgah-doctor::collect`, `bin/tezgah-doctor::report`) |
|
|
373
|
+
| `tezgah-doctor --clean` | vacuums opencode's database, and only when opencode is not running (`bin/tezgah-doctor::vacuum_db`, `bin/tezgah-doctor::main`); and deletes tezgah's own hook state not modified for `--retention-days` (default 30) - the ledgers under `evidence/`, `turns/`, `sessions/`, `classify.log`, `context-drops.log` and `debug.log`, in the cache and its sandbox fallback - keeping the current session's (`$TEZGAH_SESSION`) files whatever their age (`sweep_state`) |
|
|
374
|
+
| `tezgah-doctor --coverage` | every tracked file the codegraph index does not hold, in two classes — a supported extension the index is missing, and a shebang-only script with no `.py` twin — with the file counts it read, so an empty result cannot read as "everything is covered" |
|
|
375
|
+
| `tezgah-doctor --prune-sessions DAYS` | deletes sessions idle longer than DAYS through `opencode session delete`, then vacuums; skipped when opencode is running or its CLI is missing (`bin/tezgah-doctor::prune_sessions`, `bin/tezgah-doctor::main`) |
|
|
376
|
+
|
|
377
|
+
`VACUUM` alone cannot shrink that database — its pages are all live — so
|
|
378
|
+
`--prune-sessions` is the action that actually reclaims space
|
|
379
|
+
(`bin/tezgah-doctor:19-21`).
|
|
380
|
+
|
|
381
|
+
The coverage report exists because codegraph ships none: its `status` counts what
|
|
382
|
+
it parsed, never what it skipped, and the two ways a file goes missing are an
|
|
383
|
+
extension the engine has no parser for and an extensionless script it cannot key
|
|
384
|
+
on at all. The extensionless case is why `bin/*` carries `.py` twins, and the
|
|
385
|
+
report counts a tracked `bin/x` as covered when the index holds `bin/x.py`.
|
|
386
|
+
|
|
387
|
+
## Opt-in taste capture
|
|
388
|
+
|
|
389
|
+
Phase 1 of a coding-taste learner stores the signals tezgah already receives.
|
|
390
|
+
It learns nothing and injects nothing yet. It stays off until the user arms it
|
|
391
|
+
with a `taste-on` file in `~/.config/tezgah/` (`enabled`,
|
|
392
|
+
`hooks/tezgah_taste.py::enabled`). The off path costs two stats. Armed, it writes
|
|
393
|
+
only into a repository that already has a `.tezgah/` directory. A `.no-taste`
|
|
394
|
+
mark turns it off for one repository (`hooks/tezgah_context.py::repo_marks`).
|
|
395
|
+
A workspace of repo-provided data gets nothing.
|
|
396
|
+
|
|
397
|
+
Rows go to `<repo>/.tezgah/taste/signals.jsonl` through the ledger's own writer
|
|
398
|
+
(`_write`, `hooks/tezgah_taste.py::_write`). A user turn adds a `prompt` row,
|
|
399
|
+
redacted and cut to 2000 characters (`hooks/tezgah_taste.py::note_prompt`).
|
|
400
|
+
A landed write adds an `edit` row with its redacted old and new text, cut to
|
|
401
|
+
4000, under the ledger row's id. Each written file also adds an `after` row.
|
|
402
|
+
It names a snapshot that holds the bytes the write left (`note_write`,
|
|
403
|
+
`hooks/tezgah_taste.py::note_write`, called from `note_tool`,
|
|
404
|
+
`hooks/tezgah_integrity.py::note_tool`). The after blob shares the snapshot
|
|
405
|
+
store's limits and eviction. Armed, each landed write therefore keeps two blobs,
|
|
406
|
+
and a session rollback reaches about half as far back. The after blob writes no
|
|
407
|
+
ledger row. A rollback therefore never reads it as a pre-state (`capture_after`,
|
|
408
|
+
`hooks/tezgah_snapshot.py::capture_after`). A file outside the repository gets no
|
|
409
|
+
after blob.
|
|
410
|
+
opencode reaches the same call through a process (`noteTaste`,
|
|
411
|
+
`hosts/opencode/plugins/tezgah.js:2310-2319`).
|
|
412
|
+
|
|
413
|
+
```sh
|
|
414
|
+
touch ~/.config/tezgah/taste-on # arm; rm it to disarm
|
|
415
|
+
bin/tezgah-taste mine --host omp --stats # sessions, writes, prompts after a writing turn
|
|
416
|
+
bin/tezgah-taste mine --out mined.jsonl # one row per such prompt, redacted
|
|
417
|
+
bin/tezgah-taste measure --samples S --labels L # judge precision/recall against labels
|
|
418
|
+
bin/tezgah-taste rate --in mined.jsonl # preference corrections per writing turn
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
`mine` reads the host transcripts already on disk, so it needs no capture. It
|
|
422
|
+
reads omp's top-level session files and Claude's top-level transcripts whose cwd
|
|
423
|
+
is under `--root` (`cmd_mine`, `bin/tezgah-taste::cmd_mine`). `measure` and `rate`
|
|
424
|
+
send the sample text to the judge seam's provider ([judge](judge.md)), redacted
|
|
425
|
+
first (`classify`, `bin/tezgah-taste::classify`). They use a fixed labelling rule
|
|
426
|
+
(`RULE`, `bin/tezgah-taste::RULE`). Without a credential they send nothing.
|
|
427
|
+
|
|
428
|
+
## Tidying the lessons ledger
|
|
429
|
+
|
|
430
|
+
`.tezgah/lessons.md` is the user's file, so tezgah only proposes changes to it.
|
|
431
|
+
|
|
432
|
+
```sh
|
|
433
|
+
bin/tezgah-lessons # proposals for the repo in the cwd
|
|
434
|
+
bin/tezgah-lessons --root DIR --fixture FX.json # plus recall@5 before and after the merges
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
It prints three kinds of line and writes nothing. `rewrite N` is a rule-first
|
|
438
|
+
text for a line with no ` - ` in its first 120 characters (`rewrite`,
|
|
439
|
+
`bin/tezgah-lessons::rewrite`). `merge A, B` names lines whose word-Jaccard is at
|
|
440
|
+
least 0.2 (`clusters`, `bin/tezgah-lessons::clusters`). `retire N` names a line a gate
|
|
441
|
+
rule or a test already enforces and the `|| enforced_by:` suffix for it
|
|
442
|
+
(`RETIRE`, `bin/tezgah-lessons::RETIRE`). A rewrite is a heuristic over clause
|
|
443
|
+
boundaries, so read it before applying it. With `--fixture`, it remaps the ground
|
|
444
|
+
truth to the merged numbering and exits 1 when the merges would lower recall@5.
|
|
445
|
+
|
|
446
|
+
The per-turn ranking passes BM25 a cap that the docs fallback does not
|
|
447
|
+
(`LESSON_MAX_DF`, `hooks/tezgah_context.py::LESSON_MAX_DF`). English and Turkish function
|
|
448
|
+
words rank nothing (`STOPWORDS`, `hooks/tezgah_rank.py::STOPWORDS`). On ten lines or
|
|
449
|
+
more, neither does a word in more than half of them. On the private 12-prompt
|
|
450
|
+
fixture over the 47-line ledger, recall@5 went from 0.647 to 0.675 with the cap.
|
|
451
|
+
That is a figure about this ranker on that fixture, not production recall.
|
|
452
|
+
|
|
453
|
+
## Opt-in embedding relevance
|
|
454
|
+
|
|
455
|
+
The per-turn lessons block and the `tezgah-docs` fallback rank by shared words
|
|
456
|
+
(BM25, `hooks/tezgah_rank.py`); the docs index also carries a Turkish phrasing of
|
|
457
|
+
every title and answer (`title_tr`, `answers_tr`), so a Turkish question meets an
|
|
458
|
+
English page. Two opt-in feature ids add a static embedding model - one vector
|
|
459
|
+
per token, mean-pooled, read by a stdlib reader. The lessons block keeps BM25's
|
|
460
|
+
order and adds a line by meaning only when its cosine reaches the model's floor
|
|
461
|
+
(`fuse`, `hooks/tezgah_embed.py::fuse`). The docs fallback ranks pages by
|
|
462
|
+
meaning alone (`nearest`, `hooks/tezgah_embed.py::nearest`). Both are off by
|
|
463
|
+
default and a plain `--install` never fetches one (`feature_deps`,
|
|
464
|
+
`bin/tezgah-setup::feature_deps`).
|
|
465
|
+
|
|
466
|
+
```sh
|
|
467
|
+
bin/tezgah-setup --enable embed-mrl # fetch, convert, verify; then selected
|
|
468
|
+
bin/tezgah-setup --features # embed-mrl ... dep met
|
|
469
|
+
bin/tezgah-setup --disable embed-mrl # deselected, and the model file removed
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
| id | model (license) | download, then file | enable, measured | turn, measured |
|
|
473
|
+
|---|---|---|---|---|
|
|
474
|
+
| `embed-mrl` | `sentence-transformers/static-similarity-mrl-multilingual-v1`, first 128 of 1024 dims, int8 (Apache-2.0) | ~436 MB, then 15.1 MB | 24 s (download + 1 s conversion) | 0.24 s |
|
|
475
|
+
| `embed-m2v` | `minishlab/potion-multilingual-128M`, base vocabulary, PCA to 128 dims, int8 (MIT) | ~531 MB, then 41.8 MB | 106 s (download + 75 s conversion) | 0.49 s |
|
|
476
|
+
|
|
477
|
+
Measured 2026-10-03 on one Apple-silicon Mac, Python 3.10: the turn is a cold
|
|
478
|
+
`bin/tezgah-context user_prompt` process over a 42-line ledger, median of five
|
|
479
|
+
(0.155-0.19 s with the feature off), far inside the hooks' 8 s budget. The
|
|
480
|
+
research line's own figure for `embed-mrl`, 0.13 s, is its median turn on its
|
|
481
|
+
fixture, not this process.
|
|
482
|
+
|
|
483
|
+
An enable downloads the pinned source files over HTTPS - repository, commit and
|
|
484
|
+
sha256 of each are in `MODELS` (`hooks/tezgah_embed.py::MODELS`) - converts them
|
|
485
|
+
with the standard library alone (`convert`, `hooks/tezgah_embed.py::convert`),
|
|
486
|
+
checks the result against its own pinned sha256 and only then writes
|
|
487
|
+
`~/.cache/tezgah/embed/<id>.bin`, mode 0600 in a 0700 directory; a mismatch at
|
|
488
|
+
either end writes nothing (`fetch`, `hooks/tezgah_embed.py::fetch`). A fetch
|
|
489
|
+
killed outright (the installer's timeout, Ctrl-C) skips that cleanup and leaves
|
|
490
|
+
its partial download in a `.fetch-*` directory; the next `--enable` or
|
|
491
|
+
`--disable` of either id deletes those directories (`_sweep`,
|
|
492
|
+
`hooks/tezgah_embed.py::_sweep`).
|
|
493
|
+
While it runs, each download and each conversion pass prints a progress line -
|
|
494
|
+
`downloaded 212/436 MB 48%`, `quantised 7/13 chunks 53%` - rewritten in place
|
|
495
|
+
on a terminal and printed once per 10% into a log (`_Progress`,
|
|
496
|
+
`hooks/tezgah_embed.py::_Progress`).
|
|
497
|
+
The conversion is bit-reproducible: the same bytes under Python 3.10 and 3.12 for
|
|
498
|
+
both ids (and 3.9 for `embed-mrl`), and for `embed-mrl` byte-identical vectors to
|
|
499
|
+
the research's numpy export.
|
|
500
|
+
|
|
501
|
+
At hook time the model is read only when its id is selected and the file is the
|
|
502
|
+
pinned one (`reader`, `hooks/tezgah_embed.py::reader`); a missing, altered or
|
|
503
|
+
unreadable file, or any error, is BM25 exactly as before, and nothing at hook time
|
|
504
|
+
touches the network. With both ids selected, `embed-mrl` is the one read: the
|
|
505
|
+
registry lists it first. A ledger with no line older than the session block's
|
|
506
|
+
last five never loads the model at all. With the feature on, a lesson that
|
|
507
|
+
shares no word with the prompt joins only at a cosine of at least the model's
|
|
508
|
+
floor. The floor is 0.30 for `embed-mrl` and 0.50 for `embed-m2v`. The docs fallback always
|
|
509
|
+
prints three pages. `os.pread` is POSIX-only, so on Windows the feature reads as
|
|
510
|
+
BM25. The uninstall's cache sweep removes the file with the rest of
|
|
511
|
+
`~/.cache/tezgah`, and `--enable` fetches it anew.
|
|
512
|
+
|
|
513
|
+
Measured by an internal research line on one Apple-silicon Mac. The
|
|
514
|
+
prompts were 200 real ones over a 46-line ledger, and two blind raters labelled
|
|
515
|
+
them. The old reciprocal-rank fusion put three lessons on every prompt with no
|
|
516
|
+
topic, and 94% of what it injected was irrelevant. With the floor, 5 of the 29
|
|
517
|
+
no-topic prompts get a lesson with `embed-mrl` (BM25 alone 3 to 4). Its recall@3
|
|
518
|
+
is at most 0.02 above BM25's, with a lower bound of 0. With `embed-m2v` the
|
|
519
|
+
floored ranking is close to BM25 itself. So the embedding buys the lessons block
|
|
520
|
+
little, and it costs a model load on every prompt. With `embed-mrl` on the
|
|
521
|
+
46-line ledger the landed hook still costs about 70 ms more than with the
|
|
522
|
+
feature off. With `embed-m2v` it costs about 320 ms more. On a 2-line ledger the
|
|
523
|
+
old hook cost 35 ms (`embed-mrl`) and 237 ms (`embed-m2v`) more for nothing. Now
|
|
524
|
+
it costs nothing there. On held-out Turkish phrasings of the docs index,
|
|
525
|
+
meaning alone found the page in the top three for 0.91 with `embed-mrl` and 0.78
|
|
526
|
+
with `embed-m2v`. The fusion found it for 0.75 and 0.74, BM25 for 0.68.
|
|
527
|
+
|
|
528
|
+
## Troubleshooting
|
|
529
|
+
|
|
530
|
+
| Symptom | First check | Likely cause |
|
|
531
|
+
|---|---|---|
|
|
532
|
+
| A host shows no status line | `bin/tezgah-setup --report --hosts claude`, then `readlink ~/.claude/statusline.py` | that host's own rows read ` MISS `: the `statusline.py` symlink or the `statusLine` key (`bin/tezgah-setup::host_checks_claude`). For omp the row `status line answers` runs `hosts/omp/hook.py`, so it fails whenever the Python half cannot start (`bin/tezgah-setup::host_checks_omp`). codex has no status-line row at all — its surface is hooks, skills and MCP (`bin/tezgah-setup::host_checks_codex`) |
|
|
533
|
+
| A skill is missing in one host | `ls ~/.codex/skills/*/SKILL.md` (the host's skills dir is in [hosts.md](hosts.md)) | the link was never made: that host was not in the last `--hosts`. `bin/tezgah-setup --install --hosts codex` relinks it. Claude has no skills directory — it reads the plugin copy, so the row to read there is `plugin copy current` (`bin/tezgah-setup::host_checks_claude`) |
|
|
534
|
+
| A skill link dangles | `ls -lL ~/.omp/agent/skills/*/SKILL.md` | the link resolves to nothing: its source was renamed or removed, or the checkout moved. `skills_linked` asks for a readable `SKILL.md` precisely so this cannot read as linked (`bin/tezgah-setup::skills_linked`); `--install` relinks from what exists now |
|
|
535
|
+
| A rule still fires after its kill switch | `ls ~/.config/tezgah/*.off`, then `bin/tezgah-context user_prompt . < /dev/null` | the switch was flipped mid-session: the rule leaves the text injected from the next turn on, but text already in the context is not retracted (`hooks/tezgah_context.py::switches`). The static files (`CLAUDE.md`, `AGENTS.md`, `RULES.md`, `opencode-contract.md`) drop a global switch's paragraph only when they are re-rendered, so run `tezgah-setup --refresh` (or `--install`) after flipping one. A per-repo `.no-*` mark does the same job as a switch file for the injected text, but it never edits the global static files (`hooks/tezgah_paths.py::OFF_DIRS`, `hooks/tezgah_context.py::repo_marks`) |
|
|
536
|
+
| The status line is thinner outside the roots | `bin/tezgah-setup --status "$PWD"`, then `bin/tezgah-context session_start .` | by design, mostly: the line is global and only the per-repo `idx` and `plans` marks appear inside a root (`hooks/tezgah_context.py::health_segments`), while the injected contract text is exactly what goes silent off-root (`bin/tezgah-context:27-28`). A line that is empty everywhere is wiring: see the first row |
|
|
537
|
+
| An agent cannot see the graph tools | `bin/tezgah-setup --report` — the common row `codegraph on PATH` and the host's own MCP row; then `which codegraph` | the binary is missing (it is the user's to install; `TEZGAH_CODEGRAPH_BIN` or `config.json`'s `codegraph_bin` can point at it, `hooks/tezgah_paths.py::codegraph_bin`), or the host's MCP row was overwritten and `--install --hosts <host>` rewrites it. `.no-graph` in a repo turns the code-graph rule off there (`hooks/tezgah_context.py::switches`) |
|
|
538
|
+
| Claude keeps applying old rules | `bin/tezgah-setup --report --hosts claude` — the `plugin copy current` row; then `bin/tezgah-setup --sync` | the copy lags HEAD: Claude runs the copy, not the checkout. `--install` refreshes it too; restart Claude after either (`bin/tezgah-setup::install_all`, `bin/tezgah-setup::restart_hint`) |
|
|
539
|
+
|
|
540
|
+
## Safety
|
|
541
|
+
|
|
542
|
+
Reversible and safe to repeat: every link and settings key it writes is
|
|
543
|
+
idempotent and re-created by `--install`. A write that changes a file first
|
|
544
|
+
copies it to `<file>.<timestamp>.tezgah-bak`. The oldest of those copies is
|
|
545
|
+
always kept, beside the newest four (`backup()`, `BACKUP_CAP`). The oldest is
|
|
546
|
+
the file before tezgah's first timestamped write, which is tezgah's own content
|
|
547
|
+
for a file tezgah created. On an upgraded install the pre-tezgah copy is the
|
|
548
|
+
bare `<file>.tezgah-bak` an older release wrote, and the cap never prunes it.
|
|
549
|
+
An unchanged write lays no backup. The installer
|
|
550
|
+
never replaces a host config that does not parse (`read_config()`).
|
|
551
|
+
`--adopt` moves and prints the destination
|
|
552
|
+
(`bin/tezgah-setup::adopt`); `--uninstall` removes only tezgah's own entries — a
|
|
553
|
+
symlink resolving into this checkout or the install tree, or an entry the
|
|
554
|
+
installer materialised (`bin/tezgah-setup::materialised_paths`, `bin/tezgah-setup::is_tezgah_entry`) — and prints
|
|
555
|
+
a verify pass whose nonzero exit says when anything survived; a bad write is
|
|
556
|
+
undone with
|
|
557
|
+
`bin/tezgah-rollback <snapshot-id> [--force]`, reaching the pre-write bytes
|
|
558
|
+
through the id on the ledger's snapshot row (`bin/tezgah-rollback:1-13`,
|
|
559
|
+
[evidence.md](evidence.md)).
|
|
560
|
+
|
|
561
|
+
Not reversible, so do them deliberately: `--sync` deletes the plugin copy's
|
|
562
|
+
contents (bar `.git`) and copies the checkout over it (`bin/tezgah-setup::_swap`) — it refuses
|
|
563
|
+
a copy that holds this very checkout (`bin/tezgah-setup::sync`) — and
|
|
564
|
+
`--prune-sessions` and `--clean` delete session rows and index logs. Two things
|
|
565
|
+
this tool never does. It never force-pushes, rewrites pushed history, deletes a
|
|
566
|
+
repo or branch, applies a migration to a live database, deploys, or touches a
|
|
567
|
+
live account. And it never upgrades itself,
|
|
568
|
+
or its optional tools and config, on its own initiative
|
|
569
|
+
(`hooks/tezgah_policy.py::CORE`).
|
|
570
|
+
|
|
571
|
+
## Triage: `tezgah-triage` and the `judge-off` switch
|
|
572
|
+
|
|
573
|
+
One judgement seam serves five callers, each of them asking TypeSafe a batched
|
|
574
|
+
question instead of paying an agent to read a page: the analyze-app loop's snapshot
|
|
575
|
+
triage (`bin/tezgah-triage`), `bin/tezgah-docs` for a query its keyword index
|
|
576
|
+
cannot place, and the prompt-path skill hint (`hooks/tezgah_skill_pick.py`), the
|
|
577
|
+
one caller no shell row sees, `bin/tezgah-route`, the tier router
|
|
578
|
+
([models](models.md)), and `bin/tezgah-taste`'s `measure` and `rate`
|
|
579
|
+
([above](#opt-in-taste-capture)). All five go through the same stdlib-only seam,
|
|
580
|
+
which returns `None` rather than raising because a hook may import it
|
|
581
|
+
(`available()`, `hooks/tezgah_judge.py::available`); the request is
|
|
582
|
+
one batched call, and the credential resolves per call (`ask()`,
|
|
583
|
+
`hooks/tezgah_judge.py::ask`; `key()`, `hooks/tezgah_judge.py::key`).
|
|
584
|
+
|
|
585
|
+
A transient failure is retried once, and only once: a timeout, a connection error
|
|
586
|
+
or a 5xx gets a second identical request, while a 4xx (a refused credential, a
|
|
587
|
+
rejected body) and a reply that parsed malformed are never retried, so a call that
|
|
588
|
+
worked is never billed twice. The rate was measured rather than assumed - 184 live
|
|
589
|
+
calls this round (60 at a small payload, 124 at the `--states` shape, 64 of those
|
|
590
|
+
eight-way concurrent) returned `None` zero times for $0.0105, against 2 of 50 seen
|
|
591
|
+
in one earlier `--states` run whose cells answered the same on retry; 0 of 184
|
|
592
|
+
bounds the steady rate at 1.6% (95%) and puts that earlier pair down to a transient
|
|
593
|
+
epoch rather than something this path meets every run, so the retry is there for
|
|
594
|
+
the epoch and costs the normal call nothing.
|
|
595
|
+
|
|
596
|
+
| Invocation | What it does |
|
|
597
|
+
|---|---|
|
|
598
|
+
| `tezgah-triage --select FILE --task "TEXT"` | flattens a `browser_snapshot` result (or the flattened text of one), takes the repeating units the tree marks - a row, a cell, a control on its own, and any line the tree does not mark standing alone (`units()`, `bin/tezgah-triage::units`) - asks one Noul per unit in one request, and prints the line ids under the selected units with their original `ref=` values, the unselected count and the characters that may now be skipped (`select()`, `bin/tezgah-triage::select`) |
|
|
599
|
+
| `tezgah-triage --states FILE [--component T]` | one judgement per state over a component's subtree - the 13 states the analyze-app contract names (`STATES`, `bin/tezgah-triage::STATES`), each question carrying what counts as shown, with the interactive pair (`focus`, `active`) asked as one three-way Choice (`neither` / `focus` / `pressed`) whose answer decides both rows, because an aria snapshot marks the focused element `[active]` and carries no separate mark for a press - so a state the tree does not show is a finding, and the five an aria snapshot cannot carry at all (default, hover, active, skeleton, long-text) are printed on their own `unmarked:` line instead of being counted as missing (`states()`, `bin/tezgah-triage::states`) |
|
|
600
|
+
|
|
601
|
+
The judgement is an aid, not the finding: it ranks units, the agent reads the
|
|
602
|
+
selected refs and still owns the claim. Its recall was measured this round rather
|
|
603
|
+
than assumed, on two reproduced screens: the unit selection kept 100% of the
|
|
604
|
+
control lines at a 94% read on a 356-line 40-row table and 100% at a 74% read on a
|
|
605
|
+
31-line 20-button screen, against 73.5% at a 26% read for one question per line.
|
|
606
|
+
The threshold those numbers were taken at is `SELECTED_AT` (`bin/tezgah-triage::SELECTED_AT`),
|
|
607
|
+
and the tool prints the measurement with every run. Exit 1 means no judgement was
|
|
608
|
+
made - no credential, the switch below, or a failed call - and the loop reads the
|
|
609
|
+
tree directly instead.
|
|
610
|
+
|
|
611
|
+
The state leaves the machine. A judgement sends the state and the questions to
|
|
612
|
+
`api.typesafe.ai` (`ask()`, `hooks/tezgah_judge.py::ask`) - for the triage that is
|
|
613
|
+
the snapshot's own text, so a screen carrying personal data is read by a third
|
|
614
|
+
party, and for the docs fallback it is the reader's query. Nothing else goes: no
|
|
615
|
+
session id, no workspace path, no credential beyond the bearer header, and the
|
|
616
|
+
state is not redacted because sending it is the point; the module docstring says
|
|
617
|
+
the same, and `tests/test_judge.py` pins the wire (`Egress`) so the prose and the
|
|
618
|
+
request cannot drift. That is why the two shell callers are on-demand - an agent
|
|
619
|
+
asks for a judgement, no gate does - while the skill hint asks only with its own
|
|
620
|
+
marker armed, and why the switch below is the off button for the whole path.
|
|
621
|
+
|
|
622
|
+
The credential resolves from `TYPESAFE_API_KEY`, else from
|
|
623
|
+
`~/.config/typesafe/key` (`credential()`, `hooks/tezgah_judge.py::credential`), and when
|
|
624
|
+
neither resolves the same questions go to the OpenRouter fallback, whose key rides
|
|
625
|
+
`OPENROUTER_API_KEY` and then `~/.config/openrouter/key`
|
|
626
|
+
(`openrouter_key()`, `hooks/tezgah_judge.py::openrouter_key`). The file is the channel that
|
|
627
|
+
matters on a machine exporting the variable from `~/.zshenv`: a hook or a bin tool
|
|
628
|
+
runs in a non-interactive shell, where that export never ran, so the file is what a
|
|
629
|
+
judgement actually resolves. Cost is input tokens alone - $0.042 per
|
|
630
|
+
1M, output billed at $0 - and every run prints the arithmetic it paid; the model
|
|
631
|
+
that answered is printed beside it, because the fallback answers with a chat model
|
|
632
|
+
rather than Jev (`result["model"]`, `bin/tezgah-triage::record`).
|
|
633
|
+
|
|
634
|
+
`judge-off` in `~/.config/tezgah` disarms all of it without touching the callers:
|
|
635
|
+
the snapshot is read the way the loop always read it, and a docs query matching no
|
|
636
|
+
page exits 1 with the message it always printed (`available()`,
|
|
637
|
+
`hooks/tezgah_judge.py::available`). A host whose files predate this tool is relinked by
|
|
638
|
+
`--install`, which links every `~/.config/tezgah/bin` entry including
|
|
639
|
+
`tezgah-triage` (`bin/tezgah-setup::install_common`).
|
|
640
|
+
|
|
641
|
+
## Source of truth
|
|
642
|
+
|
|
643
|
+
- `bin/tezgah-setup` — the parser, the install path, the per-host check rows,
|
|
644
|
+
`--refresh`, `--sync`, `--adopt`, the uninstallers, the wizard, `--upgrade`.
|
|
645
|
+
- `packaging/build.sh`, `packaging/install.sh`, `packaging/upgrade.sh`,
|
|
646
|
+
`packaging/install.ps1` — the artifact itself: the build from `MANIFEST` plus
|
|
647
|
+
`VERSION`, the two installers, and the one fetch/verify/unpack/flip step.
|
|
648
|
+
`tests/e2e_packaged_install.py` and `.github/workflows/ci.yml` install from the
|
|
649
|
+
built tarball rather than the checkout, so the released shape is what CI proves.
|
|
650
|
+
- `bin/tezgah-doctor`, `bin/tezgah-rollback`, `bin/tezgah-status`,
|
|
651
|
+
`bin/tezgah-context` — the health pass, the rollback, the checklist CLI, the
|
|
652
|
+
injected text.
|
|
653
|
+
- `bin/tezgah-triage`, `hooks/tezgah_judge.py`, `bin/tezgah-docs` — the snapshot
|
|
654
|
+
triage, the judgement seam all five callers share (the others are
|
|
655
|
+
`hooks/tezgah_skill_pick.py`, `bin/tezgah-route` and `bin/tezgah-taste`), and the docs fallback that uses it;
|
|
656
|
+
`tests/test_judge.py`, `tests/test_triage.py` pin them against a loopback
|
|
657
|
+
endpoint.
|
|
658
|
+
- `hooks/tezgah_embed.py`, `hooks/tezgah_apps.py` — the opt-in embedding model:
|
|
659
|
+
its pins, the fetch and conversion, the reader and `fuse`; the `embed-mrl` and
|
|
660
|
+
`embed-m2v` registry rows that `--enable`, `--disable` and `--features` read.
|
|
661
|
+
`tests/test_embed.py` builds tiny models in the test and pins the rest.
|
|
662
|
+
- `hooks/tezgah_paths.py`, `hooks/tezgah_context.py` — the paths and `off()`; the
|
|
663
|
+
marks and the kill-switch filtering.
|
|
664
|
+
- `RELEASING.md`, `README.md`, `AGENTS.md`, `.gitignore`, `tests/test_setup.py` —
|
|
665
|
+
the version rule, the install and configuration sections, the layer map, what
|
|
666
|
+
stays untracked, and the behaviour these checks pin.
|