Skip to content

sdg: IP 0001 — foundational machine surfaces for an external spec UI - #7

Open
lzrscg wants to merge 792 commits into
mainfrom
claude/xspec-ui-apis-4df8fa
Open

lzrscg wants to merge 792 commits into
mainfrom
claude/xspec-ui-apis-4df8fa

Conversation

@lzrscg

@lzrscg lzrscg commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Improvement Proposal specs/patches/0001-external-ui-apis.md (Stage: Proposed), drafted from the seed "Foundational APIs for an external spec UI" and finalized against the Developer-confirmed scope: CLI-only connection (no service/watch surface), UI-owned text editing (no content-mutation commands), saved-files-only analysis.

Proposed SPEC.md change areas: reference occurrences with source ranges; source ranges for code locations; a whole-document structural view (tag-range decomposition, imports, comments, occurrences, direct position resolution, multi-file form); a per-file parse-local availability contract for the new surfaces; a workspace inventory with invocation-anchored root; structured diagnostics with stable codes and ranges; rename/move previews; machine-interface identification.

Also carries the preceding Liaison commits on this branch (PHILOSOPHY.md updates, seed intake) and consumes specs/tmp/SEED.md.

Process notes: branch claude/xspec-ui-apis-4df8fa is this session's harness-designated push branch and stands in for patch/external-ui-apis (recorded in the patch header). Merge happens only at Phase 11 per specs/DEVOPS.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2


Generated by Claude Code

lzrscg pushed a commit that referenced this pull request Aug 3, 2026
…rfect files (iter 8)

Applied:
- I1: change 4 now states the text-value principle for files with findings —
  Markdown compilation's removal rules classify constructs by syntactic form,
  never by validity or resolution (imports removed by form, tags removed with
  every spelled attribute, non-inventoried constructs preserved as content);
  resolution enters only via text(...) replacement, already the unavailable case.
- I2: identity definedness disambiguated — chain conditions (presence,
  well-formedness, structural validity) are inherited; uniqueness constrains the
  section's own spelled identity alone, so a uniquely spelled descendant of
  duplicate-id ancestors keeps its defined identity; defined identity does not
  imply defined prefixes, and occurrence resolution / the target filter turn on
  the referenced identity's own definedness.
- O1: spread attributes appear among the view's raw attribute spellings by form;
  invalidity is a located finding, never a view omission.
- O2: position-resolution offset domain closed — a non-non-negative-integer
  offset value is the same usage error as a greater offset.
- O3: stable-code scoping stated as deliberate — codes cover exactly the
  numbered conditions plus refusal reasons; plain usage errors carry no code but
  still get the JSON error document when JSON output is in effect.

Rejected:
- O4: the Branch header's mapping is deliberate harness bookkeeping — pushes go
  to the designated branch and the mapping is recorded in the patch header and
  PR #7; stripping it mid-process would name a branch nothing pushes to.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
lzrscg pushed a commit that referenced this pull request Aug 10, 2026
…R gets no pull_request runs

Scaffolding audit for IP 0001 (Tests Specified): the existing layout,
vitest projects, npm scripts, network-denial wrapper, and E-6 exchange
wiring already cover every TEST-SPEC/CERTIFICATIONS addition; new tests
and fixtures are Phase 9/10 content under existing globs. The one gap:
PR #7 is unmergeable against main (specs/PHILOSOPHY.md conflict), and
GitHub creates no pull_request-event workflow runs for a conflicted PR
(zero runs across 45 commits). Add the working branch to ci.yml's push
trigger so the TEST-SPEC-required tests run on every push to the branch
head — the channel sdg/initial-build already used — with checks
attaching to the PR's head commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
lzrscg pushed a commit that referenced this pull request Sep 22, 2026
…or S-9

Phase 8 re-entry after the Phase 4/6/7 revisits (a048b9f..3311ccd). The
scaffold still satisfies TEST-SPEC.md 18 (E-1..E-6 are unchanged by the
delta; ci.yml's three jobs and run-without-network.sh match them, and PR #7
is still conflicted, so its push-event carve-out stays) and every toolchain
pin the documents imply (Node 22 as the oldest supported LTS, TypeScript
5.x, Vitest, ubuntu-24.04 with util-linux >= 2.38, windows-2025, MDX major
version 3). One gap: S-9 (fixture well-formedness, judged by a means
independent of the product) needs the full MDX 3 parse — micromark with
micromark-extension-mdxjs, and mdast-util-from-markdown with
mdast-util-mdx, whose mdast layer is where JSX tag matching lives — but the
harness reached those packages only as undeclared transitive dependencies
of the product's remark-mdx.

- package.json, package-lock.json: the four packages declared as
  devDependencies at the versions already locked; the dependency closure is
  unchanged, only the lockfile's root entry moved.
- test/vitest.config.ts: header note on where harness-only dependencies
  live and why.
- AGENTS.md: the staged-MDX well-formedness check now uses the harness's
  own full parse (fromMarkdown + mdxjs + mdxFromMarkdown) and records that
  the tokenizer alone accepts an unclosed or mismatched tag.

Verified: npm run typecheck, npm run format:check, and the self project in
the unprivileged namespace are green; no product or harness logic touched.
Stage of specs/patches/0001-external-ui-apis.md unchanged (Tested).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…ger records (Task 2)

TEST-SPEC S-9 with §18 E-6 (reviewer C, gap 2): the representative fixture's
initial `specs/Other.mdx` (version one), `specs/Core.mdx`, and `specs/Refs.mdx`
were plain initial files of a workspace no registry body creates, judged only
when test/suite/e6-exchange-writer.test.ts (Linux) or
test/windows/e6-byte-identity.test.ts (Windows) ran against the built product.
They are now staged-source records in test/helpers/e6.ts beside the leaf edit
(`E-6 specs/Other.mdx version one — the initial source`, `E-6 specs/Core.mdx`,
`E-6 specs/Refs.mdx`; the same expressions, so the bytes are identical), passed
in the fixture's `files`; `E6_CORE_SOURCE` and `E6_REFS_SOURCE` stay string
constants (the `at` step derives its byte offset from the former).
`xspec.config.ts` and `src/app.ts` are not `.mdx` and stay plain.
test/self/s9-staged-sources.test.ts pins exactly four E-6-led records; its
import of ../helpers/e6.js before the registry manifest is unchanged. The
fixture runs under no per-body mark (its suite test calls it directly), so the
records are the sole S-9 mechanism for its initial files.

Sites converted: 3 (the fixture's three initial `.mdx` entries); records
added: 3. Checks: `npx tsc -p test` clean; `npm run format:check` clean; the
S-9 self-test alone 195 tests over 170 records (four `E-6 …` records listed);
self project 22 files, 2335 passed, 0 skipped under the unprivileged
namespace; certification 144 pass / 33 fail / 0 error / 0 hang; the E-6
exchange test passes against the built product before and after with
identical writes (sha256 capture: the same 6 lines); red check: an unclosed
tag spliced into E6_CORE_SOURCE fails the `E-6 specs/Core.mdx` record as
HarnessStagingError mode mdx-derivability while the other three pass. Task 2
removed from the plan, its resolutions recorded in the preamble; AGENTS.md
gained the Task 2 bullet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…er the property constants as records (Task 3)

TEST-SPEC §17 S-9's timing clause for the initial `.mdx` files of the workspaces
a property body creates per trial: from the second trial on the body has invoked
the product, so a plain entry would be refused by the guard's planned extension
to `stageInitial` (Task 24). Every draw-derived entry is now declared `perDraw`
(judged well-formed at creation; already judged by the runner's `mdxSources`
before the body saw the draw — coverage verified per module by reading) and
every harness-constant entry is a staged-source record the S-9 self-test judges
before any product exists.

- test/helpers/workspace.ts: export `mdxPathsOf(files)` — the plain `.mdx` keys
  of an initial `files` map in map order, record entries left out — the one
  definition the modules whose generators build the map derive their `perDraw`
  list from (the option Task 3 offered; chosen over per-module copies). Header
  sentence. Self-test in test/self/s9-staged-sources.test.ts.
- perDraw sites: section-16-p1.ts (`inStagedWorkspace`, the fixed `specs/A.mdx`
  literally), -p2-p3.ts (P-2's two workspaces, P-3's one), -p4.ts (both),
  -p5-p6.ts (three sites through a module-local `drawWorkspace(rendered)`),
  -p7.ts (both arms; code sources never end in `.mdx`), -p9.ts, -p12.ts (minus
  the break-parse twist's file, which stays `unparseable`), -p13.ts.
- records (3): `FUZZ_BASE_RECORDS` in section-16-p8.ts — "P-8/P-11 specs/A.mdx"
  and "P-8/P-11 specs/B.mdx" from BASE_SPEC_A/BASE_SPEC_B (which stay strings in
  the exported FUZZ_BASE_FILES for the mutators); P-8 stages
  `fuzzBaseWorkspaceFiles()`, P-11 substitutes the record for each unmutated
  `.mdx` entry of `trial.files` and keeps its mutated ones `unchecked` — and
  "P-10 specs/A.mdx" (`A_MDX` wrapped in place, section-16-p10.ts).
- P-8, P-10, P-11 pass no `mdxSources` and create no draw-derived well-formed
  `.mdx` workspace: nothing added. The task's "P-7 …" record example was wrong
  (P-7's `mdxSection(id)` contents are per-draw sources, judged by its
  `mdxSources`), recorded in the plan.
- Finding, recorded as the plan's new Task 23b (before Task 24): P-12's
  break-parse twist stages a draw-derived `unparseable` initial entry that
  neither `perDraw` (judged well-formed) nor a record (draws are never records)
  can describe and that Task 24's guard, exempting only `unchecked` and
  `per-draw`, would refuse from the second trial on — it needs a guard-exempt,
  builder-judged-unparseable draw declaration (workspace.ts; Task 24's text now
  references it). Task 3 removed from the plan; "Resolved by Task 3" paragraph,
  the shared-helper list, and the order paragraph updated.

Checks: `npx tsc -p test` and `npm run format:check` clean. The eleven §16 suite
files run together against the built product before and after the conversion
with the temporary sites hook (a declaration column added) and the sha256
capture hook: identical verdicts and diagnoses (P-1…P-5 fail diagnosed at the
same seeds, trials, and shrinks; P-6…P-13 pass; ~11 min per run), identical
capture logs (3655 writes each), and an "after" sites log with 0 "well-formed"
lines (2205 "per-draw", P-11's 36 "unchecked", P-12's 1 "unparseable") against
the "before" log's 2313 "well-formed" lines. Self project under the namespace:
22 files, 2339 passed, 0 skipped; certification 144 PASS / 33 FAIL / 0 error /
0 hang over the 23 lines; the S-9 self-test 199 tests over 173 records. Red
check: an unclosed tag spliced into `A_MDX` fails the "P-10 specs/A.mdx"
record as mode `mdx-derivability` in the self-test; restored. AGENTS.md: the
perDraw form per module, `mdxPathsOf`, the sites-hook recipe with its
declaration column, the combined-run timing, and the run facts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
….3.ts as staged-source records (Task 4, part 1)

S-9's timing clause for initial files (sixth-determination FIX_PLAN Task 4, the §1
modules; this part: `test/suite/registry/section-1.3.ts`). Eleven records:
the three structural arms of T1.3-2 (`StructuralArm.source`, composed in place
from `prefix + construct + suffix` by `structuralArm()`, the parts kept for
`byteWindow`), T1.3-3's arm (hoisted to `SKIPPED_LEVEL_ARM` — its body's first
workspace, converted with the arm table uniformly), T1.3-4's multi-segment arm
(first workspace, uniform) and its one-segment source, T1.3-5's cross-file pair,
and T1.3-6's three invalid-form arms (`InvalidIdFormArm.source`, composed by
`invalidIdFormArm()` from the bearer and the shared FORM_* parts).
`findingsOf` takes `string | StagedMdx`; T1.3-1's, T1.3-5's same-file, T1.3-6's
masking, and T1.3-7's sources stay plain (each body's first workspace).
S-9 self-test alone: 210 tests over 184 records; section-1.3.test: 7 passed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
… as staged-source records (Task 4, part 2)

S-9's timing clause for initial files (sixth-determination FIX_PLAN Task 4;
this part: `test/suite/registry/section-1.4.ts`). Thirty-eight records: the
template calls the bodies made per arm are evaluated once at module load, in
arm order, into fixture tables — `INVALID_SEGMENT_FIXTURES` (22, after T1.4-1's
template-control invocation), `VALID_TAG_FIXTURES` (4; the first is T1.4-4's
first workspace, the table converting uniformly), `INVALID_TAG_FIXTURES` (10) —
plus T1.4-1's nested empty segment and lone empty `id=""`. `StagedAssembled`
pairs an `Assembled` fixture with its record (`staged()`), `expectSingle144`
stages the record and asserts over `pinned`, `findingsOf` takes
`string | StagedMdx`. T1.4-1's template control, T1.4-2's and T1.4-3's sources
stay plain (each body's first workspace). S-9 self-test alone: 248 tests over
222 records; section-1.4.test: T1.4-1 and T1.4-4 fail diagnosed at the same
arms as before (the double-quote arm, exit code), T1.4-2 and T1.4-3 pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…ve Task 4 from the plan, record its resolutions (Task 4, part 3)

S-9's timing clause for initial files (sixth-determination FIX_PLAN Task 4, the
§1 modules; parts 1 and 2 converted section-1.3.ts and section-1.4.ts).
`section-1.6-1.7.ts`: three records wrapped in place — `EXTENDED_SOURCE`
(T1.6-1's extended workspace), T1.6-5's code-arm `VALID_SECTION_SOURCE`
(unreached behind the spec arm's diagnosed failure, judged by reading), and
`ENDPOINT_SPEC_SOURCE` (T1.7-1's endpoints workspace). `section-1.5.ts`: T1.5-2's
existing byte-path record, renamed "T1.5-2 the valid section source at every
arm's spec path", replaces its three `.source` fills (specs/a#b.mdx — the
body's first workspace —, specs/OK.mdx, specs/A<U+FFFD>.mdx). `section-1.1-1.2.ts`
needs nothing: every creation precedes its body's first invocation. Fifty-two
records over the task; sites converted, left plain, and deferred are listed in
the plan's "Resolved by Task 4" paragraph.

Checks: the sites hook logged the task's 11 (test, path) pairs (39 lines) before
and 0 lines after; the sha256 capture over the five §1 files identical (173
writes, compared sorted); 27 tests, 22 pass and 5 fail (T1.4-1, T1.4-4, T1.5-2,
T1.6-5, T1.7-2) with identical diagnoses; S-9 self-test alone 251 tests over
225 records; self project 22 files, 2391 passed, 0 skipped under the namespace;
certification 144 PASS / 33 FAIL / 0 error / 0 hang over 23 lines; tsc and
prettier clean. AGENTS.md gains the task's run facts and recipes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…as staged-source records (Task 5, part 1)

S-9's timing clause for initial files (sixth-determination FIX_PLAN Task 5, the
§2 modules): eighty-eight records. `section-2.1.ts` 28 — `VALID_BASE_FILES`'s
one `specs/BASE.mdx` record "T2.1-2/T2.1-3 specs/BASE.mdx" (spread into T2.1-2's
first workspace too), T2.1-2's four lexical importers computed once at load
(`LEXICAL_IMPORTER_FILES`), its eight invalid-specifier arms' `specs/A.mdx` and
the two `docs/EXTRA.mdx` entries (the code-group one's `export {};` derives as
an ESM block), T2.1-3's six invalid-binding arms (`invalidImportStagings(testId,
arms)` pairs each row of either table with its record; `runInvalidImportArm`
takes the pair), its two-names arm's BASE and A, its two duplicate-binding
arms' `specs/A.mdx` under `{ allowances: ["duplicate-import-binding"] }`
(`duplicateBindingArm(name, separator)` composes the row; the path leaves the
workspace declaration, and `withWorkspace`'s `mdx` parameter goes with its one
caller) beside one record each for B1 and B2, and T2.1-5's `SELF_IMPORT_SOURCE`.
`section-2.2-2.3.ts` 10 — T2.3-3's embedding and invalid-container forms through
`t233ArmStagings(kind, sectionId, forms)`, the body's `arm` label reproduced
exactly in each record's name. `section-2.4.ts` 20 — T2.4-2's seven forms
14.20 admits in `d` and in `text(...)` (`DYNAMIC_FORM_STAGINGS`, a union whose
well-formed member carries the two records and whose TypeScript-only member
the offset; `runDynamicFormArm` takes the record) beside
`DYNAMIC_ARM_BASE_RECORDS` made from the string map the exported stagings keep,
T2.4-3's two arity arms (`arityArm`), T2.4-4's `SEGMENT_EXACT_BASE`,
`T2_4_4_TEXT_SOURCE`, and `T2_4_4_POSITIVE_SOURCE`. `section-2.5-2.6.ts` 6 —
T2.5-3's five invalid values (`INVALID_COVERAGE_STAGINGS`) and T2.6-3's
`T2_6_3_SELECT_SOURCE`. `section-2.7.ts` 24 — T2.7-1's five foreign-construct
arms (`FOREIGN_CONSTRUCT_STAGINGS`), the three enclosed-construct arms through
`enclosedConstructArm(recordName, parts)` (T2.7-4's expression arm named for
T2.7-4), T2.7-3's fourteen invalid-prop arms (`INVALID_PROP_STAGINGS`), its
`REPEATED_UNKNOWN_SOURCE`, and `T2_7_3_DOUBLE_QUOTED`.

Left plain: every body's first workspace (T2.1-1, T2.1-4, T2.1-6, T2.2-1 through
T2.3-2, T2.4-1, T2.4-5, T2.5-1, T2.5-2, T2.6-1, T2.6-2, T2.7-2, T2.7-4's comment
forms, T2.1-2's `../` arm, T2.1-5's two-file arm, T2.5-3's required variant,
T2.6-3's rendering arm, T2.4-4's `d` arm); the first rows of converted tables
converted uniformly. Deferred to Task 22 (the `UnparseableStaging` exports and
the same construction in their home bodies): T2.3-3's `{text("a") text("b")}`,
T2.4-2's two TypeScript-only forms in both positions, T2.7-3's `{...a, b}`, and
T2.7-4's five unparseable comment arms — all plain, declared `unparseable`.
Unreached against the built product, judged by reading: T2.3-3's invalid arms
past the first and its unparseable staging, T2.4-2's arms past the first
TypeScript-only form, T2.7-3's repeated-unknown and quoting arms, T2.7-4's
expression and unparseable arms.

Checks: the sites hook reproduced the task's 11 reachable tests' 22 (test, path)
pairs (107 lines, 25 distinct with the declaration column) before and logged
exactly the two reached remainders after — T2.4-2's and T2.7-3's `specs/A.mdx`
`"unparseable"`; the sha256 capture over the five files (273 writes, compared
sorted) identical; 29 tests, 21 pass and 8 fail — T2.1-2, T2.3-3, T2.4-2,
T2.4-5, T2.5-3, T2.6-1, T2.7-3, T2.7-4 — with identical diagnoses and no
`undeclared-staging`; the S-9 self-test alone judges all 88 new records (339
tests over 313 records); tsc and prettier clean.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
… run facts (Task 5, part 2)

The §2 conversion (4d4f1c7) verified: the self project under the unprivileged
namespace 22 files, 2479 passed, 0 skipped (~137 s; 2391 + the 88 record
tests); certification 144 PASS / 33 FAIL / 0 error / 0 hang over the 23
`certification run against` lines (T2.6-1 and T2.6-2 in CONF-VALID's scope);
the S-9 self-test alone 339 tests over 313 records (306 `T…`, 4 `E-6`,
3 `P-…`); every distinct `HarnessAssertionError` line of the five §2 files'
verbose logs identical before and after (8 lines, T2.6-1's adapter-level
diagnosis included).

`specs/tmp/FIX_PLAN.md`: the "Resolved by Task 5" paragraph records the
sub-rules the task settled — a runner two tests drive over two arm tables gets
a staging-table function taking the test ID; a table mixing well-formed and
deferred-unparseable arms is a discriminated union; a string map an
`UnparseableStaging` export spreads keeps its string form with the record made
from it, the well-formed sibling beside a deferred unparseable staging
converting now; a module-level arm a test-ID-taking runner stages is named for
the test whose body stages it; the valueless-`tags` record's bytes equal the
exported fixture T11.4-3 stages (Task 18 reuses it) — and Task 5 is removed;
Task 6 is next. `AGENTS.md` gains the task's run facts and recipes (the
per-section S-9 filter as the fast post-conversion check; the in-process wait
on a background run).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…es as staged-source records (Task 6, part 1)

Twenty records over five modules (section-4.1-4.2.ts needs none: seven
tests, one workspace each, at body start), every entry's expression wrapped
in place or moved to module level unchanged:
- section-3.ts (2): T3-6's SCOPE_A_SOURCE / SCOPE_B_SOURCE - the variant
  loop stages both in each fresh workspace, the second and third after the
  first variant's build; the first variant's converted uniformly.
- section-4.ts (6): T4_2_BASE_FILES's specs/BASE.mdx (spread into all 35
  arm workspaces), COLOCATED_SPEC_SOURCE ("T4-2 src/NAME.mdx": the
  escape-spelled arm's extraFiles and the lexical positives), the two
  extraFiles .mdx entries wrapped in their arm rows (docs/EXTRA.mdx of the
  first arm - the body's first workspace - converted uniformly;
  specs/OTHER.mdx of the first duplicate-binding arm, unreached behind
  T4-2's failure at the escape-spelled arm, judged by reading),
  T4_5_FILES's specs/A.mdx and specs/B.mdx (every pairing/order arm past
  the first); withWorkspace's files and InvalidTsImportArm.extraFiles
  widened to InitialFileContents.
- section-4.3-4.4.ts (3): T4_3_2_SPEC_FILES's specs/A.mdx (the arm loop);
  T4_4_SPEC_FILES's two sources as "T4.4-1/T4.4-2 ..." (T4.4-1's facets
  2-4; facet 3 stages the B record at the invalid path specs/B#.mdx, which
  the record's name says; T4.4-2 stages both in its first workspace);
  helper widened.
- section-4.5.ts (8): AB_SPEC_FILES's specs/A.mdx as one record named with
  its five staging tests (T4.5-3's and T4.5-5's arm loops, T4.5-4's callee
  side; T4.5-6 and T4.5-7 stage it in their first workspace only); T4.5-2's
  upstream arm - T4_5_2_UPSTREAM_MAIN_SOURCE wrapped in place and
  T4_5_2_UPSTREAM_OTHER_V1 from the template call moved to module level;
  T4_5_8_AB_SOURCE, one record for the identical bytes T4.5-8 stages at
  specs/A.mdx (the same-scope arms) and specs/BASE.mdx (the spec-source
  arms); the two specs/COL.mdx layouts - stageSpecSourceCollision now
  returns source: StagedMdx carrying the duplicate-import-binding allowance
  and is called once at load from the computed table
  T4_5_8_SPEC_SOURCE_STAGINGS, assertSpecSourceCollision taking an
  { arm, staged } pair and the body iterating the table, so the helper's
  mdx parameter (and its WorkspaceMdxDecl import) went with its one caller;
  T4_5_9_FILES's specs/A.mdx and specs/B.mdx (every cell past the first).
- section-4.6.ts (1): T4_6_3_DECLARATION_SPEC_SOURCE (T4.6-3's second
  workspace; the flatMap over the arm table) wrapped in place; helper
  widened.
Left plain: every body's first workspace - T3-1..T3-5, T3-7, T4-1, T4-3,
T4-4, T4.3-1, T4.5-1's PRINT_SPEC_SOURCE (also T4.5-2's first workspace),
T4.6-1, T4.6-2, T4.6-4. Not converted, recorded in the plan: T4-2's
above-root arm's outside/NAME.mdx, written at the root's parent by
support.ts's stageBesideRoot (a raw writeFile, no builder path).

Checks: the sites hook logged the task's 10 (test, path) pairs (36 lines,
all "well-formed") before the conversion and nothing after; the sha256
capture over the six suite files (235 writes, compared sorted) identical;
36 tests, 28 pass and 8 fail - T3-7, T4-2, T4-5, T4.4-1, T4.5-8, T4.5-9,
T4.6-1, T4.6-3 - with identical diagnoses; the S-9 self-test 359 tests
over 333 records; self project 22 files, 2499 passed under the namespace;
certification 144 PASS / 33 FAIL / 0 error / 0 hang; tsc and prettier
clean. Red check: an unclosed tag spliced into T4_5_8_MDX_BODY_PREFIX
fails both specs/COL.mdx records as mdx-derivability.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
… run facts (Task 6, part 2)

The plan's preamble gains "Resolved by Task 6": the twenty records by module,
the sub-rules the task settled (a record staged at a second path is named
for both — T4.4-1's specs/B#.mdx; a shared map's record carries every
caller's ID even where a caller stages it in its first workspace only —
AB_SPEC_FILES's five tests; identical bytes one test stages at two paths are
one record — T4_5_8_AB_SOURCE; a per-arm staging function composing an .mdx
source from parts returns source: StagedMdx and is called once at load from
a computed table, the allowance leaving the workspace declaration with the
helper's mdx parameter — T4.5-8's specs/COL.mdx), the sites left plain, the
observation that T4-2's outside/NAME.mdx is written at the root's parent by
support.ts's stageBesideRoot through no builder path (recorded, not
converted: a helper change the plan does not schedule), the checks, and the
known state after the task: the S-9 self-test 359 tests over 333 records,
self project 22 files, 2499 passed, certification 144/33/0/0. Task 7 is now
the first remaining task. AGENTS.md records the six-file run's shape and
timings, the re-runnable hooks patch, the lazily created P4_SITES log, the
duration-free verdict comparison, and the red check of a computed-table
staging function's records.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…as staged-source records (Task 7, part 1)

Eighteen records over four modules (section-5.6.ts needs none: each of its
six bodies creates one workspace at body start and stages its edits between
gitCommitAll("baseline") and its first build), every entry's expression
wrapped in place or paired with its record at module level, never re-spelled:
- section-5.1-5.3.ts (7): T5.3-1's arm table - every arm past the first
  creates its workspace after the first arm's `check`; the `.mdx` entries
  wrapped in their rows (the cross-file arm's specs/A.mdx and specs/B.mdx,
  the mixed, self-depends, self-embeds, and two grandparent arms'
  specs/A.mdx), the first arm's converted uniformly; CycleArm.files and
  withWorkspace's files widened to InitialFileContents. T5.2-1 and T5.3-2
  create one workspace each before invoking: plain.
- section-5.4.ts (2): T5.4-1's fixture 2 baseline (JOURNALED_BASELINE,
  created after fixture 1's invocations) and T5.4-2's move fixture
  (MOVE_A_SOURCE, after the rename fixture's) wrapped in place; helper
  widened. The first fixtures (REINTRO_BASELINE, SPELLING_A/B_SOURCE) and
  the anchored edit() sites stay as they are.
- section-5.5.ts (1): T5.5-2's kind-arm baseline (KIND_BASELINE, the second
  workspace) wrapped in place; helper widened. T5.5-1's two H-6 directories
  are both created before either run (assertAcrossDirectoriesDeterministic
  calls makeWorkspace twice, then runs), so RICH_FILES stays plain, as do
  T5.5-3's, T5.5-4's, T5.5-5's, and T5.5-6's single workspaces.
- section-5.7.ts (8): T5.7-2's token-bound arms - assertTokenBoundArm's
  per-arm workspace follows the span workspace's build, so TOKEN_BASE_SOURCE
  is a record and the five composed specs/MAIN.mdx sources are the computed
  table TOKEN_BOUND_STAGINGS (tokenBoundSource evaluated once at load per
  arm; { arm, source, main } - the string kept for the byte-range
  self-check, the record made from it), the helper taking the pair and the
  body iterating the table; T5.7-4's collision workspace
  (assertCollisionClassesRecordNothing, after the entry workspace's
  invocations) - COLLISION_A_SOURCE and COLLISION_B_SOURCE wrapped in place.
  T5.7-1's, T5.7-2's span, T5.7-3's, and T5.7-4's entry workspaces are
  first workspaces: plain.
Every record is well-formed: the five token-bound d forms (U+00A0, U+FEFF,
block comment, line comment, run-on line comment) derive under the stock
parser (probed with deriveMdx before conversion), so no allowance is named.

Checks: the sites hook logged the task's 8 (test, path) pairs (20 lines, all
"well-formed": T5.3-1 x5, T5.4-1, T5.4-2, T5.5-2, T5.7-2 BASE x5 and MAIN x5,
T5.7-4 A and B) before the conversion and nothing after; the sha256 capture
over the five suite files (154 writes, compared sorted) identical; 21 tests,
19 pass and 2 fail - T5.5-5, T5.7-4 - with identical diagnoses; the S-9
self-test filtered to T5. judges all 18 new records (53 passed of 377);
tsc and prettier clean. Red check: an unclosed tag spliced into
TOKEN_TAG_POST fails the five specs/MAIN.mdx records as mdx-derivability
while the BASE record passes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
… run facts (Task 7, part 2)

The plan's "Resolved by Task 7" paragraph records the eighteen records, the
shapes met (T5.3-1's arm rows, T5.4-1's and T5.4-2's second fixtures,
T5.5-2's kind-arm baseline, T5.7-2's computed { arm, source, main } table
with the string kept for the byte-range self-check, T5.7-4's collision
helper), the sub-rule that a composed source is probed with deriveMdx
before conversion when the product's grammar widenings might mask a stock
parser rejection (all five token-bound d forms derive; no allowance), the
first workspaces left plain (T5.5-1's two H-6 directories both precede
either run), and the checks. AGENTS.md gains the §5 run facts, the probe
recipe, the broader diagnosis extraction for an adapter-labelled failure
line (T5.5-5), the pair-table pattern, and the TOKEN_TAG_POST red check.
Known state: the S-9 self-test 377 tests over 351 records; self project 22
files, 2517 passed under the namespace; certification 144 PASS / 33 FAIL /
0 error / 0 hang.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
… files as staged-source records (Task 8, part 1)

FIX_PLAN (fourth plan) Task 8: every `.mdx` entry of a workspace a §6.1–§6.3
body creates after its first product invocation becomes a ledger record passed
in the declaration's `files` (TEST-SPEC S-9's before-any-product clause), the
same expression wrapped in place or moved to module level — 30 records, staged
bytes identical.

section-6.1.ts (2): `CORE_FILES`'s `specs/A.mdx` and `specs/B.mdx` wrapped in
place, named with every calling test (`"T6.1-1/T6.1-2/T6.1-3 …"`): T6.1-3's
directory- and symlink-occupant arms follow its garbage-line arm's
invocations; T6.1-1's sweep workspace and T6.1-2's two directories precede
any invocation (T6.1-2 creates both before its first `rename`). The map's
type widened to `InitialFileContents`.

section-6.2.ts (23): T6.2-3's impure-boundary arm — `T6_2_3_ROOM` made from
the exported `I3_ROOM_SOURCE` (the S-9 fixture self-test imports the string),
`I3_HALL_SOURCE` and `I3_DEPS_SOURCE` wrapped in place; the impure matrix —
the origin composition `foo <S id="m">…</S>…` moved from `runImpureStaging`
into the computed table `M3_ORIGIN_STAGINGS` (`{ shape, origin }`, one record
per shape evaluated once at load in shape order, staged at both
destinations; the helper takes the pair, the body iterates the table),
`ImpureDestination.source` a record wrapped in place in both rows,
`M3_DEPS_SOURCE` wrapped in place; the sibling stagings (d)/(e) — the six
`D3_*`/`E3_*` sources wrapped in place. T6.2-4 — `F1_SOURCE`, `F2_SOURCE`,
`F3_SOURCE` wrapped in place (`PureFinalPositionStaging.source: StagedMdx`),
the dependents' template calls `p4DepsSource(staging.idPre, "moved node")`
moved into the computed table `PURE_FINAL_POSITION_RUNS` (`{ staging, deps }`;
the runner takes the pair), the twin's `p4DepsSource("p", "coincident
parent")` moved to the module-level `T6_2_4_TWIN_DEPS` (the post-move byte
assertion reads `.source`). Shape (1)'s workspace, the body's first, is
converted uniformly with shape (2). `withWorkspace`'s `files` widened.
Left plain: T6.2-1's and T6.2-2's one workspace each (their bodies' only
creations, at body start — nothing behind their diagnosed failures) and
T6.2-3's clean-boundary arm (the body's first workspace).

section-6.3.ts (5 new, 1 reused): `J2_SOURCE` wrapped in place (T6.3-2's
second arm; the first converted uniformly); `F4_SOURCE` (T6.3-4's four later
arms; the first uniformly), `F4_BROKEN_SOURCE` carrying `"unparseable"` — the
workspace declaration `{ unparseable: [F4_BROKEN_FILE] }` left with it, so
`withWorkspace`'s `mdx` parameter and the `WorkspaceMdxDecl` import went with
their one caller — and `F4_INVALID_SOURCE` (the precedence arm; parseable,
14.5 invalid) wrapped in place; T6.3-5's `r5Source(R5_TEXT_V0, false)` is the
bytes of the existing inner-v1 record, reused at the four initial-file sites
((a) and (d) `sub/specs/A.mdx`, the submodule arm's `inner/specs/A.mdx`, (c)
`specs/A.mdx`) and renamed for every site it serves (`T6_3_5_WITHOUT_EXTRA`);
`r5Source(R5_TEXT_V0, true)` at the nested-repository arm's `inner/specs/A.mdx`
is the new `T6_3_5_WITH_EXTRA`. Left plain: T6.3-1's and T6.3-3's one
workspace each; arm (a)'s pre-invocation `file()` edit.

Checks: `npx tsc -p test`; `npm run format:check`; the S-9 ledger self-test
filtered to `T6\.[123]-` judges 33 records (30 new + 3 existing); the sites
hook logged the task's 19 (test, path) pairs (57 lines: 56 `"well-formed"`,
T6.3-4's `specs/Broken.mdx` `"unparseable"`) before and nothing after (no log
file); the sha256 capture over the three suite files (133 writes, compared
sorted) identical; 12 tests, 10 pass and 2 fail — T6.2-1, T6.2-2 — with
identical diagnoses; red check: `<S>` for the origin template's `</S>` fails
the five `specs/ca.mdx` records as `mdx-derivability` while the target and
Deps records pass (5 failed, 3 passed).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
… run facts (Task 8, part 2)

FIX_PLAN.md: Task 8 removed (the first remaining task is Task 9); a "Resolved
by Task 8" paragraph records the 30 records, the sub-rules applied (a per-cell
helper's composition from a module-level row as a computed table keyed by the
row; a single-use runner's compared template call as a module-level record
read through `.source`; a workspace `mdx.unparseable` entry becoming the
record's declaration, the orphaned `mdx` parameter going with it; an existing
record reused and renamed — identifier included — for every site it serves),
the read-based enumeration behind T6.2-1/T6.2-2, the sites left plain, the
checks, and the known state after the task.

AGENTS.md: the Task 8 bullet — the three-file run's timing and write count,
the computed-table conversion and its red check, the unparseable-entry rule,
the regex filter for a section's ledger records, the verbose reporter's
verdict-line comparison, and the run facts: the S-9 self-test 407 tests over
381 records (374 `T…`, 4 `E-6`, 3 `P-…`); self project 22 files, 2547 passed,
0 skipped under the unprivileged namespace (~138 s); certification 144 PASS /
33 FAIL / 0 error / 0 hang over the 23 `certification run against` lines.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…tial files as staged-source records (Task 9, part 1)

Nineteen records. section-6.4.ts 17: T6.4-2's two staging maps hoisted to
module level as T6_4_2_L_FILES / T6_4_2_M_FILES (the `.mdx` entries records
named "T6.4-2 arms 1 and 2 <path>" / "T6.4-2 arms 3 and 4 <path>" — the same
coreL/refsL/coreM/refsM calls and OTHER_MDX_L/OTHER_MDX_M, moved; the `.ts`
entries plain; arm 1's workspace, the body's first, converted uniformly;
runMinimalEditArm's `sources` widened, its untouched-file compare reading a
record's bytes through `.source`); RENAME_REFUSAL_FILES's two entries as
records made from V3_SOURCE and TWO_BEARER_COLLISION_SOURCE (both kept as
strings for the location windows), named "T6.4-3/T6.6-3/T14-7 specs/A.mdx" /
"… specs/B.mdx" — T6.4-3 stages the set again for its configuration-state
twins after its premise build (behind its diagnosed failure at the first
refusal case; judged by reading), T6.6-3 and T14-7 in their first workspaces;
the seven U4_* sources wrapped in place — "T6.4-4/T6.6-3 specs/A.mdx",
"… specs/Bad.mdx", "… docs/Stray.mdx", "… specs/Solo.mdx" (the exported
RENAME_USAGE_ORDERING_FILES / RENAME_SOLO_FILES sets T6.6-3 stages too, their
types widened), "T6.4-4 masking arm specs/Broken.mdx" carrying "unparseable"
(the workspace declaration `{ unparseable: [U4_BROKEN_FILE] }` removed, and
with it withWorkspace's orphaned `mdx` parameter and the WorkspaceMdxDecl
import), "T6.4-4 duplicate-spellings arm specs/Dup.mdx", "T6.4-4
undefined-ancestor arm specs/Anc.mdx" (the base arm's workspace, the body's
first, converted uniformly); T5_CORE_SOURCE / T5_TARGET_SOURCE wrapped in
place as "T6.4-5 specs/Core.mdx" / "T6.4-5 specs/Target.mdx" (the move arm's
twins follow the rename arm; the rename arm's workspace converted uniformly).
section-6.7.ts 2: the validation arm's initial origin
(originSource("b.mid", "b.mid").text) and stale watcher (staleWatch.text, its
prefix/construct kept for the byte window) as T6_7_1_INITIAL_ORIGIN /
T6_7_1_STALE_WATCH. section-6.6.ts: its withWorkspace's `files` widened to
InitialFileContents — the consumer of the three exported sets; a type-only
touch, its own conversion staying Task 12's.

Left plain: T6.4-1's, T6.4-6's, and T6.4-7's workspaces (each the body's
first; T6.4-7's fresh twin holds no initial files — copyFrom seedings of
product-written bytes) and T6.7-1's impact arm (gitInit/gitCommitAll invoke
no product; its first build follows). Read-based enumeration: the 17
creation sites of section-6.4.ts and the 3 of section-6.7.ts judged;
T6.4-3's twins the one unreached site.

Checks: the sites hook logged 23 lines (14 distinct (test, path) pairs — the
task's list; specs/Broken.mdx "unparseable", the rest "well-formed") before
and no file after; the sha256 capture over both suite files (81 writes,
compared sorted) identical; 8 tests, 7 pass and 1 fail — T6.4-3 — with an
identical diagnosis; the S-9 self-test judges the 19 new records (24 under
the §6.4/§6.7 filter); red check: an unclosed tag spliced into
T5_TARGET_SOURCE fails "T6.4-5 specs/Target.mdx" as mdx-derivability while
the Core record passes; tsc and prettier clean.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
… run facts (Task 9, part 2)

FIX_PLAN.md: Task 9 removed (Task 10 is next); the preamble gains "Resolved
by Task 9" — the 19 records by module, the sub-rules applied (an exported
string set consumed by another module's string-typed helper converts in
place with the consumer's parameter widened; a runner's compared staging map
hoists to a module-level record-bearing map read through `.source`; a
byte-identical source in a later task's module is left to that task, which
reuses the record by export), what stays plain, the checks, and the known
state after the task. Task 10's note records that section-6.5.ts's
U5_BAD_SOURCE equals the "T6.4-4/T6.6-3 specs/Bad.mdx" record byte for byte;
Task 12's note that section-6.6.ts's withWorkspace is already widened and the
three rename sets it imports are already records named with T6.6-3; Task
23's note that RENAME_REFUSAL_FILES already stages records named with T14-7.

AGENTS.md: the Task 9 bullet — the two suite files' run time and write
count, the `.source` read in runMinimalEditArm, the consumer-widening form,
the `-t 'T6\.(4|7)-'` ledger filter, the red-check recipe, and the run facts
(S-9 self-test 426 tests over 400 records; self project 22 files, 2566
passed under the namespace; certification 144/33/0/0 over 23 lines).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…s as staged-source records (Task 10, part 1)

Forty-nine records in section-6.5.ts, seven of section-6.4.ts's reused.
T6.5-1 7: `fileMoveArm` composes each geometry's sources as before and
registers the `.mdx` ones through the memoizing `t651Record` (a
module-level Map; the record named for its composition inputs — "T6.5-1
the moved file importing <own imports> and embedding <binding>", "T6.5-1
the spec importer importing <specifier>" — and reused where a later
geometry composes the same bytes: arms (a) and (c) share the moved file,
(a) and (d) the importer, so identical bytes are ONE record staged at each
site), C_SOURCE wrapped in place as "T6.5-1 every arm's other file
specs/C.mdx (specs/w/C.mdx in arm (c))"; arm (a)'s workspace, the body's
first, converted uniformly (its preview copy follows the build anyway);
`rewrites[].source` keeps the strings for the byte contract.
T6.5-2 10: X2_ORIGIN_BEFORE and X2_INLINE_ORIGIN_BEFORE wrapped in place,
the self-closing arm's origin and the G, C, D, E, P sources wrapped in
their rows, the Beta holder two arms spell identically hoisted to
X2_B_HOLDER (one record), X2_ZED_STAGED made from X2_ZED_SOURCE (the string
kept for the bystander compare); the first arm's workspace converted
uniformly. T6.5-3 6: R3_FILES's four sources and the two third-file
sources wrapped in place, `runThirdFileArm`'s `source` typed StagedMdx
(the determinism directories are both created before the first run; the
third-file arms follow). T6.5-4 5: V4_A_STAGED / V4_B_STAGED made from the
strings the location windows use, V4_OCC_SOURCE, V4_OTHER_VALID, and
V4_SOLO_SOURCE wrapped in place — "T6.5-4/T6.6-3/T14-7 specs/A.mdx",
"… specs/B.mdx", "… docs/Occ.mdx", "… derived-path arms specs/Solo.mdx",
"T6.5-4/T6.6-3 precondition arm specs/Other.mdx as staged (valid)" (the
five exported sets T6.6-3 stages after its first invocation, T14-7 two of
them; MOVE_REFUSAL_FILES is T6.5-4's first workspace, converted
uniformly). T6.5-5 1 new, 7 reused: the U5 sources mirror T6.4-4's byte
for byte, so section-6.4.ts exports its U4_* records, renamed
"T6.4-4/T6.5-5/T6.6-3 specs/A.mdx", "… specs/Bad.mdx", "… docs/Stray.mdx",
"… specs/Solo.mdx", "T6.4-4/T6.5-5 masking arm specs/Broken.mdx"
(unparseable), "T6.4-4/T6.5-5 duplicate-spellings arm specs/Dup.mdx",
"T6.4-4/T6.5-5 undefined-ancestor arm specs/Anc.mdx", and section-6.5.ts
aliases them (U5_A_SOURCE = U4_SOURCE, …) rather than registering the
bytes twice; U5_B_SOURCE wrapped in place as "T6.5-5/T6.6-3 specs/B.mdx";
the masking arm's workspace declaration `{ unparseable: [U5_BROKEN] }`
removed with withWorkspace's orphaned `mdx` parameter and the
WorkspaceMdxDecl import (the base arm's workspace, the body's first,
converted uniformly). T6.6-3 2: MOVE_IDENTITY_FILES_AFTER — T6.5-6's
post-move state, which T6.6-3 alone stages, after its first invocation —
"T6.6-3 identity-terms twins specs/A.mdx" / "… specs/B.mdx" made from the
strings T6.5-6 asserts. T6.5-8 6 (behind its diagnosed failure at the TS
arm, judged by reading): A8_TS_ORIGIN_BEFORE, A8_PLAIN_TARGET ("T6.5-8/
T6.5-9 …", shared with A9_FILES), A8_ORG_ORIGIN_BEFORE,
A8_TGT_ORIGIN_BEFORE, A8_TGT_TARGET_BEFORE wrapped in place, A8_KEEP_STAGED
made from A8_KEEP_SOURCE (kept for the composed-file compare). T6.5-9 4
(behind its failure): the spec-source arm's S9_S_STAGED / S9_TEXT_STAGED
made from the strings the untouched-file compare uses, S9_ORIGIN_BEFORE
and S9_TARGET_BEFORE wrapped in place. T6.5-10 8 (behind its failure at
arm (a)): C10_THIRD_STAGED, C10_A_ORIGIN_STAGED, C10_FOURTH_STAGED made
from the strings the compares and occurrence spans use, C10_A_TARGET_BEFORE,
C10_B_ORIGIN_BEFORE, C10_B_TARGET_BEFORE, C10_C_TARGET_BEFORE,
C10_CS_TARGET_BEFORE wrapped in place. Every string-typed files map and arm
`files` field widened to InitialFileContents.

Left plain: T6.5-6's and T6.5-7's workspaces (each the body's only one);
the `copyFrom` seedings of T6.5-1's and T6.5-3's fresh directories; every
`.ts`, `.xspec.ts`, and `mdout/new` entry. Read-based enumeration: the 29
creation sites judged; T6.5-8's MDX arms, T6.5-9's spec-source arm, and
T6.5-10's arms (b), (c), (c)-sibling are the unreached post-invocation
sites.

Checks: the sites hook logged 74 lines (32 distinct (test, path) pairs —
the task's list; T6.5-5's specs/Broken.mdx "unparseable", the rest
"well-formed") before and no file after; the sha256 capture over the suite
file (172 writes) identical; 10 tests, 5 pass and 5 fail — T6.5-6, T6.5-7,
T6.5-8, T6.5-9, T6.5-10 — with identical diagnoses; the S-9 self-test
judges the 49 new records (72 under the §6.4–§6.6 filter); red check: an
unclosed tag spliced into movedFileSource's "A holder text." fails the
three moved-file records as mdx-derivability while the other file and the
three importers pass; tsc and prettier clean.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…d run facts (Task 10, part 2)

FIX_PLAN.md: Task 10 (the §6.5 module) removed; the "Resolved by Task 10"
paragraph records the 49 records (7 of section-6.4.ts's reused, exported and
renamed with T6.5-5), the sub-rules applied — a helper composing a row's
sources from a geometry where several rows compose identical bytes
registers them through a memoizing module-level record function named for
exactly the composition inputs (one record per byte sequence, staged at
every site); a constant byte-identical to another registry module's record
is reused by exporting, renaming, and aliasing that record, never
re-spelled; an exported set only another module stages post-invocation
(MOVE_IDENTITY_FILES_AFTER) converts in the exporting module, named with
the staging test alone — the sites left plain, the read-based enumeration,
the checks, and the known state (S-9 self-test 475 tests over 449 records;
self project 22 files, 2615 passed; certification 144/33/0/0). Task 12's
note records that the eight sets section-6.6.ts imports from section-6.5.ts
are converted (T6.6-3's listed paths are theirs); Task 23's that T14-7's
second and third workspaces stage records already.

AGENTS.md: the Task 10 bullet (the suite file's ~55 s run, the memoizing
record-function and the export-rename-alias forms, the ledger filter, the
red check, the run facts).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…ion initial files as staged-source records (Task 11, part 1)

Eighty-three records. section-6.5-ii.ts 2: ORIGIN_BEFORE / TARGET_BEFORE
wrapped in place ("T6.5-11 specs/origin.mdx", "… specs/target.mdx") — every
arm stages them through armFiles, the first arm's workspace converted
uniformly; withWorkspace's and armFiles's maps widened.

section-6.5-iii.ts 81. T6.5-12 3: R12_ORIGIN_BEFORE wrapped in place,
R12Arm.targetBefore typed StagedMdx and wrapped in each row (named by the
row's name; the first arm converted uniformly). T6.5-14 2: the declarations
arm's F14_DECL_ORIGIN_BEFORE wrapped in place, F14_THIRD_STAGED made from
F14_THIRD_SOURCE (kept for the untouched-file compare). T6.5-13 22:
a13CrossArm's `target` typed StagedMdx, the shared origin and third module
A13_ORIGIN_STAGED / A13_THIRD_STAGED, the per-arm targets and origins
*_STAGED records made from their strings (kept for the preview-edit
offsets) or wrapped in place where nothing else reads them
(A13_G_ORIGIN_BEFORE, A13_K_ORIGIN_BEFORE), a13ParagraphHeadedArm
registering its composed target ("T6.5-13 arm (l) specs/b.mdx", "… (l,
indented) …"), A13_DEPENDENT_STAGED for (h) and (j); the table's first arm
converted uniformly. T6.5-19 2: A19_A_STAGED, A19_B_ORIGIN_STAGED. T6.5-15
11: the computed table J15_STAGINGS ({ arm, staging, origin, target };
j15Compose once at load; the vectors and the runner read it, the body
iterates it) and J15_MODULES as a record map (j15Module the kept generator;
j15SharedModule holds A and B to T6.5-13's third and fourth records at
load; "T6.5-15 specs/C.mdx …" its own). T6.5-16 37: R16_FLOW_ORIGIN_STAGED,
R16_TEXT_PARENT_STAGED; r16ArmA / r16ArmB register their origins with the
hoisted arm key in the name; R16MovedShape.staged and R16Parent.staged
computed in place (r16MovedShape(ids, name, origin, moved, staged?) — a
passed record is held to the composition's bytes at load; the parents'
sources hoisted to constants); the (d) family's origins through the
memoizing r16DOrigin(remainder) (the list-marker origin is the
missing-parent arm's too); the (e), (f), (g), (h), (i), collision,
insertion, and created-target sources wrapped in place or registered in
their rows; r16ArmGTop's `target` typed StagedMdx. T6.5-17 4: the origins
of M17_A_FILES, (b), (c), and the control.

Byte-identical sources across tests and paths are ONE record named with
every staging test in ID order and every path: the third module `a`
(A13_THIRD_SOURCE = the former R16_G_THIRD_SOURCE = M17_X_SOURCE =
T6.5-15's specs/A.mdx) is "T6.5-13/T6.5-15/T6.5-16/T6.5-17/T6.5-19/T6.6-3/
T6.6-4/T14-7 the module holding a alone (specs/x.mdx; T6.5-15's
specs/A.mdx)"; likewise the fourth module `b`, the existing target `k`
(A13_EXISTING_TARGET = R16_K), the (a) target (A13_A_TARGET =
M17_TARGET_SOURCE = R16_G_CONTROL_TARGET), and (d)'s `para` / `para\n`
(T6.5-16's top-level (g) twin's targets); the consumer constants are
aliased (const R16_K = A13_EXISTING_TARGET; M17_X_STAGED =
A13_THIRD_STAGED; …) or deleted, never re-spelled. Every record's ID list
carries every test that stages it: T6.6-3 restages R16_REFUSED_ARMS,
R16_ALONE_ARMS, and M17_REFUSED_ARMS after its first workspace, T6.6-4 the
four A13_TIE_BREAK_ARMS in its arm (e), T14-7 every R16_REFUSED_ARMS arm
but the refused-id-collision one and every M17_REFUSED_ARMS arm — so the
collision arm's target is "T6.5-16/T6.6-3 …" and the controls "T6.5-16 …".
Six interfaces' `files` and withWorkspace widened to InitialFileContents;
the S-9 vectors read a record's text through the module-local
stagedText(), so s9-fixture-well-formedness.test.ts's imports are
untouched. section-6.6.ts (its own conversion stays Task 12's):
expectRefusedArmPreviewTwin's `files` widened and tieBreakPlan reads the
tie-break arm's origin through StagedMdx (one value import).

Left plain: T6.5-14's local arm and T6.5-18's workspace (each the body's
first); every .ts and xspec.config.ts entry. Read-based enumeration: the 3
withWorkspace sites of section-6.5-ii.ts and the 12 of section-6.5-iii.ts
judged; behind their diagnosed failures at the first arm — T6.5-11,
T6.5-13, T6.5-15, T6.5-16, T6.5-17, T6.5-19 — every later arm's site is
unreached.

Checks: the sites hook logged the task's 4 (test, path) pairs (T6.5-12
specs/a.mdx, specs/b.mdx; T6.5-14 specs/a.mdx, specs/x.mdx; all
"well-formed") before and no file after; the sha256 capture over the two
suite files (40 writes, compared sorted) identical; 9 tests, 2 pass and 7
fail — T6.5-11, T6.5-13, T6.5-15, T6.5-16, T6.5-17, T6.5-18, T6.5-19 —
with identical diagnoses; tsc and prettier clean.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…d run facts (Task 11, part 2)

FIX_PLAN.md: the "Resolved by Task 11" paragraph (the 83 records by test,
the cross-test/cross-path one-record rule with every staging test's ID,
the restaging tests carried in the names — T6.6-3, T6.6-4, T14-7 — the
value-level touch of section-6.6.ts, the sites left plain, the checks);
Task 12's note (the R16/M17/A13 tie-break sets it imports are records
already; expectRefusedArmPreviewTwin widened and tieBreakPlan reading
through StagedMdx) and Task 23's (T14-7's R16/M17 restagings are records
named with it); Task 11 removed. AGENTS.md: the run facts and recipes —
the two suite files together in ~21 s (9 tests, 7 diagnosed failures at
their first arms, 40 writes), the one-record-across-tests-and-paths form
with the aliased consumer constants, the load-time byte checks
(j15SharedModule, r16MovedShape), the `.source` read in a consumer and
the stagedText() vectors, the ledger filter `-t 'T6\.5-1[1-9]'` (87
tests, ~6 s). Known state: the S-9 self-test 558 tests over 532 records
(525 T…, 4 E-6, 3 P-…); self project 22 files, 2698 passed, 0 skipped
under the namespace (~141 s); certification 144 PASS / 33 FAIL / 0 error /
0 hang over the 23 `certification run against` lines; red check: an
unclosed `<S>` spliced into a13MovedLines fails exactly the cross-file
origin record as mdx-derivability (1 failed, 25 passed under -t 'T6\.5-13').

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…s as staged-source records (Task 12, part 1)

Every `.mdx` entry of a workspace `section-6.6.ts` creates after its
body's first product invocation is now a ledger record passed in the
declaration's `files` (TEST-SPEC §17 S-9's before-any-product clause;
FIX_PLAN Task 12). T6.6-2's move arm: `P2_ORIGIN_SOURCE` wrapped in place
("T6.6-2 move arm specs/Origin.mdx"); its target holds the bytes T6.5-8
and T6.5-9 stage at the same path, so section-6.5.ts's `A8_PLAIN_TARGET`
is exported, renamed "T6.5-8/T6.5-9/T6.6-2/T6.6-6 specs/Target.mdx (the
plain target)", and aliased here as `P2_TARGET_SOURCE` and — T6.6-6's
first workspace staging the same bytes — `R6_TARGET_SOURCE` (the
spellings deleted, never re-spelled; Task 10's export-alias rule).
T6.6-4's arm (b): `B4_ORIGIN_STAGED`, `B4_TARGET_STAGED`,
`B4_THIRD_STAGED`, made from the strings `armBPlan` and the real-run byte
assertion keep. Arm (c) and both of T6.6-5's file-form arms:
`C4_MV_STAGED`, `C4_PAL_STAGED` (the expression moved from
`C4_PAL_SOURCE`), `C4_USER_STAGED` ("T6.6-4/T6.6-5 …"; T6.6-5's first
workspace converted uniformly). Arm (d) and T6.6-5's created-target arm:
`D4_SOLO_STAGED`. Arm (e)'s `A13_TIE_BREAK_ARMS` and every set T6.6-3
stages were records already (Tasks 9–11). Left plain: T6.6-2's rename
arm, T6.6-4's arm (a), and T6.6-6's origin (each its body's first
workspace). Unreached, judged by reading: T6.6-3's scheduling workspace
(`TestWorkspace.create(CORE_DECL)`, behind its diagnosed failure at the
identity-terms arm) stages section-13.5.ts's exported `CORE_DECL`, whose
`specs/A.mdx` converts in that module (Task 21), named with T6.6-3 too.

Checks: the sites hook logged the task's 13 (test, path) lines before
(all "well-formed"; T6.6-3 logged nothing, its sets being records) and
no file after; the sha256 capture over the suite file (60 writes)
identical; 5 tests — T6.6-2, T6.6-5, T6.6-6 pass, T6.6-3 and T6.6-4 fail
with identical diagnoses (~47 s a run); the ledger self-test 566 tests
(8 new records); red check: an unclosed `mv` tag fails the
`specs/Mv.mdx` record as `mdx-derivability` while the other 69 pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…d run facts (Task 12, part 2)

Task 12 (the §6.6 module's post-invocation initial files as staged-source
records) is done at e921f44: this commit removes it from
specs/tmp/FIX_PLAN.md, adds its "Resolved by Task 12" paragraph to the
preamble (the eight records; section-6.5.ts's `A8_PLAIN_TARGET` exported,
renamed, and reused by alias for T6.6-2's and T6.6-6's target; the sites
left plain; the read-based enumeration; the checks and the known state),
notes under Task 21 that section-13.5.ts's exported `CORE_DECL` is also
staged by T6.6-3's scheduling workspace after its first invocation — so
its `specs/A.mdx` record's name carries T6.6-3 beside the §13.5 tests —
and records the task's run facts in AGENTS.md. Known state: the S-9
self-test 566 tests over 540 records (533 `T…`, 4 `E-6`, 3 `P-…`); self
project 22 files, 2706 passed, 0 skipped under the unprivileged
namespace (~137 s); certification 144 PASS / 33 FAIL / 0 error / 0 hang
over the 23 `certification run against` lines; section-6.6.test 5 tests,
T6.6-3 and T6.6-4 the diagnosed failures with unchanged diagnoses. The
first remaining task is Task 13.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…' post-invocation initial files as staged-source records (Task 13, part 1)

FIX_PLAN Task 13 (fourth plan), part 1 of 2: every `.mdx` entry of a
workspace a body of `section-7-basics.ts`, `section-7-discovery.ts`, or
`section-7.1-7.3.ts` creates after its first product invocation is a
ledger record (helpers/staged-mdx.ts), judged by
test/self/s9-staged-sources.test.ts before any product exists. Seventeen
records; byte identity and every verdict unchanged.

The shared records (byte-identical sources across the three modules are
ONE record, Task 11's sub-rule (i), exported from the first module in
registry order and imported by the others — Task 10's sub-rule (ii)):
`section-7-basics.ts` exports `SECTION_A_SOURCE` (`mdxSection("a")`,
"T7-1/T7-2/T7-3/T7-4/T7-6/T7.1-1/T7.3-1 specs/A.mdx (the minimal section
a)") and `SECTION_B_SOURCE` (`mdxSection("b")`, "T7-3/T7-4/T7-6/T7.3-1 the
minimal section b (specs/sub/B.mdx; T7-4's specs2/B.mdx)").

section-7-basics.ts (15 creation sites judged; 5 records): converted —
`expectConfigRefused`'s one staging site (serving every T7-2/T7-3 arm, the
first included), T7-1's no-configuration workspace and `OCCUPANCY_WORKSPACE`,
T7-2's aliased, verbatim-glob, verbatim-group-name, and comment-twin
workspaces (all `SECTION_A_SOURCE`), T7-2's `QUOTED_KEYS_FILES` ("T7-2
string-literal keys specs/A.mdx", wrapped in place, the map widened), T7-3's
(b)–(d) (`SECTION_A_SOURCE`, (c) also `SECTION_B_SOURCE`) and (e)/(f)'s
`VIOLATING_EDGE_FILES` (`PRODUCT_MDX` "T7-3 specs/product/P.mdx" and
`OTHER_MDX` "T7-3 specs/other/O.mdx", wrapped in place, the map widened).
Left plain: T7-1's first workspace (`LOCATION_FILES`).

section-7-discovery.ts (15 sites judged; 12 records): `DiscoveryProbe`
gains an optional `source: StagedMdx`, `StagedProbe` requires it, and
`probeFiles` stages `probe.source ?? mdxSection(probe.id)` (returning the
record-accepting map); the later probe tables are `StagedProbe[]` —
`CASING_PROBES` (A, B, and this module's `SECTION_C_SOURCE` "T7-4 ctl/C.mdx
(the minimal section c, the control source)"), `BYTE_ONE_PROBES` and
`BYTE_TWO_PROBES` (four "T7-4 byte probes …" records, the é paths named as
spelled), `CONFIG_DIR_PROBES` (two "T7-4 configuration-directory probes …"
records), `INSIDE_NO_MATCH_PROBES` (C, A, `SECTION_M_SOURCE` "T7-4 b/M.mdx
(the minimal section m, the ascent decoy)" made from the kept string
`M_SOURCE`, which `BESIDE_ROOT_MATCH` still writes beside the root through
`stageBesideRoot` — a raw write outside the builder, Task 6's observation,
so not a record site — and `SECTION_N_SOURCE` "T7-4/T7-6 the minimal section
n (T7-4's a/N.mdx; T7-6's notes/N.mdx)"); T7-4's four outside-root arms
(`SECTION_A_SOURCE`); T7-6's (a') and (c) (`SECTION_A_SOURCE`), (b)
(`IMPORT_NEG_SOURCE` wrapped in place as "T7-6 specs/A.mdx importing the
unmatched other/unlisted.mdx", `UNLISTED_SOURCE` "T7-6 other/unlisted.mdx
(existing, matched by no group)" — the plan's `unchecked` premise was stale:
the entry carries no declaration and converts), (b') (`IMPORT_POS_SOURCE`
wrapped in place, `SECTION_B_SOURCE`), (d) (`SECTION_N_SOURCE`). Left
plain: each body's first workspace — T7-4's semantics probes (plain
`DiscoveryProbe` rows), T7-5's link workspace, T7-6's exclusion workspace
(a) — and the files written beside the root (T7-4's `x/M.mdx`, T7-5's
`outside/X.mdx`).

section-7.1-7.3.ts (13 sites judged; 0 new records): `expectConfigRefused`'s
one site, T7.1-1's non-`.mdx`-match workspace, `EMISSION_FILES` (shared by
T7.3-1's five emission workspaces, its first included),
`DESTINATION_DISCOVERY_FILES`, `DESTINATION_IMPORT_FILES`, and (g) take the
imported A/B records (the three maps widened). Left plain: T7.1-1's
`TWO_GROUP_FILES` and T7.2-1's overlap workspace (each its body's first),
`specs/notes.txt` (no `.mdx` path).

Checks: `npx tsc -p test`, `npm run format:check` clean; the ledger
self-test's `-t 'T7[-.]'` filter lists the 17 records, each judged (583
tests over 557 records now); the sites hook logged the task's 17 (test, path)
pairs (57 lines, all "well-formed") before and no file after; the sha256
capture over the three suite files (171 writes, compared sorted) identical;
9 tests, 4 pass (T7-5, T7-6, T7.1-1, T7.2-1) and 5 fail (T7-1, T7-2, T7-3,
T7-4, T7.3-1) with identical diagnoses; red check: an unclosed tag spliced
into `section-7-basics.ts`'s `mdxSection` template fails the A, B, and O
records as `mdx-derivability` while the 14 others pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…d run facts (Task 13, part 2)

FIX_PLAN Task 13 (fourth plan), part 2 of 2: the task block removed, the
"Resolved by Task 13" paragraph added to the preamble (the shared records
exported by `section-7-basics.ts` and imported by the two other §7 modules,
the `StagedProbe` row-field sub-rule for a run-time map builder over
module-level rows, the string kept for the beside-the-root write, the
task's stale `unchecked` premise for T7-6's `other/unlisted.mdx`, and the
notes for Task 14 — `section-7.4-7.5.ts` spells the same template — and
Task 20 — `section-12.6.ts`'s `VALID_SOURCE` holds the A record's bytes),
and AGENTS.md's run-facts bullet appended.

Self project after part 1 (362a689): 22 files, 2723 passed, 0 skipped under
the unprivileged namespace (~140 s; 2706 + the 17 record tests);
certification 144 PASS / 33 FAIL / 0 error / 0 hang over the 23
`certification run against` lines; the S-9 self-test 583 tests over 557
records (550 `T…`, 4 `E-6`, 3 `P-…`).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…files as staged-source records (Task 14, part 1)

FIX_PLAN Task 14 (fourth plan), part 1 of 2: every `.mdx` entry of a
workspace a body of `section-7.4-7.5.ts` creates after its first product
invocation is a ledger record (helpers/staged-mdx.ts), judged by
test/self/s9-staged-sources.test.ts before any product exists. Twenty-six
new records, two of the other §7 modules' reused; byte identity and every
verdict unchanged.

Reused (byte-identical sources across tests and paths are ONE record —
Task 11's sub-rule (i), Task 10's (ii)): `section-7-basics.ts`'s
`SECTION_A_SOURCE` (`mdxSection("a")`), imported and renamed
"T7-1/T7-2/T7-3/T7-4/T7-6/T7.1-1/T7.3-1/T7.4-1/T7.5-1/T7.5-5 specs/A.mdx
(the minimal section a; T7.5-5's tgt/a.mdx)" — `MATRIX_FILES`' and
`DUAL_FILES`' `specs/A.mdx`, `CAPTURE_STAR_FILES`' `tgt/a.mdx`;
`section-7-discovery.ts`'s `SECTION_C_SOURCE` (`mdxSection("c")` — the
three §7 templates are byte-identical), now exported and renamed
"T7-4/T7.5-4/T7.5-5 the minimal section c (T7-4's ctl/C.mdx, the control
source; T7.5-4's specs/C.mdx; T7.5-5's tgt/c.mdx)" — `SELECTOR_FILES_FILES`'
`specs/C.mdx`, `CAPTURE_STAR_FILES`' `tgt/c.mdx`. `SECTION_B_SOURCE` is not
staged here (the module spells no `mdxSection("b")`).

This module's minimal sections, one record per byte sequence, named with
every staging test in ID order and every path: x ("T7.4-1/T7.5-1/T7.5-5 the
minimal section x (aux/X.mdx; T7.5-5's tgt/abc.mdx)"), d
("T7.4-1/T7.5-1/T7.5-4 … (dualspec/D.mdx; T7.5-4's specs/D.mdx)"), t
("T7.5-1/T7.5-4/T7.5-5 tgt/T.mdx (the minimal section t)" — the set-reading
rule fixture, the tags selector, T7.5-5's (c), (h), (i)), g and w (T7.5-5's
mirror fixture), p (tgt/P.mdx of (e) and (g); tgt/t$0.mdx of (f);
tgt/t$z.mdx of (j)), q (tgt/tb.mdx; tgt/tz.mdx), r (tgt/t0.mdx;
tgt/tQz.mdx).

Converted (the 11 `withWorkspace` sites — 12 creation sites with the
`TestWorkspace.create` inside it — judged against each body's first
invocation): T7.4-1's and T7.5-1's `expectConfigRefused` site (every matrix
arm after the first, the ambiguous-name arms) through `MATRIX_FILES` /
`DUAL_FILES` (the maps widened, serving the first arm too), T7.4-1's
boundaryKind-given, inferred-kind, and unknown-profile workspaces (the same
maps spread), the set-reading fixtures — `setReadingProfileFiles`' two
`.mdx` literals moved to the module-level records "T7.4-1 set reading
tgt/T.mdx (the spelled profile and its collapsed twin)" / "… bnd/B.mdx …"
(the same bytes in both spellings, the lists alone differ: one record each,
staged in both), `setReadingRuleFiles`' `pol/P.mdx` likewise ("T7.5-1 set
reading pol/P.mdx (the spelled rule and its collapsed twin)") beside the
shared t; T7.5-2's `FORBIDDEN_KINDS_FILES` (two records wrapped in place);
T7.5-4's `SELECTOR_FILES_FILES` (two wrapped in place, C and D shared) and
`SELECTOR_TAGS_FILES` (one wrapped, t shared); T7.5-5's arms (b)–(j) —
`CAPTURE_STAR_FILES`, `CAPTURE_LIMITS_FILES` (three wrapped),
`CAPTURE_MIRROR_FILES`, the six `LITERAL_*_FILES` (the three distinct
`pre/S.mdx` sources and (i)'s three bait files wrapped in place, named by
arm letter). The four `files` parameters and the two fixture builders'
return types widened to `InitialFileContents`; the module declares no
workspace `mdx` list, so nothing moved out of one. Left plain: each body's
first workspace — T7.4-2's `SEMANTICS_FILES`, T7.5-2's `FORBIDDEN_FILES`,
T7.5-3's `ALLOWED_ONLY_FILES`, T7.5-4's `SELECTOR_KIND_FILES`, T7.5-5's
`CAPTURE_PAIR_FILES`, T7.5-6's `BUILD_VS_CHECK_FILES` (their `mdxSection`
calls too, as Task 13 left `LOCATION_FILES`') — and T7.5-6's tampered
generated module (no `.mdx` path). Behind the diagnosed failures (T7.4-1
and T7.5-1, each at its set-reading `inventory` assertion) lies no unreached
creation site: each fails in its last workspace.

Checks: `npx tsc -p test`, `npm run format:check` clean; the ledger
self-test's `-t 'T7[-.]'` filter lists the 43 §7 records (26 new), each
judged (609 tests over 583 records now); the sites hook logged the task's
38 (test, path) pairs (120 lines, all "well-formed") before and no file
after; the sha256 capture over the suite file (255 writes) identical; 8
tests, 6 pass and 2 fail (T7.4-1, T7.5-1) with identical diagnoses; a one-off
probe over the sealed ledger finds no new record duplicating another's
bytes; red check: an unclosed tag spliced into this module's `mdxSection`
template fails exactly its eight template-built records (x, d, t, g, w, p,
q, r) as `mdx-derivability` while the A and C records (the other modules'
templates) and the 18 literal-bodied records pass; self project 22 files,
2749 passed, 0 skipped under the namespace (~140 s); certification 144 PASS
/ 33 FAIL / 0 error / 0 hang over the 23 `certification run against` lines.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…d run facts (Task 14, part 2)

FIX_PLAN Task 14 (fourth plan), part 2 of 2: the task is removed from
specs/tmp/FIX_PLAN.md; its "Resolved by Task 14" paragraph records the
records and reuses (d2e5db5), the sub-rules applied (fixture-builder
literals hoisted to records declared before the builder; the cross-module
template reuse — A imported from section-7-basics.ts, C exported from
section-7-discovery.ts, both renamed; the task's "move arms" a stale
premise, the entries living in the shared matrix maps), the plain-left
first workspaces, the read-based enumeration (nothing behind the two
diagnosed failures), an observation for the next determination (a
ledger-wide probe finds 28 pre-existing groups of byte-identical records
under different names across modules; none among this task's), the checks,
and the known state (the S-9 self-test 609 tests over 583 records; self
project 22 files, 2749 passed, 0 skipped; certification 144/33/0/0). Task
20's note carries the A record's current name and its next rename.
AGENTS.md gains the task's run facts and recipes (the suite file's timing
and failure points, the duplicate-bytes probe, prettier's reflow of long
widened map headers, the template red check).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…ocation initial files as staged-source records (Task 15, part 1)

FIX_PLAN Task 15 (fourth plan), part 1 of 2: every `.mdx` entry of a
workspace a body of `section-8.ts`, `section-9.3.ts`, `section-10.1.ts`,
or `section-10.2-10.3.ts` creates after its first product invocation is a
ledger record (helpers/staged-mdx.ts), judged by
test/self/s9-staged-sources.test.ts before any product exists. Nine new
records; byte identity and every verdict unchanged. `section-9.ts` needs
nothing: its seven bodies create one workspace each, at body start.

section-8.ts (5): T8-5's required-set fixture (arm (b), after arm (a)'s
`build`, `coverage`, `policy`, `impact`, and `query` invocations) —
`REQUIRED_SET_FILES`' `tgt/T.mdx`, `bnd/B.mdx`, `oth/O.mdx` wrapped in
place ("T8-5 required-set fixture tgt/T.mdx", "… bnd/B.mdx", "…
oth/O.mdx"); T8.2-1's covered fixture (the "0 otherwise" arm, after the
report workspace's invocations) — `CHECK_GREEN_FILES`' `tgt/T.mdx` and
`bnd/B.mdx` wrapped in place ("T8.2-1 covered fixture tgt/T.mdx", "…
bnd/B.mdx"); both maps and `withWorkspace`'s `files` widened to
`InitialFileContents`. Left plain: T8-1…T8-4's single workspaces, T8-5's
root-exclusion workspace, T8.2-1's report workspace (each its body's
first).

section-9.3.ts (1): T9.3-3's arm-2 workspace (after arm 1's `build`,
`rename`, and `impact`) — `D2_BASELINE` wrapped in place ("T9.3-3 arm 2
specs/Twice.mdx (the baseline)"); `withWorkspace`'s `files` widened. Left
plain: T9.3-1's, T9.3-2's, and arm 1's workspaces (each its body's first);
`editSourceExpecting` is an `edit()`.

section-10.1.ts (1): the shared `CORE_FILES` / `COVERAGE_FILES` maps'
`specs/A.mdx` — ONE record made from `A_MDX` (the string stays for the
`A_MDX_EDITED` staleness edit), `A_MDX_STAGED`, named with every staging
test, "T10.1-1/T10.1-2/T10.1-3/T10.1-4/T10.1-5/T10.1-6 specs/A.mdx": the
post-invocation sites are T10.1-1's two determinism twins
(`TestWorkspace.create({ files: CORE_FILES })`), T10.1-4's per-state
workspaces after the first (the adapter-state loop, the coverage-session
workspace, the five following ones), and T10.1-6's six occupancy twins
after the first; T10.1-2 and T10.1-3 stage the map in their single
workspaces and their exported probe runners (the Windows leg's
`e6-subset.test.ts`); T10.1-5's inline map takes the record at its
`specs/A.mdx` (the body's first workspace — the same constant, so the
record rather than a plain spelling of its bytes; its `specs/B.mdx`,
`T10_1_5_B_VALID`, stays plain). The two maps and `withWorkspace`'s
`files` widened. Behind T10.1-6's diagnosed failure (the
`.xspec/reviews`-symlink arm, its second workspace) lie five more
`CORE_FILES` twins — records by the same map, judged by reading.

section-10.2-10.3.ts (2): T10.2-2's audit and coverage arms (after the
`--base` arm's invocations) — `t2Spec("Kid text e0.")` and
`t2CovSpec("Uncovered leaf e0.")` moved to module level as
`T10_2_2_KID_E0` ("T10.2-2 specs/A.mdx with the kid text at e0 (audit
arm)") and `T10_2_2_UNCOVERED_E0` ("T10.2-2 specs/U.mdx with the
uncovered leaf at e0 (coverage arm)") beside the arms' existing edit
records; `withWorkspace`'s `files` widened. Left plain: the `--base` arm's
v0 entry and T10.2-1's, T10.2-3's, T10.2-4's, T10.3-1's, and T10.3-2's
single workspaces (each its body's first).

Read-based enumeration: the 9 + 8 + 5 + 23 + 9 creation sites of the five
modules judged against each body's first invocation (each `withWorkspace`
helper's `TestWorkspace.create` counted once).

Observation for the determination, not acted on (Task 14's list grows by
one member): the ledger-wide duplicate-bytes probe (AGENTS.md) shows the
new "T10.1-1/…/T10.1-6 specs/A.mdx" record holds the bytes of
`section-6.1.ts`'s "T6.1-1/T6.1-2/T6.1-3 specs/A.mdx" and
`section-6.3.ts`'s "T6.3-2 specs/A.mdx" (Task 8 registered those two
separately); it is registered in its own module, as the plan's Task 15
prescribes and as Task 14 left the 28 cross-module groups — 28 groups
before and after, none of the other eight new records duplicating any
record's bytes.

Checks: the sites hook logged the task's 11 (test, path) pairs (22 lines,
all "well-formed") before and no file after; the sha256 capture over the
five suite files (179 writes, compared sorted) identical; 28 tests, 27
pass and 1 fails — T10.1-6 — with an identical diagnosis (~75 s a run);
the S-9 self-test alone 618 tests over 592 records, the 20 of these
sections passing under its filter; red check: an unclosed tag spliced
into the required-set `tgt/T.mdx` body and into `t2Spec("Kid text e0.")`
fails exactly those two records as `mdx-derivability`, the other 18 pass;
`tsc -p test` and `format:check` clean.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…d run facts (Task 15, part 2)

FIX_PLAN Task 15 (fourth plan), part 2 of 2: the task is removed from
specs/tmp/FIX_PLAN.md and its "Resolved by Task 15" paragraph added to the
preamble (nine records over §8, §9.3, and §10.1–10.3; §9 needing nothing;
the read-based enumeration of the 9 + 8 + 5 + 23 + 9 creation sites; the
observation, not acted on, that the new §10.1 specs/A.mdx record joins
Task 14's §6.1/§6.3 byte-identical group; the checks). AGENTS.md gains the
task's run facts and recipes (the five suite files' ~75 s run and
179-write capture, the format reflow of the patched hook lines, the
record-FROM-a-string form for a constant another record derives from, the
temporary duplicate-bytes probe, the sections' ledger filter and the
two-record red check).

Run facts after b1a7666: self project 22 files, 2758 passed, 0 skipped
under the unprivileged namespace (~125 s; 2749 + the 9 record tests);
certification 144 PASS / 33 FAIL / 0 error / 0 hang over the 23
`certification run against` lines; the S-9 self-test alone 618 tests over
592 records (585 `T…`, 4 `E-6`, 3 `P-…`). Task 16 (§10.4–§10.7) is now the
plan's first remaining task.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…(C3)

12.0's argument-spelling bullet said `specs\A.mdx` names no discovered
file because discovered paths carry no `\`; 7.1/14.19 allow a discovered
file (a code source validly, a spec-group file as invalid) whose path
holds `\`. The bullet now says `specs\A.mdx` names or matches only a file
of that very path, never `specs/A.mdx`, `\` being an ordinary byte (1.5).

Round-2 review file committed so it survives until this round deletes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…aths or sources (C1, C2, O1)

6.5 vetted a new destination only against occupancy before the move, so
the relocation or creation could collide with a path the finishing
regeneration writes (a destination that is an outDir component, or one
under an absent generated-module or emit path), and an added emit
destination could hide and overwrite a code source at a `.md` path.
`refused-invalid-destination` (6.5, 14) now also covers a file-form
destination or created target file, or a derived path it would generate,
that is a directory component of, or lies under, another derived path the
sources generate after the move, and a derived path it would generate
that is, or lies above, a discovered source other than a relocated
origin. The closing guarantee names both properties. The
`refused-exposed-derived-file` bullet now tests discovery (7, 13.4)
rather than glob matching alone (O1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
4.5 ended "Type-level references are unrestricted and record no edges",
beside 4's closed list making an import type of a spec module invalid
(14.15). The sentence now covers type-level references to a spec module
import's bindings and says an import type is a module-linking form,
governed by 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…C1, C2, C3, O1, O2; rejected O3)

Round 2 applied: C1 and C2 (refused-invalid-destination covers a new
destination or its derived paths colliding with regenerated paths or
sources), C3 (12.0 no longer claims discovered paths lack `\`), O1
(refused-exposed-derived-file tests discovery), O2 (4.5's type-level
sentence scoped to binding references).

Rejected:
- O3: 4 already scopes "the only one" to the module-linking forms it
  lists and says a dynamic import() with a non-static specifier (a
  template literal is non-static, 2.4) is not analyzed; classing a
  template literal as static would contradict 2.4 with no intent on
  record, and restating settled behavior only adds length.

specs/tmp/SPEC-PROBLEMS.md stays until the refinement halts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…hs; define stale-file removal (C1, O1)

Round 3 of the SPEC-PROBLEMS refinement.

C1 (write/removal paths nested in one regeneration):
- 14.22 gains a second form: a generated module's, companion's, or
  emitted Markdown file's path that is a directory component of
  another such path, or of a discovered source's path, occupied or
  not. `build`, `check`, and the 13.3 gate report it before any write,
  and so does the rename/move valid-workspace precondition. A
  move's destination-side case stays `refused-invalid-destination`.
  The absence wording in 14.22 and 13.4 is scoped so it no longer
  contradicts the new form.
- 13.4 defines removal of a recorded path that is no longer generated.
  It removes the occupant unless that is a directory or a discovered
  source. A path holding either of those, or nothing (unoccupied, or
  below a non-directory component), is left as it is and no write is
  made. A completed regeneration's outcome is therefore the same in
  any write/removal order (the folder-flattening move of case (b)).
  The write-path obstruction sentence of 13.4 and 14.24's
  parenthetical exclude such removals.
- 14.10's recorded-file form reports exactly what `build` would
  remove. 6.5's closing guarantee now covers the regeneration's
  removals.

O1: 4.5 cites the text-call conditions as 14.7, 14.8, 14.11.

Rejected: none.

specs/tmp/SPEC-PROBLEMS.md stays until the refinement halts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…C1, O1; rejected none)

specs/tmp/SPEC-PROBLEMS.md stays until the refinement halts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
7.3 and 14.14 now make an `outDir` of `.xspec`, or one beginning with
`.xspec/`, a configuration error. Graph data's layout under the area is
deliberately unenumerated, so any emit destination there could collide
with it. The journal and review sessions also sit at fixed paths there,
so emission could create a directory at the journal's path or a
session-named directory. Graph data is therefore the only derived file
under the area. This also ends 14.25's double assignment of a refused
read of Markdown under the area. 11.6 drops the now-vacuous clause
about a recorded derived path lying under the area.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…harpen 14.10 and 13.4 wording (C2, O1, O2)

C2: 13.4 now states the second exception to "an orphaned derived file is
correctly resolved by rebuilding". An orphan, recorded or not, occupying
a directory component of a path the rebuild writes obstructs that write
(14.22). The rebuild is refused before any write or removal, so the
orphan stays until deleted manually. The other option, exempting
recorded orphans from 14.22, would make the gated reads of 13.3 consult
the record, which they never do, and make a refused preview's
precondition depend on the record, which 6.6 rules out.
The first exception now covers any orphan the record does not list, so
the two kinds are described accurately. 13.5's claim that rerunning
build resolves concurrency inconsistencies now excepts these orphans:
a build racing a file move can leave one.

O1: 14.10's recorded-file form also compares each recorded path's
occupant (13.4), not the generated paths and sources "alone".
O2: 13.4's removal rationale reads "every derived file is a plain file",
since writes also create directories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…C1, C2, O1, O2; rejected none)

specs/tmp/SPEC-PROBLEMS.md stays until the refinement halts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…pt a relocated origin's directories (C1, C2, I1, O1, O2)

C1: TypeScript 5.0 through 5.2 reject U+2028 and U+2029 in a string
literal (verified: under 5.0.4 the characters that break or alter a
literal in either quote style are exactly LF, CR, the delimiting quote,
backslash, U+2028 and U+2029), and 14.20 fixes well-formedness only as
what 5.0 accepts. 7.1, 14.19 and refused-invalid-destination (6.5) now
bar both beside U+000A and U+000D, so every canonical specifier spelling
is a literal 5.0 accepts and the file form's finishing regeneration
cannot meet condition 20.
C2: 1.4 bars both from ID segments (and so from tags), so the
double-quoted computed access a rename or move writes is well-formed
under 5.0; 6.4's "every valid identity admits in every form" now holds.
I1: refused-invalid-destination's source-collision clause (6.5, 14) now
reads "the path of, or a directory component of the path of, a
discovered source other than a relocated origin" (the reading the
round-2 commit 27db838 states), and its rationale names "another derived
path the sources would generate after the move" rather than any derived
file, the origin's orphans being replaceable per 13.4.
O1: condition 10's recorded-file form names manual deletion as the
correction for a recorded file obstructing a rebuild write, and says
"the removal of 13.4" rather than "build" would remove the occupant.
O2: the condition-15 location rule excludes a leading `export` of
`import X = require(...)` as 1.7 does, like its sibling forms.

Rejected:
- O3: not clearly right. The cannot-fail guarantees of 6.4 and 6.5
  already exclude an implementation whose identifier judgement disagrees
  with its own well-formedness reading, and pinning the judgement to 5.0
  would not fix the written bytes: TypeScript's identifier acceptance
  also varies with the language level a file is scanned at (5.0.4
  accepts about 50k non-ASCII identifier characters at ES5 and 128k at
  ES2015+), which 14.20 does not state either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…C1, C2, I1, O1, O2; rejected O3)

specs/tmp/SPEC-PROBLEMS.md stays until the refinement halts; its logged
problem is now addressed in full (round-5 note appended).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…t identifier, name ES2024's Unicode version (C1, I1, O2)

Round 6 of the SPEC-PROBLEMS refinement.

Applied:
- C1: 14.20 judges TypeScript at language level ESNext. Text that
  TypeScript 5.0 accepts as a module's code but not as a script's, or
  the reverse (they differ in how top-level await is read), is left
  unfixed, like text only a later release accepts. 1.4 defines a valid
  TypeScript identifier by TypeScript 5.0's identifier characters at
  that level. ECMAScript 2024 admits every one of them, so dot access
  written for such a segment is well-formed in both kinds of source.
  6.4 cites the definition.
- I1: the identifier test checks characters only, so reserved words
  (delete, default) keep dot access. 2.4 reads any identifier name the
  grammar admits, reserved words included, as a static chain segment.
- O2: 14.20 takes ECMAScript 2024's identifier characters and space
  separators from Unicode 15.1. Whether text that derives only under a
  later version is well-formed is left unfixed.

Rejected:
- O1: barring quote characters from spec-source paths applies 1.4's
  principle to paths: ID segments bar the same characters so that every
  spelling is verbatim in every form. No document states an intent to
  narrow the bar. As an Optional item the change is not clearly right,
  and a later Developer decision can still reverse it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…e 1.4's identifier test against it (C1, I1)

Round 7 of the SPEC-PROBLEMS refinement.

Applied:
- C1: 14.20 fixed well-formed TypeScript as "release 5.0 or a later
  release of the 5 series". It said every text 5.0 accepts is
  well-formed, yet named `010` and `09` unparseable in a TypeScript
  source. 5.0.4's parser accepts both. The scanner errors for them
  (1121, 1489, and 1487/1488/6188 for `"\01"`, `"\8"`, `0_1`) first
  appear in 5.1. 14.20 now names one release, 5.9.3, and no other
  release's acceptance counts. The `010`/`09` example matches it, and so
  does TEST-SPEC T14-12. 1.4's valid-identifier test is restated against
  14.20's release. 5.9.3's identifier characters at ESNext are exactly
  ECMAScript 2024's under Unicode 15.1, checked over every code point, so
  1.4's claim that dot access is well-formed in both kinds of source
  still holds. 5.9.3 admits U+2028/U+2029 in string literals, so 1.4 and
  7.1 no longer give "admitted in no TypeScript 5.0 string literal" as
  the reason. The bars themselves stay: 1.4, 7.1, 14.19 and 6.5 are
  unchanged in effect.
- I1: under the single pin, `using` declarations, import attributes and
  string-named re-exports are well-formed in code sources. Before, they
  were left to the implementation. 14.20 cites two of them as texts that
  derive though earlier releases reject them. 5.9.3 is the last release
  of the 5 series: the 5 series was already the spec's family, and the
  product is built on current 5.x. It accepts every I1 example both as a
  module's code and as a script's. Text that a release reads only one
  way (top-level `await`) stays unfixed, as round 6 left it.

Rejected: none.

The problems file keeps a dated note: its round-5 resolution relied on
the 5.0 pin, and the path bars still resolve the problem under 5.9.3.
The file stays until the refinement halts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…tures no reference and splits no statement (I1)

6.5 "Import edits": an added import's identifiers must also equal no name
the file already references at value or type level, bound there or not
(a global or ambient name such as a test runner's `test`), and an
admissible offset must lie inside none of the file's statements (in a
spec source, its ESM blocks' declarations), so the added line splits
none; the automatic-semicolon-insertion example is given. 6.5's closing
guarantee lists the property.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…modifiers and attributes on the config import (O1)

2.4 and 4.6 now say a variable declaration includes `using` and
`await using`, settling whether `using C = class { ... }` is a named
unit and whether a module-scope `using A = ...` collides with a spec
module import binding. 7's declarative form admits no `type` or `defer`
modifier and no import attributes on the `defineConfig` import.

Round 8 of the SPEC-PROBLEMS refinement: applied I1 (e22816c) and O1;
rejected none. The reviewer judged the logged problem resolved; the
problems file stays until the refinement halts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…a TypeScript source's prologue, first statement, and comments (I1, I2, O1)

- I1: 6.5 now requires each identifier an added import binds to be one
  strict module code admits as a binding: no ECMAScript reserved word,
  and none of let, static, implements, interface, package, private,
  protected, public, eval, or arguments. TypeScript 5.9.3 rejects each
  one with a parse error or TS1214/TS1262 (eval and arguments fail
  ECMAScript's early errors instead), and accepts every other
  contextual keyword. So the identifier choice no longer decides
  whether a move is refused or breaks the consumer.
- I2: in a TypeScript source, an admissible offset now lies at or after
  the end of the directive prologue. It also follows the end of a
  top-level statement with only whitespace between. So the leading
  comments (triple-slash directives, pragmas), prologue directives,
  and comments that precede statements keep their positions.
  6.5's closing guarantee now lists both properties.
- O1: freshness now says no declaration binds an added identifier, in
  any scope and at value or type level, so none shadows it where a
  spelling is rooted.
- 1.4 is unchanged: 6.5's explicit list already rules out reading the
  segment test as governing bindings.

Rejected: none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…or reads from added imports; split 6.5 import edits into lists (I1, O1)

I1: 6.5 "Added imports" now bars, in both kinds of source, `require` and
`exports` (TS2441 when TypeScript 5.9.3 emits any non-ECMAScript module
format), every name beginning with `__` (the inline helpers its emit
declares at a module's top level; `import __awaiter` beside the emitted
`var __awaiter` is a SyntaxError under ESM), and every global its emitted
code may read: each property ECMAScript 2024 defines on the global object
(covering the reviewer's `Promise`, `Reflect`, `WeakMap`, `WeakSet`, and
also `Object`, which a lowered object spread reads unguarded, so an import
named `Object` made `Object.assign is not a function` at run time with no
tsc diagnostic), plus `Iterator`, `AsyncIterator`, and `SuppressedError`,
which 5.9.3's helpers read. All verified against tsc 5.9.3 and Node.
The strict-mode list's rationale now names an ECMAScript runtime and
TypeScript's compiler; the closing guarantee covers the new bars.

O1: the Import edits paragraph is split into the removal rule, the exact
rewrite and removal edits, and a new "Added imports" part that lists the
identifier conditions and the admissible-offset conditions (common, then
TypeScript-only, then spec-source-only). The position-read rationale is cut
to the constraint and one example. No condition changes meaning.

Rejected: none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…classic JSX factory names in TSX sources (I1, O1)

6.5 now requires, in a TypeScript source, that each binding a moved
spelling is rooted at (a chain or a call's callee) be timely. Its
declaration must be the replaced binding's declaration, precede it, or
follow it with only import declarations between them. An added
declaration's offset must meet the same rule. So under an emit that
runs imports in place (TypeScript's CommonJS output), no top-level
statement meets a rewritten spelling's binding uninitialized where it
met the replaced one initialized. An existing binding that is not
timely no longer counts as held, so an import is added. The existing
no-admissible-offset refusal (refused-invalid-rewrite) covers a file
with no timely offset. The closing guarantee names the property.

I1 is applied with a looser criterion than the review's example
(existing binding qualifies only if declared no later). Import
declarations may stand between the two declarations. Under the
stricter rule, a file that imports the origin module before the target
module at its head would gain a duplicate import of the target module.
The looser rule gives the same run-order guarantee for the file's own
statements.

O1: in a TSX source, added imports may not bind `React` or the leading
identifier of a factory a `@jsx`/`@jsxFrag` pragma in a comment names,
the names TypeScript's classic JSX transform reaches the factories
through where no compiler option names them.

Applied: I1, O1. Rejected: none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
….5's added-import bar (O1); delete resolved SPEC-PROBLEMS.md

Round 12 of the SPEC-PROBLEMS refinement (specs/SPEC.md); HALT.

Applied: O1. Rejected: none.

O1: 6.5's TSX clause now bars the leading identifier of a factory a
`@jsx` or `@jsxFrag` pragma in one of the file's comments names, with
the pragma's name matched regardless of ASCII case, as TypeScript
matches it. TypeScript 5.9.3 lowercases a pragma's name before looking
it up (addPragmaForMatch), so `/** @jsx h */` and `/* @jsxFrag F */`
make its classic transform emit `h(F, null, ...)`. For `jsx` and
`jsxfrag` its Unicode lowercasing is exactly ASCII-case matching: the
only non-ASCII code points that lowercase onto ASCII letters give `i`
and `k`. The looser "in one of its comments" scope is kept. 12.0's
no-case-folding bullet now names this match next to 10.1's session-name
restriction as the sole exceptions, so the two sections agree.

SPEC-PROBLEMS.md: the 2026-09-29 entry (file-form specifiers a
destination path cannot spell) was judged resolved by the round 8-12
reviews and was re-checked against the current text. 7.1 and 14.19 bar
`"`, `'`, `\`, U+000A, U+000D, U+2028 and U+2029 from spec-source
paths, and refused-invalid-destination (6.5) refuses a file-form
destination or created target file containing any of them. The file is
deleted on HALT. The Stage line of
specs/patches/0001-external-ui-apis.md is unchanged (Tested; stages are
not rewound on a backward jump). REVIEW.md deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…identifier-by-characters rule (C1, C2, I1, I2)

T1.4-2 no longer calls U+2028 valid; T1.4-1/T1.4-4 gain U+2028 and
U+2029 arms and T12.0-10 their malformed --tag/--to arms. New T1.4-5
covers reserved-word and non-ASCII dot access and the 6.5 conversion
spellings; T2.4-1 and T6.4-2 gain the matching arms. Section 16's
exclusion lists, P-1's boundary draws, and P-7's spec-group paths
follow 1.4 and 7.1. T12.0-6 names both case-folding exceptions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…fig import modifiers, the outDir area bar, and 14.20's pins (C3, C4, C5, C7, C12)

T4.5-8/T4.5-4/T4.6-1 gain using and await using arms. T4-2 covers
import types, string-named module declarations (the "*.xspec"
wildcard included) and the constructs that name no module; T14-11
locates the new 14.15 forms; T4.5-7 excludes import types. T7-2
refuses type/defer/attribute config imports; T7.3-1 bars an outDir
in the graph-data area. T14-12 pins TypeScript 5.9.3 and Unicode
15.1 and forbids fixtures accepted one way only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…nd backslash as an ordinary byte (C6, C13, O3)

T7.1-1 stages one 14.19 arm per barred character plus a code-group
control; T6.5-4 refuses file-form and created-target destinations
spelled with each. T12.0-5 drops the false "discovered paths carry
none" rationale for backslash and gains the positive arms (view/at on
a backslash-named spec file, occurrences --file on a code file);
T7-4 adds the configured-glob twin. E-6 excludes the new Linux-leg
arms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…ns, and the occupant rules of stale-file removal (C9)

New T13.4-9 refuses derived paths above sources or other derived
paths, occupied or not; T13.4-10 covers the orphan that obstructs a
rebuild (manual deletion, recorded and unrecorded); T13.4-11 covers
directory, source, symlink, and nothing-below-a-file occupants and
order independence. T13.4-4 adds the replaceable directory occupant;
T12.2-4(b) quotes 14.10's current comparison; T12.1-3 points to
T13.4-11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…d-exposed-derived-file (C8)

New T6.5-20 stages destinations under or above derived paths, derived
paths hiding or replacing sources (with the relocated-origin
exemption performed), and a module-linking form made to designate an
emit path, with its require/triple-slash and emission-off controls.
New T6.5-21 stages the exposed emit destination (emitted and
user-authored occupants; no-glob and symlink controls) and the
two-reason order. T14-7, T12.7-2, and T6.6-3 include both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…(C10, O1)

New T6.5-22 states the universal assertion on every added identifier
(barred lists, any-scope and type-level declarations, referenced
names, distinctness, S/Spec/text) for every addition test, leaving
Annex B's escape/unescape unasserted, and stages lures for reserved
words, globals, require, React, case-insensitive JSX pragmas,
inner-scope and type-only declarations, and a referenced global.
T6.5-9 quotes the current freshness clauses; P-5 draws barred
basenames and applies the assertion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
… TS arms' offsets and import order (C11, I3, I4)

New T6.5-23 stages the directive prologue, file-top directives, a
governing comment, a trailing comment, statement splitting (TS and
spec source), and 6.5's timeliness example with its control. T6.5-8's
TS arm, T6.5-9, T6.5-11, and T6.5-18 now pin the admissible offset;
T6.5-11(a)/(b) and T6.5-18 are restaged so the removed origin import
follows another statement, which keeps them independent of how 6.5's
"follows the end of a top-level statement" reads across a removal
(logged separately). T6.5-7's and T6.5-11(b)'s imports head the file.
T6.6-4(b), T6.5-13, and T6.5-16 restate the admissibility rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…in; index the new primary tests (I5, O2)

S-9 now checks every TypeScript fixture declared well-formed or
unparseable against TypeScript 5.9.3's parser under both the module
and the script reading, and bars fixtures accepted one way only.
Section 14's primary-test index names T13.4-9..11, T6.5-20, T6.5-21.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…)'s freshness wording

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
…d TypeScript imports (I4)

SPEC 6.5 does not say whether an added TypeScript import's offset must
follow a statement end in the pre-operation text or in the composed
text when that statement is removed by the same rewrite. The two
readings perform or refuse the most basic TypeScript section move (a
consumer whose only spec import, at its head, loses its last use).
TEST-SPEC's affected arms are restaged so both readings agree; the
basic case waits on SPEC. Also notes the minor Annex B escape/unescape
question from C10.

Round 1 of this Phase 6 revisit applied C1-C13, I1-I5, O1-O3 in
2c22d08..b6633ea; rejected none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
… ends for added imports over the file before the edit; bar Annex B's escape and unescape (C1, C2, C3); delete resolved SPEC-PROBLEMS.md

- C1: the TypeScript "Added imports" bullet now judges its statement-end
  clause over the file before the edit, a statement the rewrite removes
  included. Timeliness and the "inside none of the file's statements
  before the edit" test already read that text. So when a consumer's
  only spec import heads the file and loses its last use, the move is
  performed: the target module's import takes the removed import's
  place. The bullet states the consequence: a comment above the removed
  declaration comes to precede the added line, so a `// @ts-expect-error`
  there then governs the added import. The composed reading was not
  taken. It would refuse that move outright, against GOALS' "xspec
  rename and xspec move rewrite all references".
- C2: the same phrase covers the directive-prologue clause. A removal
  that would bring a string-literal statement to the file's head does
  not make that statement a prologue for this judgement. With the added
  line in the removed import's place, the statement stays no directive,
  as it was before the edit. The closing guarantee paragraph now judges
  first statement, directive prologue, and comment parting over the
  file before the edit as well.
- C3: the barred-globals clause now reads "a property ECMAScript 2024,
  its Annex B included (escape, unescape), defines on the global
  object", so both Annex B names are barred.
- specs/tmp/SPEC-PROBLEMS.md: C1 and C2 settle its first entry and C3
  its second, so the file is deleted.

Rejected: none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyZ5zUv2UCkvTkM1tkYUp2
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