@bonesofspring/ai-rules 0.2.36 → 0.2.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -1
- package/presets/_shared/hooks/README.md +137 -0
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +1288 -0
- package/presets/claude/android-kotlin/MCP.md +2 -2
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +171 -10
- package/presets/claude/android-kotlin/mcp.json +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +6 -153
- package/presets/claude/android-kotlin/team/README.md +2 -6
- package/presets/claude/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/claude/go/MCP.md +2 -2
- package/presets/claude/go/hooks/chain-team-phases.sh +183 -16
- package/presets/claude/go/mcp.json +1 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +6 -11
- package/presets/claude/go/team/README.md +2 -6
- package/presets/claude/ios-swift/MCP.md +2 -2
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +178 -17
- package/presets/claude/ios-swift/mcp.json +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +6 -153
- package/presets/claude/ios-swift/team/README.md +2 -6
- package/presets/claude/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/claude/java/hooks/chain-team-phases.sh +183 -16
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +6 -28
- package/presets/claude/java/team/README.md +2 -6
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +182 -13
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +6 -14
- package/presets/claude/mcp-ts/team/README.md +2 -6
- package/presets/claude/next/MCP.md +2 -2
- package/presets/claude/next/hooks/chain-team-phases.sh +102 -6
- package/presets/claude/next/mcp.json +1 -1
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +6 -226
- package/presets/claude/next/team/README.md +2 -6
- package/presets/claude/next/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/claude/nuxt/MCP.md +2 -2
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +148 -7
- package/presets/claude/nuxt/mcp.json +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +6 -223
- package/presets/claude/nuxt/team/README.md +2 -6
- package/presets/claude/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +183 -16
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +6 -28
- package/presets/claude/php-hexagonal/team/README.md +2 -6
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +183 -16
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +6 -29
- package/presets/claude/php-laravel/team/README.md +2 -6
- package/presets/claude/svelte/MCP.md +2 -2
- package/presets/claude/svelte/hooks/chain-team-phases.sh +148 -7
- package/presets/claude/svelte/mcp.json +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +6 -223
- package/presets/claude/svelte/team/README.md +2 -6
- package/presets/claude/svelte/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/cursor/android-kotlin/MCP.md +2 -2
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +150 -7
- package/presets/cursor/android-kotlin/mcp.json +1 -1
- package/presets/cursor/android-kotlin/team/README.md +2 -0
- package/presets/cursor/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/cursor/go/MCP.md +2 -2
- package/presets/cursor/go/hooks/chain-team-phases.sh +175 -8
- package/presets/cursor/go/mcp.json +1 -1
- package/presets/cursor/go/team/README.md +2 -0
- package/presets/cursor/ios-swift/MCP.md +2 -2
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +150 -7
- package/presets/cursor/ios-swift/mcp.json +1 -1
- package/presets/cursor/ios-swift/team/README.md +2 -0
- package/presets/cursor/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/cursor/java/hooks/chain-team-phases.sh +175 -8
- package/presets/cursor/java/team/README.md +2 -0
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +179 -10
- package/presets/cursor/mcp-ts/team/README.md +2 -0
- package/presets/cursor/next/MCP.md +2 -2
- package/presets/cursor/next/hooks/chain-team-phases.sh +99 -5
- package/presets/cursor/next/mcp.json +1 -1
- package/presets/cursor/next/team/README.md +2 -0
- package/presets/cursor/next/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/cursor/nuxt/MCP.md +2 -2
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +145 -6
- package/presets/cursor/nuxt/mcp.json +1 -1
- package/presets/cursor/nuxt/team/README.md +2 -0
- package/presets/cursor/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +175 -8
- package/presets/cursor/php-hexagonal/team/README.md +2 -0
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +175 -8
- package/presets/cursor/php-laravel/team/README.md +2 -0
- package/presets/cursor/svelte/MCP.md +2 -2
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +145 -6
- package/presets/cursor/svelte/mcp.json +1 -1
- package/presets/cursor/svelte/team/README.md +2 -0
- package/presets/cursor/svelte/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/mavis/android-kotlin/MCP.md +2 -2
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +150 -7
- package/presets/mavis/android-kotlin/mcp.json +1 -1
- package/presets/mavis/android-kotlin/team/README.md +2 -0
- package/presets/mavis/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/mavis/go/MCP.md +2 -2
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/hooks/chain-team-phases.sh +175 -8
- package/presets/mavis/go/mcp.json +1 -1
- package/presets/mavis/go/team/README.md +2 -0
- package/presets/mavis/ios-swift/MCP.md +2 -2
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +150 -7
- package/presets/mavis/ios-swift/mcp.json +1 -1
- package/presets/mavis/ios-swift/team/README.md +2 -0
- package/presets/mavis/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/hooks/chain-team-phases.sh +175 -8
- package/presets/mavis/java/team/README.md +2 -0
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +179 -10
- package/presets/mavis/mcp-ts/team/README.md +2 -0
- package/presets/mavis/next/MCP.md +2 -2
- package/presets/mavis/next/adapter-map.json +1 -1
- package/presets/mavis/next/hooks/chain-team-phases.sh +99 -5
- package/presets/mavis/next/mcp.json +1 -1
- package/presets/mavis/next/team/README.md +2 -0
- package/presets/mavis/next/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/mavis/nuxt/MCP.md +2 -2
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +145 -6
- package/presets/mavis/nuxt/mcp.json +1 -1
- package/presets/mavis/nuxt/team/README.md +2 -0
- package/presets/mavis/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +175 -8
- package/presets/mavis/php-hexagonal/team/README.md +2 -0
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +175 -8
- package/presets/mavis/php-laravel/team/README.md +2 -0
- package/presets/mavis/svelte/MCP.md +2 -2
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +145 -6
- package/presets/mavis/svelte/mcp.json +1 -1
- package/presets/mavis/svelte/team/README.md +2 -0
- package/presets/mavis/svelte/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/opencode/android-kotlin/MCP.md +2 -2
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +150 -7
- package/presets/opencode/android-kotlin/opencode.json +1 -1
- package/presets/opencode/android-kotlin/team/README.md +2 -0
- package/presets/opencode/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/opencode/go/MCP.md +2 -2
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/hooks/chain-team-phases.sh +175 -8
- package/presets/opencode/go/opencode.json +1 -1
- package/presets/opencode/go/team/README.md +2 -0
- package/presets/opencode/ios-swift/MCP.md +2 -2
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +150 -7
- package/presets/opencode/ios-swift/opencode.json +1 -1
- package/presets/opencode/ios-swift/team/README.md +2 -0
- package/presets/opencode/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/hooks/chain-team-phases.sh +175 -8
- package/presets/opencode/java/team/README.md +2 -0
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +179 -10
- package/presets/opencode/mcp-ts/team/README.md +2 -0
- package/presets/opencode/next/MCP.md +2 -2
- package/presets/opencode/next/adapter-map.json +1 -1
- package/presets/opencode/next/hooks/chain-team-phases.sh +99 -5
- package/presets/opencode/next/opencode.json +1 -1
- package/presets/opencode/next/team/README.md +2 -0
- package/presets/opencode/next/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/opencode/nuxt/MCP.md +2 -2
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +145 -6
- package/presets/opencode/nuxt/opencode.json +1 -1
- package/presets/opencode/nuxt/team/README.md +2 -0
- package/presets/opencode/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +175 -8
- package/presets/opencode/php-hexagonal/team/README.md +2 -0
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +175 -8
- package/presets/opencode/php-laravel/team/README.md +2 -0
- package/presets/opencode/svelte/MCP.md +2 -2
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +145 -6
- package/presets/opencode/svelte/opencode.json +1 -1
- package/presets/opencode/svelte/team/README.md +2 -0
- package/presets/opencode/svelte/team/fixtures/artifact-manifest.example.json +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonesofspring/ai-rules",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.37",
|
|
4
4
|
"description": "Presets of Cursor, Claude, Mavis, and OpenCode rules/commands for Revy Ross personal use",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Revy Ross",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"check:product-specs:dogfood": "bash scripts/check-product-specs.sh ../../dogfood/mcp-ts-sample",
|
|
55
55
|
"check:rule-eval": "node scripts/check-rule-eval.mjs",
|
|
56
56
|
"check:generated-drift": "node scripts/check-generated-drift.mjs",
|
|
57
|
+
"check:hook-body-parity": "node scripts/check-hook-body-parity.mjs",
|
|
58
|
+
"test:hook-body-parity-fixtures": "node scripts/test-hook-body-parity-fixtures.mjs",
|
|
59
|
+
"test:shared-core-drift-lineage-fixtures": "node scripts/test-shared-core-drift-lineage-fixtures.mjs",
|
|
57
60
|
"test:generated-drift-fixtures": "node scripts/test-generated-drift-fixtures.mjs",
|
|
58
61
|
"test:generate-claude-fixtures": "node scripts/test-generate-claude-fixtures.mjs",
|
|
59
62
|
"test:generated-drift-claude-fixtures": "node scripts/test-generated-drift-claude-fixtures.mjs",
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# `_shared/hooks` — one chain-hook body, 40 rendered files
|
|
2
|
+
|
|
3
|
+
Authoring source for `presets/<platform>/<stack>/hooks/chain-team-phases.sh`.
|
|
4
|
+
The 40 committed hooks are artifacts: **never** edit one by hand, and never add a
|
|
5
|
+
hook body under a `presets/<platform>` tree. `init` copies the rendered hooks
|
|
6
|
+
only — `presets/_shared/**` is not a preset, so nothing here ships to consumers.
|
|
7
|
+
|
|
8
|
+
## What the template owns
|
|
9
|
+
|
|
10
|
+
`chain-team-phases.sh.tmpl` is the whole hook body (contract machinery, A1 seed,
|
|
11
|
+
A2 predicates, metrics, routing). Rendered placeholders:
|
|
12
|
+
|
|
13
|
+
- `__STACK__` / `__PLATFORM__` — identity tokens.
|
|
14
|
+
- `{{ref:<stem>}}` — a rule reference: `<stem>.mdc` on Cursor, a Claude topic
|
|
15
|
+
path from `presets/claude/<stack>/rules/README.md` on Claude, `<stem>.md`
|
|
16
|
+
elsewhere.
|
|
17
|
+
|
|
18
|
+
When you change hook behavior, change the template and re-render. A behaviour
|
|
19
|
+
edit inside one rendered hook is drift, and `check:generated-drift` /
|
|
20
|
+
`check:hook-body-parity` will reject it.
|
|
21
|
+
|
|
22
|
+
## The five slots
|
|
23
|
+
|
|
24
|
+
Slot markers are `# <<<hook-slot:NAME>>>` / `# <<<hook-slot:/NAME>>>` for
|
|
25
|
+
`HEADER` and `// …` for the rest. The markers are consumed at render time.
|
|
26
|
+
|
|
27
|
+
| Slot | Names the surface | Fragment |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `HEADER` | file shebang + top comments (stack policy lives here) | `<stack>/header.txt` |
|
|
30
|
+
| `ARTIFACT_OUTPUT_IDS` | the body of `const DEFAULT_ARTIFACT_OUTPUT_IDS = {…}` | `<stack>/artifact-output-ids.js` |
|
|
31
|
+
| `AGENT_HANDOFF` | the body of `const AGENT_HANDOFF = {…}` | `<stack>/agent-handoff.js` |
|
|
32
|
+
| `PLATFORM_PREAMBLE` | the platform payload adapter (Claude `SubagentStop` only; empty elsewhere) | `platforms/<platform>/preamble.txt` |
|
|
33
|
+
| `LEGACY_FLOW` | the whole body of `function legacyFlow() {…}` — the chain used when `pipeline.json` is absent | `legacy-flow.default.js`, or `<stack>/legacy-flow.js` |
|
|
34
|
+
|
|
35
|
+
`LEGACY_FLOW` is the one slot whose content is semantically per-stack: the
|
|
36
|
+
legacy chain names the agents the stack actually ships. `mcp-ts` ships
|
|
37
|
+
`build-verifier` + `security-reviewer` and no `code-reviewer`/`qa-tester`, so its
|
|
38
|
+
`meta.json` declares `"legacyFlow": "own"` and `<stack>/legacy-flow.js` holds
|
|
39
|
+
`build-verifier → security-reviewer → complete`. Every other stack renders
|
|
40
|
+
`legacy-flow.default.js` (`build-verifier → code-reviewer → qa-tester`). The
|
|
41
|
+
declaration and the file must appear or disappear together — `loadHookProfile`
|
|
42
|
+
throws otherwise. A change to the default that must also hold for `mcp-ts` has
|
|
43
|
+
to be mirrored in its fragment; `m2-legacy-flow-unchanged` compares each hook's
|
|
44
|
+
`legacyFlow()` against its own `HEAD` so a silent divergence is red.
|
|
45
|
+
|
|
46
|
+
`<stack>/meta.json` is authoring metadata (title, handoff ref style, role list,
|
|
47
|
+
`legacyFlow`); it is not rendered.
|
|
48
|
+
|
|
49
|
+
## Fragment layout
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
scripts/lib/hook-profiles/
|
|
53
|
+
<stack>/{header.txt,artifact-output-ids.js,agent-handoff.js,meta.json}
|
|
54
|
+
<stack>/legacy-flow.js # only when meta.json says legacyFlow: "own"
|
|
55
|
+
legacy-flow.default.js # LEGACY_FLOW for every other stack
|
|
56
|
+
platforms/<platform>/preamble.txt
|
|
57
|
+
index.mjs # loader + role-vocabulary validation + hasHookProfile
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Fragments are the only per-stack hook vocabulary. A new or renamed agent role
|
|
61
|
+
must be added to `SHARED_TEAM_ROLES` / `developerAgents` in
|
|
62
|
+
`scripts/lib/stack-platform-profiles.mjs` first — `loadHookProfile` throws on an
|
|
63
|
+
unknown key and on a developer agent without an artifact id.
|
|
64
|
+
|
|
65
|
+
## Generation
|
|
66
|
+
|
|
67
|
+
`renderHookFile({ stack, platform })` (`scripts/lib/generate-hook-source.mjs`)
|
|
68
|
+
is pure and deterministic: it renders slots, resolves `{{ref:…}}`, substitutes
|
|
69
|
+
the identity tokens, and re-asserts `const STACK`, `const PLATFORM`,
|
|
70
|
+
`const DEFAULT_ARTIFACT_OUTPUT_IDS = {` and `const AGENT_HANDOFF = {` exactly
|
|
71
|
+
once. It throws when a slot marker is missing or duplicated.
|
|
72
|
+
|
|
73
|
+
- `yarn fix:generated` (`scripts/fix-generated.mjs`) renders the 10 Cursor hooks
|
|
74
|
+
first, then the Mavis / OpenCode / Claude generators call `renderHookFile` for
|
|
75
|
+
their own platform (`generate-mavis-adapter.mjs`, `generate-opencode-adapter.mjs`,
|
|
76
|
+
`generate-claude-twin.mjs`).
|
|
77
|
+
- `yarn check:generated-drift` regenerates every platform in a temp tree and
|
|
78
|
+
byte-compares the committed files: full-tree compare for Mavis and OpenCode
|
|
79
|
+
(hooks included), emitted-file compare for the Claude hook, and an existence
|
|
80
|
+
assertion when any of the 40 hook files is missing.
|
|
81
|
+
- `node scripts/generate-hooks.mjs` rewrites the Cursor hooks only;
|
|
82
|
+
`node scripts/generate-hooks.mjs --check` compares all 40
|
|
83
|
+
(`AI_RULES_PRESETS_ROOT=<presets dir>` to point at another copy — e.g.
|
|
84
|
+
`git archive HEAD packages/ai-rules/presets`).
|
|
85
|
+
|
|
86
|
+
## Parity contract
|
|
87
|
+
|
|
88
|
+
`yarn check:hook-body-parity` (`scripts/check-hook-body-parity.mjs`) is the
|
|
89
|
+
independent oracle: it normalizes EOLs and trailing spaces, masks exactly the
|
|
90
|
+
five surfaces above, masks `STACK` / `PLATFORM`, then compares all 40 bodies
|
|
91
|
+
against the per-platform reference (`cursor/next`, `claude/next`,
|
|
92
|
+
`opencode/next`).
|
|
93
|
+
|
|
94
|
+
- The allowlist is exactly those five surfaces, each justified in
|
|
95
|
+
`architecture.md` §2.3. Do not add a sixth to silence a diff — fix the
|
|
96
|
+
template or move the stack text into its fragment; a sixth surface needs its
|
|
97
|
+
own written justification there first.
|
|
98
|
+
- `LEGACY_FLOW` masks the *cross-stack* comparison only. It never stands in for
|
|
99
|
+
a `HEAD` comparison: `m2-legacy-flow-unchanged` owns per-hook byte identity
|
|
100
|
+
against each hook's own `HEAD`, because the legacy chain is stack-specific
|
|
101
|
+
where the roster is (`mcp-ts`).
|
|
102
|
+
- `HEADER`, `ARTIFACT_OUTPUT_IDS`, `AGENT_HANDOFF` and `LEGACY_FLOW` must occur
|
|
103
|
+
exactly once; `PLATFORM_PREAMBLE` at most once (absent on non-Claude
|
|
104
|
+
platforms). Any other count is `MALFORMED`: the check never silently masks
|
|
105
|
+
nothing. Restore the anchor instead of widening the mask.
|
|
106
|
+
- `yarn check:hook-body-parity --report` prints per-surface usage (present
|
|
107
|
+
count, distinct values, per-platform split) and names the stacks whose
|
|
108
|
+
`LEGACY_FLOW` is not the shared default.
|
|
109
|
+
|
|
110
|
+
## `AI_RULES_HOOK_PARITY=warn`
|
|
111
|
+
|
|
112
|
+
Escape hatch for one release, while generation is being rolled out:
|
|
113
|
+
|
|
114
|
+
- Same output, `HOOK PARITY WARN` prefix plus
|
|
115
|
+
`HOOK PARITY: running in warn mode — CI must run without it`, exit 0.
|
|
116
|
+
- Set it locally only. `check-preset-structure.sh` never sets it, and CI must not.
|
|
117
|
+
- Never a steady state: the banner prints on every run and `--report` still
|
|
118
|
+
works, so warn mode cannot go silent. Remove it before the release after the
|
|
119
|
+
one that introduces the check.
|
|
120
|
+
|
|
121
|
+
## Rollback
|
|
122
|
+
|
|
123
|
+
- **Keep generation, drop the verdict:** remove the `hook-body-parity` block
|
|
124
|
+
from `scripts/check-preset-structure.sh` (and its fixture block) or run the
|
|
125
|
+
gate with `AI_RULES_HOOK_PARITY=warn` for one release. `yarn fix:generated`
|
|
126
|
+
and `check:generated-drift` keep the 40 bodies in one text.
|
|
127
|
+
- **Drop generation:** delete this directory, `scripts/lib/generate-hook*.mjs`,
|
|
128
|
+
`scripts/lib/hook-profiles/**`, `scripts/generate-hooks.mjs`,
|
|
129
|
+
`scripts/check-hook-body-parity.mjs` and its fixture, the
|
|
130
|
+
`check:hook-body-parity` alias, and the structure-script blocks; restore the
|
|
131
|
+
40 hooks from git. Then revert the generator imports and call sites, or
|
|
132
|
+
`yarn fix:generated` / `check:generated-drift` throw `ERR_MODULE_NOT_FOUND`:
|
|
133
|
+
the `renderHookFile` (+ `hasHookProfile`) import and call in
|
|
134
|
+
`scripts/lib/generate-mavis-adapter.mjs`, `scripts/lib/generate-opencode-adapter.mjs`
|
|
135
|
+
and `scripts/lib/generate-claude-twin.mjs`, and the `generateHooks` import and
|
|
136
|
+
call in `scripts/fix-generated.mjs`. The file name and path that consumers
|
|
137
|
+
install do not change.
|