Worktree support

From dean0x/devflow · View interactive version

Worktree support is an AI agent skill from the GitHub repository dean0x/devflow. Use when resolving or discovering worktree paths.

How to use this skill

Skill file

Worktree Support

Iron Law

WORKTREE_PATH IS A PREFIX, NOT A FLAG

When WORKTREE_PATH is provided, it replaces cwd as the root of ALL paths and commands.

Agent Path Resolution

| Operation | Without WORKTREE_PATH | With WORKTREE_PATH |

|-----------|----------------------|-------------------|

| Git commands | git ... | git -C {WORKTREE_PATH} ... |

| .devflow/docs/ paths | .devflow/docs/... | {WORKTREE_PATH}/.devflow/docs/... |

| Source files | {file} | {WORKTREE_PATH}/{file} |

Protected Branches (Canonical List)

main, master, develop, integration, trunk, release/*, staging, production

Every protected-branch check uses this exact list.

The HUD mirrors it in TRUNK_BRANCHES/TRUNK_BRANCH_PREFIXES/isTrunkBranch() in src/core/git.ts: update both together.

Extended References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.