Skip to content

Commit 40affb5

Browse files
committed
chore(claude+sync): fleet-canonical sync from socket-repo-template
Picks up the fleet's "soak window" terminology shift in CLAUDE.md (pnpm-workspace.yaml minimumReleaseAge → "soak window … default 7 days") and security-reviewer.md (dependency review checklist phrased as "soak-window bypass justification"). Also picks up pre-existing template drifts (path-guard, token-guard, xport-schema, _shared/path-guard-rule) that had accumulated since the last fleet sync — these are unrelated to the soak-window terminology change but sync-scaffolding rolls them in by design. Generated by `node scripts/sync-scaffolding.mts --all --fix`.
1 parent 6c68b81 commit 40affb5

9 files changed

Lines changed: 38 additions & 21 deletions

File tree

.claude/agents/security-reviewer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Apply these rules from CLAUDE.md exactly:
1818

1919
1. **Secrets**: Hardcoded API keys, passwords, tokens, private keys in code or config
2020
2. **Injection**: Command injection via shell: true or string interpolation in spawn/exec. Path traversal in file operations.
21-
3. **Dependencies**: npx/dlx usage. Unpinned versions (^ or ~). Missing minimumReleaseAge bypass justification. # zizmor: documentation-checklist
21+
3. **Dependencies**: npx/dlx usage. Unpinned versions (^ or ~). Missing soak-window bypass justification (pnpm-workspace.yaml `minimumReleaseAgeExclude`). # zizmor: documentation-checklist
2222
4. **File operations**: fs.rm without safeDelete. process.chdir usage. fetch() usage (must use lib's httpRequest).
2323
5. **GitHub Actions**: Unpinned action versions (must use full SHA). Secrets outside env blocks. Template injection from untrusted inputs.
2424
6. **Error handling**: Sensitive data in error messages. Stack traces exposed to users.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# path-guard
22

3-
Claude Code `PreToolUse` hook that refuses `Edit`/`Write` tool calls that would *construct* a multi-segment build/output path inline in a `.mts` or `.cts` file. Mandatory across the Socket fleet — every repo ships this file byte-for-byte via `scripts/sync-scaffolding.mjs`.
3+
Claude Code `PreToolUse` hook that refuses `Edit`/`Write` tool calls that would *construct* a multi-segment build/output path inline in a `.mts` or `.cts` file. Mandatory across the Socket fleet — every repo ships this file byte-for-byte via `scripts/sync-scaffolding.mts`.
44

55
**Mantra: 1 path, 1 reference.**
66

@@ -57,10 +57,10 @@ Adding a new detection pattern: update `STAGE_SEGMENTS` (or `KNOWN_SIBLING_PACKA
5757

5858
## Updating across the fleet
5959

60-
This file is in `IDENTICAL_FILES` in `scripts/sync-scaffolding.mjs` (in `socket-repo-template`). After editing, run from `socket-repo-template`:
60+
This file is in `IDENTICAL_FILES` in `scripts/sync-scaffolding.mts` (in `socket-repo-template`). After editing, run from `socket-repo-template`:
6161

6262
```bash
63-
node scripts/sync-scaffolding.mjs --all --fix
63+
node scripts/sync-scaffolding.mts --all --fix
6464
```
6565

6666
to propagate the change to every fleet repo.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// consumers import from here so they can never drift apart.
77
//
88
// Synced byte-identically across the Socket fleet via
9-
// socket-repo-template/scripts/sync-scaffolding.mjs (IDENTICAL_FILES).
9+
// socket-repo-template/scripts/sync-scaffolding.mts (IDENTICAL_FILES).
1010
// When adding a new stage/build-root/mode/sibling, edit this file in
1111
// the template and re-sync.
1212

@@ -41,7 +41,7 @@ export const MODE_SEGMENTS = new Set(['dev', 'prod', 'shared'])
4141
// Socket fleet — the gate is byte-identical via sync-scaffolding, so
4242
// listing every fleet package keeps Rule B firing in any repo. When a
4343
// new package joins the workspace, add it here and propagate via
44-
// `node scripts/sync-scaffolding.mjs --all --fix` from
44+
// `node scripts/sync-scaffolding.mts --all --fix` from
4545
// socket-repo-template.
4646
export const KNOWN_SIBLING_PACKAGES = new Set([
4747
// socket-btm

.claude/hooks/token-guard/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# token-guard
22

3-
Claude Code `PreToolUse` hook that refuses Bash tool calls that would leak secrets to tool output. Mandatory across the Socket fleet — every repo ships this file byte-for-byte via `scripts/sync-scaffolding.mjs`.
3+
Claude Code `PreToolUse` hook that refuses Bash tool calls that would leak secrets to tool output. Mandatory across the Socket fleet — every repo ships this file byte-for-byte via `scripts/sync-scaffolding.mts`.
44

55
## What it blocks
66

@@ -48,10 +48,10 @@ Adding new token-shape detections: update `LITERAL_TOKEN_PATTERNS` in `index.mts
4848

4949
## Updating across the fleet
5050

51-
This file is in `IDENTICAL_FILES` in `scripts/sync-scaffolding.mjs`. After editing, run from `socket-repo-template`:
51+
This file is in `IDENTICAL_FILES` in `scripts/sync-scaffolding.mts`. After editing, run from `socket-repo-template`:
5252

5353
```bash
54-
node scripts/sync-scaffolding.mjs --all --fix
54+
node scripts/sync-scaffolding.mts --all --fix
5555
```
5656

5757
to propagate the change to every fleet repo.

.claude/skills/_shared/path-guard-rule.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
Shared snippet — the canonical "1 path, 1 reference" rule text.
33
Synced byte-identical across the Socket fleet via socket-repo-template's
4-
sync-scaffolding.mjs (SHARED_SKILL_FILES).
4+
sync-scaffolding.mts (SHARED_SKILL_FILES).
55
66
This file is the source of truth for the rule's wording. Three artifacts
77
embed (or paraphrase) it:
@@ -10,7 +10,7 @@ embed (or paraphrase) it:
1010
2. .claude/hooks/path-guard/README.md — what the hook blocks.
1111
3. .claude/skills/path-guard/SKILL.md — what the skill enforces.
1212
13-
If the wording changes here, re-run `node scripts/sync-scaffolding.mjs
13+
If the wording changes here, re-run `node scripts/sync-scaffolding.mts
1414
--all --fix` from socket-repo-template to propagate.
1515
-->
1616

.git-hooks/pre-commit.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ const main = (): number => {
242242
}
243243
}
244244
out(
245-
'Use `getDefaultLogger()` from `@socketsecurity/lib/logger`. ' +
245+
"Use `getDefaultLogger()` from `@socketsecurity/lib/logger`. " +
246246
'For documentation lines that need the literal call, append ' +
247247
'the marker `# socket-hook: allow logger`.',
248248
)

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**MANDATORY**: Act as principal-level engineer. Follow these guidelines exactly.
44

5-
<!-- BEGIN FLEET-CANONICAL — sync via socket-repo-template/scripts/sync-scaffolding.mjs. Do not edit downstream. -->
5+
<!-- BEGIN FLEET-CANONICAL — sync via socket-repo-template/scripts/sync-scaffolding.mts. Do not edit downstream. -->
66

77
## 📚 Fleet Standards
88

@@ -59,7 +59,7 @@ The umbrella rule: never run a git command that mutates state belonging to a pat
5959

6060
- **Package manager**: `pnpm`. Run scripts via `pnpm run foo --flag`, never `foo:bar`. After `package.json` edits, `pnpm install`.
6161
- 🚨 NEVER use `npx`, `pnpm dlx`, or `yarn dlx` — use `pnpm exec <package>` or `pnpm run <script>` # socket-hook: allow npx
62-
- **`minimumReleaseAge`** — never add packages to `minimumReleaseAgeExclude` in CI. Locally, ASK before adding (security control).
62+
- **Soak window** (pnpm-workspace.yaml `minimumReleaseAge`, default 7 days) — never add packages to `minimumReleaseAgeExclude` in CI. Locally, ASK before adding (security control).
6363
- **Backward compatibility** — FORBIDDEN to maintain. Actively remove when encountered.
6464

6565
### Code style

scripts/xport-schema.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* `@socketsecurity/lib/validation/validate-schema`
1111
*
1212
* Byte-identical across socket-tui / socket-btm / socket-sdxgen / ultrathink /
13-
* socket-registry / socket-repo-template via sync-scaffolding.mjs.
13+
* socket-registry / socket-repo-template via sync-scaffolding.mts.
1414
*/
1515

1616
import { Type, type Static } from '@sinclair/typebox'

xport.schema.json

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"title": "xport lock-step manifest",
55
"description": "Unified lock-step manifest shared across Socket repos. One schema, all cases — `kind` discriminator on each row selects which flavor of lock-step applies.",
66
"type": "object",
7-
"required": ["rows"],
7+
"required": [
8+
"rows"
9+
],
810
"properties": {
911
"$schema": {
1012
"type": "string"
@@ -30,7 +32,10 @@
3032
"^(.*)$": {
3133
"additionalProperties": false,
3234
"type": "object",
33-
"required": ["submodule", "repo"],
35+
"required": [
36+
"submodule",
37+
"repo"
38+
],
3439
"properties": {
3540
"submodule": {
3641
"description": "Submodule path, relative to repo root.",
@@ -52,7 +57,9 @@
5257
"^(.*)$": {
5358
"additionalProperties": false,
5459
"type": "object",
55-
"required": ["path"],
60+
"required": [
61+
"path"
62+
],
5663
"properties": {
5764
"path": {
5865
"description": "Path to the port's root directory, relative to repo root.",
@@ -205,7 +212,13 @@
205212
"additionalProperties": false,
206213
"description": "A behavioral feature reimplemented locally to match upstream behavior. Three-pillar validation: code patterns, test patterns, fixture snapshots.",
207214
"type": "object",
208-
"required": ["kind", "id", "upstream", "criticality", "local_area"],
215+
"required": [
216+
"kind",
217+
"id",
218+
"upstream",
219+
"criticality",
220+
"local_area"
221+
],
209222
"properties": {
210223
"kind": {
211224
"const": "feature-parity",
@@ -260,7 +273,9 @@
260273
"additionalProperties": false,
261274
"description": "Golden-input verification. Prefer snapshot-based diffs over hardcoded counts (brittleness lesson from sdxgen's lock-step-features).",
262275
"type": "object",
263-
"required": ["fixture_path"],
276+
"required": [
277+
"fixture_path"
278+
],
264279
"properties": {
265280
"fixture_path": {
266281
"type": "string"
@@ -410,7 +425,9 @@
410425
"additionalProperties": false,
411426
"description": "Per-port status for a lang-parity row. `implemented` = port meets assertions; `opt-out` = port consciously skips, requires non-empty `reason`.",
412427
"type": "object",
413-
"required": ["status"],
428+
"required": [
429+
"status"
430+
],
414431
"properties": {
415432
"status": {
416433
"anyOf": [

0 commit comments

Comments
 (0)