Skip to content

docs(claude): relocate Hook Output Logs and Repository Caching out of root CLAUDE.md - #2825

Merged
max-sixty merged 1 commit into
mainfrom
claude-md-pointers
May 20, 2026
Merged

max-sixty merged 1 commit into
mainfrom
claude-md-pointers

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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 or Repository git code — so they push down to their code homes, with the root keeping a one-line pointer.

Hook Output Logs → the HookLog type docstring in src/commands/process.rs. That enum is already declared "the single source of truth for hook log file paths," and its # Log file layout docstring already carried the three path templates and the sanitize_for_filename rule. 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, and source is user or project. The complementary file-vs-directory categorization stays in commands::config::state (its enforcer — walk_hook_output_files/clear_logs — lives there), now cross-referenced from HookLog.

Repository Caching → the # Caching module docstring in src/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 under docs/ or skills/ are touched, so test_docs_are_in_sync is not in play; the process.rs change is comment-only and cargo check passes.

🤖 Generated with Claude Code

… 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]>
@max-sixty
max-sixty merged commit 4d5dfde into main May 20, 2026
34 of 35 checks passed
@max-sixty
max-sixty deleted the claude-md-pointers branch May 20, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants