fix(workflows): add text_mode config for Claude Code remote session compatibility (#1214)

- Add workflow.text_mode config option (default: false) that replaces
  AskUserQuestion TUI menus with plain-text numbered lists
- Document --text flag and config-set workflow.text_mode true as the
  fix for /rc remote sessions where the Claude App cannot forward TUI
  menu selections
- Update discuss-phase.md with text mode parsing and answer_validation
  fallback documentation
- Add text_mode to loadConfig defaults and VALID_CONFIG_KEYS
- Add regression tests for config-set and loadConfig
This commit is contained in:
Tom Boucher
2026-03-19 09:19:01 -04:00
parent 1427aab41b
commit 0487151142
6 changed files with 36 additions and 0 deletions

View File

@@ -110,6 +110,18 @@ Phase: "API documentation"
1. Retry the question once with the same parameters
2. If still empty, present the options as a plain-text numbered list and ask the user to type their choice number
Never proceed with an empty answer.
**Text mode (`workflow.text_mode: true` in config or `--text` flag):**
When text mode is active, **do not use AskUserQuestion at all**. Instead, present every
question as a plain-text numbered list and ask the user to type their choice number.
This is required for Claude Code remote sessions (`/rc` mode) where the Claude App
cannot forward TUI menu selections back to the host.
Enable text mode:
- Per-session: pass `--text` flag to any command (e.g., `/gsd:discuss-phase --text`)
- Per-project: `gsd-tools config-set workflow.text_mode true`
Text mode applies to ALL workflows in the session, not just discuss-phase.
</answer_validation>
<process>
@@ -464,6 +476,13 @@ With that context: How should users authenticate?
When disabled (default), skip the research and present questions directly as before.
**Text mode support:** Parse optional `--text` from `$ARGUMENTS`.
- Accept `--text` flag OR read `workflow.text_mode` from config (from init context)
- When active, replace ALL `AskUserQuestion` calls with plain-text numbered lists
- User types a number to select, or types free text for "Other"
- This is required for Claude Code remote sessions (`/rc` mode) where TUI menus
don't work through the Claude App
**Batch mode support:** Parse optional `--batch` from `$ARGUMENTS`.
- Accept `--batch`, `--batch=N`, or `--batch N`

View File

@@ -172,6 +172,9 @@ Merge new settings into existing config.json:
"context_warnings": true/false,
"workflow_guard": true/false,
"research_questions": true/false
},
"workflow": {
"text_mode": true/false // Use plain-text questions instead of TUI menus (for /rc remote sessions)
}
}
```