Skip to content

Commit 0c080d6

Browse files
ofimbresBill Berry
andauthored
feat(prompts): add dt-method-next routing prompt (#713)
# Pull Request ## Description Implements DT method routing prompt that analyzes Design Thinking coaching state and routes to appropriate methods with transition validation. This PR adds a new `/dt-method-next` prompt that: - Analyzes current DT project coaching state from `.copilot-tracking/dt/{project-slug}/coaching-state.md` - Recommends next method based on completion indicators and sequencing rules - Validates transitions at space boundaries (Problem→Solution, Solution→Implementation) - Handles edge cases: no project, all methods complete, iteration loops - Delegates to dt-coach agent with proper state updates ## Related Issue(s) Fixes #572 ## Type of Change **AI Artifacts:** - [x] Reviewed contribution with `prompt-builder` agent and addressed all feedback - [x] Copilot prompt (`.github/prompts/*.prompt.md`) ## Sample Prompts (for AI Artifact Contributions) **User Request:** ``` /dt-method-next ``` or ``` /dt-method-next project-slug=my-dt-project ``` **Execution Flow:** 1. Locate project directory by deriving project-slug from input, open files, or conversation context 2. Read coaching state YAML frontmatter from `.copilot-tracking/dt/{project-slug}/coaching-state.md` 3. Scan project directory for artifact subdirectories matching `method-{NN}-*/` patterns 4. Assess method completeness against exit signals from `dt-method-sequencing.instructions.md` 5. Apply progression logic (forward, backward iteration, or lateral transitions) 6. Present project status summary with suggested next method and rationale 7. Wait for user confirmation 8. Delegate to dt-coach agent to transition coaching into target method **Output Artifacts:** Console output showing: - Project name and slug - Current method number, name, and phase - Progress (N of 9 methods completed) - Recent work summary - Key artifacts from current method - Suggested next method with rationale - Readiness check for space boundary transitions - User choice prompt **Success Indicators:** - ✅ Prompt correctly identifies project from context or input - ✅ Method recommendation aligns with completion indicators - ✅ Space boundary transitions validate readiness signals - ✅ Edge cases handled with appropriate user guidance - ✅ Coaching state updated after confirmation - ✅ dt-coach loads target method instructions ## Testing ### Validation Results All automated checks pass: - ✅ Markdown linting: `npm run lint:md` (no errors for dt-method-next.prompt.md) - ✅ Frontmatter validation: `npm run lint:frontmatter` (valid schema) - ✅ Collection metadata: `npm run plugin:validate` (design-thinking: 35 items, 0 errors) - ✅ Plugin generation: Commands generated successfully ### Manual Testing Verified against implementation plan: - ✅ Frontmatter includes description, agent: 'dt-coach', and argument-hint - ✅ Input variable ${input:project-slug} documented with inference behavior - ✅ Method state assessment reads artifact directories and evaluates completeness - ✅ Progression logic covers all 9 methods with correct sequencing - ✅ Output format provides clear project status summary and recommendation - ✅ Edge cases handled: no project, all complete, iteration loops - ✅ Delegates to dt-coach after recommendation - ✅ Prompt-builder compliance verified ## Checklist ### Required Checks - [x] Documentation is updated (if applicable) - [x] Files follow existing naming conventions - [x] Changes are backwards compatible (if applicable) - [x] Tests added for new functionality (if applicable) ### AI Artifact Contributions - [x] Used `/prompt-analyze` to review contribution - [x] Addressed all feedback from `prompt-builder` review - [x] Verified contribution follows common standards and type-specific requirements ### Required Automated Checks The following validation commands must pass before merging: - [x] Markdown linting: `npm run lint:md` - [x] Spell checking: `npm run spell-check` - [x] Frontmatter validation: `npm run lint:frontmatter` - [x] Skill structure validation: `npm run validate:skills` - [x] Link validation: `npm run lint:md-links` - [x] PowerShell analysis: `npm run lint:ps` ## Security Considerations - [x] This PR does not contain any sensitive or NDA information - [x] Any new dependencies have been reviewed for security issues - [x] Security-related scripts follow the principle of least privilege ## Additional Notes ### Review Findings Summary Implementation review completed with overall status: ⚠️ Needs Minor Rework (documentation gaps only) **Findings:** - 0 Critical - 2 Major (documentation-related, not functional) - 1 Minor **Major Findings (Non-blocking):** 1. File naming deviation: Plan specified `dt-route-method.prompt.md` but implementation uses `dt-method-next.prompt.md` (better name, more user-friendly) 2. Missing changes log: Expected at `.copilot-tracking/changes/2026-02-20/dt-method-routing-changes.md` All functional requirements met. All validation passes. The implementation successfully delivers comprehensive DT method routing with state-aware validation, edge case handling, and proper integration. **Review Log:** `.copilot-tracking/reviews/2026-02-20/dt-method-routing-review.md` ### Files Changed - **Added:** `.github/prompts/design-thinking/dt-method-next.prompt.md` - Main routing prompt - **Modified:** `.github/agents/design-thinking/dt-coach.agent.md` - Added handoff entry - **Modified:** `collections/design-thinking.collection.yml` - Added prompt reference - **Modified:** `collections/design-thinking.collection.md` - Documented new prompt - **Modified:** `collections/hve-core-all.collection.yml` - Added to all-in-one collection - **Generated:** `plugins/design-thinking/commands/dt-method-next.md` - Plugin command output - **Generated:** `plugins/hve-core-all/commands/dt-method-next.md` - Plugin command output - **Generated:** Various plugin README.md files updated with new command --------- Co-authored-by: Bill Berry <wbery@microsoft.com>
1 parent 1fa1af1 commit 0c080d6

9 files changed

Lines changed: 108 additions & 0 deletions

File tree

.github/agents/design-thinking/dt-coach.agent.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ description: 'Design Thinking coach guiding teams through the 9-method HVE frame
44
tools: [vscode/askQuestions, execute/getTerminalOutput, execute/awaitTerminal, execute/killTerminal, execute/runInTerminal, read, agent, edit, search, web]
55
handoffs:
66

7+
- label: "🎯 Method Next"
8+
agent: dt-coach
9+
prompt: /dt-method-next
10+
send: false
711
- label: "🔬 Research"
812
agent: Task Researcher
913
prompt: /task-research
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
description: 'Assess DT project state and recommend next method with sequencing validation - Brought to you by microsoft/hve-core'
3+
agent: dt-coach
4+
argument-hint: "[project-slug=...]"
5+
---
6+
7+
# DT Method Next
8+
9+
## Inputs
10+
11+
* ${input:project-slug}: (Optional) Project slug identifying the DT project directory. If omitted, inferred from open files under `.copilot-tracking/dt/` or from conversation context.
12+
13+
## Requirements
14+
15+
### 1. Locate Project Directory
16+
17+
**Goal:** Find the coaching state file for the specified or inferred project.
18+
19+
* Derive project-slug from input, open files, or conversation context
20+
* Look for coaching state at `.copilot-tracking/dt/{project-slug}/coaching-state.md`
21+
* If not found and multiple projects exist, list available projects with last session dates and ask user to select
22+
* **Edge case — No project found:** If no DT project exists, respond: "No Design Thinking project found. Start a new project by running `/dt-start-project projectName='...'` with your project name."
23+
24+
### 2. Read and Assess Current State
25+
26+
**Goal:** Extract current method, space, completion status, and progress indicators.
27+
28+
* Read the coaching state YAML frontmatter:
29+
* `current.method` (1-9): active method number
30+
* `current.space` (problem|solution|implementation): derived from method number
31+
* `current.phase`: free-text step within current method
32+
* `methods_completed`: array of completed method numbers
33+
* `transition_log`: history of method changes with rationales
34+
* `session_log`: recent session summaries
35+
* `artifacts`: list of generated artifacts with paths
36+
* Scan the project directory for artifact subdirectories matching `method-{NN}-*/` patterns
37+
* Assess method completeness by comparing artifacts against exit signals from `.github/instructions/design-thinking/dt-method-sequencing.instructions.md`
38+
39+
### 3. Determine Next Method Recommendation
40+
41+
**Goal:** Suggest appropriate next method based on state analysis and sequencing rules.
42+
43+
Apply progression logic:
44+
45+
* **Forward progression (primary path):**
46+
* If current method has artifacts and exit signals met → suggest method + 1
47+
* At space boundaries (3→4, 6→7): verify readiness signals before suggesting transition
48+
49+
* **Backward iteration (secondary path):**
50+
* If current method reveals gaps in prior work → suggest returning to earlier method with rationale
51+
* Common patterns: prototype issues → Method 2/3, brainstorming failure → Method 3, concept misalignment → Method 1
52+
53+
* **Lateral transitions:**
54+
* If all 9 methods complete → suggest iteration on Method 9 or handoff to RPI workflow
55+
* If user requests skipping methods → explain sequencing rationale and offer to proceed with caution
56+
57+
* **Edge case — All complete:** If `methods_completed` includes 1-9, respond: "All 9 Design Thinking methods are complete. You can iterate on Method 9 for optimization, or hand off to RPI workflow for implementation planning. What would you like to focus on?"
58+
59+
* **Edge case — Iteration loop detected:** If the same method or method pair appears 3+ times in the last 6 `transition_log` entries, acknowledge the iteration explicitly: "I notice you've returned to Method [N] multiple times. This suggests [observation about missing foundation]. Would you like to revisit the underlying challenge or continue refining Method [N]?"
60+
61+
### 4. Output Format and Recommendation
62+
63+
**Goal:** Present project status summary with clear next steps.
64+
65+
Provide a concise summary including:
66+
67+
* **Project:** Display name and slug
68+
* **Current Method:** Number, name, and phase description
69+
* **Progress:** Count of completed methods out of 9
70+
* **Recent Work:** Summary from last session log entry
71+
* **Key Artifacts:** Highlight 2-3 critical artifacts from current method directory
72+
73+
Then present recommendation:
74+
75+
* **Suggested Next Method:** Number and name with rationale tied to exit signals or discovered gaps
76+
* **Transition Type:** Forward progression, backward iteration, or lateral handoff
77+
* **Readiness Check:** For space boundary transitions, validate these signals:
78+
* 3→4 (Problem→Solution): Themes validated across sources, team alignment confirmed, HMW questions formulated
79+
* 6→7 (Solution→Implementation): Lo-fi prototypes tested with real users, core assumptions validated, concepts narrowed to 1-2 directions
80+
* **User Choice:** "Does this direction make sense, or would you prefer to target a different method?"
81+
82+
### 5. Delegate to DT Coach
83+
84+
After presenting the recommendation, wait for user confirmation of the suggested method or their choice of a different method. Once confirmed, transition coaching into the target method by:
85+
86+
* Updating `coaching-state.md` with new `current.method` value
87+
* Adding transition log entry with rationale and date
88+
* Loading the target method instruction file for method-specific knowledge
89+
* Beginning active coaching at the appropriate phase within the target method
90+
91+
---
92+
93+
Assess the Design Thinking project state and recommend the next method to pursue based on completion indicators and sequencing rules.

collections/design-thinking.collection.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ This collection includes agents, prompts, and instructions for:
44

55
- **DT Start Project** — Initializes a new Design Thinking coaching project with state file creation, frozen/fluid classification, and first Method 1 coaching interaction
66
- **DT Resume Coaching** — Resumes an existing coaching session from saved state, restoring context from the project's coaching state file
7+
- **DT Method Next** — Assesses current coaching state and recommends the next method with sequencing validation, handling edge cases for no project, all methods complete, and iteration loops
78
- **DT Handoff Implementation Space** — Implementation Space exit handoff that compiles DT Methods 7-9 outputs into an RPI-ready artifact with tiered routing to task-planner or task-implementor, handoff lineage from all nine methods, content sanitization, and a completion ceremony
89
- **DT Handoff Problem Space** — Problem Space exit handoff that compiles DT Methods 1-3 outputs into an RPI-ready artifact targeting task-researcher, with readiness assessment and quality markers
910
- **DT Coaching Identity** — Defines the coach's interaction philosophy (Think, Speak, Empower), progressive hint engine, psychological safety patterns, and hat-switching framework for consistent behavior across all nine methods

collections/design-thinking.collection.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ items:
2020
- path: .github/prompts/design-thinking/dt-resume-coaching.prompt.md
2121
kind: prompt
2222
maturity: experimental
23+
- path: .github/prompts/design-thinking/dt-method-next.prompt.md
24+
kind: prompt
25+
maturity: experimental
2326
- path: .github/prompts/design-thinking/dt-handoff-implementation-space.prompt.md
2427
kind: prompt
2528
maturity: experimental

collections/hve-core-all.collection.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ items:
9494
- path: .github/prompts/design-thinking/dt-handoff-solution-space.prompt.md
9595
kind: prompt
9696
maturity: experimental
97+
- path: .github/prompts/design-thinking/dt-method-next.prompt.md
98+
kind: prompt
99+
maturity: experimental
97100
- path: .github/prompts/design-thinking/dt-resume-coaching.prompt.md
98101
kind: prompt
99102
maturity: experimental

plugins/design-thinking/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ copilot plugin install design-thinking@hve-core
2323
|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
2424
| dt-start-project | Start a new Design Thinking coaching project with state initialization and first coaching interaction - Brought to you by microsoft/hve-core |
2525
| dt-resume-coaching | Resume a Design Thinking coaching session — reads coaching state and re-establishes context - Brought to you by microsoft/hve-core |
26+
| dt-method-next | Assess DT project state and recommend next method with sequencing validation - Brought to you by microsoft/hve-core |
2627
| dt-handoff-implementation-space | Compiles DT Methods 7-9 outputs into RPI-ready handoff artifact with tiered routing |
2728
| dt-handoff-problem-space | Problem Space exit handoff — compiles DT Methods 1-3 outputs into RPI-ready artifact targeting task-researcher |
2829
| dt-handoff-solution-space | Solution Space exit handoff — compiles DT Methods 4-6 outputs into RPI-ready artifact targeting task-planner |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../.github/prompts/design-thinking/dt-method-next.prompt.md

plugins/hve-core-all/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ copilot plugin install hve-core-all@hve-core
6060
| dt-handoff-implementation-space | Compiles DT Methods 7-9 outputs into RPI-ready handoff artifact with tiered routing |
6161
| dt-handoff-problem-space | Problem Space exit handoff — compiles DT Methods 1-3 outputs into RPI-ready artifact targeting task-researcher |
6262
| dt-handoff-solution-space | Solution Space exit handoff — compiles DT Methods 4-6 outputs into RPI-ready artifact targeting task-planner |
63+
| dt-method-next | Assess DT project state and recommend next method with sequencing validation - Brought to you by microsoft/hve-core |
6364
| dt-resume-coaching | Resume a Design Thinking coaching session — reads coaching state and re-establishes context - Brought to you by microsoft/hve-core |
6465
| dt-start-project | Start a new Design Thinking coaching project with state initialization and first coaching interaction - Brought to you by microsoft/hve-core |
6566
| github-add-issue | Create a GitHub issue using discovered repository templates and conversational field collection |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../.github/prompts/design-thinking/dt-method-next.prompt.md

0 commit comments

Comments
 (0)