village-builder

VB-262: Targets: the record, the residuals file and its reader

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:

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.