feat(overlay): add the Lore capture overlay MVP (verified core + Tauri shell scaffold)#202
Open
tcballard wants to merge 6 commits into
Open
feat(overlay): add the Lore capture overlay MVP (verified core + Tauri shell scaffold)#202tcballard wants to merge 6 commits into
tcballard wants to merge 6 commits into
Conversation
The platform-agnostic 'brain' of the Lore capture overlay (Host B of lore-capture-surfaces), as a staging dir in rac-core to extract to its own lore-* repo later. Implements the two-gate flow (ADR-077) over three trait seams (rac / gateway / GitHub): propose (fidelity) then publish, which writes, validates with rac, and opens a DRAFT pull request only. The Publisher trait has no approve/merge method, so a host cannot self-approve. Model calls go through a bring-your-own OpenAI-compatible gateway (ADR-035). Verified by a hermetic cargo test suite plus a real rac-shell test; net clients compile.
The macOS-first Tauri v2 shell that wraps the verified core: a global hotkey summons a modal that runs propose/publish as Tauri commands. Authored as a scaffold and NOT built/run here (it targets macOS and was developed in a Linux container); the README states clearly what is verified (the core) vs not (the desktop build/sign). Provisional product name.
Adds a Preview/Edit segmented control to the Gate-1 review step so the drafted artifact body reads as normal text by default, with a raw editable view a click away. The textarea remains the source of truth for publish. The renderer is a small dependency-free markdown subset (headings, bold, italic, inline code, lists, paragraphs) and escapes HTML before rendering, keeping artifact content treated as untrusted input (ADR-065).
Replaces the hand-rolled markdown subset with markdown-it for full CommonMark fidelity in the Gate-1 body preview. Output is sanitized with DOMPurify before it touches innerHTML and markdown-it runs with html:false, keeping artifact content treated as untrusted input (ADR-065). Extends the rendered-view styles to cover blockquotes, fenced code, tables, links, images, and rules.
Decouples PR granularity from capture cadence. The PR is the trust boundary (ADR-077 Gate 2), not the save action, so its granularity is configurable without weakening the model: - per-capture: a branch and draft PR per capture (current behaviour) - rolling (default): append to a shared capture branch with one batch draft PR, so a maintainer reviews on their cadence, not per artifact - direct: commit to a branch, no PR (a solo repo with no independent reviewer) Splits the Publisher seam into commit_file + ensure_draft_pr — still no approve/merge method by construction, so the two-gate property holds in every mode. Adds a read-only footer showing where a capture lands (repo, branch, mode). Hermetic tests cover all three modes (6 passing).
…verlay] The PR is the trust boundary (ADR-077 Gate 2), not the save action, so its granularity is a configuration choice. Records the three write modes (per-capture, rolling batch default, direct), the constraint that granularity is configurable while the trust boundary is not, and the rolling-batch lifecycle open question. Implements rac/designs/lore-capture-overlay.md.
This was referenced Jul 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A first MVP of the capture overlay (Host B of
lore-capture-surfaces,architecture in
lore-capture-overlay). It is alore-*product (ADR-068)developed here as a staging directory (
lore-overlay/) to extract to its ownitsthelore/lore-overlayrepo later — the develop-in-repo-then-extract patternused for the VS Code extension.
Two surfaces:
lore-overlay/core/— the platform-agnostic capture "brain" (Rust lib).Fully tested here.
lore-overlay/app/— the macOS-first Tauri v2 desktop shell. Authoredscaffold; not built/run (it targets macOS; this was developed in a Linux
container).
Scope
Included
racengine / model gateway / GitHub).
propose(Gate-1 fidelity) →publish(writes, validates with
rac, opens a draft PR only). ThePublishertrait has no approve/merge method, and
publishrefuses any non-draft PR —a host on this core cannot self-approve.
rac(ADR-063); no AI in the engine (ADR-002/067).a minimal two-gate frontend.
README.mdthat states exactly what is verified vs not.Excluded
is the shell's job — an open question in the design).
rac/), or Python change.Product / Architecture Decisions
cargo testruns on Linuxwithout the macOS webview. Network clients (reqwest) sit behind a
netfeatureso the test suite is fast and offline.
propose/publishsteps, and a
Publishertrait with no approve path.Verification
Ran
cd lore-overlay/core && cargo test— 4 hermetic tests pass (propose→publishkeeps frontmatter + opens a draft PR; non-draft PR is refused; minted-id parse;
schema/draft/fill/validate over fakes).
LORE_TEST_RAC="…" cargo test real_rac_client_reads_schema_when_configured—the real
RacClientshells torac schema decision --jsonand parses it.cargo check --features net— the gateway + GitHub clients compile.cargo fmt --check— clean.Not run (cannot, in a Linux container)
cargo tauri build/dev, code signing, notarization — require macOS.CI
rac/,src/, ortests/change, so the Python/rac CI tier is unaffected;the Rust under
lore-overlay/is verified locally as above (CI does not build it).Review Path
lore-overlay/README.md— what this is, verified vs not, how to build on a Mac.lore-overlay/core/src/flow.rs— the two-gate orchestration.lore-overlay/core/src/{rac,gateway,github}.rs— the three seams (traits + real impls).lore-overlay/core/tests/flow_test.rs— the suite.lore-overlay/app/src-tauri/src/lib.rs— the shell wiring (scaffold).Notes For Reviewer
itsthelore/lore-overlayand theproduct rename are follow-ups.
here); treat them as a starting point to verify on macOS.
Implementation Process
Implemented with AI assistance; final scope, review, and acceptance decisions were
made by the maintainer.