Add a repo CLAUDE.md forbidding worktree development of the plugin #15

Closed
opened 2026-06-30 13:34:48 +02:00 by Brummel · 0 comments
Owner

This repository has no project CLAUDE.md. Developing the plugin from a
git worktree is silently ineffective, so the constraint is now recorded in
a repo-local CLAUDE.md.

Cause (verified): install.sh:19 resolves REPO_DIR to the absolute path
of the clone it runs from, and the symlink loop writes absolute targets
(install.sh:44). The live ~/.claude/skills/*, agents/*, and
workflows/*.js symlinks all point into the primary clone ~/dev/skills.
Claude Code loads user-level skills/agents/workflows through those symlinks
regardless of cwd, so a session always executes the primary clone's
definitions — edits made in a worktree of this repo are not what the live
session runs. Re-running install.sh from a worktree skips existing
symlinks (install.sh:37) and only links new skills, producing a
split-brain across two checkouts.

Secondary (verified): a worktree session re-keys the cwd-derived project
slug (postmortem/scripts/postmortem.py:304, cwd.replace("/", "-")), so
the auto-memory and session transcript land under a different namespace
than the primary clone.

Scope: the constraint is specific to editing the plugin itself. Consumer
projects are unaffected.

Acceptance:

  • CLAUDE.md exists at the repo root and states the no-worktree rule
    with its rationale.
This repository has no project `CLAUDE.md`. Developing the plugin from a git worktree is silently ineffective, so the constraint is now recorded in a repo-local `CLAUDE.md`. Cause (verified): `install.sh:19` resolves `REPO_DIR` to the absolute path of the clone it runs from, and the symlink loop writes absolute targets (`install.sh:44`). The live `~/.claude/skills/*`, `agents/*`, and `workflows/*.js` symlinks all point into the primary clone `~/dev/skills`. Claude Code loads user-level skills/agents/workflows through those symlinks regardless of cwd, so a session always executes the primary clone's definitions — edits made in a worktree of this repo are not what the live session runs. Re-running `install.sh` from a worktree skips existing symlinks (`install.sh:37`) and only links new skills, producing a split-brain across two checkouts. Secondary (verified): a worktree session re-keys the cwd-derived project slug (`postmortem/scripts/postmortem.py:304`, `cwd.replace("/", "-")`), so the auto-memory and session transcript land under a different namespace than the primary clone. Scope: the constraint is specific to editing the plugin itself. Consumer projects are unaffected. Acceptance: - [ ] `CLAUDE.md` exists at the repo root and states the no-worktree rule with its rationale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Skills#15