feat(config): add workflow.use_worktrees toggle to disable worktree isolation
Adds `workflow.use_worktrees` config option (default: `true`) that allows users to disable git worktree isolation for executor agents. When set to `false`: - Executor agents run without `isolation="worktree"` - Plans execute sequentially on the main working tree - No worktree merge ordering issues or orphaned worktrees - Normal git hooks run (no --no-verify needed) This provides an escape hatch for solo developers and users who experience worktree merge conflicts, as worktree ordering issues are inherently difficult when parallel agents modify overlapping files. Usage: /gsd:settings → set workflow.use_worktrees to false Or directly: gsd-tools config-set workflow.use_worktrees false Changes: - config.cjs: add workflow.use_worktrees to valid keys - planning-config.md: document the option - execute-phase.md: read config, conditional worktree + sequential mode - execute-plan.md: conditional worktree in Pattern A - quick.md: conditional worktree for quick executor - diagnose-issues.md: conditional worktree for debug agents - 2 new tests (config set + workflow structural check) Closes #1451 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -105,4 +105,20 @@ describe('execute-phase docs: user-facing wave flag', () => {
|
||||
'help.md should include wave-filter usage'
|
||||
);
|
||||
});
|
||||
|
||||
test('workflow supports use_worktrees config toggle', () => {
|
||||
const content = fs.readFileSync(WORKFLOW_PATH, 'utf-8');
|
||||
assert.ok(
|
||||
content.includes('USE_WORKTREES'),
|
||||
'workflow should reference USE_WORKTREES variable'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('config-get workflow.use_worktrees'),
|
||||
'workflow should read use_worktrees from config'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('Sequential mode'),
|
||||
'workflow should document sequential mode when worktrees disabled'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user