ISA criteria counting drops nested leaf claims, and the `[DEFERRED-VERIFY]` status has no defined serialization
What LifeOS does here
An ISA ("Ideal State Artifact") is the per-session contract at MEMORY/WORK/{slug}/ISA.md.
Its criteria section is a checkbox list and its frontmatter carries progress: M/N.
hooks/lib/isa-utils.ts exports countCriteria(content), which derives an M/N pair from the
body. LIFEOS/TOOLS/ISAGate.ts validates the frontmatter at the close transition.
Two separate things below: a reproduced counting defect, and an open specification question.
1. Nested leaf claims are not counted
countCriteria selects criteria lines with /^- \[[ x]\]/. The pattern is anchored to column
zero, so an indented line never matches.
LIFEOS/DOCUMENTATION/ISA/ISAFormat.md:610 supports nesting explicitly: "Nested ISCs are
allowed when they help organize a complex ISA. Use markdown nested checkboxes", and "The
granularity rule applies at the leaf level — leaves are atomic testable claims; parents are
aggregations that pass when all descendant leaves pass." ISAFormat.md:624 restates it: "Tier
floors count atomic testable claims (leaves when nested)."
So on a nested ISA the counter sees exactly the lines the format says are not the atomic claims, and none of the lines it says are.
Reproduction
Against v7.40.4:
# ISA
## Criteria
- [x] ISC-1: parent aggregation
- [x] ISC-1.1: leaf, done
- [ ] ISC-1.2: leaf, open
- [ ] ISC-2: standalone claim
import { countCriteria } from "<checkout>/hooks/lib/isa-utils.ts";
console.log(JSON.stringify(countCriteria(require("fs").readFileSync("ISA.md","utf-8"))));
Output:
{"checked":1,"total":2}
Three atomic claims exist by the format's own definition — ISC-1.1, ISC-1.2, ISC-2 — and
one of them is closed. The counter reports 1/2, counting the parent aggregation as a claim
and both of its leaves as nothing.
Same assumption in two other tools
The identical character class and anchor appear in LIFEOS/TOOLS/IsaFrontier.ts (lines 43 and
104) and LIFEOS/TOOLS/DoctrineReplay.ts (lines 67 and 68). The frontier view and the doctrine
replay drop the same lines. This is one shared assumption in three places, not three bugs.
A second, smaller case
l.startsWith('- [x]') accepts only lowercase. A capital - [X] renders as checked in GitHub's
task-list extension but is dropped from both M and N rather than counted or rejected. We did
not find a statement in the format that fixes the case, so this may be intended; if it is, an
explicit rule would help, because the current behavior is silent omission rather than an error.
2. [DEFERRED-VERIFY] is a mandated status with no defined file syntax
LIFEOS/RULES/Verification.md instructs the operator to use it in three rules: rule 2 ("mark
the ISC [DEFERRED-VERIFY]"), rule 5 ("the claim holds [DEFERRED-VERIFY] until a T+TTL
re-probe"), and rule 6 ("Metered pipelines hold [DEFERRED-VERIFY] until a delayed delta
check"). Elsewhere the payload calls it an "ISC status" and "a holding state: follow-up task
named, blocks complete".
We could not find how it is written in the file. Searching the v7.40.4 payload for a literal
- [DEFERRED-VERIFY] criteria line returns nothing, ISAFormat.md does not list it among the
checkbox states, and no shipped parser recognizes it in any form we could identify.
That leaves two possibilities, and we cannot tell which is intended:
- The status is written inside the checkbox (
- [DEFERRED-VERIFY] ISC-3: ...), in which casecountCriteriadrops the line from bothMandNand a deferred claim silently vanishes from progress. - The status is written as an annotation on an open claim (
- [ ] ISC-3: ... [DEFERRED-VERIFY]), in which case counting is correct and the only gap is that nothing distinguishes "not started" from "done but awaiting a delayed probe".
This is a question, not a defect claim. Documenting the canonical form in ISAFormat.md would
settle it either way.
3. ISAGate.ts H1 checks the shape of progress, not its value
if (!/^\d+\/\d+$/.test(fm.progress ?? "")) { ... "is not M/N" ... }
Nothing compares the number to the body it summarizes. Of the other ISA tools in the payload,
LIFEOS/TOOLS/ISAReconcile.ts contains no reference to progress or countCriteria, and
LIFEOS/TOOLS/ISARender.ts only parses the frontmatter value to draw a progress rail (lines 485
and 501-508) without recounting. If another path does reconcile the two, we did not find it.
We are not recommending a blocking equality check. At least three documented shapes would
make one reject valid files: parent ISAs whose progress: rolls up children rather than
counting their own body (ISAFormat.md:128), legacy optimize-mode ISAs where progress
represents kept_experiments/total_experiments (ISAFormat.md:656), and every nested ISA until
the leaf question in section 1 is settled. ISAFormat.md:384 already records the project's own
reasoning that count-gameable checks stay advisory because "a count-block manufactures the
count". We mention H1 only because it is the reason a mismatch is currently invisible, not
because we think it should start blocking.
Suggested direction
For section 1, the constraints a fix has to satisfy, rather than a patch — the hierarchy semantics are more than a regex change can express, and a wrong widening inflates totals:
- Count at the leaf. A recognizer that merely tolerates leading whitespace counts parents and
leaves, turning the reproduction above into
2/4instead of1/3. That is not better than the current behavior. - Keep whatever recognizer results in one shared exported place, used by
isa-utils.ts,IsaFrontier.tsandDoctrineReplay.ts, so the three cannot drift apart again. - Worth covering in acceptance tests: a nested parent with two leaves counting as two, and a
capital
[X]behaving however the format decides it should.
For section 2, a line in ISAFormat.md giving the canonical serialization is all that is
needed; the parser change, if any, follows from it.
Affected versions
Present in v7.40.4, the current release at the time of writing. Not verified before that tag.
Part 1 landed: nested leaf claims count (parents of deeper checkboxes are skipped) in isa-utils and DoctrineReplay. Part 2 I'm declining: DEFERRED-VERIFY is a status label, not a checkbox state, so there's nothing to serialize. Next release. Thanks.