Preamble
# Detect .jtbd/ directory
_JTBD_DIR=".jtbd"
_HAS_JTBD="no"
[ -d "$_JTBD_DIR" ] && _HAS_JTBD="yes"
echo "JTBD_DIR: $_HAS_JTBD"
# Detect gstack (optional integration)
_HAS_GSTACK="no"
[ -d "$HOME/.claude/skills/gstack" ] && _HAS_GSTACK="yes"
_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
[ -n "$_ROOT" ] && [ -d "$_ROOT/.claude/skills/gstack" ] && _HAS_GSTACK="yes"
echo "GSTACK: $_HAS_GSTACK"
# Detect git
_HAS_GIT="no"
git rev-parse --is-inside-work-tree 2>/dev/null && _HAS_GIT="yes"
echo "GIT: $_HAS_GIT"
# Read manifest if .jtbd/ exists
if [ "$_HAS_JTBD" = "yes" ] && [ -f "$_JTBD_DIR/manifest.yml" ]; then
echo "--- MANIFEST ---"
cat "$_JTBD_DIR/manifest.yml"
echo "--- END MANIFEST ---"
fi
# Count existing switch analyses
if [ "$_HAS_JTBD" = "yes" ] && [ -d "$_JTBD_DIR/switches" ]; then
_SWITCH_COUNT=$(ls "$_JTBD_DIR/switches/"*.yml 2>/dev/null | wc -l | tr -d ' ')
echo "SWITCH_COUNT: $_SWITCH_COUNT"
if [ "$_SWITCH_COUNT" -gt 0 ]; then
echo "--- EXISTING SWITCHES ---"
ls "$_JTBD_DIR/switches/"*.yml
echo "--- END SWITCHES ---"
fi
else
echo "SWITCH_COUNT: 0"
fi
Initialize .jtbd/ (if needed)
If JTBD_DIR is no, create the .jtbd/ directory structure before proceeding.
- Use AskUserQuestion to gather product info:
"No .jtbd/ directory found. I'll create one. What's your product called, and what stage are you at?"
Options:
- A) Set up now (I'll provide product name and stage)
- B) Use defaults (product: "Unknown", stage: "pre-product")
If A: Ask for product name, one-line description, stage (pre-product / has-users / has-paying-customers), target user role, and target user context.
If B: Use defaults.
- Create the directory structure:
.jtbd/
├── manifest.yml
├── .gitignore
├── raw/
└── switches/
- Write
manifest.ymlwith the user's answers (or defaults):
schema_version: 1
product:
name: "{product_name}"
description: "{description}"
stage: "{stage}"
target_user:
role: "{role}"
context: "{context}"
settings:
auto_commit: true
gitignore_raw: true
evidence_threshold: 6
- Write
.jtbd/.gitignore:
# Raw interview transcripts contain PII - keep out of git by default
raw/
Gather Context
Read existing evidence
If SWITCH_COUNT > 0, read ALL existing switch analysis files from .jtbd/switches/. Analyze them for:
- Force gaps: Which forces are thin across interviews? (e.g., habit forces often underprobed)
- Timeline gaps: Which timeline stages are frequently
not_discussed? - Low-confidence areas: Fields marked
confidence: loworinferred: true - Missing perspectives: What roles/personas have been interviewed vs. not?
- Evidence strength patterns: Which
evidence_strengthdimensions are consistently low?
Store these gaps — they will be used to customize the interview script.
Determine interview context
Use AskUserQuestion:
"Who are you interviewing, and what's the context?"
Options:
- A) Someone who recently switched TO our product
- B) Someone who recently switched AWAY from our product (churned)
- C) Someone who recently switched between competitors (not our product)
- D) Someone who is currently evaluating / hasn't decided yet
Then ask:
"What do you already know about this person?"
Options:
- A) I have their name and role (I'll provide details)
- B) I know their general persona but not specific details
- C) Nothing yet — generate a general script
If A: Collect name, role, company (optional), and any known context about their situation.
If B: Collect the persona description.
Generate the Interview Script
Generate a markdown interview script customized to the context gathered above. The script must follow Moesta's Switch methodology precisely.
Script Structure
The script has 6 sections. Each section has:
- A purpose statement (why you're asking these questions)
- The questions themselves
- Interviewer notes in blockquotes (tips, red flags, follow-up cues)
Section 1: Opening & Rapport (2-3 minutes)
Purpose: Make the interviewee comfortable. Establish that there are no wrong answers. You're interested in their story, not evaluating them.
Generate 2-3 opening questions. These should be warm, easy, and related to their role. Example:
## 1. Opening
**Purpose:** Build rapport. No wrong answers — you want their story.
- "Tell me a bit about your role at {company}. What does a typical day look like?"
- "How long have you been in this role?"
> **Interviewer note:** Keep this under 3 minutes. You're warming up, not interrogating. Match their energy. If they're terse, be terse. If they're chatty, let them talk.
Section 2: Set the Scene (3-5 minutes)
Purpose: Establish what they were using before (the "old way") and get them to describe their world before the switch. This is critical context.
Generate 3-4 questions. Key technique: ask about the situation, not opinions.
## 2. The Old Way
**Purpose:** Understand their world before the switch. What were they using? How did it work?
- "Before you started using {new solution}, what were you using to {do the job}?"
- "Walk me through how that worked on a typical {day/week/month}."
- "How long had you been doing it that way?"
> **Interviewer note:** Listen for workarounds. People compensate for bad tools without realizing it. "Oh, I had a spreadsheet for that" = habit force. Get specific: which spreadsheet? How often? Who maintained it?
Section 3: Timeline Reconstruction (10-15 minutes)
Purpose: This is the core of the Switch interview. Reconstruct the timeline by working backward from the decision.
Generate questions for each timeline stage. Start with the decision and work back to the first thought.
Deciding (start here):
## 3. The Timeline
### 3a. The Decision
**Purpose:** Anchor on the specific moment they decided. Work backward from here.
- "Take me back to the moment you decided to go with {new solution}. Where were you? What was happening?"
- "What specifically tipped you over the edge? Was there a final straw?"
- "Were you considering anything else at that point? What were the other options?"
- "Who else was involved in the decision?"
> **Interviewer note:** Push for specificity. "When was that exactly?" "Was it before or after [event]?" You want dates, locations, people. If they say "we just decided," probe: "Was there a meeting? An email? A conversation?" The decision always has a moment.
Active Looking:
### 3b. Active Looking
- "Before you decided, what did the search look like? Were you actively comparing options?"
- "What triggered you to go from 'this is annoying' to 'I need to find something else'?"
- "What did you Google? Who did you ask? What demos did you sit through?"
- "How long did this phase last?"
> **Interviewer note:** The trigger from passive to active is gold. It's usually a specific event — a bad meeting, a missed deadline, a public embarrassment. Probe until you get the story.
Passive Looking:
### 3c. Passive Looking
- "Before you were actively searching, were you aware that alternatives existed?"
- "How did you first hear about {new solution} or tools like it?"
- "How long were you in this 'I know there's better stuff out there but I'm not doing anything about it' phase?"
> **Interviewer note:** This phase can last months or years. People tolerate a lot. The duration tells you how strong the habit forces are.
First Thought:
### 3d. First Thought
- "Can you remember the very first time you thought 'this isn't working'? What happened?"
- "Was there a specific event, or was it a slow build?"
> **Interviewer note:** The first thought is often surprisingly specific — a crash, a bad report, an embarrassing moment in front of a boss. If they say "I don't remember," try: "Was it before or after [major event]?" to jog memory.