From 8210a1dd1dd681c1706a49c9f52b333f72fad5d6 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 19:55:46 +0000 Subject: [PATCH] docs: add Long-term Memory section to TORCH.md This commit updates TORCH.md with a new "Long-term Memory" section. It explains how agents can read past learnings from `.scheduler-memory/latest//memories.md` and persist new learnings by creating a `memory-update.md` file. It also provides examples of good and bad memory content. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- TORCH.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/TORCH.md b/TORCH.md index 7b8e7ac..340309b 100644 --- a/TORCH.md +++ b/TORCH.md @@ -84,6 +84,31 @@ Use the following folders as lightweight coordination artifacts: **Decision note:** Decision, Alternatives considered, Rationale, Consequences/follow-ups. **Test log:** Command, Result (pass/fail/warn), Notes (environmental limits, retries, artifacts). +### Long-term Memory + +While `src/context` and `src/todo` are ephemeral (per session), TORCH provides a durable memory system for transferring knowledge across runs and agents. + +#### Reading Memory +At the start of a session, the scheduler retrieves relevant memories based on your agent identity and current prompt. +- **Source:** `.scheduler-memory/latest//memories.md` +- **Action:** Read this file to learn from past agents (e.g., "The integration test suite is flaky on the login step", "Use `node:test` instead of Jest"). + +#### Writing Memory +To save a learning for future agents, create a memory file before finishing your task. +- **File:** `memory-update.md` (in the repository root). +- **Content:** Concise, high-value insights. +- **Mechanism:** The scheduler will automatically ingest this file after your run completes. + +**Good Memories:** +- "Fix for `EADDRINUSE` in tests: ensure server.close() is called in `after()`." +- "Project preference: Always use named exports for components." +- "Constraint: Do not upgrade `dependency-x` past v2.0 due to breaking change Y." + +**Bad Memories:** +- "I updated file X." (Use git history for this). +- "Running tests..." (Use task logs). +- Large code blocks or entire file dumps. + ### Knowledge-sharing protocol #### What belongs where