@r1z4x/tezgah 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -1
- package/MANIFEST +382 -144
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.md +1 -1
- package/README.tr.md +1 -1
- package/bin/codegen +5 -2
- package/bin/tezgah-design +288 -1
- package/bin/tezgah-docs +1 -1
- package/bin/tezgah-doctor +39 -2
- package/bin/tezgah-import-ai-research +26 -12
- package/bin/tezgah-ocr-review +296 -0
- package/bin/tezgah-research +216 -40
- package/bin/tezgah-review-quote +185 -0
- package/bin/tezgah-setup +136 -33
- package/bin/tezgah-skill +1 -1
- package/bin/tezgah-status +201 -3
- package/bin/tezgah-task +203 -3
- package/commands/adhd.md +2 -2
- package/commands/ponytail.md +4 -4
- package/docs/architecture.md +2 -2
- package/docs/citations-baseline.json +2 -2
- package/docs/clarity-baseline.json +2 -2
- package/docs/contract.md +87 -42
- package/docs/environment.md +5 -3
- package/docs/evidence.md +28 -9
- package/docs/feature-audit.md +2 -2
- package/docs/gate.md +54 -31
- package/docs/glossary.md +5 -2
- package/docs/hosts.md +17 -3
- package/docs/index.json +34 -8
- package/docs/judge.md +4 -2
- package/docs/layers.md +3 -3
- package/docs/models.md +31 -9
- package/docs/operations.md +148 -8
- package/docs/research.md +786 -5
- package/docs/skills.md +137 -13
- package/docs/status-line.md +115 -1
- package/hooks/hooks.json +1 -1
- package/hooks/lang/en.json +10 -0
- package/hooks/lang/tr.json +11 -1
- package/hooks/tezgah_agents.py +38 -22
- package/hooks/tezgah_apps.py +18 -0
- package/hooks/tezgah_components.py +4 -0
- package/hooks/tezgah_context.py +189 -50
- package/hooks/tezgah_extension.py +337 -0
- package/hooks/tezgah_gate.py +188 -56
- package/hooks/tezgah_integrity.py +652 -105
- package/hooks/tezgah_judge.py +6 -4
- package/hooks/tezgah_models.py +59 -19
- package/hooks/tezgah_orca.py +1 -1
- package/hooks/tezgah_paths.py +102 -6
- package/hooks/tezgah_policy.py +94 -45
- package/hooks/tezgah_rank.py +9 -6
- package/hooks/tezgah_replay.py +4 -4
- package/hooks/tezgah_research.py +1260 -65
- package/hooks/tezgah_research_capture.py +1544 -0
- package/hooks/tezgah_research_evidence.py +842 -0
- package/hooks/tezgah_research_stats.py +258 -0
- package/hooks/tezgah_skill_pick.py +408 -106
- package/hooks/tezgah_stopspec.py +8 -1
- package/hooks/tezgah_task.py +12 -4
- package/hooks/tezgah_taste_ledger.py +1 -1
- package/hosts/cursor/hook.py +29 -2
- package/hosts/opencode/plugins/tezgah.js +307 -46
- package/hosts/opencode/tui/cli/tui.tsx +100 -0
- package/hosts/opencode/tui/tezgah-tui.tsx +2 -1
- package/output-styles/tezgah.md +10 -10
- package/package.json +1 -1
- package/packaging/install.ps1 +36 -3
- package/packaging/install.sh +13 -3
- package/packaging/upgrade.sh +61 -7
- package/skills/ai-research/SKILL.md +21 -14
- package/skills/ai-research/SOURCE +7 -5
- package/skills/ai-research/index/1-frame.md +6 -6
- package/skills/ai-research/index/2-data.md +9 -9
- package/skills/ai-research/index/3-train.md +36 -36
- package/skills/ai-research/index/4-measure.md +13 -13
- package/skills/ai-research/index/5-run.md +11 -11
- package/skills/ai-research/index/6-write.md +23 -23
- package/skills/ai-research/library.json +104 -104
- package/skills/analyze-app/SKILL.md +17 -12
- package/skills/design-contract/SKILL.md +42 -7
- package/skills/design-contract/data-views.md +2 -2
- package/skills/design-library/EVALS.md +1 -1
- package/skills/design-library/INDEX.md +39 -39
- package/skills/design-library/SKILL.md +19 -13
- package/skills/design-library/SOURCE +45 -43
- package/skills/feature-audit/SKILL.md +20 -14
- package/skills/hallmark/LICENSE +21 -0
- package/skills/hallmark/SKILL.md +154 -0
- package/skills/hallmark/SOURCE +207 -0
- package/skills/hallmark/agents/openai.yaml +13 -0
- package/skills/hallmark/references/anatomy.md +71 -0
- package/skills/hallmark/references/brand-truth.md +40 -0
- package/skills/hallmark/references/comp.md +104 -0
- package/skills/hallmark/references/craft.md +116 -0
- package/skills/hallmark/references/dark-mode.md +49 -0
- package/skills/hallmark/references/data-viz.md +48 -0
- package/skills/hallmark/references/design-md.md +53 -0
- package/skills/hallmark/references/direction.md +52 -0
- package/skills/hallmark/references/export-formats.md +80 -0
- package/skills/hallmark/references/flow.md +131 -0
- package/skills/hallmark/references/fonts.md +58 -0
- package/skills/hallmark/references/gates.md +243 -0
- package/skills/hallmark/references/genres/atmospheric.md +24 -0
- package/skills/hallmark/references/genres/editorial.md +24 -0
- package/skills/hallmark/references/genres/modern-minimal.md +24 -0
- package/skills/hallmark/references/genres/playful.md +24 -0
- package/skills/hallmark/references/imagery.md +99 -0
- package/skills/hallmark/references/interaction-and-states.md +89 -0
- package/skills/hallmark/references/layout.md +104 -0
- package/skills/hallmark/references/macrostructures/01-bento-grid.md +21 -0
- package/skills/hallmark/references/macrostructures/02-long-document.md +35 -0
- package/skills/hallmark/references/macrostructures/03-marquee-hero.md +21 -0
- package/skills/hallmark/references/macrostructures/04-stat-led.md +21 -0
- package/skills/hallmark/references/macrostructures/05-workbench.md +21 -0
- package/skills/hallmark/references/macrostructures/06-conversational-faq.md +28 -0
- package/skills/hallmark/references/macrostructures/07-manifesto.md +28 -0
- package/skills/hallmark/references/macrostructures/08-photographic.md +21 -0
- package/skills/hallmark/references/macrostructures/09-quote-led.md +21 -0
- package/skills/hallmark/references/macrostructures/10-specimen.md +21 -0
- package/skills/hallmark/references/macrostructures/11-catalogue.md +21 -0
- package/skills/hallmark/references/macrostructures/12-letter.md +21 -0
- package/skills/hallmark/references/macrostructures/13-index-first.md +21 -0
- package/skills/hallmark/references/macrostructures/14-narrative-workflow.md +21 -0
- package/skills/hallmark/references/macrostructures/15-split-studio.md +21 -0
- package/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
- package/skills/hallmark/references/macrostructures/17-type-specimen.md +19 -0
- package/skills/hallmark/references/macrostructures/18-portfolio-grid.md +21 -0
- package/skills/hallmark/references/macrostructures/19-map-diagram.md +21 -0
- package/skills/hallmark/references/macrostructures/20-ecosystem-index.md +19 -0
- package/skills/hallmark/references/macrostructures/21-component-playground.md +21 -0
- package/skills/hallmark/references/macrostructures.md +119 -0
- package/skills/hallmark/references/microinteractions.md +80 -0
- package/skills/hallmark/references/patterns.md +202 -0
- package/skills/hallmark/references/redesign.md +88 -0
- package/skills/hallmark/references/responsive.md +46 -0
- package/skills/hallmark/references/review-finish.md +19 -0
- package/skills/hallmark/references/review-hero.md +20 -0
- package/skills/hallmark/references/scroll-choreography.md +110 -0
- package/skills/hallmark/references/texture.md +90 -0
- package/skills/hallmark/references/themes/README.md +58 -0
- package/skills/hallmark/references/themes/almanac.jpg +0 -0
- package/skills/hallmark/references/themes/almanac.md +103 -0
- package/skills/hallmark/references/themes/arcade.jpg +0 -0
- package/skills/hallmark/references/themes/arcade.md +102 -0
- package/skills/hallmark/references/themes/atelier.jpg +0 -0
- package/skills/hallmark/references/themes/atelier.md +98 -0
- package/skills/hallmark/references/themes/bloom.jpg +0 -0
- package/skills/hallmark/references/themes/bloom.md +102 -0
- package/skills/hallmark/references/themes/blueprint.jpg +0 -0
- package/skills/hallmark/references/themes/blueprint.md +103 -0
- package/skills/hallmark/references/themes/broadside.jpg +0 -0
- package/skills/hallmark/references/themes/broadside.md +108 -0
- package/skills/hallmark/references/themes/brutal.jpg +0 -0
- package/skills/hallmark/references/themes/brutal.md +95 -0
- package/skills/hallmark/references/themes/carnival.jpg +0 -0
- package/skills/hallmark/references/themes/carnival.md +104 -0
- package/skills/hallmark/references/themes/cobalt.jpg +0 -0
- package/skills/hallmark/references/themes/cobalt.md +101 -0
- package/skills/hallmark/references/themes/console.jpg +0 -0
- package/skills/hallmark/references/themes/console.md +99 -0
- package/skills/hallmark/references/themes/coral.jpg +0 -0
- package/skills/hallmark/references/themes/coral.md +102 -0
- package/skills/hallmark/references/themes/darkroom.jpg +0 -0
- package/skills/hallmark/references/themes/darkroom.md +99 -0
- package/skills/hallmark/references/themes/dose.jpg +0 -0
- package/skills/hallmark/references/themes/dose.md +98 -0
- package/skills/hallmark/references/themes/dusk.jpg +0 -0
- package/skills/hallmark/references/themes/dusk.md +105 -0
- package/skills/hallmark/references/themes/editorial.jpg +0 -0
- package/skills/hallmark/references/themes/editorial.md +97 -0
- package/skills/hallmark/references/themes/formwork.jpg +0 -0
- package/skills/hallmark/references/themes/formwork.md +107 -0
- package/skills/hallmark/references/themes/furrow.jpg +0 -0
- package/skills/hallmark/references/themes/furrow.md +98 -0
- package/skills/hallmark/references/themes/garden.jpg +0 -0
- package/skills/hallmark/references/themes/garden.md +97 -0
- package/skills/hallmark/references/themes/grid.jpg +0 -0
- package/skills/hallmark/references/themes/grid.md +101 -0
- package/skills/hallmark/references/themes/halftone.jpg +0 -0
- package/skills/hallmark/references/themes/halftone.md +106 -0
- package/skills/hallmark/references/themes/hedgerow.jpg +0 -0
- package/skills/hallmark/references/themes/hedgerow.md +104 -0
- package/skills/hallmark/references/themes/hum.jpg +0 -0
- package/skills/hallmark/references/themes/hum.md +99 -0
- package/skills/hallmark/references/themes/index.json +2191 -0
- package/skills/hallmark/references/themes/ink.jpg +0 -0
- package/skills/hallmark/references/themes/ink.md +106 -0
- package/skills/hallmark/references/themes/kiln.jpg +0 -0
- package/skills/hallmark/references/themes/kiln.md +108 -0
- package/skills/hallmark/references/themes/loom.jpg +0 -0
- package/skills/hallmark/references/themes/loom.md +106 -0
- package/skills/hallmark/references/themes/lumen.jpg +0 -0
- package/skills/hallmark/references/themes/lumen.md +103 -0
- package/skills/hallmark/references/themes/manifesto.jpg +0 -0
- package/skills/hallmark/references/themes/manifesto.md +101 -0
- package/skills/hallmark/references/themes/midnight.jpg +0 -0
- package/skills/hallmark/references/themes/midnight.md +97 -0
- package/skills/hallmark/references/themes/newsprint.jpg +0 -0
- package/skills/hallmark/references/themes/newsprint.md +102 -0
- package/skills/hallmark/references/themes/overprint.jpg +0 -0
- package/skills/hallmark/references/themes/overprint.md +101 -0
- package/skills/hallmark/references/themes/pasteup.jpg +0 -0
- package/skills/hallmark/references/themes/pasteup.md +100 -0
- package/skills/hallmark/references/themes/piste.jpg +0 -0
- package/skills/hallmark/references/themes/piste.md +99 -0
- package/skills/hallmark/references/themes/ribbon.jpg +0 -0
- package/skills/hallmark/references/themes/ribbon.md +106 -0
- package/skills/hallmark/references/themes/rim.jpg +0 -0
- package/skills/hallmark/references/themes/rim.md +96 -0
- package/skills/hallmark/references/themes/riso.jpg +0 -0
- package/skills/hallmark/references/themes/riso.md +98 -0
- package/skills/hallmark/references/themes/solstice.jpg +0 -0
- package/skills/hallmark/references/themes/solstice.md +104 -0
- package/skills/hallmark/references/themes/specimen.jpg +0 -0
- package/skills/hallmark/references/themes/specimen.md +100 -0
- package/skills/hallmark/references/themes/spore.jpg +0 -0
- package/skills/hallmark/references/themes/spore.md +104 -0
- package/skills/hallmark/references/themes/sport.jpg +0 -0
- package/skills/hallmark/references/themes/sport.md +101 -0
- package/skills/hallmark/references/themes/squeeze.jpg +0 -0
- package/skills/hallmark/references/themes/squeeze.md +99 -0
- package/skills/hallmark/references/themes/sticker.jpg +0 -0
- package/skills/hallmark/references/themes/sticker.md +106 -0
- package/skills/hallmark/references/themes/studio.jpg +0 -0
- package/skills/hallmark/references/themes/studio.md +99 -0
- package/skills/hallmark/references/themes/terminal.jpg +0 -0
- package/skills/hallmark/references/themes/terminal.md +96 -0
- package/skills/hallmark/references/themes/terrazzo.jpg +0 -0
- package/skills/hallmark/references/themes/terrazzo.md +106 -0
- package/skills/hallmark/references/themes/ultraviolet.jpg +0 -0
- package/skills/hallmark/references/themes/ultraviolet.md +106 -0
- package/skills/hallmark/references/themes/vellum.jpg +0 -0
- package/skills/hallmark/references/themes/vellum.md +105 -0
- package/skills/hallmark/references/themes/wayfind.jpg +0 -0
- package/skills/hallmark/references/themes/wayfind.md +105 -0
- package/skills/hallmark/references/themes/werkstatt.jpg +0 -0
- package/skills/hallmark/references/themes/werkstatt.md +105 -0
- package/skills/hallmark/scripts/capture.mjs +125 -0
- package/skills/hallmark/scripts/fixtures/exemplars/atmospheric.html +324 -0
- package/skills/hallmark/scripts/fixtures/exemplars/editorial.html +363 -0
- package/skills/hallmark/scripts/fixtures/exemplars/modern-minimal.html +527 -0
- package/skills/hallmark/scripts/fixtures/exemplars/playful.html +353 -0
- package/skills/hallmark/scripts/fixtures/eyebrow-fail/index.html +118 -0
- package/skills/hallmark/scripts/fixtures/eyebrow-pass/index.html +137 -0
- package/skills/hallmark/scripts/fixtures/kept/after.html +27 -0
- package/skills/hallmark/scripts/fixtures/kept/before.html +26 -0
- package/skills/hallmark/scripts/fixtures/slopped.html +145 -0
- package/skills/hallmark/scripts/fixtures/tailwind-fail/Feature.vue +14 -0
- package/skills/hallmark/scripts/fixtures/tailwind-fail/Hero.tsx +33 -0
- package/skills/hallmark/scripts/fixtures/tailwind-fail/index.html +74 -0
- package/skills/hallmark/scripts/fixtures/tailwind-fail/style.css +6 -0
- package/skills/hallmark/scripts/fixtures/tailwind-pass/Hero.tsx +33 -0
- package/skills/hallmark/scripts/fixtures/tailwind-pass/index.html +57 -0
- package/skills/hallmark/scripts/fixtures/tailwind-pass/style.css +15 -0
- package/skills/hallmark/scripts/fixtures/waiver/index.html +54 -0
- package/skills/hallmark/scripts/imagegen.mjs +85 -0
- package/skills/hallmark/scripts/install-hook.mjs +70 -0
- package/skills/hallmark/scripts/install.mjs +141 -0
- package/skills/hallmark/scripts/lint-hook.mjs +49 -0
- package/skills/hallmark/scripts/photos.json +1 -0
- package/skills/hallmark/scripts/picture.mjs +71 -0
- package/skills/hallmark/scripts/refcheck.mjs +352 -0
- package/skills/hallmark/scripts/sloplint-render.mjs +1252 -0
- package/skills/hallmark/scripts/sloplint.mjs +4422 -0
- package/skills/hallmark/scripts/theme.mjs +650 -0
- package/skills/harness/SKILL.md +15 -8
- package/skills/i-have-adhd/SKILL.md +22 -11
- package/skills/no-ai-slop/SKILL.md +15 -1
- package/skills/plan-add/SKILL.md +33 -26
- package/skills/plan-status/SKILL.md +13 -7
- package/skills/plan-sync/SKILL.md +18 -12
- package/skills/pm-frameworks/SKILL.md +19 -10
- package/skills/pm-frameworks/SOURCE +7 -5
- package/skills/ponytail/SKILL.md +19 -14
- package/skills/product-analysis/SKILL.md +22 -18
- package/skills/product-flow/SKILL.md +14 -9
- package/skills/research/SKILL.md +75 -39
- package/skills/rl-env/SKILL.md +25 -13
- package/skills/rl-env/SOURCE +8 -6
- package/skills/tezgah-contract/SKILL.md +47 -42
- package/bin/tezgah-skill.py +0 -59
- /package/skills/ai-research/0-autoresearch-skill/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/litgpt/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/mamba/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/nanogpt/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/rwkv/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/01-model-architecture/torchtitan/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/02-tokenization/huggingface-tokenizers/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/02-tokenization/sentencepiece/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/03-fine-tuning/axolotl/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/03-fine-tuning/llama-factory/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/03-fine-tuning/peft/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/03-fine-tuning/unsloth/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/04-mechanistic-interpretability/nnsight/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/04-mechanistic-interpretability/pyvene/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/04-mechanistic-interpretability/saelens/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/04-mechanistic-interpretability/transformer-lens/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/05-data-processing/nemo-curator/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/05-data-processing/ray-data/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/grpo-rl-training/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/miles/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/openrlhf/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/simpo/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/slime/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/torchforge/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/trl-fine-tuning/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/06-post-training/verl/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/07-safety-alignment/constitutional-ai/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/07-safety-alignment/llamaguard/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/07-safety-alignment/nemo-guardrails/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/07-safety-alignment/prompt-guard/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/accelerate/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/deepspeed/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/megatron-core/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/pytorch-fsdp2/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/pytorch-lightning/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/08-distributed-training/ray-train/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/09-infrastructure/lambda-labs/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/09-infrastructure/modal/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/09-infrastructure/skypilot/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/awq/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/bitsandbytes/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/flash-attention/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/gguf/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/gptq/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/hqq/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/10-optimization/ml-training-recipes/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/11-evaluation/bigcode-evaluation-harness/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/11-evaluation/lm-evaluation-harness/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/11-evaluation/nemo-evaluator/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/12-inference-serving/llama-cpp/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/12-inference-serving/sglang/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/12-inference-serving/tensorrt-llm/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/12-inference-serving/vllm/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/13-mlops/mlflow/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/13-mlops/swanlab/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/13-mlops/tensorboard/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/13-mlops/weights-and-biases/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/a-evolve/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/autogpt/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/crewai/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/langchain/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/14-agents/llamaindex/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/chroma/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/faiss/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/pinecone/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/qdrant/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/15-rag/sentence-transformers/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/16-prompt-engineering/dspy/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/16-prompt-engineering/guidance/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/16-prompt-engineering/instructor/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/16-prompt-engineering/outlines/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/17-observability/langsmith/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/17-observability/phoenix/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/audiocraft/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/blip-2/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/clip/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/cosmos-policy/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/llava/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/openpi/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/openvla-oft/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/segment-anything/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/stable-diffusion/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/18-multimodal/whisper/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/knowledge-distillation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/long-context/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/model-merging/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/model-pruning/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/moe-training/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/19-emerging-techniques/speculative-decoding/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/20-ml-paper-writing/academic-plotting/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/20-ml-paper-writing/ml-paper-writing/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/20-ml-paper-writing/presenting-conference-talks/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/20-ml-paper-writing/systems-paper-writing/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/21-research-ideation/brainstorming-research-ideas/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/21-research-ideation/creative-thinking-for-research/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/22-agent-native-research-artifact/compiler/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/22-agent-native-research-artifact/research-manager/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/ai-research/22-agent-native-research-artifact/rigor-reviewer/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/colour-independence/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/flexible-typography/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/information-density/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/preference-audit/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/responsive-accessibility/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/responsive-review/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/simplified-views/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/specify/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/adaptive-interfaces/skills/user-preference-respect/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/adaptive-personalisation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/assess-load/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/cognitive-load-assessment/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/contextual-help-design/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/error-prevention-recovery/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/focus-attention-design/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/memory-load-reduction/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/plain-language-design/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/review/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/simplify/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/cognitive-accessibility/skills/wayfinding-navigation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/design-research/skills/behavioural-analytics/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/design-research/skills/qual-quant-triangulation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/audit/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/design-flow/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/feedback-and-status/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/gesture-alternatives/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/keyboard-navigation/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/keyboard-review/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/motion-sensitivity/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/multi-modal-input/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/touch-target-design/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/inclusive-interaction/skills/voice-interaction/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-affordance/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-brand-consistency/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-color/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-composition/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-information-density/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-typography/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/design-library/visual-critique/skills/critique-visual-hierarchy/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/pm-frameworks/intended-vs-implemented/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/pm-frameworks/opportunity-solution-tree/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/generate-nemo-gym-env/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/generate-openenv-env/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/generate-ors-env/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/generate-verifiers-env/{SKILL.md → ENTRY.md} +0 -0
- /package/skills/rl-env/rl-env-from-description/{SKILL.md → ENTRY.md} +0 -0
package/docs/research.md
CHANGED
|
@@ -68,8 +68,11 @@ are the standards rules. Rules 3 add the ask contract. Rules 4 add the protocol
|
|
|
68
68
|
sections below. Rules 5 add the scope lock. Rules 6 add the selection warnings
|
|
69
69
|
("Held-out set, repeats and noise band" below). Rules 7 add the `exploratory`
|
|
70
70
|
method ("Rules 7: exploratory lines" below). A bump never weakens an older set.
|
|
71
|
+
Rules 8 (`EVIDENCE_RULES`) add captured evidence and a computed certainty per
|
|
72
|
+
claim ("Rules 8: captured evidence and computed certainty" below). `init` writes 8
|
|
73
|
+
now: `RULES` is `EVIDENCE_RULES` (`hooks/tezgah_research.py::EVIDENCE_RULES`).
|
|
71
74
|
|
|
72
|
-
A `rules` above `
|
|
75
|
+
A `rules` above `EVIDENCE_RULES` means a later tezgah wrote the line. `check` then reports
|
|
73
76
|
one error that names both numbers and reads nothing else. The writers refuse the
|
|
74
77
|
line too: `claim`, `predict`, `compare`, `source --run`, `verdict`, `conclude`,
|
|
75
78
|
`close` and `migrate` (`newer_rules`). Upgrade tezgah to work on such a line.
|
|
@@ -148,6 +151,53 @@ no line. Cite each finding's source with a confidence. The host-subagent fallbac
|
|
|
148
151
|
gets the question, its scope and its method in its brief. The research skill's
|
|
149
152
|
"Scope and method" section is the long form.
|
|
150
153
|
|
|
154
|
+
## Variants of the deliverable
|
|
155
|
+
|
|
156
|
+
`state.json` `deliverable` names what the line delivers. Its `kind` is `design`,
|
|
157
|
+
`plan`, `code`, `analysis` or `finding`
|
|
158
|
+
(`hooks/tezgah_research.py::DELIVERABLE_KINDS`). A design or plan takes 3 compared
|
|
159
|
+
variants by default and code takes 2 (`hooks/tezgah_research.py::deliverable_problems`).
|
|
160
|
+
On a rules-5 line an analysis and a finding take none. `min_variants` changes the
|
|
161
|
+
count. A count below the default needs `single_variant_reason`, which says why
|
|
162
|
+
the line weighed no alternative. `check` compares any decision across at least 2
|
|
163
|
+
produced variants (`hooks/tezgah_research.py::_check_decisions`).
|
|
164
|
+
|
|
165
|
+
One comparison lives in `decisions/<id>/`, and one loader reads its files
|
|
166
|
+
(`hooks/tezgah_research.py::load_decision`):
|
|
167
|
+
|
|
168
|
+
| File | What it holds |
|
|
169
|
+
|---|---|
|
|
170
|
+
| `criteria.json` | `criteria`: a list of `{id, kind, direction}`, with `kind` `measured` or `judged` and `direction` `max`, `min` or `pass`. `baseline_variant`: the id of the status-quo variant in `variants.jsonl` |
|
|
171
|
+
| `variants.jsonl` | one `{id, status}` row per variant. A `produced` variant names its `artifact`: a file in the line or the repository, `git:<rev>` or `orx:<id>`. A `dropped` one gives `drop_reason` |
|
|
172
|
+
| `comparison.jsonl` | one cell per variant and criterion, written by `compare` |
|
|
173
|
+
| `decision.md` | the choice and why the others lost |
|
|
174
|
+
|
|
175
|
+
Write and commit `criteria.json` and `variants.jsonl` before the first cell. Then
|
|
176
|
+
record each cell with `tezgah-research compare <slug> <decision>`, one JSON object
|
|
177
|
+
on stdin (`hooks/tezgah_research.py::append_comparison`). A cell names a produced
|
|
178
|
+
`variant` and a defined `criterion`. It carries either a `value` with its `source`,
|
|
179
|
+
or `not_checked` with the reason. A cell source has to resolve in the line or the
|
|
180
|
+
repository. An optional `rater` names who judged it
|
|
181
|
+
(`hooks/tezgah_research.py::comparison_problems`). The writer and `check` apply
|
|
182
|
+
this same rule.
|
|
183
|
+
|
|
184
|
+
`check` reads the whole decision
|
|
185
|
+
(`hooks/tezgah_research.py::_check_decision`):
|
|
186
|
+
|
|
187
|
+
- `check` refuses two produced variants that are the same file.
|
|
188
|
+
- A matrix cell neither measured nor marked `not_checked` warns. It refuses once
|
|
189
|
+
`decision.md` exists or the line concludes.
|
|
190
|
+
- A judged cell with fewer than two distinct raters warns.
|
|
191
|
+
- The criteria have to enter the history before the first cell, and
|
|
192
|
+
`comparison.jsonl` only grows.
|
|
193
|
+
- `decision.md` names a produced variant on a `chosen: <id>` line.
|
|
194
|
+
- Each other produced variant shares a line of `decision.md` with a criterion id
|
|
195
|
+
that ruled it out. Else: `rejects <id> on no criterion`.
|
|
196
|
+
- `decision.md` has a `flip:` line, the result that would reverse the choice.
|
|
197
|
+
- When every criterion is `max` or `min` and scored, no produced variant may
|
|
198
|
+
dominate the chosen one. A dominating variant is at least as good on every
|
|
199
|
+
criterion and better on one (`hooks/tezgah_research.py::dominated_by`).
|
|
200
|
+
|
|
151
201
|
## One line, one directory
|
|
152
202
|
|
|
153
203
|
| Path | Holds |
|
|
@@ -216,7 +266,12 @@ refused while any open line has `check` errors (`broken_open_lines`): a hatch pa
|
|
|
216
266
|
broken lines is how they stayed broken. What is left of a line that will not be
|
|
217
267
|
finished is recorded with `tezgah-research close <slug> --limit "<reason>"`
|
|
218
268
|
(`close_line`), which concludes it and writes the reasons it was still open into
|
|
219
|
-
`state.json` `closed` and `log.md` and seals it ("the order seal", below).
|
|
269
|
+
`state.json` `closed` and `log.md` and seals it ("the order seal", below). Such
|
|
270
|
+
a limit is a normal outcome, not a failure to avoid. So are a hypothesis ended
|
|
271
|
+
`inconclusive` and a claim narrowed to what its evidence reaches. The skill and
|
|
272
|
+
the policy carry no "try harder" prompting: it measured null or negative (plan
|
|
273
|
+
127, 4.4). On a rules-8 line `check` caps a claim's certainty and warns on
|
|
274
|
+
overclaiming wording instead.
|
|
220
275
|
Its errors show in `check <slug>` and `check --all-lines`; the no-slug `check`
|
|
221
276
|
reads it by its seal hashes and counts it on one line (ADR 015). The
|
|
222
277
|
prompt-time note reads a line's `state.json`, its experiment directory and its
|
|
@@ -234,9 +289,9 @@ through its seal.
|
|
|
234
289
|
|
|
235
290
|
| Command | What it does | Exit |
|
|
236
291
|
|---|---|---|
|
|
237
|
-
| `tezgah-research init <slug> [--question "..."] [--allow-open "<reason>"] [--supersedes <slug>]` | scaffolds the line and makes sure `.tezgah/` is ignored by the project and has its own git repository (`tezgah_paths.ensure_workspace`). It refuses while another line is still open (see below), names each open line and its reasons one per line, and `--allow-open "<reason>"` is the way past unless an open line has `check` errors: the reason lands in the new line's `log.md` as its first entry, and an empty reason is misuse. A `--question` another line already asks is refused unless `--supersedes <that line>` says the new line is its next version (`serial_twins`). Its next-step message names the commit loop: `tezgah-research commit` for the protocol, then again for the results in a later commit (`cmd_init`, `bin/tezgah-research`) | 0, 1 refused, 2 misuse |
|
|
238
|
-
| `tezgah-research commit <slug> "<message>"` | stages and commits only that line's path in `.tezgah`'s private repository - the commit the order rule reads (`cmd_commit`, `bin/tezgah-research`) | 0, 1 not a work tree or git failed, 2 misuse |
|
|
239
|
-
| `tezgah-research check [<slug>] [--json] [--strict] [--orx] [--all-lines] [-- <slug>]` | the discipline checks below. With no slug it checks the open lines in full and a line under `done/` by its order seal alone (`done_seal`, `hooks/tezgah_research.py::done_seal`), naming it only when the seal fails or its `state.json` or seal cannot be read, then prints `research: <n> done line(s): <s> checked by their seal, <u> unsealed (not checked); ...`; `--all-lines` checks every line in full, and `check <slug>` always checks that line in full (ADR 015). `--json` prints the report (no-slug default: the open lines and any done line whose seal read fails), `--strict` turns the unverifiable class into a refusal, `--orx` adds the registry check that asks `orx project view` for this repository (`check_orx`, `hooks/tezgah_research.py::check_orx`); a slug after `--` is never read as a flag, which is how the MCP tool `tezgah_research_check` passes its validated `slug` | 0 clean, 1 a line failed a rule or names no line |
|
|
292
|
+
| `tezgah-research init <slug> [--question "..."] [--class R1..R12] [--allow-open "<reason>"] [--supersedes <slug>]` | scaffolds the line and makes sure `.tezgah/` is ignored by the project and has its own git repository (`tezgah_paths.ensure_workspace`). It refuses while another line is still open (see below), names each open line and its reasons one per line, and `--allow-open "<reason>"` is the way past unless an open line has `check` errors: the reason lands in the new line's `log.md` as its first entry, and an empty reason is misuse. A `--question` another line already asks is refused unless `--supersedes <that line>` says the new line is its next version (`serial_twins`). `--class` writes `state.question_class` and prints `obligations: <step>, ...` (`obligations`), the tier's `budget <slug>: sources a/b searches c/d runs e/f` (`budget`) and `overlap: <line>/<claim> <status> <similarity>` for each done claim close to the question (`overlaps`); `--class R0` exits 1 (`R0 gets no line`) before any other argument is read. Its next-step message names the commit loop: `tezgah-research commit` for the protocol, then again for the results in a later commit (`cmd_init`, `bin/tezgah-research`) | 0, 1 refused, 2 misuse |
|
|
293
|
+
| `tezgah-research commit <slug> "<message>"` | stages and commits only that line's path in `.tezgah`'s private repository - the commit the order rule reads (`cmd_commit`, `bin/tezgah-research`). With nothing left to commit it prints `nothing to commit: <paths> is already committed in <workspace>` and exits 0 | 0 (also with nothing to commit), 1 not a work tree or git failed, 2 misuse |
|
|
294
|
+
| `tezgah-research check [<slug>] [--json] [--strict] [--orx] [--online] [--all-lines] [-- <slug>]` | the discipline checks below. With no slug it checks the open lines in full and a line under `done/` by its order seal alone (`done_seal`, `hooks/tezgah_research.py::done_seal`), naming it only when the seal fails or its `state.json` or seal cannot be read, then prints `research: <n> done line(s): <s> checked by their seal, <u> unsealed (not checked); ...`; `--all-lines` checks every line in full, and `check <slug>` always checks that line in full (ADR 015). `--json` prints the report (no-slug default: the open lines and any done line whose seal read fails), `--strict` turns the unverifiable class into a refusal, `--orx` adds the registry check that asks `orx project view` for this repository (`check_orx`, `hooks/tezgah_research.py::check_orx`) and, on a rules-8 line, the run census; `--online` re-fetches a rules-8 line's citation receipts; a slug after `--` is never read as a flag, which is how the MCP tool `tezgah_research_check` passes its validated `slug`. A rules-8 line (`_check_rules8`) also prints report lines that are never counted - `certainty`, `stats`, `effect`, `instrument`, `ppi`, `stopping`, `online`, `budget` - and `--json` adds its per-claim `certainty` | 0 clean, 1 a line failed a rule or names no line |
|
|
240
295
|
| `tezgah-research status` | one line per line: an open line `ok` or a problem count, a line under `done/` read by its seal like the no-slug `check` - `done, seal ok`, `done, <n> seal problem(s)` or `done, unsealed (not checked)` (`summary`, `hooks/tezgah_research.py::summary`, plan 058 part 4) | 0 |
|
|
241
296
|
| `tezgah-research --all` | every checkout of this repository (the main checkout and each linked `git worktree`, `tezgah_paths.worktrees`), one header per checkout, then ` <slug>: <phase>` per line with the reasons it is still open; a checkout with none says `no research line`. Read-only: each checkout keeps its own `.tezgah`, locks and private repository, and nothing here writes to any of them (`across`, `hooks/tezgah_research.py::across`) | 0, 2 misuse |
|
|
242
297
|
| `tezgah-research claim <slug>` | reads one claim from stdin and either appends it under an exclusive lock or refuses it, printing one reason per problem | 0, 1 refused, 2 misuse |
|
|
@@ -777,6 +832,732 @@ The consequences:
|
|
|
777
832
|
Rules 1-6, `FROZEN_PATHS` and ADR 009 stay as they were. Predictions and
|
|
778
833
|
components take nothing new. `research-off` covers this method too.
|
|
779
834
|
|
|
835
|
+
## Rules 8: captured evidence and computed certainty
|
|
836
|
+
|
|
837
|
+
A rules-7 line takes the session's word for three things. A cited paper exists, a
|
|
838
|
+
quote stands in it, and a number came from a run. Rules 8 make the tool fetch
|
|
839
|
+
and store those bytes. `check` then re-derives each claim's
|
|
840
|
+
support from them and computes a certainty level per claim. No claim states its
|
|
841
|
+
own level. The capture commands are `hooks/tezgah_research_capture.py::COMMANDS`.
|
|
842
|
+
The instrument, release and calibration commands are
|
|
843
|
+
`hooks/tezgah_research_evidence.py::COMMANDS`. The statistics in
|
|
844
|
+
`hooks/tezgah_research_stats.py` use the standard library only.
|
|
845
|
+
`_check_rules8` (`hooks/tezgah_research.py::_check_rules8`) runs the capture
|
|
846
|
+
checks, the core checks and the certainty engine, in that order.
|
|
847
|
+
|
|
848
|
+
A line whose `state.json` `rules` is below 8 keeps every rule it had, and nothing
|
|
849
|
+
in this section reads it (`hooks/tezgah_research.py::_evidence`). It still gets
|
|
850
|
+
the claim-number rule under `--strict` and the INDEX `verified` warning. A rules-8
|
|
851
|
+
line gets `untraced-number` and the receipts instead. A missing obligation there
|
|
852
|
+
lowers a level and never refuses, not even under `--strict`.
|
|
853
|
+
|
|
854
|
+
### What `check` prints for a rules-8 line
|
|
855
|
+
|
|
856
|
+
`check` keeps its `FAIL <slug>:` and `warn <slug>:` lines. A rules-8 line adds
|
|
857
|
+
report lines after them, and they never count as problems: `certainty`, `stats`,
|
|
858
|
+
`effect`, `instrument`, `ppi`, `stopping`, `online` and `budget`. Under
|
|
859
|
+
`check --json` the line's row carries them as `report`. It also carries
|
|
860
|
+
`certainty`, one `{level, start, steps}` object per claim id
|
|
861
|
+
(`hooks/tezgah_research.py::check_line`). Every new command exits 0 when done. It
|
|
862
|
+
exits 1 on a refusal, prints `FAIL <slug>: <reason>` and writes nothing. It exits
|
|
863
|
+
2 on misuse.
|
|
864
|
+
|
|
865
|
+
`TEZGAH_CAPTURE_MAP=<json file>` answers every HTTP call of the capture commands
|
|
866
|
+
and of `check --online` from a map of URL to body file. Tests and offline runs use
|
|
867
|
+
it (`hooks/tezgah_research_capture.py::fetch_url`). `TEZGAH_ORX_BIN` overrides
|
|
868
|
+
the `orx` lookup.
|
|
869
|
+
|
|
870
|
+
### The question class: `init --class`
|
|
871
|
+
|
|
872
|
+
A complete command for a measured R6 line:
|
|
873
|
+
|
|
874
|
+
```
|
|
875
|
+
tezgah-research init cache-latency --ask "does the cache cut p95?" \
|
|
876
|
+
--question "Does the read cache cut p95 latency of the read path?" \
|
|
877
|
+
--method measured --class R6 --in "p95 of the read path" --out "write path"
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
Leave out `--question` and `check` refuses the line with
|
|
881
|
+
`state.json records no question`. `--class` writes `state.json` `question_class`.
|
|
882
|
+
`--class R0` exits 1 with `R0 gets no line` before any other argument counts
|
|
883
|
+
(`bin/tezgah-research::cmd_init`). An R0 question is factual or reference, and the
|
|
884
|
+
reply answers it. A new line owes more before `check` passes clean. It owes the
|
|
885
|
+
success criteria of "The ask contract" and the protocol labels of "Protocol
|
|
886
|
+
sections (rules 4)". It owes the scope of "Scope lock (rules 5)" and, on a
|
|
887
|
+
measured line, the committed evaluation lock under "What `check` refuses". It
|
|
888
|
+
writes four formats by hand, and `check` reads each one:
|
|
889
|
+
|
|
890
|
+
- An INDEX row's `note` is a path relative to `literature/`: `smith2020.md` names
|
|
891
|
+
`literature/smith2020.md`. A path with `..`, or one `literature/` does not hold,
|
|
892
|
+
fails with `which literature/ does not hold` (`hooks/tezgah_research.py::_read_index`).
|
|
893
|
+
- A claim's `provenance` and the `tag` of each `state.json` session entry take
|
|
894
|
+
one of four values (`hooks/tezgah_research.py::PROVENANCE`). `user`: the user
|
|
895
|
+
stated or confirmed it. `ai-suggested`: the session inferred it and nobody
|
|
896
|
+
confirmed it. `ai-executed`: the session ran or wrote it. `user-revised`: the
|
|
897
|
+
session suggested it and the user corrected it.
|
|
898
|
+
- `to_human/review.json` scores six `dimensions`: `evidence_relevance`,
|
|
899
|
+
`falsifiability`, `scope_calibration`, `argument_coherence`,
|
|
900
|
+
`exploration_integrity` and `methodological_rigour`
|
|
901
|
+
(`hooks/tezgah_research.py::REVIEW_DIMENSIONS`). Each score is an integer from 1
|
|
902
|
+
to 5. A missing score or one outside that range fails
|
|
903
|
+
(`hooks/tezgah_research.py::_check_review`).
|
|
904
|
+
- `state.json` `deliverable` is an object. Its `kind` is one of
|
|
905
|
+
`DELIVERABLE_KINDS`, and "Variants of the deliverable" covers its variant count.
|
|
906
|
+
`path` names the deliverable's file, read relative to the line first and then
|
|
907
|
+
to the repository (`hooks/tezgah_research.py::_deliverable_file`). `ask`, when
|
|
908
|
+
present, is a list of the ask's items, each a non-empty string. Anything else
|
|
909
|
+
fails with `state.json deliverable ask is not a list of the ask's items`
|
|
910
|
+
(`hooks/tezgah_research.py::deliverable_problems`).
|
|
911
|
+
|
|
912
|
+
With a class, `init` prints three more things:
|
|
913
|
+
|
|
914
|
+
- `obligations: <step>, <step>, ...` lists every certainty step the class can
|
|
915
|
+
trigger (`hooks/tezgah_research.py::obligations`).
|
|
916
|
+
- `budget <slug>: sources a/b searches c/d runs e/f` counts INDEX rows, SEARCHES
|
|
917
|
+
rows and `source: orx:` results rows against the tier's caps
|
|
918
|
+
(`hooks/tezgah_research.py::BUDGETS`). The caps are starting values: quick
|
|
919
|
+
10/10/10, study 30/40/40, program 100/150/200. `check` prints the same line and
|
|
920
|
+
warns `over budget` past any cap (`hooks/tezgah_research.py::budget`).
|
|
921
|
+
- `overlap: <line>/<claim> <status> <similarity>` names each claim of a done line
|
|
922
|
+
whose similarity to the question reaches 0.5
|
|
923
|
+
(`hooks/tezgah_research.py::overlaps`).
|
|
924
|
+
|
|
925
|
+
The class fixes the methods a line may take (`hooks/tezgah_research.py::CLASS_METHODS`)
|
|
926
|
+
and adds its own steps (`hooks/tezgah_research.py::CLASS_STEPS`):
|
|
927
|
+
|
|
928
|
+
| Class | Methods | Class steps (each -1 on every claim) |
|
|
929
|
+
|---|---|---|
|
|
930
|
+
| R1 | qualitative | none |
|
|
931
|
+
| R2 | qualitative | `no-grey-quality`: a grey INDEX row without `quality` |
|
|
932
|
+
| R3 | qualitative, measured | `no-population`: state lacks `population` or `n` |
|
|
933
|
+
| R4 | measured | `no-confounders`: a protocol without `confounders:` |
|
|
934
|
+
| R5 | measured | `fewer-than-two-rivals`, and `no-positive-control`: a measured protocol without `control:` |
|
|
935
|
+
| R6 | measured | `fewer-than-two-rivals`: fewer than two `rival: <text> excludes: <text>` protocol lines |
|
|
936
|
+
| R7 | qualitative | `no-dual-screening`: a screened record with fewer than two screeners, and `no-recall-stopping`: `stopping.rule` is not `hypergeometric` |
|
|
937
|
+
| R8 | qualitative | `no-dual-screening`: under 20% of records dual-screened, or a dropped record screened once |
|
|
938
|
+
| R9 | qualitative | `no-amstar`: an INDEX row without `amstar` |
|
|
939
|
+
| R10 | qualitative | `no-codebook`: no `codebook.md` in the line |
|
|
940
|
+
| R11 | exploratory | none |
|
|
941
|
+
| R12 | qualitative, measured | `fewer-than-two-approaches`: fewer than two `state.approaches` entries with `biases` |
|
|
942
|
+
|
|
943
|
+
Every class can also take `no-question-class` (no class at all), `class-unreviewed`
|
|
944
|
+
(the review's `question_class` is absent or differs) and `method-not-allowed`
|
|
945
|
+
(`hooks/tezgah_research.py::_routing_steps`). A search line is a line of class R1,
|
|
946
|
+
R2 or R7 to R10, a `qualitative` line, or a line with no class.
|
|
947
|
+
|
|
948
|
+
### Capture: `cite`, `fetch`, `search`, `source`
|
|
949
|
+
|
|
950
|
+
The tool fetches what a line cites, never the session. Each capture command
|
|
951
|
+
writes its files, appends its ledger rows and commits exactly those files as
|
|
952
|
+
`capture: <command> <slug>` (`hooks/tezgah_research_capture.py::commit_capture`).
|
|
953
|
+
The commit lands in the workspace's own repository, or in the project's when the
|
|
954
|
+
project tracks the workspace.
|
|
955
|
+
|
|
956
|
+
**`tezgah-research cite <slug>`** queries `arxiv`, `crossref`, `openalex` and
|
|
957
|
+
`semanticscholar` (`hooks/tezgah_research_capture.py::PROVIDERS`) for every formal
|
|
958
|
+
INDEX row whose `id` is an arXiv id or a DOI. A `pubmed:<pmid>` row goes to
|
|
959
|
+
`pubmed`. An `openalex:W<n>`, `s2:<paperId>` or `pubmed:<pmid>` id resolves through its
|
|
960
|
+
own registry alone, so it takes the step `one-provider`
|
|
961
|
+
(`hooks/tezgah_research_capture.py::receipt_urls`). Each answer of status 200
|
|
962
|
+
becomes a row of `literature/.receipts/RECEIPTS.jsonl`, and its raw bytes go to
|
|
963
|
+
`literature/.receipts/<sha256>.raw`. Any other status, such as a 404 or a 429,
|
|
964
|
+
prints `receipt <id> <provider>: status <n>, not recorded` and writes nothing. A
|
|
965
|
+
later `check --online` would read such an answer as drift, which is why it is not
|
|
966
|
+
recorded. A row filed by an older `cite` at another status is never compared. With no 200 at all,
|
|
967
|
+
`cite` prints `no registry answered 200, so nothing was written`
|
|
968
|
+
(`hooks/tezgah_research_capture.py::cmd_cite`). `cite` skips any other id and prints
|
|
969
|
+
`is not an arXiv, DOI, OpenAlex, Semantic Scholar or PubMed id`. With nothing to
|
|
970
|
+
cite it prints `no formal row with an arXiv, DOI, OpenAlex, Semantic Scholar or
|
|
971
|
+
PubMed id to cite`.
|
|
972
|
+
It exits 0 even when nothing resolves, because judging the receipts is `check`'s
|
|
973
|
+
job (`hooks/tezgah_research_capture.py::cmd_cite`). The INDEX may write an id as a bare DOI
|
|
974
|
+
such as `10.1145/abc.1`. It may also write a bare arXiv id in new or old style
|
|
975
|
+
(`1805.08612`, `hep-th/9901001`) or an `arxiv.org` abs, pdf or html URL. Each
|
|
976
|
+
reads as `doi:` or `arXiv:<id>`. A JSON number is never an id
|
|
977
|
+
(`hooks/tezgah_research_capture.py::norm_id`). `check`
|
|
978
|
+
reads the receipts offline and judges only those for an id the INDEX holds now
|
|
979
|
+
(`hooks/tezgah_research_capture.py::_check_receipts`):
|
|
980
|
+
|
|
981
|
+
- `check` refuses a receipt row that a re-parse of its raw bytes contradicts:
|
|
982
|
+
`not derived from its capture`.
|
|
983
|
+
- A resolved receipt counts for the INDEX id only when its raw bytes name that id
|
|
984
|
+
(`hooks/tezgah_research_capture.py::receipt_ids`). A receipt whose raw bytes name
|
|
985
|
+
another id for the same work does not count for it, and `check` does not refuse
|
|
986
|
+
it. It warns once:
|
|
987
|
+
`the <provider> receipt for <id> names <ids>, not that id, so it does not count for it`.
|
|
988
|
+
The INDEX row then resolves through the other providers, or fails with
|
|
989
|
+
`resolves in no registry`.
|
|
990
|
+
A receipt's `url` has to be the provider's receipt URL for that id. Else the refusal
|
|
991
|
+
reads `<url> is not the <provider> receipt URL for that id (<expected>)`. A
|
|
992
|
+
refused receipt resolves nothing.
|
|
993
|
+
- It refuses a formal row that no receipt resolves: `resolves in no registry`. A
|
|
994
|
+
formal row with an empty `id` gets the same refusal. A row with
|
|
995
|
+
`unindexed_reason` takes the step `unindexed-source` instead.
|
|
996
|
+
- A row that one provider alone resolves, with an agreeing header, takes the step
|
|
997
|
+
`one-provider` (`hooks/tezgah_research_capture.py::citation_verdict`). An
|
|
998
|
+
alphaXiv or `orx paper` record counts as `arxiv`.
|
|
999
|
+
- An INDEX `title`, `year` or `first_author` that agrees with no resolved
|
|
1000
|
+
receipt takes `header-mismatch`. Titles agree at a word overlap of 0.5 or more
|
|
1001
|
+
(`hooks/tezgah_research_capture.py::title_agrees`). Years agree within one, for
|
|
1002
|
+
a preprint against its venue year.
|
|
1003
|
+
- `check --online` fetches up to ten receipts recorded from a 200 again from the
|
|
1004
|
+
provider's receipt URL. It never compares a row of another status
|
|
1005
|
+
(`hooks/tezgah_research_capture.py::_check_receipts`). A changed id, title, author or year prints
|
|
1006
|
+
`online <slug>: <id> <provider> <field> drifted`, for instance
|
|
1007
|
+
`online <slug>: <id> <provider> id drifted`, and takes `online-drift`.
|
|
1008
|
+
|
|
1009
|
+
**`tezgah-research fetch <slug> <note> [--file <path> --ack "<the user's words>" | --orx]`**
|
|
1010
|
+
stores the passages of a source around every quote the line makes of it. The URL
|
|
1011
|
+
always comes from a receipt. The first step that yields text decides the capture
|
|
1012
|
+
(`hooks/tezgah_research_capture.py::cmd_fetch`):
|
|
1013
|
+
|
|
1014
|
+
| Step | Source | Access |
|
|
1015
|
+
|---|---|---|
|
|
1016
|
+
| 1 | `--file <path>` (needs `--ack "<the user's words>"`, else exit 2), or `--orx` | `user`, or `full` |
|
|
1017
|
+
| 2 | an arXiv id: `https://arxiv.org/html/<id>` answering 200 | `full` |
|
|
1018
|
+
| 3 | a DOI: the OpenAlex receipt's `open_access.oa_url` answering 200 with no PDF body and holding a work's body (below) | `full` |
|
|
1019
|
+
| 4 | `orx paper --full <id>`, when orx is installed and prints text | `full`; `abstract` when the text is short and holds none of the line's quotes |
|
|
1020
|
+
| 5 | the abstract of a resolved receipt | `abstract` |
|
|
1021
|
+
| 6 | nothing yielded text: the record names the reason, exit 0 | `none` |
|
|
1022
|
+
|
|
1023
|
+
An `oa_url` page holds a work's body when its text has `BODY_SENTENCES` (100)
|
|
1024
|
+
distinct sentences of `BODY_WORDS` (10) or more words
|
|
1025
|
+
(`hooks/tezgah_research_capture.py::body_sentences`). A repository landing page
|
|
1026
|
+
holds the metadata and the abstract, and falls short. When step 4 yields no text
|
|
1027
|
+
either, `fetch` keeps that page as access `abstract`, with the `oa_url` as its
|
|
1028
|
+
url. Its reason reads `the open-access page holds <n> distinct sentences of 10+
|
|
1029
|
+
words, under the 100 of a work's body: a landing page`. A quote that page lacks
|
|
1030
|
+
costs the step `abstract-only`, never a refusal.
|
|
1031
|
+
|
|
1032
|
+
Step 4 takes the same body test. Text under 100 such sentences that holds one of
|
|
1033
|
+
the line's quotes still backs it, so it stays `full`. Text that holds none is
|
|
1034
|
+
`abstract` - orx's metadata and abstract for a paper it cannot read whole - and
|
|
1035
|
+
its reason reads `orx held <n> distinct sentences of 10+ words, under the 100 of
|
|
1036
|
+
a work's body, and none of the line's <n> quotes: metadata and abstract, not full
|
|
1037
|
+
text`. A quote the stub lacks costs `abstract-only`, never a refusal.
|
|
1038
|
+
|
|
1039
|
+
The quotes come from three places. One is a citing claim's `quote` field. Another
|
|
1040
|
+
is each double-quoted span of three or more words in its `statement`. The last is
|
|
1041
|
+
each `> "..."` blockquote of the note. A quote splits on `...`, `…` and `[...]`.
|
|
1042
|
+
Each fragment of three or more words has to appear in order. `fetch` keeps the
|
|
1043
|
+
whole extracted text in `literature/.sources/<sha256>.txt`, and its record names
|
|
1044
|
+
it as `text_file` with `text_sha256`. `check` looks for each quote in that text,
|
|
1045
|
+
in the stored passages and in the abstracts of the receipts for the note's id
|
|
1046
|
+
(`hooks/tezgah_research_capture.py::_found`). Normalisation drops citation
|
|
1047
|
+
markers, also one split by tags or spaces such as `[ 12 ]`. A hyphen between two
|
|
1048
|
+
letters reads as a space. Inner quotation marks are optional: curly or straight,
|
|
1049
|
+
single or double, in the quote and in the text. Where an extraction dropped a
|
|
1050
|
+
space (`human-inthe-loop` for `human-in-the-loop`), a quote still matches with its
|
|
1051
|
+
spaces optional, its letters in order (`hooks/tezgah_research_capture.py::_locate`). A TeX command beside rendered
|
|
1052
|
+
math (`∼ \sim`) drops, `∼` reads as `~`, and a space beside a math symbol drops
|
|
1053
|
+
(`hooks/tezgah_research_capture.py::normalise`). `check`
|
|
1054
|
+
refuses a record whose text file is gone with `has no capture`, and one whose
|
|
1055
|
+
text file hashes otherwise with `hash mismatch`
|
|
1056
|
+
(`hooks/tezgah_research_capture.py::_source_text`). The record lands in
|
|
1057
|
+
`literature/.sources/<sha256>.json` with the 300 characters either side of each
|
|
1058
|
+
match, and `literature/.sources/SOURCES.jsonl` gets its row. A SOURCES row sets
|
|
1059
|
+
access only through its own `literature/.sources/*.json` record for that note,
|
|
1060
|
+
never through its own `access` field
|
|
1061
|
+
(`hooks/tezgah_research_capture.py::_source_records`). A claim's proof may end a
|
|
1062
|
+
note path with `.`, `,`, `;`, `:` or `)`, and the note still counts as cited
|
|
1063
|
+
(`hooks/tezgah_research_capture.py::cited_tokens`). The note's latest record
|
|
1064
|
+
decides what `check` does
|
|
1065
|
+
(`hooks/tezgah_research_capture.py::_check_sources`):
|
|
1066
|
+
|
|
1067
|
+
- `full` or `user`: `check` looks for each quote of the note's own blockquotes in
|
|
1068
|
+
its capture. It looks for a claim's quote in the captures of every note the
|
|
1069
|
+
claim cites. It refuses that quote only when every cited note holds full text
|
|
1070
|
+
and none of them holds the quote. A cited note without full text already
|
|
1071
|
+
narrows the claim by its step. The refusal names the notes it searched:
|
|
1072
|
+
`claim <id>: "<quote>": quote not in the captured source text (searched literature/<a>, literature/<b>; ...)`
|
|
1073
|
+
(`hooks/tezgah_research_capture.py::_quote_missing`). The message names the two
|
|
1074
|
+
exits. Rephrase a non-quote without quotation marks, or `fetch --file` the
|
|
1075
|
+
version quoted. `check` skips the quotes of a claim that another row
|
|
1076
|
+
supersedes (`hooks/tezgah_research.py::_superseded`).
|
|
1077
|
+
- `abstract`: claims citing the note take `abstract-only`.
|
|
1078
|
+
- `none`, or no capture: they take `source-not-captured`, a ceiling.
|
|
1079
|
+
- A concluded line with formal rows owes the share of its sources without full
|
|
1080
|
+
text in its report. The share counts a source with no capture, an `abstract`
|
|
1081
|
+
capture or a `none` capture alike. Any of `closed-access: <k> of <n>`,
|
|
1082
|
+
`not full text: <k> of <n>` or `abstract-only: <k> of <n>` states it. A missing
|
|
1083
|
+
share warns `report states no closed-access share: <k> of <n> sources have no full text`
|
|
1084
|
+
and names the three forms (`hooks/tezgah_research_capture.py::_check_sources`).
|
|
1085
|
+
The line also owes `user-supplied: <k> of <n> sources` when a latest record is `user`.
|
|
1086
|
+
Both rules are soft.
|
|
1087
|
+
|
|
1088
|
+
**`tezgah-research search <slug> --tag primary|snowball|counter|known [--item "<scope.in item>"] -- <connector> <args...>`**
|
|
1089
|
+
stores a connector's raw output in `searches/raw/<sha256>.raw` and one row of
|
|
1090
|
+
`searches/SEARCHES.jsonl`. Its `hits` and `ids` come from the raw bytes
|
|
1091
|
+
(`hooks/tezgah_research_capture.py::cmd_search`). The allowlist is the four
|
|
1092
|
+
registries, PubMed, Scopus, ACM DL, `orx discover` and `orx paper`. Any other
|
|
1093
|
+
connector exits 1 with `connector not on the allowlist`. PubMed is E-utilities
|
|
1094
|
+
`esearch` and yields `pubmed:<pmid>` ids. Scopus is the Elsevier search API. It
|
|
1095
|
+
needs an API key in `TEZGAH_SCOPUS_KEY`, and without it `search` exits 2 naming the
|
|
1096
|
+
variable. Its entries yield their DOIs. `dl.acm.org` answers a browser check with
|
|
1097
|
+
403, so ACM DL reads through Crossref's ACM member (320) and yields its DOIs. `--tag counter` without an `--item` equal to a
|
|
1098
|
+
`scope.in` entry exits 2. A search that does not answer 200 exits 1 and writes
|
|
1099
|
+
nothing. An answer that does not parse as that connector's response exits 1 with
|
|
1100
|
+
`does not parse as a <connector> response; nothing was written`. An answer
|
|
1101
|
+
byte-identical to an earlier search's capture writes no row, and `search` says so
|
|
1102
|
+
and exits 0. The session screens by hand, one row per decision in
|
|
1103
|
+
`searches/screening.jsonl`: `{"search", "id", "decision": "kept"|"dropped", "reason", "screener"}`.
|
|
1104
|
+
`check` refuses a SEARCHES or SOURCES row with no `file`:
|
|
1105
|
+
`<SEARCHES|SOURCES> row <n> names no file, so it has no capture`
|
|
1106
|
+
(`hooks/tezgah_research_capture.py::_check_ledger_files`). It also refuses a
|
|
1107
|
+
SEARCHES row whose file lies outside `searches/raw/`, or whose capture another
|
|
1108
|
+
row already names. Both messages end `so it has no capture`
|
|
1109
|
+
(`hooks/tezgah_research_capture.py::_check_searches`). `check` refuses a capture
|
|
1110
|
+
that does not parse under its row's connector with `not derived from its capture:
|
|
1111
|
+
<file> does not parse as a <connector> response`
|
|
1112
|
+
(`hooks/tezgah_research_capture.py::schema_ok`). It refuses a row whose `hits` or
|
|
1113
|
+
`ids` a re-parse contradicts the same way. Only a row that passes these counts toward a
|
|
1114
|
+
connector, a counter search or saturation. A screening row for an id that no
|
|
1115
|
+
captured search returned takes the step `screened-outside-search`.
|
|
1116
|
+
|
|
1117
|
+
On a search line, claims that cite literature take these steps
|
|
1118
|
+
(`hooks/tezgah_research_capture.py::_check_searches`). `one-connector` means fewer
|
|
1119
|
+
than two connectors. `no-counter-search` means a `scope.in` item with no `counter`
|
|
1120
|
+
search. `known-item-missed` means a `state.known_items` id that no capture holds.
|
|
1121
|
+
The other two are `no-stopping-rule` and `stopping-not-met`. `state.stopping` names the stopping
|
|
1122
|
+
rule. It has to enter the history before the first search row, or the line takes
|
|
1123
|
+
`no-stopping-rule`:
|
|
1124
|
+
|
|
1125
|
+
- `{"rule": "hypergeometric", "recall": t, "confidence": c}` runs buscarpy's
|
|
1126
|
+
recall test (Callaghan and Müller-Hansen, 2020) over the screening order
|
|
1127
|
+
(`hooks/tezgah_research_stats.py::hypergeometric_p`). It holds when p < 1 - c,
|
|
1128
|
+
and `check` prints `stopping <slug>: hypergeometric p=<p> met|not met`.
|
|
1129
|
+
- `{"rule": "saturation", "run": R}` holds when the last R search rows add no new
|
|
1130
|
+
record.
|
|
1131
|
+
- `{"rule": "pragmatic", "risk": "<text>"}` always holds and names the risk taken.
|
|
1132
|
+
|
|
1133
|
+
**`tezgah-research source <slug> <h> --run <id> [--instrument <name>] [--arm <a>] [--item <i>] [--value <field>=<number>]... [--ack "<the user's words>"]`**
|
|
1134
|
+
writes its results row itself (`hooks/tezgah_research.py::source_run`). On a
|
|
1135
|
+
rules-8 line it first asks git for a commit that holds the evaluation lock. It
|
|
1136
|
+
refuses before writing anything when it finds none:
|
|
1137
|
+
`the evaluation lock is not committed: no committed state.json holding the metric and the baseline precedes this capture`.
|
|
1138
|
+
The message names the way out, `tezgah-research commit <slug> "<message>"`. A
|
|
1139
|
+
line with no `evaluation` is exempt, as in `check`
|
|
1140
|
+
(`hooks/tezgah_research.py::_orders_lock`). An exploratory line's lock is its
|
|
1141
|
+
arena. `source` refuses there when no committed `state.json` holding the arena
|
|
1142
|
+
precedes the capture: `the arena is not committed`. On a rules-8 line it also
|
|
1143
|
+
refuses before writing when the experiment's `protocol.md` is not committed
|
|
1144
|
+
(`experiments/<h>/protocol.md is not committed`), or carries an invalid record
|
|
1145
|
+
(`experiments/<h>/protocol.md carries an invalid record`). It refuses a protocol
|
|
1146
|
+
whose `metric:` list holds no locked metric, by the rule `check` applies below:
|
|
1147
|
+
`experiments/<h>/protocol.md registers a metric other than the locked one`
|
|
1148
|
+
(`hooks/tezgah_research.py::metric_problem`). The capture commits its results at
|
|
1149
|
+
once, and the protocol cannot change after that. Each of these messages names
|
|
1150
|
+
`tezgah-research commit` as the way out and ends `nothing was written`.
|
|
1151
|
+
|
|
1152
|
+
`orx logs` may print a summary in place of the log: the path to the full log
|
|
1153
|
+
file and its size. `source` then reads that file and checks its size against the
|
|
1154
|
+
count orx printed (`hooks/tezgah_research.py::_full_log`). It stores the whole
|
|
1155
|
+
log, printed or read from that file. A log above 16 MiB meets
|
|
1156
|
+
`RUN_LOG_BOUND` and exits 1
|
|
1157
|
+
(`hooks/tezgah_research.py::RUN_LOG_BOUND`), unless `--ack "<the user's words>"`
|
|
1158
|
+
says to keep it. The log then lands whole and the row records the `ack`. Four
|
|
1159
|
+
messages refuse a log it cannot hold:
|
|
1160
|
+
|
|
1161
|
+
- `printed the log's path without its size`
|
|
1162
|
+
- `bytes, above the <bound>-byte bound a receipt is committed under`, which names
|
|
1163
|
+
`--ack`
|
|
1164
|
+
- `cannot read the log orx logs <run> names`
|
|
1165
|
+
- `the run is still writing it or it changed since`
|
|
1166
|
+
|
|
1167
|
+
`--ack` files a log above the bound and the row records the words. The row names
|
|
1168
|
+
`run`, the arm, the item and each value as a number.
|
|
1169
|
+
`--instrument <name>` writes `instrument`, `--arm` writes `arm` and `--item`
|
|
1170
|
+
writes `item`, each without the others. A row with `instrument` and `item` is one
|
|
1171
|
+
`gold` and `label` read. When the line names an orx project
|
|
1172
|
+
the row also holds the engine's `status`. `source` matches `--value` against the
|
|
1173
|
+
whole log, by one number reader (`hooks/tezgah_research_capture.py::log_numbers`). It
|
|
1174
|
+
reads thousands separators, so `12,345` is 12345, and exponents such as
|
|
1175
|
+
`1.2e-3`, which `--value k=1.2e-3` also accepts. It reads a number with a unit
|
|
1176
|
+
glued on as that number: `22.3ms`, `1.2s`, `512MB`, `3.2x` and `45%`
|
|
1177
|
+
(`hooks/tezgah_research_capture.py::LOG_NUMBER`). A number glued to letters in
|
|
1178
|
+
front, such as `r1` or `h2`, stays no number. A value matches a logged number
|
|
1179
|
+
by numeric equality, so `1.5` matches `1.50`. A value with no equal number in the
|
|
1180
|
+
stored log exits 1 with
|
|
1181
|
+
`value not in the run log (orx logs <run> holds no number equal to <v>)`. A
|
|
1182
|
+
reserved key (`source`, `log`, `run`, `instrument`, `arm`, `item`, `scope`,
|
|
1183
|
+
`fixture`, `status`, `command`, `ack`) as `--value` exits 2. A second filing of one run
|
|
1184
|
+
writes `raw/<run>.<n>.log` and a second row. A refile is a correction. The latest
|
|
1185
|
+
row filed for the same `run`, arm, item and instrument stands for it
|
|
1186
|
+
(`hooks/tezgah_research.py::_live`). So a run filed once per arm or item keeps
|
|
1187
|
+
every row, and every count and statistic counts each such row once. A row with
|
|
1188
|
+
no `run` counts on its own.
|
|
1189
|
+
`check --orx` reads `orx runs` for the census. It takes a JSON answer, or the
|
|
1190
|
+
table orx 0.2.20 prints instead, which is all it has (no `--json`). The table's
|
|
1191
|
+
`ID` and `STATUS` columns are the run and its status
|
|
1192
|
+
(`hooks/tezgah_research_capture.py::_runs_table`). An answer that is neither warns
|
|
1193
|
+
`printed neither JSON nor a run table`. It warns `orx run <id> has no results
|
|
1194
|
+
row` for an engine run that no row names. A row with status `aborted` or `failed` stays a row and counts in no
|
|
1195
|
+
group.
|
|
1196
|
+
|
|
1197
|
+
**Write once.** The capture files live under `literature/.receipts/`,
|
|
1198
|
+
`literature/.sources/`, `searches/raw/`, `experiments/*/raw/` and
|
|
1199
|
+
`instruments/gold/`. A command whose target exists with other bytes exits 1 with
|
|
1200
|
+
`capture exists` (`hooks/tezgah_research_capture.py::write_captures`). The
|
|
1201
|
+
ledgers only grow. `check` refuses what changed anyway
|
|
1202
|
+
(`hooks/tezgah_research_capture.py::_check_write_once`,
|
|
1203
|
+
`hooks/tezgah_research_capture.py::_check_ledger_files`):
|
|
1204
|
+
|
|
1205
|
+
- a capture file that differs from the blob its first commit added
|
|
1206
|
+
(`changed after its first commit`)
|
|
1207
|
+
- a ledger row that a later version dropped, changed or moved:
|
|
1208
|
+
`a row changed, moved or went missing after its first commit; a ledger is append-only`.
|
|
1209
|
+
The rows of each earlier version have to stay in the latest one in their order.
|
|
1210
|
+
Two branches that appended and merged pass. `check` refuses a reordered ledger,
|
|
1211
|
+
because its readers take the latest SOURCES record, the first label and the
|
|
1212
|
+
first gold draw.
|
|
1213
|
+
- a ledger row whose file does not hash to its `sha256`: `hash mismatch`.
|
|
1214
|
+
|
|
1215
|
+
Each RECEIPTS and SEARCHES row records `parser`, the version of the parser that
|
|
1216
|
+
derived it (`hooks/tezgah_research_capture.py::PARSER`). A row without the field
|
|
1217
|
+
reads as version 0. `check` re-derives every row under the current parser, so no
|
|
1218
|
+
row is held to its hash on its own say-so. A later tezgah wrote any row that names
|
|
1219
|
+
a newer version than the tool's, and `check` refuses it
|
|
1220
|
+
(`hooks/tezgah_research_capture.py::_newer`):
|
|
1221
|
+
`names parser version <v>, newer than this check's 1`.
|
|
1222
|
+
|
|
1223
|
+
The append-only ledgers are read across every ref, as the results file is. The
|
|
1224
|
+
stopping-rule order and the capture files read the current branch's lineage only
|
|
1225
|
+
(`hooks/tezgah_research.py::file_versions`). A backdated side branch therefore
|
|
1226
|
+
cannot satisfy the stopping-rule order. These
|
|
1227
|
+
rules cannot see a capture that was false at its first write. `check --online` is
|
|
1228
|
+
the check for that case.
|
|
1229
|
+
|
|
1230
|
+
### How a claim's certainty is computed
|
|
1231
|
+
|
|
1232
|
+
The levels, low to high, are `very-low`, `low`, `moderate` and `high`. A claim
|
|
1233
|
+
below `moderate` is exploratory. Its start level is the highest over the parts
|
|
1234
|
+
its `proof` cites (`hooks/tezgah_research_evidence.py::start_level`):
|
|
1235
|
+
|
|
1236
|
+
| Part the proof cites | Start |
|
|
1237
|
+
|---|---|
|
|
1238
|
+
| results of an experiment whose protocol says `design: experiment` (the default with a `change:` line) | `high` |
|
|
1239
|
+
| results of an experiment with `design: observational` (the default without `change:`) | `low` |
|
|
1240
|
+
| a literature note whose INDEX `class` is `formal` | `moderate` |
|
|
1241
|
+
| a `grey` note | `low` |
|
|
1242
|
+
| an `agent-report` note | `very-low` |
|
|
1243
|
+
| a claim of `kind: code` | `high` |
|
|
1244
|
+
| a claim of `kind: derivation` | `moderate` |
|
|
1245
|
+
|
|
1246
|
+
Each step `check` finds for a claim either lowers the level by one or caps it at
|
|
1247
|
+
`low` (`hooks/tezgah_research_evidence.py::STEPS`). The decrements apply first,
|
|
1248
|
+
then the ceilings, and the floor is `very-low`. A step counts once per claim even
|
|
1249
|
+
when two parts trigger it (`hooks/tezgah_research_evidence.py::compute`). `check`
|
|
1250
|
+
prints one line per claim, in `claims.jsonl` order:
|
|
1251
|
+
|
|
1252
|
+
certainty <slug>: <id> <level> start=<level> steps=<step>,<step>|none
|
|
1253
|
+
|
|
1254
|
+
A claim may declare `"certainty": "<level>"`. `check` refuses a declared level
|
|
1255
|
+
above the computed one: `claim <id> declares certainty <declared> above the computed
|
|
1256
|
+
<level> (<steps>)`. On a concluded line, `to_human/report.md` owes one line per
|
|
1257
|
+
claim that names its id and its computed level word. A claim below `moderate`
|
|
1258
|
+
also owes `exploratory` on that line. A missing line warns
|
|
1259
|
+
`report states no certainty for claim <id>`, and `--strict` refuses it.
|
|
1260
|
+
|
|
1261
|
+
A narrowed claim, an `inconclusive` hypothesis and `close --limit` are normal
|
|
1262
|
+
outcomes of a rules-8 line. Lowering what a claim says is how a line meets a
|
|
1263
|
+
low level, not pushing harder for a bigger one.
|
|
1264
|
+
|
|
1265
|
+
The steps, by name as `check` prints them:
|
|
1266
|
+
|
|
1267
|
+
| Step | Effect | Trigger |
|
|
1268
|
+
|---|---|---|
|
|
1269
|
+
| `header-mismatch` | -1 | the INDEX header agrees with no resolved receipt |
|
|
1270
|
+
| `unindexed-source` | -1 | no receipt resolves the row, and it carries `unindexed_reason` |
|
|
1271
|
+
| `online-drift` | -1 | `check --online` saw a stable field change |
|
|
1272
|
+
| `abstract-only` | -1 | the note's latest capture has access `abstract` |
|
|
1273
|
+
| `source-not-captured` | ceiling | the note has no capture, or its latest has access `none` |
|
|
1274
|
+
| `one-connector` | -1 | search line: fewer than two connectors |
|
|
1275
|
+
| `no-counter-search` | -1 | search line: a `scope.in` item with no `counter` search |
|
|
1276
|
+
| `no-stopping-rule` | -1 | search line: `state.stopping` missing, invalid or committed after the first search |
|
|
1277
|
+
| `stopping-not-met` | -1 | the recomputed stopping rule does not hold |
|
|
1278
|
+
| `known-item-missed` | -1 | a `state.known_items` id is in no captured search |
|
|
1279
|
+
| `screened-outside-search` | -1 | a screening row names an id that no captured search returned |
|
|
1280
|
+
| `one-provider` | -1 | one provider alone resolves the formal id, and its header agrees |
|
|
1281
|
+
| `falsifier-not-evaluable` | -1 | a measured protocol's falsifier has neither a comparator with a number nor a named test with its alpha |
|
|
1282
|
+
| `fewer-than-two-rivals` | -1 | R5 or R6: fewer than two `rival:` lines |
|
|
1283
|
+
| `no-replication` | -1 | a group of a cited experiment holds fewer than two rows |
|
|
1284
|
+
| `no-power-plan` | -1 | a measured protocol lacks one of `alpha:`, `power:`, `mde:`, `n:` |
|
|
1285
|
+
| `below-planned-n` | -1 | a `compare:` group holds fewer rows than `n:` |
|
|
1286
|
+
| `no-interval` | ceiling | a `compare:` group has fewer than two rows |
|
|
1287
|
+
| `interval-includes-zero` | ceiling | improvement claim: the interval's lower bound is 0 or less |
|
|
1288
|
+
| `below-achieved-mde` | ceiling | improvement claim: the effect is below the achieved MDE |
|
|
1289
|
+
| `no-multiplicity-correction` | -1 | more than two groups and no `correction:` |
|
|
1290
|
+
| `fails-multiplicity` | ceiling | the declared correction does not reject the experiment |
|
|
1291
|
+
| `no-sesoi` | ceiling | a no-difference claim whose protocol has no `sesoi:` |
|
|
1292
|
+
| `tost-not-passed` | ceiling | a no-difference claim whose TOST fails |
|
|
1293
|
+
| `untraced-number` | -1 | a number of an evidence claim that no cited row and log, and no `derived_from`, holds |
|
|
1294
|
+
| `instrument-unvalidated` | ceiling | a cited row names an `unvalidated` instrument |
|
|
1295
|
+
| `instrument-rejected` | ceiling | a cited row names a `rejected` instrument |
|
|
1296
|
+
| `judged-row-incomplete` | -1 | a cited row with `judge` lacks `generator` or `order` |
|
|
1297
|
+
| `uncalibrated-verifier` | ceiling | `verified_by` names an instrument that is not a validated verdict instrument |
|
|
1298
|
+
| `no-question-class` and the class steps | -1 | see "The question class" above |
|
|
1299
|
+
|
|
1300
|
+
### Statistics on results rows
|
|
1301
|
+
|
|
1302
|
+
A measured protocol plans its test with `alpha:`, `power:`, `mde:` and `n:`. It may
|
|
1303
|
+
add `compare: <T> vs <C> on <field>, lower|higher is better`, `sesoi:` and
|
|
1304
|
+
`correction: bh|holm|bonferroni|e-bh`. Rows group by `arm`, else by `phase`, else
|
|
1305
|
+
into one group `all` (`hooks/tezgah_research.py::experiment_record`).
|
|
1306
|
+
|
|
1307
|
+
One reader takes every protocol number (`hooks/tezgah_research.py::protocol_number`).
|
|
1308
|
+
It reads `0.05`, `.05`, `5%` (as 0.05) and `1e-1`. `alpha:` and `power:` have to
|
|
1309
|
+
fall in (0, 1), and `sesoi:` and `mde:` have to be above 0. `check` refuses any
|
|
1310
|
+
other value, including one with no number:
|
|
1311
|
+
|
|
1312
|
+
- `experiment <h>: protocol.md <alpha|power>: <value> is not a number in (0, 1)`
|
|
1313
|
+
- `experiment <h>: protocol.md <sesoi|mde>: <value> is not a number above 0`
|
|
1314
|
+
- `protocol.md alpha: <value> leaves a quantile at 0 or 1`
|
|
1315
|
+
|
|
1316
|
+
A statistic that still fails to compute gives one refusal per experiment, never a
|
|
1317
|
+
traceback: `experiment <h>: statistics could not be computed: <error>`
|
|
1318
|
+
(`hooks/tezgah_research.py::_check_rules8`).
|
|
1319
|
+
|
|
1320
|
+
- A group whose rows all carry an `outcome` of 0 or 1 prints
|
|
1321
|
+
`stats <slug>: <h> <group> n=<n> k=<k> wilson=[<lo>, <hi>] cp=[<lo>, <hi>]`, the
|
|
1322
|
+
Wilson and Clopper-Pearson intervals at 1 - alpha. A JSON `true` or `false`
|
|
1323
|
+
outcome counts as 1 or 0.
|
|
1324
|
+
- `compare:` gives the mean difference in the better direction. The two groups
|
|
1325
|
+
pair by `item` when they hold the same item set, else the test is Welch's
|
|
1326
|
+
(`hooks/tezgah_research_stats.py::mean_diff`). The achieved MDE is
|
|
1327
|
+
(z(1 - alpha/2) + z(power)) times the standard error
|
|
1328
|
+
(`hooks/tezgah_research_stats.py::achieved_mde`). `check` prints
|
|
1329
|
+
`effect <slug>: <h> <T> vs <C> on <field> effect=<e> ci=[<lo>, <hi>] mde=<m>`,
|
|
1330
|
+
or `ci=none mde=none` when a group has fewer than two rows.
|
|
1331
|
+
- `check` corrects every experiment that declares a `correction:` together with
|
|
1332
|
+
the others of the same method (`hooks/tezgah_research.py::_multiplicity`). `e-bh`
|
|
1333
|
+
reads `e-value: <x>` from each `analysis.md`.
|
|
1334
|
+
- A claim citing the experiment is an improvement claim, unless it carries
|
|
1335
|
+
`"effect": "no-difference"`. Then TOST has to place the 1 - 2 alpha interval
|
|
1336
|
+
inside (-sesoi, +sesoi) (`hooks/tezgah_research_stats.py::tost`).
|
|
1337
|
+
|
|
1338
|
+
### Hypotheses and falsifiers
|
|
1339
|
+
|
|
1340
|
+
On a measured line, a falsifier needs a comparator and a number, or a named test
|
|
1341
|
+
with its alpha (`hooks/tezgah_research.py::falsifier_testable`). Claims citing an
|
|
1342
|
+
experiment whose falsifier has neither take the step `falsifier-not-evaluable`.
|
|
1343
|
+
The structured form
|
|
1344
|
+
`falsifier: <field> <op> <number> [on <group>]` is the one `check` evaluates. Its
|
|
1345
|
+
`<op>` is `<`, `<=`, `>`, `>=`, `=`, `≤`, `≥`, `at most`, `at least`, `above`,
|
|
1346
|
+
`below`, `less than`, `more than`, `fewer than`, `greater than`, `exceed`,
|
|
1347
|
+
`exceeds`, `under` or `over` (`hooks/tezgah_research.py::FALSIFIER_OPS`). It
|
|
1348
|
+
fires when the mean of the field over the group's rows meets the comparison. A
|
|
1349
|
+
falsifier with no `on <group>` over an experiment of several groups is not
|
|
1350
|
+
evaluated, and its claims take `falsifier-not-evaluable`
|
|
1351
|
+
(`hooks/tezgah_research.py::falsifier_unscoped`). A
|
|
1352
|
+
`supported` claim citing an experiment whose falsifier fired fails with
|
|
1353
|
+
`while its falsifier fired` (`hooks/tezgah_research.py::fired_problems`). A
|
|
1354
|
+
prediction equal to its falsifier still fails with `say the same thing`.
|
|
1355
|
+
|
|
1356
|
+
Neither this refusal nor `does not recompute` (below) reaches a claim that another
|
|
1357
|
+
row supersedes. The record is append-only, so that row is the correction, and
|
|
1358
|
+
`claim` and `check` skip the superseded claim alike
|
|
1359
|
+
(`hooks/tezgah_research.py::_superseded`).
|
|
1360
|
+
|
|
1361
|
+
`state.hypotheses[]` holds `{"id", "text", "status", "probability"}` entries. A
|
|
1362
|
+
concluded line ends each one as `supported`, `refuted`, `weakened`, `revised`,
|
|
1363
|
+
`untested` or `inconclusive`. `check` refuses an entry left open with
|
|
1364
|
+
`has no terminal status`, and `conclude` refuses it first
|
|
1365
|
+
(`hooks/tezgah_research.py::hypothesis_problems`).
|
|
1366
|
+
|
|
1367
|
+
### The execution trail
|
|
1368
|
+
|
|
1369
|
+
A number in an evidence claim's statement counts as traced when a cited row holds
|
|
1370
|
+
that value and the row's `log` file contains the token. The claim's `derived_from`
|
|
1371
|
+
can also name it (`hooks/tezgah_research.py::_untraced`). An untraced number costs
|
|
1372
|
+
the step `untraced-number`, and `check` never refuses it.
|
|
1373
|
+
|
|
1374
|
+
`derived_from` maps each derived number, as written, to how it came about:
|
|
1375
|
+
`{"<number>": {"op": "mean|sum|min|max|diff|ratio|count", "of": ["<h>/<run>:<field>", "<h>/#<row>:<field>"]}}`.
|
|
1376
|
+
`diff` is the first minus the second, and `ratio` the first over the second.
|
|
1377
|
+
`check` recomputes the value in decimal arithmetic and rounds it at the written
|
|
1378
|
+
precision. Either half-up or half-even rounding may match, so mean(2, 3) accepts
|
|
1379
|
+
both `2` and `3` (`hooks/tezgah_research.py::_rounds_to`). It refuses a mismatch:
|
|
1380
|
+
`does not recompute` (`hooks/tezgah_research.py::derived_problems`).
|
|
1381
|
+
|
|
1382
|
+
The protocol's other lines bind the analysis
|
|
1383
|
+
(`hooks/tezgah_research.py::_check_experiment8`):
|
|
1384
|
+
|
|
1385
|
+
- Each metric of the `metric:` list appears in `report.md`, or in a
|
|
1386
|
+
`not_reported: <metric>: <reason>` line. The list splits at the commas between
|
|
1387
|
+
names, never inside parentheses or between digit groups. So `10,000-piece` and
|
|
1388
|
+
`(median of 5 runs)` stay whole (`hooks/tezgah_research.py::METRIC_COMMA`). The
|
|
1389
|
+
locked metric is one name, and a comma in it never splits it
|
|
1390
|
+
(`hooks/tezgah_research.py::_registered`). A metric neither reported nor excused
|
|
1391
|
+
fails with `registered metric <m> is neither reported nor marked not_reported - <exit>`.
|
|
1392
|
+
Before the run the exit reads
|
|
1393
|
+
``name it in to_human/report.md, or before the run mark it `not_reported: <metric>: <reason>` in protocol.md``.
|
|
1394
|
+
A filed run freezes `protocol.md`, so after it the exit reads
|
|
1395
|
+
`the run is filed, so protocol.md is frozen: name it in to_human/report.md`.
|
|
1396
|
+
A registered metric that matches the locked one counts as reported when the
|
|
1397
|
+
report names the locked metric. The match collapses whitespace in the report, so
|
|
1398
|
+
a name wrapped across lines still counts.
|
|
1399
|
+
- A `metric:` list must hold the locked metric. Else:
|
|
1400
|
+
`metric other than the locked one`. A protocol metric matches the lock when
|
|
1401
|
+
either is the other, a word-boundary prefix of it either way, or a rewording.
|
|
1402
|
+
A rewording holds every word of the lock in the registered name, in any order,
|
|
1403
|
+
with the joining words (`of`, `the`, `per`, ...) ignored
|
|
1404
|
+
(`hooks/tezgah_research.py::_same_metric`). So `p95 latency`, `p95 latency of
|
|
1405
|
+
the read path` and `read-path p95 latency` all match one another.
|
|
1406
|
+
- `evaluator: <path> [sha256:<hex>]` pins the scoring file to its bytes at the
|
|
1407
|
+
protocol's first commit. `check` looks the path up in the line, the repository
|
|
1408
|
+
and the checkout it runs in, in that order
|
|
1409
|
+
(`hooks/tezgah_research.py::evaluator_file`). A path none of them holds fails
|
|
1410
|
+
with `evaluator <path> is not a file in the line, the repository or the checkout`.
|
|
1411
|
+
`check` compares the evaluator with its last version before that commit
|
|
1412
|
+
(`hooks/tezgah_research.py::_check_evaluator`). Else: `evaluator file changed after lock`.
|
|
1413
|
+
A concluded line compares the evaluator as it stood at the conclusion. The
|
|
1414
|
+
order seal `conclude` writes holds the evaluator's sha256 per experiment
|
|
1415
|
+
(`hooks/tezgah_research.py::_seal_rows`). A seal older than that field reads
|
|
1416
|
+
the evaluator at the first committed `state.json` holding the seal
|
|
1417
|
+
(`hooks/tezgah_research.py::_sealed_evaluator`). A later project edit therefore
|
|
1418
|
+
does not refuse a concluded line under `--all-lines`.
|
|
1419
|
+
- `select: min|max <field>` picks the group with the lowest or highest mean, and
|
|
1420
|
+
`analysis.md` names it as `selected: <group>`. `check` refuses a different pick
|
|
1421
|
+
with `select rule picks`. A missing `selected:` line warns
|
|
1422
|
+
`analysis states no selected group`.
|
|
1423
|
+
|
|
1424
|
+
### The instrument ledger
|
|
1425
|
+
|
|
1426
|
+
An instrument is whatever turns an item into a number: a measure or an LLM
|
|
1427
|
+
judge. A results row names it in `instrument` (or `judge`). An instrument that
|
|
1428
|
+
`instruments/INSTRUMENTS.jsonl` does not hold counts as `unvalidated`. The
|
|
1429
|
+
commands (`hooks/tezgah_research_evidence.py::COMMANDS`):
|
|
1430
|
+
|
|
1431
|
+
- `tezgah-research instrument add <slug> <name> --kind measure|verdict --rung R1|R2|R3|R4 --construct "<text>"`
|
|
1432
|
+
declares it.
|
|
1433
|
+
- `tezgah-research gold <slug> <instrument> --arm <a> --n N --seed S` draws the
|
|
1434
|
+
gold sample. It sorts the arm's items by `sha256("<S>:<a>:<item>")` and keeps
|
|
1435
|
+
the first N (`hooks/tezgah_research_evidence.py::seeded_draw`). The first draw
|
|
1436
|
+
per instrument and arm is the one every rule reads. A draw once the arm has
|
|
1437
|
+
labels exits 1 with `gold draw after labels` unless the owner records a
|
|
1438
|
+
redraw: `gold ... --redraw --ack "<the user's words>"`, which the refusal
|
|
1439
|
+
names. The latest redraw is the draw every rule reads. The labels of items the
|
|
1440
|
+
new draw drops read stale. A draw over results or verdict
|
|
1441
|
+
rows that are not committed exits 1 with
|
|
1442
|
+
`has results or verdict rows that are not committed`, names
|
|
1443
|
+
`tezgah-research commit` and writes nothing
|
|
1444
|
+
(`hooks/tezgah_research_evidence.py::cmd_gold`). `check` refuses a gold file that
|
|
1445
|
+
is not its seed's draw: `differs from the seeded draw`. It also refuses a GOLD
|
|
1446
|
+
row that disagrees with its file on instrument, arm, seed or n:
|
|
1447
|
+
`<file> differs from the seeded draw: its GOLD row names <i> arm <a> seed <s> n <n>, the file <i> arm <a> seed <s> n <n>`
|
|
1448
|
+
(`hooks/tezgah_research_evidence.py::gold_record`).
|
|
1449
|
+
- `tezgah-research label <slug> <instrument> --arm <a> --human "<name>" --ack "<the user's words>"`
|
|
1450
|
+
reads `{"item", "truth"}` rows on stdin. An item outside the gold sample exits 1
|
|
1451
|
+
with `not in the gold sample`.
|
|
1452
|
+
- `tezgah-research label <slug> <instrument> --arm <a> --provider openrouter --model <m>`
|
|
1453
|
+
asks the model once per gold item, at temperature 0. It needs
|
|
1454
|
+
`OPENROUTER_API_KEY`, else it exits 2.
|
|
1455
|
+
- `tezgah-research switch <slug> <instrument> --to R1|R2|R3|R4|<method> --reason "<why>"`
|
|
1456
|
+
records a move to another rung or method.
|
|
1457
|
+
`switch <slug> <instrument> --narrow "<what the claims now say>" --reason "<why>"`
|
|
1458
|
+
records a narrowing of the claims instead.
|
|
1459
|
+
|
|
1460
|
+
A label's `output` is the results row's `outcome`, and an error is a truth that
|
|
1461
|
+
differs from it. A row without both `truth` and `output` labels nothing
|
|
1462
|
+
(`hooks/tezgah_research_evidence.py::_is_label`). `check` refuses a label whose
|
|
1463
|
+
output is not the results row's outcome:
|
|
1464
|
+
`label output differs from its results row: <i> arm <a> item <x> output <o>, results row <r|none>`
|
|
1465
|
+
(`hooks/tezgah_research_evidence.py::label_problems`). A label that holds the
|
|
1466
|
+
outcome of a row a later refile replaced is stale
|
|
1467
|
+
(`hooks/tezgah_research_evidence.py::_stale`). `check` neither counts nor refuses
|
|
1468
|
+
it, and its item reads unlabelled until a new label arrives. The first label per
|
|
1469
|
+
item counts, and a later one warns. An arm
|
|
1470
|
+
counts as labelled when every item of its first draw has a label. Its error bound is the
|
|
1471
|
+
two-sided 95% Clopper-Pearson upper bound of errors over n
|
|
1472
|
+
(`hooks/tezgah_research_evidence.py::instrument_report`). The status follows
|
|
1473
|
+
(`hooks/tezgah_research_evidence.py::judge_status`):
|
|
1474
|
+
|
|
1475
|
+
| Kind | Rejected when | Validated when |
|
|
1476
|
+
|---|---|---|
|
|
1477
|
+
| `measure` | the labelled arms' bounds sum to the smallest `mde:` of the experiments using it, or more | the sum stays below it and every arm with rows is labelled |
|
|
1478
|
+
| `verdict` | an arm's bound is above 0.10 | every arm's bound is 0.10 or less and every arm with rows is labelled |
|
|
1479
|
+
|
|
1480
|
+
Anything else is `unvalidated`, and so is a measure with no `mde:` to compare
|
|
1481
|
+
against. A measure whose `mde:` is above 1 stays `unvalidated` too, because its
|
|
1482
|
+
threshold reads a difference of proportions
|
|
1483
|
+
(`hooks/tezgah_research_evidence.py::proportion_threshold`). So does a measure
|
|
1484
|
+
whose labelled sample is too small to decide. Say its zero-error bounds already
|
|
1485
|
+
sum to the `mde:` or more while its own lower bounds stay below it. Then `check`
|
|
1486
|
+
reports `unvalidated`, not `rejected` (`judge_status`'s `floor`). An `mde:` above 1 ends the status line
|
|
1487
|
+
`(mde above 1: the threshold reads a difference of proportions)`. With an MDE of
|
|
1488
|
+
0.10 and two arms, 72 items per arm with no error
|
|
1489
|
+
validate (bound 0.0499). 71 do not. At 20 items and no error the bound is 0.1684.
|
|
1490
|
+
`check` prints `instrument <slug>: <name> arm <a> n=<n> errors=<k> upper=<u>` per
|
|
1491
|
+
labelled arm and `instrument <slug>: <name> <status> sum=|max=<x> threshold=<t>`.
|
|
1492
|
+
An R3 instrument also prints a PPI++ mean per labelled arm:
|
|
1493
|
+
`ppi <slug>: <name> arm <a> lambda=<l> estimate=<e> ci=[<lo>, <hi>]`
|
|
1494
|
+
(`hooks/tezgah_research_stats.py::ppi_mean`). It combines the gold truths with the
|
|
1495
|
+
arm's unlabelled outputs. The line prints `ci=none` when fewer than two gold items
|
|
1496
|
+
or fewer than two other items exist.
|
|
1497
|
+
|
|
1498
|
+
`conclude` refuses a line with a `rejected` instrument and no `switch` row for it:
|
|
1499
|
+
`has no switch or narrowing row` (`hooks/tezgah_research_evidence.py::conclude_problems`).
|
|
1500
|
+
A concluded line with human labels owes `user-supplied: <k> of <n> labels` in its
|
|
1501
|
+
report.
|
|
1502
|
+
|
|
1503
|
+
**Verifiers.** A claim's `verified_by: <instrument>` has to name a `verdict`
|
|
1504
|
+
instrument whose status is `validated`. Else the claim takes
|
|
1505
|
+
`uncalibrated-verifier`, a ceiling.
|
|
1506
|
+
|
|
1507
|
+
### `release-check` and `calibration`
|
|
1508
|
+
|
|
1509
|
+
`tezgah-research release-check [--fixtures <dir>]` measures whether the checks
|
|
1510
|
+
catch what they claim to catch. It needs no research line and runs from any
|
|
1511
|
+
directory (`hooks/tezgah_research_evidence.py::cmd_release_check`). Its default
|
|
1512
|
+
set, `tests/fixtures/rules8-known-truth/`, holds 38 defect and 18 sound cases of
|
|
1513
|
+
citations, quotes and instruments. The functions `check` uses score each case,
|
|
1514
|
+
with the set's `capture-map.json` as the capture map. It prints
|
|
1515
|
+
`misses: <k>/<n> upper=<u>` and `false alarms: <k>/<n> upper=<u>`. It exits 1 when
|
|
1516
|
+
the misses' Clopper-Pearson upper bound passes 0.10 or the false alarms' passes
|
|
1517
|
+
0.20. The CI workflow runs it on every pull request and push to `main`, and
|
|
1518
|
+
each release reuses that green run. On that fixture set it printed
|
|
1519
|
+
`misses: 0/38 upper=0.0925` and `false alarms: 0/18 upper=0.1853`.
|
|
1520
|
+
|
|
1521
|
+
`tezgah-research calibration` scores every line's hypotheses that carry a
|
|
1522
|
+
`probability` and end `supported` or `refuted`. It prints
|
|
1523
|
+
`brier: <x> over <n> resolved hypotheses` and exits 0
|
|
1524
|
+
(`hooks/tezgah_research_evidence.py::cmd_calibration`).
|
|
1525
|
+
|
|
1526
|
+
### Review, overlap and the smaller rules
|
|
1527
|
+
|
|
1528
|
+
- `to_human/review.json` adds `producer_family`, `reviewer_family` and
|
|
1529
|
+
`question_class`. One family on both sides warns `same-family review`. A
|
|
1530
|
+
reviewer equal to the producer, ignoring case and spaces, fails with
|
|
1531
|
+
`is the producer`. When the line holds an evidence claim, a finding has to
|
|
1532
|
+
target a file under `experiments/*/raw/` or a code file. Else it warns
|
|
1533
|
+
`review quotes no raw log or code` (`hooks/tezgah_research.py::_check_review8`).
|
|
1534
|
+
- `check` warns `overlaps refuted claim <line>/<claim>` for a refuted claim that
|
|
1535
|
+
`init` reported as an overlap. A row of `related.jsonl`,
|
|
1536
|
+
`{"line", "claim", "relation": "builds-on"|"dismissed", "reason"}`, answers it.
|
|
1537
|
+
- The overclaim lint warns in both modes: `claim <id> overclaims: "<word>"`. It
|
|
1538
|
+
fires on a universal word (every, all, always, never, any) over fixture
|
|
1539
|
+
evidence. It also fires on a causal word (cause, leads to, due to, because of)
|
|
1540
|
+
over an observational or single-group experiment
|
|
1541
|
+
(`hooks/tezgah_research.py::_overclaim`).
|
|
1542
|
+
- A variant whose `variants.jsonl` row entered the history after the first
|
|
1543
|
+
`comparison.jsonl` cell is post-hoc. A `decision.md` that chooses it and never
|
|
1544
|
+
says `post-hoc` or `post_hoc` fails with `without saying post-hoc`
|
|
1545
|
+
(`hooks/tezgah_research.py::_post_hoc`).
|
|
1546
|
+
- The supersedes warning drops when a `report.md` line names both claim ids
|
|
1547
|
+
(`hooks/tezgah_research.py::_check_supersedes`). Otherwise it stays soft, so
|
|
1548
|
+
`--strict` refuses it.
|
|
1549
|
+
- A `Patterns` bullet in `findings.md` on a rules-8 line runs over its indented
|
|
1550
|
+
continuation lines, so a source on a wrapped line counts
|
|
1551
|
+
(`hooks/tezgah_research.py::_check_patterns`). An older line reads each
|
|
1552
|
+
bullet's first line only, as before.
|
|
1553
|
+
|
|
1554
|
+
### What rules 8 cannot see
|
|
1555
|
+
|
|
1556
|
+
- A gold seed chosen offline after the session saw the outputs goes undetected.
|
|
1557
|
+
The first-draw rule only stops a redraw once a draw exists.
|
|
1558
|
+
- `check` reads a number that the session printed into a captured run log as
|
|
1559
|
+
measured. The log's bytes are real to every rule.
|
|
1560
|
+
|
|
780
1561
|
## What `check` refuses, and what it only warns about
|
|
781
1562
|
|
|
782
1563
|
A **refusal** (exit 1) is a guarantee the checker can decide. A **warning** is a
|