Skip to content

chore: ignore per-session worktrees - #2

Merged
catomean merged 1 commit into
mainfrom
ci/ignore-worktrees
Aug 18, 2026
Merged

chore: ignore per-session worktrees#2
catomean merged 1 commit into
mainfrom
ci/ignore-worktrees

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

A git worktree under .claude/ is a complete copy of the repo, dist/ and all. Untracked, it gets treated as source by anything that walks the tree.

This is not hypothetical: in ai-forms, an identical setup made npm run verify report 10 lint errors — 'Response' is not defined in dist/server.js, 'URL' is not defined in a test — every one of them inside a stale worktree, none in the code being released. It blocked a publish attempt for entirely unrelated reasons.

🤖 Generated with Claude Code

A worktree under .claude/ is a full copy of the repo, dist/ included.
Left untracked it gets picked up as source — in ai-forms an identical
setup made the lint gate report 10 errors that were all in a stale
worktree, and blocked a release for reasons that had nothing to do with
the code being released.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
catomean added a commit that referenced this pull request Aug 16, 2026
Third instance of one scaffold defect. ai-forms (#11) and ai-ration (#2) had
exactly this, and so does threadkit:

  - No lint at all. ESLint was not a dependency, there was no config, and no
    script referenced it — so the fleet verify floor (lint AND typecheck AND
    test) was unmet.
  - `typecheck` existed but was not in `verify`. `build` is `tsc -p`, so types
    were checked only as a side effect of emitting. That conflates "compiles
    to dist" with "types are sound", and it evaporates the moment the build
    strategy changes.

verify = lint → typecheck → build → test.

Three repos with the same gap is a template problem, not three coincidences.
The instance is fixed here; the generator that produces `"verify": "npm run
build && npm test"` needs the same edit, or repo four is born with it. Naming
that explicitly rather than quietly fixing instance three — an un-encoded
"I'll remember" is the thing the never-twice rule exists to prevent.

Recommended presets only. ~500 lines of library code does not need a bespoke
rule set. Lint is clean on arrival, so this closes a hole rather than deferring
a backlog.

CI needs no change — ci.yml already calls `npm run verify` verbatim.

Verified: `npm run verify` passes — eslint clean, tsc clean, build clean,
31/31 tests.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@catomean
catomean merged commit 6b24a59 into main Aug 18, 2026
1 check passed
@catomean
catomean deleted the ci/ignore-worktrees branch August 18, 2026 23:03
@catomean
catomean restored the ci/ignore-worktrees branch August 24, 2026 17:23
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