loopmath 0.3.5__tar.gz → 0.4.0__tar.gz
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.
- {loopmath-0.3.5 → loopmath-0.4.0}/PKG-INFO +25 -6
- {loopmath-0.3.5 → loopmath-0.4.0}/README.md +24 -5
- {loopmath-0.3.5 → loopmath-0.4.0}/pyproject.toml +9 -1
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/__init__.py +1 -1
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/design.py +108 -27
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/fit.py +149 -42
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/forest.py +9 -3
- loopmath-0.4.0/src/loopmath/belief/level.py +132 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/outcome.py +108 -10
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/priors.py +52 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/rules.py +10 -7
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/cli.py +24 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/cli_registry.py +360 -5
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/__init__.py +259 -33
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/commands.py +5 -3
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/units.py +9 -5
- loopmath-0.4.0/src/loopmath/flows/__init__.py +10 -0
- loopmath-0.4.0/src/loopmath/flows/check.py +717 -0
- loopmath-0.4.0/src/loopmath/flows/commands.py +1306 -0
- loopmath-0.4.0/src/loopmath/flows/edits.py +725 -0
- loopmath-0.4.0/src/loopmath/flows/folder.py +133 -0
- loopmath-0.4.0/src/loopmath/flows/judges.py +843 -0
- loopmath-0.4.0/src/loopmath/flows/next.py +120 -0
- loopmath-0.4.0/src/loopmath/flows/plan.py +822 -0
- loopmath-0.4.0/src/loopmath/flows/prefill.py +335 -0
- loopmath-0.4.0/src/loopmath/flows/record.py +474 -0
- loopmath-0.4.0/src/loopmath/flows/records.py +384 -0
- loopmath-0.4.0/src/loopmath/flows/simulate.py +816 -0
- loopmath-0.4.0/src/loopmath/flows/status.py +374 -0
- loopmath-0.4.0/src/loopmath/flows/tomlview.py +666 -0
- loopmath-0.4.0/src/loopmath/flows/walk.py +869 -0
- loopmath-0.4.0/src/loopmath/harness/herdr/loopmath-harness/herdr-plugin.toml +38 -0
- loopmath-0.4.0/src/loopmath/harness/mod/loopmath-harness/.claude-plugin/marketplace.json +6 -0
- loopmath-0.4.0/src/loopmath/harness/mod/loopmath-harness/.claude-plugin/plugin.json +21 -0
- loopmath-0.4.0/src/loopmath/harness/mod/loopmath-harness/.gitignore +3 -0
- loopmath-0.4.0/src/loopmath/harness/mod/loopmath-harness/README.md +40 -0
- loopmath-0.4.0/src/loopmath/harness/mod/loopmath-harness/hooks/events.ts +338 -0
- loopmath-0.4.0/src/loopmath/harness/mod/loopmath-harness/hooks/hooks.json +1 -0
- loopmath-0.4.0/src/loopmath/harness/mod/loopmath-harness/hooks/register.test.ts +469 -0
- loopmath-0.4.0/src/loopmath/harness/mod/loopmath-harness/hooks/register.tsx +417 -0
- loopmath-0.4.0/src/loopmath/harness/mod/loopmath-harness/types/index.d.ts +79 -0
- loopmath-0.4.0/src/loopmath/harness/tune/__init__.py +13 -0
- loopmath-0.4.0/src/loopmath/harness/tune/commands.py +1518 -0
- loopmath-0.4.0/src/loopmath/harness/tune/config.py +391 -0
- loopmath-0.4.0/src/loopmath/harness/tune/contracts.py +778 -0
- loopmath-0.4.0/src/loopmath/harness/tune/delivery.py +217 -0
- loopmath-0.4.0/src/loopmath/harness/tune/design.py +231 -0
- loopmath-0.4.0/src/loopmath/harness/tune/editors.py +203 -0
- loopmath-0.4.0/src/loopmath/harness/tune/edits.py +928 -0
- loopmath-0.4.0/src/loopmath/harness/tune/effects.py +193 -0
- loopmath-0.4.0/src/loopmath/harness/tune/engine.py +1243 -0
- loopmath-0.4.0/src/loopmath/harness/tune/events.py +322 -0
- loopmath-0.4.0/src/loopmath/harness/tune/executor.py +270 -0
- loopmath-0.4.0/src/loopmath/harness/tune/herdr.py +611 -0
- loopmath-0.4.0/src/loopmath/harness/tune/isolation.py +677 -0
- loopmath-0.4.0/src/loopmath/harness/tune/ledger.py +165 -0
- loopmath-0.4.0/src/loopmath/harness/tune/library.py +126 -0
- loopmath-0.4.0/src/loopmath/harness/tune/modinstall.py +180 -0
- loopmath-0.4.0/src/loopmath/harness/tune/plan.py +378 -0
- loopmath-0.4.0/src/loopmath/harness/tune/prompts.py +192 -0
- loopmath-0.4.0/src/loopmath/harness/tune/reflect.py +131 -0
- loopmath-0.4.0/src/loopmath/harness/tune/schema.py +406 -0
- loopmath-0.4.0/src/loopmath/harness/tune/score.py +445 -0
- loopmath-0.4.0/src/loopmath/harness/tune/sessions.py +158 -0
- loopmath-0.4.0/src/loopmath/harness/tune/skilldoc.py +180 -0
- loopmath-0.4.0/src/loopmath/harness/tune/state.py +200 -0
- loopmath-0.4.0/src/loopmath/harness/tune/stream.py +320 -0
- loopmath-0.4.0/src/loopmath/harness_runs/__init__.py +19 -0
- loopmath-0.4.0/src/loopmath/harness_runs/ocp.py +741 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/harness_runs/rows.py +224 -12
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/__init__.py +6 -3
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/canonical.py +69 -8
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/commands.py +3 -2
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/conformance.py +632 -34
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/emit.py +100 -15
- loopmath-0.4.0/src/loopmath/ocp/finite.py +93 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/migrate.py +17 -9
- loopmath-0.4.0/src/loopmath/ocp/schema/ocp-v0.4.schema.json +2778 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/reduce.py +6 -2
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/show.py +9 -4
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/validate.py +4 -1
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/commands.py +4 -1
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/commands.py +2 -2
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/guide.py +2 -1
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/guides/fit.md +2 -2
- loopmath-0.4.0/src/loopmath/skill/guides/flow.md +409 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/install.py +3 -1
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/skills/loopmath/SKILL.md +2 -1
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/commands.py +148 -27
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/config.py +20 -5
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/finish.py +87 -13
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/home.py +78 -8
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/ids.py +29 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/report.py +6 -3
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/runs.py +70 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/types.py +79 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/posterior.py +12 -6
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/candidates.py +3 -2
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/format.py +75 -6
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/ocp.py +17 -3
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath.egg-info/PKG-INFO +25 -6
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath.egg-info/SOURCES.txt +73 -0
- loopmath-0.4.0/tests/test_cli_help_lists.py +72 -0
- loopmath-0.4.0/tests/test_harness_tune_cli.py +464 -0
- loopmath-0.4.0/tests/test_harness_tune_config.py +386 -0
- loopmath-0.4.0/tests/test_harness_tune_delivery.py +139 -0
- loopmath-0.4.0/tests/test_harness_tune_design.py +119 -0
- loopmath-0.4.0/tests/test_harness_tune_editors.py +479 -0
- loopmath-0.4.0/tests/test_harness_tune_edits.py +911 -0
- loopmath-0.4.0/tests/test_harness_tune_effects.py +145 -0
- loopmath-0.4.0/tests/test_harness_tune_engine.py +944 -0
- loopmath-0.4.0/tests/test_harness_tune_executor.py +773 -0
- loopmath-0.4.0/tests/test_harness_tune_herdr.py +487 -0
- loopmath-0.4.0/tests/test_harness_tune_isolation.py +594 -0
- loopmath-0.4.0/tests/test_harness_tune_ledger.py +175 -0
- loopmath-0.4.0/tests/test_harness_tune_library.py +257 -0
- loopmath-0.4.0/tests/test_harness_tune_modinstall.py +225 -0
- loopmath-0.4.0/tests/test_harness_tune_plan.py +287 -0
- loopmath-0.4.0/tests/test_harness_tune_score.py +352 -0
- loopmath-0.4.0/tests/test_harness_tune_sessions.py +269 -0
- loopmath-0.4.0/tests/test_harness_tune_skilldoc.py +72 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_packaging_smoke.py +1 -0
- loopmath-0.3.5/src/loopmath/harness_runs/__init__.py +0 -16
- loopmath-0.3.5/src/loopmath/harness_runs/ocp.py +0 -425
- loopmath-0.3.5/tests/test_cli_help_lists.py +0 -40
- {loopmath-0.3.5 → loopmath-0.4.0}/LICENSE +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/setup.cfg +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/spec/ocp-v0.2.schema.json +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/spec/ocp-v0.schema.json +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/spec/ocp_conformance.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/__main__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapter_host.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/atrium.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/base.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/bb.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/bb_support.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/evolve.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/harness2.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/omp.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/omp_facts.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/omp_links.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/omp_parse.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/omp_types.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/opencode.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/opencode_store.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/openevolve.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/orca.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/otel_genai.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/otel_genai_graph.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/otel_genai_parse.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/otel_genai_types.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/otel_genai_usage.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/paseo.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/pi.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/pi_support.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/plugin_eval.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/registry.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/adapters/shinkaevolve.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/block.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/check_pymc.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/commands.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/compose.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/features.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/gaussian.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/integrated.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/lookahead.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/pricing.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/sampled.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/belief/state.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/builder/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/builder/cli.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/builder/context.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/builder/predict.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/builder/server.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/cli_errors.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/cli_graph.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/cli_support.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/_thresholds.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/_thresholds_sw.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/calibrate.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/calibration.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/checks.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/model.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/compare/value.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/e0/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/e0/arms.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/e0/cli_e0.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/e0/estimate.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/e0/estimate_rework.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/e0/figures.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/e0/io.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/e0/verb.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/explain.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/fit.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/fit_assembly.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/fit_bayes.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/fit_masks.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/fit_predict.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/fit_pricing.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/fit_transfer.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/gaps.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/gate/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/gate/commands.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/gate/core.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/gate/inputs.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/gate/winner.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/gate/winner_cli.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/gate/winner_model.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/gitwalk.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/grade.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/grade_support.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/artifact_git.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/artifact_join.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/artifact_kinds.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/artifacts.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/bashparse.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/bashread_ops.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/bashwrite_ops.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/bashwrites.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/cache.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/codexio.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/codexio_parse.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/codexio_scan.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/dataset.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/dataset_build.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/dataset_core.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/dataset_edges.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/dataset_nodes.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/extract.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/html_common.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/html_costcurve.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/html_css.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/html_data.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/html_force.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/html_render.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/html_swimlanes.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_cli.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_common.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_parse.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_pricing.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_build.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_dispatch.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_evidence.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_node.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_records.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_result.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_session.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_tools.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_validation.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_prompt_workflow.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_report.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labeler_score.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/labels.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/launch.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/launch_origin.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/ocp.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/ocp_emit.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/ocp_support.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/render.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/runfile.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/runfile_export.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/runfile_finish.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/scan.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/schema.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/graph/token_completeness.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/harness/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/harness/layouts.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/harness_runs/commands.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/harness_runs/costs.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/harness_runs/streams.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/base.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/claude_code.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/claude_code_support.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/codex.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/codex_support.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/ocp.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/ocp_analysis.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/ocp_artifact.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/ocp_common.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/ocp_convert.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ingest/ocp_projection.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/integrations/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/integrations/dspy.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/logmatch/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/logmatch/artifacts.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/logmatch/clip.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/logmatch/codex_window.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/logmatch/costs.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/logmatch/match.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/logmatch/settle.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/logmatch/tariff.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/contractv3.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/graph_contract.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/membership.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/schema/ocp-v0.2.schema.json +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/schema/ocp-v0.3.schema.json +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/schema/ocp-v0.schema.json +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/ocp/version.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/onboard/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/onboard/commands.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/onboard/history.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/onboard/label.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/onboard/usual.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/output.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/pool.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/price.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/price_validation.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/prices.toml +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/benchmarks.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/benchmarks.toml +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/build.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/bundle/README.md +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/bundle/e0.jsonl.gz +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/bundle/lanes.jsonl.gz +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/bundle/manifest.json +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/bundle/rq1.jsonl.gz +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/bundle/sweep.jsonl.gz +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/commands.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/e0.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/history.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/lanes.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/ocpdoc.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/registry.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/rq1.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/priors/sweep.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/receipts.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/backlog.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/curve.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/engine.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/gain.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/message.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/receipts.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/search.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/stats.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/storeread.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend/variants.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/recommend_role.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/report/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/report/eligibility.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/report/html.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/report/terminal.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/report/terminal_exclusions.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/report/terminal_format.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/report/terminal_read.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/research_defaults.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/research_paths.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/scoring.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/scoring_comparisons.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/scoring_predictive.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/screen/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/screen/commands.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/screen/design.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/screen/edits.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/screen/model.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/screen/record.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/share/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/share/commands.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/share/export.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/share/import_.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/doctor.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/guides/import.md +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/guides/onboard.md +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/guides/plan.md +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/guides/record.md +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/skill/guides/reference.md +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/budget.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/fitjob.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/lock.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/record.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/rule_change.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/run_names.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/status.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/store/verify.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/surface.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/surface_bootstrap.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/surface_estimation.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/surface_frame.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/surface_presentation.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/surface_support.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/taskmodel.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/tasks/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/tasks/commands.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/tasks/data.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/tasks/fit.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/tasks/posterior.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/tasks/select.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/tasks/sim.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/update.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/README.md +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/base.css +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/builder.css +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/builder.html +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/builder.js +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/common.js +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/estimates.css +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/estimates.js +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/graph.css +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/graph.js +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/plans.css +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/plans.js +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/results.css +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/results.js +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/runs.js +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/viz.css +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/assets/viz.js +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/common.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/plans.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/views/runs.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/__init__.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/catalog/best_of_n.toml +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/catalog/implement_review.toml +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/catalog/plan_implement.toml +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/catalog/plan_implement_review.toml +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/catalog/solo.toml +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/catalog/swarm.toml +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/commands.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/diff.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/graphview.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/ids.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/infer.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/models.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath/workflows/shapes.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath.egg-info/dependency_links.txt +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath.egg-info/entry_points.txt +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath.egg-info/requires.txt +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/src/loopmath.egg-info/top_level.txt +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_atrium.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_bb.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_harness2.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_omp.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_opencode.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_opencode_output_tokens.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_orca.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_otel_genai.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_paseo.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapter_services.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapters.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_adapters_pi.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_analyze_cli.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_arms.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_cli_graph.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_cli_labeler.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_cli_main_module.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_cli_plan_hidden.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_cli_prices.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_cli_startup.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_color_proof.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_duplicate_guards.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_estimate.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_explain.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_fit.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_gaps.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_gitwalk.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_grade.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_artifact_recording.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_artifacts.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_bashwrites.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_cache.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_codexio.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_dataset.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_extract.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_glue.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_html.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_labeler.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_labeler_evidence_matrix.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_launch.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_ocp.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_render.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_runfile.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_graph_schema.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_home_guard.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_html.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_ingest.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_ingest_claude_code.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_ingest_codex.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_ingest_ocp.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_io.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_not_run_summary.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_ocp_conformance.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_ocp_golden.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_ocp_open_enums.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_ocp_versioning.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_output_html_path.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_packaging_metadata.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_pool.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_preview_script.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_price.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_receipts.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_release_paths.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_report_eligibility.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_research_cli.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_runfile_privacy_n1b.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_scoring.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_split_rebindings.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_starting_prior.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_surface.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_taskmodel_features.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_terminal.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_types_control.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_types_piece_prediction.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_update_check.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_v01_scaffold.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_v027_p3.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_v027_small_fixes.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_v028_sol_6_1.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_v031_help_labels.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_v031_json_errors_and_costs.py +0 -0
- {loopmath-0.3.5 → loopmath-0.4.0}/tests/test_v031_new_findings.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: loopmath
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Plan agent workflows, record how they went, and learn from your own Claude Code and Codex logs
|
|
5
5
|
Author: loopmath
|
|
6
6
|
License-Expression: MIT
|
|
@@ -42,7 +42,7 @@ loopmath helps an orchestrator agent choose how to run a coding task, and learns
|
|
|
42
42
|
|
|
43
43
|
Before a task, it predicts how the user's usual agent workflow will do: the chance of an accepted result, and the cost in tokens and dollars. It shows the other workflows on a success-cost curve and offers two exploration picks. Each pick comes with its gain on every future similar run, its one-time price, and the number of runs it takes to pay back. After the task, the orchestrator records what ran and what came of it. loopmath fills in the token costs from the Claude Code and Codex logs, writes a receipt of predicted against actual, and refits.
|
|
44
44
|
|
|
45
|
-
loopmath never starts or coordinates agents. Claude Code, Codex, herdr or your own tool does that; loopmath is a CLI they call. Everything runs locally. loopmath connects to no other machine but pypi.org: `loopmath builder` serves its page on 127.0.0.1 only, and no other command opens a network connection, except the daily update check. Once a day loopmath asks pypi.org whether a newer loopmath exists; it sends only its version and uploads nothing. `LOOPMATH_NO_UPDATE_CHECK=1` turns the check off, and it is off when `CI` is set. The logs are opened read only, and loopmath writes only to its store (`~/.loopmath`, which holds its caches too), to the skill folders `skill install` names, and to paths you name.
|
|
45
|
+
loopmath never starts or coordinates agents, except `loopmath harness` (experimental), which runs Claude Code sessions to tune a repo's harness once you agree to its cost. Otherwise Claude Code, Codex, herdr or your own tool does that; loopmath is a CLI they call. Everything runs locally. loopmath connects to no other machine but pypi.org: `loopmath builder` serves its page on 127.0.0.1 only, and no other command opens a network connection, except the daily update check. Once a day loopmath asks pypi.org whether a newer loopmath exists; it sends only its version and uploads nothing. `LOOPMATH_NO_UPDATE_CHECK=1` turns the check off, and it is off when `CI` is set. A harness tune's sessions are Claude Code sessions, and they call their model as Claude Code does. The logs are opened read only, and loopmath writes only to its store (`~/.loopmath`, which holds its caches too), to the skill folders `skill install` names, and to paths you name.
|
|
46
46
|
|
|
47
47
|
The package installs two commands: `loopmath` and its short alias `loop`. If another `loop` is already on your PATH, use `loopmath`.
|
|
48
48
|
|
|
@@ -84,6 +84,7 @@ Then ask your agent to onboard, for example "onboard loopmath". The agent runs a
|
|
|
84
84
|
| `loopmath guide plan` | "plan a task with loopmath"; which workflow, model or effort to use |
|
|
85
85
|
| `loopmath guide record` | a task planned with loopmath is done; "record", "log" or "save" a run; both runs of a pair need a blind judge |
|
|
86
86
|
| `loopmath guide fit` | "update", "refresh" or "rerun" the fit; what loopmath learned; runs imported or recorded without a refit |
|
|
87
|
+
| `loopmath guide flow` | an experiment on a fixed multi-step workflow (a flow): set it up, run its arms, record them, read the verdicts |
|
|
87
88
|
|
|
88
89
|
`loopmath guide` alone lists them, and `loopmath guide reference` prints the command reference they share, with every command, flag and JSON field they use. A guide is read only: it needs no store and writes nothing.
|
|
89
90
|
|
|
@@ -109,7 +110,7 @@ The dry run makes no labelling call and writes no runs or fit; like `doctor`, it
|
|
|
109
110
|
|
|
110
111
|
Reading the history uses up to 8 worker processes (one per CPU, at most 8). Set `LOOPMATH_WORKERS=1` to keep everything in one process, or another number to change the count.
|
|
111
112
|
|
|
112
|
-
loopmath ships with a prior built from our own sweeps and experiments, so `recommend` gives an answer before you have any history. Your own runs then move it.
|
|
113
|
+
loopmath ships with a prior built from our own sweeps and experiments, so `recommend` gives an answer before you have any history. Your own runs then move it. Your store's overall pass rate is its own, with a wide prior that only your runs move: the shipped runs give their costs and gate rows but no success rows, and the public benchmarks say which models are stronger (`belief.level`, `store` by default; `loopmath config set belief.level shared`, then `loopmath fit`, gives 0.3.5's fit).
|
|
113
114
|
|
|
114
115
|
The prior ships inside the package: our runs, in the shared form (no titles, paths, commands or free text), and the published benchmark results. They are the same files we fit with, and each release updates them. `onboard` and the results page say in one line which prior they start from, and `loopmath prior show` lists it source by source.
|
|
115
116
|
|
|
@@ -158,7 +159,7 @@ A pair runs the goal workflow and an exploration pick from the same base commit,
|
|
|
158
159
|
|
|
159
160
|
A run counts as a success when it is accepted under your rule. By default that means the task's tests pass. A run that `onboard` brought in from your logs, or that `run import` stored, with no tests verdict but a review or accepted verdict, is judged by the review rule instead: a success when its latest review or accepted verdict is accept, approve or pass. `loopmath runs` lists other finished runs such a verdict could settle, with the command that moves them to the review rule, `loopmath outcome --rule review RUN...`. `loopmath outcome --undo-rule RUN...` undoes that, restoring each run's rule as it was; naming that rule (`tests` when it had none) does too, unless the run's own rule was also named review. A review verdict on a reviewer's last attempt then counts twice: as the review gate's pass, and as the run's success. A rule can also be a score target: `loopmath recommend ... --target 'heldout_perf>=2400'` or `--target 'runtime_s<=200'` gives the expected score and the chance of reaching the target. Set standing rules and other options with `loopmath config set KEY VALUE` (`loopmath config get` lists every key, set or not, `config set` refuses a key loopmath does not read, and `loopmath config unset KEY` returns a key to its default), and the spending cap with `loopmath budget --usd X --period month`. Spend counts your runs and onboard's labelling calls; runs onboard brought in from your logs are shown apart and not counted. A run you record with `--source habit` counts.
|
|
160
161
|
|
|
161
|
-
Runs recorded by another tool that writes OCP v0.3, such as an experiment runner, come in with `loopmath run import DIR --finish`: several files or a directory, with one refit at the end (`--no-fit` skips it). It says how many runs were new, unchanged or replaced; importing finished runs into a store with no fit starts a fit. Importing the same documents again changes nothing and keeps the outcomes you added since, and with `--finish` it finishes the runs left open (without it, the runs are stored open and it says to import again with `--finish`). A document whose run id is already in the store with different content is refused by name, with the fields that differ; `--replace` takes it and keeps the outcomes added after the import, and refuses a copy that would overwrite one. Runs in your store always count as yours, whatever source their documents name. `loopmath fit --without SOURCE` leaves out one shipped prior source, and `loopmath status` names the options of the current fit.
|
|
162
|
+
Runs recorded by another tool that writes OCP v0.3 (or v0.4, for a run that names a flow or states checks), such as an experiment runner, come in with `loopmath run import DIR --finish`: several files or a directory, with one refit at the end (`--no-fit` skips it). It says how many runs were new, unchanged or replaced; importing finished runs into a store with no fit starts a fit. Importing the same documents again changes nothing and keeps the outcomes you added since, and with `--finish` it finishes the runs left open (without it, the runs are stored open and it says to import again with `--finish`). A document whose run id is already in the store with different content is refused by name, with the fields that differ; `--replace` takes it and keeps the outcomes added after the import, and refuses a copy that would overwrite one. Runs in your store always count as yours, whatever source their documents name. `loopmath fit --without SOURCE` leaves out one shipped prior source, and `loopmath status` names the options of the current fit.
|
|
162
163
|
|
|
163
164
|
## The three views
|
|
164
165
|
|
|
@@ -178,16 +179,18 @@ The workflow builder is the one page that is served: `loopmath builder --type bu
|
|
|
178
179
|
|---|---|
|
|
179
180
|
| Plan | `task-types`, `workflows` (list, show, validate, diff), `recommend`, `builder` |
|
|
180
181
|
| Record | `run` (start, record, import, attempt, artifact, finish, sessions), `outcome`, `budget`, `config` (get, set, unset) |
|
|
182
|
+
| Flows | `flow` (init, show, export, import, plan, next, record, score, status, check) |
|
|
181
183
|
| Learn | `fit`, `onboard`, `share`, `prior` |
|
|
182
184
|
| View | `runs`, `posterior`, `status`, `report`, `doctor`, `verify-receipts`, `update` |
|
|
183
185
|
| Harness testing | `check-change`, `gate` (experimental), `screen` (experimental) |
|
|
186
|
+
| Harness tuning | `harness` (experimental) |
|
|
184
187
|
| Task subsets | `tasks pick` (experimental) |
|
|
185
188
|
| Evolution loops | `adapt openevolve` (experimental), `adapt shinkaevolve` (experimental), `recommend --role` (experimental) |
|
|
186
189
|
| Skill | `skill` (install, uninstall, show), `guide` |
|
|
187
190
|
| OCP | `ocp` (validate, migrate) |
|
|
188
191
|
| Log analysis | `analyze`, `graph`, `adapt`, `prices`, `validate-prices` |
|
|
189
192
|
|
|
190
|
-
These are experimental: `gate`, `screen`, `tasks pick`, the harness-part estimates (`recommend --harness-variants` and `--harness`, `posterior --level harness` and its `factors`), `recommend --role`, `adapt harness2`, `adapt plugin-eval`, `adapt openevolve`, `adapt shinkaevolve` and the ADE adapters (`adapt NAME`). Each works and has tests, but has had little use on real work so far, and its output may change. Their help says so too. The gate at DSPy's GEPA and MIPROv2 accept step (`loopmath.integrations.dspy`, Python) is experimental too: it is tested against fakes written from their source, not yet with DSPy installed, and its guide says so. So is the opt-in cost model for arms that mix models, `loopmath.compare.model.COST_MODEL = "sw"`, a Python setting with no help of its own; the [changelog](CHANGELOG.md) describes it.
|
|
193
|
+
These are experimental: `harness`, `gate`, `screen`, `tasks pick`, the harness-part estimates (`recommend --harness-variants` and `--harness`, `posterior --level harness` and its `factors`), `recommend --role`, `adapt harness2`, `adapt plugin-eval`, `adapt openevolve`, `adapt shinkaevolve` and the ADE adapters (`adapt NAME`). Each works and has tests, but has had little use on real work so far, and its output may change. Their help says so too. The gate at DSPy's GEPA and MIPROv2 accept step (`loopmath.integrations.dspy`, Python) is experimental too: it is tested against fakes written from their source, not yet with DSPy installed, and its guide says so. So is the opt-in cost model for arms that mix models, `loopmath.compare.model.COST_MODEL = "sw"`, a Python setting with no help of its own; the [changelog](CHANGELOG.md) describes it.
|
|
191
194
|
|
|
192
195
|
Each command prints a short summary by default. With `--json`, it prints exactly one JSON object instead. One exception: `loopmath adapt harness2`, `adapt harness-runs`, `adapt plugin-eval`, `adapt openevolve` and `adapt shinkaevolve` without `--out` print the run documents on stdout, one per line, so their `--json` summary goes to stderr. Exit codes: 0 ok, 1 user error, 2 not found, 3 not implemented, 4 store locked, 5 no fit yet. For flags, `loopmath <command> --help` is the source of truth. Commands, pages and the `runs` table show times in your local time with the zone; the store and `--json` keep UTC. A cost under a cent shows one significant digit (`$0.004`), and an exact zero is `$0`.
|
|
193
196
|
|
|
@@ -289,6 +292,21 @@ These commands are for changing the harness your agents run with and finding out
|
|
|
289
292
|
- **DSPy's GEPA and MIPROv2 (experimental).** An optimizer's accept step keeps a new prompt when its score on a few instances goes up, and on 3 instances that keeps many children that are no better. `loopmath.integrations.dspy` puts the gate there: `GEPAAcceptance` is a GEPA acceptance criterion (run GEPA with `use_merge=False`), `MIPROv2Gate` confirms MIPROv2's replacements, and `run([], [], more)` gates any compiled program against its student. It imports neither dspy nor gepa. See [the DSPy guide](docs/dspy.md).
|
|
290
293
|
- **`tasks pick` (experimental).** For a loop or a benchmark run that scores each candidate on some of a suite's tasks instead of all of them. `loopmath tasks pick --candidate SEL` reads the finished runs in the store, or `--runs FILE`, learns each task's difficulty and discrimination from the other arms' runs on it, and prints the candidate's suite score so far (the mean over the suite of its chance of acceptance per task) with 80% and 95% ranges, whether to stop, and the next task to run. From a store it writes that task's file and the `run record --task-file F --label KEY=VALUE --home PATH` line that records the run in the same store, so the next call sees it. It stops when the 80% range is as narrow as one full run of the suite would give (`--halfwidth` sets another target), or, with `--versus X` or `--versus-arm SEL`, when the score is above or below a number or another arm's at `--level`. `--method` chooses the next task: the largest expected cut in the score's variance (`loss`, the default), information, one fixed order, random, or stratified by predicted rate. The default learns fastest when the candidate behaves like the arms in the history; for a candidate unlike all of them (a new model rather than a change to a known one's harness), `--method stratified` or `random` keeps the ranges closer to honest at the cost of more sessions. A candidate that scores below every arm in the history (a broken setup, say) is estimated too high by every method, and its ranges can miss even at the full suite; under `--method random` the accepted count over the sessions, which every call prints, is the check. Every estimate prints both warnings, in text and in `--json` (`estimate.warnings`). With `--versus`, a bar within about 0.01 of the candidate's score is close to a coin toss for any method; to ask whether a change helps by at least some margin, pass the bar plus that margin. The ranges are approximate: they leave out the history fit's own error shared with other arms. `loopmath tasks pick --help` lists the rest.
|
|
291
294
|
|
|
295
|
+
## Tune a Claude Code harness
|
|
296
|
+
|
|
297
|
+
`loopmath harness` (experimental) tunes a repo's Claude Code harness (CLAUDE.md, skills and agents) on a task you run again and again: editor sessions propose edits, a screening design of task runs measures each one, and the kept edits are delivered only when they beat the base. It follows the design measured in stream 1 of our harness2 study; this release has not been measured on its own yet. Every session spends model calls, so `plan` prices the tune before any runs:
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
loopmath harness init # loopmath-harness.toml, one comment per field
|
|
301
|
+
loopmath harness config set task.prompt "add a --json flag to the export command"
|
|
302
|
+
loopmath harness plan # no model call; on the defaults: cost: 2.72 USD (1.72 to 6.38)
|
|
303
|
+
loopmath harness run --detach --yes # prints the tune id; the engine runs on in its own session
|
|
304
|
+
loopmath harness watch # follow the events to the end
|
|
305
|
+
loopmath harness apply --dry-run # the files it would write; `apply` writes them and commits nothing
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Every config field has a flag (`--budget-usd 6`), and `loopmath harness skill` prints the guide an agent follows to drive these commands. In Claude Code, `loopmath harness mod install` adds `/harness`: a pane to configure, plan and start a tune, and a line above the prompt while it runs. The [harness guide](docs/harness.md) has the fields, the events and the isolation.
|
|
309
|
+
|
|
292
310
|
## Does my plugin pay?
|
|
293
311
|
|
|
294
312
|
`claude plugin eval` grades a plugin's eval cases with and without the plugin. `adapt plugin-eval` (experimental) reads its result, and loopmath turns the per-case deltas into a decision: adopt, reject, or run more, with ranges on the gain and, given each run's cost with `--cost-from`, on cost per accepted result. It reads the file only and never runs Claude Code.
|
|
@@ -306,7 +324,7 @@ Runs of one case are not new tasks: to learn whether the plugin helps on tasks l
|
|
|
306
324
|
|
|
307
325
|
The store is `~/.loopmath`. Set `LOOPMATH_HOME` or pass `--home` to put it elsewhere; the log parse cache moves with it, to `cache/` inside the store, unless you set `LOOPMATH_CACHE_DIR`. It holds:
|
|
308
326
|
|
|
309
|
-
- one OCP v0.3
|
|
327
|
+
- one OCP document per recorded run: v0.3, or v0.4 for a run that names a flow or states checks;
|
|
310
328
|
- signals, receipts and fits;
|
|
311
329
|
- your config and your workflows;
|
|
312
330
|
- the views you write;
|
|
@@ -343,6 +361,7 @@ loopmath graph --workspace NAME --format html --out graph.html
|
|
|
343
361
|
- [OpenEvolve and ShinkaEvolve runs](docs/adapters.md#openevolve-and-shinkaevolve): `adapt openevolve`, `adapt shinkaevolve` and `recommend --role`, which model to give an evolution loop's mutator
|
|
344
362
|
- [Release policy](docs/release.md)
|
|
345
363
|
- [Screening harness edits](docs/screen.md): `screen`, with a worked 48-session example and its limits
|
|
364
|
+
- [Tuning a Claude Code harness](docs/harness.md): `loopmath harness`, the `/harness` mod and the herdr runner
|
|
346
365
|
- [Packaged model prices](src/loopmath/prices.toml)
|
|
347
366
|
|
|
348
367
|
## License
|
|
@@ -4,7 +4,7 @@ loopmath helps an orchestrator agent choose how to run a coding task, and learns
|
|
|
4
4
|
|
|
5
5
|
Before a task, it predicts how the user's usual agent workflow will do: the chance of an accepted result, and the cost in tokens and dollars. It shows the other workflows on a success-cost curve and offers two exploration picks. Each pick comes with its gain on every future similar run, its one-time price, and the number of runs it takes to pay back. After the task, the orchestrator records what ran and what came of it. loopmath fills in the token costs from the Claude Code and Codex logs, writes a receipt of predicted against actual, and refits.
|
|
6
6
|
|
|
7
|
-
loopmath never starts or coordinates agents. Claude Code, Codex, herdr or your own tool does that; loopmath is a CLI they call. Everything runs locally. loopmath connects to no other machine but pypi.org: `loopmath builder` serves its page on 127.0.0.1 only, and no other command opens a network connection, except the daily update check. Once a day loopmath asks pypi.org whether a newer loopmath exists; it sends only its version and uploads nothing. `LOOPMATH_NO_UPDATE_CHECK=1` turns the check off, and it is off when `CI` is set. The logs are opened read only, and loopmath writes only to its store (`~/.loopmath`, which holds its caches too), to the skill folders `skill install` names, and to paths you name.
|
|
7
|
+
loopmath never starts or coordinates agents, except `loopmath harness` (experimental), which runs Claude Code sessions to tune a repo's harness once you agree to its cost. Otherwise Claude Code, Codex, herdr or your own tool does that; loopmath is a CLI they call. Everything runs locally. loopmath connects to no other machine but pypi.org: `loopmath builder` serves its page on 127.0.0.1 only, and no other command opens a network connection, except the daily update check. Once a day loopmath asks pypi.org whether a newer loopmath exists; it sends only its version and uploads nothing. `LOOPMATH_NO_UPDATE_CHECK=1` turns the check off, and it is off when `CI` is set. A harness tune's sessions are Claude Code sessions, and they call their model as Claude Code does. The logs are opened read only, and loopmath writes only to its store (`~/.loopmath`, which holds its caches too), to the skill folders `skill install` names, and to paths you name.
|
|
8
8
|
|
|
9
9
|
The package installs two commands: `loopmath` and its short alias `loop`. If another `loop` is already on your PATH, use `loopmath`.
|
|
10
10
|
|
|
@@ -46,6 +46,7 @@ Then ask your agent to onboard, for example "onboard loopmath". The agent runs a
|
|
|
46
46
|
| `loopmath guide plan` | "plan a task with loopmath"; which workflow, model or effort to use |
|
|
47
47
|
| `loopmath guide record` | a task planned with loopmath is done; "record", "log" or "save" a run; both runs of a pair need a blind judge |
|
|
48
48
|
| `loopmath guide fit` | "update", "refresh" or "rerun" the fit; what loopmath learned; runs imported or recorded without a refit |
|
|
49
|
+
| `loopmath guide flow` | an experiment on a fixed multi-step workflow (a flow): set it up, run its arms, record them, read the verdicts |
|
|
49
50
|
|
|
50
51
|
`loopmath guide` alone lists them, and `loopmath guide reference` prints the command reference they share, with every command, flag and JSON field they use. A guide is read only: it needs no store and writes nothing.
|
|
51
52
|
|
|
@@ -71,7 +72,7 @@ The dry run makes no labelling call and writes no runs or fit; like `doctor`, it
|
|
|
71
72
|
|
|
72
73
|
Reading the history uses up to 8 worker processes (one per CPU, at most 8). Set `LOOPMATH_WORKERS=1` to keep everything in one process, or another number to change the count.
|
|
73
74
|
|
|
74
|
-
loopmath ships with a prior built from our own sweeps and experiments, so `recommend` gives an answer before you have any history. Your own runs then move it.
|
|
75
|
+
loopmath ships with a prior built from our own sweeps and experiments, so `recommend` gives an answer before you have any history. Your own runs then move it. Your store's overall pass rate is its own, with a wide prior that only your runs move: the shipped runs give their costs and gate rows but no success rows, and the public benchmarks say which models are stronger (`belief.level`, `store` by default; `loopmath config set belief.level shared`, then `loopmath fit`, gives 0.3.5's fit).
|
|
75
76
|
|
|
76
77
|
The prior ships inside the package: our runs, in the shared form (no titles, paths, commands or free text), and the published benchmark results. They are the same files we fit with, and each release updates them. `onboard` and the results page say in one line which prior they start from, and `loopmath prior show` lists it source by source.
|
|
77
78
|
|
|
@@ -120,7 +121,7 @@ A pair runs the goal workflow and an exploration pick from the same base commit,
|
|
|
120
121
|
|
|
121
122
|
A run counts as a success when it is accepted under your rule. By default that means the task's tests pass. A run that `onboard` brought in from your logs, or that `run import` stored, with no tests verdict but a review or accepted verdict, is judged by the review rule instead: a success when its latest review or accepted verdict is accept, approve or pass. `loopmath runs` lists other finished runs such a verdict could settle, with the command that moves them to the review rule, `loopmath outcome --rule review RUN...`. `loopmath outcome --undo-rule RUN...` undoes that, restoring each run's rule as it was; naming that rule (`tests` when it had none) does too, unless the run's own rule was also named review. A review verdict on a reviewer's last attempt then counts twice: as the review gate's pass, and as the run's success. A rule can also be a score target: `loopmath recommend ... --target 'heldout_perf>=2400'` or `--target 'runtime_s<=200'` gives the expected score and the chance of reaching the target. Set standing rules and other options with `loopmath config set KEY VALUE` (`loopmath config get` lists every key, set or not, `config set` refuses a key loopmath does not read, and `loopmath config unset KEY` returns a key to its default), and the spending cap with `loopmath budget --usd X --period month`. Spend counts your runs and onboard's labelling calls; runs onboard brought in from your logs are shown apart and not counted. A run you record with `--source habit` counts.
|
|
122
123
|
|
|
123
|
-
Runs recorded by another tool that writes OCP v0.3, such as an experiment runner, come in with `loopmath run import DIR --finish`: several files or a directory, with one refit at the end (`--no-fit` skips it). It says how many runs were new, unchanged or replaced; importing finished runs into a store with no fit starts a fit. Importing the same documents again changes nothing and keeps the outcomes you added since, and with `--finish` it finishes the runs left open (without it, the runs are stored open and it says to import again with `--finish`). A document whose run id is already in the store with different content is refused by name, with the fields that differ; `--replace` takes it and keeps the outcomes added after the import, and refuses a copy that would overwrite one. Runs in your store always count as yours, whatever source their documents name. `loopmath fit --without SOURCE` leaves out one shipped prior source, and `loopmath status` names the options of the current fit.
|
|
124
|
+
Runs recorded by another tool that writes OCP v0.3 (or v0.4, for a run that names a flow or states checks), such as an experiment runner, come in with `loopmath run import DIR --finish`: several files or a directory, with one refit at the end (`--no-fit` skips it). It says how many runs were new, unchanged or replaced; importing finished runs into a store with no fit starts a fit. Importing the same documents again changes nothing and keeps the outcomes you added since, and with `--finish` it finishes the runs left open (without it, the runs are stored open and it says to import again with `--finish`). A document whose run id is already in the store with different content is refused by name, with the fields that differ; `--replace` takes it and keeps the outcomes added after the import, and refuses a copy that would overwrite one. Runs in your store always count as yours, whatever source their documents name. `loopmath fit --without SOURCE` leaves out one shipped prior source, and `loopmath status` names the options of the current fit.
|
|
124
125
|
|
|
125
126
|
## The three views
|
|
126
127
|
|
|
@@ -140,16 +141,18 @@ The workflow builder is the one page that is served: `loopmath builder --type bu
|
|
|
140
141
|
|---|---|
|
|
141
142
|
| Plan | `task-types`, `workflows` (list, show, validate, diff), `recommend`, `builder` |
|
|
142
143
|
| Record | `run` (start, record, import, attempt, artifact, finish, sessions), `outcome`, `budget`, `config` (get, set, unset) |
|
|
144
|
+
| Flows | `flow` (init, show, export, import, plan, next, record, score, status, check) |
|
|
143
145
|
| Learn | `fit`, `onboard`, `share`, `prior` |
|
|
144
146
|
| View | `runs`, `posterior`, `status`, `report`, `doctor`, `verify-receipts`, `update` |
|
|
145
147
|
| Harness testing | `check-change`, `gate` (experimental), `screen` (experimental) |
|
|
148
|
+
| Harness tuning | `harness` (experimental) |
|
|
146
149
|
| Task subsets | `tasks pick` (experimental) |
|
|
147
150
|
| Evolution loops | `adapt openevolve` (experimental), `adapt shinkaevolve` (experimental), `recommend --role` (experimental) |
|
|
148
151
|
| Skill | `skill` (install, uninstall, show), `guide` |
|
|
149
152
|
| OCP | `ocp` (validate, migrate) |
|
|
150
153
|
| Log analysis | `analyze`, `graph`, `adapt`, `prices`, `validate-prices` |
|
|
151
154
|
|
|
152
|
-
These are experimental: `gate`, `screen`, `tasks pick`, the harness-part estimates (`recommend --harness-variants` and `--harness`, `posterior --level harness` and its `factors`), `recommend --role`, `adapt harness2`, `adapt plugin-eval`, `adapt openevolve`, `adapt shinkaevolve` and the ADE adapters (`adapt NAME`). Each works and has tests, but has had little use on real work so far, and its output may change. Their help says so too. The gate at DSPy's GEPA and MIPROv2 accept step (`loopmath.integrations.dspy`, Python) is experimental too: it is tested against fakes written from their source, not yet with DSPy installed, and its guide says so. So is the opt-in cost model for arms that mix models, `loopmath.compare.model.COST_MODEL = "sw"`, a Python setting with no help of its own; the [changelog](CHANGELOG.md) describes it.
|
|
155
|
+
These are experimental: `harness`, `gate`, `screen`, `tasks pick`, the harness-part estimates (`recommend --harness-variants` and `--harness`, `posterior --level harness` and its `factors`), `recommend --role`, `adapt harness2`, `adapt plugin-eval`, `adapt openevolve`, `adapt shinkaevolve` and the ADE adapters (`adapt NAME`). Each works and has tests, but has had little use on real work so far, and its output may change. Their help says so too. The gate at DSPy's GEPA and MIPROv2 accept step (`loopmath.integrations.dspy`, Python) is experimental too: it is tested against fakes written from their source, not yet with DSPy installed, and its guide says so. So is the opt-in cost model for arms that mix models, `loopmath.compare.model.COST_MODEL = "sw"`, a Python setting with no help of its own; the [changelog](CHANGELOG.md) describes it.
|
|
153
156
|
|
|
154
157
|
Each command prints a short summary by default. With `--json`, it prints exactly one JSON object instead. One exception: `loopmath adapt harness2`, `adapt harness-runs`, `adapt plugin-eval`, `adapt openevolve` and `adapt shinkaevolve` without `--out` print the run documents on stdout, one per line, so their `--json` summary goes to stderr. Exit codes: 0 ok, 1 user error, 2 not found, 3 not implemented, 4 store locked, 5 no fit yet. For flags, `loopmath <command> --help` is the source of truth. Commands, pages and the `runs` table show times in your local time with the zone; the store and `--json` keep UTC. A cost under a cent shows one significant digit (`$0.004`), and an exact zero is `$0`.
|
|
155
158
|
|
|
@@ -251,6 +254,21 @@ These commands are for changing the harness your agents run with and finding out
|
|
|
251
254
|
- **DSPy's GEPA and MIPROv2 (experimental).** An optimizer's accept step keeps a new prompt when its score on a few instances goes up, and on 3 instances that keeps many children that are no better. `loopmath.integrations.dspy` puts the gate there: `GEPAAcceptance` is a GEPA acceptance criterion (run GEPA with `use_merge=False`), `MIPROv2Gate` confirms MIPROv2's replacements, and `run([], [], more)` gates any compiled program against its student. It imports neither dspy nor gepa. See [the DSPy guide](docs/dspy.md).
|
|
252
255
|
- **`tasks pick` (experimental).** For a loop or a benchmark run that scores each candidate on some of a suite's tasks instead of all of them. `loopmath tasks pick --candidate SEL` reads the finished runs in the store, or `--runs FILE`, learns each task's difficulty and discrimination from the other arms' runs on it, and prints the candidate's suite score so far (the mean over the suite of its chance of acceptance per task) with 80% and 95% ranges, whether to stop, and the next task to run. From a store it writes that task's file and the `run record --task-file F --label KEY=VALUE --home PATH` line that records the run in the same store, so the next call sees it. It stops when the 80% range is as narrow as one full run of the suite would give (`--halfwidth` sets another target), or, with `--versus X` or `--versus-arm SEL`, when the score is above or below a number or another arm's at `--level`. `--method` chooses the next task: the largest expected cut in the score's variance (`loss`, the default), information, one fixed order, random, or stratified by predicted rate. The default learns fastest when the candidate behaves like the arms in the history; for a candidate unlike all of them (a new model rather than a change to a known one's harness), `--method stratified` or `random` keeps the ranges closer to honest at the cost of more sessions. A candidate that scores below every arm in the history (a broken setup, say) is estimated too high by every method, and its ranges can miss even at the full suite; under `--method random` the accepted count over the sessions, which every call prints, is the check. Every estimate prints both warnings, in text and in `--json` (`estimate.warnings`). With `--versus`, a bar within about 0.01 of the candidate's score is close to a coin toss for any method; to ask whether a change helps by at least some margin, pass the bar plus that margin. The ranges are approximate: they leave out the history fit's own error shared with other arms. `loopmath tasks pick --help` lists the rest.
|
|
253
256
|
|
|
257
|
+
## Tune a Claude Code harness
|
|
258
|
+
|
|
259
|
+
`loopmath harness` (experimental) tunes a repo's Claude Code harness (CLAUDE.md, skills and agents) on a task you run again and again: editor sessions propose edits, a screening design of task runs measures each one, and the kept edits are delivered only when they beat the base. It follows the design measured in stream 1 of our harness2 study; this release has not been measured on its own yet. Every session spends model calls, so `plan` prices the tune before any runs:
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
loopmath harness init # loopmath-harness.toml, one comment per field
|
|
263
|
+
loopmath harness config set task.prompt "add a --json flag to the export command"
|
|
264
|
+
loopmath harness plan # no model call; on the defaults: cost: 2.72 USD (1.72 to 6.38)
|
|
265
|
+
loopmath harness run --detach --yes # prints the tune id; the engine runs on in its own session
|
|
266
|
+
loopmath harness watch # follow the events to the end
|
|
267
|
+
loopmath harness apply --dry-run # the files it would write; `apply` writes them and commits nothing
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Every config field has a flag (`--budget-usd 6`), and `loopmath harness skill` prints the guide an agent follows to drive these commands. In Claude Code, `loopmath harness mod install` adds `/harness`: a pane to configure, plan and start a tune, and a line above the prompt while it runs. The [harness guide](docs/harness.md) has the fields, the events and the isolation.
|
|
271
|
+
|
|
254
272
|
## Does my plugin pay?
|
|
255
273
|
|
|
256
274
|
`claude plugin eval` grades a plugin's eval cases with and without the plugin. `adapt plugin-eval` (experimental) reads its result, and loopmath turns the per-case deltas into a decision: adopt, reject, or run more, with ranges on the gain and, given each run's cost with `--cost-from`, on cost per accepted result. It reads the file only and never runs Claude Code.
|
|
@@ -268,7 +286,7 @@ Runs of one case are not new tasks: to learn whether the plugin helps on tasks l
|
|
|
268
286
|
|
|
269
287
|
The store is `~/.loopmath`. Set `LOOPMATH_HOME` or pass `--home` to put it elsewhere; the log parse cache moves with it, to `cache/` inside the store, unless you set `LOOPMATH_CACHE_DIR`. It holds:
|
|
270
288
|
|
|
271
|
-
- one OCP v0.3
|
|
289
|
+
- one OCP document per recorded run: v0.3, or v0.4 for a run that names a flow or states checks;
|
|
272
290
|
- signals, receipts and fits;
|
|
273
291
|
- your config and your workflows;
|
|
274
292
|
- the views you write;
|
|
@@ -305,6 +323,7 @@ loopmath graph --workspace NAME --format html --out graph.html
|
|
|
305
323
|
- [OpenEvolve and ShinkaEvolve runs](docs/adapters.md#openevolve-and-shinkaevolve): `adapt openevolve`, `adapt shinkaevolve` and `recommend --role`, which model to give an evolution loop's mutator
|
|
306
324
|
- [Release policy](docs/release.md)
|
|
307
325
|
- [Screening harness edits](docs/screen.md): `screen`, with a worked 48-session example and its limits
|
|
326
|
+
- [Tuning a Claude Code harness](docs/harness.md): `loopmath harness`, the `/harness` mod and the herdr runner
|
|
308
327
|
- [Packaged model prices](src/loopmath/prices.toml)
|
|
309
328
|
|
|
310
329
|
## License
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "loopmath"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.4.0"
|
|
8
8
|
description = "Plan agent workflows, record how they went, and learn from your own Claude Code and Codex logs"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -94,6 +94,14 @@ loopmath = [
|
|
|
94
94
|
"priors/bundle/*",
|
|
95
95
|
"views/assets/*",
|
|
96
96
|
"ocp/schema/*.json",
|
|
97
|
+
"harness/mod/loopmath-harness/README.md",
|
|
98
|
+
"harness/mod/loopmath-harness/.gitignore",
|
|
99
|
+
"harness/mod/loopmath-harness/.claude-plugin/*.json",
|
|
100
|
+
"harness/mod/loopmath-harness/hooks/*.json",
|
|
101
|
+
"harness/mod/loopmath-harness/hooks/*.ts",
|
|
102
|
+
"harness/mod/loopmath-harness/hooks/*.tsx",
|
|
103
|
+
"harness/mod/loopmath-harness/types/*.d.ts",
|
|
104
|
+
"harness/herdr/loopmath-harness/*.toml",
|
|
97
105
|
]
|
|
98
106
|
|
|
99
107
|
[tool.setuptools.data-files]
|
|
@@ -16,7 +16,7 @@ import json
|
|
|
16
16
|
import math
|
|
17
17
|
from collections.abc import Iterable, Mapping
|
|
18
18
|
from dataclasses import dataclass, field
|
|
19
|
-
from datetime import datetime
|
|
19
|
+
from datetime import datetime, timedelta
|
|
20
20
|
from functools import lru_cache
|
|
21
21
|
from typing import Any, Sequence
|
|
22
22
|
|
|
@@ -40,7 +40,11 @@ OPT_IN_DESIGN_VERSION = 5
|
|
|
40
40
|
# The model options this loopmath's `fit` writes, each with the values it writes there (unset or `eb` writes
|
|
41
41
|
# version 4, with no options). A version 5 fit with any other key or value was made by a loopmath with an option
|
|
42
42
|
# this one has no nodes for: it is refused, as 0.3.1 refuses version 5, rather than read without them.
|
|
43
|
-
MODEL_OPTIONS: dict[str, tuple[Any, ...]] = {"belief.success_head": ("sampled",)
|
|
43
|
+
MODEL_OPTIONS: dict[str, tuple[Any, ...]] = {"belief.success_head": ("sampled",),
|
|
44
|
+
# the store level and benchmark transfer (level.py)
|
|
45
|
+
"belief.level": ("shared", "store"),
|
|
46
|
+
"belief.shipped_success": ("keep", "drop"),
|
|
47
|
+
"belief.benchmark_factors": ("reference", "offset")}
|
|
44
48
|
# The version the seed key hashes (spec 04 section 3). It stays 3 from 0.2.8: the same data seeds the same
|
|
45
49
|
# draws as in 0.2.7, so every number that is not a token count is 0.2.7's.
|
|
46
50
|
SEED_VERSION = 3
|
|
@@ -200,6 +204,27 @@ def role_terms(role: str, model: str, weight: float = 1.0) -> tuple[Term, ...]:
|
|
|
200
204
|
return ((f"role:{role}", None, weight), (f"role_family:{role}|{fam}", f"role:{role}", weight))
|
|
201
205
|
|
|
202
206
|
|
|
207
|
+
def _step_key(text: str) -> str:
|
|
208
|
+
return text.replace("%", "%25").replace("#", "%23").replace("|", "%7C")
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def step_node(flow: str, piece: str, family: str) -> str:
|
|
212
|
+
"""The node of a flow's piece on a model family (SPEC 3.10): `step:<flow>#<piece>|<family>`, with `%`, `#` and
|
|
213
|
+
`|` in the flow and piece ids written `%25`, `%23` and `%7C`, so two (flow, piece) pairs never share a node.
|
|
214
|
+
Ids without those characters read as written."""
|
|
215
|
+
return f"step:{_step_key(flow)}#{_step_key(piece)}|{family}"
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
@lru_cache(maxsize=65536)
|
|
219
|
+
def step_terms(flow: str, piece: str, role: str, model: str, weight: float = 1.0) -> tuple[Term, ...]:
|
|
220
|
+
"""The step term of a flow run's piece, a child of the piece's `role_family` node (`role_terms`), at that
|
|
221
|
+
node's weight. Empty outside a flow (`flow` empty), so a run without `run.flow` keeps its rows."""
|
|
222
|
+
if not flow:
|
|
223
|
+
return ()
|
|
224
|
+
fam = model_path(model)[1]
|
|
225
|
+
return ((step_node(flow, piece, fam), f"role_family:{role}|{fam}", weight),)
|
|
226
|
+
|
|
227
|
+
|
|
203
228
|
def _s(setting: Setting) -> tuple[str, str, str]:
|
|
204
229
|
return (setting.harness or "unknown", canonical_model_id(setting.model), (setting.effort or "default").lower())
|
|
205
230
|
|
|
@@ -232,6 +257,7 @@ class Structure:
|
|
|
232
257
|
shape: str = "" # topology and position key (`shape_key`); empty means the workflow id
|
|
233
258
|
copies: dict[str, int] = field(default_factory=dict) # piece -> copies in its group (`copy_groups`)
|
|
234
259
|
factors: tuple[str, ...] = () # the run's harness factors, sorted (`spec/harness.md`); () without a record
|
|
260
|
+
flow: str = "" # the run's flow id (`run.flow.id`), for the step terms (SPEC 3.10); empty outside a flow
|
|
235
261
|
|
|
236
262
|
|
|
237
263
|
def topological_pieces(workflow: Workflow) -> list[str]:
|
|
@@ -315,8 +341,9 @@ def default_gate_rule(role: str) -> str:
|
|
|
315
341
|
return {"reviewer": "review_approve", "tester": "tests_pass", "referee": "referee_pick"}.get(role, "gate")
|
|
316
342
|
|
|
317
343
|
|
|
318
|
-
def structure(config: Configuration, factors: Iterable[str] = ()) -> Structure:
|
|
319
|
-
"""The configuration's structure; `factors` are the harness factors every piece runs with (sorted, unique)
|
|
344
|
+
def structure(config: Configuration, factors: Iterable[str] = (), flow: str | None = None) -> Structure:
|
|
345
|
+
"""The configuration's structure; `factors` are the harness factors every piece runs with (sorted, unique), and
|
|
346
|
+
`flow` the run's flow id (`ParsedRun.flow`; None outside a flow)."""
|
|
320
347
|
wf = config.workflow
|
|
321
348
|
order = topological_pieces(wf)
|
|
322
349
|
roles = {p.id: canonical_role(p.role) for p in wf.pieces}
|
|
@@ -362,7 +389,8 @@ def structure(config: Configuration, factors: Iterable[str] = ()) -> Structure:
|
|
|
362
389
|
for i in gidx:
|
|
363
390
|
gate_loop[i] = len(loops) - 1
|
|
364
391
|
return Structure(wf.id, order, roles, settings, widths, gates, loops, k_max, piece_loop, gate_loop,
|
|
365
|
-
shape_key(wf.id, roles.values()), copy_groups(order, roles, reach), tuple(sorted(set(factors)))
|
|
392
|
+
shape_key(wf.id, roles.values()), copy_groups(order, roles, reach), tuple(sorted(set(factors))),
|
|
393
|
+
flow or "")
|
|
366
394
|
|
|
367
395
|
|
|
368
396
|
# ---------------------------------------------------------------- rows
|
|
@@ -384,12 +412,12 @@ def _effort_scaled(terms: tuple[Term, ...], weight: float) -> tuple[Term, ...]:
|
|
|
384
412
|
def cost_rest(st: Structure, piece: str, k: int, setting: Setting | None = None, *,
|
|
385
413
|
source: str | None = None, effort: float = 1.0,
|
|
386
414
|
prices: Mapping[str, float] | None = None) -> tuple[Term, ...]:
|
|
387
|
-
"""Cost and tokens rows without the task part: setting, role
|
|
388
|
-
and with a `source` the position x source node
|
|
389
|
-
node `fsrc:<family>|<source>` (spec 04 section 1); the
|
|
390
|
-
harness, at 1 (`factor_terms`). `effort` is the value of the
|
|
391
|
-
effort and shape (topology, position) terms (`effort_weight`: below 1 under a
|
|
392
|
-
fsrc terms stay at 1. `prices` is a fit's price offsets (`FitState.price_offsets`, spec 04 section 2): the
|
|
415
|
+
"""Cost and tokens rows without the task part: setting, role (and in a flow run its step term, `step_terms`),
|
|
416
|
+
topology, position, round, control, and with a `source` the position x source node
|
|
417
|
+
`psrc:<shape>#<pos>|<source>` and the family x source node `fsrc:<family>|<source>` (spec 04 section 1); the
|
|
418
|
+
structure's harness factors under the piece's harness, at 1 (`factor_terms`). `effort` is the value of the
|
|
419
|
+
terms a timebox caps, the effort and shape (topology, position) terms (`effort_weight`: below 1 under a
|
|
420
|
+
timebox); the role, step, psrc and fsrc terms stay at 1. `prices` is a fit's price offsets (`FitState.price_offsets`, spec 04 section 2): the
|
|
393
421
|
model's `price:offset` term goes last. The cost head has that node and the tokens head does not, so a
|
|
394
422
|
prediction's shared row prices only its cost."""
|
|
395
423
|
s = setting or st.settings[piece]
|
|
@@ -400,7 +428,8 @@ def cost_rest(st: Structure, piece: str, k: int, setting: Setting | None = None,
|
|
|
400
428
|
shape_terms = ((f"topology:{shape}", None, 1.0), (f"position:{position}", f"topology:{shape}", 1.0))
|
|
401
429
|
if effort != 1.0:
|
|
402
430
|
st_terms, shape_terms = _effort_scaled(st_terms, float(effort)), _effort_scaled(shape_terms, float(effort))
|
|
403
|
-
|
|
431
|
+
role = st.roles[piece]
|
|
432
|
+
terms = st_terms + role_terms(role, m) + step_terms(st.flow, piece, role, m) + shape_terms
|
|
404
433
|
if st.factors:
|
|
405
434
|
terms += factor_terms(h, st.factors)
|
|
406
435
|
if source is not None:
|
|
@@ -412,17 +441,19 @@ def cost_rest(st: Structure, piece: str, k: int, setting: Setting | None = None,
|
|
|
412
441
|
|
|
413
442
|
|
|
414
443
|
def gate_rest(st: Structure, gate: GateInfo, k: int) -> tuple[Term, ...]:
|
|
415
|
-
"""Gate rows without the task part: gate rule, round, and the judged piece's setting and role
|
|
444
|
+
"""Gate rows without the task part: gate rule, round, and the judged piece's setting and role, with its step
|
|
445
|
+
term in a flow run (`step_terms`)."""
|
|
416
446
|
h, m, e = _s(st.settings[gate.judged])
|
|
447
|
+
role = st.roles[gate.judged]
|
|
417
448
|
return (((f"gate:{gate.rule}", None, 1.0),) + tuple(round_terms(k)) + setting_terms(h, m, e, 1.0, False)
|
|
418
|
-
+ role_terms(st.
|
|
449
|
+
+ role_terms(role, m) + step_terms(st.flow, gate.judged, role, m))
|
|
419
450
|
|
|
420
451
|
|
|
421
452
|
def run_rest(st: Structure) -> tuple[Term, ...]:
|
|
422
453
|
"""Success and score rows without the task part: topology, control, and per piece its model chain,
|
|
423
454
|
effort and harness (weight 1/n) with its harness factors at that weight, plus its role and role x family
|
|
424
455
|
(weight 1/g, g the copies in its group, so parallel copies carry the role effect once, as one wide piece
|
|
425
|
-
does)."""
|
|
456
|
+
does), and in a flow run its step term at the role x family weight (`step_terms`)."""
|
|
426
457
|
terms: list[Term] = [(f"topology:{st.shape or st.workflow_id}", None, 1.0)]
|
|
427
458
|
terms += _control_terms(st.k_max, max(st.widths.values() or [1]))
|
|
428
459
|
n = max(1, len(st.pieces))
|
|
@@ -431,7 +462,8 @@ def run_rest(st: Structure) -> tuple[Term, ...]:
|
|
|
431
462
|
terms += setting_terms(h, m, e, 1.0 / n)
|
|
432
463
|
if st.factors:
|
|
433
464
|
terms += factor_terms(h, st.factors, 1.0 / n)
|
|
434
|
-
|
|
465
|
+
g = 1.0 / (st.copies.get(piece) or 1)
|
|
466
|
+
terms += role_terms(st.roles[piece], m, g) + step_terms(st.flow, piece, st.roles[piece], m, g)
|
|
435
467
|
return tuple(terms)
|
|
436
468
|
|
|
437
469
|
|
|
@@ -507,6 +539,7 @@ class ParsedRun:
|
|
|
507
539
|
dropped: dict[str, int] = field(default_factory=dict)
|
|
508
540
|
checks: dict[str, int] = field(default_factory=dict) # check name -> attempts that ran no model
|
|
509
541
|
harness: dict | None = None # the run's harness record (`harness.run_record`), None without one
|
|
542
|
+
flow: str | None = None # the run's flow id (`run.flow.id`), None without `run.flow`
|
|
510
543
|
|
|
511
544
|
@property
|
|
512
545
|
def factors(self) -> tuple[str, ...]:
|
|
@@ -667,18 +700,44 @@ def config_from_doc(cfg: dict) -> Configuration:
|
|
|
667
700
|
|
|
668
701
|
|
|
669
702
|
def rule_from_doc(doc: dict, default: AcceptanceRule = DEFAULT_RULE) -> AcceptanceRule:
|
|
703
|
+
"""The run's stored rule. A score target no finite float holds, or a `window_days` no timedelta holds, is
|
|
704
|
+
refused by name (`Unusable`, a ValueError, which every reader of a malformed rule catches); any other
|
|
705
|
+
malformed score raises ValueError or TypeError as before."""
|
|
670
706
|
r = (doc.get("run") or {}).get("acceptance_rule")
|
|
671
707
|
if not isinstance(r, dict) or not r.get("name"):
|
|
672
708
|
return default
|
|
673
709
|
score = r.get("score")
|
|
674
710
|
st = None
|
|
675
711
|
if isinstance(score, dict) and score.get("name") and score.get("target") is not None:
|
|
676
|
-
st = ScoreTarget(name=str(score["name"]), target=
|
|
712
|
+
st = ScoreTarget(name=str(score["name"]), target=_rule_target(score["target"]),
|
|
677
713
|
better=str(score.get("better") or "higher"), scale=str(score.get("scale") or "linear"))
|
|
678
714
|
return AcceptanceRule(name=str(r["name"]), definition=str(r.get("definition") or r["name"]),
|
|
679
715
|
requires=tuple(r.get("requires") if r.get("requires") is not None else ("tests",)),
|
|
680
716
|
score=st, excludes_events=tuple(r.get("excludes_events") or ("revert", "incident")),
|
|
681
|
-
window_days=
|
|
717
|
+
window_days=_rule_window(r.get("window_days")))
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
def _rule_target(value: Any) -> float:
|
|
721
|
+
"""A stored score target as a float; one past the float range, infinite or NaN is refused by name."""
|
|
722
|
+
try:
|
|
723
|
+
target = float(value)
|
|
724
|
+
except OverflowError:
|
|
725
|
+
target = math.inf
|
|
726
|
+
if not math.isfinite(target):
|
|
727
|
+
raise Unusable("score target not a finite number")
|
|
728
|
+
return target
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
def _rule_window(value: Any) -> int:
|
|
732
|
+
"""A stored `window_days` (0 or none: 14); a day count past 999999999 either way (`timedelta.max.days`), or
|
|
733
|
+
an infinite float, is refused by name."""
|
|
734
|
+
try:
|
|
735
|
+
days = int(value or 14)
|
|
736
|
+
except OverflowError:
|
|
737
|
+
raise Unusable("window_days past 999999999") from None
|
|
738
|
+
if abs(days) > timedelta.max.days:
|
|
739
|
+
raise Unusable("window_days past 999999999")
|
|
740
|
+
return days
|
|
682
741
|
|
|
683
742
|
|
|
684
743
|
_PRICES = None
|
|
@@ -792,19 +851,23 @@ def _check_name(a: dict, node: dict) -> str | None:
|
|
|
792
851
|
|
|
793
852
|
|
|
794
853
|
def run_evidence(doc: dict, rule: AcceptanceRule, *, now: datetime,
|
|
795
|
-
q_by_tier: dict[str, float] | None = None
|
|
796
|
-
|
|
854
|
+
q_by_tier: dict[str, float] | None = None,
|
|
855
|
+
quality: tuple[float | None, float | None] | None = None) -> Evidence:
|
|
856
|
+
"""The run's outcome as the fit reads it: `rules.evidence` under `rule` (None `q_by_tier`: the built-in q;
|
|
857
|
+
`quality`: a flow run's combined quality, as `outcome_evidence` takes it)."""
|
|
797
858
|
from . import rules
|
|
798
859
|
|
|
799
|
-
return rules.evidence(doc, rule, now=now, q_by_tier=q_by_tier)
|
|
860
|
+
return rules.evidence(doc, rule, now=now, q_by_tier=q_by_tier, quality=quality)
|
|
800
861
|
|
|
801
862
|
|
|
802
863
|
def parse_run(doc: dict, *, now: datetime | None = None, rule: AcceptanceRule | None = None,
|
|
803
|
-
origin: str | None = None, q_by_tier: dict[str, float] | None = None
|
|
864
|
+
origin: str | None = None, q_by_tier: dict[str, float] | None = None,
|
|
865
|
+
quality: tuple[float | None, float | None] | None = None) -> ParsedRun:
|
|
804
866
|
"""Everything the fit needs from one finished OCP v0.3 run document. Raises Unusable.
|
|
805
867
|
|
|
806
868
|
`origin` is where the fit found the document (`data_source`); None reads its label. `q_by_tier` is
|
|
807
|
-
`outcome.q.<tier>` from config.toml, passed to `outcome_evidence` (None: the built-in q)
|
|
869
|
+
`outcome.q.<tier>` from config.toml, passed to `outcome_evidence` (None: the built-in q), and so is
|
|
870
|
+
`quality`, a flow run's combined quality.
|
|
808
871
|
"""
|
|
809
872
|
run = doc.get("run") or {}
|
|
810
873
|
cfg = run.get("configuration")
|
|
@@ -869,7 +932,19 @@ def parse_run(doc: dict, *, now: datetime | None = None, rule: AcceptanceRule |
|
|
|
869
932
|
from .rules import resolve_rule
|
|
870
933
|
|
|
871
934
|
use_rule = rule or resolve_rule(doc) # one resolver for every reader (0.2.7); raises on a malformed score
|
|
872
|
-
evidence = run_evidence(doc, use_rule, now=now or datetime.now().astimezone(), q_by_tier=q_by_tier
|
|
935
|
+
evidence = run_evidence(doc, use_rule, now=now or datetime.now().astimezone(), q_by_tier=q_by_tier,
|
|
936
|
+
quality=quality)
|
|
937
|
+
flow = (run.get("flow") or {}).get("id") if isinstance(run.get("flow"), dict) else None
|
|
938
|
+
return ParsedRun(str(run.get("id") or task.id), task, config, source, attempts, gates, evidence,
|
|
939
|
+
run_score_meta(doc, evidence, use_rule), use_rule, dropped, checks, harness,
|
|
940
|
+
flow if isinstance(flow, str) and flow else None)
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
def run_score_meta(doc: dict, evidence: Evidence, rule: AcceptanceRule) -> dict[str, dict]:
|
|
944
|
+
"""Each score's unit, direction and scale, from the run's first signal of that name. A flow run's combined
|
|
945
|
+
quality (`outcome_evidence`) is a fraction in the rule's direction; a score name a judge scored with no
|
|
946
|
+
combined value has no entry."""
|
|
947
|
+
run = doc.get("run") or {}
|
|
873
948
|
score_meta: dict[str, dict] = {}
|
|
874
949
|
for s in run.get("signals") or []:
|
|
875
950
|
if s.get("kind") == "score" and isinstance(s.get("value"), (int, float)) and not isinstance(s.get("value"), bool):
|
|
@@ -881,8 +956,14 @@ def parse_run(doc: dict, *, now: datetime | None = None, rule: AcceptanceRule |
|
|
|
881
956
|
score_meta.setdefault(str(name), dict(meta))
|
|
882
957
|
for name in (evidence.scores or {}):
|
|
883
958
|
score_meta.setdefault(str(name), {"unit": None, "better": "higher", "scale": "linear"})
|
|
884
|
-
|
|
885
|
-
|
|
959
|
+
elif isinstance(run.get("flow"), dict) and rule.score is not None:
|
|
960
|
+
from ..flows import judges
|
|
961
|
+
|
|
962
|
+
if any(judges.judged(doc, rule.score.name)):
|
|
963
|
+
score_meta.pop(rule.score.name, None)
|
|
964
|
+
if rule.score.name in (evidence.scores or {}):
|
|
965
|
+
score_meta[rule.score.name] = {"unit": None, "better": rule.score.better, "scale": "fraction"}
|
|
966
|
+
return score_meta
|
|
886
967
|
|
|
887
968
|
|
|
888
969
|
def _gate_observations(doc: dict, st: Structure, by_piece_round: dict) -> list[tuple[int, int, bool]]:
|
|
@@ -951,7 +1032,7 @@ def _gate_observations(doc: dict, st: Structure, by_piece_round: dict) -> list[t
|
|
|
951
1032
|
def rows_for_run(run_doc: dict) -> dict:
|
|
952
1033
|
"""Fitting rows for one run document: {cost, tokens, gate, success, scores} plus its structure."""
|
|
953
1034
|
pr = parse_run(run_doc)
|
|
954
|
-
st = structure(pr.config, pr.factors)
|
|
1035
|
+
st = structure(pr.config, pr.factors, pr.flow)
|
|
955
1036
|
out: dict[str, Any] = {"run": pr.run_id, "source": pr.source, "structure": st,
|
|
956
1037
|
"cost": [], "tokens": [], "gate": [], "success": None, "scores": {}}
|
|
957
1038
|
for a in pr.attempts:
|