Skip to content

Commit dfe1042

Browse files
committed
chore(wheelhouse): cascade template@92657d8a
1 parent 59c64ff commit dfe1042

125 files changed

Lines changed: 2964 additions & 509 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/hooks/fleet/claude-segmentation-guard/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Every entry under those four directories must live under one of:
1212

1313
Top-level dangling entries like `.claude/skills/foo/SKILL.md` shadow the canonical `.claude/skills/fleet/foo/SKILL.md` copy and break skill resolution in unpredictable ways.
1414

15-
Past incident: 2026-06-01 fleet-wide audit found ~200 dangling entries across 10 repos — every fleet repo had at least 18 duplicate top-level skill directories shadowing their `fleet/<name>/` counterparts. The cleanup script (`node scripts/check-claude-segmentation.mts --fix`) resolved them in bulk; this hook prevents the regression at edit time.
15+
Past incident: 2026-06-01 fleet-wide audit found ~200 dangling entries across 10 repos — every fleet repo had at least 18 duplicate top-level skill directories shadowing their `fleet/<name>/` counterparts. The cleanup script (`node scripts/fleet/check-claude-segmentation.mts --fix`) resolved them in bulk; this hook prevents the regression at edit time.
1616

1717
## What it blocks
1818

@@ -39,7 +39,7 @@ Fails open on malformed payloads or unknown errors (exit 0).
3939

4040
## Bypass
4141

42-
None. The autofix is always available: `node scripts/check-claude-segmentation.mts --fix` moves dangling entries into the right subdir based on the wheelhouse-canonical fleet/ set.
42+
None. The autofix is always available: `node scripts/fleet/check-claude-segmentation.mts --fix` moves dangling entries into the right subdir based on the wheelhouse-canonical fleet/ set.
4343

4444
## Test
4545

.claude/hooks/fleet/claude-segmentation-guard/index.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// entries across 10 repos — every fleet repo had at least 18
1212
// duplicate top-level skill directories shadowing their `fleet/<name>/`
1313
// counterparts. The cleanup script
14-
// (`scripts/check-claude-segmentation.mts --fix`) resolved them in
14+
// (`scripts/fleet/check-claude-segmentation.mts --fix`) resolved them in
1515
// bulk; this hook prevents the regression at edit time.
1616
//
1717
// Allowed paths:
@@ -151,7 +151,7 @@ process.stdin.on('end', () => {
151151
' Repo-only:',
152152
` ${targetForRepo}`,
153153
'',
154-
' Or run `node scripts/check-claude-segmentation.mts --fix` from the',
154+
' Or run `node scripts/fleet/check-claude-segmentation.mts --fix` from the',
155155
' repo root to auto-resolve any dangling entries already on disk.',
156156
'',
157157
].join('\n'),

.claude/hooks/fleet/lock-step-ref-guard/index.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ async function main(): Promise<void> {
362362
}
363363
out.push(' Spec: docs/claude.md/fleet/parser-comments.md §5–6.')
364364
out.push(
365-
' CI gate: scripts/check-lock-step-refs.mts (run via `pnpm check`).',
365+
' CI gate: scripts/fleet/check-lock-step-refs.mts (run via `pnpm check`).',
366366
)
367367
out.push(' Bypass: "Allow lock-step bypass" in a recent user message, or')
368368
out.push(` ${ENV_DISABLE}=1.`)

.claude/hooks/fleet/minimum-release-age-guard/index.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ await withEditGuard((filePath, content, payload) => {
180180
'',
181181
" Don't hand-edit the exclude list — run the canonical helper, which",
182182
' looks up the npm publish date and writes the dated annotation for you:',
183-
' node scripts/soak-bypass.mts <pkg>@<version>',
183+
' node scripts/fleet/soak-bypass.mts <pkg>@<version>',
184184
' (the daily updating-daily job removes the entry once its soak clears).',
185185
'',
186186
` Bypass (to hand-edit anyway): type "${BYPASS_PHRASES[0]}" in a new message, then retry.`,

.claude/hooks/fleet/path-guard/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ them silently. Centralizing the construction in a single `paths.mts`
2424
per package means a refactor is a one-file diff, and divergence
2525
becomes impossible because every consumer imports the same value.
2626

27-
The companion `scripts/check-paths.mts` runs a deeper whole-repo
27+
The companion `scripts/fleet/check-paths.mts` runs a deeper whole-repo
2828
scan at `pnpm check` time, catching anything this hook missed.
2929

3030
## What it blocks
@@ -38,12 +38,12 @@ The hook fires on `Edit` and `Write` tool calls when the target path
3838
ends in `.mts` or `.cts`. Other extensions (`.ts`, `.mjs`, `.js`,
3939
`.yml`, `.json`, `.md`) pass through — TS path code lives in `.mts`
4040
per fleet convention, and other file types are covered by the
41-
`scripts/check-paths.mts` gate at commit time.
41+
`scripts/fleet/check-paths.mts` gate at commit time.
4242

4343
## What it allows
4444

4545
- Edits to a `paths.mts` (the canonical constructor).
46-
- Edits to `scripts/check-paths.mts` (the gate itself, which
46+
- Edits to `scripts/fleet/check-paths.mts` (the gate itself, which
4747
legitimately enumerates patterns).
4848
- Edits to this hook's own files (the test suite has to enumerate
4949
the same patterns).
@@ -86,7 +86,7 @@ When a new package joins the workspace, add it to
8686
If the hook itself crashes, it writes a log line and exits `0`
8787
i.e. _the edit is allowed_. A buggy security hook that blocks
8888
everything is worse than one that temporarily lets things through.
89-
The companion `scripts/check-paths.mts` gate at commit time catches
89+
The companion `scripts/fleet/check-paths.mts` gate at commit time catches
9090
anything the hook missed.
9191

9292
## Testing

.claude/hooks/fleet/path-guard/segments.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Canonical path-segment vocabulary shared by the path-guard hook
2-
// (.claude/hooks/fleet/path-guard/index.mts) and gate (scripts/check-paths.mts).
2+
// (.claude/hooks/fleet/path-guard/index.mts) and gate (scripts/fleet/check-paths.mts).
33
//
44
// Mantra: 1 path, 1 reference. This module is the *one* place stage,
55
// build-root, mode, and sibling-package vocabulary is defined. Both

.claude/hooks/fleet/path-guard/test/path-guard.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ describe('path-guard — exempt files', () => {
251251
const source = `
252252
const PATTERNS = [path.join('build', 'Final', 'wasm')]
253253
`
254-
const { code } = runHook('Write', 'scripts/check-paths.mts', source)
254+
const { code } = runHook('Write', 'scripts/fleet/check-paths.mts', source)
255255
assert.equal(code, 0)
256256
})
257257

.claude/hooks/fleet/paths-mts-inherit-guard/index.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// on disk (the ancestor may also be a fresh Edit in the same
2828
// diff — we trust the consumer's intent).
2929
//
30-
// Repo-root scripts/paths.mts is exempt — there's no ancestor to
30+
// Repo-root scripts/fleet/paths.mts is exempt — there's no ancestor to
3131
// inherit from. We detect "is repo root" by checking whether any
3232
// parent dir between the file and the filesystem root contains
3333
// another scripts/paths.{mts,cts}.

.claude/hooks/fleet/paths-mts-inherit-guard/test/index.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ let tmpRoot: string
3434

3535
beforeEach(() => {
3636
tmpRoot = mkdtempSync(path.join(os.tmpdir(), 'paths-mts-inherit-guard-'))
37-
// Repo-root scripts/paths.mts — ancestor exists for sub-packages.
37+
// Repo-root scripts/fleet/paths.mts — ancestor exists for sub-packages.
3838
mkdirSync(path.join(tmpRoot, 'scripts'), { recursive: true })
3939
writeFileSync(
4040
path.join(tmpRoot, 'scripts', 'paths.mts'),
@@ -66,7 +66,7 @@ describe('paths-mts-inherit-guard', () => {
6666
assert.equal(r.code, 0)
6767
})
6868

69-
test('allows repo-root scripts/paths.mts (no ancestor)', () => {
69+
test('allows repo-root scripts/fleet/paths.mts (no ancestor)', () => {
7070
const r = runHook({
7171
tool_name: 'Write',
7272
tool_input: {

.claude/hooks/fleet/plugin-patch-format-guard/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# plugin-patch-format-guard
22

3-
PreToolUse Edit/Write hook that blocks malformed plugin-cache patches under `scripts/plugin-patches/`.
3+
PreToolUse Edit/Write hook that blocks malformed plugin-cache patches under `scripts/fleet/plugin-patches/`.
44

55
## What it enforces
66

@@ -13,7 +13,7 @@ The runtime consumer is `scripts/install-claude-plugins.mts` — its `reapplyPlu
1313

1414
## Scope
1515

16-
Fires only when the target `file_path` resolves under `scripts/plugin-patches/` and ends in `.patch` (normalized to `/`-separators first). Everything else passes through untouched.
16+
Fires only when the target `file_path` resolves under `scripts/fleet/plugin-patches/` and ends in `.patch` (normalized to `/`-separators first). Everything else passes through untouched.
1717

1818
`Write` carries the whole file in `tool_input.content`, so it's fully validated. `Edit` only carries a `new_string` fragment — the hook can't see the surrounding file, so an `Edit` without `content` is skipped (the next `Write` or commit-time path catches it).
1919

0 commit comments

Comments
 (0)