spec: design-md-rolesplit — Boss-adjudicated relocation appendix (planner recon resolution)

plan-recon surfaced 7 open questions (genuine Boss design judgement,
not architectural forks). Adjudicated and folded into the spec as an
authoritative placeholder-free Appendix relocation map (every ##/###
of DESIGN.md -> exactly one destination):

- design_index_pin.rs clause-2 widened to accept crates/**/src/*.rs
  in-source #[cfg(test)] mod tests as first-class ratifiers.
- INDEX ratifier tokens resolved to recon-verified paths; memory-model
  -> uniqueness.rs (in-source), tail-calls -> lib.rs:5044
  tail_call_in_non_tail_position_is_rejected (NOT loop_recur — different
  construct), env-construction path corrected to ailang-check/tests.
- 3 ledger additions the 12-list under-counted: qualified-xref
  (source-link only), str-abi (prose+source; the one sanctioned
  sentence-level move, 2802 bold para), scope-boundaries (present-tense
  honesty-pinned). Net 15 contracts / 5 models / 1 decision-record journal.
- OQ7: lib.rs:103 dangling 'Iter 13b' cite is deleted not retargeted
  (no forward target exists; a pointer would be fiction).

grounding-check re-dispatched after the material edit: PASS, all 6
changed/new ratifiers resolve to named currently-green tests.
This commit is contained in:
2026-05-19 12:11:53 +02:00
parent a64b2ccb2a
commit 314e5e4920
+164 -16
View File
@@ -155,16 +155,19 @@ header when the code is the single source of truth.
| feature-acceptance | brainstorm-gate / stable | skills/brainstorm/SKILL.md Step 4 | contracts/feature-acceptance.md |
| authoring-surface | LLM author / stable | crates/ailang-surface round_trip.rs | contracts/authoring-surface.md |
| roundtrip-invariant | every release / stable | crates/ailang-surface round_trip.rs | contracts/roundtrip-invariant.md |
| memory-model | LLM author / stable | crates/ailang-check uniqueness/mode tests | contracts/memory-model.md |
| data-model | LLM author / stable | crates/ailang-core design_schema_drift.rs | contracts/data-model.md |
| mangling | codegen / stable | crates/ail eq_ord_e2e.rs | crates/ailang-codegen/src/lib.rs //! |
| env-construction | codegen / stable | crates/ailang-codegen duplicate_ctor_pin.rs | crates/ailang-codegen/src/lib.rs //! |
| frozen-value-layout | embedding ABI / one-way-frozen| crates/ailang-codegen embed_record_layout_pin.rs | contracts/frozen-value-layout.md + runtime/rc.c §layout |
| float-semantics | LLM author / stable | crates/ail eq_float_noinstance.rs | contracts/float-semantics.md |
| typeclasses | LLM author / stable | crates/ail show_no_instance_e2e.rs | contracts/typeclasses.md |
| tail-calls | codegen / stable | crates/ailang-check tail-call tests | contracts/tail-calls.md |
| honesty-rule | architect+grounding / stable | crates/ailang-core docs_honesty_pin.rs | contracts/honesty-rule.md |
| embedding-abi | embedding host / stable | crates/ailang-codegen embed_record_layout_pin.rs | contracts/embedding-abi.md |
| memory-model | LLM author / stable | crates/ailang-check/src/uniqueness.rs (in-source mod tests) | contracts/memory-model.md |
| data-model | LLM author / stable | crates/ailang-core/tests/design_schema_drift.rs | contracts/data-model.md |
| mangling | codegen / stable | crates/ail/tests/eq_ord_e2e.rs | crates/ailang-codegen/src/lib.rs //! |
| env-construction | codegen / stable | crates/ailang-check/tests/duplicate_ctor_pin.rs | crates/ailang-codegen/src/lib.rs //! |
| qualified-xref | codegen / stable | crates/ail/tests/codegen_import_map_fallback_pin.rs | crates/ail/src/main.rs //! |
| frozen-value-layout | embedding ABI / one-way-frozen| crates/ailang-codegen/tests/embed_record_layout_pin.rs | contracts/frozen-value-layout.md + runtime/rc.c §layout |
| float-semantics | LLM author / stable | crates/ail/tests/eq_float_noinstance.rs | contracts/float-semantics.md |
| typeclasses | LLM author / stable | crates/ail/tests/show_no_instance_e2e.rs | contracts/typeclasses.md |
| str-abi | runtime ABI / stable | crates/ail/tests/e2e.rs (Str path) | contracts/str-abi.md + runtime/str.c §heap-Str |
| tail-calls | codegen / stable | crates/ailang-check/src/lib.rs (in-source tail_call_in_non_tail_position_is_rejected) | contracts/tail-calls.md |
| honesty-rule | architect+grounding / stable | crates/ailang-core/tests/docs_honesty_pin.rs | contracts/honesty-rule.md |
| embedding-abi | embedding host / stable | crates/ailang-codegen/tests/embed_record_layout_pin.rs | contracts/embedding-abi.md |
| scope-boundaries | architect+author / stable | crates/ailang-core/tests/effect_doc_honesty_pin.rs | contracts/scope-boundaries.md |
| verification | architect / stable | bench/architect_sweeps.sh | contracts/verification.md |
## Models
@@ -177,11 +180,16 @@ header when the code is the single source of truth.
| pipeline | onboarding / evolves | models/pipeline.md |
```
The `ratifying-test` column above shows illustrative tokens. The
planner resolves each to an exact, recon-verified file path (the
`design_index_pin.rs` clause-2 check requires every token to resolve
to a real file); the spec owns the *shape and the disposition*, the
planner owns the exact bytes per the planner Iron Law.
The `ratifying-test` column above is now **Boss-resolved to exact
recon-verified paths** (plan-recon confirmed each file exists; the
`design_index_pin.rs` clause-2 check, widened to accept
`crates/**/src/*.rs` in-source `#[cfg(test)] mod tests`, requires
every token to resolve to a real file). The full per-`###`
relocation map and the adjudication rationale for the three
ledger additions (`qualified-xref`, `str-abi`, `scope-boundaries`)
are in the **Appendix — Boss-adjudicated relocation map** at the
end of this spec; that appendix is the authoritative,
placeholder-free map the planner consumes.
**A sample contract file** — `design/contracts/float-semantics.md`
(content moved verbatim from DESIGN.md:27002838, header re-levelled
@@ -233,7 +241,9 @@ fn every_index_link_resolves() {
#[test]
fn every_contract_names_a_resolvable_ratifying_test() {
// clause 2 — every kind=contract row's ratifying-test token
// resolves to a real file under crates/**/tests, bench/, or
// resolves to a real file under crates/**/tests, crates/**/src
// (in-source `#[cfg(test)] mod tests` are first-class ratifiers
// in this project — see Boss adjudication OQ1/OQ2), bench/, or
// skills/**/SKILL.md.
}
@@ -510,3 +520,141 @@ All failure modes fail closed:
contract still instructs reading a file that does not exist.
11. The milestone landed in a build-atomic shape (no commit leaves
the workspace non-compiling).
12. Every `##`/`###` of the former DESIGN.md maps to exactly one
destination in the Appendix table; the three ledger additions
(`qualified-xref`, `str-abi`, `scope-boundaries`) have INDEX
rows and resolvable ratifiers; the `crates/ailang-codegen/src/lib.rs:103`
"Iter 13b" dangling cite is rewritten to drop the unresolvable
reference (keeping it would itself violate the honesty rule).
## Appendix — Boss-adjudicated relocation map (authoritative, placeholder-free)
This appendix supersedes any ambiguity in §Components. It is the
map the planner consumes. Every `##`/`###` of DESIGN.md (3020
lines; no `## Decision 7` — numbering gap, not drift) has exactly
one destination. `D` = `docs/journals/2026-05-19-design-decision-records.md`
(decision-record archive). `IX` = `design/INDEX.md` preamble.
**Bucketing principle.** *Contract* = prescriptive + obeyed/checked
by an author, the architect, or a green test (binding, schema,
enforcement, honesty-pinned, present-tense scope claim). *Model* =
explanatory narrative; reading it is optional for correctness; no
test pins it. *Decision-record* = why-X-chosen / why-Y-rejected /
"deliberately does not do" / rollback / empirical addendum /
how-the-doc-reached-its-wording.
| `##` / `###` | Lines | Destination |
|---|---|---|
| `## Goal` | 618 | IX preamble |
| `## Project ecosystem` (intro) | 1955 | IX preamble |
| ` ### What this document is — honesty rule` | 5682 | `contracts/honesty-rule.md` (**rewritten**; pins `docs_honesty_pin.rs:70,72`) |
| `## Project language: English` | 8392 | IX preamble |
| `## Feature-acceptance criterion` | 93164 | `contracts/feature-acceptance.md` |
| `## Decision 1: source = data` | 165176 | D |
| `## Decision 2: content-addressed` | 177189 | D |
| `## Decision 3: pure core + effects` | 190204 | `models/effects.md` (pins `effect_doc_honesty_pin.rs` present-anchors — pin reads this file) |
| `## Decision 4: HM + refinements` | 205213 | D |
| `## Decision 5: emit LLVM IR as text` | 214229 | D |
| `## Decision 6` intro | 230240 | `contracts/authoring-surface.md` |
| ` (Decision 6 :241243 audit-trail sentence)` | 241243 | D (retired, no successor pin — §Architecture-4) |
| ` ### Why this is opening up` | 245267 | D |
| ` ### Architectural pin: data structure is SoT` | 268297 | `contracts/authoring-surface.md` |
| ` ### Constraints (hard, in priority order)` | 298331 | `contracts/authoring-surface.md` |
| ` ### Candidate notations` | 332471 | `models/authoring-surface.md` |
| ` ### First choice and rollback plan` | 472486 | D |
| ` ### Implementation outline` | 487519 | D |
| ` ### What this Decision deliberately does not do` | 520536 | D |
| ` ### Form refinements during implementation` | 537589 | D |
| ` ### Form (B) — human prose projection` | 590674 | `models/authoring-surface.md` (the Form-B placeholder present-anchor in `docs_honesty_pin.rs` re-points here) |
| ` ### Empirical addendum` | 675730 | D |
| `## Decision 8: explicit verified tail calls` | 731787 | `contracts/tail-calls.md` |
| `## Decision 9` intro | 788852 | `models/rc-uniqueness.md` |
| ` ### Per-fn arena via stack alloca` | 853913 | `models/rc-uniqueness.md` |
| `## Decision 10` intro | 914977 | `models/rc-uniqueness.md` |
| ` ### Why not other memory models` | 9781014 | D |
| ` ### The LLM-aware sharpening` | 10151122 | `models/rc-uniqueness.md` |
| ` ### Language-design constraints (binding)` | 11231150 | `contracts/memory-model.md` |
| ` ### Schema additions` | 11511312 | `contracts/memory-model.md` |
| ` ### Advisory diagnostics` | 13131351 | `contracts/memory-model.md` |
| ` ### Why advisory + suppress instead of inference` | 13521377 | D |
| ` ### Inference algorithm` | 13781393 | `models/rc-uniqueness.md` |
| ` ### Codegen contract` | 13941412 | `contracts/memory-model.md` |
| ` ### Mode metadata is load-bearing for codegen` | 14131509 | `contracts/memory-model.md` |
| ` ### Adjacent extensions for mutability (out of scope)` | 15101519 | D |
| ` ### What this Decision deliberately does not do` | 15201535 | D |
| `## Decision 11` intro | 15361577 | `models/typeclasses.md` |
| ` ### Form-A schema (JSON authoring surface)` | 15781639 | `contracts/typeclasses.md` |
| ` ### Resolution and monomorphisation` | 16401752 | `models/typeclasses.md` |
| ` ### Cross-module references in synthesised bodies` | 17531823 | `contracts/typeclasses.md` (pins `codegen_import_map_fallback_pin.rs:2`, `polyfn_dot_qualified_branch_pin.rs:2`) |
| ` ### Defaults and superclasses` | 18241855 | `contracts/typeclasses.md` |
| ` ### Diagnostic categories` | 18561917 | `contracts/typeclasses.md` |
| ` ### Method dispatch` | 19181964 | `contracts/typeclasses.md` |
| ` ### What the typeclass design explicitly does NOT support` | 19652000 | D |
| ` ### Prelude (built-in) classes` | 20012042 | `contracts/typeclasses.md` (pins `show_no_instance_e2e.rs:47`; Show diagnostic target) |
| ` ### Heap-Str primitives` | 20432088 | `contracts/str-abi.md` (ledger addition — see below) |
| ` ### What this decision does NOT commit to` | 20892112 | D |
| `## Roundtrip Invariant` (+ 3 `###`s 21522208) | 21132208 | `contracts/roundtrip-invariant.md` (whole block kept together — pins `round_trip.rs:10,72`) |
| `## Mangling scheme` | 22092218 | **source-link only** (no prose file): behaviour → dropped (code is SoT); any "why" sentence → D |
| `## Convention: qualified cross-module references` | 22192236 | **source-link only** `qualified-xref` (ledger addition): behaviour → dropped; rationale → D |
| `## Env construction` | 22372265 | **source-link only** (no prose file): behaviour → dropped (code is SoT); any "why" sentence → D |
| `## Embedding ABI` intro | 22662333 | `contracts/embedding-abi.md` (pins `docs_honesty_pin.rs:135`) |
| ` ### Frozen value layout (M3 — one-way commitment)` | 23342376 | `contracts/frozen-value-layout.md` + source-link `runtime/rc.c §layout` (dual; pins `embed_record_layout_pin.rs:1`) |
| `## Data model` (+ 4 `###`s) | 23772615 | `contracts/data-model.md` (whole; `design_schema_drift.rs` `include_str!`s it) |
| `## Pipeline` | 26162662 | `models/pipeline.md` |
| `## CLI` | 26632686 | `models/pipeline.md` |
| `## Verification and correctness (across cycles)` | 26872699 | `contracts/verification.md` |
| `## Float semantics` | 27002838 | `contracts/float-semantics.md` (the inline `**Str ABI.**` para at 2802 is **moved to `contracts/str-abi.md`** — the one sentence-level exception, justified below) |
| `## What is not (yet) supported` | 28393020 | `contracts/scope-boundaries.md` (ledger addition — present-tense, honesty-pinned by `effect_doc_honesty_pin.rs:28`) |
### Ledger additions — rationale (the brainstorm's 12-list under-counted)
Plan-recon's exhaustive live-xref sweep proved three genuine,
distinct, currently-referenced contracts the 12-row first pass
missed. Forcing them into ill-fitting existing files would
re-create the conflation this milestone exists to end; the
ledger's purpose is per-contract addressability, so a genuine
distinct contract earns a row.
- **`qualified-xref`** (13th, source-link only). `## Convention:
qualified cross-module references` is code-SoT per §Architecture
commitment 1 ("qualified-cross-module-ref resolution"). No prose
file; INDEX row links the resolution `//!`; ratifier
`codegen_import_map_fallback_pin.rs`. `crates/ail/src/main.rs:1393`
retargets to this row.
- **`str-abi`** (14th, prose + source-link). `### Heap-Str
primitives` (20432088) + the inline `**Str ABI.**` para (2802)
are one runtime-ABI contract, SoT `runtime/str.c`. Three live
xrefs name `§"Str ABI"`/`§"Heap-Str primitives"`
(`runtime/str.c:172,198`, `crates/ail/tests/e2e.rs:2843`) — they
would dangle with no destination. The 2802 para is the **single
sanctioned sentence-level move** (it is one inline bold-paragraph,
not a `###`; leaving it in `float-semantics.md` would mis-file a
Str contract under Float). Recorded as the explicit, bounded
exception to §Architecture commitment 2.
- **`scope-boundaries`** (15th, prose). `## What is not (yet)
supported` is present-tense scope assertion, honesty-pinned by
`effect_doc_honesty_pin.rs:28` (absent-string `"the built-in IO
and Diverge ops"`). A present-tense "what the language does not
do, now" claim is a contract (a checked promise), not a
decision-record; the pin already reads it, so its ratifier is
`effect_doc_honesty_pin.rs`.
Net ledger: **15 contracts** (12 spec + 3 additions), 5 models,
one decision-record journal. The `design_index_pin.rs` clause-2
resolution set is widened to accept `crates/**/src/*.rs` so the
in-source `memory-model` (`uniqueness.rs`) and `tail-calls`
(`lib.rs tail_call_in_non_tail_position_is_rejected`) ratifiers
resolve honestly rather than being mapped to a wrong tests/-level
file.
### OQ7 — the dangling "Iter 13b" cite
`crates/ailang-codegen/src/lib.rs:103` cites "Iter 13b notes in
`DESIGN.md`" — that prose was relocated out of DESIGN.md long ago;
no forward target exists in the tree. Per the honesty rule a
reference to non-existent content is itself a violation. The
comment is rewritten to drop the cite (state the behaviour
directly; no `design/` or journal pointer, because the referenced
notes no longer exist anywhere — inventing a pointer would be
fiction). This is the one reference in bucket (e) that is *deleted,
not retargeted*.