fix(config): auto-install hooks and staged config in prepare script#1028
Merged
graphite-app[bot] merged 1 commit intomainfrom Mar 19, 2026
Merged
fix(config): auto-install hooks and staged config in prepare script#1028graphite-app[bot] merged 1 commit intomainfrom
graphite-app[bot] merged 1 commit intomainfrom
Conversation
Member
Author
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
4 tasks
cpojer
approved these changes
Mar 18, 2026
Brooooooklyn
approved these changes
Mar 19, 2026
655c4eb to
5ef9301
Compare
Merge activity
|
…1028) ## Summary - When `vp config` runs from a `prepare` script (`npm_lifecycle_event=prepare`), skip the interactive hooks prompt and install automatically — the prepare script implies the project opted into hooks - Auto-create `.vite-hooks/pre-commit` with `vp staged` and ensure default staged config (`{ '*': 'vp check --fix' }`) in `vite.config.ts` when missing, so the pre-commit hook is functional out of the box - Skip agent setup when instruction files already exist (CLAUDE.md, etc.) ## Test plan - [x] New snap test `command-config-prepare-auto-hooks` verifies hooks, pre-commit hook, and staged config are all created automatically - [x] All existing `command-config-*` snap tests pass without changes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
6644144 to
0e9d243
Compare
5ef9301 to
5e77c9b
Compare
TheAlexLichter
pushed a commit
that referenced
this pull request
Mar 19, 2026
…1028) ## Summary - When `vp config` runs from a `prepare` script (`npm_lifecycle_event=prepare`), skip the interactive hooks prompt and install automatically — the prepare script implies the project opted into hooks - Auto-create `.vite-hooks/pre-commit` with `vp staged` and ensure default staged config (`{ '*': 'vp check --fix' }`) in `vite.config.ts` when missing, so the pre-commit hook is functional out of the box - Skip agent setup when instruction files already exist (CLAUDE.md, etc.) ## Test plan - [x] New snap test `command-config-prepare-auto-hooks` verifies hooks, pre-commit hook, and staged config are all created automatically - [x] All existing `command-config-*` snap tests pass without changes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
vp configruns from apreparescript (npm_lifecycle_event=prepare), skip the interactive hooks prompt and install automatically — the prepare script implies the project opted into hooks.vite-hooks/pre-commitwithvp stagedand ensure default staged config ({ '*': 'vp check --fix' }) invite.config.tswhen missing, so the pre-commit hook is functional out of the boxTest plan
command-config-prepare-auto-hooksverifies hooks, pre-commit hook, and staged config are all created automaticallycommand-config-*snap tests pass without changes🤖 Generated with Claude Code