Skip to content

fix: add text_mode support to plan-phase workflow#1323

Merged
trek-e merged 3 commits intomainfrom
fix/text-mode-plan-phase-v2
Mar 22, 2026
Merged

fix: add text_mode support to plan-phase workflow#1323
trek-e merged 3 commits intomainfrom
fix/text-mode-plan-phase-v2

Conversation

@trek-e
Copy link
Copy Markdown
Collaborator

@trek-e trek-e commented Mar 22, 2026

Summary

Supersedes #1314 by @GhadiSaab (includes their work + test fix). Closes #1313.

PR #1223 added text_mode support to discuss-phase but left plan-phase using raw AskUserQuestion calls everywhere. Setting workflow.text_mode true or passing --text had no effect on plan-phase.

Changes (from #1314)

  • init plan-phase now exposes text_mode from config in its JSON output
  • plan-phase workflow parses --text flag and resolves TEXT_MODE
  • All four AskUserQuestion call sites render as plain-text numbered lists when TEXT_MODE is active
  • --text added to the command's argument-hint and flags documentation

Fix (this PR)

  • Test init plan-phase exposes text_mode true when set in config failed because createTempProject() doesn't create config.json. Now gracefully handles missing file.

Test plan

  • All 1275 tests pass locally (0 failures)
  • The previously failing test now passes

Credit: @GhadiSaab for the original implementation.

🤖 Generated with Claude Code

GhadiSaab and others added 3 commits March 22, 2026 11:21
`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>
@trek-e trek-e force-pushed the fix/text-mode-plan-phase-v2 branch from 7b6faec to f5bd3dd Compare March 22, 2026 15:23
@trek-e trek-e merged commit 59a6b8c into main Mar 22, 2026
4 checks passed
@trek-e trek-e deleted the fix/text-mode-plan-phase-v2 branch April 2, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

text_mode missing from plan-phase workflow

2 participants