[OneDev #17] Compact auto-memory MEMORY.md (354 lines, truncating at load time) #23

Closed
opened 2026-05-24 04:46:38 +00:00 by joseph · 1 comment
Owner

Imported from OneDev issue #17 (id 35305)
Original project: internal-joseph
Original state: Closed
Original submitterId: 5
Original submitDate: 2026-04-11T21:31:49.430+00:00
Original lastActivity: {'date': '2026-04-18T13:30:17.228+00:00', 'description': "changed state to 'Closed'", 'userId': 5}

Original fields:

  • Type: New Feature
  • Priority: Normal
  • Assignees: None

Problem

Local auto-memory index at C:/Users/Joseph/.claude/projects/C--Users-Joseph-OCD-devtech---Documents/memory/MEMORY.md is now 354 lines / ~56KB. The system reminder explicitly warns:

WARNING: MEMORY.md is 347 lines and 56.1KB. Only part of it was loaded. Keep index entries to one line under ~200 chars; move detail into topic files.

This means session startups are already truncating the index — entries near the bottom may not load into context on cold starts. Given the index is sorted newest-first, the oldest entries are most likely to be lost; but since it's supposed to be an active reference index, old-but-active entries (like the lab entry that was just updated) are in the truncation zone.

Scope

  1. Audit every line in MEMORY.md, splitting into:
    • Active — still load-bearing for current PCT work, keep as one-liner
    • Historical — useful context but not load-bearing; move body to a topic file if not already there, delete the index line
    • Stale — no longer true (e.g., references to decommissioned services, superseded decisions) — remove entirely
  2. Hard line budget: ≤200 lines after compaction. That's the comfortable load zone.
  3. Every active entry must be ≤150 chars (per the documented convention) and link to a topic file (file.md) for full detail.
  4. Archive historical content — long-form entries that were inlined in MEMORY.md need to be split into their own topic.md files under memory/ if they aren't already.
  5. Run a final wc -l to verify the new line count.

Constraints

  • Do not delete active feedback memoriesfeedback_*.md pointers are load-bearing for avoiding repeated mistakes. The index line can be shorter, but the topic file stays.
  • Do not delete project memories that represent current live state — anything where the project is actively deployed and accessed.
  • Do delete snapshot/activity journal entries that have been superseded by a newer snapshot — the most recent 2026-04-11 browser-agent stack journal makes the prior few days' journals less critical.

Gate (acceptance)

  • wc -l MEMORY.md ≤ 200
  • grep -cE '^- \[' MEMORY.md accurately reflects number of index entries
  • Cold-start a new Claude Code session; verify the full index loads without truncation warning
  • Spot-check: the most recent and the oldest still-active entries are both present

Effort

S — 1 session, mostly editorial judgment on what's load-bearing vs archival

Refs

  • Warning text at bottom of MEMORY.md
  • System reminder verbatim: "Only part of it was loaded. Keep index entries to one line under ~200 chars; move detail into topic files."
  • Observed during int-lab#9 session 2026-04-11 when updating the lab project entry.
Imported from OneDev issue #17 (id 35305) Original project: internal-joseph Original state: Closed Original submitterId: 5 Original submitDate: 2026-04-11T21:31:49.430+00:00 Original lastActivity: {'date': '2026-04-18T13:30:17.228+00:00', 'description': "changed state to 'Closed'", 'userId': 5} Original fields: - Type: New Feature - Priority: Normal - Assignees: None ## Problem Local auto-memory index at `C:/Users/Joseph/.claude/projects/C--Users-Joseph-OCD-devtech---Documents/memory/MEMORY.md` is now **354 lines / ~56KB**. The system reminder explicitly warns: > WARNING: MEMORY.md is 347 lines and 56.1KB. Only part of it was loaded. Keep index entries to one line under ~200 chars; move detail into topic files. This means session startups are **already truncating** the index — entries near the bottom may not load into context on cold starts. Given the index is sorted newest-first, the oldest entries are most likely to be lost; but since it's supposed to be an active reference index, old-but-active entries (like the `lab` entry that was just updated) are in the truncation zone. ## Scope 1. **Audit every line in MEMORY.md**, splitting into: - **Active** — still load-bearing for current PCT work, keep as one-liner - **Historical** — useful context but not load-bearing; move body to a topic file if not already there, delete the index line - **Stale** — no longer true (e.g., references to decommissioned services, superseded decisions) — remove entirely 2. **Hard line budget: ≤200 lines** after compaction. That's the comfortable load zone. 3. **Every active entry** must be ≤150 chars (per the documented convention) and link to a topic file (`file.md`) for full detail. 4. **Archive historical content** — long-form entries that were inlined in MEMORY.md need to be split into their own `topic.md` files under `memory/` if they aren't already. 5. **Run a final `wc -l`** to verify the new line count. ## Constraints - **Do not delete active feedback memories** — `feedback_*.md` pointers are load-bearing for avoiding repeated mistakes. The index *line* can be shorter, but the topic file stays. - **Do not delete project memories that represent current live state** — anything where the project is actively deployed and accessed. - **Do delete snapshot/activity journal entries that have been superseded** by a newer snapshot — the most recent 2026-04-11 browser-agent stack journal makes the prior few days' journals less critical. ## Gate (acceptance) - `wc -l MEMORY.md` ≤ 200 - `grep -cE '^- \[' MEMORY.md` accurately reflects number of index entries - Cold-start a new Claude Code session; verify the full index loads without truncation warning - Spot-check: the most recent and the oldest still-active entries are both present ## Effort S — 1 session, mostly editorial judgment on what's load-bearing vs archival ## Refs - Warning text at bottom of MEMORY.md - System reminder verbatim: "Only part of it was loaded. Keep index entries to one line under ~200 chars; move detail into topic files." - Observed during int-lab#9 session 2026-04-11 when updating the `lab` project entry.
Author
Owner

Imported from OneDev comment id 381 on issue #17
Original userId: 5
Original date: 2026-04-18T13:30:14.196+00:00

Compacted 2026-04-18.

Before: 435 lines / 78KB (target file was actually the devtech-workspace MEMORY at C:/Users/Joseph/.claude/projects/C--Users-Joseph-OCD-devtech---Documents/memory/MEMORY.md, which had grown past the 354 reported here).

After: 199 lines / 20KB / 109 indexed entries. Under the 200-line gate.

Approach (aggressive):

  • Pre-compaction archive committed to internal-joseph/archive/memory/MEMORY-2026-04-18-pre-compact.md (8fe4596) so history is recoverable.
  • Kept: all feedback_* rules (hard-won), current LIVE service state (Dex, Conduit, Stack Dashboard, m365-tool, Manifold, Pulse, RC-AT, Station, Snipboard, Cloudzy WG, Skyhook, bridge, portal, lab), Proxmox gotchas, SSHubble gotchas, NetBird state, localinf inference config, port map, user preferences, active Deferred/Known Issues.
  • Deleted: every dated journal-<date>-*.md index entry (files still on disk, can grep directly); superseded projects (Vaultwarden, Authentik decomm, breach_check done, agent-journal); the OneDev Project Tree and Repo Architecture sections (derivable from OneDev); the long "Topic Files" directory listing; "Publishable Skills" and "Pulse migrated" sections; stale status lines.
  • Consolidated: related feedback lines (SSH PowerShell + PowerShell over SSH; spec location + plan location + document location; HTML theming trio).

Post-compaction monitoring: flag any session where a recalled fact turns out to be missing from the index (likely pruned too aggressively) — it should be added back as a short one-liner pointing to the topic file that still exists on disk.

Imported from OneDev comment id 381 on issue #17 Original userId: 5 Original date: 2026-04-18T13:30:14.196+00:00 Compacted 2026-04-18. **Before:** 435 lines / 78KB (target file was actually the devtech-workspace MEMORY at `C:/Users/Joseph/.claude/projects/C--Users-Joseph-OCD-devtech---Documents/memory/MEMORY.md`, which had grown past the 354 reported here). **After:** 199 lines / 20KB / 109 indexed entries. Under the 200-line gate. **Approach (aggressive):** - Pre-compaction archive committed to `internal-joseph/archive/memory/MEMORY-2026-04-18-pre-compact.md` (`8fe4596`) so history is recoverable. - **Kept:** all `feedback_*` rules (hard-won), current LIVE service state (Dex, Conduit, Stack Dashboard, m365-tool, Manifold, Pulse, RC-AT, Station, Snipboard, Cloudzy WG, Skyhook, bridge, portal, lab), Proxmox gotchas, SSHubble gotchas, NetBird state, localinf inference config, port map, user preferences, active Deferred/Known Issues. - **Deleted:** every dated `journal-<date>-*.md` index entry (files still on disk, can grep directly); superseded projects (Vaultwarden, Authentik decomm, breach_check done, agent-journal); the OneDev Project Tree and Repo Architecture sections (derivable from OneDev); the long "Topic Files" directory listing; "Publishable Skills" and "Pulse migrated" sections; stale status lines. - **Consolidated:** related feedback lines (`SSH PowerShell` + `PowerShell over SSH`; `spec location` + `plan location` + `document location`; HTML theming trio). **Post-compaction monitoring:** flag any session where a recalled fact turns out to be missing from the index (likely pruned too aggressively) — it should be added back as a short one-liner pointing to the topic file that still exists on disk.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
joseph/internal-joseph#23
No description provided.