Summary
Update the experiment command and template to use git worktrees for isolated experimentation, replacing the current branch/directory approach. Add worktree management guidance, cleanup verification, and fallback for non-worktree environments.
Requirements
Context
Phase 2 of the workflow redesign plan. Depends on Phase 1 (orchestrator references worktree patterns).
The current experiment command suggests git checkout -b experiment-[slug] or mkdir -p .experiments/ — both pollute the working tree. Worktrees provide true isolation.
Implementation Notes
Key files:
plugins/ai-research-workflows/commands/experiment.md (lines 147-149 for current isolation guidance)
plugins/ai-research-workflows/skills/research-workflow-management/assets/experiment-template.md
Summary
Update the experiment command and template to use git worktrees for isolated experimentation, replacing the current branch/directory approach. Add worktree management guidance, cleanup verification, and fallback for non-worktree environments.
Requirements
git checkout -band.experiments/guidance with worktree isolation (Claude Codeisolation: "worktree"or manualgit worktree add)## Worktree Managementsection: create, run, compare, cleanup worktrees**Worktree:**metadata field and## Worktree Detailssection## Retreat Pathsection to template (plan changes needed →/iterate-plan, no viable approach → back to/plan)Context
Phase 2 of the workflow redesign plan. Depends on Phase 1 (orchestrator references worktree patterns).
The current experiment command suggests
git checkout -b experiment-[slug]ormkdir -p .experiments/— both pollute the working tree. Worktrees provide true isolation.Implementation Notes
Key files:
plugins/ai-research-workflows/commands/experiment.md(lines 147-149 for current isolation guidance)plugins/ai-research-workflows/skills/research-workflow-management/assets/experiment-template.md