Status: done (2026-11-10) Priority: 2 Size: S Design ref: docs/gates.md, section 2; QUESTIONS.md, VB-261 Goal: Kim, 10 November 2026: no hard gates in this phase; targets and their residuals. VB-261 proposed the record and where it lives (docs/gates.md, section 2, option B). Build the shared part every check that becomes a target uses: the record, the file, the reader and the runner’s one-line summary. No check is converted here. Acceptance criteria:
tests/lib/targets.js: target(name, {where, unit, dir, target, measured, noise}) returns and prints the record of docs/gates.md, section 2 (TARGET name measured target residual status), with the residual signed so positive is worse and status in, out or noise; it never throws for a value out.--record (or VB_TARGETS_RECORD=1) the records of a run are appended to docs/bench/targets.jsonl with commit, dirty, date and machine, as tools/bands.js appends to bands.jsonl.node tools/targets.js [--name PATTERN] [--since DATE] (--help via tools/help.js) prints each target’s latest value, residual and last five, and rewrites docs/bench/targets.md.tests/run.js sums the TARGET lines that are out in its last line (verify: N passed; M targets out (...)); a target never sets the exit code.tests/backlog-tool.js does). npm test; golden unchanged.Implementation notes: tests/lib/targets.js (target, parse), tools/targets.js (reader, writes docs/bench/targets.md), tests/targets-tool.js, tests/run.js appends “; N targets out (name +residual, …)” to its last line and never changes the exit code. Noise: a residual up to noise.spread is noise. Unknown dir reports out rather than throwing. No check converted; targets.jsonl not committed (first records come with VB-263).
Validation: npm test 87 passed; golden matches.