Skip to content

IR V3: Staleness propagates - #41

Open
afogel wants to merge 2 commits into
ir/v2from
ir/v3
Open

afogel wants to merge 2 commits into
ir/v2from
ir/v3

Conversation

@afogel

@afogel afogel commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Third slice of the Normative IR (docs/shaping/normative-ir-slices.md §V3), stacked on #40.

Demo: change one word inside the > **Intent immutability (normative).** callout in concepts/intent.md. bun run ir lint reports the Invariant as needing review, the §8.4 Requirement that depends_on it, and the SHOULD downstream of that. None of them contain the edited word, and no RFC 2119 keyword moved. The captured output is in ir/slices/v3/README.md, and ir/test/staleness-demo.test.ts performs the same edit.

What it delivers

  • One computation, three edge types. checkStaleness() finds every record whose reviewed_against no longer equals its provision's text_hash (R2.4), then walks depends_on in reverse (R2.6) and restates in its fixed direction (R2.9): a changed concept-page provision stales its pillar copy, never the reverse. Each entry says why, what it invalidated, and which conformance tests cite it.
  • Nothing is marked invalid. The output is needs-review; the reviewer classifies the change and clears it by updating the record. acs-ir lint exits 1 until then, and CI now runs it.
  • The migration worklist (R6.6) comes from the same pass: every live restates edge is an inline pillar copy awaiting replacement by a reference. One entry today.
  • Test citations are collected by literal ID from ir/test/conformance/ (R2.7). The directory arrives in V5; until then the report says "none" rather than dropping the column.

Verification

  • bun run typecheck passes; bun test ir: 119 tests pass, including the demo.
  • bun run ir lint on the pinned corpus: nothing to review, exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BX56nQPAsqYihopWfWy1xm

…ds on it

The third slice of the Normative IR (V3 in docs/shaping/normative-ir-slices.md),
stacked on V2. `acs-ir lint` re-extracts the marked corpus, joins the catalog,
and reports every record whose reviewed_against no longer matches its
provision's text, then walks the catalog's edges in reverse: a Requirement that
depends_on a changed Definition or Invariant needs review though no sentence of
its own changed (R2.6), and a pillar copy that restates a changed concept-page
provision needs review because the concept page is canonical (R2.9). Each entry
says why, what it invalidated, and which conformance tests cite it.

Nothing is marked invalid. The reviewer classifies the change and clears the
flag by updating the record; the command exits 1 until then, and CI runs it.

The demo is a test: change "grow" to "widen" inside the Intent immutability
callout and the lint names ACS-INV-0001, ACS-REQ-0011 and ACS-REQ-0012, none of
which contain the word, with the keyword count unchanged. The same pass emits
the migration worklist concepts/README.md:33 promises: one inline pillar copy
today, §9's approver-authentication sentence restating agents.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BX56nQPAsqYihopWfWy1xm
@afogel
afogel added this pull request to stack #48 September 14, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants