Move project memory from .g3/ to analysis/ for version control

Project memory is now stored at analysis/memory.md instead of .g3/memory.md.
This change enables:
- Shared memory across git worktrees (studio agent sessions)
- Version-controlled memory that persists across clones
- Memory changes tracked in git history and reviewable in PRs

Changes:
- crates/g3-core/src/tools/memory.rs: Update get_memory_path() to use analysis/
- crates/g3-cli/src/project_files.rs: Update read_project_memory() path
- crates/g3-core/src/prompts.rs: Update documentation references (2 occurrences)
- analysis/memory.md: Add memory file (copied from .g3/memory.md)
This commit is contained in:
Dhanji R. Prasanna
2026-01-12 10:20:33 +05:30
parent 21ecbb3fb8
commit d508ddd508
4 changed files with 174 additions and 7 deletions

View File

@@ -64,10 +64,10 @@ pub fn read_project_readme(workspace_dir: &Path) -> Option<String> {
None
}
/// Read project memory from .g3/memory.md in the workspace directory.
/// Read project memory from analysis/memory.md in the workspace directory.
/// Returns formatted content with emoji prefix and size info, or None if not found.
pub fn read_project_memory(workspace_dir: &Path) -> Option<String> {
let memory_path = workspace_dir.join(".g3").join("memory.md");
let memory_path = workspace_dir.join("analysis").join("memory.md");
if !memory_path.exists() {
return None;