Problem
cora-code currently scatters data across 3+ locations:
| Data |
Current Path |
Source |
| Config + Auth |
~/.cora/ |
config/loader.rs::cora_dir() |
| Review cache |
~/.cache/cora/reviews/ |
engine/cache.rs::cache_dir() |
| Graph DB + update cache |
~/.codecora/cora-code/ ✅ |
data_dir.rs::cora_data_dir() |
This is confusing for users (where is my config?), complicates backups, and fragments the data directory structure.
Proposed Solution
Consolidate all paths to ~/.codecora/cora-code/:
~/.codecora/cora-code/
├── config.yaml (was ~/.cora/config.yaml)
├── auth.toml (was ~/.cora/auth.toml)
├── cora.db (already here ✅)
├── update-cache.json (already here ✅)
└── cache/
└── reviews/ (was ~/.cache/cora/reviews/)
Note: .cora/history/ remains project-local (per-repo, not global).
Migration
Auto-migrate old paths on first run:
- Check if
~/.cora/config.yaml exists and new path doesn't → copy
- Check if
~/.cora/auth.toml exists and new path doesn't → copy
- Check if
~/.cache/cora/reviews/ exists → move to new path
- Print info log: "Migrated config from ~/.cora/ to ~/.codecora/cora-code/"
- Do NOT delete old files (user can clean up manually)
Scope
Problem
cora-code currently scatters data across 3+ locations:
~/.cora/config/loader.rs::cora_dir()~/.cache/cora/reviews/engine/cache.rs::cache_dir()~/.codecora/cora-code/✅data_dir.rs::cora_data_dir()This is confusing for users (where is my config?), complicates backups, and fragments the data directory structure.
Proposed Solution
Consolidate all paths to
~/.codecora/cora-code/:Note:
.cora/history/remains project-local (per-repo, not global).Migration
Auto-migrate old paths on first run:
~/.cora/config.yamlexists and new path doesn't → copy~/.cora/auth.tomlexists and new path doesn't → copy~/.cache/cora/reviews/exists → move to new pathScope
cora_dir()in loader.rs → usedata_dir::cora_data_dir()cache_dir()in cache.rs → usedata_dir::cora_data_dir().join("cache/reviews")/.cora/" → "/.codecora/cora-code/")