D79: deterministic structure skeleton + bottom-up, consumed summaries (design) - #164
Conversation
…mmaries The one-shot structurer (single frontier call, 200K chars, full tree as one strict-JSON response, char-offset proposals) has three measured cliffs: unanchored offset arithmetic the snap cannot correct, the section 2.4 long-context strict-JSON failure zone, and the max_prompt_chars truncation cliff. D79 replaces the shape, not the contract: parse the skeleton deterministically from markdown headings (LLM only as a string-anchored fallback), produce summaries bottom-up with bounded flash-class calls (parallel, content-hash cached per section), and consume them — E1 prefixes and the D31 "section path + summary" bundle element (closes the summary half of issue #163). Owner-directed 2026-07-27: the system must scale. Implementation sequenced behind the #161 loss ledger; entity hints stay a separate decision gated on #148. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKENhTLJg1HqhbdwCmmkbc
All findings applied: restore the 4A crossref heading the first cut swallowed; assign the placement hint to the root reduction call; specify role assignment (deterministic title rules -> bounded title-only classifier -> explicit body) with its own generation; widen the fallback trigger to heading-density/oversized-leaf and pin anchors to block-contained strings with occurrence disambiguation; make summary calls bounded by construction (block-grain sharding, parent-direct blocks, balanced fan-in, full cache key); and resolve the two deep findings with one principle — summaries are orientation-only: never an added_context grounding source (closes the fact-injection channel past D32 layer 2) and excluded from extraction_input_hash (preserves D56 edit-local reuse; no document-wide fan-out on re-summarization). Honest wording throughout: cliffs are observed code risks not measurements, luna is extraction-tier not frontier, ~50K tokens is the near-cap ceiling, cost win is expected-to-be-measured. Adds the explicit Refines-D71 clause and the generation/migration story. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKENhTLJg1HqhbdwCmmkbc
|
Revision 68ac4c0 applies both reviews (Grok-4.5 and Codex gpt-5.6-sol xhigh, both REQUEST-CHANGES; findings overlapped heavily). Load-bearing changes: placement moves to the root reduction call; role assignment specified (deterministic title rules → bounded title-only classifier → explicit |
Design-only PR: new decision D79 in
decisions.mdplus §4.1 inplan/designs/e0_files_design.md.What it decides
The one-shot E0 structurer (one frontier-model call over ≤200K chars returning the whole tree — spans, roles, summaries — as one strict-JSON response with char-offset proposals) is replaced, shape not contract:
added_contextgains asummarytag, grounding gate verifies it, extractor version bumps.Pipeline order already runs structure before extraction; this closes the consumption gap the owner asked for ("page index first, then claim extraction with summaries as context").
Sequencing
Implementation behind #161 (loss ledger) so the bundle change lands with its measurement in place. Entity hints stay out — separate decision gated on #148 lint (see D79 rejected alternatives).
Owner-directed 2026-07-27: the system must scale.