feat(workflows): add conditional thinking partner at decision points (#1816)
Integrate lightweight thinking partner analysis at two workflow decision points, controlled by features.thinking_partner config (default: false): 1. discuss-phase: when developer answers reveal competing priorities (detected via keyword/structural signals), offers brief tradeoff analysis before locking decisions 2. plan-phase: when plan-checker flags architectural tradeoffs, analyzes options and recommends an approach aligned with phase goals before entering the revision loop The thinking partner is opt-in, skippable (No, I have decided), and brief (3-5 bullets). A third integration point for /gsd-explore will be added when #1729 lands. Closes #1726 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -607,6 +607,20 @@ Table-first discussion flow — present research-backed comparison tables, then
|
||||
- If user picks from table options → record as locked decision for that area
|
||||
- If user picks "Other" → receive their input, reflect it back for confirmation, record
|
||||
|
||||
**Thinking partner (conditional):**
|
||||
If `features.thinking_partner` is enabled in config, check the user's answer for tradeoff signals
|
||||
(see `references/thinking-partner.md` for signal list). If tradeoff detected:
|
||||
|
||||
```
|
||||
I notice competing priorities here — {option_A} optimizes for {goal_A} while {option_B} optimizes for {goal_B}.
|
||||
|
||||
Want me to think through the tradeoffs before we lock this in?
|
||||
[Yes, analyze] / [No, decision made]
|
||||
```
|
||||
|
||||
If yes: provide 3-5 bullet analysis (what each optimizes/sacrifices, alignment with PROJECT.md goals, recommendation). Then return to normal flow.
|
||||
If no or thinking_partner disabled: continue to next area.
|
||||
|
||||
4. **After recording pick, Claude decides whether follow-up questions are needed:**
|
||||
- If the pick has ambiguity that would affect downstream planning → ask 1-2 targeted follow-up questions using AskUserQuestion
|
||||
- If the pick is clear and self-contained → move to next area
|
||||
|
||||
@@ -772,6 +772,25 @@ Task(
|
||||
- **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 13.
|
||||
- **`## ISSUES FOUND`:** Display issues, check iteration count, proceed to step 12.
|
||||
|
||||
**Thinking partner for architectural tradeoffs (conditional):**
|
||||
If `features.thinking_partner` is enabled, scan the checker's issues for architectural tradeoff keywords
|
||||
("architecture", "approach", "strategy", "pattern", "vs", "alternative"). If found:
|
||||
|
||||
```
|
||||
The plan-checker flagged an architectural decision point:
|
||||
{issue description}
|
||||
|
||||
Brief analysis:
|
||||
- Option A: {approach_from_plan} — {pros/cons}
|
||||
- Option B: {alternative_approach} — {pros/cons}
|
||||
- Recommendation: {choice} aligned with {phase_goal}
|
||||
|
||||
Apply this to the revision? [Yes] / [No, I'll decide]
|
||||
```
|
||||
|
||||
If yes: include the recommendation in the revision prompt. If no: proceed to revision loop as normal.
|
||||
If thinking_partner disabled: skip this block entirely.
|
||||
|
||||
## 12. Revision Loop (Max 3 Iterations)
|
||||
|
||||
Track `iteration_count` (starts at 1 after initial plan + check).
|
||||
|
||||
Reference in New Issue
Block a user