Skip to content

chore(claude): fleet-gold CLAUDE.md + check-new-deps hook improvements#602

Open
John-David Dalton (jdalton) wants to merge 3 commits intomainfrom
chore/parallel-claude-rule
Open

chore(claude): fleet-gold CLAUDE.md + check-new-deps hook improvements#602
John-David Dalton (jdalton) wants to merge 3 commits intomainfrom
chore/parallel-claude-rule

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

@jdalton John-David Dalton (jdalton) commented Apr 20, 2026

Two fleet-standard updates:

1. CLAUDE.md — parallel-Claude-hostile git operations (original PR scope)

Multiple Claude sessions can run concurrently against the same checkout, parallel worktrees, or sibling clones. Document which git ops break that contract (`stash`, `add -A`, branch switching, `reset --hard` non-HEAD) and the safe alternatives (worktrees, surgical add).

2. check-new-deps hook — fleet-gold improvements

Two improvements from the socket-repo-template gold standard:

  • Canonical isMainModule: `fileURLToPath(import.meta.url) === path.resolve(process.argv[1])` — widest cross-platform support. `import.meta.filename` is undefined under Node <20.11 ESM loaders and has edge cases with symlinks.
  • Local errorMessage() helper: replaces `(e as Error).message` casts which print "undefined" when the caught value isn't an Error instance. Mirrors `build-infra/lib/error-utils` — inlined so the hook stays workspace-dep-free.

Same change applied across the fleet to ensure consistent behavior.

Multiple Claude sessions can run concurrently against the same checkout,
parallel worktrees, or sibling clones. Document which git ops break that
contract (stash, add -A, branch switching, reset --hard non-HEAD) and
the safe alternatives (worktrees, surgical add).
Two improvements from the socket-repo-template gold standard:
- Canonical isMainModule: fileURLToPath(import.meta.url) ===
  path.resolve(process.argv[1]) — widest cross-platform support.
- Local errorMessage() helper: replaces (e as Error).message cast
  which prints 'undefined' when the caught value isn't an Error.
@jdalton John-David Dalton (jdalton) changed the title chore(claude.md): warn against parallel-Claude-hostile git operations chore(claude): fleet-gold CLAUDE.md + check-new-deps hook improvements Apr 20, 2026
De-inline the API-key allowlist into a new .git-hooks/_helpers.sh so
this repo matches the fleet's shared helper convention. Widen the
.env file check to match the fleet pattern (allows .env.example and
.env.test, blocks the rest). Add a commit-msg check that rejects
messages containing Socket Linear team keys or linear.app/... URLs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants