git-worktrees: defer bare-worktree requests to the harness's native worktree flow — the skill is for provisioned parallel dev only #63

Closed
opened 2026-08-25 08:52:48 +00:00 by jbr870 · 1 comment
Owner

Finding

git-worktrees captures every "create worktree" request, including on projects where it has
nothing to do. Its Triggers fire unconditionally, and the Dispatch section's fallback branch reads
"No parallel_dev: block → nothing changes. Use the ad-hoc procedures below exactly as they
are." — so on a project with no provisioning at all (no parallel_dev:, no ## Worktrees hooks),
the skill hand-runs worktree creation that the harness's native worktree flow (EnterWorktree:
managed location under .claude/worktrees/, branch from origin default, keep/remove exit
discipline, refuses to delete unmerged work) already does with less ceremony and better safety.

Live occurrence (2026-08-25): devwork-skills' own parallel-sessions setup had to write an explicit
"deliberately not used here" carve-out into its CLAUDE.md to keep sessions off this skill. The
skill text itself should carry that boundary so every consumer doesn't need a local carve-out.

Operator direction (2026-08-25): this skill's purpose is provisioned parallel dev — host worktrees
with setup around them, and per the operator's isolation policy, independent containers per
worktree wherever runtime resources exist. A bare worktree is not its business.

Amendment (minimal)

  1. Frontmatter description: — state the boundary so skill selection routes correctly:
    the skill is for worktrees with provisioning (env/install/database/per-slot containers);
    a plain worktree with no setup belongs to the harness's native worktree flow.
  2. Dispatch section — make the fallback a three-way:
    • parallel_dev: declared → slot path (unchanged);
    • no parallel_dev: but a ## Worktrees provisioning section exists → ad-hoc procedures
      (unchanged);
    • neither → this skill is the wrong tool: defer to the harness's native worktree
      functionality (EnterWorktree) and do not hand-run the procedures.
  3. Triggers — one "when NOT to use" line pointing at the same rule.

Scope guard: text-only routing amendment; no helper, procedure-body, or contract changes. The
operator's container-per-worktree policy itself stays a project declaration (see #62's schema
work), not skill text — the skill remains stack-agnostic.

Lane

Meta lane (/meta-amend) — evidence-driven amendment to existing skill text.

## Finding `git-worktrees` captures every "create worktree" request, including on projects where it has nothing to do. Its Triggers fire unconditionally, and the Dispatch section's fallback branch reads "**No `parallel_dev:` block** → nothing changes. Use the ad-hoc procedures below exactly as they are." — so on a project with no provisioning at all (no `parallel_dev:`, no `## Worktrees` hooks), the skill hand-runs worktree creation that the harness's native worktree flow (EnterWorktree: managed location under `.claude/worktrees/`, branch from origin default, keep/remove exit discipline, refuses to delete unmerged work) already does with less ceremony and better safety. Live occurrence (2026-08-25): devwork-skills' own parallel-sessions setup had to write an explicit "deliberately not used here" carve-out into its CLAUDE.md to keep sessions off this skill. The skill text itself should carry that boundary so every consumer doesn't need a local carve-out. Operator direction (2026-08-25): this skill's purpose is provisioned parallel dev — host worktrees with setup around them, and per the operator's isolation policy, independent containers per worktree wherever runtime resources exist. A bare worktree is not its business. ## Amendment (minimal) 1. **Frontmatter `description:`** — state the boundary so skill selection routes correctly: the skill is for worktrees *with provisioning* (env/install/database/per-slot containers); a plain worktree with no setup belongs to the harness's native worktree flow. 2. **Dispatch section** — make the fallback a three-way: - `parallel_dev:` declared → slot path (unchanged); - no `parallel_dev:` but a `## Worktrees` provisioning section exists → ad-hoc procedures (unchanged); - **neither** → this skill is the wrong tool: defer to the harness's native worktree functionality (EnterWorktree) and do not hand-run the procedures. 3. **Triggers** — one "when NOT to use" line pointing at the same rule. Scope guard: text-only routing amendment; no helper, procedure-body, or contract changes. The operator's container-per-worktree policy itself stays a project declaration (see #62's schema work), not skill text — the skill remains stack-agnostic. ## Lane Meta lane (/meta-amend) — evidence-driven amendment to existing skill text.
Author
Owner

meta-amend outcome — amended, commit 7453ac5 (on main, pushed to origin + github).

Edit (plugin/skills/git-worktrees/SKILL.md, text-only, 15+/7-):

  1. Frontmatter description: now states the boundary: the skill is for provisioned parallel dev
    (env/install/databases/per-slot containers); a plain worktree with nothing to provision belongs
    to the harness's native worktree flow.
  2. Triggers gained a "When NOT to use" guard (no parallel_dev: + no ## Worktrees section →
    EnterWorktree, not this skill).
  3. Dispatch is now a three-way: slot path (unchanged) / ad-hoc-with-hooks (unchanged) / neither
    declared → defer to the harness's native worktree flow, do not hand-run the procedures
    .

Gate: scripts/lint-conventions.sh clean at HEAD.

Desk-check against the originating scenario: on devwork-skills (no parallel_dev:, no
## Worktrees section — verified) a "create a worktree for #N" request now hits the trigger guard
and the dispatch third branch and routes to EnterWorktree. Slot-pool projects (verity) and
hooks-only projects walk their branches verbatim — no behavior change for them.

Validates next: the first parallel-session wave on this repo (sessions instructed per CLAUDE.md
"Parallel sessions") — a session reaching for /dev:git-worktrees instead of EnterWorktree would be
the counter-evidence. Amendment itself was executed through the built-in flow (EnterWorktree →
commit 7453ac5 → ff-merge to main), dogfooding the routing it documents.

**meta-amend outcome — amended, commit 7453ac5 (on main, pushed to origin + github).** **Edit** (`plugin/skills/git-worktrees/SKILL.md`, text-only, 15+/7-): 1. Frontmatter `description:` now states the boundary: the skill is for *provisioned* parallel dev (env/install/databases/per-slot containers); a plain worktree with nothing to provision belongs to the harness's native worktree flow. 2. Triggers gained a **"When NOT to use"** guard (no `parallel_dev:` + no `## Worktrees` section → EnterWorktree, not this skill). 3. Dispatch is now a three-way: slot path (unchanged) / ad-hoc-with-hooks (unchanged) / **neither declared → defer to the harness's native worktree flow, do not hand-run the procedures**. **Gate:** `scripts/lint-conventions.sh` clean at HEAD. **Desk-check** against the originating scenario: on devwork-skills (no `parallel_dev:`, no `## Worktrees` section — verified) a "create a worktree for #N" request now hits the trigger guard and the dispatch third branch and routes to EnterWorktree. Slot-pool projects (verity) and hooks-only projects walk their branches verbatim — no behavior change for them. **Validates next:** the first parallel-session wave on this repo (sessions instructed per CLAUDE.md "Parallel sessions") — a session reaching for /dev:git-worktrees instead of EnterWorktree would be the counter-evidence. Amendment itself was executed through the built-in flow (EnterWorktree → commit 7453ac5 → ff-merge to main), dogfooding the routing it documents.
Sign in to join this conversation.
No description provided.