interview-framework
Scannednpx machina-cli add skill tzachbon/smart-ralph/interview-framework --openclawInterview Framework
Adaptive brainstorming dialogue algorithm for all spec phases. Each phase command references this skill and provides its own exploration territory (phase-specific areas to probe).
Option Limit Rule
Each question MUST have 2-4 options (max 4). Keep the most relevant options, combine similar ones.
Intent-Based Depth Scaling
Read .progress.md for intent classification. Scale dialogue depth accordingly:
| Intent | Questions |
|---|---|
| TRIVIAL | 1-2 |
| REFACTOR | 3-5 |
| MID_SIZED | 3-7 |
| GREENFIELD | 5-10 |
Completion Signal Detection
After each response, check if user wants to end early:
completionSignals = ["done", "proceed", "skip", "enough", "that's all", "continue", "next"]
if askedCount >= minRequired:
for signal in completionSignals:
if signal in userResponse.lower():
-> SKIP remaining questions, move to PROPOSE APPROACHES
3-Phase Algorithm
Phase 1: UNDERSTAND (Adaptive Dialogue)
UNDERSTAND:
1. Read all available context:
- .progress.md (prior phase answers, intent, goal)
- Prior artifacts (research.md, requirements.md, etc.)
- Original goal text
2. Read the exploration territory provided by the calling command
3. Identify what is UNKNOWN vs what is already decided
- If prior phases already covered a topic, SKIP it
- Only ask about what still needs clarification
4. Set depth from intent:
- minRequired = intent.minQuestions
- maxAllowed = intent.maxQuestions
5. askedCount = 0
WHILE askedCount < maxAllowed:
|
+-- Generate next question from context + exploration territory
| (Questions emerge from what you've learned so far, NOT from a fixed pool)
|
+-- Context-based skip check:
| Read .progress.md holistically. If this topic was already
| answered in a prior phase, SKIP it. Log: "Already covered: [topic]"
|
+-- Ask single question:
| AskUserQuestion:
| question: "[Context-aware question referencing prior answers]"
| options:
| - "[Option 1]"
| - "[Option 2]"
| - "[Option 3 if needed]"
| - "Other"
|
+-- askedCount++
|
+-- If user selected "Other":
| -> Ask context-specific follow-up (see Adaptive Depth below)
| -> DO NOT increment askedCount for follow-ups
|
+-- Check completion signals (see above)
|
+-- Decide: ask another question or move to PROPOSE APPROACHES
| (If you have enough context to propose meaningful approaches, move on)
Key rules for question generation:
- Each question builds on prior answers in THIS dialogue AND prior phases
- Reference specific things the user said ("You mentioned X — does that mean...")
- Never ask something .progress.md already answers
- Never ask generic questions — every question must be grounded in the user's context
Phase 2: PROPOSE APPROACHES
PROPOSE APPROACHES:
1. Synthesize the dialogue into 2-3 distinct approaches
2. Each approach MUST include:
- Name (short label)
- Description (1-2 sentences)
- Trade-offs (pros and cons)
3. Lead with your recommendation
4. Present via AskUserQuestion:
AskUserQuestion:
question: "Based on our discussion, here are the approaches I see:
**A) [Recommended] [Name]**
[Description]. Trade-off: [pro] vs [con].
**B) [Name]**
[Description]. Trade-off: [pro] vs [con].
**C) [Name]** (if applicable)
[Description]. Trade-off: [pro] vs [con].
Which approach fits best?"
options:
- "A) [Name]"
- "B) [Name]"
- "C) [Name]" (if applicable)
- "Other"
5. If user picks "Other":
-> Ask what they'd change or combine
-> Iterate until approach is confirmed (max 3 rounds)
6. Store chosen approach as primary input for the subagent
Approach rules:
- Always present at least 2 approaches (never just 1)
- Maximum 3 approaches (more causes decision fatigue)
- The recommended approach goes first
- Trade-offs must be honest — no straw-man alternatives
- Apply YAGNI: strip unnecessary complexity from all approaches
Phase 3: CONFIRM & STORE
CONFIRM & STORE:
1. Brief recap to the user:
"Here's what I'll pass to the [agent name]:
- [Key decision 1]
- [Key decision 2]
- [Chosen approach summary]
Does this look right?"
2. If user corrects something, update before storing
3. Store in .progress.md (see Context Accumulator below)
4. Proceed to subagent delegation
Adaptive Depth (Other Responses)
If user selects "Other" for any question:
- Ask a context-specific follow-up (NEVER generic "elaborate")
- Continue until clarity is reached or 5 rounds complete
- Each follow-up uses a single question focused on their response
Follow-up questions MUST be context-specific, not generic. When user provides an "Other" response:
- Acknowledge the specific response: Reference what the user actually typed
- Ask a probing question based on response content: Analyze keywords in their response
- Include context from prior answers: Reference earlier responses to create continuity
Do NOT use generic follow-ups like "Can you elaborate?" — always tailor to their specific response.
Example — if user types "We need GraphQL support" for a technical approach question:
AskUserQuestion:
question: "You mentioned needing GraphQL support. Is this for the entire API layer, or specific endpoints only?"
options:
- "Full API layer - replace REST"
- "Hybrid - GraphQL for new endpoints only"
- "Specific queries for mobile clients"
- "Other"
Example — if user types "Security is critical" for success criteria:
AskUserQuestion:
question: "You emphasized security is critical. Given your earlier constraints, which security aspects matter most?"
options:
- "Authentication and authorization"
- "Data encryption at rest and in transit"
- "Audit logging and compliance"
- "Other"
Context Accumulator Pattern
After each interview, update .progress.md:
- Read existing .progress.md content
- Append new section under "## Interview Responses"
- Use descriptive keys that reflect what was actually discussed
- Include the chosen approach
Storage Format
### [Phase] Interview (from [phase].md)
- [Topic 1]: [response]
- [Topic 2]: [response]
- Chosen approach: [name] — [brief description]
[Any follow-up responses from "Other" selections]
Source
git clone https://github.com/tzachbon/smart-ralph/blob/main/plugins/ralph-specum/skills/interview-framework/SKILL.mdView on GitHub Overview
The Interview Framework enables adaptive, phase-based brainstorming across Understand, Propose Approaches, and Confirm & Store. It uses intent-based depth scaling, strict option limits (2-4 per question), and completion signals to guide the dialogue, ensuring grounded, context-rich questions and streamlined decision capture.
How This Skill Works
The framework reads progress.md, prior artifacts, and the original goal, then analyzes the exploration territory provided by the calling command. It sets depth from intent (min/max questions), and iterates questions with 2-4 options, skipping topics already covered. When enough context is gathered, it transitions from UNDERSTAND to PROPOSE APPROACHES, handling 'Other' responses with follow-ups without incrementing the main question count, and finally proceeds to CONFIRM & STORE.
When to Use It
- Kick off a new spec with ambiguous goals to surface unknowns.
- After initial research to clarify what remains unclear in the plan.
- When you need to synthesize findings into 2-3 distinct approaches with trade-offs.
- To align stakeholders and lock down scope before implementation.
- When you want to serialize decisions and store them for future reference.
Quick Start
- Step 1: Load context from .progress.md, research notes, and the Original Goal; receive the exploration territory from the invoking command.
- Step 2: Run UNDERSTAND to generate 2-4 optioned questions, skip already-covered topics, and collect context.
- Step 3: When enough context exists, move to PROPOSE APPROACHES, present 2-3 approaches with trade-offs, and await selection; proceed to CONFIRM & STORE to save decisions.
Best Practices
- Enforce the 2- to 4-option limit per question and keep options highly relevant.
- Skip topics already answered in progress.md to avoid redundancy.
- Ground every question in the user's prior answers and the exploration territory.
- Dynamically adjust depth using intent signals to avoid over- or under-questioning.
- Use 'Other' thoughtfully and follow up contextually without counting toward the askedCount.
Example Use Cases
- Starting a new feature spec by surfacing unknowns and then proposing 3 approaches with trade-offs.
- A review session where progress.md indicates overlap; the framework skips covered topics and focuses on gaps.
- User provides an 'Other' input; follow-up questions extract constraints before forming approaches.
- Three distinct approaches are synthesized and presented, with the recommended option leading the discussion.
- Decisions are confirmed and stored to a central artifact repository in CONFIRM & STORE.