skills/user-spec-planning/SKILL.md
Creates user-spec.md through adaptive interview with codebase scanning and dual validation. Use when: "сделай юзер спек", "проведи интервью для юзер спека", "создай юзерспек", "user spec", "detailed planning", "хочу продумать фичу", "опиши требования к фиче", "сделай описание фичи", "/new-user-spec" For tech planning use tech-spec-planning. For project planning use project-planning.
npx skillsauth add pavel-molyanov/molyanov-ai-dev user-spec-planningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Thorough adaptive interview → codebase scan → user-spec.md → dual validation → user approval.
Output: work/{feature}/user-spec.md with status approved.
Conduct interview in Russian. Be thorough and opinionated — an engaged co-thinker who actively proposes solutions and challenges weak answers.
How to interview:
Interview depth depends on feature size (S/M/L in interview metadata):
work/*/logs/userspec/interview.yml for metadata.status: in_progress. If found — load, show discussed topics summary, resume. If multiple found — show list, let user choose.~/.claude/shared/scripts/init-feature-folder.sh {name} — creates folder structure with interview.yml.Checkpoint: interview.yml exists with status in_progress, feature name confirmed.
Read ALL files from .claude/skills/project-knowledge/references/. If directory missing or empty — warn user, suggest running project-planning skill (or /init-project-knowledge command).
These files are your context for the entire interview. Reference them when asking questions and proposing solutions.
Scope: phase1_feature_overview items in interview.yml.
Launch code-researcher subagent (Task tool, opus) with feature path and feature description from Cycle 1.
After subagent completes — read {feature_path}/code-research.md. Use findings in Cycle 2 questions.
If during later phases a gap is discovered — launch code-researcher again with the specific question to investigate.
Scope: phase2_user_experience + phase3_integration items.
deploy_approach, manual_user_actions):
Scope: ALL items across all phases still below threshold.
Cleanup pass: revisit anything not fully covered in Cycles 1-2. Deepen edge cases and error scenarios — probe for scenarios user hasn't considered, even if items formally passed threshold.
Run interview loop on remaining gaps.
Launch interview-completeness-checker subagent (Task tool, sonnet) with feature path. It reviews interview.yml against PK files and code-research.md.
needs_more → ask the suggested questions, re-run checkercomplete → proceed to Phase 7~/.claude/shared/work-templates/user-spec.md.template → work/{feature}/user-spec.mdGit commit: draft(userspec): create user-spec for {feature}
Run 2 validators in parallel (Task tool):
userspec-quality-validator (sonnet) — document structure, template compliance, formal completeness. Returns JSON with per-check pass/fail and findings list.userspec-adequacy-validator (opus) — feasibility, over/underengineering, better alternatives. Returns JSON with findings by category and severity.Handling findings:
After each validation round (validators wrote reports + you applied fixes), git commit: chore(userspec): validation round {N} — {summary of fixes}. Re-run validators. Max 3 iterations, then show remaining issues to user.
Show user-spec.md link + validation summary. If changes requested — edit and show again.
When approved:
status: approvedmetadata.status: completedchore(userspec): approve user-spec for {feature}/new-tech-spec {feature-name}Runs inside each cycle. Repeats until the cycle's scope is fully covered.
1. Find gaps: required items in current scope with score < 85%. Lowest first.
2. Ask 3-4 questions about different gaps. Reference PK and code findings.
3. User responds.
4. Update interview.yml:
- conversation_history: add full Q&A entry
- Item: score, value, gaps, status
- metadata: last_updated, current_question_num
- Save immediately
5. Check stop criteria (BOTH must be true):
a) All required items in scope score >= 85%
b) Structural: every required item has non-empty value,
no TBD in value, gaps empty or only conscious limitations
6. Not done → step 1. Done → exit cycle.
Scoring: detailed answer 80-95%, brief 50-70%, vague 20-40%, not mentioned 0%.
Optional items: cover when user mentions relevant context or when naturally connected to required items.
All three cycles apply to any work_type, but focus shifts:
Bug: Cycle 1 → reproduction steps, expected vs actual, severity, when it broke. Code scanning → find bug location and root cause. Cycle 2 → fix approach, regression risks.
Refactoring: Cycle 1 → current problems, target architecture, stability guarantees. Code scanning → current structure, dependencies, test coverage. Cycle 2 → migration path, backward compatibility.
If understanding changes significantly during interview:
/new-tech-spec as next steptesting
Testing methodology: when to write which tests, how to ensure test quality, test pyramid strategy. Use when: "напиши тесты", "как тестировать", "проанализируй тесты", "проверь качество тестов", "ревью тестов", "тестовая стратегия"
testing
Creates tech-spec.md with architecture, decisions, testing strategy, and implementation plan. Use when: "сделай техспек", "составь техспек", "техническая спецификация", "tech spec", "создай тз", "составь тз", "new-tech-spec", "/new-tech-spec" Requires existing user-spec.md as input (create with user-spec-planning skill first if missing).
tools
Decompose approved tech-spec into atomic task files with parallel creation and validation. Use when: "разбей на задачи", "декомпозиция", "decompose tech-spec", "создай задачи из техспека", "/decompose-tech-spec"
testing
Test skills end-to-end: design test cases, run with/without skill, grade results, test description triggering accuracy, produce improvement report. Use when: "протестируй скилл", "запусти тесты для скилла", "проверь скилл", "run skill tests", "test this skill", "skill eval", "оцени скилл", "придумай тесты для скилла", "создай сценарии тестирования"