From 0e9bdf65abd57a1c70af237b78f5e7e5e280b0ed Mon Sep 17 00:00:00 2001 From: "glm-5.3-flash" Date: Tue, 8 Sep 2026 08:46:57 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20phase-0=20=E2=80=94=20OQ-GN-02=20direct?= =?UTF-8?q?ion=20set:=20plan-driven=20contexts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- docs/research/phase-0.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/research/phase-0.md b/docs/research/phase-0.md index 3610a55..6ff3ec2 100644 --- a/docs/research/phase-0.md +++ b/docs/research/phase-0.md @@ -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