Skip to content

Memory model: the active, shared lab notebook (Increments 1 & 2)#53

Closed
pskeshu wants to merge 22 commits into
gently-project:feature/ux-v2from
pskeshu:feature/memory-model
Closed

Memory model: the active, shared lab notebook (Increments 1 & 2)#53
pskeshu wants to merge 22 commits into
gently-project:feature/ux-v2from
pskeshu:feature/memory-model

Conversation

@pskeshu

@pskeshu pskeshu commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

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.md

Stacked on #43 (feature/ux-v2). Branched off feature/ux-v2, so this PR targets it to keep the diff to just the notebook work. Merge/retarget to development after #43 lands.

What's here

Increment 1 — accumulate & browse

  • Note model (3 kinds: Observation/Finding/Question; author/status/confidence/scope/links/artifacts are orthogonal fields, not kinds) + file-backed NotebookStore (atomic YAML, rebuildable reverse-indexes by strain/embryo/thread, scope queries, append-only link/supersede)
  • Producer bridge: apply_updates mirrors observations & learnings into the notebook; FileContextStore.notebook property
  • Read API: GET /api/notebook/notes (filter by kind/author/status/scope/limit), /notes/{id}, /threads
  • Notebook tab (Library rail): thread rail + kind filter + note cards
  • Agent's-View live edge: Home surfaces recent notes → click through to the tab

Increment 2 — reason with it

  • select_notes (structural retrieval) + answer_question (forced-tool_choice synthesis): grounded, every claim cites note ids, "not in notebook" is valid, no self-rated confidence
  • POST /api/notebook/ask + the "Ask the notebook" UI box (coverage badge · cited "Why" points · "Try next")
  • Verified live against Opus 4.8

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

pskeshu and others added 22 commits June 16, 2026 16:01
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.
@pskeshu

pskeshu commented Jun 16, 2026

Copy link
Copy Markdown
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 feature/ux-v2 base. Closing in favor of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant