Problem
When using kanban create --workspace worktree, the dispatcher resolves the worktree path as Path.cwd() / ".worktrees" / task.id (line 2667-2670 of kanban_db.py). Since the gateway process CWD varies between starts, worktrees end up in unpredictable locations:
~/.hermes/hermes-agent/.worktrees/ (gateway from hermes-agent dir)
~/projects/anamnesis/.worktrees/ (gateway from anamnesis dir)
~/.hermes/services/hermes-webui-cn/repo/.worktrees/ (gateway from webui dir)
Additionally, the auto-generated branch name is wt/t_<task_id> which is opaque in git history.
Requested Features
1. --workspace worktree:<path> syntax
Mirror the existing --workspace dir:<path> pattern so users can pin worktree placement:
hermes kanban create "..." --workspace worktree:~/projects/anamnesis/.worktrees/t6-wire
The code already supports this — resolve_workspace() in kanban_db.py uses task.workspace_path when set. The CLI just needs to parse worktree:<path> the same way it parses dir:<path>.
2. --branch <name> flag for meaningful git history
hermes kanban create "..." --workspace worktree --branch wt/t6-wire
The worker would use this branch name when creating the worktree instead of auto-generating wt/t_<task_id>. This makes git log --all show meaningful branch names like wt/t6-wire instead of wt/t_ac4b381c.
Impact
Without this, kanban multi-wave parallelism with worktrees requires manual workarounds: workers renaming branches via git branch -m in task bodies, verifying workspace paths match expectations, etc.
Implementation Notes
hermes_cli/kanban.py WorkspaceAction already parses scratch|worktree|dir:<path>. Extend to accept worktree:<path> and set both workspace_kind=worktree and workspace_path.
- For
--branch, add an optional branch_name column to the kanban tasks table, or pass it through worker environment.
Problem
When using
kanban create --workspace worktree, the dispatcher resolves the worktree path asPath.cwd() / ".worktrees" / task.id(line 2667-2670 ofkanban_db.py). Since the gateway process CWD varies between starts, worktrees end up in unpredictable locations:Additionally, the auto-generated branch name is
wt/t_<task_id>which is opaque in git history.Requested Features
1.
--workspace worktree:<path>syntaxMirror the existing
--workspace dir:<path>pattern so users can pin worktree placement:The code already supports this —
resolve_workspace()inkanban_db.pyusestask.workspace_pathwhen set. The CLI just needs to parseworktree:<path>the same way it parsesdir:<path>.2.
--branch <name>flag for meaningful git historyhermes kanban create "..." --workspace worktree --branch wt/t6-wireThe worker would use this branch name when creating the worktree instead of auto-generating
wt/t_<task_id>. This makesgit log --allshow meaningful branch names likewt/t6-wireinstead ofwt/t_ac4b381c.Impact
Without this, kanban multi-wave parallelism with worktrees requires manual workarounds: workers renaming branches via
git branch -min task bodies, verifying workspace paths match expectations, etc.Implementation Notes
hermes_cli/kanban.pyWorkspaceActionalready parsesscratch|worktree|dir:<path>. Extend to acceptworktree:<path>and set bothworkspace_kind=worktreeandworkspace_path.--branch, add an optionalbranch_namecolumn to the kanban tasks table, or pass it through worker environment.