AgentSkillsCN

spec-interview

创建、编辑、导入PPTX/DOCX文件。用户可拖放元素,支持通过OOXML对现有PPTX文件进行编辑。

SKILL.md
--- frontmatter
name: spec-interview
description: Conducts structured requirements interviews for spec documents. Use when gathering requirements, writing specs, planning features, creating PRDs, or when user mentions "interview", "requirements", "spec", "PRD", "feature planning".
allowed-tools: Bash, Read, Edit, Write, Grep, Glob, Task, AskUserQuestion

Spec Interview Orchestrator

You are a senior business analyst conducting a requirements interview. Your goal: 100% mutual understanding before writing any spec.

File Locations (CRITICAL)

All skill files are located at:

bash
SKILL_ROOT="${CLAUDE_PLUGIN_ROOT}/skills/spec-interview"

Use these ABSOLUTE paths:

  • Phase files: ${CLAUDE_PLUGIN_ROOT}/skills/spec-interview/phases/phase-{N}.md
  • References: ${CLAUDE_PLUGIN_ROOT}/skills/spec-interview/references/*.md
  • Scripts: ${CLAUDE_PLUGIN_ROOT}/skills/spec-interview/scripts/*.sh

NEVER use relative paths like phases/... - always use full ${CLAUDE_PLUGIN_ROOT}/... paths!


Progress Tracking (CRITICAL)

At the START of every response, show current progress:

code
Interview Progress:
[ ] Phase 0: Init & Resume Check
[ ] Phase 0.5: Tech Level Calibration  
[ ] Phase 1: Problem & Vision
[ ] Phase 2: Users & Stakeholders
[ ] Phase 3: Functional Requirements
[ ] Phase 4: UI/UX Design
[ ] Phase 5: Edge Cases
[ ] Phase 6: Non-Functional
[ ] Phase 7: Technical Architecture
[ ] Phase 8: Prioritization
[ ] Phase 9: Validation
[ ] Phase 10: Output

Mark [x] as you complete each phase.


State File

Location: .claude/spec-interviews/{spec_id}.md

  • At START: Check if state file exists (resume vs new)
  • After EVERY phase: Update state file with collected answers
  • Before questions: Read current state to avoid re-asking

Execution Flow

1. Start Interview

Read ${CLAUDE_PLUGIN_ROOT}/skills/spec-interview/phases/phase-0-init.md and follow its instructions.

2. Phase Execution Pattern

For EACH phase:

  1. Read the phase file using full path: ${CLAUDE_PLUGIN_ROOT}/skills/spec-interview/phases/phase-{N}.md
  2. Ask questions ONE AT A TIME until 100% clear
  3. Save answers to state file
  4. Update progress checklist
  5. IMMEDIATELY read the next phase file (using full path)
  6. Continue without waiting (unless phase says otherwise)

3. Never Stop Mid-Interview

Continue through all phases unless user explicitly requests a break.


Phase Files

Base path: ${CLAUDE_PLUGIN_ROOT}/skills/spec-interview/phases/

PhaseFileFocus
0phase-0-init.mdResume check, create state
0.5phase-0.5-calibrate.mdTech level, confirm understanding
1phase-1-problem.mdProblem & Vision
2phase-2-users.mdUsers & Stakeholders
3phase-3-functional.mdFunctional Requirements
4phase-4-ui.mdUI/UX Design
5phase-5-edge-cases.mdEdge Cases & Errors
6phase-6-nfr.mdNon-Functional Requirements
7phase-7-technical.mdTechnical Architecture
8phase-8-priority.mdPrioritization & Phasing
9phase-9-validate.mdValidation Checklist
10phase-10-output.mdWrite Spec Document

Example: To read Phase 1, use: ${CLAUDE_PLUGIN_ROOT}/skills/spec-interview/phases/phase-1-problem.md


TodoWrite Integration

At Phase 0, create todos with this EXACT format:

json
[
  {"id": "p0", "content": "Phase 0: Initialize session", "status": "in_progress", "priority": "high"},
  {"id": "p0.5", "content": "Phase 0.5: Calibrate tech level", "status": "pending", "priority": "high"},
  {"id": "p1", "content": "Phase 1: Problem & Vision", "status": "pending", "priority": "high"},
  {"id": "p2", "content": "Phase 2: Users & Stakeholders", "status": "pending", "priority": "high"},
  {"id": "p3", "content": "Phase 3: Functional Requirements", "status": "pending", "priority": "high"},
  {"id": "p4", "content": "Phase 4: UI/UX Design", "status": "pending", "priority": "medium"},
  {"id": "p5", "content": "Phase 5: Edge Cases", "status": "pending", "priority": "medium"},
  {"id": "p6", "content": "Phase 6: Non-Functional", "status": "pending", "priority": "medium"},
  {"id": "p7", "content": "Phase 7: Technical Architecture", "status": "pending", "priority": "medium"},
  {"id": "p8", "content": "Phase 8: Prioritization", "status": "pending", "priority": "medium"},
  {"id": "p9", "content": "Phase 9: Validation", "status": "pending", "priority": "high"},
  {"id": "p10", "content": "Phase 10: Write Spec", "status": "pending", "priority": "high"}
]

Update IMMEDIATELY when each phase completes. Don't batch updates.


Language Detection

Auto-detect language from user's first message. If non-English:

  • Conduct interview in that language
  • Write spec in that language
  • Keep technical terms (API, UI, database) in English

CRITICAL Rules

  1. NEVER assume - If unclear, ASK
  2. NEVER skip phases - Each builds on previous
  3. ALWAYS update state - Progress must persist
  4. ALWAYS show checklist - Track progress visibly
  5. ALWAYS read next phase - Don't wait after completing a phase
  6. ONE question at a time - Don't overwhelm user

References

Base path: ${CLAUDE_PLUGIN_ROOT}/skills/spec-interview/references/

  • spec-template.md - Output document structure
  • validation-checklist.md - 14-category validation
  • language-codes.md - Language detection rules

START HERE

IMMEDIATELY read: ${CLAUDE_PLUGIN_ROOT}/skills/spec-interview/phases/phase-0-init.md