working-copy-start
Skill0 starsChanged 3 months agoMITView on GitHub
Orchestrates the start of a new parallel working copy (git worktree) and makes it ready for work, per spec/project/parallel-working-copies/. Invoke when the user asks to "start a new working copy", "set up a worktree for feature X", "spin up a worktree and a plan", "begin work on a new branch in its own working copy", or equivalent German-language requests. Creates the worktree via `task worktree:add -- <branch> [slug]` (off origin/develop, keeping the primary checkout on develop), walks the operator through filling the seeded `.resume/<slug>/plan.md` plan-before-work stub (goal, current state, design decision with open questions, work steps, invariants, resume-anchor checklist), then hands off to do the substantive work in a fresh top-level session started from the worktree so it stays `claude --resume`-able, emitting the launch command and a ready-to-paste kickoff prompt. Does not do the feature work itself or open the PR (use `pull-request-create`). Supports resume per `spec/claude/resumable-work/`.
In this repository36 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- audience-identifySkill
- backlog-delivery-orchestrateSkill
- backstage-catalog-generateSkill
- blog-authorSkill
- blog-author-triggerSkill
- cicd-pipeline-designSkill
- continuous-improvement-triageSkill
- cookiecutter-template-manageSkill
- docs-audience-tracks-applySkill
- docs-dry-refactorSkill
- github-issue-templates-applySkill
- issue-backlog-partitionSkill
- issue-batch-orchestrateSkill
- issue-orchestrateSkill
- lektorat-applySkill
- lektorat-auto-reviseSkill
- mermaid-diagrams-applySkill
- mkdocs-structure-applySkill
- permission-allowlist-maintainSkill
- portfolio-auditSkill
- portfolio-inflight-triageSkill
- project-structure-applySkill
- pull-request-createSkill
- pull-request-mergeSkill
- pull-request-runner-sweepSkill
- readme-structure-applySkill
- release-notes-curateSkill
- release-publish-triggerSkill
- requirements-elicitSkill
- spec-drift-auditSkill
- specSkill
- tech-stack-captureSkill
- vocab-drift-auditSkill
- workflow-health-triageSkill
- yaml-json-schemaSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Create only via the conformant path: Use task worktree:add -- <branch> [slug], which branches off origin/develop with an explicit base ref …
- Very specific: line 51
Create the worktree: Run task worktree:add -- <branch> [slug].
- Very specific: line 86
Never switch the primary checkout off develop.
- Very specific: line 87
Always create the worktree through task worktree:add.
- Very specific: line 88
Never skip the plan gate: the plan at .resume/<slug>/plan.md MUST be filled before the substantive work begins.
- Distinctive: line 89
Never do the substantive feature work or open the PR from this skill.
- Very specific: line 90
When spec/project/parallel-working-copies/ disagrees with this skill, the spec wins.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Working Copy Start
Orchestrates the start of a parallel working copy: it creates a git worktree, satisfies the plan-before-work gate, and hands the work off to a fresh, resumable top-level session. It operationalises spec/project/parallel-working-copies/ — specifically §Lifecycle: Create, §Lifecycle: Plan before work, and §Claude Code session scoping. It does not perform the substantive feature work in the worktree (that happens in the handed-off session) and it does not open the pull request (that is pull-request-create).
Why this is a skill, not an agent
- Mid-flow interactivity is the contract — confirming the branch/slug, then filling the plan's load-bearing design decision and its open questions, are per-step operator dialogues; an agent's fire-and-forget contract would lose them.
- Persistent on-disk artefacts are the deliverable — the worktree and its
.resume/<slug>/plan.mdare durable state the operator carries into the next session; skills own persistent state. - Orchestrator role — this is the first step of a "ship a feature" flow that later chains into
pull-request-create; perspec/claude/skill-vs-agent/the orchestrator defaults to skill form.
User-language policy
Detect the operator's language and respond in it. The plan stub and any committed configuration stay in English; the operator's free-form plan content may be in their own language.
Guardrails
- The primary checkout stays on
develop. Never switch it onto a feature branch. The worktree is the place the work happens; the primary checkout is only the launchpad it branches from. This is enforced by theguard-primary-checkoutpre-commit hook and thePreToolUsefeature-branch guard — do not work around them. - Create only via the conformant path. Use
task worktree:add -- <branch> [slug], which branches offorigin/developwith an explicit base ref and places the worktree under${NOLTE_WORKTREE_ROOT:-~/repos/.worktrees}/<repo>/<slug>/. Nevergit worktree addto an ad-hoc path, and never nest a worktree under.claude/. - The plan gate is documentary, not mechanical. Fill the stub; do not add a hard-blocking hook. The value is the plan existing before work, not an enforced abort.
Operations
1. Start a working copy
- Collect the branch and optional slug. The branch MUST carry an allowed prefix (
feat/,fix/,chore/,docs/,exp/) perspec/project/branching-model/. Propose a kebab-case slug if the operator does not give one (defaults to the branch name minus its prefix). - Create the worktree. Run
task worktree:add -- <branch> [slug]. This branches offorigin/develop, seeds.resume/<slug>/plan.mdwith a plan stub, and prints the worktree path. Confirm the worktree path back to the operator. - Fill the plan-before-work stub. Open the seeded
.resume/<slug>/plan.mdinside the new worktree and walk the operator through completing every section: the goal, the researched current state, the load-bearing design decision with the open questions to confirm before work starts, the ordered work steps, the invariants and guardrails carried over fromCLAUDE.mdand the governing specs, and a status/resume-anchor checklist whose first unchecked box is where the next session resumes. Do not start the substantive work — capturing the plan is the gate. Hand off to a fresh resumable session. Instruct the operator to do the substantive work in a fresh top-level session started from the worktree (
cd <worktree> && claude), not a dispatched subagent or Workflow run, because only a top-level session's transcript isclaude --resume-able (recoverable later viatask resume). Emit both halves of the hand-off so the operator can paste them straight through:the launch command, with the concrete worktree path filled in:
cd <worktree-path> && claudea ready-to-paste kickoff prompt for that fresh session. It MUST lead with an invocation of
/nolte-shared:requirements-elicit, so the substantive work begins by capturing the working copy's requirement precisely (the same upstream gateroadmap-plan,feature-decompose, andissue-orchestraterely on) rather than by acting on the first plausible guess; only then does it pick the work up from the plan. Use this shape:/nolte-shared:requirements-elicit capture the requirement for this working copy. Once the requirement artifact is at or above threshold, read the plan at .resume/<slug>/plan.md and begin the work from the first unchecked resume-anchor box, keeping the plan's status/resume-anchor checklist up to date as you go.
Substitute the real
<worktree-path>and<slug>so the operator copies a working command and prompt, not placeholders.
Gotchas
Per spec/claude/skill-management/ §Gotchas — concrete corrections to non-obvious environment facts the executing agent would otherwise get wrong.
- The worktree root is
NOLTE_WORKTREE_ROOT, not a fixed path.task worktree:addreads${NOLTE_WORKTREE_ROOT:-~/repos/.worktrees}per machine; the worktree lands under whatever that variable points to. Don't assume~/repos/.worktreeswhen confirming the path back to the operator — read the actual path thetaskcommand prints. - The primary-checkout guards go silent inside the worktree — that's expected, not a disabled guard. The
PreToolUsefeature-branch guard and theguard-primary-checkoutpre-commit hook only fire in the primary checkout; inside a linked worktree feature branches are correct, so both no-op. Don't misread that silence as the guard being off. - A harness subagent worktree can nest under
.claude/worktrees/unless redirected. Before the firstAgent({isolation: "worktree"})call,CLAUDE_AGENT_WORKTREE_ROOTmust point under the same spec-conformantNOLTE_WORKTREE_ROOTroot; otherwise the harness default materialises the worktree under.claude/worktrees/, whichspec/project/parallel-working-copies/§Path layout forbids.
Resumability
Per spec/claude/resumable-work/, this skill is resumable: true. State is persisted to .resume/working-copy-start/<run-id>.yml after every successful user-approval gate (worktree created, plan filled) and after each named phase boundary. On re-invocation, scan that directory for files with status: in_progress whose inputs: snapshot matches the current invocation; if one matches, prompt the operator with Resume run <run_id> from phase <phase> (last checkpoint <last_checkpoint_at>)? [resume / start-new / discard]. The state-file envelope and fail-closed semantics on schema or YAML errors are load-bearing in the spec; do not duplicate those rules here.
Hard rules
- Never switch the primary checkout off
develop; all feature work happens in the worktree. - Always create the worktree through
task worktree:add; never an ad-hocgit worktree addpath, and never nested under.claude/. - Never skip the plan gate: the plan at
.resume/<slug>/plan.mdMUST be filled before the substantive work begins. - Never do the substantive feature work or open the PR from this skill; prepare and hand off only.
- When
spec/project/parallel-working-copies/disagrees with this skill, the spec wins; propose updating this skill rather than diverging.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

