Skip to content

docs: require a dedicated git worktree + branch per development task (Hard Rule #19) - #3939

Merged
diegosouzapw merged 1 commit into
release/v3.8.26from
docs/worktree-isolation-rule
Jun 15, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.26from
docs/worktree-isolation-rule

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

What

Documents the worktree-isolation workflow that every development task in this repo must follow, and codifies it as Hard Rule #19.

Why

Multiple sessions/agents work this repo in parallel against a shared main checkout. A git checkout / branch switch there silently discards another session's uncommitted work and yanks the branch out from under whatever else is running (observed incidents 2026-06-05, 2026-06-13). The fix is procedural: never develop on the shared checkout.

Changes (docs only — CLAUDE.md)

  • New "Worktree isolation (MANDATORY for every development task)" subsection under Git Workflow:
    1. Ask the operator for the base branch first (via AskUserQuestion) — never assume main or the current branch.
    2. Cut a dedicated worktree + branch off that base (git worktree add … origin/<base>, symlink node_modules, or the native EnterWorktree).
    3. Work/commit/PR from inside the worktree.
    4. Tear down only your own worktree+branch (by name, never fix/*/feat/* wildcards).
    5. Never touch another session's worktree/branch/uncommitted work; end on the branch you started on (active release/vX.Y.Z, never main).
  • New Hard Rule docs: add npm badge, CLI options, and release workflow to README #19 cross-referencing the subsection.

No code or test changes.

…(Hard Rule #19)

Multiple sessions/agents share the main checkout, so a git checkout/branch switch
there silently discards another session's uncommitted work. Document the worktree-
isolation workflow (ask the operator for the base branch first, cut a dedicated
worktree+branch off it, tear down only your own) as a new 'Worktree isolation'
subsection under Git Workflow, and codify it as Hard Rule #19.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@diegosouzapw
diegosouzapw merged commit fe182d1 into release/v3.8.26 Jun 15, 2026
2 checks passed
@diegosouzapw
diegosouzapw deleted the docs/worktree-isolation-rule branch June 15, 2026 23:39
@diegosouzapw diegosouzapw mentioned this pull request Jun 16, 2026
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…(Hard Rule cheaper-inference#19) (cheaper-inference#3939)

Multiple sessions/agents share the main checkout, so a git checkout/branch switch
there silently discards another session's uncommitted work. Document the worktree-
isolation workflow (ask the operator for the base branch first, cut a dedicated
worktree+branch off it, tear down only your own) as a new 'Worktree isolation'
subsection under Git Workflow, and codify it as Hard Rule cheaper-inference#19.
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