You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: restructure research workflow routing to prevent phase selection leak
The model was running Phase Selection (artifact status checks) even when
inline transcript content was provided. Replaced soft "jump to Phase 2"
instruction with numbered rules (Rule 1-4) with explicit "follow FIRST
match and STOP" semantics. Inline content handling now happens at the
routing point itself rather than deferring to a distant section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
**If argument matches a phase name** (`plan`, `process`, or `personas`), jump directly to that phase below.
38
+
Read the content inside `<research_phase>`. Follow the FIRST matching rule below and STOP — do not continue to later rules.
39
39
40
-
**If argument is unrecognized**, show the phase selection menu with a note: "Valid arguments: `plan`, `process`, `personas`."
40
+
### Rule 1: Inline transcript content
41
41
42
-
**If argument is empty**, run phase selection:
42
+
If the argument contains multi-line content (a transcript, meeting notes, interview text — anything beyond a single keyword or short phrase):
43
+
44
+
This IS inline transcript content. Do NOT check artifact status. Do NOT show phase selection. Handle it immediately:
45
+
46
+
1. Extract the meeting title and date from the content to generate a filename: `YYYY-MM-DD_<meeting-title-slug>_transcript.md`. If no date is found, use today's date.
47
+
2. Save the full content to `docs/research/transcripts/[filename]`
48
+
3. Jump to **Process Selected Transcript** in Phase 2 below with this file path
49
+
50
+
### Rule 2: Phase name keyword
51
+
52
+
If the argument is exactly `plan`, `process`, or `personas`, jump to that phase below.
53
+
54
+
### Rule 3: Unrecognized argument
55
+
56
+
If the argument is a short unrecognized string, show the phase selection menu with a note: "Valid arguments: `plan`, `process`, `personas`."
57
+
58
+
### Rule 4: Empty argument
59
+
60
+
If the argument is empty, run phase selection:
43
61
44
62
### Phase Selection
45
63
64
+
**SKIP this section if Rule 1 matched above (inline content).** Only run this when the argument was empty.
65
+
46
66
Show a brief artifact status (2-3 lines max):
47
67
48
68
```
@@ -83,12 +103,9 @@ After the skill completes, proceed to **Handoff**.
83
103
84
104
### Check for Inline Content
85
105
86
-
If the research phase argument contains more than just the word "process" (i.e., transcript content was provided inline):
106
+
If arriving here from **Rule 1** in Routing, the transcript has already been saved. Skip directly to **Process Selected Transcript** below.
87
107
88
-
1. Extract the transcript content from the argument (everything after "process")
89
-
2. Look for a meeting title or date in the content to generate a filename. Use the format: `YYYY-MM-DD_<meeting-title-slug>_transcript.md`. If no title or date is found, use today's date with a generic slug (e.g., `2026-02-13_interview_transcript.md`)
90
-
3. Save the content to `docs/research/transcripts/[filename]`
91
-
4. Skip the transcript selection step below — proceed directly to **Process Selected Transcript** with this file path
108
+
If the argument starts with "process" followed by substantial content, strip the "process" prefix, save the content as a transcript file (using the same naming logic from Rule 1), and skip to **Process Selected Transcript**.
0 commit comments