docs: move copy-ignored to post-create in canonical examples#1581
Open
worktrunk-bot wants to merge 1 commit intomainfrom
Open
docs: move copy-ignored to post-create in canonical examples#1581worktrunk-bot wants to merge 1 commit intomainfrom
worktrunk-bot wants to merge 1 commit intomainfrom
Conversation
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>
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.
Summary
wt step copy-ignoredfrompost-starttopost-createin the canonical hook examplespost-create(for when subsequent hooks need the files) and explain whenpost-startis better (large copies nothing depends on)step.rscopy-ignored docs for consistencyWhy: For Node.js projects,
post-createrunsnpm ci— butcopy-ignoredwas shown inpost-start, which runs afterpost-create. The cachednode_modules/copy hadn't happened yet whennpm ciran from scratch, defeating the purpose. Moving the copy before install meansnpm cireuses cached packages.post-startremains the right choice for Rust'starget/directory and other large caches where nothing depends on them immediately.Closes #1578
Test plan
test_command_pages_and_skill_files_are_in_syncpasses (docs auto-synced)cargo insta test --accept -- --test integration "test_help"— no snapshot changes needed🤖 Generated with Claude Code