Memory model: the active, shared lab notebook (Increments 1 & 2)#53
Closed
pskeshu wants to merge 22 commits into
Closed
Memory model: the active, shared lab notebook (Increments 1 & 2)#53pskeshu wants to merge 22 commits into
pskeshu wants to merge 22 commits into
Conversation
Captures the brainstormed design for gently's memory substrate — the agent+human shared lab notebook (concept trace: gently-project#52): - 3-kind model (Observation/Finding/Question) with author/status/confidence/ scope/links/artifacts as orthogonal fields, not kinds - working-memory vs durable-notebook lifespan split; Question as the hinge between the notebook (knowing) and the plan layer (doing) - two-faced presentation: Notebook tab in LIBRARY + Agent's View reborn as the ambient live edge - retrieval principle: structure→indexes, meaning→models, grounded structured output; embeddings as a rebuildable sidecar - what we keep from the old agent mind vs what we fix (dormant apply_updates loop, siloed types, no provenance/links/consolidation) - build decomposition into 5 increments; first slice = the foundation keystone Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…keystone Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Thread rail + kind filter + note cards (color-coded by kind, with author, status, and scope chips), consuming /api/notebook. Wired into the v2 rail and the legacy tab bar, lazy-init via switchTab, live-refresh on CONTEXT_UPDATED. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Question field -> POST /api/notebook/ask, rendering the grounded answer with a coverage badge, cited 'Why' points (note-id chips), and 'Try next' steps. Asks within the selected thread scope. Verified live against Opus 4.8.
Collaborator
Author
|
Superseded by #58, which combines the notebook (increments 1 & 2) with the imaging Run button — the whole UX v2 feature set in one PR, on the same |
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.
Builds the shared lab notebook — gently's memory substrate. The agent and the scientist co-author one living, accumulating body of knowledge that both read, browse, and reason with.
Concept trace: #52 · Design doc:
docs/superpowers/specs/2026-06-16-shared-lab-notebook-design.mdWhat's here
Increment 1 — accumulate & browse
Notemodel (3 kinds: Observation/Finding/Question; author/status/confidence/scope/links/artifacts are orthogonal fields, not kinds) + file-backedNotebookStore(atomic YAML, rebuildable reverse-indexes by strain/embryo/thread, scope queries, append-only link/supersede)apply_updatesmirrors observations & learnings into the notebook;FileContextStore.notebookpropertyGET /api/notebook/notes(filter by kind/author/status/scope/limit),/notes/{id},/threadsIncrement 2 — reason with it
select_notes(structural retrieval) +answer_question(forced-tool_choicesynthesis): grounded, every claim cites note ids, "not in notebook" is valid, no self-rated confidencePOST /api/notebook/ask+ the "Ask the notebook" UI box (coverage badge · cited "Why" points · "Try next")Principles honored
Append-only evidence; supersede-never-overwrite; human vs agent as attributed authors; grounded + cited; confidence derived, never self-rated; structure→indexes, meaning→models.
Tests
~39 notebook tests (
tests/test_notebook_store.py,test_notebook_api.py,test_notebook_ask.py) — run with.venv/bin/python -m pytest tests/test_notebook*.Not in this PR (follow-on increments)
Human authoring/annotation · proactive surfacing & consolidation · cross-system sharing · embeddings for semantic recall (retrieval is structural-only so far).
🤖 Generated with Claude Code