Skip to content

[finding] Four more agent-facing copies of the worktree recipe still teach the unhardened form — all four miss --no-track, two also base off unfetched local main #13729

Description

@huangyiirene

Found while implementing the hooks half (13663 / PR 13727). Aligning the two guard-main-checkout remediation strings to the prescribed form left the surrounding sweep with four more prescriptive copies that are still unhardened. Filed rather than ridden along: they are a different file surface than that card's declared one, and one of them is a published skill with its own line/token budget rules.

Measured

grep -rn "worktree add" over the tree at origin/main 4f65837a, keeping only the copies that PRESCRIBE a recipe to an agent (comparison worktrees, --detach provenance recipes, and selftest fixtures are excluded — they are not instructions anyone follows to start work):

file:line recipe as written missing fetch + origin/ missing --no-track
.claude/skills/checklist-author/SKILL.md:33 git worktree add ../objectstack-<task> -b <branch> main yes yes
.claude/agents/os-dev.md:33 git worktree add ../<repo>-issue-<n> -b claude/issue-<n>-<slug> origin/main no yes
.claude/skills/dogfood-verification/SKILL.md:140 git worktree add -b <branch> /tmp/pr origin/main no yes
skills/objectstack-pm-dispatch/SKILL.md:741 git worktree add ../<repo>-issue-<n> -b claude/issue-<n>-<slug> origin/{default_branch} no yes

grep -c "no-track" over all four: 0.

(Reading this through a tool that strips tag-shaped fragments? The <task> / <branch> / <repo> placeholders may render empty — read the files at the line numbers above.)

Why it matters, per hazard

  • No --no-track (all four) — plain -b writes branch.NAME.remote / branch.NAME.merge into the .git/config that every worktree of the repo SHARES. This is the class already adjudicated in 13052 / ui 6880 and already hardened in AGENTS.md Prime Directive 11 and CLAUDE.md; these copies were not swept with it.
  • Based on local main, with no fetch (checklist-author only) — bases the new tree on a stale commit. The ui 6208 class; 11540 measured a live shared checkout 120 commits and 179 hours behind.

.claude/agents/os-dev.md:33 is the highest-traffic of the four: it is the operating template every dispatched developer agent runs under, so its recipe is executed on essentially every card.

Not one card

Three of the four are internal (.claude/**). The fourth, skills/objectstack-pm-dispatch/SKILL.md, is a customer-published skill — it is a template for OTHER repositories (note the {default_branch} interpolation), so the correct hardened spelling there is not simply a copy of this repo's line, and any edit there is subject to the published-skills budget discipline. Splitting or scoping that half is a triage call, not one this seat should make unilaterally.

Unassigned and untriaged on purpose.

Refs: 13663 (the hooks half) · PR 13727 · 13052 / ui 6880 (the --no-track adjudications) · ui 6208 and 11540 (the unfetched-main adjudication).

Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions