@r1z4x/tezgah 1.9.2 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +415 -1
- package/MANIFEST +404 -144
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.md +5 -4
- 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 +255 -44
- package/bin/tezgah-review-quote +185 -0
- package/bin/tezgah-setup +1365 -55
- package/bin/tezgah-skill +1 -1
- package/bin/tezgah-status +201 -3
- package/bin/tezgah-task +258 -20
- package/commands/adhd.md +2 -2
- package/commands/ponytail.md +4 -4
- package/docs/architecture.md +2 -2
- package/docs/citations-baseline.json +3 -3
- package/docs/clarity-baseline.json +11 -5
- package/docs/contract.md +91 -43
- package/docs/environment.md +5 -2
- package/docs/evidence.md +109 -17
- package/docs/feature-audit.md +2 -2
- package/docs/gate.md +60 -33
- package/docs/glossary.md +6 -3
- package/docs/hosts.md +313 -17
- package/docs/index.json +34 -8
- package/docs/judge.md +4 -2
- package/docs/layers.md +4 -4
- package/docs/models.md +37 -9
- package/docs/operations.md +141 -5
- package/docs/research.md +815 -8
- package/docs/skills.md +137 -13
- package/docs/status-line.md +121 -1
- package/docs/testing.md +3 -1
- package/hooks/hooks.json +2 -2
- package/hooks/lang/en.json +21 -0
- package/hooks/lang/tr.json +22 -1
- package/hooks/projects-stop.py +2 -1
- package/hooks/tezgah_agents.py +65 -25
- package/hooks/tezgah_apps.py +18 -0
- package/hooks/tezgah_attest.py +79 -10
- package/hooks/tezgah_components.py +4 -0
- package/hooks/tezgah_context.py +207 -55
- package/hooks/tezgah_extension.py +337 -0
- package/hooks/tezgah_gate.py +267 -79
- package/hooks/tezgah_integrity.py +864 -143
- 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 +145 -8
- package/hooks/tezgah_policy.py +128 -57
- package/hooks/tezgah_rank.py +9 -6
- package/hooks/tezgah_replay.py +12 -6
- package/hooks/tezgah_research.py +1414 -76
- 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_stack.py +236 -1
- package/hooks/tezgah_stopspec.py +8 -1
- package/hooks/tezgah_task.py +14 -5
- package/hooks/tezgah_taste_ledger.py +1 -1
- package/hosts/amp/hook.py +217 -0
- package/hosts/amp/tezgah-plugin.ts.in +386 -0
- package/hosts/antigravity/hook.py +255 -0
- package/hosts/codex/hook.py +2 -1
- package/hosts/commandcode/hook.py +239 -0
- package/hosts/copilot/hook.py +284 -0
- package/hosts/cursor/hook.py +31 -3
- package/hosts/droid/hook.py +259 -0
- package/hosts/dsh/hooks.json +1 -1
- package/hosts/gemini/hook.py +213 -0
- package/hosts/goose/hook.py +145 -0
- package/hosts/omp/hook.py +4 -1
- package/hosts/omp/tezgah-hook.ts.in +30 -7
- package/hosts/opencode/plugins/tezgah.js +309 -48
- package/hosts/opencode/tui/cli/tui.tsx +100 -0
- package/hosts/opencode/tui/tezgah-tui.tsx +2 -1
- package/hosts/qwen/hook.py +206 -0
- package/output-styles/tezgah.md +20 -15
- package/package.json +1 -1
- 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 +17 -8
- package/skills/i-have-adhd/SKILL.md +32 -12
- package/skills/no-ai-slop/SKILL.md +15 -1
- package/skills/plan-add/SKILL.md +38 -27
- 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 +97 -48
- package/skills/rl-env/SKILL.md +25 -13
- package/skills/rl-env/SOURCE +8 -6
- package/skills/tezgah-contract/SKILL.md +65 -47
- package/statusline.py +20 -9
- package/workflows/graph-review.js +14 -2
- 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/bin/tezgah-research
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
"""tezgah-research - the research workspace CLI.
|
|
3
3
|
|
|
4
4
|
tezgah-research init <slug> --ask "<the user's words>" [--question "..."]
|
|
5
|
-
[--method qualitative|measured|exploratory] [--
|
|
6
|
-
[--out "<left alone>"]... [--allow-open "<why>"]
|
|
5
|
+
[--method qualitative|measured|exploratory] [--class R1..R12]
|
|
6
|
+
[--in "<covered>"]... [--out "<left alone>"]... [--allow-open "<why>"]
|
|
7
|
+
[--supersedes <slug>]
|
|
7
8
|
[--arena "<problem>" --budget "<budget>" [--evaluator <path> --metric "<m>"]]
|
|
8
9
|
scaffold a line
|
|
9
10
|
tezgah-research commit <slug> "<message>" commit the line in .tezgah's own repo
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
(the project's, when it tracks .tezgah)
|
|
12
|
+
tezgah-research check [<slug>] [--json] [--strict] [--orx] [--online] [--all-lines]
|
|
13
|
+
[-- <slug>] the discipline checks
|
|
12
14
|
tezgah-research status one line per research line
|
|
13
15
|
tezgah-research --all every checkout's lines (git worktrees)
|
|
14
16
|
tezgah-research claim <slug> record one claim from stdin
|
|
@@ -16,11 +18,15 @@
|
|
|
16
18
|
tezgah-research components [--json] what predicts what, per component
|
|
17
19
|
tezgah-research migrate <slug> [--dry-run] derive fields the rules require
|
|
18
20
|
tezgah-research source <slug> <hypothesis> --run <orxRunId> [--command "<cmd>"]
|
|
21
|
+
[--instrument <name>] [--arm <a>] [--item <i>] [--value <field>=<number>]...
|
|
19
22
|
[--scope real|fixture|derived] [--fixture "<what was generated>"]
|
|
23
|
+
[--ack "<the user's words>"]
|
|
20
24
|
tezgah-research compare <slug> <decision> record one variants x criteria cell from stdin
|
|
21
25
|
tezgah-research verdict <slug> <id> met|not-met|unanswerable --evidence "<ref>"
|
|
22
26
|
record one success criterion's verdict
|
|
23
27
|
tezgah-research conclude <slug> conclude a line whose criteria all carry a verdict
|
|
28
|
+
tezgah-research choose <slug> <decision> <variant> --ack "<the owner's words>"
|
|
29
|
+
record the owner's pick of a recommended variant
|
|
24
30
|
tezgah-research migrate-layout move flat research/<slug> into open/ or done/
|
|
25
31
|
tezgah-research close <slug> --limit "<reason>" conclude a line as a deliberate limit
|
|
26
32
|
tezgah-research seal <slug> [--history-lost] --ack "<owner decision>"
|
|
@@ -37,6 +43,23 @@
|
|
|
37
43
|
tezgah-research dedup <slug> [--threshold <(0,1]>] [--json]
|
|
38
44
|
cluster the proposed ideas, write nothing
|
|
39
45
|
tezgah-research yield [--json] [--all-lines] how far ideas got, per operator and family
|
|
46
|
+
tezgah-research cite <slug> query four registries for each formal INDEX id
|
|
47
|
+
tezgah-research fetch <slug> <note> [--file <path> --ack "<the user's words>" | --orx]
|
|
48
|
+
capture a note's source text and its quotes
|
|
49
|
+
tezgah-research search <slug> --tag primary|snowball|counter|known [--item "<scope.in item>"]
|
|
50
|
+
-- <connector> <args...> capture one search on an allowlisted connector
|
|
51
|
+
tezgah-research instrument add <slug> <name> --kind measure|verdict --rung R1|R2|R3|R4
|
|
52
|
+
--construct "<text>" register an instrument
|
|
53
|
+
tezgah-research gold <slug> <instrument> --arm <a> --n N --seed S
|
|
54
|
+
draw an arm's seeded gold sample
|
|
55
|
+
tezgah-research label <slug> <instrument> --arm <a> (--human "<name>" --ack "<the user's words>"
|
|
56
|
+
| --provider openrouter --model <m>)
|
|
57
|
+
label an arm's gold sample
|
|
58
|
+
tezgah-research switch <slug> <instrument> (--to R1|R2|R3|R4|<method> | --narrow "<what the
|
|
59
|
+
claims now say>") --reason "<why>"
|
|
60
|
+
record a switch away from an instrument
|
|
61
|
+
tezgah-research release-check [--fixtures <dir>] score the known-truth cases, exit 1 past the bounds
|
|
62
|
+
tezgah-research calibration Brier score over resolved hypotheses
|
|
40
63
|
|
|
41
64
|
A research line lives at <repo>/.tezgah/research/<slug>/ and holds the state an
|
|
42
65
|
auditable investigation needs: the question, the decision log, the findings, the
|
|
@@ -47,7 +70,11 @@ and the review a concluded line reports. `check` exits 1 when a line breaks thos
|
|
|
47
70
|
rules, so a hook or a person can act on it. The project ignores `.tezgah/`; the
|
|
48
71
|
commits the order rule reads are made in `.tezgah`'s own private git repository,
|
|
49
72
|
which `init` creates and `commit` writes to, and a line the project itself
|
|
50
|
-
committed before the move keeps its order proof in the project's history.
|
|
73
|
+
committed before the move keeps its order proof in the project's history. A
|
|
74
|
+
folded `.tezgah` - one the project tracks, with no repository of its own - has
|
|
75
|
+
only the project's history, so `commit` commits the line there, after the
|
|
76
|
+
message passes the gate's own language and attribution readers (exit 2 and
|
|
77
|
+
the gate's refusal when it does not, nothing committed).
|
|
51
78
|
|
|
52
79
|
`check` with no slug reports the open lines in full; a line under `done/` is
|
|
53
80
|
verified by its order seal's hashes alone and named only when they fail, with
|
|
@@ -96,14 +123,20 @@ no status, a design/plan/analysis/code deliverable with no decision comparing it
|
|
|
96
123
|
variants - printing every open slug with its reasons. `--allow-open "<reason>"`
|
|
97
124
|
opens the new line anyway and writes the reason into its `log.md` as the first
|
|
98
125
|
entry; an empty reason is misuse, and the hatch is refused while any open line has
|
|
99
|
-
`check` errors
|
|
126
|
+
`check` errors other than a criterion whose verdict is still `pending` (a line in
|
|
127
|
+
flight). Both refusals say that a line another session is running goes to the
|
|
128
|
+
owner, not to this session. `close <slug> --limit "<reason>"` concludes a line on purpose,
|
|
100
129
|
writing the reasons it was still open into `state.json` `closed` and `log.md`.
|
|
101
130
|
`--supersedes <old>` opens a new version of an existing line, which then carries
|
|
102
131
|
the old deliverable as a variant; a line asking an existing line's exact question
|
|
103
132
|
without it is refused. `compare` appends one cell to
|
|
104
133
|
`decisions/<decision>/comparison.jsonl` under the rule `check` applies to it.
|
|
134
|
+
A rules-9 decision.md writes the line's pick as `recommended:`; `choose` records
|
|
135
|
+
the owner's `chosen:` with an `owner:` line holding their words, and `conclude`
|
|
136
|
+
names each recommendation still waiting for it.
|
|
105
137
|
`check` prints the same list of open lines after the per-line report, and so does
|
|
106
|
-
`status`, so neither state has to be discovered by being refused.
|
|
138
|
+
`status`, so neither state has to be discovered by being refused. Both also fail
|
|
139
|
+
a hidden dir under `research/`, which no line may live in.
|
|
107
140
|
|
|
108
141
|
`init --method exploratory` (rules 7) opens a campaign instead of a question:
|
|
109
142
|
`--arena` and `--budget` (and, for a measurable arena, `--evaluator` with its
|
|
@@ -116,7 +149,8 @@ append. `board`, `dedup` and `yield` are reports: they write nothing and exit 0.
|
|
|
116
149
|
Exit codes: 0 clean, 1 problems found - a broken line for `check`, a refused
|
|
117
150
|
claim for `claim`, a refused row for `predict`, `idea`, `stage` or `match`, which
|
|
118
151
|
writes nothing and prints one reason per problem, or a new line refused for
|
|
119
|
-
`init` over unfinished ones - 2 misuse
|
|
152
|
+
`init` over unfinished ones - 2 misuse, or a folded `commit` whose message the
|
|
153
|
+
gate would refuse.
|
|
120
154
|
"""
|
|
121
155
|
import json
|
|
122
156
|
import os
|
|
@@ -158,9 +192,28 @@ def misuse(message):
|
|
|
158
192
|
return 2
|
|
159
193
|
|
|
160
194
|
|
|
195
|
+
INIT_USAGE = ('init <slug> --ask "<the user\'s words>" [--tier quick|study|program]'
|
|
196
|
+
' [--method qualitative|measured|exploratory] [--class R1..R12]'
|
|
197
|
+
' [--in "<covered>"]... [--out "<left alone>"]... [--question "..."]'
|
|
198
|
+
' [--allow-open "<reason>"] [--supersedes <slug>]'
|
|
199
|
+
' [--arena "<problem>" --budget "<budget>"'
|
|
200
|
+
' [--evaluator <path> --metric "<metric>"]]')
|
|
201
|
+
INIT_EXAMPLE = ('tezgah-research init cache-latency --ask "does the cache cut p95?" '
|
|
202
|
+
'--method measured --in "p95 of the read path" --out "write path"')
|
|
203
|
+
|
|
204
|
+
|
|
161
205
|
def cmd_init(args):
|
|
206
|
+
# R0 is refused before any other argument is read (spec 3.3): a factual or
|
|
207
|
+
# reference question gets its answer in the reply, never a line
|
|
208
|
+
if any(a == "--class" and b == "R0" for a, b in zip(args, args[1:])):
|
|
209
|
+
print("FAIL init: R0 gets no line: a factual or reference question is answered "
|
|
210
|
+
"in the reply with its evidence")
|
|
211
|
+
return 1
|
|
162
212
|
if not args:
|
|
163
213
|
return misuse("init needs a slug")
|
|
214
|
+
if args[0] in ("-h", "--help"):
|
|
215
|
+
print("usage: tezgah-research %s\nexample: %s" % (INIT_USAGE, INIT_EXAMPLE))
|
|
216
|
+
return 0
|
|
164
217
|
slug = args[0].strip().lower().replace(" ", "-")
|
|
165
218
|
if not tr.valid_slug(slug):
|
|
166
219
|
# A slug is the directory name the other commands list, so anything that
|
|
@@ -170,7 +223,7 @@ def cmd_init(args):
|
|
|
170
223
|
"and dashes" % args[0])
|
|
171
224
|
question, allow, supersedes = "", None, None
|
|
172
225
|
ask, tier, method, scope_in, scope_out = "", str(tr.DEFAULT_TIER), "", [], []
|
|
173
|
-
arena = {}
|
|
226
|
+
arena, question_class = {}, ""
|
|
174
227
|
rest = args[1:]
|
|
175
228
|
while rest:
|
|
176
229
|
flag = rest.pop(0)
|
|
@@ -184,6 +237,9 @@ def cmd_init(args):
|
|
|
184
237
|
method = rest.pop(0)
|
|
185
238
|
elif flag == "--in" and rest:
|
|
186
239
|
scope_in.append(rest.pop(0))
|
|
240
|
+
elif flag == "--class" and rest and rest[0] in tr.QUESTION_CLASSES[1:] \
|
|
241
|
+
and not question_class:
|
|
242
|
+
question_class = rest.pop(0)
|
|
187
243
|
elif flag == "--out" and rest:
|
|
188
244
|
scope_out.append(rest.pop(0))
|
|
189
245
|
elif flag == "--allow-open" and rest:
|
|
@@ -194,12 +250,7 @@ def cmd_init(args):
|
|
|
194
250
|
and flag not in arena:
|
|
195
251
|
arena[flag] = rest.pop(0)
|
|
196
252
|
else:
|
|
197
|
-
return misuse(
|
|
198
|
-
' [--method qualitative|measured|exploratory] [--in "<covered>"]...'
|
|
199
|
-
' [--out "<left alone>"]... [--question "..."]'
|
|
200
|
-
' [--allow-open "<reason>"] [--supersedes <slug>]'
|
|
201
|
-
' [--arena "<problem>" --budget "<budget>"'
|
|
202
|
-
' [--evaluator <path> --metric "<metric>"]]')
|
|
253
|
+
return misuse(INIT_USAGE)
|
|
203
254
|
if method == "exploratory":
|
|
204
255
|
# The arena is the lock an exploratory line commits before its first idea,
|
|
205
256
|
# so a line without one is a call that cannot work, not a line to repair.
|
|
@@ -222,6 +273,9 @@ def cmd_init(args):
|
|
|
222
273
|
if problems:
|
|
223
274
|
for problem in problems:
|
|
224
275
|
print("FAIL init: %s" % problem)
|
|
276
|
+
if not ask.strip():
|
|
277
|
+
print("usage: tezgah-research %s\nexample: %s" % (INIT_USAGE, INIT_EXAMPLE),
|
|
278
|
+
file=sys.stderr)
|
|
225
279
|
return 1
|
|
226
280
|
if allow is not None and not allow.strip():
|
|
227
281
|
return misuse("--allow-open needs the reason the new line is worth opening "
|
|
@@ -240,6 +294,7 @@ def cmd_init(args):
|
|
|
240
294
|
print(" %s: %s" % (name, "; ".join(reasons)))
|
|
241
295
|
print('to open %s anyway, say why: tezgah-research init %s '
|
|
242
296
|
'--allow-open "<reason>"' % (slug, slug))
|
|
297
|
+
print(tr.OWNER_ASK)
|
|
243
298
|
return 1
|
|
244
299
|
broken = tr.broken_open_lines(repo) if unfinished else []
|
|
245
300
|
if broken:
|
|
@@ -251,6 +306,7 @@ def cmd_init(args):
|
|
|
251
306
|
print(" %s: %d error(s), first: %s" % (name, len(errors), errors[0]))
|
|
252
307
|
print('fix them, or record what is left: tezgah-research close <slug> '
|
|
253
308
|
'--limit "<reason>"')
|
|
309
|
+
print(tr.OWNER_ASK)
|
|
254
310
|
return 1
|
|
255
311
|
twins = [t for t in tr.serial_twins(repo, slug, {"question": question})
|
|
256
312
|
if t != supersedes]
|
|
@@ -267,7 +323,8 @@ def cmd_init(args):
|
|
|
267
323
|
arena.get("--metric", "").strip())
|
|
268
324
|
made = tr.init(repo, slug, question=question, created=created,
|
|
269
325
|
supersedes=supersedes, ask=ask, tier=tier, method=method,
|
|
270
|
-
scope_in=scope_in, scope_out=scope_out, arena=record
|
|
326
|
+
scope_in=scope_in, scope_out=scope_out, arena=record,
|
|
327
|
+
question_class=question_class)
|
|
271
328
|
if allow is not None:
|
|
272
329
|
problem = tr.note_open(repo, slug, allow, created)
|
|
273
330
|
if problem:
|
|
@@ -278,12 +335,17 @@ def cmd_init(args):
|
|
|
278
335
|
print(" wrote %s" % path)
|
|
279
336
|
for problem in tr.scope_problems(tr.line_state(repo, slug)):
|
|
280
337
|
print(" owed: %s" % problem)
|
|
338
|
+
if question_class:
|
|
339
|
+
print("obligations: %s" % ", ".join(tr.obligations(question_class, method)))
|
|
340
|
+
print(tr.budget(slug, tr.line_dir(repo, slug), tr.line_state(repo, slug))[0])
|
|
341
|
+
for line, cid, status, sim in tr.overlaps(repo, question or ask, slug):
|
|
342
|
+
print("overlap: %s/%s %s %.2f" % (line, cid, status, sim))
|
|
281
343
|
if method == "exploratory":
|
|
282
|
-
print("\nnext: commit the arena now, before any idea -
|
|
344
|
+
print("\nnext: commit the arena now, before any idea - `~/.config/tezgah/bin/tezgah-research commit "
|
|
283
345
|
"%s \"arena\"`; an idea committed with it or before it is refused. Then "
|
|
284
|
-
"record ideas (
|
|
346
|
+
"record ideas (`~/.config/tezgah/bin/tezgah-research idea %s`, one JSON row on stdin, each "
|
|
285
347
|
"naming its operator, generator and kill result), commit them, and "
|
|
286
|
-
"follow
|
|
348
|
+
"follow `~/.config/tezgah/bin/tezgah-research board %s`: dedup, prior art, matches, pilots, a "
|
|
287
349
|
"full run, a confirmation on unseen data." % (slug, slug, slug))
|
|
288
350
|
elif method == "qualitative":
|
|
289
351
|
print("\nnext: read the primary sources for each state.json scope.in item "
|
|
@@ -293,7 +355,7 @@ def cmd_init(args):
|
|
|
293
355
|
else:
|
|
294
356
|
print("\nnext: write experiments/<hypothesis>/protocol.md - what the change "
|
|
295
357
|
"is, what it predicts, what result would falsify it, why - and COMMIT "
|
|
296
|
-
"it before the run:
|
|
358
|
+
"it before the run: `~/.config/tezgah/bin/tezgah-research commit %s \"protocol "
|
|
297
359
|
"<hypothesis>\"`. Then record the run in results.jsonl and commit it "
|
|
298
360
|
"the same way, in a later commit. The commits land in `.tezgah`'s own "
|
|
299
361
|
"git repository (the project ignores `.tezgah/`). Then analyse it in "
|
|
@@ -304,8 +366,10 @@ def cmd_init(args):
|
|
|
304
366
|
|
|
305
367
|
|
|
306
368
|
def cmd_commit(args):
|
|
307
|
-
"""Commit one line in the private `.tezgah` repository
|
|
308
|
-
rule reads. Only the line's
|
|
369
|
+
"""Commit one line in the private `.tezgah` repository, or in the project's
|
|
370
|
+
when `.tezgah` is folded - the commit the order rule reads. Only the line's
|
|
371
|
+
own paths are staged and committed: every layout location of the slug, so
|
|
372
|
+
the move `conclude` makes from `open/` to `done/` lands whole."""
|
|
309
373
|
if len(args) != 2 or not args[1].strip():
|
|
310
374
|
return misuse('commit <slug> "<message>"')
|
|
311
375
|
slug, message = args
|
|
@@ -313,21 +377,41 @@ def cmd_commit(args):
|
|
|
313
377
|
known = tr.slugs(repo)
|
|
314
378
|
if slug not in known:
|
|
315
379
|
return misuse("no such research line (have: %s)" % (", ".join(known) or "none"))
|
|
316
|
-
return commit_path(repo,
|
|
380
|
+
return commit_path(repo, [os.path.join(f, slug) for f in tr.layout_roots(repo)],
|
|
381
|
+
message)
|
|
317
382
|
|
|
318
383
|
|
|
319
|
-
def
|
|
320
|
-
"""
|
|
384
|
+
def present(paths, base, ls_files):
|
|
385
|
+
"""The paths relative to `base` that exist on disk or that git still
|
|
386
|
+
tracks: a pathspec matching nothing would make `git add` fail."""
|
|
387
|
+
rels = [os.path.relpath(p, base) for p in paths]
|
|
388
|
+
tracked = ls_files(*rels).splitlines() if rels else []
|
|
389
|
+
return [r for r, p in zip(rels, paths) if os.path.lexists(p) or any(
|
|
390
|
+
t == r or t.startswith(r + "/") for t in tracked)]
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
def commit_path(repo, paths, message):
|
|
394
|
+
"""Stage and commit `paths` alone in the private repository of `repo`, or in
|
|
395
|
+
the project's own when `.tezgah` is folded - tracked by the project, with no
|
|
396
|
+
repository of its own (`tr.folded`)."""
|
|
321
397
|
ws = tp.ensure_workspace(repo)
|
|
398
|
+
if ws is None and tr.folded(repo):
|
|
399
|
+
return commit_project(repo, paths, message)
|
|
322
400
|
if ws is None:
|
|
323
401
|
print("commit refused: %s is not a git work tree (or .tezgah could not be "
|
|
324
402
|
"set up), so there is no private repository to commit into" % repo)
|
|
325
403
|
return 1
|
|
326
|
-
rel = os.path.relpath(path, ws)
|
|
327
404
|
try:
|
|
328
|
-
|
|
405
|
+
rels = present(paths, ws, lambda *r: tp.ws_git(repo, "ls-files", "--", *r).stdout)
|
|
406
|
+
done = tp.ws_git(repo, "add", "-A", "--", *rels)
|
|
407
|
+
if not done.returncode and not tp.ws_git(repo, "diff", "--cached", "--quiet",
|
|
408
|
+
"--", *rels).returncode:
|
|
409
|
+
# a writer that commits its own capture (`source`, `cite`) leaves nothing
|
|
410
|
+
# for the session's commit, which is not a failure (plan 128 K10)
|
|
411
|
+
print("nothing to commit: %s is already committed in %s" % (" ".join(rels), ws))
|
|
412
|
+
return 0
|
|
329
413
|
if not done.returncode:
|
|
330
|
-
done = tp.ws_git(repo, "commit", "-q", "-m", message, "--",
|
|
414
|
+
done = tp.ws_git(repo, "commit", "-q", "-m", message, "--", *rels)
|
|
331
415
|
except OSError as exc:
|
|
332
416
|
print("commit failed: %s" % exc)
|
|
333
417
|
return 1
|
|
@@ -335,7 +419,62 @@ def commit_path(repo, path, message):
|
|
|
335
419
|
print("commit failed: %s" % (done.stderr or done.stdout).strip())
|
|
336
420
|
return 1
|
|
337
421
|
sha = tp.ws_git(repo, "rev-parse", "HEAD").stdout.strip()
|
|
338
|
-
print("committed %s in %s at %s" % (
|
|
422
|
+
print("committed %s in %s at %s" % (" ".join(rels), ws, sha))
|
|
423
|
+
return 0
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
def message_refusal(message):
|
|
427
|
+
"""The refusal the gate prints for `message` as a `git commit -m` value, or
|
|
428
|
+
None. A folded `commit` writes the project's own history, which the gate
|
|
429
|
+
never sees through this command, so the message meets the gate's own
|
|
430
|
+
readers here: the language reader `lang_reason` hands each subject to
|
|
431
|
+
(`tezgah_lang.refusal`), then the credit forms `attribution` matches
|
|
432
|
+
(`ATTRIB`), under the same switches."""
|
|
433
|
+
if tp.off("pretooluse-off"):
|
|
434
|
+
return None
|
|
435
|
+
import tezgah_gate as gate # deferred: only a folded commit pays the import
|
|
436
|
+
if gate.tezgah_lang is not None and not tp.off("lang-off"):
|
|
437
|
+
reason = gate.tezgah_lang.refusal("commit subject", message)
|
|
438
|
+
if reason:
|
|
439
|
+
return reason
|
|
440
|
+
return gate.ATTRIB_DENY if gate.ATTRIB.search(message) else None
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
def commit_project(repo, paths, message):
|
|
444
|
+
"""Stage and commit `paths` alone in the project's repository: the history a
|
|
445
|
+
folded `.tezgah` lives in. Anything else the owner staged stays staged and
|
|
446
|
+
out of this commit (`commit -- <paths>`); the project's identity, signing and
|
|
447
|
+
hooks apply, since this is the project's own history. A message the gate
|
|
448
|
+
would refuse is refused first, exit 2, and nothing is staged."""
|
|
449
|
+
refused = message_refusal(message)
|
|
450
|
+
if refused:
|
|
451
|
+
print("commit refused: %s" % refused, file=sys.stderr)
|
|
452
|
+
return 2
|
|
453
|
+
git = ["git", "-C", repo]
|
|
454
|
+
try:
|
|
455
|
+
rels = present(paths, repo, lambda *r: subprocess.run(
|
|
456
|
+
git + ["ls-files", "--"] + list(r), capture_output=True, text=True).stdout)
|
|
457
|
+
done = subprocess.run(git + ["add", "-A", "--"] + rels, capture_output=True,
|
|
458
|
+
text=True)
|
|
459
|
+
if not done.returncode and not subprocess.run(
|
|
460
|
+
git + ["diff", "--cached", "--quiet", "--"] + rels).returncode:
|
|
461
|
+
print("nothing to commit: %s is already committed in the project repository %s"
|
|
462
|
+
% (" ".join(rels), repo))
|
|
463
|
+
return 0
|
|
464
|
+
if not done.returncode:
|
|
465
|
+
done = subprocess.run(git + ["commit", "-q", "-m", message, "--"] + rels,
|
|
466
|
+
capture_output=True, text=True)
|
|
467
|
+
except OSError as exc:
|
|
468
|
+
print("commit failed: %s" % exc)
|
|
469
|
+
return 1
|
|
470
|
+
if done.returncode:
|
|
471
|
+
print("commit failed: %s" % (done.stderr or done.stdout).strip())
|
|
472
|
+
return 1
|
|
473
|
+
sha = subprocess.run(git + ["rev-parse", "HEAD"], capture_output=True,
|
|
474
|
+
text=True).stdout.strip()
|
|
475
|
+
print("committed %s in the project repository %s at %s (.tezgah is tracked by "
|
|
476
|
+
"the project, so the project's history carries the line)"
|
|
477
|
+
% (" ".join(rels), repo, sha))
|
|
339
478
|
return 0
|
|
340
479
|
|
|
341
480
|
|
|
@@ -346,13 +485,14 @@ def cmd_check(args):
|
|
|
346
485
|
as_json = "--json" in flags
|
|
347
486
|
strict = "--strict" in flags
|
|
348
487
|
ask_orx = "--orx" in flags
|
|
488
|
+
online = "--online" in flags
|
|
349
489
|
all_lines = "--all-lines" in flags
|
|
350
490
|
rest = [a for a in flags
|
|
351
|
-
if a not in ("--json", "--strict", "--orx", "--all-lines")] + after
|
|
491
|
+
if a not in ("--json", "--strict", "--orx", "--online", "--all-lines")] + after
|
|
352
492
|
repo = repo_root(os.getcwd())
|
|
353
493
|
if len(rest) > 1:
|
|
354
|
-
return misuse("check [<slug>] [--json] [--strict] [--orx] [--
|
|
355
|
-
"[-- <slug>]")
|
|
494
|
+
return misuse("check [<slug>] [--json] [--strict] [--orx] [--online] "
|
|
495
|
+
"[--all-lines] [-- <slug>]")
|
|
356
496
|
known = tr.slugs(repo)
|
|
357
497
|
if rest and rest[0] not in known:
|
|
358
498
|
print("FAIL %s: no such research line (have: %s)"
|
|
@@ -360,15 +500,20 @@ def cmd_check(args):
|
|
|
360
500
|
return 1
|
|
361
501
|
problems = 0
|
|
362
502
|
report = {}
|
|
363
|
-
if known:
|
|
503
|
+
if known or tr.stray_dirs(repo):
|
|
364
504
|
report = tr.check(repo, rest[0] if rest else None, strict=strict,
|
|
365
|
-
all_lines=all_lines, code=checkout_root(os.getcwd())
|
|
505
|
+
all_lines=all_lines, code=checkout_root(os.getcwd()),
|
|
506
|
+
flags={"online": online, "orx": ask_orx})
|
|
366
507
|
for slug, row in report.items():
|
|
367
508
|
for err in row["errors"]:
|
|
368
509
|
problems += 1
|
|
369
510
|
print("FAIL %s: %s" % (slug, err))
|
|
370
511
|
for warn in row["warnings"]:
|
|
371
512
|
print("warn %s: %s" % (slug, warn))
|
|
513
|
+
# rules 8's report lines (certainty, stats, effect, budget, ...): never
|
|
514
|
+
# problems, and inside the JSON row rather than before it
|
|
515
|
+
for line in [] if as_json else row.get("report", []):
|
|
516
|
+
print(line)
|
|
372
517
|
else:
|
|
373
518
|
print("no research line under %s" % tr.root(repo))
|
|
374
519
|
lines = len(report)
|
|
@@ -559,13 +704,21 @@ def cmd_migrate(args):
|
|
|
559
704
|
|
|
560
705
|
def cmd_source(args):
|
|
561
706
|
"""File one orx run's log as the receipt of an experiment."""
|
|
562
|
-
|
|
563
|
-
|
|
707
|
+
import re
|
|
708
|
+
import tezgah_research_capture as cap
|
|
709
|
+
reserved = ("source", "log", "run", "arm", "item", "instrument", "scope", "fixture",
|
|
710
|
+
"status", "command", "ack")
|
|
711
|
+
usage = ('source <slug> <hypothesis> --run <orxRunId> [--instrument <name>] [--arm <a>] '
|
|
712
|
+
'[--item <i>] [--value <field>=<number>]... [--command "<cmd>"] '
|
|
713
|
+
'[--scope real|fixture|derived] [--fixture "<what was generated>"] '
|
|
714
|
+
'[--ack "<the user\'s words>"]')
|
|
564
715
|
if len(args) < 2:
|
|
565
716
|
return misuse(usage)
|
|
566
717
|
slug, hypothesis = args[0], args[1]
|
|
567
|
-
run = command = scope = ""
|
|
718
|
+
run = command = scope = arm = item = ack = ""
|
|
719
|
+
instrument = None
|
|
568
720
|
fixture = None
|
|
721
|
+
values = []
|
|
569
722
|
rest = args[2:]
|
|
570
723
|
while rest:
|
|
571
724
|
flag = rest.pop(0)
|
|
@@ -577,6 +730,22 @@ def cmd_source(args):
|
|
|
577
730
|
scope = rest.pop(0)
|
|
578
731
|
elif flag == "--fixture" and rest:
|
|
579
732
|
fixture = rest.pop(0)
|
|
733
|
+
elif flag == "--instrument" and rest:
|
|
734
|
+
instrument = rest.pop(0)
|
|
735
|
+
elif flag == "--arm" and rest:
|
|
736
|
+
arm = rest.pop(0)
|
|
737
|
+
elif flag == "--item" and rest:
|
|
738
|
+
item = rest.pop(0)
|
|
739
|
+
elif flag == "--ack" and rest:
|
|
740
|
+
ack = rest.pop(0)
|
|
741
|
+
elif flag == "--value" and rest:
|
|
742
|
+
field, _eq, number = rest.pop(0).partition("=")
|
|
743
|
+
if field in reserved:
|
|
744
|
+
return misuse("--value %s: %s is a reserved row key" % (field, field))
|
|
745
|
+
if not re.fullmatch(r"[A-Za-z_][\w.-]*", field) or not re.fullmatch(
|
|
746
|
+
cap.VALUE_NUMBER, number):
|
|
747
|
+
return misuse("--value needs <field>=<number>, not %r" % (field + _eq + number))
|
|
748
|
+
values.append((field, number))
|
|
580
749
|
else:
|
|
581
750
|
return misuse(usage)
|
|
582
751
|
if "/" in hypothesis or "\\" in hypothesis or hypothesis.startswith("."):
|
|
@@ -588,6 +757,10 @@ def cmd_source(args):
|
|
|
588
757
|
return misuse("--scope %r is not one of %s" % (scope, ", ".join(tr.SCOPES)))
|
|
589
758
|
if fixture is not None and not fixture.strip():
|
|
590
759
|
return misuse("--fixture needs the text naming what was generated")
|
|
760
|
+
if instrument is not None and not instrument.strip():
|
|
761
|
+
return misuse("--instrument needs the instrument's name")
|
|
762
|
+
if ack and not ack.strip():
|
|
763
|
+
return misuse('--ack needs "<the user\'s words>" for a log above the bound')
|
|
591
764
|
repo = repo_root(os.getcwd())
|
|
592
765
|
known = tr.slugs(repo)
|
|
593
766
|
if slug not in known:
|
|
@@ -597,16 +770,15 @@ def cmd_source(args):
|
|
|
597
770
|
return misuse("orx is not installed, so no run log can be read; nothing "
|
|
598
771
|
"was written (TEZGAH_ORX_BIN overrides the lookup)")
|
|
599
772
|
path, problems = tr.source_run(repo, slug, hypothesis, run, orx, command, scope,
|
|
600
|
-
fixture or "")
|
|
773
|
+
fixture or "", arm, item, values, instrument or "", ack)
|
|
601
774
|
if problems:
|
|
602
775
|
for problem in problems:
|
|
603
776
|
print("FAIL %s: %s" % (slug, problem))
|
|
604
777
|
return 1
|
|
605
778
|
print("receipt %s" % path)
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
', "fixture": %s' % json.dumps(fixture) if fixture else ""))
|
|
779
|
+
rows = tr._row_objects(os.path.join(os.path.dirname(os.path.dirname(path)),
|
|
780
|
+
"results.jsonl"))
|
|
781
|
+
print("row %s" % json.dumps(rows[-1] if rows else {}))
|
|
610
782
|
if not scope:
|
|
611
783
|
print("note: the row declares no scope, so nothing says whether this run "
|
|
612
784
|
"measured the running system or an input you generated; re-file with "
|
|
@@ -905,6 +1077,28 @@ def cmd_conclude(args):
|
|
|
905
1077
|
print("FAIL conclude: %s" % problem)
|
|
906
1078
|
return 1
|
|
907
1079
|
print("concluded %s; it moved to research/done/%s" % (slug, slug))
|
|
1080
|
+
for decision, variant in tr.owner_waits(repo, slug):
|
|
1081
|
+
print("report to the owner: %s is recommended, not chosen; building it waits "
|
|
1082
|
+
"for the owner's answer (tezgah-research choose %s %s %s --ack "
|
|
1083
|
+
"\"<their words>\")" % (variant, slug, decision, variant))
|
|
1084
|
+
return 0
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
def cmd_choose(args):
|
|
1088
|
+
"""Record the owner's pick among a decision's produced variants."""
|
|
1089
|
+
usage = 'choose <slug> <decision> <variant> --ack "<the owner\'s words>"'
|
|
1090
|
+
if len(args) != 5 or args[3] != "--ack":
|
|
1091
|
+
return misuse(usage)
|
|
1092
|
+
slug, decision, variant, _flag, ack = args
|
|
1093
|
+
repo = repo_root(os.getcwd())
|
|
1094
|
+
if slug not in tr.slugs(repo):
|
|
1095
|
+
return misuse("no such research line: %s" % slug)
|
|
1096
|
+
problem = tr.choose_line(repo, slug, decision, variant, ack,
|
|
1097
|
+
time.strftime("%Y-%m-%d"))
|
|
1098
|
+
if problem:
|
|
1099
|
+
print("FAIL choose: %s" % problem)
|
|
1100
|
+
return 1
|
|
1101
|
+
print("decisions/%s: the owner chose %s" % (decision, variant))
|
|
908
1102
|
return 0
|
|
909
1103
|
|
|
910
1104
|
|
|
@@ -1050,6 +1244,8 @@ def main(argv):
|
|
|
1050
1244
|
return cmd_verdict(rest)
|
|
1051
1245
|
if cmd == "conclude":
|
|
1052
1246
|
return cmd_conclude(rest)
|
|
1247
|
+
if cmd == "choose":
|
|
1248
|
+
return cmd_choose(rest)
|
|
1053
1249
|
if cmd == "migrate-layout":
|
|
1054
1250
|
return cmd_migrate_layout(rest)
|
|
1055
1251
|
if cmd == "close":
|
|
@@ -1062,9 +1258,24 @@ def main(argv):
|
|
|
1062
1258
|
"board": cmd_board, "dedup": cmd_dedup, "yield": cmd_yield}
|
|
1063
1259
|
if cmd in campaign:
|
|
1064
1260
|
return campaign[cmd](rest)
|
|
1261
|
+
# rules 8's capture and evidence commands, imported only when asked for so a
|
|
1262
|
+
# missing optional module never breaks another command. Each handler takes
|
|
1263
|
+
# (repo, args), prints its own output and returns its exit code; `release-check`
|
|
1264
|
+
# and `calibration` need no line and run from any directory.
|
|
1265
|
+
import importlib
|
|
1266
|
+
for name in ("tezgah_research_capture", "tezgah_research_evidence"):
|
|
1267
|
+
try:
|
|
1268
|
+
commands = importlib.import_module(name).COMMANDS
|
|
1269
|
+
except (ImportError, AttributeError):
|
|
1270
|
+
continue
|
|
1271
|
+
if cmd in commands:
|
|
1272
|
+
return commands[cmd](repo_root(os.getcwd()), rest)
|
|
1065
1273
|
return misuse("unknown command %r (init, commit, check, status, --all, claim, predict, "
|
|
1066
|
-
"components, migrate, source, compare, verdict, conclude,
|
|
1067
|
-
"
|
|
1274
|
+
"components, migrate, source, compare, verdict, conclude, choose, "
|
|
1275
|
+
"migrate-layout, "
|
|
1276
|
+
"close, seal, import, next, idea, stage, match, board, dedup, yield, cite, "
|
|
1277
|
+
"fetch, search, instrument, gold, label, switch, release-check, "
|
|
1278
|
+
"calibration)" % cmd)
|
|
1068
1279
|
|
|
1069
1280
|
|
|
1070
1281
|
if __name__ == "__main__":
|