Skip to content

feat(core): rename the home memory workspace to files - #67263

Merged
thdxr merged 4 commits into
devfrom
memory-project-folders
Nov 30, 2026
Merged

thdxr merged 4 commits into
devfrom
memory-project-folders

Conversation

@thdxr

@thdxr thdxr commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

n/a

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

renames the home memory workspace folder to files and tightens its instructions. still behind the existing home_memory flag, which keeps its name.

  • folder moves from ~/.local/share/opencode/memory to ~/.local/share/opencode/files (still memory/, docs/, scripts/ inside), and the reference is now named files with a description that starts "Your personal workspace…"
  • project-specific notes go in a folder per project, memory/projects/<name>/, named after the project, with no rules about what goes inside. rules every contributor should follow stay in the project's own AGENTS.md. same wording in the daily maintenance prompt, which uses each conversation's directory to tell projects apart
  • removes the legacy migration: no copying of old memory/<project-id> folders and no state/<project-id> key migration. only the internal team uses this, so existing folders get moved by hand

How did you verify your code works?

bun run script/test.ts test/plugin/home-memory.test.ts --rerun-each 5 and bun run typecheck:tsc in packages/core, plus bun run check from the root.

Screenshots / recordings

n/a

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@thdxr
thdxr enabled auto-merge (squash) November 30, 2026 06:14

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sound. It's a prompt-only change behind the home_memory flag. The new maintenance instruction relies on each conversation's directory, and that holds: transcripts are already wrapped in <conversation ... directory="...">. The home-memory tests pass and tsc -b type-checks cleanly. I couldn't check whether a model actually follows the per-repo folder layout, because that needs a real model.

Public API is unchanged: the edits are to prompt text only, with no config, schema, plugin API or file-format changes. Existing loose files in memory/projects/ aren't migrated, but the maintenance step that reorganizes files should move them over time.

@thdxr thdxr changed the title feat(core): use a folder per project for project-specific memories feat(core): rename the home memory workspace to files Nov 30, 2026
@thdxr
thdxr merged commit cf9fcc8 into dev Nov 30, 2026
12 checks passed
@thdxr
thdxr deleted the memory-project-folders branch November 30, 2026 06:21

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit is fine. It changes the per-project folder to memory/projects/<name>/, named after the project, and drops the index.md instruction. The maintenance prompt still tells the model to use each conversation's directory, which the transcripts include. The home-memory tests and tsc -b both pass. I couldn't check whether a model actually follows the new layout, because that needs a real model.

Public API is unchanged: the edits are to prompt text only.

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