using-git-worktrees
Using Git Worktrees
Overview
In Warcraft, use worktree lifecycle tools rather than manual git worktree commands.
Primary interfaces:
warcraft_worktree_createwarcraft_worktree_commitwarcraft_worktree_discardwarcraft_merge
Standard Flow
- Confirm task is runnable (
warcraft_status) - Prepare the task workspace (
warcraft_worktree_create) - Issue the returned
task()call and implement in the assigned workspace - Commit/report (
warcraft_worktree_commit) - Merge or discard based on outcome
Why this matters
Warcraft tools keep task state, reports, and branch/worktree metadata in sync. Manual git-only operations can desynchronize artifacts.
Red Flags
Never:
- Start task work without a Warcraft-managed workspace
- Skip the returned
task()call afterwarcraft_worktree_create - Bypass Warcraft task status updates
- Merge/discard without reflecting result in Warcraft flow
Always:
- Validate runnable status first
- Capture verification evidence before commit
- Use merge/discard paths deliberately
More from minhtri2710/opencode-warcraft
br
>-
1writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
1writing-skills
Use when creating or updating built-in skills so they remain discoverable, testable, and aligned with both upstream superpowers and Warcraft workflows.
1code-reviewer
Use when reviewing implementation changes against an approved plan or task (especially before merging or between Warcraft tasks) to catch missing requirements, YAGNI, dead code, and risky patterns
1executing-plans
Use when you have a written implementation plan to execute in a separate session with review checkpoints
1agents-md-mastery
Use when bootstrapping, updating, or reviewing AGENTS.md — teaches what makes effective agent memory, how to structure sections, signal vs noise filtering, and when to prune stale entries
1