RLM Worktree Isolation
Use this skill for Phase 0 worktree setup before any other RLM phase work begins.
Trigger Examples
Create an isolated worktree for this requirementSet up Phase 0 worktree isolation for run '2026-02-24-add-oauth'I'm on main; move me to a worktreeUse .worktrees/ and ensure it is git-ignored
Non-Negotiable Rules
- Do not proceed with any later RLM phase until the isolated worktree exists.
- Do not work on
mainormasterwithout explicit user consent. - Do not use a project-local worktree directory until it is verified as git-ignored.
- Do not begin changes until setup completes and the baseline test state is known.
Required Outcome
Produce:
- an isolated worktree on a feature branch such as
rlm/<run-id> - a locked
00-worktree.mdartifact recording:- chosen worktree location
- branch name
- setup commands run
- baseline validation result
Directory Selection Order
Select the worktree directory in this order:
- existing
.worktrees/ - existing
worktrees/ - documented convention in local repo docs
- ask the user if no convention exists
Default to .worktrees/ when no convention exists.
Required Procedure
- Detect the current branch.
- If on
mainormaster, stop and require explicit consent or create a worktree by default. - Resolve the worktree directory using the selection order above.
- For project-local directories, verify they are git-ignored.
- Create the worktree and feature branch.
- Run project setup based on the detected stack.
- Run the baseline test command or otherwise record the baseline test state.
- Write
00-worktree.mdwith evidence and gate results.
Required References
Read these only when needed:
references/worktree-manual.md- full worktree workflow, branch protection flow, and artifact template
../rlm-workflow-acp/references/artifact-template.md- artifact structure and gate patterns
Safety Checks
- Verify the selected project-local directory is ignored with
git check-ignore. - If it is not ignored, fix that before creating the worktree.
- Record any baseline test failures explicitly instead of assuming a clean start.
Output Discipline
Keep the Phase 0 artifact concrete and reproducible:
- exact worktree path
- exact branch
- exact setup commands
- exact baseline verification result