benchbook 0.1.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.
- benchbook-0.1.0/.claude-plugin/marketplace.json +18 -0
- benchbook-0.1.0/.github/workflows/ci.yml +68 -0
- benchbook-0.1.0/.github/workflows/release.yml +73 -0
- benchbook-0.1.0/.gitignore +15 -0
- benchbook-0.1.0/CHANGELOG.md +226 -0
- benchbook-0.1.0/CLAUDE.md +69 -0
- benchbook-0.1.0/DECISIONS.md +809 -0
- benchbook-0.1.0/LICENSE +202 -0
- benchbook-0.1.0/MANUAL_QA.md +157 -0
- benchbook-0.1.0/PKG-INFO +146 -0
- benchbook-0.1.0/README.ko.md +96 -0
- benchbook-0.1.0/README.md +103 -0
- benchbook-0.1.0/bench/CLAUDE.md +13 -0
- benchbook-0.1.0/bench/__init__.py +0 -0
- benchbook-0.1.0/bench/analyze_cost.py +894 -0
- benchbook-0.1.0/bench/autoresearch/PREREGISTRATION.md +94 -0
- benchbook-0.1.0/bench/autoresearch/__init__.py +0 -0
- benchbook-0.1.0/bench/autoresearch/arms.py +148 -0
- benchbook-0.1.0/bench/autoresearch/launch-post-outline.md +31 -0
- benchbook-0.1.0/bench/autoresearch/launch.py +412 -0
- benchbook-0.1.0/bench/autoresearch/post_replicate.py +140 -0
- benchbook-0.1.0/bench/autoresearch/report.py +277 -0
- benchbook-0.1.0/bench/autoresearch/shim_log.py +128 -0
- benchbook-0.1.0/bench/autoresearch/sim_agent_a.py +67 -0
- benchbook-0.1.0/bench/autoresearch/wrap_train.sh +46 -0
- benchbook-0.1.0/bench/boundary/PREREGISTRATION.md +319 -0
- benchbook-0.1.0/bench/boundary/__init__.py +1 -0
- benchbook-0.1.0/bench/boundary/arms.py +73 -0
- benchbook-0.1.0/bench/boundary/probes.py +74 -0
- benchbook-0.1.0/bench/boundary/report.py +126 -0
- benchbook-0.1.0/bench/boundary/run.py +465 -0
- benchbook-0.1.0/bench/boundary/scripted.py +129 -0
- benchbook-0.1.0/bench/boundary/search_transcript.py +29 -0
- benchbook-0.1.0/bench/boundary/tasks.py +84 -0
- benchbook-0.1.0/bench/code/PREREGISTRATION.md +146 -0
- benchbook-0.1.0/bench/code/__init__.py +0 -0
- benchbook-0.1.0/bench/code/instances.json +5924 -0
- benchbook-0.1.0/bench/code/report.py +180 -0
- benchbook-0.1.0/bench/code/run.py +652 -0
- benchbook-0.1.0/bench/code/scripted.py +170 -0
- benchbook-0.1.0/bench/code/select.py +327 -0
- benchbook-0.1.0/bench/code/swe_check.py +324 -0
- benchbook-0.1.0/bench/common.py +122 -0
- benchbook-0.1.0/bench/dry.py +270 -0
- benchbook-0.1.0/bench/dry_trace.py +142 -0
- benchbook-0.1.0/bench/real.py +874 -0
- benchbook-0.1.0/bench/report.py +145 -0
- benchbook-0.1.0/bench/results/2026-11-20-claude-sonnet-5-5/cost-breakdown.md +203 -0
- benchbook-0.1.0/bench/results/2026-11-20-claude-sonnet-5-5/curve.png +0 -0
- benchbook-0.1.0/bench/results/2026-11-20-claude-sonnet-5-5/metrics.json +184 -0
- benchbook-0.1.0/bench/results/2026-11-20-claude-sonnet-5-5/report.md +47 -0
- benchbook-0.1.0/bench/results/2026-11-21-claude-sonnet-5-5-rerun/README.md +74 -0
- benchbook-0.1.0/bench/results/2026-11-21-claude-sonnet-5-5-rerun/cost-breakdown.md +314 -0
- benchbook-0.1.0/bench/results/2026-11-21-claude-sonnet-5-5-rerun/curve.png +0 -0
- benchbook-0.1.0/bench/results/2026-11-21-claude-sonnet-5-5-rerun/metrics.json +1363 -0
- benchbook-0.1.0/bench/results/2026-11-21-claude-sonnet-5-5-rerun/report.md +47 -0
- benchbook-0.1.0/bench/results/2026-11-21-claude-sonnet-5-5-rerun/with-connectors/cost-breakdown.md +324 -0
- benchbook-0.1.0/bench/results/2026-11-21-claude-sonnet-5-5-rerun/with-connectors/metrics.json +1362 -0
- benchbook-0.1.0/bench/results/2026-11-21-claude-sonnet-5-5-rerun/with-connectors/report.md +46 -0
- benchbook-0.1.0/bench/results/2026-11-21-phase1/report.md +102 -0
- benchbook-0.1.0/bench/results/2026-11-23-swe-verified/README.md +65 -0
- benchbook-0.1.0/bench/results/2026-11-23-swe-verified/gold-visible.json +40 -0
- benchbook-0.1.0/bench/results/2026-11-23-swe-verified/metrics.json +906 -0
- benchbook-0.1.0/bench/results/2026-11-23-swe-verified/preflight.json +943 -0
- benchbook-0.1.0/bench/results/2026-11-23-swe-verified/report.md +84 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot/README.md +101 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot/metrics.json +1384 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot/report.md +20 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot/tasks/control-check.txt +49 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot/tasks/oracle_boltons.py +215 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot/tasks/oracle_toolz.py +215 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot/tasks/reference/reference.py +181 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot/tasks/tasks-boltons.json +38 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot/tasks/tasks.json +74 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot-2/README.md +57 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot-2/metrics.json +1384 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot-2/report.md +20 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot-3/README.md +85 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot-3/metrics.json +1384 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot-3/report.md +20 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot-4/README.md +55 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot-4/metrics.json +1420 -0
- benchbook-0.1.0/bench/results/2026-11-25-boundary-pilot-4/report.md +20 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/README.md +112 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-16/cost-breakdown.md +247 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-16/curve.png +0 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-16/metrics.json +946 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-16/report.md +61 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-30/cost-breakdown.md +218 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-30/curve.png +0 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-30/metrics.json +651 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-30/report.md +49 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-8/cost-breakdown.md +249 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-8/curve.png +0 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-8/metrics.json +936 -0
- benchbook-0.1.0/bench/results/2026-11-25-h5-sweep/workers-8/report.md +51 -0
- benchbook-0.1.0/bench/results/2026-12-01-c-eval-path-pilot/README.md +56 -0
- benchbook-0.1.0/bench/results/2026-12-01-c-eval-path-pilot/cost-breakdown-new.md +166 -0
- benchbook-0.1.0/bench/results/2026-12-01-c-eval-path-pilot/cost-breakdown-old.md +176 -0
- benchbook-0.1.0/bench/results/2026-12-01-c-eval-path-pilot/metrics-new.json +181 -0
- benchbook-0.1.0/bench/results/2026-12-01-c-eval-path-pilot/metrics-old.json +181 -0
- benchbook-0.1.0/bench/results/2026-12-01-h5-lead-context/README.md +106 -0
- benchbook-0.1.0/bench/results/2026-12-01-h5-lead-context/workers-16/cost-breakdown.md +267 -0
- benchbook-0.1.0/bench/results/2026-12-01-h5-lead-context/workers-16/curve.png +0 -0
- benchbook-0.1.0/bench/results/2026-12-01-h5-lead-context/workers-16/metrics.json +975 -0
- benchbook-0.1.0/bench/results/2026-12-01-h5-lead-context/workers-16/report.md +60 -0
- benchbook-0.1.0/bench/results/2026-12-01-h5-lead-context/workers-8/cost-breakdown.md +270 -0
- benchbook-0.1.0/bench/results/2026-12-01-h5-lead-context/workers-8/curve.png +0 -0
- benchbook-0.1.0/bench/results/2026-12-01-h5-lead-context/workers-8/metrics.json +975 -0
- benchbook-0.1.0/bench/results/2026-12-01-h5-lead-context/workers-8/report.md +60 -0
- benchbook-0.1.0/bench/results/2026-12-02-h5-c-eval-path/README.md +69 -0
- benchbook-0.1.0/bench/results/2026-12-02-h5-c-eval-path/cost-breakdown.md +272 -0
- benchbook-0.1.0/bench/results/2026-12-02-h5-c-eval-path/curve.png +0 -0
- benchbook-0.1.0/bench/results/2026-12-02-h5-c-eval-path/metrics.json +966 -0
- benchbook-0.1.0/bench/results/2026-12-02-h5-c-eval-path/report.md +45 -0
- benchbook-0.1.0/bench/run.py +112 -0
- benchbook-0.1.0/bench/tools/_exp_evaluator.py +45 -0
- benchbook-0.1.0/bench/tools/benchbook_eval.py +208 -0
- benchbook-0.1.0/bench/tools/evaluate.py +55 -0
- benchbook-0.1.0/docker-compose.yml +24 -0
- benchbook-0.1.0/docs/autoresearch-skills.md +84 -0
- benchbook-0.1.0/docs/autoresearch.md +198 -0
- benchbook-0.1.0/docs/claude-code.md +456 -0
- benchbook-0.1.0/docs/code-brief.md +171 -0
- benchbook-0.1.0/docs/code-ci.md +64 -0
- benchbook-0.1.0/docs/code-findings.md +147 -0
- benchbook-0.1.0/docs/code-pieces.md +92 -0
- benchbook-0.1.0/docs/code-verify.md +431 -0
- benchbook-0.1.0/docs/code.md +432 -0
- benchbook-0.1.0/docs/concepts.md +190 -0
- benchbook-0.1.0/docs/harnesses.md +255 -0
- benchbook-0.1.0/docs/multi-machine.md +173 -0
- benchbook-0.1.0/docs/releasing.md +162 -0
- benchbook-0.1.0/docs/results.md +114 -0
- benchbook-0.1.0/docs/schema.md +143 -0
- benchbook-0.1.0/docs/sdk.md +123 -0
- benchbook-0.1.0/examples/autoresearch-sim/prepare.py +14 -0
- benchbook-0.1.0/examples/autoresearch-sim/run_sim_swarm.py +202 -0
- benchbook-0.1.0/examples/autoresearch-sim/scripted_agent.py +151 -0
- benchbook-0.1.0/examples/autoresearch-sim/train.py +100 -0
- benchbook-0.1.0/examples/circle-packing/README.md +60 -0
- benchbook-0.1.0/examples/circle-packing/evaluator.py +69 -0
- benchbook-0.1.0/examples/circle-packing/packing.py +142 -0
- benchbook-0.1.0/examples/circle-packing/run_config.py +47 -0
- benchbook-0.1.0/examples/circle-packing/scripted_swarm.py +254 -0
- benchbook-0.1.0/examples/circle-packing/seed_program.py +11 -0
- benchbook-0.1.0/examples/sdk-loop/loop.py +45 -0
- benchbook-0.1.0/integrations/agents-md/AGENTS.md +29 -0
- benchbook-0.1.0/integrations/autoresearch/launch_local.sh +23 -0
- benchbook-0.1.0/integrations/autoresearch/template/README.md +39 -0
- benchbook-0.1.0/integrations/autoresearch/template/program.benchbook.md +120 -0
- benchbook-0.1.0/integrations/claude-code/.claude-plugin/plugin.json +13 -0
- benchbook-0.1.0/integrations/claude-code/bin/benchbook-hook +14 -0
- benchbook-0.1.0/integrations/claude-code/hooks/hooks.json +137 -0
- benchbook-0.1.0/integrations/claude-code/manual/.mcp.json +10 -0
- benchbook-0.1.0/integrations/claude-code/manual/agents/benchbook-worker.md +41 -0
- benchbook-0.1.0/integrations/claude-code/manual/settings.hooks.json +137 -0
- benchbook-0.1.0/integrations/claude-code-mcp/.claude-plugin/plugin.json +13 -0
- benchbook-0.1.0/integrations/claude-code-mcp/.mcp.json +10 -0
- benchbook-0.1.0/integrations/claude-code-mcp/agents/benchbook-worker.md +41 -0
- benchbook-0.1.0/integrations/claude-code-mcp/skills/benchbook/SKILL.md +23 -0
- benchbook-0.1.0/integrations/claude-code-mcp/skills/benchbook-lead/SKILL.md +34 -0
- benchbook-0.1.0/integrations/codex/README.md +20 -0
- benchbook-0.1.0/integrations/codex/hooks.json +48 -0
- benchbook-0.1.0/integrations/cursor/README.md +30 -0
- benchbook-0.1.0/integrations/cursor/hooks.json +39 -0
- benchbook-0.1.0/integrations/gemini/README.md +11 -0
- benchbook-0.1.0/integrations/gemini/hooks.json +39 -0
- benchbook-0.1.0/integrations/github-action/README.md +175 -0
- benchbook-0.1.0/integrations/github-action/action.yml +70 -0
- benchbook-0.1.0/integrations/github-action/run.sh +199 -0
- benchbook-0.1.0/integrations/opencode/README.md +11 -0
- benchbook-0.1.0/integrations/opencode/index.ts +68 -0
- benchbook-0.1.0/integrations/pi/README.md +11 -0
- benchbook-0.1.0/integrations/pi/benchbook.ts +47 -0
- benchbook-0.1.0/pyproject.toml +111 -0
- benchbook-0.1.0/scripts/measure_rerun_queue.py +237 -0
- benchbook-0.1.0/scripts/qa_boundary_hooks.sh +210 -0
- benchbook-0.1.0/scripts/qa_first_experiment.sh +31 -0
- benchbook-0.1.0/scripts/smoke_wheel.sh +124 -0
- benchbook-0.1.0/src/benchbook/__init__.py +27 -0
- benchbook-0.1.0/src/benchbook/__main__.py +4 -0
- benchbook-0.1.0/src/benchbook/_version.py +24 -0
- benchbook-0.1.0/src/benchbook/checks/__init__.py +2 -0
- benchbook-0.1.0/src/benchbook/checks/attempts.py +214 -0
- benchbook-0.1.0/src/benchbook/checks/baseline.py +300 -0
- benchbook-0.1.0/src/benchbook/checks/declarations.py +349 -0
- benchbook-0.1.0/src/benchbook/checks/failures.py +226 -0
- benchbook-0.1.0/src/benchbook/checks/gitrepo.py +167 -0
- benchbook-0.1.0/src/benchbook/checks/guard.py +652 -0
- benchbook-0.1.0/src/benchbook/checks/proposals.py +296 -0
- benchbook-0.1.0/src/benchbook/checks/rerun.py +209 -0
- benchbook-0.1.0/src/benchbook/checks/run.py +377 -0
- benchbook-0.1.0/src/benchbook/checks/signature.py +340 -0
- benchbook-0.1.0/src/benchbook/checks/verify.py +821 -0
- benchbook-0.1.0/src/benchbook/checks/verify_requests.py +250 -0
- benchbook-0.1.0/src/benchbook/cli/__init__.py +2 -0
- benchbook-0.1.0/src/benchbook/cli/__main__.py +5 -0
- benchbook-0.1.0/src/benchbook/cli/agent.py +65 -0
- benchbook-0.1.0/src/benchbook/cli/check.py +211 -0
- benchbook-0.1.0/src/benchbook/cli/check_run.py +54 -0
- benchbook-0.1.0/src/benchbook/cli/doctor.py +782 -0
- benchbook-0.1.0/src/benchbook/cli/exp_run.py +304 -0
- benchbook-0.1.0/src/benchbook/cli/finding.py +93 -0
- benchbook-0.1.0/src/benchbook/cli/install.py +353 -0
- benchbook-0.1.0/src/benchbook/cli/main.py +905 -0
- benchbook-0.1.0/src/benchbook/cli/piece.py +174 -0
- benchbook-0.1.0/src/benchbook/cli/plugins.py +110 -0
- benchbook-0.1.0/src/benchbook/cli/pr.py +105 -0
- benchbook-0.1.0/src/benchbook/code/__init__.py +1 -0
- benchbook-0.1.0/src/benchbook/code/findings.py +336 -0
- benchbook-0.1.0/src/benchbook/code/pieces.py +203 -0
- benchbook-0.1.0/src/benchbook/code/pr.py +368 -0
- benchbook-0.1.0/src/benchbook/code/status.py +141 -0
- benchbook-0.1.0/src/benchbook/config.py +425 -0
- benchbook-0.1.0/src/benchbook/core/__init__.py +1 -0
- benchbook-0.1.0/src/benchbook/core/blobs.py +37 -0
- benchbook-0.1.0/src/benchbook/core/brief.py +334 -0
- benchbook-0.1.0/src/benchbook/core/dedup.py +66 -0
- benchbook-0.1.0/src/benchbook/core/globs.py +390 -0
- benchbook-0.1.0/src/benchbook/core/identity.py +132 -0
- benchbook-0.1.0/src/benchbook/core/ids.py +15 -0
- benchbook-0.1.0/src/benchbook/core/ledger.py +1757 -0
- benchbook-0.1.0/src/benchbook/core/lookup.py +135 -0
- benchbook-0.1.0/src/benchbook/core/models.py +112 -0
- benchbook-0.1.0/src/benchbook/core/runner.py +319 -0
- benchbook-0.1.0/src/benchbook/core/tokens.py +9 -0
- benchbook-0.1.0/src/benchbook/db/__init__.py +0 -0
- benchbook-0.1.0/src/benchbook/db/alembic/env.py +38 -0
- benchbook-0.1.0/src/benchbook/db/alembic/script.py.mako +20 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0001_core.sql +221 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0002_views.sql +152 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0003_roles.sql +33 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0004_evidence_and_notices.sql +92 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0005_partitions_blobs_views.sql +221 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0006_review_fixes.sql +134 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0007_verified_evidence.sql +143 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0008_agent_tokens.sql +313 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0009_dedup_notify.sql +37 -0
- benchbook-0.1.0/src/benchbook/db/alembic/sql/0010_environment_oracle.sql +11 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0001_core.py +19 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0002_views.py +19 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0003_roles.py +19 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0004_evidence_and_notices.py +19 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0005_partitions_blobs_views.py +19 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0006_review_fixes.py +19 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0007_verified_evidence.py +19 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0008_agent_tokens.py +19 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0009_dedup_notify.py +19 -0
- benchbook-0.1.0/src/benchbook/db/alembic/versions/0010_environment_oracle.py +19 -0
- benchbook-0.1.0/src/benchbook/db/conn.py +190 -0
- benchbook-0.1.0/src/benchbook/db/migrate.py +471 -0
- benchbook-0.1.0/src/benchbook/entry.py +76 -0
- benchbook-0.1.0/src/benchbook/errors.py +51 -0
- benchbook-0.1.0/src/benchbook/hooks/__init__.py +2 -0
- benchbook-0.1.0/src/benchbook/hooks/__main__.py +14 -0
- benchbook-0.1.0/src/benchbook/hooks/boundary.py +440 -0
- benchbook-0.1.0/src/benchbook/hooks/checks.py +500 -0
- benchbook-0.1.0/src/benchbook/hooks/citations.py +245 -0
- benchbook-0.1.0/src/benchbook/hooks/harnesses.py +355 -0
- benchbook-0.1.0/src/benchbook/hooks/merge_gate.py +311 -0
- benchbook-0.1.0/src/benchbook/hooks/session_notes.py +76 -0
- benchbook-0.1.0/src/benchbook/hooks/spooler.py +614 -0
- benchbook-0.1.0/src/benchbook/hooks/subagent.py +356 -0
- benchbook-0.1.0/src/benchbook/integrations/__init__.py +1 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/__init__.py +5 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/brief.py +180 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/checkout.py +127 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/cli.py +283 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/code.py +258 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/gate.py +137 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/hw.py +101 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/ops.py +1055 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/referee.py +422 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/runner.py +87 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/skills.py +323 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/templates/program.benchbook.md +120 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/templates/program.codex-autoresearch.md +33 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/templates/program.pi-autoresearch.md +35 -0
- benchbook-0.1.0/src/benchbook/integrations/autoresearch/templates/program.uditgoenka.md +36 -0
- benchbook-0.1.0/src/benchbook/mcp_server.py +278 -0
- benchbook-0.1.0/src/benchbook/packs/__init__.py +133 -0
- benchbook-0.1.0/src/benchbook/packs/code/__init__.py +1 -0
- benchbook-0.1.0/src/benchbook/packs/code/brief.py +557 -0
- benchbook-0.1.0/src/benchbook/packs/code/pack.toml +51 -0
- benchbook-0.1.0/src/benchbook/packs/code/schemas/claim.completion.json +59 -0
- benchbook-0.1.0/src/benchbook/packs/code/schemas/claim.note.json +55 -0
- benchbook-0.1.0/src/benchbook/packs/code/schemas/claim.observation.json +5 -0
- benchbook-0.1.0/src/benchbook/packs/code/schemas/experiment.config.json +39 -0
- benchbook-0.1.0/src/benchbook/packs/code/schemas/experiment.metrics.json +145 -0
- benchbook-0.1.0/src/benchbook/packs/core/__init__.py +0 -0
- benchbook-0.1.0/src/benchbook/packs/core/pack.toml +14 -0
- benchbook-0.1.0/src/benchbook/packs/core/schemas/claim.conclusion.json +5 -0
- benchbook-0.1.0/src/benchbook/packs/core/schemas/claim.hypothesis.json +5 -0
- benchbook-0.1.0/src/benchbook/packs/core/schemas/claim.note.json +5 -0
- benchbook-0.1.0/src/benchbook/packs/core/schemas/claim.observation.json +5 -0
- benchbook-0.1.0/src/benchbook/packs/core/schemas/experiment.config.json +6 -0
- benchbook-0.1.0/src/benchbook/packs/core/schemas/experiment.metrics.json +13 -0
- benchbook-0.1.0/src/benchbook/packs/ml-research/pack.toml +26 -0
- benchbook-0.1.0/src/benchbook/packs/ml-research/schemas/claim.calibration.json +34 -0
- benchbook-0.1.0/src/benchbook/packs/ml-research/schemas/claim.conclusion.json +5 -0
- benchbook-0.1.0/src/benchbook/packs/ml-research/schemas/claim.hypothesis.json +5 -0
- benchbook-0.1.0/src/benchbook/packs/ml-research/schemas/claim.note.json +5 -0
- benchbook-0.1.0/src/benchbook/packs/ml-research/schemas/claim.observation.json +5 -0
- benchbook-0.1.0/src/benchbook/packs/ml-research/schemas/claim.result.json +72 -0
- benchbook-0.1.0/src/benchbook/packs/ml-research/schemas/experiment.config.json +37 -0
- benchbook-0.1.0/src/benchbook/packs/ml-research/schemas/experiment.metrics.json +9 -0
- benchbook-0.1.0/src/benchbook/py.typed +0 -0
- benchbook-0.1.0/src/benchbook/web/__init__.py +0 -0
- benchbook-0.1.0/src/benchbook/web/app.py +465 -0
- benchbook-0.1.0/src/benchbook/web/static/benchbook.css +22 -0
- benchbook-0.1.0/src/benchbook/web/static/benchbook.js +44 -0
- benchbook-0.1.0/src/benchbook/web/static/htmx.min.js +1 -0
- benchbook-0.1.0/src/benchbook/web/static/uPlot.iife.min.js +2 -0
- benchbook-0.1.0/src/benchbook/web/static/uPlot.min.css +1 -0
- benchbook-0.1.0/src/benchbook/web/templates/ar_overview.html +36 -0
- benchbook-0.1.0/src/benchbook/web/templates/base.html +20 -0
- benchbook-0.1.0/src/benchbook/web/templates/claims.html +9 -0
- benchbook-0.1.0/src/benchbook/web/templates/experiments.html +14 -0
- benchbook-0.1.0/src/benchbook/web/templates/knobs.html +7 -0
- benchbook-0.1.0/src/benchbook/web/templates/lineage.html +12 -0
- benchbook-0.1.0/src/benchbook/web/templates/overview.html +23 -0
- benchbook-0.1.0/src/benchbook/web/templates/record.html +14 -0
- benchbook-0.1.0/src/benchbook/web/templates/tasks.html +8 -0
- benchbook-0.1.0/tests/__init__.py +0 -0
- benchbook-0.1.0/tests/conftest.py +178 -0
- benchbook-0.1.0/tests/fixtures/autoresearch/skills/README.md +16 -0
- benchbook-0.1.0/tests/fixtures/autoresearch/skills/codex-autoresearch/events.jsonl +8 -0
- benchbook-0.1.0/tests/fixtures/autoresearch/skills/codex-autoresearch/run.json +23 -0
- benchbook-0.1.0/tests/fixtures/autoresearch/skills/pi-autoresearch/log.jsonl +12 -0
- benchbook-0.1.0/tests/fixtures/autoresearch/skills/uditgoenka/results.tsv +11 -0
- benchbook-0.1.0/tests/fixtures/autoresearch/upstream_train_constants.py +25 -0
- benchbook-0.1.0/tests/fixtures/bench/A-1/evals.jsonl +2 -0
- benchbook-0.1.0/tests/fixtures/bench/A-1/lead.stream.jsonl +11 -0
- benchbook-0.1.0/tests/fixtures/bench/A-1/lead.timestamps +11 -0
- benchbook-0.1.0/tests/fixtures/bench/C-1/evals.jsonl +5 -0
- benchbook-0.1.0/tests/fixtures/bench/C-1/lead.stream.jsonl +25 -0
- benchbook-0.1.0/tests/fixtures/bench/C-1/lead.timestamps +25 -0
- benchbook-0.1.0/tests/fixtures/bench/C-1/transcripts/lead.jsonl +8 -0
- benchbook-0.1.0/tests/fixtures/bench/C-1/transcripts/subagents/agent-a1f2e3d4c5b6a7980.jsonl +12 -0
- benchbook-0.1.0/tests/fixtures/bench/C-1/transcripts/subagents/agent-a1f2e3d4c5b6a7980.meta.json +1 -0
- benchbook-0.1.0/tests/fixtures/boundary_pilot/07ee866.diff +26 -0
- benchbook-0.1.0/tests/fixtures/boundary_pilot/6feff72.diff +63 -0
- benchbook-0.1.0/tests/fixtures/boundary_pilot/README.md +8 -0
- benchbook-0.1.0/tests/fixtures/boundary_pilot/e16c45f.diff +99 -0
- benchbook-0.1.0/tests/fixtures/hooks/codex/post_tool_use_bash.json +15 -0
- benchbook-0.1.0/tests/fixtures/hooks/codex/post_tool_use_bash_failure.json +15 -0
- benchbook-0.1.0/tests/fixtures/hooks/codex/post_tool_use_exec_command.json +15 -0
- benchbook-0.1.0/tests/fixtures/hooks/codex/session_start.json +7 -0
- benchbook-0.1.0/tests/fixtures/hooks/codex/subagent_stop.json +14 -0
- benchbook-0.1.0/tests/fixtures/hooks/cursor/post_tool_use_failure_shell.json +37 -0
- benchbook-0.1.0/tests/fixtures/hooks/cursor/post_tool_use_shell.json +35 -0
- benchbook-0.1.0/tests/fixtures/hooks/cursor/post_tool_use_shell_failure.json +35 -0
- benchbook-0.1.0/tests/fixtures/hooks/cursor/session_start.json +11 -0
- benchbook-0.1.0/tests/fixtures/hooks/cursor/subagent_stop.json +40 -0
- benchbook-0.1.0/tests/fixtures/hooks/findings/handback.json +17 -0
- benchbook-0.1.0/tests/fixtures/hooks/findings/subagent_stop_empty_section.json +14 -0
- benchbook-0.1.0/tests/fixtures/hooks/findings/subagent_stop_en.json +14 -0
- benchbook-0.1.0/tests/fixtures/hooks/findings/subagent_stop_ko.json +14 -0
- benchbook-0.1.0/tests/fixtures/hooks/findings/subagent_stop_no_section.json +14 -0
- benchbook-0.1.0/tests/fixtures/hooks/findings/subagent_stop_one_line.json +11 -0
- benchbook-0.1.0/tests/fixtures/hooks/findings/subagent_stop_repeat.json +14 -0
- benchbook-0.1.0/tests/fixtures/hooks/gemini/after_tool_shell.json +16 -0
- benchbook-0.1.0/tests/fixtures/hooks/gemini/after_tool_shell_failure.json +16 -0
- benchbook-0.1.0/tests/fixtures/hooks/gemini/session_start.json +8 -0
- benchbook-0.1.0/tests/fixtures/hooks/missing_ids.json +20 -0
- benchbook-0.1.0/tests/fixtures/hooks/no_ids.json +10 -0
- benchbook-0.1.0/tests/fixtures/hooks/opencode/execute_after_shell.json +18 -0
- benchbook-0.1.0/tests/fixtures/hooks/opencode/execute_after_shell_failure.json +18 -0
- benchbook-0.1.0/tests/fixtures/hooks/opencode/session_start.json +4 -0
- benchbook-0.1.0/tests/fixtures/hooks/pi/session_start.json +4 -0
- benchbook-0.1.0/tests/fixtures/hooks/pi/tool_result_bash.json +14 -0
- benchbook-0.1.0/tests/fixtures/hooks/pi/tool_result_bash_failure.json +14 -0
- benchbook-0.1.0/tests/fixtures/hooks/post_tool_use_agent.json +35 -0
- benchbook-0.1.0/tests/fixtures/hooks/post_tool_use_agent_async.json +30 -0
- benchbook-0.1.0/tests/fixtures/hooks/post_tool_use_bash.json +28 -0
- benchbook-0.1.0/tests/fixtures/hooks/post_tool_use_failure_bash.json +18 -0
- benchbook-0.1.0/tests/fixtures/hooks/pre_compact.json +9 -0
- benchbook-0.1.0/tests/fixtures/hooks/session_start_compact.json +9 -0
- benchbook-0.1.0/tests/fixtures/hooks/session_start_startup.json +7 -0
- benchbook-0.1.0/tests/fixtures/hooks/subagent_stop_background.json +26 -0
- benchbook-0.1.0/tests/fixtures/hooks/subagent_stop_compaction.json +18 -0
- benchbook-0.1.0/tests/fixtures/hooks/task_completed.json +13 -0
- benchbook-0.1.0/tests/fixtures/hooks/user_prompt_submit.json +9 -0
- benchbook-0.1.0/tests/fixtures/hooks/user_prompt_submit_task_notification.json +9 -0
- benchbook-0.1.0/tests/fixtures/hooks/with_ids.json +10 -0
- benchbook-0.1.0/tests/legacy_db.py +90 -0
- benchbook-0.1.0/tests/test_agent_tokens.py +256 -0
- benchbook-0.1.0/tests/test_ar_code.py +216 -0
- benchbook-0.1.0/tests/test_ar_ops.py +598 -0
- benchbook-0.1.0/tests/test_ar_sim.py +23 -0
- benchbook-0.1.0/tests/test_ar_skills.py +344 -0
- benchbook-0.1.0/tests/test_bench_autoresearch.py +278 -0
- benchbook-0.1.0/tests/test_bench_boundary.py +485 -0
- benchbook-0.1.0/tests/test_bench_code.py +331 -0
- benchbook-0.1.0/tests/test_bench_cost.py +437 -0
- benchbook-0.1.0/tests/test_bench_real.py +487 -0
- benchbook-0.1.0/tests/test_boundary_hooks.py +884 -0
- benchbook-0.1.0/tests/test_brief.py +165 -0
- benchbook-0.1.0/tests/test_check_hooks.py +424 -0
- benchbook-0.1.0/tests/test_check_run.py +423 -0
- benchbook-0.1.0/tests/test_checks.py +1500 -0
- benchbook-0.1.0/tests/test_cli.py +155 -0
- benchbook-0.1.0/tests/test_code_brief.py +890 -0
- benchbook-0.1.0/tests/test_code_status.py +118 -0
- benchbook-0.1.0/tests/test_core_ext.py +192 -0
- benchbook-0.1.0/tests/test_db.py +717 -0
- benchbook-0.1.0/tests/test_dedup_mode.py +456 -0
- benchbook-0.1.0/tests/test_docs.py +111 -0
- benchbook-0.1.0/tests/test_doctor.py +471 -0
- benchbook-0.1.0/tests/test_examples.py +132 -0
- benchbook-0.1.0/tests/test_exp_run.py +322 -0
- benchbook-0.1.0/tests/test_findings.py +522 -0
- benchbook-0.1.0/tests/test_fourth_review.py +208 -0
- benchbook-0.1.0/tests/test_globs.py +162 -0
- benchbook-0.1.0/tests/test_harness_hooks.py +412 -0
- benchbook-0.1.0/tests/test_hooks.py +679 -0
- benchbook-0.1.0/tests/test_install.py +718 -0
- benchbook-0.1.0/tests/test_invariants.py +897 -0
- benchbook-0.1.0/tests/test_legacy_names.py +751 -0
- benchbook-0.1.0/tests/test_mcp.py +203 -0
- benchbook-0.1.0/tests/test_merge_gate.py +283 -0
- benchbook-0.1.0/tests/test_mutations.py +600 -0
- benchbook-0.1.0/tests/test_packaging.py +139 -0
- benchbook-0.1.0/tests/test_parallel_baseline.py +145 -0
- benchbook-0.1.0/tests/test_pieces.py +415 -0
- benchbook-0.1.0/tests/test_pr.py +568 -0
- benchbook-0.1.0/tests/test_referee.py +276 -0
- benchbook-0.1.0/tests/test_release.py +104 -0
- benchbook-0.1.0/tests/test_review_fixes.py +351 -0
- benchbook-0.1.0/tests/test_review_holes.py +520 -0
- benchbook-0.1.0/tests/test_runner.py +346 -0
- benchbook-0.1.0/tests/test_scenarios.py +38 -0
- benchbook-0.1.0/tests/test_search_tags.py +61 -0
- benchbook-0.1.0/tests/test_second_review.py +310 -0
- benchbook-0.1.0/tests/test_signature.py +263 -0
- benchbook-0.1.0/tests/test_spool_lanes.py +151 -0
- benchbook-0.1.0/tests/test_spool_receipts.py +173 -0
- benchbook-0.1.0/tests/test_sql.py +60 -0
- benchbook-0.1.0/tests/test_third_review.py +202 -0
- benchbook-0.1.0/tests/test_verified.py +690 -0
- benchbook-0.1.0/tests/test_web.py +102 -0
- benchbook-0.1.0/tests/writer.py +45 -0
- benchbook-0.1.0/uv.lock +2750 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "benchbook",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "benchbook maintainers"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "benchbook",
|
|
9
|
+
"source": "./integrations/claude-code",
|
|
10
|
+
"description": "Hooks only: checks re-run and recorded, subagent reports captured, a brief at compaction and session start. No MCP tools in your context."
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "benchbook-mcp",
|
|
14
|
+
"source": "./integrations/claude-code-mcp",
|
|
15
|
+
"description": "The benchbook MCP server, worker subagent and lead skill, for research loops that call the ledger as tools."
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
# One run per change: pull requests, and pushes to main (a push to a PR branch is covered by its pull_request run).
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
concurrency:
|
|
9
|
+
# a newer push to the same branch or pull request cancels the run it replaces
|
|
10
|
+
group: ci-${{ github.event.pull_request.number || github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0 # the package version is derived from git history and tags
|
|
19
|
+
- uses: astral-sh/setup-uv@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.13"
|
|
22
|
+
- run: uv sync --all-groups
|
|
23
|
+
- run: uv run ruff check src tests bench examples scripts
|
|
24
|
+
- run: uv run mypy src/benchbook
|
|
25
|
+
|
|
26
|
+
test:
|
|
27
|
+
# The oldest and newest supported Python on Linux, and the newest on macOS (Apple silicon). release.yml smoke-tests
|
|
28
|
+
# the built wheel on both OSes again before publishing.
|
|
29
|
+
strategy:
|
|
30
|
+
fail-fast: false
|
|
31
|
+
matrix:
|
|
32
|
+
include:
|
|
33
|
+
- {os: ubuntu-latest, python: "3.11"}
|
|
34
|
+
- {os: ubuntu-latest, python: "3.13"}
|
|
35
|
+
- {os: macos-latest, python: "3.13"}
|
|
36
|
+
runs-on: ${{ matrix.os }}
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
with:
|
|
40
|
+
fetch-depth: 0 # the package version is derived from git history and tags
|
|
41
|
+
- uses: astral-sh/setup-uv@v5
|
|
42
|
+
with:
|
|
43
|
+
python-version: ${{ matrix.python }}
|
|
44
|
+
- run: uv sync --all-groups
|
|
45
|
+
# in parallel, then the 50 ms hook timing tests alone: under the load of the other workers they measure the load
|
|
46
|
+
- run: uv run pytest -q -n auto -k "not within_50ms"
|
|
47
|
+
- run: uv run pytest -q tests/test_hooks.py -k within_50ms
|
|
48
|
+
# first run from an empty directory; its data dir contains a space, like macOS's default
|
|
49
|
+
- run: bash scripts/qa_first_experiment.sh
|
|
50
|
+
|
|
51
|
+
smoke:
|
|
52
|
+
# What a new user gets: the built wheel, run through `uvx` on a runner that has never had benchbook. A file missing
|
|
53
|
+
# from the wheel, or an embedded Postgres wheel that does not install on the OS, fails here and not after a release.
|
|
54
|
+
strategy:
|
|
55
|
+
fail-fast: false
|
|
56
|
+
matrix:
|
|
57
|
+
os: [ubuntu-latest, macos-latest]
|
|
58
|
+
runs-on: ${{ matrix.os }}
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v4
|
|
61
|
+
with:
|
|
62
|
+
fetch-depth: 0 # the package version is derived from git history and tags
|
|
63
|
+
- uses: astral-sh/setup-uv@v5
|
|
64
|
+
with:
|
|
65
|
+
enable-cache: false # every dependency is downloaded, as on a new user's machine
|
|
66
|
+
- run: uv build --no-sources
|
|
67
|
+
# uvx --from dist/*.whl benchbook doctor, benchbook init in an empty directory, doctor again
|
|
68
|
+
- run: bash scripts/smoke_wheel.sh
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
# A pushed v* tag builds the distributions, runs the wheel on Linux and macOS, and publishes to PyPI with Trusted
|
|
3
|
+
# Publishing (OIDC): the repository stores no PyPI token. One-time setup and the checklist are in docs/releasing.md.
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0 # the package version is derived from git history and tags
|
|
16
|
+
persist-credentials: false
|
|
17
|
+
- uses: astral-sh/setup-uv@v5
|
|
18
|
+
with:
|
|
19
|
+
enable-cache: false # a release is built from the tagged tree only
|
|
20
|
+
- run: uv build --no-sources
|
|
21
|
+
# PyPI never accepts the same version twice, so stop unless the build is exactly the tagged version. A tag
|
|
22
|
+
# that hatch-vcs does not read as this commit's version builds 0.1.devN+g<commit>, which is not a release.
|
|
23
|
+
- name: Check that the build is the tagged version
|
|
24
|
+
run: |
|
|
25
|
+
version="${GITHUB_REF_NAME#v}"
|
|
26
|
+
ls -l dist
|
|
27
|
+
test -f "dist/benchbook-$version-py3-none-any.whl"
|
|
28
|
+
test -f "dist/benchbook-$version.tar.gz"
|
|
29
|
+
- uses: actions/upload-artifact@v7
|
|
30
|
+
with:
|
|
31
|
+
name: dist
|
|
32
|
+
path: dist/
|
|
33
|
+
if-no-files-found: error
|
|
34
|
+
|
|
35
|
+
smoke:
|
|
36
|
+
# the same first-run check as ci.yml, on the files that are about to be published
|
|
37
|
+
needs: build
|
|
38
|
+
strategy:
|
|
39
|
+
matrix:
|
|
40
|
+
os: [ubuntu-latest, macos-latest]
|
|
41
|
+
runs-on: ${{ matrix.os }}
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4 # for scripts/smoke_wheel.sh; the wheel comes from the build job
|
|
44
|
+
with:
|
|
45
|
+
persist-credentials: false
|
|
46
|
+
- uses: astral-sh/setup-uv@v5
|
|
47
|
+
with:
|
|
48
|
+
enable-cache: false
|
|
49
|
+
- uses: actions/download-artifact@v8
|
|
50
|
+
with:
|
|
51
|
+
name: dist
|
|
52
|
+
path: dist/
|
|
53
|
+
- run: bash scripts/smoke_wheel.sh
|
|
54
|
+
|
|
55
|
+
publish:
|
|
56
|
+
# Its own job, so that the build and the smoke run (which execute code from the repository and from PyPI) never
|
|
57
|
+
# hold the publishing permission. It checks nothing out: it uploads the files the two jobs above built and ran.
|
|
58
|
+
needs: [build, smoke]
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
environment:
|
|
61
|
+
name: pypi # must equal the environment of the PyPI trusted publisher (docs/releasing.md)
|
|
62
|
+
url: https://pypi.org/project/benchbook/
|
|
63
|
+
permissions:
|
|
64
|
+
id-token: write # the OIDC token PyPI exchanges for a short-lived upload token
|
|
65
|
+
steps:
|
|
66
|
+
- uses: astral-sh/setup-uv@v5
|
|
67
|
+
with:
|
|
68
|
+
enable-cache: false
|
|
69
|
+
- uses: actions/download-artifact@v8
|
|
70
|
+
with:
|
|
71
|
+
name: dist
|
|
72
|
+
path: dist/
|
|
73
|
+
- run: uv publish
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 - 2026-12-05
|
|
4
|
+
|
|
5
|
+
The first release. benchbook was developed as `assay`, whose stored names are still read (see "Upgrading from
|
|
6
|
+
assay").
|
|
7
|
+
Subagents of a swarm write their experiments, check runs and completions to a Postgres ledger instead of the lead's
|
|
8
|
+
context, and the lead reads them back as a budgeted brief and by SQL; a reported "done" is re-run before it counts.
|
|
9
|
+
|
|
10
|
+
### Upgrading from assay
|
|
11
|
+
|
|
12
|
+
- Everything is named `benchbook`: package, command, `BENCHBOOK_*` variables, `.benchbook/`, schema `benchbook`, role
|
|
13
|
+
`benchbook_reader`, MCP tools `benchbook_*`, plugin `benchbook@benchbook`, agent `benchbook-worker`,
|
|
14
|
+
`program.benchbook.md`. Why: DECISIONS.md, "Name".
|
|
15
|
+
- There is no `assay` command: other packages on PyPI install one. Run `benchbook doctor` in each checkout after upgrading:
|
|
16
|
+
it fails as `assay command` for each plugin, hook or MCP server of Claude Code that still calls it and prints the steps,
|
|
17
|
+
for the plugin the install commands in the scope that turns it on, for a server the edit of its entry. An `assay mcp`
|
|
18
|
+
server that can be another product's is only named. Remove the old tool with `uv tool uninstall assay`. `ASSAY_*`
|
|
19
|
+
variables are read when the `BENCHBOOK_*` one is unset.
|
|
20
|
+
- `.assay/config.toml`, the old embedded cluster and `~/.local/state/assay` stay in use while no new one exists;
|
|
21
|
+
`benchbook doctor` shows how to move each. `assay://blob/` artifacts, reports queued by an `assay` build and
|
|
22
|
+
the worker type `assay-worker` keep working.
|
|
23
|
+
- `benchbook migrate` or the first connection renames an `assay` schema and role in place, in one transaction (`migrate
|
|
24
|
+
--json`: `renamed_from`). A database holding both schemas is refused; without the privilege to rename, the message
|
|
25
|
+
prints the SQL for an administrator.
|
|
26
|
+
|
|
27
|
+
### Ledger and SDK
|
|
28
|
+
|
|
29
|
+
- Embedded PostgreSQL 16 whose server outlives its starter, or any server through `BENCHBOOK_DATABASE_URL`. Alembic
|
|
30
|
+
revisions 0001-0010 of plain SQL: append-only and decision-role triggers, NOTIFY (a hashed channel for project ids
|
|
31
|
+
over 53 bytes), read views (`v_partition_best`, `v_lineage`, `v_inflight`, `v_knob_history` among them),
|
|
32
|
+
`benchbook_reader`.
|
|
33
|
+
- Decision oracle `environment` (migration 0010) invalidates an experiment whose environment spoiled the measurement;
|
|
34
|
+
it is refused on a claim.
|
|
35
|
+
- `benchbook.Ledger`: experiments, claims linked to evidence, decisions, tasks with leases, worker intents, partitions
|
|
36
|
+
with per-partition epsilon and a verified-best baseline, audited settings, content-addressed blobs (`benchbook blob
|
|
37
|
+
put/get`). Invalidated experiments stay out of briefs and claims resting on them are flagged.
|
|
38
|
+
- pack.toml `dedup_mode`: `"refuse"` (default) refuses a run whose config, code_ref and seed were recorded; `"notify"`
|
|
39
|
+
stores it with `duplicate_of` and a notice (`exp record` exits 0). In both modes a run whose original was
|
|
40
|
+
invalidated (an evaluator bug, or an environment that spoiled it) is stored as its repeat; refuse mode keeps one valid
|
|
41
|
+
repeat at a time, and `exp run` runs it.
|
|
42
|
+
- `create_tasks(tasks, shared=...)` (MCP `benchbook_create_tasks` too) merges what every task shares into each task's
|
|
43
|
+
spec (one level: a task's own key replaces shared's), so a lead writes the run command and recording instructions
|
|
44
|
+
once instead of once per task; the lead skill uses it.
|
|
45
|
+
- `Ledger.experiments(config, code_ref=None, include_invalidated=False)` returns every run of a config and code_ref
|
|
46
|
+
(metrics, notes, trace_ref, `duplicate_of`, `invalidated`) with no limit; `check_tried` keeps its 20 latest.
|
|
47
|
+
`exp run` uses it to find an earlier run of its seed among more than 20.
|
|
48
|
+
- pack.toml `[verify] rule`: `"replication"` (independent re-runs compared against a baseline) or `"all_pass"` with
|
|
49
|
+
`min_runs` / `min_authors` (code pack). `Ledger.check_rerun` dry-runs it; `Ledger.completion_attempts` lists a
|
|
50
|
+
completion's attempts.
|
|
51
|
+
- Per-agent tokens: `benchbook agent add NAME --role worker` prints one (only its hash is stored); `--rotate`, `agent
|
|
52
|
+
revoke`, `agent list`; clients read `BENCHBOOK_TOKEN`. On the `benchbook_writer` login every write carries its agent's
|
|
53
|
+
token, decisions and settings need an orchestrator or human, a worker's intent needs `settings.worker_intents`, and
|
|
54
|
+
leases are capped by `settings.max_lease_seconds`. Writes need a named agent; reads fall back to `human`.
|
|
55
|
+
- `heartbeat` and `update_intent` refuse a lease that ran out (`LeaseLost`); `exclusive_paths` are checked for overlap
|
|
56
|
+
under the intent lock (`benchbook.core.globs`).
|
|
57
|
+
- `benchbook.core.runner.run_command` (`metric=None`, `tee=True`) waits for the whole process group after a timeout.
|
|
58
|
+
- `benchbook sql` and the MCP SQL tool read through the restricted `benchbook_sql` with bounded output.
|
|
59
|
+
- Search lines end with their tags; `--all-tags` keeps records with every listed tag.
|
|
60
|
+
- Package layout: `core`, `checks`, `code`, `hooks`, `cli` (DECISIONS.md, "Package layout"); `from benchbook import
|
|
61
|
+
Ledger`; `python -m benchbook`.
|
|
62
|
+
|
|
63
|
+
### Command line
|
|
64
|
+
|
|
65
|
+
- When `decide` or `finding accept` refuses an agent for its role, the error names the agent and its role apart and says
|
|
66
|
+
that `--as` is an agent name (a name used for the first time is registered as a worker): use `--as human`.
|
|
67
|
+
- `benchbook init --pack P` on an existing project of another pack exits 1 without writing config.toml: a project's
|
|
68
|
+
pack cannot change, and init names `--project <new name>`. Without `--pack` an existing project is used as it is.
|
|
69
|
+
- The install lines say `uv tool install --python 3.13 ...`: uv may otherwise pick a free-threaded Python, for which
|
|
70
|
+
the embedded server's `pixeltable-pgserver` has no wheel, and the install fails. The README quotes the error, and the
|
|
71
|
+
wheel smoke test runs on 3.13 too.
|
|
72
|
+
- `benchbook` with `--json` and exit codes 0/1/2/3: `init`, `doctor`, `migrate`, `status`, `statusline`, `brief`, `get`,
|
|
73
|
+
`search`, `link`, `decide`, `discard`, `sql`, `export`, `exp`, `task`, `claim`, `agent`, `check`, `piece`, `finding`,
|
|
74
|
+
`pr`, `blob`, `db`, `ar`, `install`, `uninstall`, `hook`, `mcp`, `serve`, `ui`, `--version`.
|
|
75
|
+
- `benchbook exp run --config '<json>' [--seed N] -- <cmd>` checks the ledger, runs the command and records the result;
|
|
76
|
+
a duplicate is not run (exit 2), `--retry-failed` re-runs a config that only failed, and the exit code passes through.
|
|
77
|
+
- `benchbook doctor` prints the build and schema revision and checks the Claude Code connection (CLI on its PATH,
|
|
78
|
+
plugins current, environment equal to the shell's, hook failures, stuck or dead reports, each harness's hook input);
|
|
79
|
+
each failure prints the command that fixes it. An outdated plugin of another checkout is named, not a failure; one the
|
|
80
|
+
settings turn off here is neither.
|
|
81
|
+
- `benchbook get <id>` prints at most 400 tokens (status, `checked:` label, links, last decisions); lookups go to
|
|
82
|
+
`lookups.jsonl`. `benchbook task claim <id>` claims one task.
|
|
83
|
+
- `benchbook install [--harness claude-code|codex|cursor|gemini] [--mcp] [--no-cli] [--dry-run]` (the CLI from PyPI for
|
|
84
|
+
a release, from the git commit and subdirectory a development build was installed from, or left as it is when that is unknown, always with `--python` set to the running interpreter's path, since a version alone can resolve to a free-threaded build; `X.Y+gil` when that path is gone) and `benchbook uninstall [--purge] [--dry-run]`; uninstall removes the plugins that are installed, each in its scope, names other checkouts' with a command that leaves the main checkout's settings alone when the folder is gone, keeps `.benchbook/` when git cannot say whether it is tracked, and `--purge` removes only a
|
|
85
|
+
cluster `benchbook db stop` confirmed stopped.
|
|
86
|
+
- `benchbook mcp` (stdio) and `benchbook serve` (HTTP at `/mcp`, a token for non-loopback binds) with worker and
|
|
87
|
+
orchestrator tool sets and `benchbook://schema`; it starts before the project is initialized, and a worktree finds the
|
|
88
|
+
main checkout's config. `benchbook ui` is a read-only live viewer: best-so-far curve, verified-best staircase, claims
|
|
89
|
+
board, tasks, in-flight work, lineage and knob pages, `train.py` diffs, a partition selector.
|
|
90
|
+
|
|
91
|
+
### Code pack: verified completion
|
|
92
|
+
|
|
93
|
+
- `benchbook init` without `--metric` and `--pack` makes a code project: it proposes the test and lint commands it finds
|
|
94
|
+
as `[checks.<name>]` with `[guard]` paths (for Python, `tests/` folders at any depth; for Node, the test folders and
|
|
95
|
+
test runner configs that exist) and base, pins them, excludes `.benchbook/` from git, writes `[report] agents = ["*"]`
|
|
96
|
+
and `worker_intents = true`, and ends with the next commands. `--yes` does not ask. A Makefile's targets come first, a
|
|
97
|
+
`typecheck` script joins the lint check, ruff runs through `uvx` where uv's default groups have none, and a Node repository gets
|
|
98
|
+
`[verify] prepare` from its tracked lockfile, whose package manager runs the checks too; where a
|
|
99
|
+
Next.js type check needs `next-env.d.ts`, init prints the `prepare` that writes it.
|
|
100
|
+
- `benchbook check verify <piece> <commit>` re-runs the checks declared at the merge-base (or pinned with `check pin` or
|
|
101
|
+
`piece start --check`) on the commit in a clean worktree, without the ledger's credentials, and records the completion
|
|
102
|
+
claim and the attempt linked supports or refutes. Options: `--reported-by`, `--claim`, `--base`, `--checks`,
|
|
103
|
+
`--trace-ref`, `--no-decide`. Under `BENCHBOOK_TOKEN` the token's agent is the verifier. `[verify] copy` and `prepare`
|
|
104
|
+
set up the worktree (a failed preparation is an environment failure; a `copy` file that a subagent's linked worktree
|
|
105
|
+
lacks comes from the main worktree); `parallel_baseline` runs the merge-base's JUnit
|
|
106
|
+
checks beside the commit's.
|
|
107
|
+
- With lead authority verify decides `verified` (every check passed, no test weakened, `[checks]` unchanged) or
|
|
108
|
+
`inconclusive` (attempts disagree); otherwise it records and prints the command that decides. Runs from the
|
|
109
|
+
implementer's checkout, partial runs and runs with uncommitted changes never verify.
|
|
110
|
+
- A `junit = true` check that exits 0 fails unless tests ran and none failed. Tests added are not tests weakened:
|
|
111
|
+
deleted or changed lines (adding an import name excepted), skip markers, conftest.py changes and fewer JUnit tests
|
|
112
|
+
than at the merge-base are (`guard_weakened`). A new binary data file, a new conftest.py in a folder that had no
|
|
113
|
+
files at the merge-base (unless it carries a skip marker, or a `pytest_` name or a `*` import in it could bring a
|
|
114
|
+
hook), and elsewhere a new conftest.py that only imports plain functions from inert repository modules (no autouse
|
|
115
|
+
fixture, hook, `pytest_plugins`, code run on import, or fixture name the repository already uses), are tests added.
|
|
116
|
+
- A check that fails the same way at the merge-base is an environment failure (no refutation, no discarded approach)
|
|
117
|
+
when an implementer passed it, or when all it lacks is type declarations for images and CSS modules (an ignored
|
|
118
|
+
`next-env.d.ts`) in files the piece did not change, imported by a relative path or a `paths` alias of `tsconfig.json`.
|
|
119
|
+
- Failure signatures (first failing test, TypeScript codes, or exit code and last-line hash; never the output). A failed
|
|
120
|
+
attempt leaves a discarded approach, and a later run that fails the same way names it. `check run --approach NAME` or
|
|
121
|
+
`BENCHBOOK_APPROACH` names the approach; a lead records its own with `benchbook discard <piece> --approach NAME --why
|
|
122
|
+
"..."`.
|
|
123
|
+
- A run on a pin that the working tree's config.toml no longer matches says so and names `benchbook --agent lead check
|
|
124
|
+
pin [PIECE]`, with the piece when the pin that ran was a piece's (in `check verify` and in the re-run's line to the lead), records `checks_pin_stale`, and leaves no discarded
|
|
125
|
+
approach; `benchbook doctor` reports the mismatch as `checks pin`, and `check pin` without an agent names the lead.
|
|
126
|
+
- Stacked pieces: `benchbook --agent lead piece base <piece> <ref>` (or `piece start --base <ref>`) records the commit a
|
|
127
|
+
piece branches from, and every run of the piece (`check verify`, the hook's re-run, `check run`, the Bash hook) computes
|
|
128
|
+
its guard against it, ignoring records by the piece's implementers and by agents without lead authority; attempts
|
|
129
|
+
record `guard_base_source` and `guard_base_sha`.
|
|
130
|
+
- `benchbook check run <name>` runs a declared check from the checkout with its own output and exit code and records it
|
|
131
|
+
through the hook spool.
|
|
132
|
+
- Path occupancy: `benchbook piece start <piece> --paths 'glob'...` refuses paths a live piece holds (exit 2); `piece
|
|
133
|
+
done` releases them, `piece list` shows who holds what, and starting again renews the lease or restores an expired
|
|
134
|
+
piece's paths.
|
|
135
|
+
- Out-of-scope findings are recorded from an implementer's report (`[report] out_of_scope_heading` or a `범위 밖:` line),
|
|
136
|
+
from the reports of the subagent types in `[report] agents`, and by `benchbook finding add "..." [--file PATH]`;
|
|
137
|
+
`finding accept <claim> --issue URL --oracle human --as human` accepts one, and
|
|
138
|
+
`decide <claim> refuted --oracle human --rationale "..." --as human` rejects it.
|
|
139
|
+
- [docs/code-brief.md](docs/code-brief.md#record-coverage) has the queries for record coverage (`observed.jsonl`), and
|
|
140
|
+
docs/code.md the one for the false completion rate.
|
|
141
|
+
|
|
142
|
+
### Hooks and plugins
|
|
143
|
+
|
|
144
|
+
- Claude Code plugins `benchbook` 0.2.10 (hooks only) and `benchbook-mcp` 0.2.4 (the MCP server, the `benchbook-worker`
|
|
145
|
+
subagent and the lead skill `/benchbook-mcp:benchbook-lead`). Manual install files and an AGENTS.md snippet cover
|
|
146
|
+
other setups. Workers use the task's integrated evaluation command or `exp run`, and recover saved receipts first.
|
|
147
|
+
- `hook subagent-stop` captures the types in `BENCHBOOK_HOOK_AGENTS` (default `benchbook-worker`) and confirms cited ids
|
|
148
|
+
against write receipts; compaction's SubagentStop is never captured. A `benchbook-worker` report with over 600 characters
|
|
149
|
+
besides its ids, citing the run's own records, is sent back once for a rewrite (`decision: "block"`) and kept whole
|
|
150
|
+
as a `sent-back` note; a report handed back through `SubagentHandback` is not shortened.
|
|
151
|
+
`hook bash-result` records a declared check run (exit code and last-line hash, never the output) and returns within
|
|
152
|
+
50 ms for any other command; a raw Bash JUnit pass is observed only.
|
|
153
|
+
- The completion gate (`hook task-completed`) keeps a task open on a live piece's branch (or with `BENCHBOOK_PIECE`)
|
|
154
|
+
until HEAD passes every declared check.
|
|
155
|
+
- The merge gate (`hook bash-start` on `git merge` and `git cherry-pick`) holds a merge or cherry-pick once when the
|
|
156
|
+
reported commit's re-run did not pass cleanly within 30 s, with the command to run; doing it again goes through. The
|
|
157
|
+
ref is looked up after a `cd` earlier in the command (`cd integration && git cherry-pick part`), also where the
|
|
158
|
+
command started since a `cd` can fail (`cd x || git merge a`), and under `git -C` within a command the hook runs
|
|
159
|
+
for (one that starts with `git -C <dir> merge` matches neither `if` and is not held). A held
|
|
160
|
+
command of several commits carries the clean verdicts it already took for the ones before.
|
|
161
|
+
- A report with `DONE <sha>` or a `commit: <sha>` / `커밋: <sha>` line (one parenthesised tail allowed, as in `커밋:
|
|
162
|
+
1a2b3c4 (feat/x, /path/to/worktree)`) is re-run once as `rerun@<host>` (PostToolUse on Agent/Task or SubagentStop),
|
|
163
|
+
a failed run retried once (runs that disagree are inconclusive); the verdict reaches only the lead, at its next hook
|
|
164
|
+
that can give context.
|
|
165
|
+
- `session-start` gives the branch's brief and writes `.benchbook/STATE.md`, the fallback when the ledger does not
|
|
166
|
+
answer; a new code-project session gets a short guide for a lead. `pre-compact` gives ids and statuses to keep.
|
|
167
|
+
- The hook spool has a lane for re-runs and one for the rest, one directory per token; `benchbook hook replay` replays
|
|
168
|
+
both, adopts a rotated token's entries and reports unconfirmed ones as `held`.
|
|
169
|
+
- Codex, Cursor and Gemini CLI manifests, and OpenCode V2 and Pi extensions, record checks, capture reports, inject the
|
|
170
|
+
brief and deliver notes (docs/harnesses.md).
|
|
171
|
+
|
|
172
|
+
### Brief and status
|
|
173
|
+
|
|
174
|
+
- A deterministic brief within a token budget (`Ledger.brief`, `compile_brief`), footer `benchbook get <id>`; a task's
|
|
175
|
+
brief shows the unjudged findings under its tags, and its spec with `config_space` first.
|
|
176
|
+
- The code brief: verified pieces marked `applies at HEAD`, `changed since (N commits)` or `not merged into this
|
|
177
|
+
branch`; "Re-run, not decided" with why, per piece its newest completion reported or re-run in the last 3 days;
|
|
178
|
+
"Reported done, not re-run" for the last 3 days, with the reason when a re-run ended in an environment error, until
|
|
179
|
+
the checks it left unjudged run again (both count older ones; `search --status a,b` finds them); discarded
|
|
180
|
+
approaches; findings; occupied paths (`test changed since`, `commit not in this checkout`; pack.toml `[brief] rerun`
|
|
181
|
+
and `[brief.labels]`). `brief --here` scopes it to the branch and the pieces merged into it, `--tags` (MCP
|
|
182
|
+
`benchbook_brief(tags=...)`) to tags.
|
|
183
|
+
- `benchbook status` shows piece outcomes, open findings, hook queue health and recording failures (`--json`:
|
|
184
|
+
`pieces.rerun_undecided`); `benchbook statusline` prints a cached one-line summary.
|
|
185
|
+
|
|
186
|
+
### CI
|
|
187
|
+
|
|
188
|
+
- The GitHub Action (`integrations/github-action`) re-runs each piece a `Benchbook-Piece:` trailer names on a pull
|
|
189
|
+
request, with a shared ledger or a ledger of that run only (the head as `pr-<number>`), with the run's URL in
|
|
190
|
+
`trace_ref`, and keeps one summary comment; fork and Dependabot pull requests get a notice and pass. `benchbook pr
|
|
191
|
+
pieces [--claims]`, `pr summary` (both `--whole-as NAME`) and `pr comment` do the same by hand.
|
|
192
|
+
- The PR summary's notes on the states and `check verify --help` say that a weakened test or a changed `[checks]`
|
|
193
|
+
sends a piece to a person; a commit that only adds tests does not.
|
|
194
|
+
|
|
195
|
+
### Experiment swarms and autoresearch
|
|
196
|
+
|
|
197
|
+
- The `ml-research` pack and `benchbook ar` (`init`, `brief`, `claim`, `run`, `replicate`, `sync`, `note`, `idea`,
|
|
198
|
+
`status`, `referee`), `program.benchbook.md` and `launch_local.sh`; the deterministic referee calibrates and asks
|
|
199
|
+
distinct agents for replications against a verified baseline.
|
|
200
|
+
- `benchbook ar import --from pi-autoresearch|uditgoenka|codex-autoresearch <path>` records those skills' logs and makes
|
|
201
|
+
their keeps candidates that others re-run; `benchbook ar gate on [--from <skill>]` turns on the reproduction gate in
|
|
202
|
+
one command.
|
|
203
|
+
- A CPU simulator with scripted agents, and the circle-packing demo with an LLM-free swarm.
|
|
204
|
+
|
|
205
|
+
### Benchmarks and measurements
|
|
206
|
+
|
|
207
|
+
- `bench`: arms A baseline, B files and C benchbook, with `--dry`, cost breakdowns and usage reconciliation; the
|
|
208
|
+
autoresearch launch harness; a circle-packing worker-count sweep.
|
|
209
|
+
- SWE-bench Verified: 7 of 39 completions failed an independent re-run, 17.9% (95% CI 9.0% to 32.7%).
|
|
210
|
+
- Fan-in at 8, 16 and 30 workers (H5) did not meet its pre-registered gate.
|
|
211
|
+
- `bench.boundary`: a six-arm boundary benchmark (H1-H6, a model-free dry run, `--force-compact`, `--compact-pct`) and
|
|
212
|
+
its pilot. `scripts/qa_boundary_hooks.sh` checks on real sessions what the hooks rely on;
|
|
213
|
+
`scripts/measure_rerun_queue.py` times the spool.
|
|
214
|
+
- Every arm passes `ToolSearch` in `--tools`, so C's lead defers the benchbook MCP tool definitions as an interactive
|
|
215
|
+
session does, and `command.json` records `ENABLE_TOOL_SEARCH`.
|
|
216
|
+
- Real circle-packing configuration C checks, evaluates and records in one allowed Bash call through `exp run`.
|
|
217
|
+
An attempt on a key already in progress returns at once. Evaluator receipts support write-only recovery, and the
|
|
218
|
+
cost report counts integrations, MCP fallback and losses.
|
|
219
|
+
- Results are in bench/results/ and docs/results.md.
|
|
220
|
+
|
|
221
|
+
### Project
|
|
222
|
+
|
|
223
|
+
- Python 3.11 to 3.13 on Linux and macOS; CI tests 3.11 and 3.13 on Linux and 3.13 on macOS. `.python-version` makes
|
|
224
|
+
a clone's `uv sync` use 3.13, the version the install commands name. The version comes from git;
|
|
225
|
+
a `v*` tag publishes to PyPI with Trusted Publishing after a wheel smoke test on both systems (docs/releasing.md).
|
|
226
|
+
- README links are absolute GitHub URLs, so they open from the PyPI page too.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Working on benchbook
|
|
2
|
+
|
|
3
|
+
benchbook is a Postgres ledger for agent swarms: subagents write their results to it instead of the lead's context,
|
|
4
|
+
and the lead reads them back as a budgeted brief and by SQL (DECISIONS.md, "Positioning"). Its experiment mode records
|
|
5
|
+
experiments and claims (`src/benchbook/packs/core`, `src/benchbook/packs/ml-research`); its code mode records check
|
|
6
|
+
runs and completions and re-runs a reported "done" before it counts (`src/benchbook/packs/code`). README.md explains
|
|
7
|
+
the product, docs/ how each part works, DECISIONS.md why, CHANGELOG.md what changed.
|
|
8
|
+
|
|
9
|
+
## Checks
|
|
10
|
+
|
|
11
|
+
- Run the tests for the files you touched: `uv run pytest -q tests/test_<area>.py`. Run the full suite once at the
|
|
12
|
+
end of a piece of work, in parallel (about 2 minutes on 12 workers, over 20 serially), then the 50 ms hook timing
|
|
13
|
+
tests alone, since the other workers' load slows them: `uv run pytest -q -n auto -k "not within_50ms"` and
|
|
14
|
+
`uv run pytest -q tests/test_hooks.py -k within_50ms`. Each test process (each xdist worker) has one throwaway
|
|
15
|
+
Postgres and each test gets a fresh project in it, so rows other tests wrote are still in the database.
|
|
16
|
+
- Before a commit: `uv run ruff check src tests bench examples scripts`, `uv run mypy src/benchbook`,
|
|
17
|
+
`uv run pytest -q tests/test_docs.py`.
|
|
18
|
+
- A timing- or order-sensitive test that fails once in a full run: re-run it alone before calling it a regression.
|
|
19
|
+
|
|
20
|
+
## Code that is easy to misread
|
|
21
|
+
|
|
22
|
+
- Layout: `core/` (ledger, models, brief, runner), `checks/` (declared checks, `check verify` by stage), `code/`
|
|
23
|
+
(pieces, findings, PR evidence), `hooks/`, `cli/`; DECISIONS.md, "Package layout". Keep the `__init__.py` of
|
|
24
|
+
`checks/` and `hooks/` empty (the 50 ms budget below), and call a function that tests replace through its
|
|
25
|
+
module (`rerun.run_checks`, `spooler.start_processor`) so the replacement reaches every caller.
|
|
26
|
+
- Hooks run on every tool call of someone else's session. They never write to stderr, exit 0, and outside a
|
|
27
|
+
benchbook project leave without touching the database. For a Bash call that is not a declared check,
|
|
28
|
+
`hook bash-result` returns within 50 ms, imports included (`tests/test_hooks.py`), so keep heavy imports off that
|
|
29
|
+
path. The one exception is the completion gate, `hook task-completed`, which exits 2 with a stderr message to keep
|
|
30
|
+
a task open.
|
|
31
|
+
- The pre-rename names (`ASSAY_*`, `.assay`, `assay-worker`, the `assay_*` MCP tools in transcripts,
|
|
32
|
+
`assay:auto-captured`) are read on purpose so data from before the rename keeps working; they are not leftovers. The
|
|
33
|
+
`assay` command itself is gone.
|
|
34
|
+
Accept old names wherever they were persisted, write only new ones (DECISIONS.md, "Name").
|
|
35
|
+
- A schema change is a new Alembic revision: `src/benchbook/db/alembic/versions/NNNN_<name>.py` running one plain
|
|
36
|
+
`src/benchbook/db/alembic/sql/NNNN_<name>.sql`. Migrations are forward-only; never edit a revision or SQL file that
|
|
37
|
+
is on main.
|
|
38
|
+
- Files that change together: README.md and README.ko.md; the autoresearch template in
|
|
39
|
+
`integrations/autoresearch/template/` and its packaged copy under `src/benchbook/integrations/autoresearch/`
|
|
40
|
+
(`tests/test_docs.py` compares them). A hook that reads a new field of a harness's input quotes that harness's
|
|
41
|
+
documentation for it in docs/harnesses.md.
|
|
42
|
+
|
|
43
|
+
## Changes
|
|
44
|
+
|
|
45
|
+
- One commit per item. Stage explicit paths, never `git add -A` or `git add .`.
|
|
46
|
+
- A behavior change gets one line in CHANGELOG.md under `## Unreleased`, in its area's `###` group. The section
|
|
47
|
+
describes the release as it will ship: when a later change replaces an earlier line, rewrite that line.
|
|
48
|
+
- A changed rule or default updates its entry in DECISIONS.md, which is grouped by topic and states current
|
|
49
|
+
decisions with their reasons: rewrite the entry in place rather than appending a dated section.
|
|
50
|
+
- docs/ and README describe current behaviour in the present tense. History ("before, it...", pilot and review
|
|
51
|
+
stories) goes to the commit message, CHANGELOG.md or bench/results/, not into a reference doc.
|
|
52
|
+
- Keep pull requests small and stack them (base = the previous branch) rather than growing one large PR.
|
|
53
|
+
- Before pushing a non-trivial change, run `/code-review high` on it.
|
|
54
|
+
|
|
55
|
+
## Review findings
|
|
56
|
+
|
|
57
|
+
- Reproduce a finding first, and keep the reviewer's reproduction as a regression test.
|
|
58
|
+
- If a finding of the same kind comes back after a fix (a stale file accepted, a lost queue entry, a race between two
|
|
59
|
+
writers), stop patching the symptom: change the design so the case cannot occur (a unique path per run, a stored
|
|
60
|
+
decision, one lock for every writer), and say in DECISIONS.md why the first fix was not enough.
|
|
61
|
+
|
|
62
|
+
## Paid runs
|
|
63
|
+
|
|
64
|
+
- Calls that cost money (API or GPU time) need the owner's approval in the current session: `claude -p`,
|
|
65
|
+
`scripts/qa_boundary_hooks.sh`, and every `--execute` under `bench/` (`bench.run`, `bench.boundary.run`,
|
|
66
|
+
`bench.code.run`, `bench.autoresearch.launch`, `bench.autoresearch.post_replicate`).
|
|
67
|
+
- Before a new feature is hardened or reviewed at length, check it works for its purpose with the smallest paid pilot
|
|
68
|
+
(one task, one run per arm, a few USD). Earlier pilots of USD 1-3 found more than several review rounds did.
|
|
69
|
+
bench/CLAUDE.md has the rules for measurements.
|