Summary
The quote alternative in ATTRIBUTION ("[^"]*") sits inside \b( ... )\b. \b next to a " only matches when a word character touches the quote on the outside, so a normal quotation (space before the opening quote, space or punctuation after the closing one) is never recognized. Quoted text is read as the writer's own claim.
Repro (public main @ 5e2f2e8, LifeOS/install/hooks/VerificationGate.hook.ts)
import { classifyClaim, unitIsClaimable } from "./hooks/VerificationGate.hook";
unitIsClaimable('The banner reads "the site is live"'); // true — quote not recognized
classifyClaim('The banner reads "the site is live".')?.type; // "T1"
unitIsClaimable('x"the site is live"y'); // false — only matches with letters glued on both sides
ISACloseGate's completionUnit uses the same guard, so a quoted "DONE" in a sentence that merely mentions the word counts as a completion claim and can trigger a block.
Suggested fix
Move the quote alternative outside the \b group (curly quotes added as well, since many writers and locales use them):
const ATTRIBUTION =
/\b(you\s+(said|asked|told|mentioned)|per\s+the|according\s+to|the\s+(ticket|PR|docs?|user|issue|spec)\s+(say|says|said|claims?))\b|"[^"]*"|“[^”]*”/i;
Applied locally with tests; the existing hook suite stays green. Measured over ~1,700 archived final responses: the only units that stop counting as claims are ones containing a quotation. Trade-off, same as the original intent: a real claim that also contains a quote in the same unit is skipped.
Summary
The quote alternative in
ATTRIBUTION("[^"]*") sits inside\b( ... )\b.\bnext to a"only matches when a word character touches the quote on the outside, so a normal quotation (space before the opening quote, space or punctuation after the closing one) is never recognized. Quoted text is read as the writer's own claim.Repro (public
main@ 5e2f2e8,LifeOS/install/hooks/VerificationGate.hook.ts)ISACloseGate's
completionUnituses the same guard, so a quoted"DONE"in a sentence that merely mentions the word counts as a completion claim and can trigger a block.Suggested fix
Move the quote alternative outside the
\bgroup (curly quotes added as well, since many writers and locales use them):Applied locally with tests; the existing hook suite stays green. Measured over ~1,700 archived final responses: the only units that stop counting as claims are ones containing a quotation. Trade-off, same as the original intent: a real claim that also contains a quote in the same unit is skipped.