interview-framework
GitHub规范需求访谈流程,通过构建设计树、并行事实探查与前沿轮次提问,引导用户达成共识。适用于规格制定前的深度沟通与决策确认。
Trigger Scenarios
Install
npx skills add tzachbon/smart-ralph --skill interview-framework -g -y
SKILL.md
Frontmatter
{
"name": "interview-framework",
"version": "0.3.0",
"description": "This skill should be used when running any normal-mode interview before a spec phase, grilling the user to reach shared understanding, gathering requirements through dialogue, or resolving design decisions before delegating to a Ralph subagent. Covers fact-first discovery, design-tree frontier rounds, recommendations, domain language, and confirmation.",
"user-invocable": false
}
Interview Framework
Treat every normal-mode interview governed by this framework as a grill. Reach shared understanding before delegating research, requirements, design, or task planning.
Quick mode skips the interview. Do not weaken normal-mode grilling to imitate quick mode.
Completion Contract
Do not proceed because the conversation feels sufficient or a question count has been reached. Proceed only when:
- All discoverable facts required by the design tree have been resolved.
- The design-tree frontier is empty.
- Every branch is resolved or the user has explicitly placed it out of scope.
- The user confirms the resulting shared understanding.
Preflight: Find Facts Before Questions
Read the available project context before building the design tree:
- Read the original goal,
.progress.md,.ralph-state.json, and prior phase artifacts. - Resolve the default specs directory with
ralph_get_default_dir()when available, otherwise use./specs. Read<default-specs-dir>/.index/index.mdwhen it exists, then open only relevant indexed entries and related specs. - Read
CONTEXT-MAP.mdwhen it exists and follow it to the applicableCONTEXT.md. Otherwise read the rootCONTEXT.mdwhen present. - Inspect code, configuration, tests, and existing specs for any fact needed by the interview.
Classify every unknown:
- Fact: discoverable from the repository, tools, documentation, or existing artifacts. Resolve it with Explore or another read-only subagent. Never ask the user.
- Decision: a preference, priority, trade-off, boundary, or constraint that only the user can settle. Put it on the design tree.
Run independent fact lookups in parallel. A pending lookup blocks only the decisions that depend on it; ask the rest of the current frontier.
Build the Design Tree
Map every decision as a node. Add dependency edges from foundational decisions to the decisions that require them.
Track each node as one of:
OPEN: ready once its prerequisites resolveINVESTIGATING: waiting on a fact lookupRESOLVED: answered by evidence, the user, or a justified inferenceOUT_OF_SCOPE: explicitly excluded by the user
Define the frontier as every open decision whose prerequisites are resolved. Do not ask a decision that depends on another decision still open in the same round.
Use the calling command's exploration territory as a starting point, then add branches exposed by project context, prior answers, concrete scenarios, and code contradictions. Do not use fixed question counts or a canned questionnaire.
Grill in Frontier Rounds
Ask the whole current frontier in one round:
- Number each question (
Q1,Q2, and so on). - Ground it in known facts and prior answers.
- Give a recommended answer with a short rationale.
- Provide 2-4 meaningful options, with the recommendation first and
Otherlast. - Omit the recommendation label only when the options are symmetric.
Use AskUserQuestion for the round when the tool is available. Put the whole frontier in one call when it fits. If the frontier exceeds the tool limit, use multiple calls for that same round and wait for every frontier answer. If AskUserQuestion is unavailable, render the same numbered round in the response and wait for the user's answers. Advance the tree only after the user answers the round.
Format each question as:
Q1 - <short title>: <context-aware decision question>
Recommendation: <recommended answer and rationale>
After the user answers the round:
- Mark answered nodes resolved.
- Record any justified inferences.
- Add branches exposed by the answers.
- Turn an
Otherresponse into a specific dependent question for the next frontier. Never ask a generic follow-up. - Recompute the frontier and start the next round.
Treat done, skip, or similar language as a request to narrow scope, not as an automatic exit. Show the remaining branches and require explicit confirmation before marking them out of scope.
Model Domain Language During the Grill
Apply references/domain-modeling.md throughout the rounds.
- Challenge terms that conflict with
CONTEXT.md. - Replace fuzzy or overloaded words with a proposed canonical term.
- Use concrete boundary and edge-case scenarios to test the model.
- Check claims about current behavior against code.
- Update the applicable
CONTEXT.mdas soon as a domain term is resolved. Do not batch glossary work until the end.
Keep implementation details and technical decisions out of CONTEXT.md. This interview framework does not create ADRs; design.md remains the specification's technical-decision record.
Store Progress After Every Round
Append each completed round to .progress.md under ## Interview Responses. Record facts, decisions, explicit scope exclusions, and any glossary updates. Preserve earlier rounds.
### <Phase> Grill - Round <N>
- Facts resolved: <fact and evidence>
- Decisions: <topic> -> <answer>
- Out of scope: <explicitly excluded branch, if any>
- Domain language: <canonical term and definition, if any>
- Frontier after round: <remaining unblocked decisions or empty>
Do not store a parallel interview mode or question counter in .ralph-state.json.
Confirm Shared Understanding
When the frontier becomes empty, present a compact summary of settled decisions, scope boundaries, and the chosen approach. Ask the user to confirm it.
If the user corrects or extends the summary, reopen the affected branch and continue grilling. Delegate to the phase agent only after confirmation.
References
references/algorithm.md- Full fact-first design-tree and frontier-round algorithmreferences/domain-modeling.md-CONTEXT.mddiscovery, language challenges, scenarios, and inline glossary updatesreferences/examples.md- Frontier-round and progress-storage examples
Version History
-
9b7e917
Current 2026-08-27 23:52
默认采用设计树追问模式,增强结构化发现与共识达成能力。
- 1b33202 2026-07-05 09:17


