Repository navigation
docs(faq): list the agent-integration files worktrunk writes outside its own config - #4036
Conversation
worktrunk-bot
left a comment
There was a problem hiding this comment.
The new section checks out against the code — OpenCode's $OPENCODE_CONFIG_DIR > $XDG_CONFIG_HOME/opencode > ~/.config/opencode precedence, Pi's ~/.omp/agent/hooks/pre/worktrunk.ts with the PI_CODING_AGENT_DIR-only-on-default-profile caveat, claude_config_dir()'s $CLAUDE_CONFIG_DIR fallback to ~/.claude, the statusLine merge through write_atomically, and codex.rs only ever reading config.toml. uninstall_file_plugin removes exactly the worktrunk.ts path and nothing else, so the deletion bullet is right too. Gemini's omission is correct — there's no gemini variant on ConfigPluginsCommand.
One problem with the rewritten "does NOT create" bullet. Replacing the old generic "config directories" with "worktrunk's config directory" narrows the enumeration past what section 3 of this same FAQ documents: wt config shell install writes ~/.bashrc, ~/.zshrc (or $ZDOTDIR/.zshrc), ~/.config/fish/functions/wt.fish and completions/wt.fish, wt.nu under Nushell's vendor-autoload directory (which is under the data dir, not a config dir at all), and both PowerShell profiles under Documents/. As written the bullet now asserts worktrunk creates no files at any of those paths, which contradicts the section three headings above it. Since CLAUDE.md sends reviewers here as the full inventory, a false negative in the closing bullet is the same gap this PR is fixing, just moved.
Smaller point folded into the same suggestion: the bullet's exception is scoped to wt config plugins <agent> install, but the settings.json row in the table it points at is written by install-statusline, not install.
The two mirrors carry the identical line (skills/worktrunk/reference/faq.md:188, plugins/worktrunk/skills/worktrunk/reference/faq.md:188); cargo test --test integration test_docs_are_in_sync regenerates them from the primary.
|
Both points were right — fixed in 0e5c113. The bullet now reads: No files outside the five sections above: That restores the shell-integration coverage the old generic "config directories" carried (including the Nushell wrapper, which sits under the data dir), and the parenthetical is scoped to "a |
worktrunk-bot
left a comment
There was a problem hiding this comment.
The install / install-statusline fix landed in the bullet but not in the section-5 lead-in, and the rewritten bullet now miscounts the sections it points at. Two suggestions below, both on the primary; the two mirrors carry the identical lines (skills/worktrunk/reference/faq.md:168 and :188, same offsets under plugins/worktrunk/skills/), and cargo test --test integration test_docs_are_in_sync regenerates them.
Everything else in the new section re-verifies against the code: OpenCode's $OPENCODE_CONFIG_DIR > $XDG_CONFIG_HOME/opencode > ~/.config/opencode precedence, Pi's PI_CONFIG_DIR / profile / PI_CODING_AGENT_DIR resolution, claude_config_dir()'s $CLAUDE_CONFIG_DIR fallback, the statusLine merge through write_atomically, codex.rs only ever reading config.toml, and uninstall_file_plugin removing exactly the one worktrunk.ts path. InstallStatusline has no uninstall counterpart on ConfigPluginsClaudeCommand, so "the statusline entry is removed by editing settings.json" is right too.
CLAUDE.mdnames the FAQ's What files does Worktrunk create? and What can Worktrunk delete? as the full inventory of worktrunk's file surface, and tells reviewers to check new code against them. Neither section has ever coveredwt config plugins <agent> install, so the inventory has been incomplete since the OpenCode plugin landed, and adding the Pi hook this week widened the gap.The sections now carry an "Agent integrations" entry listing the three files worktrunk writes into another tool's config tree, and the "does NOT create" bullet — which read "No files outside
.git/, config directories, worktree directories, or the system temporary directory" — now says which agent paths are the exception and that they are only touched when you run the install command.wt config plugins {opencode,pi} uninstallis added to the deletion list.Nightly sweep finding; no linked issue.
What each claim is grounded in
Files worktrunk writes directly:
<opencode config dir>/plugins/worktrunk.ts—opencode_plugins_dirinsrc/commands/config/opencode.rs, precedence$OPENCODE_CONFIG_DIR>$XDG_CONFIG_HOME/opencode>~/.config/opencode.<pi agent dir>/hooks/pre/worktrunk.ts—pi_agent_dir/plugin_pathinsrc/commands/config/pi.rs, honoring$PI_CONFIG_DIR,$OMP_PROFILE/$PI_PROFILE, and$PI_CODING_AGENT_DIR.<claude config dir>/settings.json—handle_claude_install_statuslineinsrc/commands/config/plugins.rs, which merges thestatusLinekey (commandwt list statusline --format=claude-code) into the existing object rather than replacing the file, and writes throughwrite_atomically— the samesettings.jsonthatCLAUDE.md's Data Safety section already names as awrite_atomicallytarget.Files worktrunk does not write itself:
wt config plugins claude installandcodex installshell out toclaude/codex, which record the marketplace and plugin in their own config (~/.claude/plugins/known_marketplaces.jsonandinstalled_plugins.json, read back byis_marketplace_configured/is_plugin_installedinshow.rs;~/.codex/config.toml's[marketplaces.*]tables, read byis_marketplace_configuredincodex.rs). Gemini is left out — worktrunk has no install path for it, only awt config showstatus line pointing atgemini extensions install.The three
faq.mdcopies stay in sync viatest_docs_are_in_sync; the site page is primary and the two skill mirrors are generated.No test: documentation only.
cargo test --test integration test_docs_are_in_syncandtest_plugin_layout_is_consolidatedpass locally.