rharness

An opinionated research harness for ML and NLP work done with coding agents. One command, a disciplined workspace.

curl -fsSL https://raw.githubusercontent.com/Vein05/rharness/main/install.sh | sh

Why

Opinions

These are not defaults you configure. They are the product.

  1. A kill criterion before any spend. Every project starts with CHARTER.md: the core question, the result that means the paper exists, and the result that means stop.
  2. Spec before code. The headline table is designed in spec/scoring.md before a single number exists, with its control row and its ceiling row. Code without a spec is a probe and never produces a paper number.
  3. Never rewrite history. Handoffs, changelogs, and experiment reports are dated and append-only. Corrections are added on top with a date.
  4. Every number traces to a scorer version and a run. Rounded values are never copied between documents.
  5. Manual audit before belief. A detector's first output is never reported. Read the hits, spot-check every category, check traces.
  6. Authoritative versus historical. Each project's AGENTS.md says which documents are current and which are dated records.
  7. Absolute dates only. Never "last Thursday" in a persistent file.
  8. One agent entry point. AGENTS.md is the source of truth for Claude Code, Codex, and any collaborator. CLAUDE.md is a one-line include.
  9. Prose passes the three-reader test. A strong student, a PhD student, and a senior scientist must all get the result on one pass.
  10. Drift is measured, not assumed. rharness lint checks every rule above that a script can check, and exits nonzero when one fails.

Plugins

Opt-in packs of guidance, and sometimes a helper or a hook. Installing one inserts a section into the workspace AGENTS.md, so the agent follows its rules from the next session on. Removing one takes the section out and deletes the files you did not edit.

rtk installed by default

A token-saving command proxy for Claude Code. It rewrites common shell commands such as git, grep, and test runners to compact-output equivalents through a hook, so the agent reads less and you pay less. rharness doctor checks that the hook is still registered.

Comes with rharness init. Re-add with rharness add rtk. Needs rtk and jq, installed by its setup script if missing.

figures

An SVG-first figure pipeline: a style guide, a geometry checker that fails the build on overflowing text, off-axis rows, and drifting strokes, an icon fetcher, and a matplotlib style. Every figure goes through render, inspect, critique, fix. The mark at the top of this page was made with it.

rharness add figures. Needs rsvg-convert, pdffonts, and Pillow.

review-panel

Runs your paper through panels of LLM reviewers at multiple model tiers, with a holdout canary and a hard spend ceiling. The diagnostic that matters is whether each reviewer's summary states your actual claim; misreads locate framing failures. No paid run starts without an estimate shown and your approval.

rharness add review-panel. Needs OPENROUTER_API_KEY, pdftotext, and pip install openai pyyaml.

wandb

Weights & Biases tracking rules for every training or evaluation run: descriptive names, logged config, seed, model and dataset identifiers, and the git commit. Each project gets a run initialiser that fills those fields in.

rharness add wandb. Needs WANDB_API_KEY and pip install wandb.

ideas

A ranked ideas backlog, one file per idea, with the date of its last novelty scan and a dead-cells list of ideas confirmed scooped so they are not proposed again. Re-scan before chartering.

rharness add ideas. Needs nothing.

Your own

rharness plugin new my-plugin scaffolds a plugin directory with its manifest, its AGENTS.md section, and a README. Push it to GitHub and anyone installs it with rharness add owner/repo, or owner/repo/subdir when several plugins share a repository. Local paths and git URLs work too.

Plugin guide