Skip to content

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

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

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

Conversation

@jdalton
Copy link
Copy Markdown
Collaborator

@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

Three 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 inline `e instanceof Error ? e.message : String(e)` ternaries at both sites (malformed-input error + network-error warn). Mirrors `build-infra/lib/error-utils` — inlined so the hook stays workspace-dep-free.
  • Inline ternary → helper: both call sites collapsed to single concise lines.

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).
Three 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 function. Extra malformed-input error
  site now routes through the helper as well.
- Both inline ternaries collapsed to a single concise warn line.
@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
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.

1 participant