From 000b865815e7eccfdce74de5eeb529190150ec71 Mon Sep 17 00:00:00 2001 From: phall Date: Sun, 16 Aug 2026 21:49:29 -0400 Subject: [PATCH] fix(doctor): clear the standing dot-doctor warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Four warnings were reported on every run. Three were real and one could not be answered from a non-interactive process. chezmoi drift: seven targets reported as modified outside chezmoi. Two were mode-only and permanent by construction — blackbird install writes .codex/config.toml at 0600 and pi keeps ~/.pi/agent at 0700, while the source declared 0644 and 0755, so every apply lost the race. The sources are now private, which both matches reality and is the safer mode. Renaming those sources broke three hardcoded references, in checks/pi.sh, checks/chezmoi.sh and renovate.json, which are updated here. Of the remaining drift, .zshrc and .grok/config.toml carried live edits that apply would have deleted, a kimi-code PATH export and the [models] default selection, so both are captured into source rather than reverted. The opencode plugin config, the autoresearch pin and the update-check launch agent were deliberately newer in source and are applied. gitstatusd: p10k spawns it lazily on the first prompt render, so a non-interactive doctor run can never observe it and the warning carried no signal. Counting zsh processes does not help either, since every tool-spawned subshell is one. The check now reports the daemon when running, accepts the binary being present, and warns only when the binary is missing, which is the condition that actually degrades the prompt. lstags was absent because its run_onchange build had not fired; it is built and installed. The stale .zwc was regenerated with dot-zcompile. .claude/settings.json is left drifting deliberately. Its source is a modify_ script asserting permissions.defaultMode=bypassPermissions while the live file says auto, so this is a standing disagreement about permission posture rather than drift, and it is not mine to settle. Co-Authored-By: Claude Opus 5 (1M context) --- checks/chezmoi.sh | 4 ++-- checks/pi.sh | 2 +- checks/zsh.sh | 10 +++++++++- ...ify_config.toml => modify_private_config.toml} | 0 dot_grok/config.toml | 15 +++++++++------ dot_pi/{agent => private_agent}/AGENTS.md.tmpl | 0 dot_pi/{agent => private_agent}/APPEND_SYSTEM.md | 0 dot_pi/{agent => private_agent}/TODO.md | 0 .../{agent => private_agent}/extensions/README.md | 0 .../extensions/dirty-repo-guard.ts.disabled | 0 .../extensions/example.ts.disabled | 0 .../extensions/git-checkpoint.ts.disabled | 0 .../extensions/permission-gate.ts.disabled | 0 .../extensions/role-profile.ts | 0 .../extensions/subagent/config.json | 0 dot_pi/{agent => private_agent}/keybindings.json | 0 .../{agent => private_agent}/modify_settings.json | 0 dot_pi/{agent => private_agent}/packages/.gitkeep | 0 dot_pi/{agent => private_agent}/prompts/README.md | 0 .../{agent => private_agent}/prompts/architect.md | 0 dot_pi/{agent => private_agent}/prompts/commit.md | 0 dot_pi/{agent => private_agent}/prompts/debug.md | 0 .../{agent => private_agent}/prompts/explain.md | 0 .../{agent => private_agent}/prompts/handoff.md | 0 .../{agent => private_agent}/prompts/implement.md | 0 .../{agent => private_agent}/prompts/refactor.md | 0 dot_pi/{agent => private_agent}/prompts/review.md | 0 dot_pi/{agent => private_agent}/prompts/test.md | 0 .../settings.json.reference | 0 dot_pi/{agent => private_agent}/skills/README.md | 0 .../skills/example-skill/SKILL.md | 0 .../{agent => private_agent}/symlink_node_modules | 0 dot_pi/{agent => private_agent}/themes/README.md | 0 .../themes/blackwater-rust.json | 0 dot_zshrc | 3 +++ renovate.json | 2 +- 36 files changed, 25 insertions(+), 11 deletions(-) rename dot_codex/{modify_config.toml => modify_private_config.toml} (100%) rename dot_pi/{agent => private_agent}/AGENTS.md.tmpl (100%) rename dot_pi/{agent => private_agent}/APPEND_SYSTEM.md (100%) rename dot_pi/{agent => private_agent}/TODO.md (100%) rename dot_pi/{agent => private_agent}/extensions/README.md (100%) rename dot_pi/{agent => private_agent}/extensions/dirty-repo-guard.ts.disabled (100%) rename dot_pi/{agent => private_agent}/extensions/example.ts.disabled (100%) rename dot_pi/{agent => private_agent}/extensions/git-checkpoint.ts.disabled (100%) rename dot_pi/{agent => private_agent}/extensions/permission-gate.ts.disabled (100%) rename dot_pi/{agent => private_agent}/extensions/role-profile.ts (100%) rename dot_pi/{agent => private_agent}/extensions/subagent/config.json (100%) rename dot_pi/{agent => private_agent}/keybindings.json (100%) rename dot_pi/{agent => private_agent}/modify_settings.json (100%) rename dot_pi/{agent => private_agent}/packages/.gitkeep (100%) rename dot_pi/{agent => private_agent}/prompts/README.md (100%) rename dot_pi/{agent => private_agent}/prompts/architect.md (100%) rename dot_pi/{agent => private_agent}/prompts/commit.md (100%) rename dot_pi/{agent => private_agent}/prompts/debug.md (100%) rename dot_pi/{agent => private_agent}/prompts/explain.md (100%) rename dot_pi/{agent => private_agent}/prompts/handoff.md (100%) rename dot_pi/{agent => private_agent}/prompts/implement.md (100%) rename dot_pi/{agent => private_agent}/prompts/refactor.md (100%) rename dot_pi/{agent => private_agent}/prompts/review.md (100%) rename dot_pi/{agent => private_agent}/prompts/test.md (100%) rename dot_pi/{agent => private_agent}/settings.json.reference (100%) rename dot_pi/{agent => private_agent}/skills/README.md (100%) rename dot_pi/{agent => private_agent}/skills/example-skill/SKILL.md (100%) rename dot_pi/{agent => private_agent}/symlink_node_modules (100%) rename dot_pi/{agent => private_agent}/themes/README.md (100%) rename dot_pi/{agent => private_agent}/themes/blackwater-rust.json (100%) diff --git a/checks/chezmoi.sh b/checks/chezmoi.sh index fce2308..b0e75a9 100644 --- a/checks/chezmoi.sh +++ b/checks/chezmoi.sh @@ -29,12 +29,12 @@ fi # A modify_ script's stdout REPLACES its target file, so a script that fails # and prints nothing truncates the config to zero bytes. That is exactly what -# dot_codex/modify_config.toml did once tomlq was installed: its merge fed both +# dot_codex/modify_private_config.toml did once tomlq was installed: its merge fed both # TOML documents in as one stream, tomlq rejected the duplicate tables, and the # script emitted nothing. Checking "is tomlq installed" would not have caught # it -- installing tomlq is what triggered it. So smoke-test the real invariant # instead: feed the script the live config and require usable output back. -modify_script="$DOTFILES/dot_codex/modify_config.toml" +modify_script="$DOTFILES/dot_codex/modify_private_config.toml" codex_cfg="$HOME/.codex/config.toml" if [[ -f "$modify_script" && -f "$codex_cfg" ]]; then out=$(sh "$modify_script" < "$codex_cfg" 2>/dev/null) diff --git a/checks/pi.sh b/checks/pi.sh index 55c589f..e9d40f8 100644 --- a/checks/pi.sh +++ b/checks/pi.sh @@ -3,7 +3,7 @@ hdr "pi agent stack" pi_settings="$HOME/.pi/agent/settings.json" -pi_modify="$DOTFILES/dot_pi/agent/modify_settings.json" +pi_modify="$DOTFILES/dot_pi/private_agent/modify_settings.json" subagent_config="$HOME/.pi/agent/extensions/subagent/config.json" module_bridge="$HOME/.pi/agent/node_modules" mcp_config="$HOME/.config/mcp/mcp.json" diff --git a/checks/zsh.sh b/checks/zsh.sh index eea5084..7c3ae92 100644 --- a/checks/zsh.sh +++ b/checks/zsh.sh @@ -56,10 +56,18 @@ if [[ -d "$ZSH_PLUGIN_DIR/powerlevel10k" ]]; then else warn "p10k instant-prompt cache missing — first shell after install is slow until generated" fi + # p10k spawns gitstatusd lazily, on the first prompt render. dot-doctor runs + # non-interactively, so absence here carries no signal: it means no prompt has + # rendered in this context, not that anything is wrong. Counting zsh processes + # does not help either — every tool-spawned subshell is one. Only report the + # daemon when it is present, and only warn when it cannot possibly start. + gitstatusd_bin="$(find "${XDG_CACHE_HOME:-$HOME/.cache}/gitstatus" -maxdepth 1 -name 'gitstatusd-*' -perm -u+x 2>/dev/null | head -1)" if pgrep -x gitstatusd >/dev/null 2>&1; then ok "gitstatusd daemon alive" + elif [[ -n "$gitstatusd_bin" ]]; then + ok "gitstatusd binary present (spawns on first interactive prompt)" else - warn "gitstatusd not running (interactive shell hasn't started yet?)" + warn "gitstatusd binary missing — p10k falls back to slow git status" fi fi diff --git a/dot_codex/modify_config.toml b/dot_codex/modify_private_config.toml similarity index 100% rename from dot_codex/modify_config.toml rename to dot_codex/modify_private_config.toml diff --git a/dot_grok/config.toml b/dot_grok/config.toml index 776bc3b..8e2ec5c 100644 --- a/dot_grok/config.toml +++ b/dot_grok/config.toml @@ -26,6 +26,12 @@ context_window = 272000 command = "grok-codex-token" timeout_secs = 10 +[model_providers.openai] +base_url = "https://api.openai.com/v1" +api_backend = "responses" +env_key = "OPENAI_API_KEY" +context_window = 400000 + [model."chatgpt-gpt-5.6-sol"] model = "gpt-5.6-sol" name = "GPT-5.6 Sol (ChatGPT)" @@ -68,12 +74,6 @@ description = "Small, fast model for simpler coding tasks" model_provider = "chatgpt" responses_system_role_developer = true -[model_providers.openai] -base_url = "https://api.openai.com/v1" -api_backend = "responses" -env_key = "OPENAI_API_KEY" -context_window = 400000 - [model."openai-gpt-5.6-sol"] model = "gpt-5.6-sol" name = "GPT-5.6 Sol (OpenAI API)" @@ -110,3 +110,6 @@ model = "gpt-5.4-mini" name = "GPT-5.4 Mini (OpenAI API)" description = "OpenAI API model using OPENAI_API_KEY" model_provider = "openai" + +[models] +default = "chatgpt-gpt-5.6-sol" diff --git a/dot_pi/agent/AGENTS.md.tmpl b/dot_pi/private_agent/AGENTS.md.tmpl similarity index 100% rename from dot_pi/agent/AGENTS.md.tmpl rename to dot_pi/private_agent/AGENTS.md.tmpl diff --git a/dot_pi/agent/APPEND_SYSTEM.md b/dot_pi/private_agent/APPEND_SYSTEM.md similarity index 100% rename from dot_pi/agent/APPEND_SYSTEM.md rename to dot_pi/private_agent/APPEND_SYSTEM.md diff --git a/dot_pi/agent/TODO.md b/dot_pi/private_agent/TODO.md similarity index 100% rename from dot_pi/agent/TODO.md rename to dot_pi/private_agent/TODO.md diff --git a/dot_pi/agent/extensions/README.md b/dot_pi/private_agent/extensions/README.md similarity index 100% rename from dot_pi/agent/extensions/README.md rename to dot_pi/private_agent/extensions/README.md diff --git a/dot_pi/agent/extensions/dirty-repo-guard.ts.disabled b/dot_pi/private_agent/extensions/dirty-repo-guard.ts.disabled similarity index 100% rename from dot_pi/agent/extensions/dirty-repo-guard.ts.disabled rename to dot_pi/private_agent/extensions/dirty-repo-guard.ts.disabled diff --git a/dot_pi/agent/extensions/example.ts.disabled b/dot_pi/private_agent/extensions/example.ts.disabled similarity index 100% rename from dot_pi/agent/extensions/example.ts.disabled rename to dot_pi/private_agent/extensions/example.ts.disabled diff --git a/dot_pi/agent/extensions/git-checkpoint.ts.disabled b/dot_pi/private_agent/extensions/git-checkpoint.ts.disabled similarity index 100% rename from dot_pi/agent/extensions/git-checkpoint.ts.disabled rename to dot_pi/private_agent/extensions/git-checkpoint.ts.disabled diff --git a/dot_pi/agent/extensions/permission-gate.ts.disabled b/dot_pi/private_agent/extensions/permission-gate.ts.disabled similarity index 100% rename from dot_pi/agent/extensions/permission-gate.ts.disabled rename to dot_pi/private_agent/extensions/permission-gate.ts.disabled diff --git a/dot_pi/agent/extensions/role-profile.ts b/dot_pi/private_agent/extensions/role-profile.ts similarity index 100% rename from dot_pi/agent/extensions/role-profile.ts rename to dot_pi/private_agent/extensions/role-profile.ts diff --git a/dot_pi/agent/extensions/subagent/config.json b/dot_pi/private_agent/extensions/subagent/config.json similarity index 100% rename from dot_pi/agent/extensions/subagent/config.json rename to dot_pi/private_agent/extensions/subagent/config.json diff --git a/dot_pi/agent/keybindings.json b/dot_pi/private_agent/keybindings.json similarity index 100% rename from dot_pi/agent/keybindings.json rename to dot_pi/private_agent/keybindings.json diff --git a/dot_pi/agent/modify_settings.json b/dot_pi/private_agent/modify_settings.json similarity index 100% rename from dot_pi/agent/modify_settings.json rename to dot_pi/private_agent/modify_settings.json diff --git a/dot_pi/agent/packages/.gitkeep b/dot_pi/private_agent/packages/.gitkeep similarity index 100% rename from dot_pi/agent/packages/.gitkeep rename to dot_pi/private_agent/packages/.gitkeep diff --git a/dot_pi/agent/prompts/README.md b/dot_pi/private_agent/prompts/README.md similarity index 100% rename from dot_pi/agent/prompts/README.md rename to dot_pi/private_agent/prompts/README.md diff --git a/dot_pi/agent/prompts/architect.md b/dot_pi/private_agent/prompts/architect.md similarity index 100% rename from dot_pi/agent/prompts/architect.md rename to dot_pi/private_agent/prompts/architect.md diff --git a/dot_pi/agent/prompts/commit.md b/dot_pi/private_agent/prompts/commit.md similarity index 100% rename from dot_pi/agent/prompts/commit.md rename to dot_pi/private_agent/prompts/commit.md diff --git a/dot_pi/agent/prompts/debug.md b/dot_pi/private_agent/prompts/debug.md similarity index 100% rename from dot_pi/agent/prompts/debug.md rename to dot_pi/private_agent/prompts/debug.md diff --git a/dot_pi/agent/prompts/explain.md b/dot_pi/private_agent/prompts/explain.md similarity index 100% rename from dot_pi/agent/prompts/explain.md rename to dot_pi/private_agent/prompts/explain.md diff --git a/dot_pi/agent/prompts/handoff.md b/dot_pi/private_agent/prompts/handoff.md similarity index 100% rename from dot_pi/agent/prompts/handoff.md rename to dot_pi/private_agent/prompts/handoff.md diff --git a/dot_pi/agent/prompts/implement.md b/dot_pi/private_agent/prompts/implement.md similarity index 100% rename from dot_pi/agent/prompts/implement.md rename to dot_pi/private_agent/prompts/implement.md diff --git a/dot_pi/agent/prompts/refactor.md b/dot_pi/private_agent/prompts/refactor.md similarity index 100% rename from dot_pi/agent/prompts/refactor.md rename to dot_pi/private_agent/prompts/refactor.md diff --git a/dot_pi/agent/prompts/review.md b/dot_pi/private_agent/prompts/review.md similarity index 100% rename from dot_pi/agent/prompts/review.md rename to dot_pi/private_agent/prompts/review.md diff --git a/dot_pi/agent/prompts/test.md b/dot_pi/private_agent/prompts/test.md similarity index 100% rename from dot_pi/agent/prompts/test.md rename to dot_pi/private_agent/prompts/test.md diff --git a/dot_pi/agent/settings.json.reference b/dot_pi/private_agent/settings.json.reference similarity index 100% rename from dot_pi/agent/settings.json.reference rename to dot_pi/private_agent/settings.json.reference diff --git a/dot_pi/agent/skills/README.md b/dot_pi/private_agent/skills/README.md similarity index 100% rename from dot_pi/agent/skills/README.md rename to dot_pi/private_agent/skills/README.md diff --git a/dot_pi/agent/skills/example-skill/SKILL.md b/dot_pi/private_agent/skills/example-skill/SKILL.md similarity index 100% rename from dot_pi/agent/skills/example-skill/SKILL.md rename to dot_pi/private_agent/skills/example-skill/SKILL.md diff --git a/dot_pi/agent/symlink_node_modules b/dot_pi/private_agent/symlink_node_modules similarity index 100% rename from dot_pi/agent/symlink_node_modules rename to dot_pi/private_agent/symlink_node_modules diff --git a/dot_pi/agent/themes/README.md b/dot_pi/private_agent/themes/README.md similarity index 100% rename from dot_pi/agent/themes/README.md rename to dot_pi/private_agent/themes/README.md diff --git a/dot_pi/agent/themes/blackwater-rust.json b/dot_pi/private_agent/themes/blackwater-rust.json similarity index 100% rename from dot_pi/agent/themes/blackwater-rust.json rename to dot_pi/private_agent/themes/blackwater-rust.json diff --git a/dot_zshrc b/dot_zshrc index 2196530..574e077 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -341,3 +341,6 @@ setopt HIST_REDUCE_BLANKS # tidy whitespace before saving # Google Cloud SDK [ -f "$HOME/Downloads/google-cloud-sdk/path.zsh.inc" ] && source "$HOME/Downloads/google-cloud-sdk/path.zsh.inc" [ -f "$HOME/Downloads/google-cloud-sdk/completion.zsh.inc" ] && source "$HOME/Downloads/google-cloud-sdk/completion.zsh.inc" + +# kimi-code +export PATH="/Users/phall/.kimi-code/bin:$PATH" diff --git a/renovate.json b/renovate.json index 10b0a4b..c5acc96 100644 --- a/renovate.json +++ b/renovate.json @@ -19,7 +19,7 @@ { "customType": "regex", "description": "Pinned Pi extension packages shared by installation, chezmoi reconciliation, and doctor checks", - "managerFilePatterns": ["/^(scripts/install-agent-stack\\.sh|dot_pi/agent/modify_settings\\.json|checks/pi\\.sh)$/"], + "managerFilePatterns": ["/^(scripts/install-agent-stack\\.sh|dot_pi/private_agent/modify_settings\\.json|checks/pi\\.sh)$/"], "matchStrings": ["(?(?:@[\\w-]+/)?[\\w-]+)@(?\\d+\\.\\d+\\.\\d+)"], "datasourceTemplate": "npm", "versioningTemplate": "npm"