fix: add text_mode support to plan-phase workflow
`workflow.text_mode: true` (or `--text` flag) now applies to plan-phase, not just discuss-phase. Fixes #1313. Changes: - `init plan-phase` now exposes `text_mode` from config in its JSON output - plan-phase workflow parses `--text` flag and resolves TEXT_MODE from init JSON or flag, whichever is set - All four AskUserQuestion call sites (no-context gate, research prompt, UI design contract gate, requirements coverage gap) now conditionally present as plain-text numbered lists when TEXT_MODE is active - `--text` added to plan-phase command argument-hint and flags docs - Tests added for init output and workflow references Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,31 @@ describe('workflow.discuss_mode config', () => {
|
||||
assert.ok(workflow.includes('--text'), 'should handle --text flag');
|
||||
});
|
||||
|
||||
test('plan-phase workflow references text_mode', () => {
|
||||
const planPhase = fs.readFileSync(
|
||||
path.join(__dirname, '..', 'get-shit-done', 'workflows', 'plan-phase.md'), 'utf8'
|
||||
);
|
||||
assert.ok(planPhase.includes('text_mode'), 'plan-phase workflow should reference text_mode');
|
||||
assert.ok(planPhase.includes('TEXT_MODE'), 'plan-phase workflow should use TEXT_MODE variable');
|
||||
assert.ok(planPhase.includes('--text'), 'plan-phase workflow should handle --text flag');
|
||||
});
|
||||
|
||||
test('plan-phase command argument-hint includes --text', () => {
|
||||
const command = fs.readFileSync(
|
||||
path.join(__dirname, '..', 'commands', 'gsd', 'plan-phase.md'), 'utf8'
|
||||
);
|
||||
assert.ok(command.includes('--text'), 'argument-hint should include --text flag');
|
||||
});
|
||||
|
||||
test('plan-phase init exposes text_mode in workflow flags', () => {
|
||||
const initSrc = fs.readFileSync(
|
||||
path.join(__dirname, '..', 'get-shit-done', 'bin', 'lib', 'init.cjs'), 'utf8'
|
||||
);
|
||||
// The cmdInitPlanPhase result object must include text_mode
|
||||
const planPhaseBlock = initSrc.slice(initSrc.indexOf('function cmdInitPlanPhase'));
|
||||
assert.ok(planPhaseBlock.includes('text_mode: config.text_mode'), 'init plan-phase must expose text_mode');
|
||||
});
|
||||
|
||||
test('progress workflow references discuss_mode', () => {
|
||||
const progress = fs.readFileSync(
|
||||
path.join(__dirname, '..', 'get-shit-done', 'workflows', 'progress.md'), 'utf8'
|
||||
|
||||
Reference in New Issue
Block a user