Standardize user input and approval patterns across all commands
Summary
Mach10 commands use inconsistent patterns for asking users for input and approval. Some commands present structured choices (good UX), while others require users to type free-text like "this looks good" to proceed. This makes the workflow less predictable and slower for users.
Current Behavior
There are 31 user interaction points across 15 commands. They fall into several categories with inconsistent patterns:
1. Ambiguity clarification (11 commands)
Pattern: "If the input is ambiguous, ask the user to clarify."
- Used in:
issue-plan,issue-assessment,issue-review-plan,issue-implement,pr-create,pr-review,pr-review-fix,pr-review-validate,pr-ci-fix,pr-pre-merge,pr-merge,doc-review - Issue: No guidance on how to ask -- free-text prompt vs. populated choices.
2. Draft approval (5 commands)
Pattern: "Present the draft to the user for approval."
- Used in:
issue-create,pr-create,pr-merge,issue-plan,doc-review - Issue: Users must type free-text to approve. No instruction to use
AskUserQuestionwith structured options like "Approve" / "Modify title" / "Modify body" / "Cancel".
3. Multi-option selection (4 commands)
Pattern: "Ask the user how they want to proceed" with bullet-list options.
- Used in:
issue-review-plan(3 options),pr-review-fix(selection from findings),test-audit(3 options),doc-review(Accept/Modify/Reject per finding) - Issue: Options are listed in prose but there is no instruction to use
AskUserQuestionwith populated choices, so Claude may present them as free-text prompts.
4. Yes/no decisions (2 commands)
Pattern: "Ask the user if they want to..."
- Used in:
pr-merge(create release?),pr-review(create issues for deferred findings?) - Issue: Same as above -- no instruction to use structured choices.
5. Branch selection (1 command)
Pattern: "Present the list to the user and ask them to choose."
- Used in:
issue-implement(branch selection) - Issue: No instruction to use
AskUserQuestionfor the branch list.
6. Version bump (1 command)
Pattern: "Ask the user for the version bump level."
- Used in:
pr-pre-merge - Issue: Natural fit for
AskUserQuestionwith Patch/Minor/Major choices, but no explicit instruction.
7. Explicit no-approval (1 command)
Pattern: "Do not ask the user for approval first."
- Used in:
pr-review(posts assessment directly) - This is intentional and correct -- no change needed.
Proposed Behavior
- Every user interaction point should explicitly specify whether to use
AskUserQuestion(structured choices) or free-text. - Use
AskUserQuestionwith populated choices wherever the set of valid responses is known, including:- Draft approvals: choices like "Approve" / "Modify" / "Cancel"
- Yes/no decisions: "Yes" / "No"
- Multi-option selections: list the options as choices
- Version bump: "Patch" / "Minor" / "Major"
- Branch selection: list discovered branches as choices
- Reserve free-text input for truly open-ended questions (e.g., "What is the issue about?" in
issue-createwhen no description is provided, clarifying questions duringissue-plan). - Standardize the approval wording so all draft-approval steps use a consistent pattern.
Acceptance Criteria
- [ ] Every command file that asks for user input explicitly states the interaction method (
AskUserQuestionwith choices vs. free-text) - [ ] All draft approval steps (issue-create, pr-create, pr-merge, issue-plan, doc-review) use
AskUserQuestionwith structured choices - [ ] All multi-option selections (issue-review-plan, pr-review-fix, test-audit, doc-review per-finding) use
AskUserQuestion - [ ] Yes/no decisions (pr-merge release, pr-review deferred issues) use
AskUserQuestion - [ ] Version bump selection in pr-pre-merge uses
AskUserQuestionwith Patch/Minor/Major - [ ] Branch selection in issue-implement uses
AskUserQuestion - [ ] Free-text is only used for open-ended questions where the answer set cannot be enumerated
- [ ] Ambiguity clarification instructions specify using
AskUserQuestionwhen possible choices can be inferred from context
Technical Notes
- The
AskUserQuestiontool supports 2-4 options with labels and descriptions, plus an automatic "Other" option for custom input - It also supports
multiSelect: truefor non-mutually-exclusive choices (useful for pr-review-fix issue selection) - Commands that delegate to
feature-devorpr-review-toolkitinherit those plugins' own interaction patterns -- this issue focuses only on the mach10 command layer
Implementation Plan
This plan standardizes user input and approval patterns across all mach10 commands. It addresses all acceptance criteria from the issue.
Scope Summary
- 14 command files modified (13 get
AskUserQuestionadded toallowed-tools, 1 gets instruction updates) - 2 command files unchanged:
pr-ci-fix.md(only has parse-level ambiguity clarification),push.md(file staging lists are arbitrarily long, free-text is more appropriate) - 1 project file updated:
CLAUDE.mdgets user interaction guidance for writing commands
Design Decisions
- Context-dependent approval options -- approval choices are tailored per command rather than using a universal 3-option pattern. For example, plan approval uses "Approve / Request changes" while PR creation uses "Approve / Modify / Cancel".
- Parse-only commands skip AskUserQuestion -- commands that only clarify input parsing (where the valid response set cannot be enumerated) keep free-text clarification. Only
pr-ci-fix.mdfalls in this category. - Free-text for open-ended inputs --
push.mdfile staging andissue-create.mdinitial description remain free-text since the answer set cannot be enumerated. - issue-assessment uses two interaction points -- AskUserQuestion for recommendation selection (4 options), then again for draft approval, matching the "Both" pattern.
Stage 1: Draft Approval Commands
5 files modified. Standardizes the most common pattern -- presenting a draft and getting user approval.
| File | Changes |
|---|---|
commands/issue-create.md |
Add AskUserQuestion to allowed-tools. Update Step 3: use AskUserQuestion with "Approve" / "Modify" / "Cancel" for draft issue approval. |
commands/pr-create.md |
Add AskUserQuestion to allowed-tools. Update Step 3: use AskUserQuestion with "Approve" / "Modify" / "Cancel" for draft PR approval. |
commands/pr-merge.md |
Add AskUserQuestion to allowed-tools. Update Step 4: use AskUserQuestion with "Yes" / "No" for release creation. Update Step 5: use AskUserQuestion with "Approve" / "Modify" / "Skip release" for release draft approval. |
commands/issue-plan.md |
Add AskUserQuestion to allowed-tools. Update Step 5: use AskUserQuestion with "Approve" / "Request changes" for plan approval after presenting the draft. |
commands/issue-assessment.md |
Add AskUserQuestion to allowed-tools. Update Step 5: use AskUserQuestion to let the user select from the 4 recommendation options. Update Step 6: after drafting, use AskUserQuestion with "Approve" / "Modify" / "Cancel" for the drafted content. |
Stage 2: Multi-Option and Yes/No Commands
6 files modified. Standardizes multi-option selections, yes/no decisions, and version bump selection.
| File | Changes |
|---|---|
commands/issue-review-plan.md |
Add AskUserQuestion to allowed-tools. Update Step 5: use AskUserQuestion with "Update the plan" / "Proceed as-is" / "Discuss findings" for next-step selection. |
commands/pr-review-fix.md |
Add AskUserQuestion to allowed-tools. Update Step 3: when no specific issue numbers were provided, use AskUserQuestion with multiSelect: true to let the user select which issues to fix from the presented list. Group issues into severity-based choices if the list exceeds 4 items. |
commands/test-audit.md |
Add AskUserQuestion to allowed-tools. Update Step 5: use AskUserQuestion with "Fix critical issues now" / "Create a GitHub issue" / "Review specific findings" for next-step selection. |
commands/pr-review.md |
Add AskUserQuestion to allowed-tools. Update Step 8: use AskUserQuestion with "Yes, create issues for all" / "Let me select which ones" / "No, skip deferred items" for deferred item handling. |
commands/pr-pre-merge.md |
Add AskUserQuestion to allowed-tools. Update Step 4b: use AskUserQuestion with "Patch" / "Minor" / "Major" for version bump level selection (with descriptions explaining when each applies). |
commands/pr-review-validate.md |
Add AskUserQuestion to allowed-tools. Update Step 5: use AskUserQuestion with "Approve and post" / "Modify before posting" / "Skip posting" for comment posting approval. |
Stage 3: Complex Interaction Patterns and Documentation
3 files modified. Handles unique interaction patterns and documents the conventions.
| File | Changes |
|---|---|
commands/issue-implement.md |
Already has AskUserQuestion in allowed-tools. Update Step 2 instruction text for 3 interaction points: (a) multiple branches found -- already uses AskUserQuestion, add explicit instruction text; (b) no branch found -- use AskUserQuestion with "Create a new branch" / "Specify an existing branch"; (c) unrelated branch warning -- use AskUserQuestion with "Continue on this branch" / "Switch to a different branch". |
commands/doc-review.md |
Add AskUserQuestion to allowed-tools. Update Step 5: for each finding, use AskUserQuestion with "Accept" / "Modify" / "Reject". Instruct to process findings one at a time or in small batches. |
CLAUDE.md |
Add a "User Interaction Patterns" section under "Writing Commands" documenting: (a) when to use AskUserQuestion vs free-text, (b) standard approval patterns, (c) the requirement that every user interaction point explicitly specifies its method. |
Files Unchanged (with reasoning)
| File | Reason |
|---|---|
commands/pr-ci-fix.md |
Only has parse-level ambiguity clarification. The valid response set cannot be enumerated from ambiguous input. |
commands/push.md |
File staging lists can be arbitrarily long and don't fit the 2-4 option constraint of AskUserQuestion. Free-text guidance is more appropriate. |
This plan will guide staged implementation via /mach10:issue-implement.
Stage 1 Progress: Draft Approval Commands
Commit: 0376af2
Branch: feature/issue-16-standardize-user-input-patterns
Changes
Added AskUserQuestion to allowed-tools and replaced free-text approval instructions with structured choices in 5 command files:
| File | Interaction points updated |
|---|---|
issue-create.md |
Step 3: Approve / Modify / Cancel for draft issue |
pr-create.md |
Step 3: Approve / Modify / Cancel for draft PR |
pr-merge.md |
Step 4: Create release / Skip. Step 5: Approve / Modify / Skip release |
issue-plan.md |
Step 5: Approve / Request changes / Cancel for plan |
issue-assessment.md |
Step 5: 4-option recommendation selection. Step 6: Approve / Modify / Cancel for draft |
Decisions
- Used context-specific descriptions per command rather than generic wording (e.g., "Edit the PR title or body" vs "Edit the issue title, body, labels, or assignees").
- Used action labels ("Create release" / "Skip") instead of "Yes" / "No" for consistency with other approval steps.
- Added a Cancel option to
issue-plan.mdStep 5 (not in the original plan) for consistency -- every approval step now has an escape path. issue-assessment.mdStep 5 stays at 4 options (the AskUserQuestion maximum); the built-in "Other" option serves as the escape hatch.
Remaining
Stages 2 and 3 cover multi-option/yes-no commands and complex interaction patterns + documentation.
Stage 2 Progress: Multi-Option and Yes/No Commands
Commit: 4aa8405
Branch: feature/issue-16-standardize-user-input-patterns
Changes
Added AskUserQuestion to allowed-tools and replaced free-text prompts with structured choices in 6 command files:
| File | Interaction points updated |
|---|---|
issue-review-plan.md |
Step 5: Update the plan / Proceed as-is / Discuss findings / Cancel |
pr-review-fix.md |
Step 3: multiSelect for issue selection (individual options for <=4 findings, severity-grouped for >4) |
test-audit.md |
Step 5: Fix critical issues now / Create a GitHub issue / Review specific findings |
pr-review.md |
Step 8: Create issues for all / Select which ones / Skip deferred items (with nested multiSelect for selection) |
pr-pre-merge.md |
Step 4b: Patch / Minor / Major for version bump level |
pr-review-validate.md |
Step 5: Approve and post / Modify before posting / Skip posting |
Decisions
- Added a Cancel option to
issue-review-plan.mdStep 5 (not in the original plan) for consistency with Stage 1's escape-path pattern. - Added follow-up instructions for all non-terminal options (e.g., "If the user selects X, do Y") matching Stage 1 conventions.
- Used nested AskUserQuestion in
pr-review.mdStep 8: first call selects the strategy, second call uses multiSelect for individual finding selection. - Kept
pr-review-fix.mdmultiSelect options in prose form since option labels are dynamically generated based on actual review findings.
Remaining
Stage 3 covers complex interaction patterns (issue-implement branch selection, doc-review per-finding approval) and CLAUDE.md documentation.
Stage 3 Progress: Complex Interaction Patterns and Documentation
Commit: 71e75ed
Branch: feature/issue-16-standardize-user-input-patterns
Changes
Updated 3 files to complete the final stage of AskUserQuestion standardization:
| File | Interaction points updated |
|---|---|
issue-implement.md |
Step 2: (a) multiple branches -- AskUserQuestion with branch names as options; (b) no branch found -- "Create a new branch" / "Use an existing branch"; (c) unrelated branch -- "Continue on this branch" / "Switch branch" with full checkout/pull follow-up |
doc-review.md |
Added AskUserQuestion to allowed-tools. Step 5: per-finding approval with Accept / Modify / Reject, processed one at a time |
CLAUDE.md |
Added "User Interaction Patterns" subsection under "Writing Commands" documenting when to use AskUserQuestion vs free-text, conventions for option descriptions/escape paths/follow-ups/multiSelect, and a concrete example |
Decisions
- Used static descriptions for all AskUserQuestion options (no runtime placeholders like
<branch>or#N), consistent with Stages 1-2. - Added full checkout/pull/divergence handling to the "Switch branch" follow-up path (caught during code review -- the original draft was missing this).
- Softened the escape-path rule in CLAUDE.md documentation to acknowledge forced-choice questions (e.g., version bump level) where all options are valid continuations.
- Clarified that free-text for branch names is a follow-up scenario after structured selection, not a primary interaction pattern.
Status
All 3 stages are now complete. Ready for PR creation.