#2186·LifeOS

isa-utils extractCriteriaSection stops at the first claim-bearing H2, so `## Bridge Criteria` and `## Anti-claims` claims are dropped and ISASync logs a false progressMismatch

Author: BowlerjimCreated Sep 21, 2026Updated Sep 29, 2026

Observed on 7.54.0.

What

extractCriteriaSection() finds the first claim-bearing H2 and stops at the next H2:

typescript
// hooks/lib/isa-utils.ts:186
export const CRITERIA_HEADING_RE =
  /^(?:##\s+(?:ISC\s+)?Criteria\b[^\n]*|##\s+Claims\b[^\n]*|##\s+IDEAL\s+STATE\s+CRITERIA\b[^\n]*|###\s+Criteria\b[^\n]*|##\s+Features\b[^\n]*)$/im;

// hooks/lib/isa-utils.ts:196
const headingMatch = CRITERIA_HEADING_RE.exec(content);
...
const endMatch = rest.match(/\n##\s+(?!#)|\n---\s*\n/);

Two sections the format spec defines as claim-bearing are missing from that alternation:

  • ISAFormat.md section table, row 11: ## Bridge Criteria holds - [ ] ISC-N: Bridge: <what must hold across the seam>, conditional-required for any ISA with a parent:/children: relationship.
  • ISAFormat.md: "## Anti-claims, ## Bridge Criteria, ## Not yet specified remain their own H2 sections in both modes."

Since both sit below ## Claims and both are H2, their checkboxes are cut off by the "stop at the next H2" rule.

Repro

A spec-conformant hierarchical ISA (parent: set, progress: 1/4, four claims spread across ## Claims, ## Bridge Criteria and ## Anti-claims), driven through the real hook:

bun hooks/ISASync.hook.ts < payload.json

Observed:

[ISASync] progressMismatch slug=<slug> frontmatter=1/4 body=1/2 … frontmatter and body disagree — one is stale

and in MEMORY/STATE/work.json: {"progress":"1/4","criteria":["C1/completed","C2/pending"]} — the bridge ISC and the anti-claim are absent. A row is also appended to MEMORY/OBSERVABILITY/isa-progress-mismatch.jsonl.

Expected

All four claims parsed, and no mismatch logged, since neither the frontmatter nor the body is stale.

Why it matters

The omission alone would be tolerable. The false alarm is not: progressMismatch is the signal the operator is told means "one of these is stale", and here it fires precisely when everything is correct. A hierarchical ISA — the case the Bridge Criteria section exists for — can never be clean.

Fix sketch

Make CRITERIA_HEADING_RE a global matcher, iterate it with matchAll, and union the checkbox lines across every claim-bearing H2 (Claims | Criteria | ISC Criteria | IDEAL STATE CRITERIA | Features | Bridge Criteria | Anti-claims), keeping the "stop at the next H2" rule per section so ### F<n> feature blocks still nest correctly.

One design question for the maintainer, which is why this is an issue rather than a PR: should ## Anti-claims entries count toward progress, or only ## Bridge Criteria? Either answer fixes the false mismatch; they differ in what the denominator means.