refactor: finish state-root migration — all runtime paths now .codewhale

- .gitignore: add deep-swe/ and all_preds.jsonl to prevent accidental commits
- config.rs: home_config_path(), managed_config, requirements, mcp, notes,
  memory all prefer ~/.codewhale/config.toml with .deepseek fallback
- commands/config.rs: config_toml_path() prefers .codewhale
- commands/anchor.rs: anchors_path prefers .codewhale/anchors.md
- commands/note.rs: notes_path prefers .codewhale/notes.md
- skills/install.rs: cache defaults to .codewhale/cache/skills
- skills/mod.rs: global skills discovery includes .codewhale/skills
- file_frecency, clipboard, onboarding, audit, task_manager: all .codewhale
- project-local paths (onboarding trust) still .deepseek for compat

Closes #2231.
This commit is contained in:
Hunter Bown
2026-05-26 15:05:59 -05:00
parent 799d9f8176
commit 8822e9873a
12 changed files with 64 additions and 15 deletions
+3
View File
@@ -100,6 +100,8 @@ apps/
# Maintainer-local SWE-bench scratch (instance workspaces, venvs, predictions,
# Docker harness logs). Never published.
.swebench/
deep-swe/
all_preds.jsonl
# Agent handoffs and version-specific setup plans are working-state notes, not
# public docs. Keep durable setup guidance in docs/runbooks instead.
@@ -111,3 +113,4 @@ docs/*_PLAN.md
# direnv
.envrc
.direnv
scripts/run_deep_swe.py
+1 -1
View File
@@ -41,5 +41,5 @@ fn append_event(event: &str, details: Value) -> anyhow::Result<()> {
fn default_audit_path() -> anyhow::Result<PathBuf> {
let home = dirs::home_dir().ok_or_else(|| anyhow::anyhow!("home directory not found"))?;
Ok(home.join(".deepseek").join("audit.log"))
Ok(home.join(".codewhale").join("audit.log"))
}
+4
View File
@@ -47,6 +47,10 @@ pub fn anchor(app: &mut App, content: Option<&str>) -> CommandResult {
}
fn anchors_path(app: &App) -> std::path::PathBuf {
let primary = app.workspace.join(".codewhale").join("anchors.md");
if primary.exists() {
return primary;
}
app.workspace.join(".deepseek").join("anchors.md")
}
+4
View File
@@ -379,6 +379,10 @@ pub(super) fn config_toml_path(config_path: Option<&Path>) -> anyhow::Result<Pat
}
}
let home = dirs::home_dir().context("failed to resolve home directory for config.toml path")?;
let primary = home.join(".codewhale").join("config.toml");
if primary.exists() {
return Ok(primary);
}
Ok(home.join(".deepseek").join("config.toml"))
}
+4
View File
@@ -39,6 +39,10 @@ pub fn note(app: &mut App, content: Option<&str>) -> CommandResult {
}
fn notes_path(app: &App) -> PathBuf {
let primary = app.workspace.join(".codewhale").join("notes.md");
if primary.exists() {
return primary;
}
app.workspace.join(".deepseek").join("notes.md")
}
+32 -6
View File
@@ -2200,7 +2200,13 @@ pub(crate) fn effective_home_dir() -> Option<PathBuf> {
}
fn home_config_path() -> Option<PathBuf> {
effective_home_dir().map(|home| home.join(".deepseek").join("config.toml"))
effective_home_dir().map(|home| {
let primary = home.join(".codewhale").join("config.toml");
if primary.exists() {
return primary;
}
home.join(".deepseek").join("config.toml")
})
}
#[must_use]
@@ -2363,7 +2369,11 @@ fn default_managed_config_path() -> Option<PathBuf> {
}
#[cfg(not(unix))]
{
effective_home_dir().map(|home| home.join(".deepseek").join("managed_config.toml"))
effective_home_dir().map(|home| {
let primary = home.join(".codewhale").join("managed_config.toml");
if primary.exists() { return primary; }
home.join(".deepseek").join("managed_config.toml")
})
}
}
@@ -2374,7 +2384,11 @@ fn default_requirements_path() -> Option<PathBuf> {
}
#[cfg(not(unix))]
{
effective_home_dir().map(|home| home.join(".deepseek").join("requirements.toml"))
effective_home_dir().map(|home| {
let primary = home.join(".codewhale").join("requirements.toml");
if primary.exists() { return primary; }
home.join(".deepseek").join("requirements.toml")
})
}
}
@@ -2399,15 +2413,27 @@ fn default_skills_dir() -> Option<PathBuf> {
}
fn default_mcp_config_path() -> Option<PathBuf> {
effective_home_dir().map(|home| home.join(".deepseek").join("mcp.json"))
effective_home_dir().map(|home| {
let primary = home.join(".codewhale").join("mcp.json");
if primary.exists() { return primary; }
home.join(".deepseek").join("mcp.json")
})
}
fn default_notes_path() -> Option<PathBuf> {
effective_home_dir().map(|home| home.join(".deepseek").join("notes.txt"))
effective_home_dir().map(|home| {
let primary = home.join(".codewhale").join("notes.txt");
if primary.exists() { return primary; }
home.join(".deepseek").join("notes.txt")
})
}
fn default_memory_path() -> Option<PathBuf> {
effective_home_dir().map(|home| home.join(".deepseek").join("memory.md"))
effective_home_dir().map(|home| {
let primary = home.join(".codewhale").join("memory.md");
if primary.exists() { return primary; }
home.join(".deepseek").join("memory.md")
})
}
// === Environment Overrides ===
+6 -2
View File
@@ -8,7 +8,7 @@ use std::process::Command;
pub const WHALE_BG_RGB: (u8, u8, u8) = (10, 17, 32); // #0A1120 Deep Navy
pub const WHALE_PANEL_RGB: (u8, u8, u8) = (22, 34, 56); // #162238
pub const WHALE_ELEVATED_RGB: (u8, u8, u8) = (36, 52, 78); // #24344E
pub const WHALE_SELECTION_RGB: (u8, u8, u8) = (48, 68, 100); // #304464
pub const WHALE_SELECTION_RGB: (u8, u8, u8) = (40, 56, 84); // #283854 — darker to avoid bright pop on deep navy
pub const WHALE_TEXT_BODY_RGB: (u8, u8, u8) = (246, 242, 232); // #F6F2E8 Whale Ivory
pub const WHALE_TEXT_SOFT_RGB: (u8, u8, u8) = (217, 224, 234); // #D9E0EA
pub const WHALE_TEXT_MUTED_RGB: (u8, u8, u8) = (169, 180, 199); // #A9B4C7 Mist Gray
@@ -244,7 +244,11 @@ pub const TEXT_ACCENT: Color = Color::Rgb(
WHALE_ACCENT_SECONDARY_RGB.1,
WHALE_ACCENT_SECONDARY_RGB.2,
);
pub const SELECTION_TEXT: Color = Color::White;
pub const SELECTION_TEXT: Color = Color::Rgb(
WHALE_TEXT_BODY_RGB.0,
WHALE_TEXT_BODY_RGB.1,
WHALE_TEXT_BODY_RGB.2,
); // Ivory — softer than pure white
pub const TEXT_SOFT: Color = Color::Rgb(
WHALE_TEXT_SOFT_RGB.0,
WHALE_TEXT_SOFT_RGB.1,
+1 -1
View File
@@ -52,7 +52,7 @@ use crate::network_policy::{Decision, NetworkPolicy, host_from_url};
pub fn default_cache_skills_dir() -> PathBuf {
dirs::home_dir().map_or_else(
|| PathBuf::from("/tmp/codewhale/cache/skills"),
|p| p.join(".deepseek").join("cache").join("skills"),
|p| p.join(".codewhale").join("cache").join("skills"),
)
}
+2 -2
View File
@@ -1648,9 +1648,9 @@ pub fn default_tasks_dir() -> PathBuf {
return PathBuf::from(path);
}
if let Some(home) = dirs::home_dir() {
return home.join(".deepseek").join("tasks");
return home.join(".codewhale").join("tasks");
}
PathBuf::from(".deepseek").join("tasks")
PathBuf::from(".codewhale").join("tasks")
}
/// Wait for a task to reach a terminal status (tests and API helpers).
+1 -1
View File
@@ -279,7 +279,7 @@ fn osc52_sequence(text: &str, in_tmux: bool) -> Result<String> {
/// `<workspace>/clipboard-images/` if the home dir is unavailable.
pub(crate) fn clipboard_images_dir(workspace: &Path) -> PathBuf {
if let Some(home) = dirs::home_dir() {
return home.join(".deepseek").join("clipboard-images");
return home.join(".codewhale").join("clipboard-images");
}
workspace.join("clipboard-images")
}
+1 -1
View File
@@ -55,7 +55,7 @@ fn store() -> &'static Mutex<Store> {
}
fn default_path() -> Option<PathBuf> {
dirs::home_dir().map(|h| h.join(".deepseek").join("file-frecency.jsonl"))
dirs::home_dir().map(|h| h.join(".codewhale").join("file-frecency.jsonl"))
}
fn now_secs() -> u64 {
+5 -1
View File
@@ -128,7 +128,11 @@ pub fn tips_lines(app: &App) -> Vec<ratatui::text::Line<'static>> {
}
pub fn default_marker_path() -> Option<PathBuf> {
dirs::home_dir().map(|home| home.join(".deepseek").join(".onboarded"))
dirs::home_dir().map(|home| {
let primary = home.join(".codewhale").join(".onboarded");
if primary.exists() { return primary; }
home.join(".deepseek").join(".onboarded")
})
}
pub fn is_onboarded() -> bool {