Skip to content

Commit a6abfb4

Browse files
committed
Use question tool inside opencode commands
1 parent 48afc90 commit a6abfb4

4 files changed

Lines changed: 26 additions & 22 deletions

File tree

.opencode/commands/archive-active-plan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Archive completed planning documents to preserve implementation history and upda
1515

1616
2. Check completion status:
1717
- All checkboxes in `active-plan.md` are marked `[x]`
18-
- If incomplete: **STOP** and ask user for confirmation
18+
- If incomplete: **STOP** and use the question tool with options: ["Proceed anyway", "Cancel archival"]
1919

2020
**Action:**
2121

@@ -72,7 +72,7 @@ Archive completed planning documents to preserve implementation history and upda
7272
7373
**Error Handling:**
7474
75-
- If required files missing: Ask user which files to archive
75+
- If required files missing: Use the question tool to list available files and ask which to archive (enable multiple selection)
7676
- If archive directory exists: Append version number
7777
- If AGENTS.md update fails: Warn user but don't block archive
7878

.opencode/commands/create-active-plan.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,17 @@ Technical specification from `.planning/tech-spec.md`
6767
- For features: Are stubs simple and correct?
6868

6969
5. **Clarify Ambiguities**: If anything is unclear:
70-
- Ask about cycle breakdown
71-
- Confirm test file locations
72-
- Discuss refactoring opportunities
70+
- Use the question tool to ask about cycle breakdown with specific options
71+
- Use the question tool to confirm test file locations with discovered locations as options
72+
- Use the question tool to discuss refactoring opportunities with concrete suggestions
7373

7474
**Final Action:**
7575

76-
Ask the user: "Should I create `.planning/active-plan.md` with this content?"
77-
78-
If yes, delegate file creation to the @general agent.
76+
Use the question tool to ask: "Should I create `.planning/active-plan.md` with this content?"
77+
- Options: ["Yes, create it (Recommended)", "No, refine first", "Show me the plan first"]
78+
- If "Yes, create it": Delegate file creation to the @general agent
79+
- If "No, refine first": Gather feedback using the question tool and update the plan
80+
- If "Show me the plan first": Display the plan and then ask again
7981

8082
**Quality Checklist:**
8183
- [ ] Correct template used (TDD vs Red-Green-Refactor)

.opencode/commands/create-implementation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ Implementation plan from `.planning/active-plan.md`
7878
- Report completion to user
7979
- Continue to next cycle
8080

81-
- **FAILURE**:
82-
- Keep cycle as `in_progress`
83-
- Report error to user
84-
- Ask user for guidance before retrying
81+
- **FAILURE**:
82+
- Keep cycle as `in_progress`
83+
- Report error to user
84+
- Use the question tool with options: ["Retry this cycle", "Skip and continue", "Stop execution"]
8585

8686
**d. Sync State After Each Cycle**
8787

@@ -117,7 +117,7 @@ Implementation plan from `.planning/active-plan.md`
117117

118118
- **No active-plan.md**: Report "No implementation plan found. Run `/create-active-plan` first."
119119
- **All cycles complete**: Report "All cycles in active-plan are complete!"
120-
- **Sub-agent failure**: Report error, ask user for guidance
120+
- **Sub-agent failure**: Report error, use the question tool with options: ["Retry this cycle", "Skip and continue", "Stop execution"]
121121
- **Missing tech spec**: STOP - sub-agent cannot proceed without specifications
122122

123123
**Important Rules:**

.opencode/commands/create-story.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,21 @@ $ARGUMENTS
7171
- Is it clear WHAT needs to be done (not HOW)?
7272

7373
4. **Clarify Ambiguities**: If the input is unclear or could have multiple interpretations:
74-
- Present 2-3 specific interpretations
75-
- Show code examples for each interpretation
76-
- Ask the user to select or provide more detail
74+
- Use the question tool to present 2-3 specific interpretations as options
75+
- Include code examples in the option descriptions
76+
- Allow user to select an interpretation or type their own answer
7777

7878
5. **Request Missing Examples**: If scenarios are underspecified:
79-
- Suggest specific example scenarios based on codebase patterns
80-
- Provide options for the user to choose from
81-
- Include edge cases you've identified from similar features
79+
- Use the question tool to suggest specific example scenarios as options
80+
- Include edge cases in option descriptions
81+
- Enable multiple selection if needed
8282

8383
6. **Update and Refine**: Incorporate user feedback into the story
8484

8585
**Final Action:**
8686

87-
Ask the user: "Should I create `.planning/story.md` with this content?"
88-
89-
If yes, delegate file creation to the @general agent.
87+
Use the question tool to ask: "Should I create `.planning/story.md` with this content?"
88+
- Options: ["Yes, create it (Recommended)", "No, refine first", "Show me the content first"]
89+
- If "Yes, create it": Delegate file creation to the @general agent
90+
- If "No, refine first": Gather feedback using the question tool and update the story
91+
- If "Show me the content first": Display the story and then ask again

0 commit comments

Comments
 (0)