Commit f369ac4
fix: move prepare lifecycle hook to explicit setup-hooks script (#334)
* fix: move prepare lifecycle hook to explicit setup-hooks script
npm's prepare hook runs on every `npm install` in any environment,
causing the package to silently install git hooks into any consumer's
repository without their explicit consent. This is unexpected behavior
for a plugin package consumed by end users.
Rename prepare to setup-hooks so contributors can opt in explicitly by
running `npm run setup-hooks` after cloning, as now documented in
CONTRIBUTING.md.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(hooks): remove pre-commit placeholder + address bot review
- Remove pre-commit hook installation - it was just a no-op placeholder
('lib/ sync now handled by agent-core'), so installing it was pure
redundancy. Only the pre-push hook (preflight + /enhance reminder +
release tag validation) actually does anything.
- CONTRIBUTING.md: replace em-dash with single dash per workspace rule;
update text to reflect that only pre-push is installed now.
- docs/ARCHITECTURE.md: update setup-hooks.js comment - was 'npm prepare'
before xiaolai's PR; now correctly noted as manual.
---------
Co-authored-by: claude[bot] <claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Avi Fenesh <aviarchi1994@gmail.com>1 parent df582c8 commit f369ac4
4 files changed
Lines changed: 13 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
34 | 45 | | |
35 | 46 | | |
36 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 13 | | |
20 | 14 | | |
21 | 15 | | |
| |||
135 | 129 | | |
136 | 130 | | |
137 | 131 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | 132 | | |
147 | 133 | | |
148 | 134 | | |
| |||
0 commit comments