#!/usr/bin/env node /** * `npm run check:claims` — a mechanical gate on the SHIPPED OUTPUT. * * Pouya's ruling, 2026-08-29, and the reasoning is the point: * * "Your recurring failure this project is a specific shape: you write a rule * into a header comment, then breach it in the file below, in the same * change set. Q53's sweep, Q54's gate four times, the D13 'cannot' phrasing * fifty lines under your own warning about it. That is not a discipline * problem — prose in a comment does not govern the writing that follows it. * The pattern that actually worked was mechanical: deleting the `class` prop * so passing one is a build error. Nobody has breached that since." * * So this is not documentation. It is a build error. * * SCOPE — `dist/**\/*.html` AND NOTHING ELSE. Not `AGENTS.md`, not `docs/`, not * `src/`. D19 bounds review to what ships, and §4's Forbidden table says in as * many words that it "governs published pages… It is not a word filter over the * repository's own documentation." A register that records a forbidden phrase in * order to forbid it must not be failed by its own quotation of it. * * `', 'Software contracts, SLA and MSA breakdowns, data residency and processing, AI vendor diligence, IP and licensing.', 'The Q.Arb pathway commenced in August 2026; C.Med-Arb is the endpoint.', 'Chartered Med-Arbitrator', 'The ADRIC National Mediation Rules.', 'adopted a new edition effective 1 March 2025', 'Commercial arbitration in Ontario. I do not accept family arbitration.', 'Published as typical, not as a guarantee.', 'Liens, delay and change-order claims, scheduling, subcontract and deficiency disputes.', ], }; /* --- machinery ----------------------------------------------------------- */ /* `relative()` escapes the root with `../../..` when the optional path argument points outside the repo (which only a test run does). Show the plain absolute path in that case — an unreadable path in a failure report is one more thing between a reader and the match. */ function rel(p) { const r = relative(ROOT, p); return r && !r.startsWith('..') ? r : p; } function walk(dir) { const out = []; for (const entry of readdirSync(dir, { withFileTypes: true })) { const full = join(dir, entry.name); if (entry.isDirectory()) out.push(...walk(full)); else if (entry.name.endsWith('.html')) out.push(full); } return out; } function newestMtime(paths) { let newest = 0; let which = null; const visit = (p) => { const s = statSync(p); if (s.isDirectory()) { for (const e of readdirSync(p)) visit(join(p, e)); } else if (s.mtimeMs > newest) { newest = s.mtimeMs; which = p; } }; for (const p of paths) visit(p); return { newest, which }; } /** * Strip what is not published prose or published data. * * `