tidy setup: retire effect-op-arg-modes bundle; split out effect-doc-honesty + AILang-code spec discipline

The effect-op-arg-modes brainstorm spec bundled a real, self-contained
DESIGN.md honesty fix with speculative build-ahead infra (an EffectOpSig
arg-mode field whose only consumer was a synthetic test op). Recon had
already destroyed the "effect-handler infrastructure" premise: the effect
raise/declare/subset/propagation machinery is fully generic over any
effect string; the only real prerequisite was one struct field, not a
milestone. The user rejected the bundle as incoherent and the
build-ahead half as the iteration-discipline trap repeated.

- Retire the uncommitted effect-op-arg-modes spec (deleted from the
  working tree; never committed).
- roadmap: drop the false "sub-ms-2 = effect-handler infrastructure"
  framing; mark Stateful-islands sub-milestone sequencing as UNDER
  RE-THINK with the user (no !Mut planning until that conversation);
  add the split-out effect-doc-honesty as an in-flight P2 [~] todo.
- plan docs/plans/2026-05-16-effect-doc-honesty.md: placeholder-free
  tidy plan (the three DESIGN.md fictions + form_a.md + main.rs +
  a new doc-presence pin) over recon-mapped exact byte sites.
- brainstorm SKILL: specs and design talk LEAD with the AILang (.ail)
  program that should work (= the feature-acceptance clause-1
  evidence); the Rust implementation shape is secondary, never a
  substitute; a no-surface infra milestone still shows concrete .ail
  (often a must-fail fixture). Codifies user feedback from this session.
This commit is contained in:
2026-05-16 13:18:20 +02:00
parent 4ce1f2d1f6
commit c41e0e5a9e
3 changed files with 471 additions and 7 deletions
+56 -7
View File
@@ -221,6 +221,33 @@ clean. Pick the next milestone from P2.)_
- [ ] **\[todo\]** 21'h iteration — final 21' carry-over (latency
methodology pass). Numbering kept for continuity with the 21' arc.
- [~] **\[todo\]** DESIGN.md effect-prose is fiction — standalone
documentation-honesty tidy (split out 2026-05-16 from the rejected
effect-op-arg-modes bundle; in flight via planner→implement). Three
load-bearing effect-system claims in DESIGN.md are presently false
and mislead every future brainstorm + the architect, who read
DESIGN.md as truth: (a) DESIGN.md:172/2722 say `IO` **and**
`Diverge` are wired-up built-in ops — `Diverge` has zero code in
any crate (not registered, never injected, no string literal);
reconcile to "only `IO` (`io/print_str`) is wired up; `Diverge`
reserved/unimplemented", modelled on Decision 4's
reserved-but-opaque refinements precedent. (b) DESIGN.md:171-172
"the effect set is row-polymorphic (`![IO | r]`)" — no row variable
/ `EffectRow` exists anywhere; effect sets are flat string
collections unified by set-equality; remove the claim (a flat
closed set is *more* locally legible — Decision 3 pillar — so this
is honesty, not a concession; pillar-doc edit, flag at review).
(c) `crates/ailang-core/src/ast.rs:438-439` `Term::Do` doc-comment
"resolved against the effect-handler table at link time" — there is
no handler table; it is an `IndexMap` lookup at typecheck + a
literal codegen `match`; correct it. Lockstep: `form_a.md:226,358`
+ CLI-help `main.rs:289` Diverge mentions reconciled. Guard: a new
doc-presence test (false strings absent, corrected text present).
No language/codegen change; pure documentation truth. Grounding
triple-verified 2026-05-16 (three `ailang-grounding-check` PASSes).
- context: surfaced by the effect-subsystem recon during the
retired effect-op-arg-modes brainstorm; see the Stateful-islands
"UNDER RE-THINK" note for why the bundle was rejected.
- [ ] **\[todo\]** `io/print_float` always-emit-`.0` — surface
printer always emits `.` or `e/E` so re-lex routes to Float;
the runtime printer (`printf("%g\n", v)`) doesn't, so `2.0`
@@ -330,13 +357,35 @@ clean. Pick the next milestone from P2.)_
fn signatures stay pure while LLM authors can write imperative
accumulators directly. Spec `docs/specs/2026-05-15-mut-local.md`;
iters mut.1/mut.2/mut.3/mut.4-tidy (commits 7b92719, b24718a,
03fb633, 20add51). Remaining sub-milestones (to be brainstormed
separately, in order): (2) effect-handler infrastructure as a
prerequisite for any non-IO/non-Diverge effect; (3) `!Mut` effect
+ `ref a` first-class type that can escape mut blocks under
uniqueness-tracking; (4) mutable-array primitive `MutArray a`;
(5) `Stateful a b` sealed callable type + `pipe` combinator with
zero-allocation composition + `runST`-equivalent escape discharge.
03fb633, 20add51).
**Sub-milestone sequencing is UNDER RE-THINK with the user
(2026-05-16) — no further sub-milestone is planned or brainstormed
until that conversation happens.** Why: the 2026-05-15 decomposition
named "(2) effect-handler infrastructure as a prerequisite for any
non-IO/non-Diverge effect" as the next step. A read-only recon of
the live effect subsystem (2026-05-16) showed that premise is false:
the effect raise / declared-set / `UndeclaredEffect`-subset / call-
propagation machinery is already fully generic over an arbitrary
effect string; `!Mut` needs **no** effect-handler machinery. The
only real code prerequisite the recon found is one hard-coded
assumption (`linearity.rs` walks every `Term::Do` arg as `Borrow`;
`EffectOpSig` has no per-arg mode field) — a single struct field,
not a milestone. A brainstorm spec that tried to make sub-ms-2 a
standalone deliverable bundled that speculative one-field capability
with an unrelated DESIGN.md honesty fix; the user correctly rejected
the bundle as incoherent and the build-ahead-of-consumer half as the
iteration-discipline trap repeated. **Resolution:** (a) the DESIGN.md
effect-honesty correction is split out and runs now as a standalone
documentation tidy (see the P2 `[todo]` "DESIGN.md effect-prose is
fiction" below); (b) the `arg_modes` finding is recorded as recon
context for the future `!Mut` design, NOT built ahead — it is
first-iteration material of whatever the `!Mut` milestone turns out
to be, validated there against a real consuming op, never a
synthetic test op; (c) the old "(2)…(5)" sequence (effect-handler
infra → `!Mut`+`ref a``MutArray a``Stateful a b`+`pipe`) is
no longer treated as settled — the whole ordering and granularity
is what the pending user conversation re-decides.
**Motivation.** AILang's signature-as-contract thesis is *better*
served by an explicit `Stateful a b` + `!Mut` annotation than by