Repository navigation
Propose add-doxbench-editing-phase-b: N-buffer editing, per-document threads, governed context packets, OMP harness - #205
Conversation
…threads, governed context packets, OMP harness Phase B and the EXIT of the `doxbench-editing-model` staged topic: all seven questions dispositioned, 26 claims settled (Brett's live-UI annotations and in-session rulings, 2026-08-15 -> 2026-08-18). Phase A was a layout-and-binding change on proven substrate; Phase B is the state-model generalization plus the working-session model the memory ruling added on top of it. The `ideation-dashboard` delta carries eight MODIFIED requirements (five promoted, three declared relative to Phase A's outcome per release-realization's ordered-deltas rule) and nine ADDED. `memory-gateway` gets one delta of its own after a full read: a declared subject-free local consumer class that must name every rail it declares inapplicable, refused to any consumer holding provider credentials or addressing a subject. Ruled scope: the buffer set widens to outline + N loaded documents (state validator, require_outline_and_document/PROPOSAL_TARGETS, and SAVE_BUFFER_ORDER re-cut together, the fixed pair becoming a rule -- outline first as session ancestry, then documents independently, so one document's refusal stops no other); a loaded-document dropdown in the rail whose selection IS the active buffer; read/edit/save on the docs-wheel tile with a colored loaded-and-dirty state; a persisted thread per document with a structured thread-state header, committing on that document's Save; share-session as an explicit commit-push-return-the-ref verb reusing the pull-request port's existing `push` member and opening no PR; per-turn context as a memory-gateway bounded context packet assembled by the Staged-Set Knowledge Service behind one MCP boundary over an internal assembly port, graph-less in v1 with a named graduation trigger and an install-time backend declaration; the three-layer compression stack with Headroom watch-listed rather than adopted; and the oh-my-pi harness behind a thin stdlib bridge that is an adapter for the unchanged three-member WorkbenchModelPort. The chat-turn contract release discharges Phase A's F2 carve-out -- the turn record names the DECLARED bound buffer, plus selected-model metadata -- realized as a co-resident envelope family so the release is additive and the bundle minor is allocated at realization, never reserved here. Seven verify-list items are BLOCKING pre-realization tasks. Validation: `openspec validate add-doxbench-editing-phase-b --strict` green and `--all --strict` green (61/61); doc-health pre/post identical with zero new findings. Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
Pull request overview
This pull request proposes and records the Phase B generalization of the doxBench editing model as an OpenSpec change: widening from a fixed two-buffer editor to an outline + N loaded-documents keyed buffer set, adding per-document threads, and introducing a governed, bounded context-packet assembly model aligned with memory-gateway (including a small proposed memory-gateway contract delta for subject-free local consumers).
Changes:
- Adds the Phase B OpenSpec change package (proposal, design, tasks, and per-capability specs) describing N-buffer editing, per-document threads, share-session semantics, and a staged-set knowledge service with a bounded context packet and compression stack.
- Introduces a
memory-gatewaydelta spec describing a “subject-free local consumer class” requirement to make inapplicable rails explicit and auditable. - Updates the repository README “OpenSpec Records” to include the new active change entry.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds an “Active changes” record entry summarizing Phase B and its intended scope. |
| openspec/changes/add-doxbench-editing-phase-b/tasks.md | Adds the phased task breakdown including the verify-list gate and downstream realization plan. |
| openspec/changes/add-doxbench-editing-phase-b/specs/memory-gateway/spec.md | Defines the proposed new memory-gateway requirement for subject-free local consumers to declare inapplicable rails. |
| openspec/changes/add-doxbench-editing-phase-b/specs/ideation-dashboard/spec.md | Defines Phase B modifications/additions for doxBench (keyed buffer set, selector semantics, per-doc threads, share-session, bounded packets, compression, harness bridge, contract release shape). |
| openspec/changes/add-doxbench-editing-phase-b/proposal.md | Adds the formal proposal narrative, scope, sequencing, and conformance rationale. |
| openspec/changes/add-doxbench-editing-phase-b/design.md | Adds the detailed design decisions and mechanism breakdown for Phase B. |
| openspec/changes/add-doxbench-editing-phase-b/.openspec.yaml | Declares the OpenSpec metadata, staged origin, and sequencing dependency on Phase A. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - **THEN** it MUST be rejected — membership is session-local, and a generator cannot observe a live browser | ||
|
|
||
| ### Requirement: The loaded-document selector names the working document | ||
| The chat rail SHALL carry a SELECTOR listing every loaded document, and its selected entry SHALL BE the selected buffer that the canvas presents and the chat binds to. The selector SHALL be a scrolling list rather than a fixed-width row of chips, so a session that accumulates many loaded documents needs no folding, overflow, or least-recently-used eviction policy — the control is the overflow mechanism. An entry whose filename does not fit on one line SHALL reveal its full name on hover and to assistive technology, and MUST NOT be silently truncated or ellipsized into ambiguity with another entry. Every entry SHALL be distinguishable when two loaded documents share a basename, because a selector that cannot tell two files apart is worse than one that shows a longer name. The selector SHALL be keyboard-reachable and operable with the surface's established selection semantics, and MUST NOT introduce a second spelling of selection beside the one the surface already uses. Selecting an entry SHALL be immediate, SHALL switch the transcript to that document's thread, and MUST NOT be the surface's only route to selection: loading a document and focusing the `outline` selection tab SHALL both continue to select, and every route SHALL leave the selector, the canvas, and the chat agreeing about which buffer is selected. Where no document is loaded, the selector SHALL render its empty state honestly rather than hiding, and the `outline` buffer SHALL remain selectable and workable on its own. |
| other); the chat rail header becomes a DROPDOWN of the loaded documents whose | ||
| selection IS the active buffer (Q1's numbered chips and LRU fold are | ||
| overridden — the dropdown is the overflow policy, and the set is bounded and | ||
| refuses rather than evicting text); the docs-wheel tile carries read / edit / |
… Brett's explicit word This was the one archived proposal among forty-four carrying `Status: ratified` with no ratification citation. The promoted rule in `openspec/specs/document-lifecycle/spec.md` makes a bare uncited `ratified` header a violation whatever else the document says, and `sanction-ratified-record-spelling` parked this record at its tasks.md 5.2 as out of scope, routed through a citing change. This is that change. THE RATIFICATION FACT, DERIVED FROM THE RECORD RATHER THAN ASSUMED. Three points on this change's own record name it: * The archive commit `02a71d6` (PR #264, 2026-08-22): "Archived on Brett's explicit word, through proposal-support.py's archive verb". PR #264's body opens "Brett's word given." * Task 13.8, written before the archive: "`proposal-support.py archive` is the sanctioned path and it is Brett's act on his explicit word, not a consequence of this box being checked." * The commit inside PR #264 that actually WROTE the `ratified` value -- `bdd09c2`, "Bot round on the archive: a mislabelled sha and a stale proposal Status" -- recording why: "a change whose spec deltas have PROMOTED is ratified by construction." So the ratification is the archive act and the promotion it performed, Brett Heap, 2026-08-22 -- an approver, a date, and a resolvable record, all three axes of the record-citing form's floor. THE HEADER'S HISTORY IS NOT WHAT A READER WOULD ASSUME, and it was checked commit by commit. The proposal read `Status: draft` from its proposing commit `d3d7f58` (2026-08-18, PR #205) through EVERY realization slice -- `e7e7a84`, `a4a6f6e`, `5daa173`, `ece236a`, `4926b7c`, `08c5aa9`, `0f50b35`, `671a690` -- and `ratified` was written only at the archive, on a Codex review finding. THE ORIGIN PAIR IS DELIBERATELY NOT CITED. `.openspec.yaml` carries `approved_by: Brett Heap (live-UI annotations and in-session rulings ...)` and `approved_on: 2026-08-18`, but those fields are nested under `origin:` and approve the staged topic's EXIT and this change's authoring. Citing them is the error `docs/archive-record-discrepancies.md` C2 names: "Reading them as ratification would date each change's ratification to the day it was proposed." B1's phase-a citation, which did cite an `.openspec.yaml` pair, is not a precedent -- the register states its condition, "its `approved_on` coincided with the ratification", and that fails here by four days. PRs #206 and #207 do call this a "ratified change" in prose, but that is builder prose written against a header still reading `draft`, and no ratification act distinct from the origin approval is recorded on 2026-08-18; it is reported, not cited. `Ratified:` is the correct spelling, verified rather than assumed: no approving OpenSpec change exists. The only other changes naming this one are Phase A, its two citers, and `sanction-ratified-record-spelling`, which found this defect. THE ORIGINAL RECORD STANDS WORD FOR WORD -- the diff is 96 insertions and zero deletions, so unlike Phase A's own bookkeeping correction (which had to overwrite the `Status:` value) the 2026-08-10 append ruling is honoured literally. Reasoning recorded in phase-b's tasks.md "Bookkeeping correction"; 5.2's phase-b half discharged inline with a dated suffix, its roster-device half left open and the box left unticked. Gates: `openspec validate --all --strict` 68 passed / 0 failed (main moved from 67 while this was authored); `tests/doc-health` 724 passed, unmoved before and after; `tests/ideation-dashboard -k workbench` 140 passed. Census re-measured the way the sanction authoring did: 88 archived proposals, 44 `Status: ratified`, 44 carrying exactly one citation, 0 missing. The line was also driven through the real checker helpers -- `fam_ratified_provenance`'s count is 1 and all three floor axes read True, with three resolvable record paths. Co-Authored-By: Claude Fable 5 <[email protected]>
Phase B and the exit of the
doxbench-editing-modelstaged topic. Every oneof its seven questions now carries a disposition other than
openand its 26claims are settled — Brett's live-UI annotations of 2026-08-18 (Q1's
loaded-document dropdown, Q3's read/edit/save tile) and his in-session ruling of
the same day, extended by a verification pass, for Q7's two-plane memory design.
Phase A was the half of the model that fit the existing two-buffer machinery;
this is the state-model generalization plus the working-session model the memory
ruling added on top of it.
Propose = read it. Do not merge on my account.
The ruled scope, and where each piece comes from
outline+ N loaded documents; state validator,require_outline_and_document/PROPOSAL_TARGETSandSAVE_BUFFER_ORDERre-cut together; per-buffer stale guard unchangedgraph_queryreserved), internal assembly port, graph-less v1, named graduation trigger, install-time backend declaration, lifecycle-status compression exemption, source-ranking hierarchy in the system promptWorkbenchModelPort; one harness session per thread; sidecars are the record;autodeclares itself a routing ruleThe delta:
ideation-dashboard— 8 MODIFIED (5 promoted; 3 declaredrelative to Phase A's outcome per
release-realization's ordered-deltas rule,since Phase A is active and unarchived) and 9 ADDED.
memory-gateway— 1 ADDED.Memory-gateway conformance
Claim 22 attached an honest flag: this may be the contract's first live
consumer, so read the full spec rather than inherit the summary. Done, and the
answer is that memory-gateway needs one small delta of its own.
Realized:
Context Packets Bound Runtime Memory,Canonical Ports Are Product Neutral,Provider Profiles Declare Capability,Rails Run Before Provider I/O,Gateway Mediates Governed Memory Access,Gateway Callers … Hold No Provider Credentials,Fail Modes Are Explicit(M0);Worker-Local Memory Remains SeparateandPromotions Are Explicit And Reviewed(M1). Honestlynarrowed: the promotion requirement's own scenarios speak of customer→client/
domain layers while this consumer's target is a lifecycle document, so what is
realized is its rule, not its vocabulary.
Usage Metering(M3) is partial —telemetry is emitted, but a self-hosted console has no client/domain/bill-to.
Not applicable: consent, subject safety, provider bindings and short-lived
grants, revocation, erasure, migration, provider mapping, the customer fill
modes, the derived-binding schema.
That is the gap. As written, a subject-free consumer with no credentialed
provider can only claim conformance while quietly skipping half of M0, or
decline the contract and lose its vocabulary. The delta adds one requirement:
a declared subject-free local consumer class that must NAME every rail it
declares inapplicable and why, refused to any consumer holding provider
credentials or addressing a subject, and LOST the moment either appears. It
grants no exemption and relaxes no rail — it makes an absence auditable.
governed-derived-modelis handled differently and flagged: its conformancesurface is a DomainxFactory declaration over template-backed kinds, which an
authoring surface has no place in, so Phase B asserts the derived-model
PROPERTIES in its own requirements and does not claim a tier
(design §7.2).
xfactory-semantic-kernelis carried as a graph-graduationprecondition rather than a v1 dependency (§7.3).
Verify-list gating
Seven items the ruling depends on that our own research has not independently
confirmed are BLOCKING tasks (§3 of
tasks.md): the harness's memory backends,its MCP client depth, whether it re-reads
SYSTEM.mdper turn, Cognee's currentembedded backend after the Kuzu archival, where the
artifact://store lands ondisk,
/shake's programmatic surface in RPC mode, and memory-gateway'srealization depth elsewhere in xFactory. Each is verified and its finding
recorded — including "verified as assumed" — before the slice that depends on it
starts, because several could change a mechanism rather than a setting.
Non-goals, explicit
A graph engine in any form (not behind a flag); Headroom or any third-party
compression proxy; any cloud/hosted backend as a default; anything on the hosted
plane; a fourth model-port member; a parallel decision store or automatic
promotion of a thread finding; a
graph_queryimplementation; retiring theoutline's reserved ancestry role; and re-cutting the provider credential lane,
which stays
add-model-provider-broker's subject.Three things flagged for your ratification read
that is in the preview panel" + "save only active if there are changes" do
not fully determine it. I ruled it SCOPED to that document plus the
outline-ancestry step, on the same asymmetry argument Phase A used for
Cancel. The alternative — literally the panel Save, drawn a third time,
persisting everything dirty — is one sentence away.
family with v1 byte-identical and deprecated, so the bundle takes the next
MINOR and the file's
contract_schema_versionstays 1. If your ruling isthat any new envelope family bumps the file's contract version regardless of
backward compatibility, this becomes a major — and a major drags
contract-v2.0's queued removals (thehermesflat keys,openworkflow_tokens) along with a doxBench wire widening.
governed-derived-modelat property level, not declaration level(§7.2), as above.
Also worth knowing: archive order matters. Phase A must archive first, or
the promoted spec keeps its F2 deferral clause with nothing discharging it and
three of these MODIFIED requirements have nothing to amend.
tasks.md13.7carries that as a check.
Verification
OPENSPEC_TELEMETRY=0 openspec validate add-doxbench-editing-phase-b --strict→
Change 'add-doxbench-editing-phase-b' is validOPENSPEC_TELEMETRY=0 openspec validate --all --strict→Totals: 61 passed, 0 failed (61 items)3 critical, 6 error, 70 warning, 3 infoboth times;new-findings diff is
[].🤖 Generated with Claude Code