anomalyco / anomalyco/opencode

[FEATURE] Per-folder notebook memory (notes_get/notes_commit) for the agent

Open
#43,068 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

Add per-folder notebook memory so the agent persists what it learns across tasks and reuses it instead of re-exploring code.

What

  • Each folder can carry a .note.yaml with a folder summary, per-file entries, and cross-file relations, grounded in based_on source fingerprints with freshness badges (✓/⚠/✗).
  • notes_get reads the ancestor-chain memory for a path or keyword-searches all notebooks.
  • notes_commit writes summaries/entries/relations with diff approval (write-notes permission), never auto-approved.
  • A concreteness gate rejects summaries that name no concrete symbols, so saved notes are usable mid-task.
  • NotebookAttach prepends the relevant per-file note to read/edit/write/apply_patch output on first touch (opt-out via experimental.notebook.attach = false).
  • The injected digest tells the model it only samples memory and to call notes_get before answering general project questions.
  • Save-learnings nudge after exploring without saving.

Motivation

Agents re-read code they have already mapped; a lightweight, source-grounded per-folder memory with freshness badges avoids that and keeps the map trustworthy.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the notes_get and notes_commit entry points and the NotebookAttach implementation first. Trace how folder memory, source freshness, write-notes approval, concreteness checks, and tool-output attachment are represented. Done means per-folder notes can be read and safely committed, relevant notes attach as specified, and the opt-out and save-learnings behavior work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.