Repository navigation
docs(claude): relocate Hook Output Logs and Repository Caching out of root CLAUDE.md - #2825
Merged
Merged
Conversation
… root CLAUDE.md The root CLAUDE.md loads into every conversation. PR #2816 established the pattern: task-specific detail moves to the CLAUDE.md or module docstring where that work happens, and the root keeps a one-line pointer. These two sections were left in the root as a judgment call; both are specialized — they only matter when touching log-path code or Repository git code — so they push down the same way. - Hook Output Logs → the `HookLog` type docstring in `src/commands/process.rs`, already the documented single source of truth for hook log file paths. The three path templates and the `sanitize_for_filename` rule were already there; this folds in the rest — logs centralized under the main worktree's `.git/wt/logs/`, rerun-overwrites-prior-log, `source` is `user` or `project` — plus a cross-reference to the file-vs-directory "Log layout invariant" in `commands::config::state`, its enforcer's home. - Repository Caching → the `# Caching` module docstring in `src/git/repository/mod.rs`, which already carried the entire substance (what is and isn't cached, the `is_dirty`/`head_sha` exclusions, the `list_worktrees()` post-mutation invariant). Pure root reduction. Neither heading is quoted in any code comment, so no breadcrumbs dangle. The `process.rs` change is comment-only; `cargo check` passes. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
worktrunk-bot
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues the #2816 slimming pass on the root
CLAUDE.md(which loads into every conversation). Two sections were deliberately left in the root last time as a judgment call; both are specialized — they only matter when touching log-path code orRepositorygit code — so they push down to their code homes, with the root keeping a one-line pointer.Hook Output Logs → the
HookLogtype docstring insrc/commands/process.rs. That enum is already declared "the single source of truth for hook log file paths," and its# Log file layoutdocstring already carried the three path templates and thesanitize_for_filenamerule. This folds in the three bits the docstring lacked: logs are centralized under the main worktree's.git/wt/logs/, rerunning the same op on the same branch overwrites its prior log, andsourceisuserorproject. The complementary file-vs-directory categorization stays incommands::config::state(its enforcer —walk_hook_output_files/clear_logs— lives there), now cross-referenced fromHookLog.Repository Caching → the
# Cachingmodule docstring insrc/git/repository/mod.rs. That docstring already contained 100% of the root section's substance, so this is a pure root reduction — nothing folded in.Neither heading (
Hook Output Logs,Repository Caching) is quoted in any code comment, so no breadcrumbs dangle. No files underdocs/orskills/are touched, sotest_docs_are_in_syncis not in play; theprocess.rschange is comment-only andcargo checkpasses.🤖 Generated with Claude Code