docs: phase-0 — OQ-GN-02 direction set: plan-driven contexts

- plans for offsets/sizes (already computed+validated by the engine,
  free at generation time since alktype is already a dep), BAST for
  descriptive metadata; drift risk inverts into ordinary
  dependency-upgrade tracking of alktype's plan API
- residue: exact plan->context projection is the Phase 1 context-
  builder spec task
This commit is contained in:
2026-09-08 08:46:57 +00:00
parent ea1ef10bc3
commit 0e9bdf65ab
+24 -2
View File
@@ -163,6 +163,26 @@ offsets/sizes, BAST for descriptive metadata (names, docs), with
the exact projection decided in Phase 1. This decision shapes the
whole context-builder layer.
**Direction set 2026-09-08 (setup discussion): plan-driven, with BAST
for descriptive metadata.** Supporting rationale:
- The layout math (offsets, sizes, dispatch structure) is already
computed *and validated* by the engine — re-deriving it in the
template layer would reintroduce exactly the drift OQ-GN-03
flags as the standing risk, by construction.
- alktype is already a dependency; plan computation at generation
time costs nothing extra.
- The residual risk inverts: instead of drifting from engine
semantics, contexts now track alktype's public plan API. If a
plan shape evolves, context builders evolve with it — an
ordinary dependency-upgrade concern, not a correctness risk.
Residue for Phase 1 (spec-shape, not research): the exact projection
— which plan structures (`OffsetMap` entries, `ReadPlan` nodes,
`ValidationPlan` fields) map to which template-context shapes, and
where BAST metadata (names, docs, annotations) joins the projection.
This is the context-builder layer's spec task.
### OQ-GN-03: Where does the interpreter/compiler duplication get cut?
**Resolved as posture, 2026-09-08 (setup discussion): the duplication
@@ -297,8 +317,10 @@ is a place the compiled path stays interpreter-shaped.
- [x] Branch scope framed — readers/writers/validators first,
handlers second, JIT later (§opening)
- [ ] OQ-GN-01 (output unit) — resolved with alkcall-side input
- [ ] OQ-GN-02/03 (context source, duplication cut) — the core
phase-0 discussion
- [x] OQ-GN-02/03 (context source, duplication cut) — direction set
2026-09-08: plan-driven contexts (plans for offsets/sizes, BAST
for descriptive metadata); duplication resolved as posture.
Residue: exact plan→context projection (Phase 1 spec task)
- [ ] OQ-GN-05/06 (delegation boundary, dependency shape) — the
reader-POC cluster
- [ ] OQ-GN-07 (validation strategy) — resolve with or after