fix: add text_mode support to plan-phase workflow#1323
Merged
Conversation
4 tasks
`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>
The test tried to fs.readFileSync on config.json which doesn't exist in createTempProject() fixtures. Now gracefully creates the config from scratch when the file is missing. Co-Authored-By: GhadiSaab <GhadiSaab@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Windows CI, os.tmpdir() returns 8.3 short paths (C:\Users\RUNNER~1) while git returns long paths (C:\Users\runneradmin). fs.realpathSync() doesn't resolve DOS 8.3 names on NTFS — fs.realpathSync.native() does. Added normalizePath() helper using realpathSync.native with fallback, applied to all temp dir creation and path comparisons in the linked worktree test suite. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7b6faec to
f5bd3dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #1314 by @GhadiSaab (includes their work + test fix). Closes #1313.
PR #1223 added
text_modesupport todiscuss-phasebut leftplan-phaseusing rawAskUserQuestioncalls everywhere. Settingworkflow.text_mode trueor passing--texthad no effect onplan-phase.Changes (from #1314)
init plan-phasenow exposestext_modefrom config in its JSON outputplan-phaseworkflow parses--textflag and resolvesTEXT_MODEAskUserQuestioncall sites render as plain-text numbered lists whenTEXT_MODEis active--textadded to the command'sargument-hintand flags documentationFix (this PR)
init plan-phase exposes text_mode true when set in configfailed becausecreateTempProject()doesn't createconfig.json. Now gracefully handles missing file.Test plan
Credit: @GhadiSaab for the original implementation.
🤖 Generated with Claude Code