Repository navigation
Speckit F1: the modified-block-currency family — a MODIFIED block that restates stale canon is now reported (add-modified-block-currency-check § 2) - #420
Conversation
…d its registrations
The first of four Speckit features building the packet ratified 2026-08-27
("Ratify as-is"). Scope is that change's tasks.md § 2 — the module, the three
arms, the marker parser, title resolution and the two-writers rule, the reused
disposition read, and the two registrations landed in the SAME COMMIT as the
owed MODIFIED block on "Deterministic check families" (8 -> 8 scenarios,
written relative to add-family-enumeration-check's outcome).
Zero [NEEDS CLARIFICATION] markers: the ratified delta is normative down to the
unit derivation, the matching rule and the marker grammar, so there was nothing
left for an implementation to choose. Six readings of the delta that an
implementer could plausibly get wrong are recorded as assumptions A1-A6, each
with the delta line that settles it — notably that unit comparison is
case-sensitive and therefore CANNOT reuse promotion_fidelity.norm (:84-90),
while the disposition key deliberately does.
Five user stories at the two seats that read a finding (the packet author, the
doc-health steward), 31 functional requirements, 10 success criteria. F2's
fixture catalogue, F3's self-gate and F4's reporting are named successors and
out of scope.
Co-Authored-By: Claude Opus 5 <[email protected]>
…or the registration and the block it moves Constitution Check is honest and passes on six principles with VI declared N/A by the proposal's own target_release. Two things it caught are recorded rather than smoothed: a host-absolute path in an early quickstart draft (Principle IV) was removed rather than justified, and the "edit promotion_fidelity to share a helper" route was measured unnecessary (research R12) — load_dispositions is already parameterized by family and duplicate_packet already consumes it in this shape, so that module is not edited and its tests stay byte-green. Research R1-R15 resolves the fifteen things the delta left to an implementation, each against code that exists. The sharpest: unit comparison is case-SENSITIVE because "no normalization beyond it applies" (dh:84-90), so promotion_fidelity.norm cannot be reused for units even though it IS reused for the disposition key — two normalizations, named apart, pinned by a test that asserts they differ. Contracts give function-level grammars for the unit derivation (masking is length-preserving so offsets map back to the original text) and the marker parser (the form anchor is load-bearing because both of this packet's deltas print the marker templates in prose that promotes into canon). Eight orchestrator decisions are flagged for veto, three of them new here: O6 the dated-bold-note predicate — the ONE rule F1 supplies that the delta does not write; O7 "resolvable change-id" read as the token grammar rather than as existence, because a marker must keep parsing after its change archives; and O8 three severity constants rather than one, so § 7.2's flip moves the scenario-title arm alone. Co-Authored-By: Claude Opus 5 <[email protected]>
…s, eleven fixed 64 dependency-ordered tasks in nine phases, 26 of them [TEST] tasks each paired with the task that makes it pass and each naming its test functions. Phase 2 is the derivation and the marker grammar and blocks everything, in a forced order: the MARKER test must run before the dated-note test or every marker is swallowed as a note. Phase 8 is § 2.1's atomic commit — the owed MODIFIED block, the two registrations, the scan-set classification and the 8 -> 8 verification, which cannot be split because either half alone reds a gate. RED-first is stated with its one honest limit: a positive behaviour is proven by a pre-code failure, a NEGATIVE cannot be, so every quiet assertion names the mutation that must break it and Phase 9's mutation round is the RED proof for all of them. Analyze: no CRITICAL. Two HIGH, both fixed — SC-001/SC-002 asserted F2's reconstructions as F1 outcomes and contradicted this spec's own scope boundary; FR-002's "no live-main basis" half had no task, and is now asserted rather than intended. Six MEDIUM fixed, including a real one: decision O6 claimed the dated-note predicate was the ONE rule F1 supplies beyond the delta, while the unit-derivation contract also ruled that prose under a scenario heading is a body unit — now recorded as O9, flagged for veto, and given its own test, because without it a block could move an obligation into scenario prose and neither carriage arm would see it. Three LOW fixed; one LOW carried deliberately, with the reason, in plan.md's residue table. Requirement coverage 31/31 after the fixes, 30/31 before, with a full traceability table now written into tasks.md rather than left inferable. openspec validate --all --strict: 77 passed, 0 failed. Co-Authored-By: Claude Opus 5 <[email protected]>
dh:74-76 requires a declaring block to be measured against the declared sibling's OUTCOME rather than against canon, and the packet measured its own +11 ledger prediction on that basis (§ 6.6) without ever writing how the outcome is derived. Left inside an implementation it is an invisible choice that moves a predicted figure, so it is named and flagged for veto like the other nine: canon's units, REPLACED by the sibling's MODIFIED block, plus the sibling's ADDED or RENAMED units — one archive act simulated and nothing more, with no other active change applied. Pinned at T042. Co-Authored-By: Claude Opus 5 <[email protected]>
…acket's § 2.1 is unimplementable as written
B1 is the one that matters and it is measured, not argued. fam_family_enumeration
checks EVERY active delta's restatement of "Deterministic check families"
against the LIVE registry, independently (family_enumeration.py:412-437). So
registering a twenty-second family while add-family-enumeration-check is still
active makes THAT packet's restatement stale and emits three findings on ITS
delta path — and a block inside our delta cannot clear them, because each active
delta is checked on its own and this change has no standing to edit another
ratified packet's text. Reproduced on this branch by monkeypatching _registry:
21 registered: 0 findings
22 registered: 3 findings, all on
openspec/changes/add-family-enumeration-check/specs/doc-health/spec.md
The packet's D5 proved half the problem (a proposal-only tree reds the gate) and
never measured the other half. RULED option (a): that change archives first;
phase 8 is gated on it; § 2.1's block is then written relative to CANON, which
by then IS its outcome — so the second authority disappears and the two-writers
instance § 2.1 was going to create never exists. If the archive is delayed, F1
stops at the end of phase 7 with the module complete, tested and unregistered.
The other five blockers changed what gets built:
- B2 the registration collateral was missing test_family_enumeration.py (11
assertion sites) and 7 family-enumeration-* fixtures, both declared as that
change's own surface (proposal.md:2) — new task T055a, allowlist widened.
- B3 a declaration is BASIS SUBSTITUTION ONLY; the resolution arm reports an
unresolved title and an undeclared/mutual ordering, nothing else. The old
wording emitted a warning for the units the ledger already reports at info.
- B4 O10's "plus the sibling's ADDED units" clause DELETED: dh:278-280 calls
such a title pending rather than absent, and the clause would have invented
~6 info findings across seven pairs.
- B5 origin/main fetched (the worktree ref was stale) and merged; the prediction
now lives in ONE place, plan.md § Predicted movement, re-measured at this
branch point: 22 MODIFIED blocks, not 23; openspec --all --strict reads 76,
not the 77 my first two commits recorded.
- B6 FR-018 had a producer and no emitter — a fourth finding class, "marker
defects", at _LEDGER_SEVERITY, with rule text, emitter and a [TEST].
Thirteen nits applied, N7 the sharpest: fenced code blocks are masked like code
spans, because the delta's OWN written-out marker examples (dh:187-190) sit in a
fenced block that promotes into canon and would otherwise parse as two real
markers on the requirement that defines them.
66 tasks now (T051a, T055a inserted with lettered suffixes, the packet's own
§ 3.3a convention, so earlier IDs stayed stable), 27 of them RED-first [TEST]
tasks. Phases 1-7 proceed now.
Co-Authored-By: Claude Opus 5 <[email protected]>
…ence T001 baseline recorded: `pytest tests/doc-health -q` = 980 passed; test_promotion_fidelity.py = 59 passed. Both are the numbers every later count in this feature is a delta against. T002 RED, verbatim: ImportError: cannot import name 'modified_block_currency' from 'doc_health' T003 green: the module docstring (what the family answers, why the class is not hypothetical, the three arms and the fourth finding class, why containment and similarity are both forbidden, why the launch is advisory in BOTH halves), plus FAMILY and the three severity constants. Three severities, not one, and the test asserts they are three NAMES: § 7.2's flip moves the scenario-title arm alone, so `_LAUNCH_SEVERITY` carries that arm and keeps the identifier its three sibling families use — the grep that ties every reader of a launch decision together — while `_RESOLUTION_SEVERITY` and `_LEDGER_SEVERITY` exist so the flip cannot drag them. Registration deliberately NOT touched: gated on add-family-enumeration-check archiving (plan.md § Sequencing gate). The tests call the module function directly for exactly that reason. tests/doc-health: 982 passed (980 + 2). Co-Authored-By: Claude Opus 5 <[email protected]>
…ers, and arm 1 Committed together because the N3 basis pin is a FAMILY-level test — it calls the family with a ctx carrying promotion_fidelity_basis and asserts the findings are identical — so it could not go green until the entry point existed. Every other pair is RED-then-green within phase 2. REDs seen, in order (verbatim tails): 12 failed, 2 passed <- normalize / mask_code_spans / split_sentences 17 failed, 14 passed <- extract_code_spans / fenced_regions / parse_marker 10 failed, 31 passed <- is_dated_bold_note / derive_units 6 failed, 45 passed <- the readers + the basis pin 7 failed, 50 passed <- arm 1 and the entry point THREE TESTS FOUND REAL DEFECTS, TWO OF THEM IN THE TESTS THEMSELVES, and both corrections are worth more than the tests would have been: 1. `test_one_space_each_side_is_stripped_per_commonmark` asserted that `` ` `x` ` `` is one span around `` `x` ``. It is not: with single fences the first backtick string closes at the next one of equal length, giving two spans each holding a space. The parser was right and the test was wrong; reading it the other way is how a marker comes to name a fragment. The corrected test now pins the DOUBLE-fence case (CommonMark example 328) as well. 2. `test_the_real_notes_this_corpus_carries_are_each_one_unit` scanned canon line-by-line and found only ONE of the notes, because two of them WRAP and a half-line carries no closing `**`. The predicate needs the joined paragraph, which `derive_units` supplies — so the probe was measuring a path that does not ship. Rewritten to run the real derivation over the requirement's own lines. It now measures 2 notes in canon's "Deterministic check families" and asserts each is ONE undivided unit with more than one sentence, so undividedness is actually being tested. 3. The re-wrap helper inserted blank lines and so produced TWO paragraphs rather than one wrapped paragraph — a different edit entirely. Fixed to break at a word boundary with no blank line. O9 (prose under a scenario heading is a body unit) and N7 (fenced blocks are neither units nor markers) are both implemented and pinned. N7 earns its keep immediately: the delta's own written-out marker examples at dh:187-190 ARE of complete marker form, and `parse_marker` parses them — as it should, being form-blind — so what protects canon is `fenced_regions` never offering them. `carried` landed early, in batch A, because the case-significance test needed it; its containment and same-kind pins were therefore green on arrival and their RED proof is the mutation round (T061), which is exactly what the tasks.md preamble says about negative assertions. Not yet built, each waiting for its own red: Skip vs quiet (phase 7), the family's own sort (phase 7), dispositions (phase 7), arms 2 and 3, the marker suppression, the fourth finding class. tests/doc-health: 1037 passed (baseline 980, +57). promotion_fidelity + duplicate_packet: 90 passed, both untouched. Co-Authored-By: Claude Opus 5 <[email protected]>
…s hedge inside the finding RED seen: 4 failed, 58 passed (the ledger arm absent). Arm 2 reports every uncarried body unit and scenario bullet as AT MOST ONE finding per requirement (dh:56-57 — one finding per unit would bury the one precise signal under fourteen editorial ones), at `info`, with the required hedge in the RULE TEXT and not merely in the docs: "a divergence this arm CANNOT distinguish from a deliberate rewording, and does not claim to". The place that promise can be kept is the text a reader sees. Bullets pool across the whole block for free, because `Unit.scenario` is not part of equality. The fixture now proves the chosen consequence end to end: the block carries canon's `**THEN** it MUST name the owning repository` under a DIFFERENT heading and the arm says nothing about it — carriage, not meaning. Two fixture additions earn their keep: - canon and the block both carry `` The jump SHALL read `.openspec.yaml` for its repository name. `` verbatim, so the family's wiring must pass the masking path; the test says plainly that this PAIRS with the unit-level masking tests rather than replacing them, because unmasked fragments would match on both sides too. - a new end-to-end invariant: no reported unit may have unbalanced backticks. A fragment is the signature of a split that fell inside a code span, and this catches it wherever in the pipeline it happened. Elision is deterministic and dumb: document order, a fixed 140-character cut, the count always stated in full. Nothing hashed, nothing sorted by length, nothing dropped. tests/doc-health: 1042 passed (baseline 980, +62). Co-Authored-By: Claude Opus 5 <[email protected]>
…, and the fourth finding class
RED seen: 6 failed, 64 passed.
Eight requirements in one fixture tree, one per marker case, each written by its
own MODIFIED block so no two writers share a requirement and the ordering arm
stays out of the way:
- names two of three absent body units -> the THIRD is still reported ("exactly"
is the whole assertion)
- names a unit the block still restates -> the MARKER is reported, at info,
naming the change id, the date and the unit; nothing suppressed; and the
finding deliberately does NOT carry the ledger's hedge, because a marker
naming a carried unit is wrong with certainty
- a genuine removal (no new scenario title) carries its three bullets with it
- a survivor of a removed scenario is carried and reported nowhere
- THE COMBINATION: a `Removed from canon` marker naming the old title AND a
replacement scenario carrying one of three bullets -> the other two ARE
reported, because that shape is a retitle whatever the marker calls it. This
test fails under any scenario-paired bullet comparison and is the reason the
delta compares bullets across the whole block.
- a `Merged into` destination is present by construction and is never a named
unit, so a valid merge does not report itself
- canon carries a promoted marker from an older change; the block does not
restate it and must not have to
- canon carries a dated bold note naming a clause in backticks as RESTORED — the
shape every dated note in this corpus actually has — and it declares NOTHING,
so the dropped clause is still reported. That is the guard on the finding that
made the marker a NEW reserved form.
A marker name matching no canon unit suppresses nothing and is not reported:
fail-closed, and deliberately not a second obligation this feature has no
standing to invent. Recorded in the module as a plausible later ruling.
tests/doc-health: 1050 passed (baseline 980, +70).
Co-Authored-By: Claude Opus 5 <[email protected]>
…o rulings built in
REDs seen: 9 failed, 74 passed (arm 3 absent), then 31 failed, 52 passed while
the entry point was rewritten around it.
Eight arrangements of the two-writers rule, each in its own capability so they
cannot interfere: ordered-and-carrying, ordered-and-dropping, neither
declaring, both declaring, a longer id, an unratified sibling, THREE ratified
writers, and MODIFIED-over-a-sibling's-ADDED.
The two rulings are pinned, not just documented:
- B3, BASIS SUBSTITUTION ONLY: the declaring block that drops the earlier
change's addition is reported by the LEDGER, measured against the sibling's
delta (which the finding names), and the resolution arm emits NOTHING for it.
- B4, NO BASIS FROM AN ADDED BLOCK: a title only a sibling ADDS is compared
against nothing. The clause this deletes would have measured all seven of the
real corpus's MODIFIED-over-ADDED pairs against text no promoted requirement
carries.
A group of THREE OR MORE ratified writers is reported as an unstated ordering
whatever it declares. The delta says "two or more" and then describes a pair;
one declaration orders a pair and leaves the third unstated. Inventing a chain
rule for a population of zero would be inventing authority, so the gap is
reported and named.
FOUR DEFECTS FOUND, THREE OF THEM IN MY OWN FIXTURES AND TESTS — each worth
more than the test would have been:
1. THE LONGER-ID FIXTURE WAS TESTING THE OPPOSITE CASE. Its proposal explained
the case in prose that wrote the sibling's BARE id, so the whole-token match
found a real declaration and the pair read as ordered. The file now carries a
note telling the next editor not to write that id even while explaining the
fixture.
2. `textwrap.dedent` NO-OPED on five fixture proposals whose interpolated body
had unindented lines, leaving `Status:` indented — so five changes read
standing None and the ratified filter saw nothing. Normalized.
3. The date pin forbade the SUBSTRING "created" and failed on this module's own
docstrings, which DESCRIBE the withdrawn reading. Rewritten to match CALL
SHAPES (`_archive_date(`, `first_commit_timestamp(`, `.created`,
`get("created")`, `strftime(`, `datetime.`) plus "no date module imported" —
the same lesson `test_the_reader_list_is_structural_not_incidental` records
about matching a call rather than a bare name. A test that forbids describing
the rule is a bad test.
4. The `_ledger` test helper matched "does not carry" alone and swept up a
RESOLUTION finding that shared the phrase. Helper tightened, and the
unresolved rule text reworded to "states no requirement under that title".
tests/doc-health: 1063 passed (baseline 980, +83).
Co-Authored-By: Claude Opus 5 <[email protected]>
…own sort — and the baseline re-measured RED seen: 4 failed, 88 passed. Skip and quiet are DIFFERENT returns, because canon's rule is "cannot run" and not "found nothing": a repo with no `openspec/changes/` returns Skip with its reason, and a repo WITH active changes and no MODIFIED block among them returns []. Two new fixture trees, one for each state, because a family that reported itself skipped where it had actually run would teach a reader that it never runs. Dispositions are `promotion_fidelity.load_dispositions(ctx, FAMILY)` and `.disposed(...)`, imported. NO SECOND READER WAS WRITTEN and promotion_fidelity.py has no diff — the contingency the brief allowed for never triggered, because that reader is already parameterized by family and duplicate_packet already consumes it in this exact shape. Four disposition cases pinned plus the inherited single-repo caveat, so the self-gate's silence about dispositions is understood rather than discovered. The other-family case is the collision D1's argument turns on: one citation must not buy silence for a promotion gap and a currency gap on the same path. The family sorts its own findings. `runner.run_suite` sorts the whole report, so an unsorted family is invisible there and visible immediately in a `--family` run — which is the run a session uses while fixing a block, and the run a regression diff is taken from. RULING B5 DISCHARGED — the baseline is now MEASURED, not forecast, by running the real module against this repository's own tree: 1 warning, 9 info / 12 units, 0 resolution, 0 marker defects, 0 error/critical which matches the reviewer's independent figure exactly, and is NOT the packet's +1/+10 at 9be81a4 (that tree had 23 MODIFIED blocks; this one has 22). The one warning is the named subject the packet predicted: add-composed-view-authoring / 'Gate verbs hide on a composed view'. plan.md § Predicted movement now carries the measured baseline and marks the with-block column as projected until phase 8 writes it; nothing else in the artefacts restates the figure. Scope guard clean: promotion_fidelity.py, duplicate_packet.py, report.py, .github/ and BOTH registration points show no diff. pf + dp + family_enumeration + lifecycle_scan_set: 131 passed. tests/doc-health: 1072 passed (baseline 980, +92). Co-Authored-By: Claude Opus 5 <[email protected]>
Phases 1-7 are done. Phase 8 stays open and unstarted by ruling B1 — add-family-enumeration-check must archive first, or registering the 22nd family reds that packet's own delta path with three findings nothing in this change can clear. A five-mutant spot check of the pins that matter, ahead of T061's full round: containment instead of equality (1 test dies), kind ignored (1), the dated-note test moved BEFORE the marker test (8), fenced blocks not dropped (1), and the retitle gate removed from removal suppression (1). No survivors; the file was restored and the suite re-verified green after each. Gates at this point: tests/doc-health 1072 passed (baseline 980, +92); openspec validate --all --strict 76 passed, 0 failed; registry still 21 families, FAMILY_IDS still 21 — the gate is respected in the tree and not only in prose. Co-Authored-By: Claude Opus 5 <[email protected]>
…he sequencing gate is open
… in one commit — 8 -> 8
PER-REQUIREMENT SCENARIO COUNT: 8 -> 8. All eight titles byte-identical to
canon's, in canon's order; all canon bullets restated; the THREE dated bold
notes carried VERBATIM (including canon's "The three notes above" wording, left
exactly as promoted rather than tidied). The block was BUILT from canon's own
bytes and then diffed against them, so the change set is provable rather than
asserted — six hunks and no others:
twenty-one -> twenty-two (the total)
...duplicate packet, and family enumeration. -> ..., and modified-block currency.
Four of the twenty-one -> twenty-two
the other seventeen -> eighteen families
+ one basis sentence (reads active deltas and the promoted specs they have
not yet replaced; takes neither the governed corpus nor the lifecycle scan
set; moves no census, word count, canon-share figure, inventory entry or
catalog record)
+ one AND bullet in `A run executes the check families`
Written relative to CANON, which is what the gate ruling bought: with
add-family-enumeration-check archived (f027d3b) there is no second authority to
reconcile, and the two-writers instance § 2.1 was going to create never exists.
Registered in FAMILIES and FAMILY_IDS; ABSENT from FAMILY_RESOLUTION, with the
reason recorded at both sites. fam_family_enumeration reads 0.
COLLATERAL, all of it another change's declared surface
(add-family-enumeration-check/proposal.md:2) and therefore in scope by citation:
- test_lifecycle_scan_set.py: modified-block-currency added to NON_READERS with
its reason, the literal 17 -> 18, a named assertion beside the four.
- test_family_enumeration.py: four assertion sites moved to 22.
- the 7 fixtures/family-enumeration-* specs moved to 22, each keeping its
single purpose — stale-numeral's numerals stay deliberately stale, missing-name
still omits exactly one, unknown-name's real list is now complete so only the
phantom is unresolved, and pending's canon stays exactly one behind.
- N1: test_canon_is_the_statement_under_test RE-AIMED. It read canon DIRECTLY
and pinned its numeral against the live registry, bypassing the
pending-behind-an-active-delta exemption the family implements — so it failed
21 != 22 while fam_family_enumeration correctly read 0. It now pins the
DISJUNCTION the family implements, and is mutation-proved in both directions.
THE MUTATION ROUND FOUND THREE MISSING TESTS that twenty-one green tests had
not, and all three are now in the file:
- inserting this family into FAMILY_RESOLUTION survived everything. The absence
was documented in three places and asserted in none.
- loosening the marker anchor's change-id group to (.+?) survived, because the
only quoted-template case also carried a placeholder DATE — the date group was
doing all the work.
- making promoted() consult a basis survived, because the existing pin compared
two run OUTCOMES that would both have consulted it. Now pinned on the reader's
SIGNATURE.
21 mutants, 21 killed.
MEASURED MOVEMENT, from two real single-repo runs (with, and with
--skip-family): +1 warning, +9 info, 0 error, 0 critical, and every other
family's report section byte-identical. § 2.1's block draws exactly ONE ledger
finding against this change's own delta, naming the two body sentences it
changes — the packet's § 6.6 prediction realized to the unit, expected and
advisory, and never to be dispositioned.
tests/doc-health: 1077 passed (baseline 980, +97).
openspec validate --all --strict: 75 passed, 0 failed.
promotion_fidelity.py, duplicate_packet.py, report.py, .github/: no diff.
Co-Authored-By: Claude Opus 5 <[email protected]>
…ut, three readings recorded THE ORDERING RULING is the one with teeth. Findings now sort (SEVERITY_RANK, repo, path, rule), so the gate-bearing `warning` renders ABOVE the editorial `info` rows instead of somewhere in the middle of them. The ledger's population is standing by construction, so on any real tree the one precise signal is outnumbered — burying it is the exact failure the delta split the arms to avoid. Verified in a real report: the warning is now row one of the family's section. `test_the_family_returns_its_findings_sorted_severity_first` pins both the key and the property it buys. Code: - DELTA_GLOB was dead while the pattern sat hardcoded in two readers. Both now glob through the constant, with `_CHANGE_PART` naming the index so the path-part arithmetic reads. - `Unit.key` deleted (0 uses). - Seven mid-file `# noqa: E402` imports hoisted to the top, like every other module in the package. No cycle: neither sibling imports this module and families.py already imports all three; the suite confirms it. - `Marker.paragraph` kept, and the docstring now says WHY — diagnostics only, read by a test's failure message and nothing in the shipping path. Three readings the delta does not spell out, now recorded where a later reader will find them rather than re-derive them: - CARRIAGE IS SET-BASED, NOT MULTISET (O11, flagged for veto). Re-measured independently: 13 of 513 promoted requirements state one normalized unit twice, every instance a repeated scenario-bullet. Set semantics cannot lose a DISTINCT obligation; multiset would report a block for de-duplicating canon's own repetition — thirteen standing findings nobody should act on. - A MARKER IS VOIDED PER NAME, NOT WHOLLY. A marker naming one carried unit is reported AND still suppresses the genuinely absent units it names. Voiding it wholly turns one wrong name into a cascade: two sound declarations discarded, their units back as fresh findings, three problems shown for one mistake. - A marker name matching no canon unit is ignored fail-closed (the unit the author MEANT is still reported by whichever arm owns it), and a fenced region in canon is never required carriage. Docs: - The § 2.1 block sentence and the families.py note now say the family reads THREE files per change, the third being each change's own proposal.md, read only to resolve declarations. Re-verified after the edit: 8 -> 8, all eight titles identical, fam_family_enumeration 0, and the single self-finding unchanged at "2 of the 39" — the sentence is block-only text, so carriage does not move. - Both contracts re-synced to the SHIPPED names. `marker_defects`, `_arm_resolution`, `declares`, `writer_sets` and `order` never existed; `suppression` returns `(suppressed, defective)` from one pass, ordering lives in `declarations` + `_arm_ordering`, and grouping is inline. - quickstart 76 -> 75; the two traceability rows citing withdrawn T051a now cite T056. - F4 hand-off gains the three things the review asked be said out loud: run the 18-repo aggregation pass before tuning, expect ~100+ info rows at scale, and consider a flag gating the ledger arm until the § 7.2 flip. Tests: the three-severities pin no longer compares the ids of three string LITERALS (true of any three distinct strings, so it proved nothing). It now moves each constant and checks the other two do not follow, which is the property a one-arm flip actually needs. Mutation round re-run after every change: 21 mutants, 21 killed, no survivors. One harness mutant was itself invalid — an unset env read, a no-op — and is replaced by the real signature mutation. tests/doc-health: 1077 passed. openspec validate --all --strict: 75 passed, 0 failed. promotion_fidelity + duplicate_packet: 90 passed, no diff. Movement unchanged: +1 warning, +9 info, 0 error, 0 critical. Co-Authored-By: Claude Opus 5 <[email protected]>
The ordering ruling, O11 as an eleventh flagged decision, the 21/21 mutation round plus the reviewer own 15 re-kills, "Refs" rather than "Closes" (the issues close when F3 self-gate lands, per the packet), and the generated-with line. Co-Authored-By: Claude Opus 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
Pull request overview
Adds the new modified-block-currency doc-health deterministic check family to detect lossy/stale ## MODIFIED Requirements blocks in active OpenSpec change deltas by comparing them to the promoted spec they would replace, including unit-derivation + marker suppression logic, plus registrations and the required enumeration/test collateral updates.
Changes:
- Introduces
scripts/doc_health/modified_block_currency.pyimplementing the family’s readers, unit derivation, reserved-marker parsing, and findings emission. - Registers the family in the doc-health family registry and IDs, and updates “family enumeration” + lifecycle-scan-set classification tests/fixtures for the new 22nd family.
- Adds extensive test coverage and fixture repositories to exercise the new family’s comparisons, marker behaviors, and ordering/title-resolution edge cases.
Reviewed changes
Copilot reviewed 92 out of 92 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/doc_health/modified_block_currency.py | New doc-health family implementation for active-delta vs promoted-spec comparisons, unit derivation, marker suppression, and findings. |
| scripts/doc_health/families.py | Registers the 22nd family and documents launch posture (not in FAMILY_RESOLUTION). |
| scripts/doc_health/init.py | Adds the family to FAMILY_IDS so it receives a report section. |
| openspec/changes/add-modified-block-currency-check/specs/doc-health/spec.md | Adds the owed ## MODIFIED Requirements restatement for “Deterministic check families”, including the new family’s description. |
| tests/doc-health/test_lifecycle_scan_set.py | Classifies the new family as a NON-reader and updates the non-reader count assertions. |
| tests/doc-health/test_family_enumeration.py | Updates registry-count expectations and adjusts the “authoritative statement” assertions to respect canon-vs-active-restatement disjunction. |
| tests/doc-health/test_modified_block_currency.py | New behavioral test suite for the family (unit derivation, marker parsing/suppression, resolution/ordering, determinism, etc.). |
| tests/doc-health/fixtures/modified-block-currency/alphaFactory/openspec/specs/ideation-dashboard/spec.md | New fixture promoted spec with an 8-scenario requirement to exercise scenario completeness + ledger behavior. |
| tests/doc-health/fixtures/modified-block-currency/alphaFactory/openspec/changes/archive/2026-01-01-old-change/specs/ideation-dashboard/spec.md | Fixture archived delta ensuring archived blocks are out of scope for this family. |
| tests/doc-health/fixtures/modified-block-currency/alphaFactory/openspec/changes/archive/2026-01-01-old-change/proposal.md | Fixture proposal marking the archived change (must not be read). |
| tests/doc-health/fixtures/modified-block-currency/alphaFactory/openspec/changes/add-lossy-block/specs/ideation-dashboard/spec.md | Fixture active delta with a lossy MODIFIED restatement to trigger findings. |
| tests/doc-health/fixtures/modified-block-currency/alphaFactory/openspec/changes/add-lossy-block/proposal.md | Fixture proposal for the lossy-block change. |
| tests/doc-health/fixtures/modified-block-currency/alphaFactory/openspec/changes/add-draft-block/specs/ideation-dashboard/spec.md | Fixture draft change delta to ensure draft deltas are still read. |
| tests/doc-health/fixtures/modified-block-currency/alphaFactory/openspec/changes/add-draft-block/proposal.md | Fixture proposal declaring draft standing. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/specs/unratified-sibling/spec.md | Two-writers fixture promoted spec baseline. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/specs/undeclared/spec.md | Two-writers fixture promoted spec baseline for undeclared ordering cases. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/specs/three-writers/spec.md | Three-writers fixture promoted spec baseline for >2 writer ordering cases. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/specs/ordered-missing/spec.md | Ordered-writers fixture promoted spec baseline (later writer fails to carry earlier). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/specs/ordered-carried/spec.md | Ordered-writers fixture promoted spec baseline (later writer carries earlier). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/specs/mutual/spec.md | Mutual-declaration fixture promoted spec baseline. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/specs/longer-id/spec.md | Longer-id fixture promoted spec baseline for whole-token declaration matching. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-ur-b/specs/unratified-sibling/spec.md | Fixture delta for unratified sibling ordering scoping behavior. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-ur-b/proposal.md | Proposal for unratified sibling writer. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-ur-a/specs/unratified-sibling/spec.md | Fixture delta for ratified writer paired with unratified sibling. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-ur-a/proposal.md | Proposal for ratified writer (no declaration). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-un-b/specs/undeclared/spec.md | Fixture delta for undeclared ordering case. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-un-b/proposal.md | Proposal for undeclared ordering case (no declaration). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-un-a/specs/undeclared/spec.md | Fixture delta for undeclared ordering case (paired writer). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-un-a/proposal.md | Proposal for undeclared ordering case (paired writer). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-tw-c/specs/three-writers/spec.md | Three-writers fixture delta (third writer) for ordering arm. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-tw-c/proposal.md | Proposal for third writer. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-tw-b/specs/three-writers/spec.md | Three-writers fixture delta (second writer) for ordering arm. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-tw-b/proposal.md | Proposal declaring relative-to for two-writers ordering. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-tw-a/specs/three-writers/spec.md | Three-writers fixture delta (first writer). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-tw-a/proposal.md | Proposal for first writer. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-om-later/specs/ordered-missing/spec.md | Ordered-writers “missing carriage” later-writer delta fixture. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-om-later/proposal.md | Proposal declaring relative-to for ordered-missing case. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-om-earlier/specs/ordered-missing/spec.md | Ordered-writers earlier-writer delta fixture. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-om-earlier/proposal.md | Proposal for ordered-missing earlier writer. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-oc-later/specs/ordered-carried/spec.md | Ordered-writers “carried” later-writer delta fixture. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-oc-later/proposal.md | Proposal declaring relative-to for ordered-carried case. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-oc-earlier/specs/ordered-carried/spec.md | Ordered-writers earlier-writer delta fixture (carried case). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-oc-earlier/proposal.md | Proposal for ordered-carried earlier writer. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-mu-b/specs/mutual/spec.md | Mutual declaration writer delta fixture. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-mu-b/proposal.md | Proposal declaring mutual relative-to. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-mu-a/specs/mutual/spec.md | Mutual declaration writer delta fixture. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-mu-a/proposal.md | Proposal declaring mutual relative-to (opposite direction). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-mo-modifier/specs/pending-cap/spec.md | Pending-title fixture delta (MODIFIES title added by sibling). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-mo-modifier/proposal.md | Proposal declaring relative-to for pending-title scenario. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-mo-adder/specs/pending-cap/spec.md | Pending-title fixture delta (ADDS title). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-mo-adder/proposal.md | Proposal for pending-title adder. |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-li-b/specs/longer-id/spec.md | Longer-id fixture delta (declared case). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-li-b/proposal.md | Longer-id fixture proposal ensuring whole-token matching (avoid prefix matches). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-li-a/specs/longer-id/spec.md | Longer-id fixture delta (other writer). |
| tests/doc-health/fixtures/modified-block-currency-two-writers/alphaFactory/openspec/changes/add-li-a/proposal.md | Longer-id fixture proposal (no declaration). |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/specs/res-cap/spec.md | Title-resolution fixture promoted spec baseline (includes “Old name”). |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-unresolved/specs/res-cap/spec.md | Fixture delta for unresolved-title reporting. |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-unresolved/proposal.md | Proposal for unresolved-title fixture. |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-the-sibling/specs/res-cap/spec.md | Fixture delta adding a title that another change modifies (pending-title resolution). |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-the-sibling/proposal.md | Proposal for pending-title sibling adder. |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-rename-and-amend/specs/res-cap/spec.md | Fixture delta for own-RENAMED-first resolution + MODIFIED under new name. |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-rename-and-amend/proposal.md | Proposal for rename-and-amend fixture. |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-pending-title/specs/res-cap/spec.md | Fixture delta modifying a title only an active sibling adds (pending resolution). |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-pending-title/proposal.md | Proposal for pending-title modifier. |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-no-canon/specs/absent-cap/spec.md | Fixture delta for capability with no promoted spec file at all. |
| tests/doc-health/fixtures/modified-block-currency-resolution/alphaFactory/openspec/changes/add-no-canon/proposal.md | Proposal for no-canon capability fixture. |
| tests/doc-health/fixtures/modified-block-currency-quiet/quietFactory/openspec/specs/quiet-cap/spec.md | Quiet fixture promoted spec baseline (no MODIFIED blocks in active changes). |
| tests/doc-health/fixtures/modified-block-currency-quiet/quietFactory/openspec/changes/add-only-adds/specs/quiet-cap/spec.md | Quiet fixture active delta with only ADDED requirements (family returns []). |
| tests/doc-health/fixtures/modified-block-currency-quiet/quietFactory/openspec/changes/add-only-adds/proposal.md | Proposal for only-adds fixture. |
| tests/doc-health/fixtures/modified-block-currency-noscope/emptyFactory/openspec/specs/some-cap/spec.md | No-scope fixture promoted spec where openspec/changes/ directory is absent (family returns Skip). |
| tests/doc-health/fixtures/modified-block-currency-markers/alphaFactory/openspec/specs/marker-cases/spec.md | Marker-behavior fixture promoted spec baseline. |
| tests/doc-health/fixtures/modified-block-currency-markers/alphaFactory/openspec/changes/add-marker-cases/specs/marker-cases/spec.md | Marker-behavior fixture delta with multiple marker forms and defects. |
| tests/doc-health/fixtures/modified-block-currency-markers/alphaFactory/openspec/changes/add-marker-cases/proposal.md | Proposal for marker-cases fixture. |
| tests/doc-health/fixtures/family-enumeration-clean/alphaFactory/openspec/specs/doc-health/spec.md | Updates family-enumeration fixture canon to “twenty-two” and includes the new family name. |
| tests/doc-health/fixtures/family-enumeration-missing-name/alphaFactory/openspec/specs/doc-health/spec.md | Updates missing-name fixture canon to 22-family baseline used by the test. |
| tests/doc-health/fixtures/family-enumeration-pending/alphaFactory/openspec/specs/doc-health/spec.md | Updates pending-canon fixture canon text to reflect current registry expectations. |
| tests/doc-health/fixtures/family-enumeration-pending/alphaFactory/openspec/changes/add-something/specs/doc-health/spec.md | Updates pending fixture delta restatement to 22-family registry expectations. |
| tests/doc-health/fixtures/family-enumeration-stale-numeral/alphaFactory/openspec/specs/doc-health/spec.md | Updates stale-numeral fixture’s enumerated family list to include the new family. |
| tests/doc-health/fixtures/family-enumeration-thin-delta/alphaFactory/openspec/specs/doc-health/spec.md | Updates thin-delta fixture canon to 22-family baseline. |
| tests/doc-health/fixtures/family-enumeration-thin-delta/alphaFactory/openspec/changes/add-something/specs/doc-health/spec.md | Updates thin-delta fixture delta restatement to 22-family baseline. |
| tests/doc-health/fixtures/family-enumeration-unknown-name/alphaFactory/openspec/specs/doc-health/spec.md | Updates unknown-name fixture to include the new family name while preserving “phantom check” failure. |
| specs/019-modified-block-currency-family/spec.md | Feature spec describing the family’s purpose, arms, marker grammar, and acceptance scenarios. |
| specs/019-modified-block-currency-family/plan.md | Implementation plan including sequencing constraints and registration collateral requirements. |
| specs/019-modified-block-currency-family/research.md | Research notes justifying design choices and integration approach. |
| specs/019-modified-block-currency-family/data-model.md | Defines the in-memory entities (Unit/Marker/etc.) used by the implementation. |
| specs/019-modified-block-currency-family/quickstart.md | Runbook for validating the feature locally (tests, validate, mutation checklist). |
| specs/019-modified-block-currency-family/pr-body.md | Prepared PR body content summarizing rationale, movement, and evidence. |
| specs/019-modified-block-currency-family/contracts/unit-derivation.md | Contract describing the normative unit-derivation rules. |
| specs/019-modified-block-currency-family/contracts/marker-parser.md | Contract describing the reserved-marker parser and suppression semantics. |
| specs/019-modified-block-currency-family/contracts/family-entrypoint.md | Contract for discovery, resolution/ordering behavior, disposition handling, and registration surface. |
| specs/019-modified-block-currency-family/checklists/requirements.md | Requirements-quality checklist for the feature spec. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| _MERGED_PREFIX = re.compile( | ||
| rf"^\*\*Merged into (`+.*?`+) by ({_CHANGE_ID}) \(({_ISO})\):\*\*") |
…realized Ruled at the archive gate, against this session's first instinct to leave the thirty-two build boxes open with a record of why. A cold reader meeting an archived change that carries open build boxes reads it as archived-UNREALIZED, which is a worse record than a tick that names its evidence. So every box in groups 2, 3, 4 and 5 is ticked and each group header carries ONE dated discharge line naming its Spec Kit feature, its pull request and its squash commit — F1 specs/019-modified-block-currency-family (#420, `19e3f6b5`), F2 specs/020-modified-block-currency-fixtures (#426, `76a2ad27`), F3 specs/021-modified-block-currency-self-gate (#427, `f728d57f`), F4 specs/022-modified-block-currency-reporting (#433, `4def2274`). The per-task evidence, the RED-first records and the mutation rounds stay where they were written rather than being copied into the packet. Six boxes were NOT discharged as written and say so where they stand, ticked with a `RECONCILED` clause naming the feature decision that disposed each rather than ticked silently: § 2.1's sibling-outcome basis (F1 plan O10, F3 plan D2 — the sibling had archived at `f027d3b3`, so the block was written relative to canon); § 3.2's revert (F2 review finding B4 and plan D2 — no revert exists and no ratified document claimed one; the truncation was caught pre-commit and rewritten inside archive commit `38b548d4` itself, so the fixture is byte-faithful from that commit's parent `d5f447e8`); § 4.1 and § 4.5's `+11 info` (F3 plan D1 — a figure taken over 23 blocks against a tree carrying 22, re-measured rather than asserted); § 4.2's sibling basis (F3 plan D2, disposed a second time by this act); and § 5.2's action line (F4 Phase 0 — already landed by F1, so realized as a pin, with the singular's imprecision recorded beside it). The § 8.1 record's sentence about the unticked groups is replaced by the ruling and its six exceptions, and the file's authoring preamble is left as written with a dated archive-state paragraph beside it. § 7 and § 1.2/§ 1.3 are untouched and stay open with their text. Gates: `pytest tests/doc-health -q -k "proposal_origin or lifecycle or corpus"` 67 passed, 1142 deselected (the archived tasks.md is corpus); `openspec validate --all --strict` 75 passed, 0 failed. Co-Authored-By: Claude Opus 5 <[email protected]>
… promoted byte-for-byte (8 → 8 + two ADDED), the check verified its own block The archive act for `add-modified-block-currency-check`, ratified 2026-08-27 and realized on `main` by four Speckit features. No behaviour changes: this promotes two deltas into canon, moves the packet into `openspec/changes/archive/`, and disposes the five tests the act made fall due. ## Gate (§ 8.1) — merged-plus-green, re-verified from `main` All four merges re-confirmed ancestors of `origin/main` with `git merge-base --is-ancestor` (exit 0 on each) rather than read off a PR page: | feature | merge | what landed | | --- | --- | --- | | F1 `019-…-family` | **`19e3f6b5`** (#420) | the family module, three registrations, and § 2.1's own MODIFIED block in the same commit | | F2 `020-…-fixtures` | **`76a2ad27`** (#426) | the regression catalogue, #351 and #329 reconstructed from history | | F3 `021-…-self-gate` | **`f728d57f`** (#427) | the self-gate against this repository, by named subject | | F4 `022-…-reporting` | **`4def2274`** (#433) | the report section, the action-line pin, the workflow-boundary pin | | gate | before the act | after the act | | --- | --- | --- | | `python3 -m pytest tests/doc-health -q` | **1209 passed, 0 failed** | **1209 passed, 0 failed** | | `OPENSPEC_TELEMETRY=0 openspec validate --all --strict` | **76 passed, 0 failed** (24 active + 52 specs) | **75 passed, 0 failed** (23 active + 52 specs) | | doc-health single-repo | 5 critical, 7 error, 41 warning, 12 info, 0 new regressions | 5 critical, 7 error, 41 warning, **11** info, 0 new regressions | | the same run `--skip-family modified-block-currency` | 5 critical, 7 error, 40 warning, 4 info | 5 critical, 7 error, 40 warning, 4 info | | **movement** | **+1 `warning`, +8 `info`, 0 `error`, 0 `critical`** | **+1 `warning`, +7 `info`, 0 `error`, 0 `critical`** | The gated bands do not move in either measurement, so a `--fail-on error` run is unaffected by construction — which is what D3's advisory launch claimed. The advisory launch is intact in both halves, re-read rather than assumed: `modified-block-currency` is in `FAMILIES` (22) and `FAMILY_IDS`, and ABSENT from `FAMILY_RESOLUTION`. § 4.5's authored prediction of `+11 info` is **history** — measured at `9be81a40` over 23 blocks, re-measured 9 then 8 as the corpus moved under it. The invariant that holds at every figure is that the movement EQUALS the family's own per-severity counts and that `error`/`critical` do not move. **The one `info` the act removed is the family's own self-finding**, and its departure is the promotion working: active MODIFIED blocks examined 22 → 21. **The whole report diff is seven lines and only two of them are a finding**: canon words 208551 → 213280 (+4729), governance words 664611 → 669340 (the same +4729, moving from active-change prose into promoted prose), canon share 31.4% → 31.9%, the promoted-specs row of the per-source table, the headline `info` 12 → 11, the family's class subtotal `carriage ledger: 8` → `7`, and the finding row plus its ranked-plan row. Nothing new is reported anywhere, by any family. ## § 8.2 — the promotion verified byte-for-byte, per requirement, in both capabilities A change whose subject is lossy promotion had to prove it did not promote lossily. Both tables were derived independently of the family and then checked against what the family itself said. ### `doc-health` | requirement | canon before | delta | canon after | verdict | | --- | --- | --- | --- | --- | | `Deterministic check families` (MODIFIED) | 8 scenarios; 12 body units + 27 scenario bullets = 39 units | 8 scenarios restated; 13 body units + 28 bullets | 8 scenarios | **8 → 8**; titles an identical SET in identical ORDER; 7 of 8 byte-identical bullet for bullet; all 3 dated bold notes byte-identical; exactly SIX differences | | `Currency of an active change's MODIFIED requirement blocks` (ADDED) | absent | 14 scenarios | 14 scenarios | pure append; the title collides with NONE of canon's 34 | | the other 33 requirements | — | untouched | unchanged | bytes identical per requirement, and the file order of all 34 pre-existing titles preserved | | FILE | 34 requirements, 145 scenarios | — | 35 requirements, 159 scenarios | +1 requirement, +14 scenarios | **The six differences, verbatim.** 1. the total numeral — canon `SHALL implement twenty-one check families` → block `SHALL implement twenty-two check families` 2. the enumeration gains one name — canon `… duplicate packet, and family enumeration.` → block `… duplicate packet, family enumeration, and modified-block currency.` 3. `Four of the twenty-one` → `Four of the twenty-two` 4. `the other seventeen families` → `the other eighteen families` 5. ONE new body sentence: `The modified-block currency family reads ACTIVE CHANGE DELTAS, the promoted SPECS they have not yet replaced, and each active change's own `proposal.md` — the last read only to resolve whether one active writer declares its deltas relative to another, which `release-realization` governs — so it likewise takes neither the governed corpus nor the lifecycle scan set as its document list, and it moves no census, word count, canon-share figure, inventory entry, or catalog record either.` 6. ONE new `AND` bullet in `A run executes the check families` (12 → 13 bullets): `- **AND** modified-block currency MUST compare each active change's `## MODIFIED Requirements` blocks against the promoted requirements they replace as its owning requirement below defines` Differences 1–2 are ONE canon sentence and 3–4 are ANOTHER, so exactly TWO canon body units are not carried. **And that is exactly what the family itself reported against this block — the check verified its own block.** Before the act it drew ONE `info` against `openspec/changes/add-modified-block-currency-check/specs/doc-health/spec.md` reading "does not carry **2 of the 39** body units and scenario bullets", quoting canon's `twenty-one check families` sentence and canon's `Four of the twenty-one` sentence — canon's wording, not the block's, which is the correct direction. This gate's independent derivation agreed unit for unit, 39 for 39. Scenario-by-scenario, 8 → 8: `A run executes the check families` 12 → 13 bullets (difference 6; the other twelve byte-identical), and `Lifecycle conformance checks fire` 2/2, `A register carries staged status` 2/2, `Drift checks fire` 2/2, `Catalog conformance checks fire` 2/2, `Routing conformance checks fire` 2/2, `Origin conformance checks fire` 2/2, `Roster composition is checked across domains` 3/3 — all seven IDENTICAL. ### `document-lifecycle` | requirement | canon before | delta | canon after | verdict | | --- | --- | --- | --- | --- | | `A MODIFIED requirement block restates the requirement as canon currently states it` (ADDED) | absent | 5 scenarios | 5 scenarios | pure append; the title collides with NONE of canon's 16 | | the 16 pre-existing requirements | — | untouched | unchanged | bytes identical per requirement, order preserved | | FILE | 16 requirements, 72 scenarios | — | 17 requirements, 77 scenarios | +1 requirement, +5 scenarios | The delta carries ONLY an `## ADDED Requirements` section — no MODIFIED, no REMOVED, no RENAMED — so there is no direction in which it could delete anything. ### The § 2.1 ordering, resolved by the recorded D5 sequencing Not "whichever archives first". `add-family-enumeration-check` archived **FIRST**, at `f027d3b3` (#419) — the precondition D5 priced and that packet's own § 2.5 records paying, because a proposal registering no family cannot lawfully restate the requirement at twenty-two. Its enumeration was therefore already CANON when F1 wrote § 2.1's block, so the block was written relative to canon: `release-realization`'s "declare relative to that change's outcome" discharged by the outcome having BECOME canon, not by a two-writers basis substitution. Proven, not reasoned — canon's requirement is byte-IDENTICAL between `f027d3b3` and base `4def2274` (extracted from both trees and diffed, **0 hunks**), and the only commit touching the spec since (`49f0c18c`) appended a requirement at the end. Measured through the ordering arm too: **0** two-MODIFIED pairs, no basis override, no finding. ### Canon after the act is what the deltas imply and nothing else `git diff openspec/specs/` → **2 files changed, 404 insertions(+), 5 deletions(-)**. All five deletions are in `doc-health` and all five are re-wrapped lines of the two numeral sentences plus the one continuation line the new basis sentence extends; `document-lifecycle` has **zero** deletions. Proven per requirement and then as a **byte diff of the remainder** — the remainder being the whole document minus the one MODIFIED requirement and the one appended requirement, each requirement running from its `### Requirement:` line to the next one or to EOF. Byte-identical before and after, **raw and again after trailing-newline normalization**: `doc-health` 88197 vs 88197 raw and 88196 vs 88196 normalized; `document-lifecycle` 48653 vs 48653 raw and 48652 vs 48652. Preambles identical, no title removed, every pre-existing title still in position, and both files still ending in a blank line before and after — so no appended requirement consumed an EOF newline. > **Review finding N2 is recorded as CONTESTED rather than applied**, per > `document-lifecycle`'s contested-finding rule. N2 read this equality as holding > only after trailing-newline normalization, at raw 88343 vs 88342 and 48731 vs > 48730, the appended requirement having consumed each file's EOF blank line. > Re-derived at the review: the raw remainders ARE equal, both documents still end > in a blank line before and after the act, and no remainder definition this gate > could construct yields 88343 or 48731. Writing a figure this gate cannot > reproduce into the record of a change whose subject is unverified restatement is > the one thing this packet exists to prevent, so the definition is made explicit > and both figures are recorded instead. **N2 is owed a re-derivation or a > withdrawal.** ## The five tests the act made fall due — four predicted, one not, none deleted F3's `quickstart.md` § WHEN THE GATE FAILS named this exact day FIRST among the movements it expected and recorded the disposition: re-aim to the ARCHIVED path where the family's reader can be pointed there without a module change (a change of SUBJECT, the family excluding `archive/`), else retire with a dated record — never delete silently. **No module changed.** | test | disposition | why | | --- | --- | --- | | `_LEDGER_SUBJECTS`' self-finding triple | dropped, **8 → 7**, dated comment | the block promoted, so the family reports nothing against it; verified before deleting the row | | `_own_block()` → `_archived_block()` | **RE-AIMED** | read at the archived path through `mbc.parse_delta` + `mbc.derive_units`, the two calls `active_blocks` itself makes — the gate still owns no second parser | | `…own_delta_is_among_the_blocks_the_family_examined` → `…own_block_sits_at_its_archived_path_and_out_of_reach` | **RE-AIMED** | the discovery claim one document over, both directions: readable at the archived path, and no active block from this change or any archived path — pinning the reader's exclusion against the REAL tree for the first time | | `…own_delta_is_measured_against_canon_and_no_sibling_basis_exists` → `test_the_archived_block_still_resolves_to_canon_and_no_active_writer_holds_it` | **RE-AIMED** | all three claims about the tree as it now stands: basis `openspec/specs/doc-health/spec.md` status `canon`; both packets archived exactly once; no basis override, active writers on the requirement 1 → **0**. Deliberately NOT coupled to canon's TEXT, which moves with every new family | | `…self_finding_quotes_this_change_s_two_stale_numeral_sentences` → `test_the_self_finding_is_retired_by_the_archive_act` | **RETIRED with a dated record** | the only one that cannot be re-aimed: the others are about DOCUMENTS, this one is about a FINDING, and the family draws findings against ACTIVE deltas only. Manufacturing an archived counterpart would widen the family inside a test instead of inside its module. Two residual assertions replace it — no finding names either path this packet ever had, and the frozen archived block carries the `twenty-two` forms and not the `twenty-one` ones, preserving the DIRECTION claim | | **the fifth, in F2's file** — `test_the_packets_own_marker_templates_are_not_marker_form` | **RE-AIMED** to `openspec/specs/doc-health/spec.md` | not on F3's list. It read the packet's own ACTIVE delta to prove the two marker TEMPLATE bullets are ordinary carriage units; its docstring argued the strict anchor matters "precisely because these paragraphs promote into canon" — and now they have, so the re-aim is that claim arriving, and what the test reads is the promoted text rather than a prediction about it | Untouched, and it matters which: the resolver guard, the discovery floor, the scenario-arm subject, the three zero-read classes, the structural pins on the advisory launch, the movement pin (stated as a DIFFERENCE against the family's own counts, so `+1 / +7` needed no edit), and the two-attribute context pin. The gate's regex set is unchanged — three names joined the `mbc.*` allowlist (`ActiveBlock`, `derive_units`, `parse_delta`) and not one pattern. `fam_family_enumeration` now reads canon alone and reads **zero**: no active change restates the requirement, so `_delta_statements` is empty and its own re-aimed `test_canon_is_the_statement_under_test` measures canon — `twenty-two`, 22 names, 22 registered, 0 unresolved. CI-shape run of the self-gate file, outside a worktree (`git archive HEAD | tar -x` into a bare dir + `git init -q .`), per F3's own lesson: **15 passed**. ## What stays open - **#330 was closed by hand on 2026-08-27 (16:43Z)** — by `brettheap`, with no PR keyword involved. Not reopened. **§ 7.1 stands as the record of what this change did NOT build**: shape 1, the post-hoc lost-scenario check, which needs a third measurement basis inside a family whose promoted requirement obliges it to declare which of TWO it measured. The archived `tasks.md` § 7.1 text is left frozen as authored. - **§ 7.2 — the flip is owed.** Raising the scenario-title arm to `error` plus the `contested` classification, moved together in one commit, on a standing population of one finding (`add-composed-view-authoring`'s deliberate rename, named and never claimed a defect). No flip is proposed for the carriage ledger. - **§ 7.4 — the domain factories are UNMEASURED.** This change's evidence is openxFactory's active changes and a fixture corpus, which is why the launch is advisory. - **§ 1.2 — the five orchestrator decisions were NOT VETOED, which is not the same as affirmatively ruled.** The flags stay where they were. - **Groups 2–5 are TICKED, each group header naming its evidence** — ruled at this gate, against this session's first instinct to leave them open with a record: an archived change carrying thirty-two open build boxes reads as archived-UNREALIZED to a cold reader, which is a worse record than a tick that names its evidence. Every box in groups 2, 3, 4 and 5 is ticked, and each group header carries ONE dated discharge line: > Discharged 2026-08-27 by Speckit F1 = specs/019-modified-block-currency-family (PR #420, squash `19e3f6b5`); per-task evidence, RED-first records and the mutation round live in that feature's tasks.md and evidence. > Discharged 2026-08-27 by Speckit F2 = specs/020-modified-block-currency-fixtures (PR #426, squash `76a2ad27`); per-task evidence, RED-first records and the mutation round live in that feature's tasks.md and evidence. > Discharged 2026-08-27 by Speckit F3 = specs/021-modified-block-currency-self-gate (PR #427, squash `f728d57f`); per-task evidence, RED-first records and the mutation round live in that feature's tasks.md and evidence. > Discharged 2026-08-27 by Speckit F4 = specs/022-modified-block-currency-reporting (PR #433, squash `4def2274`); per-task evidence, RED-first records and the mutation round live in that feature's tasks.md and evidence. **Six boxes were not discharged as written and say so where they stand**, each ticked with a `RECONCILED` clause naming the feature decision that disposed it rather than ticked silently: § 2.1's sibling-outcome basis (F1 plan O10, F3 plan D2 — the sibling had archived at `f027d3b3`, so the block was written relative to canon); § 3.2's revert (F2 review finding B4 + plan D2 — no revert exists and no ratified document claimed one; the truncation was caught pre-commit and rewritten inside archive commit `38b548d4` itself, so the fixture is byte-faithful from that commit's parent `d5f447e8`); § 4.1 and § 4.5's `+11 info` (F3 plan D1 — a figure taken over 23 blocks against a tree carrying 22, re-measured rather than asserted); § 4.2's sibling basis (F3 plan D2, and disposed a second time by this act); and § 5.2's action line (F4 Phase 0 — already landed by F1, so realized as a PIN, with the singular's imprecision recorded beside it). The per-task evidence, RED-first records and mutation rounds stay where they were written rather than being copied into the packet. **§ 7 and § 1.2/§ 1.3 are untouched.** - `Status: ratified` is left as it stands in the archived proposal, per precedent. ## Scope `openspec/` (the archive move plus the two promoted specs), `README.md`, and two test files. **Nothing under `scripts/` or `.github/`** — the module is unchanged, and F4's pin that no workflow option reaches this family still holds. Closes #329 — its ask was detection; both instances are disposed and the class is now detected before an archive rather than at one. Refs #357 — **`Refs`, not `Closes`, by ruling.** That issue's own remedy asked for a CONTESTED-class finding. This family launched ADVISORY and absent from `FAMILY_RESOLUTION`, with § 7.2 owing exactly that flip, so closing #357 now would mark done a remedy whose stated form is unbuilt. Refs #330 — closed by hand on 2026-08-27 (16:43Z), not by this change. **Note on the first commit's message.** `7b36604e` was written before this ruling and its body still reads the `Closes` keyword for #357. It is already pushed and is not being rewritten; this body is the authority, and #357 is to stay open. If this PR is merged by commit messages rather than by this body, #357 must be reopened. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
F1 — the modified-block-currency doc-health family
Realizes
openspec/changes/add-modified-block-currency-check§ 2 (tasks2.1–2.10), the first of four Speckit features building that change. Ratified
2026-08-27 by Brett, verbatim "Ratify as-is". Feature:
specs/019-modified-block-currency-family/.What lands
The twenty-second deterministic check family. A
MODIFIEDrequirement blockthat restates stale canon passes every gate in this repository and deletes canon
on archive — it happened four times in one week (#351, #329) and a human
caught it every time.
openspec validate --strictchecks a delta's SHAPE, neverwhat promotion will do to the requirement being replaced; and
promotion-fidelityis structurally blind to it, because after an archive actcanon IS the delta, so a block that dropped seven scenarios and a canon now
missing them agree perfectly. The comparison that can see the loss is between an
ACTIVE delta and the canon it has not yet replaced — read while the change can
still be edited, which is the only moment the remedy is one line.
scripts/doc_health/modified_block_currency.py— the family: the active-deltareader, the promoted-requirement reader, the normative unit derivation
(backtick masking, the sentence split, bullet units, the undivided dated note,
fenced blocks excluded), same-kind EXACT matching, three arms, the
reserved-marker parser and its two forms, own-RENAMED-first title resolution,
ordering BY DECLARATION, and the disposition read.
scripts/doc_health/families.py,scripts/doc_health/__init__.py— the tworegistrations. Absent from
FAMILY_RESOLUTIONdeliberately.## MODIFIED Requirementsblock ondoc-health's "Deterministiccheck families", in the same commit as the registration.
tests/doc-health/test_modified_block_currency.py— 97 tests.Three arms, four finding classes
warninginfowarninginfoThe numbers differ on purpose: the arms are three COMPARISONS between two
documents, and the fourth class is a defect in a DECLARATION.
Findings sort SEVERITY-FIRST, so the gate-bearing
warningrenders abovethe editorial
inforows. The ledger's population is standing by construction —every legitimate MODIFIED block edits something — so on any real tree the one
precise signal is outnumbered, and a path-first sort buried it among them, which
is the exact failure the delta split the arms to avoid.
Advisory at launch, in both halves —
warning/infoseverities ANDdeliberate absence from
FAMILY_RESOLUTION. The second half is the one that iseasy to lose:
report.uncited_resolutionsturns acontestedfinding thatvanishes between reports into an
error, and every finding this family raisesnames a block somebody is expected to CORRECT, so a
contestedclass would redthe nightly on the first correction. Raising the scenario-completeness arm to
errorand adding the contested class are ONE later decision by ruling; noflip is proposed for the ledger at all.
Measured movement
Two real single-repo runs, one with the family and one with
--skip-family modified-block-currency:+1
warning, +9info, every other family's report section byte-identical.The
errorandcriticalbands do not move, so a run configured--fail-on erroror--fail-on criticalis unaffected by construction.The one
warningisadd-composed-view-authoring/Composed views are read-only with a repository jump, omitting canon'sGate verbs hide on a composed view. On inspection it is a deliberate rename —the case the reserved marker exists for — and this PR does not claim it is a
defect.
§ 2.1's block draws exactly ONE ledger finding against this change's own delta,
naming the two body sentences it changes. That is the packet's § 6.6 prediction
realized to the unit; it is expected, advisory, and must not be dispositioned,
because it is the evidence that the family reads its own packet.
Sequencing: the packet's § 2.1 was unimplementable as written
fam_family_enumerationchecks EVERY active delta's restatement of"Deterministic check families" against the LIVE registry, independently. So
registering a twenty-second family while
add-family-enumeration-checkwasactive emitted three findings against that packet's delta path — measured 0
at 21 registered, 3 at 22 — and no edit inside this change could clear them. The
packet's D5 proved half the problem (a proposal-only tree reds the gate) and
never measured the other half. Ruled: that change archived FIRST (
f027d3b3),this branch merged it, and § 2.1's block is written relative to CANON. The
two-writers instance § 2.1 was going to create therefore never existed.
Evidence
python3 -m pytest tests/doc-health -q— 1077 passed (baseline 980, +97).OPENSPEC_TELEMETRY=0 openspec validate --all --strict— 75 passed, 0 failed.fam_family_enumerationreads 0 against this tree; per-requirementscenario count on the restated requirement 8 → 8, all eight titles
identical to canon's, all three dated bold notes carried VERBATIM.
promotion_fidelity.py,duplicate_packet.py,report.py,.github/workflows/**and every threshold: no diff. Their suites: 90passed.
round found THREE missing tests that twenty-one green tests had not — the
FAMILY_RESOLUTIONabsence was documented in three places and asserted innone; the marker's change-id group was unpinned because the only
quoted-template case also carried a placeholder date; and the no-basis
guarantee was asserted on a run OUTCOME rather than on the reader's signature.
All three are now pinned. The implementation review independently re-killed its
own 15 mutants and found all 10 of its findings to be true positives.
warning, not with aninforow.What this does NOT close
#330 stays open. Its shape 1 — the post-archive safety net, diffing a
promoted spec against its own prior state across the archive commit — is NOT
built here: it needs a third measurement basis inside a family whose promoted
requirement obliges it to declare which of TWO it measured. The pre-archive gate
is the cheaper half and the one #330 itself calls "where it is cheap". Owner and
trigger are recorded in the packet's § 7.1.
Also not here, and not this feature's scope: F2's regression-fixture catalogue,
F3's asserted self-gate, F4's report section and workflow pin. The OpenSpec
change ships ACTIVE and archives only after this merges green.
Decisions still flagged for veto
Eleven, listed in
specs/019-modified-block-currency-family/plan.md§ Decisions taken by the orchestrator. Four supply rules the ratified delta does
not write, and they are the ones a reviewer should read first:
carries an ISO date), measured against the notes canon actually holds.
corpus. Dropping it would let a block move an obligation into scenario prose
where neither carriage arm could see it.
state one normalized unit twice, every instance a repeated scenario-bullet.
Set semantics cannot lose a DISTINCT obligation; multiset would report a block
for de-duplicating canon's own repetition.
delta's OWN written-out marker examples, which promote into canon, parse as two
real markers on the requirement that defines them.
Two further readings are recorded in the module docstring: a marker is voided
PER NAME rather than wholly, and a marker name matching no canon unit is ignored
fail-closed (the unit the author meant is still reported by whichever arm owns
it).
Refs #357 #329 #330
🤖 Generated with Claude Code