harness

Launch the hierarchical harness (Karpathy loop + ClawTeam parallel agents).

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/quantumaikr/quant.cpp/harness
Clone the repo
git clone --depth 1 https://github.com/quantumaikr/quant.cpp

Made for: Claude Code.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 719 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00719
Opus 5 $0.00008 $0.00360
Sonnet 5 $0.00003 $0.00144
Haiku 4.5 $0.00002 $0.00072

Measured today against content hash 11099eda2c91, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

harness scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/harness.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Harness

Launch the full Hierarchical Harness that combines the Karpathy AutoResearch loop with ClawTeam multi-agent parallelism.

How It Works

The harness has an Outer Loop (you, the Leader) and Inner Loops (spawned workers):

You (Leader):
  score → identify bottleneck → delegate modules → merge gate → repeat

Workers (in isolated worktrees):
  each runs: score → modify own module → score → report back

Execution

Step 1: Score and assess phase

Run bash score.sh and determine the current phase:

Score Phase Action
< 0.05 Foundation YOU do it directly (single agent)
0.05 ~ 0.30 Core Algorithms Spawn parallel workers: polar, qjl, uniform
0.30 ~ 0.60 Advanced Spawn parallel workers: turbo, cache, simd-neon, bench
> 0.60 Fine-tuning YOU do it directly (precision matters)

Step 2: For Foundation / Fine-tuning phases (single agent)

Use the /develop command pattern — implement one WBS item at a time.

Step 3: For parallel phases, spawn ClawTeam workers

$ARGUMENTS can override the target score (default: 0.9).

# Create team
clawteam team spawn-team tq-dev -d "quant.cpp development"

# Spawn workers for each independent module
clawteam spawn --team tq-dev --agent-name polar --workspace --repo . \
  --task "Implement PolarQuant in src/core/tq_polar.c. Read refs/PolarQuant/models/modeling_llama_polar.py for algorithm. Write tests/test_polar.cpp. Run bash score.sh --quick after changes. Only modify: src/core/tq_polar.*, tests/test_polar.*"

clawteam spawn --team tq-dev --agent-name qjl --workspace --repo . \
  --task "Implement QJL in src/core/tq_qjl.c. Read refs/QJL/models/llama2_utils_qjl.py for algorithm. Write tests/test_qjl.cpp. Run bash score.sh --quick after changes. Only modify: src/core/tq_qjl.*, tests/test_qjl.*"

Step 4: Wait and merge gate

# Wait for all workers
clawteam task wait tq-dev --timeout 1800

# Merge gate: merge each worker one-by-one
# For each worker branch:
#   1. git merge <branch> --no-edit
#   2. bash score.sh --quick
#   3. If score dropped: git reset --hard HEAD~1
#   4. If score OK: continue

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 79 lines · 15 tokens per session scan A 11099eda2c91

Subscribe to this mod's changes

harness is a command published in the GitHub repository quantumaikr/quant.cpp (399 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 719 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.