Skip to content

docs: move copy-ignored to post-create in canonical examples#1581

Open
worktrunk-bot wants to merge 1 commit intomainfrom
fix/copy-ignored-post-create-example
Open

docs: move copy-ignored to post-create in canonical examples#1581
worktrunk-bot wants to merge 1 commit intomainfrom
fix/copy-ignored-post-create-example

Conversation

@worktrunk-bot
Copy link
Collaborator

Summary

  • Move wt step copy-ignored from post-start to post-create in the canonical hook examples
  • Update the "Copying untracked files" guidance to lead with post-create (for when subsequent hooks need the files) and explain when post-start is better (large copies nothing depends on)
  • Same change in step.rs copy-ignored docs for consistency

Why: For Node.js projects, post-create runs npm ci — but copy-ignored was shown in post-start, which runs after post-create. The cached node_modules/ copy hadn't happened yet when npm ci ran from scratch, defeating the purpose. Moving the copy before install means npm ci reuses cached packages.

post-start remains the right choice for Rust's target/ directory and other large caches where nothing depends on them immediately.

Closes #1578

Test plan

  • test_command_pages_and_skill_files_are_in_sync passes (docs auto-synced)
  • cargo insta test --accept -- --test integration "test_help" — no snapshot changes needed
  • CI passes

🤖 Generated with Claude Code

The hook examples showed `wt step copy-ignored` in `post-start`, but for
Node.js projects where `post-create` runs `npm ci`, the copy needs to
happen *before* install — otherwise the cached `node_modules/` copy
hasn't happened yet when `npm ci` runs from scratch.

Move `copy-ignored` to `post-create` in the canonical example and update
the guidance to recommend `post-create` when subsequent hooks depend on
the copied files, `post-start` when nothing needs them immediately.

Closes #1578

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Hooks names and purpose are not optimal

1 participant