/os-tk-interview "<request>" [--template <name>] [--max-questions N]
Inputs
- •Request text (from
$ARGUMENTS) - •Optional
--template <template-name>to force specific template - •Optional
--max-questions Nto limit questions
Resolve skill dir
bash
SKILL_DIR=".pi/skills/os-tk-interview" if [[ ! -d "$SKILL_DIR" ]]; then SKILL_DIR="pi/skills/os-tk-interview"; fi
Parse arguments
- •
eval "$(bash "$SKILL_DIR/scripts/parse-args.sh" "$@")to populate:- •
REQUEST - •
TEMPLATE - •
MAX_QUESTIONS
- •
Behavior
- •Classify request type (refactor, feature-add, bug-fix, etc.)
- •Load appropriate interview template
- •Generate questions based on request + template
- •Ask questions and collect answers
- •Generate context summary
- •Save to dev notes (if enabled)
Workflow
Phase 1: Classify Request
Analyze the user's request to determine:
- •Request type: refactor, feature-add, bug-fix, performance, security, feature-remove
- •Complexity level: simple, medium, complex (based on keywords, scope)
- •Missing information indicators: vague language, multiple interpretations possible
Use load-template.sh script to automatically select the appropriate template.
Phase 2: Load Template
Based on request type, load interview template:
- •If
--templateis provided: Use that specific template - •Otherwise: Auto-select based on request type classification
Templates are located in:
- •
pi/skills/os-tk-interview/templates/refactor.md - •
pi/skills/os-tk-interview/templates/feature-add.md - •
pi/skills/os-tk-interview/templates/bug-fix.md - •
pi/skills/os-tk-interview/templates/performance.md - •
pi/skills/os-tk-interview/templates/security.md - •
pi/skills/os-tk-interview/templates/feature-remove.md
Phase 3: Generate Questions
Generate 5-10 targeted questions based on:
- •Request type (from Phase 1)
- •Template questions (from Phase 2)
- •MAX_QUESTIONS limit (if provided via
--max-questions) - •Complexity level and context
Question categories in templates:
- •Core questions: Primary intent, scope, goals
- •Technical questions: Constraints, dependencies, integration
- •Impact questions: Downstream effects, API changes, migration
- •Edge cases: Error handling, backwards compatibility
Phase 4: Collect Answers
Ask questions and collect answers. User can choose:
Interactive mode (default):
code
Q1: What is the primary goal? A1: [User types answer] Q2: What code needs to be refactored? A2: [User types answer] ...
Batch mode (for simple requests):
code
I have some questions to clarify your request: 1. What is the primary goal? 2. What constraints should I consider? 3. Are there integration needs? Please answer each question or say "N/A" if not applicable.
Answer handling:
- •Allow "N/A" or "I don't know" responses
- •Capture partial answers
- •Note gaps or areas needing more information
- •Stop when user signals "enough info" or all questions answered
Phase 5: Generate Context Summary
Create structured summary including:
markdown
# Interview Context Request: <original request> Type: <refactor|feature-add|bug-fix|performance|security|feature-remove> Complexity: <simple|medium|complex> ## Answers Q1: <question> A1: <answer> Q2: <question> A2: <answer> ... ## Gaps Identified - <any gaps still present> - <areas needing more info> ## Next Steps - Ready for planning with <X> questions remaining
Phase 6: Save to Dev Notes (If Enabled)
Check if dev notes are enabled in .os-tk/config.json:
- •If enabled: Save interview summary to
.os-tk/dev-notes/ - •Format: Markdown with interview context
- •If there's already a dev notes for this change: Append to it
- •Otherwise: Create new timestamped note
Save using save-interview.sh script which:
- •Creates
.os-tk/dev-notes/interview-<timestamp>.mdor appends to change note - •Updates
.os-tk/dev-notes/INDEX.mdwith entry
Output Format
markdown
## Interview Complete **Questions asked:** <number> **Questions answered:** <number> **Gaps remaining:** <number> ### Context Summary [Structured summary from Phase 5] ### Ready to Proceed? [Options] - **"Yes, generate plan"** → Continue to planner with interview context - **"More questions on <topic>"** → Ask follow-up questions on specific area - **"Adjust answers"** → Review and edit answers before proceeding - **"Save and exit"** → Save interview to dev notes without proceeding to plan
Notes
- •This is a requirements gathering step; it creates no OpenSpec change folder.
- •Use before
/os-tk-plan --interviewfor better planning. - •Dev notes are optional (controlled by
devNotes.enabledin config).
Constraints
Question limits:
- •Default: 8-12 questions max (based on template)
- •Configurable:
--max-questions Nflag to override - •Time awareness: If interview exceeds 10 minutes, ask to continue
Stop conditions:
- •User says "enough info" or "ready to plan"
- •All questions answered
- •User selects "Save and exit" option
Read-only for code:
- •Cannot modify production code, configuration, or any source files
- •Can only create/modify markdown files in
.os-tk/dev-notes/ - •This is a planning step, not implementation