user-spec-planning
Skill4 starsChanged 29 days agoMITView on GitHub
[METHODOLOGY] User-spec creation through adaptive interview with codebase scanning and dual validation. SDD phase 1: run by agency-intake in the main loop (the interview needs the user). Also preloaded by dev-product-analyst and dev-lead as reference.
3 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- pavel-molyanov/molyanov-ai-devtheir own version, first seen Oct 25, 2026
- antonbru/hermes-ai-devtheir own version, first seen Aug 12, 2026
- stepanenkoviktor0110-boop/ai-dev-methodologyedited, first seen May 31, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- stepanenkoviktor0110-boop/ai-dev-methodology★ 210% same
Wrote their own version · 2
- pavel-molyanov/molyanov-ai-dev★ 299same name
- antonbru/hermes-ai-dev★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- skills/dev-methodology/references/agents.mdAGENTS.md
- skills/skill-authoring/references/agents.mdAGENTS.md
- acceptance-protocolSkill
- agency-intakeSkill
- ai-visibility-methodologySkill
- banner-design-guideSkill
- benchmark-researchSkill
- brand-methodologySkill
- code-reviewingSkill
- code-writingSkill
- codex-bridgeSkill
- deploy-pipelineSkill
- design-assets-guideSkill
- design-system-methodologySkill
- design-task-decompositionSkill
- dev-methodologySkill
- docs-pipelineSkill
- documentation-writingSkill
- engagement-contractSkill
- engagement-protocolSkill
- feature-researchSkill
- human-voiceSkill
- infrastructure-setupSkill
- marketing-task-decompositionSkill
- post-deploy-qaSkill
- pre-deploy-qaSkill
- presentation-designSkill
- project-planningSkill
- prompt-engineeringSkill
- security-auditingSkill
- semantic-drift-methodologySkill
- seo-auditingSkill
- skill-authoringSkill
- skill-test-designSkill
- skill-testingSkill
- system-optimization-protocolSkill
- task-decompositionSkill
- tech-spec-planningSkill
- testing-methodologySkill
- ui-styling-guideSkill
- ui-ux-methodologySkill
- validation-pipelineSkill
- yandex-analytics-methodologySkill
- yandex-direct-guideSkill
- yandex-metrika-guideSkill
- yandex-search-guideSkill
- yandex-webmaster-guideSkill
- yandex-wordstat-guideSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 17 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
When user says "не знаю": help think through it (examples, common patterns).
- Very specific: line 46
Check for existing interview: engagement/specs/logs/userspec/interview.yml with metadata.status: in_progress.
- Very specific: line 47
Check for existing feature research: look for engagement/specs/research-verdict.md.
- Distinctive: line 48
If found and verdict is GO or CONDITIONAL:
- Distinctive: line 49
Read verdict, use findings as starting context for interview
- Distinctive: line 51
If CONDITIONAL: bring up conditions during interview, confirm they are addressed If not found: proceed normally (feature-research is …
- Distinctive: line 52
If not found: proceed normally (feature-research is recommended for M/L features but not required).
- Very specific: line 57
Create the state: mkdir -p engagement/specs/logs/userspec && cp ~/.claude/shared/interview-templates/feature.yml …
- Very specific: line 58
Do not run init-feature-folder.sh: it builds the retired work/{feature}/ layout.
- Very specific: line 59
Update interview.yml: set metadata.started, metadata.status: in_progress, phase1_feature_overview.feature_name, …
- Very specific: line 65
Read ALL files from .claude/skills/project-knowledge/references/.
- Distinctive: line 74
Run interview loop (see below) on phase1_feature_overview items.
- Very specific: line 84
After subagent completes — read engagement/specs/code-research.md.
- Very specific: line 86
If during later phases a gap is discovered — launch code-researcher again with the specific question to investigate.
- Distinctive: line 99
Run interview loop on phase2 + phase3 items.
- Distinctive: line 103
Scope: ALL items across all phases still below threshold.
- Distinctive: line 107
Run interview loop on remaining gaps.
- Very specific: line 126
Every acceptance criterion gets a stable id AC-1, AC-2, … (- [ ] AC-1: …).
- Distinctive: line 129
Every discussed topic from interview must appear in the spec
- Distinctive: line 130
If feature seems large (>10 criteria, >3 user flows, >5 integrations) — suggest splitting.
- Very specific: line 134
Run 2 validators in parallel (Task tool) with feature_path = engagement/specs.
- Distinctive: line 146
After each validation round (validators wrote reports + you applied fixes), re-run validators.
- Distinctive: line 157
After approval the user-spec is frozen.
- Distinctive: line 187
All three cycles apply to any work_type, but focus shifts:
- Distinctive: line 195
If understanding changes significantly during interview:
- Distinctive: line 196
Update affected scores downward, add new gaps
- Distinctive: line 198
If work_type changes (was feature, actually bug) — pivot items accordingly
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
User Spec Planning
Thorough adaptive interview → codebase scan → user-spec.md → dual validation → user approval.
Output: engagement/specs/user-spec.md with status approved.
Who runs this. SDD phase 1 of a dev engagement (see dev-methodology §"Spec-Driven
Development"). agency-intake runs it in the main loop, step 5c, because the interview needs the
user and nobody inside engagement-workflow can reach the user. It is never a specialist task
inside the engine. Paths below are relative to the project root that holds engagement/.
engagement/specs/ is the feature folder. Every agent that takes a feature_path input
(code-researcher, interview-completeness-checker, both userspec validators, and later the
tech-spec validators) gets feature_path = engagement/specs; their default sub-paths
(code-research.md, logs/userspec/…) then land inside specs/, which the whitelist allows.
Interview Style
Conduct interview in Russian. Be thorough and opinionated — an engaged co-thinker who actively proposes solutions and challenges weak answers.
How to interview:
- 3-4 questions per batch. Run as many batches as needed until the cycle's items are fully covered.
- Propose solutions based on Project Knowledge: "В architecture.md описан паттерн X — думаю, здесь нужно Y. Согласен?"
- Challenge with substance — concrete counterexamples, code references, unexplored scenarios: "А что если пользователь сделает Z? В коде модуль Q не обрабатывает этот случай."
- Accept the answer after one substantive challenge and move on to the next gap.
- When user says "не знаю": help think through it (examples, common patterns). Optional item → mark TBD. Required item → break into simpler questions.
Interview depth depends on feature size (S/M/L in interview metadata):
- S (1-3 files, local fix): focused interview, core behavior
- M (several components): moderate depth, integration questions
- L (new architecture): deep interview, thorough edge cases and risk analysis
Process
Phase 0: Init
- Check for existing interview:
engagement/specs/logs/userspec/interview.ymlwithmetadata.status: in_progress. If found — load, show discussed topics summary, resume. - Check for existing feature research: look for
engagement/specs/research-verdict.md. If found and verdict is GO or CONDITIONAL:- Read verdict, use findings as starting context for interview
- Skip code scanning in Phase 3 if
code-research.mdalready exists from feature-research - If CONDITIONAL: bring up conditions during interview, confirm they are addressed If not found: proceed normally (feature-research is recommended for M/L features but not required).
- Get task description: "Опиши, что хочешь сделать."
- Determine work_type (feature / bug / refactoring) from description.
- Propose feature name (kebab-case), get user confirmation. It becomes the engagement name; the
two SDD engagements are
{name}-specand{name}-impl. - Create the state:
mkdir -p engagement/specs/logs/userspec && cp ~/.claude/shared/interview-templates/feature.yml engagement/specs/logs/userspec/interview.yml. Do not runinit-feature-folder.sh: it builds the retiredwork/{feature}/layout. - Update interview.yml: set metadata.started, metadata.status: in_progress, phase1_feature_overview.feature_name, phase1_feature_overview.work_type.
Checkpoint: interview.yml exists with status in_progress, feature name confirmed.
Phase 1: Study Project Knowledge
Read ALL files from .claude/skills/project-knowledge/references/. If the directory is missing, empty or still holds template placeholders, this is a new project: stop and return to agency-intake step 5c.0 (bootstrap) before any feature interview.
These files are your context for the entire interview. Reference them when asking questions and proposing solutions.
Phase 2: Cycle 1 — General Understanding
Scope: phase1_feature_overview items in interview.yml.
- Score user's initial description against all items (detailed 80-95%, brief 50-70%, vague 20-40%, not mentioned 0%).
- Run interview loop (see below) on phase1_feature_overview items.
- During this cycle — determine feature size S/M/L and agree on testing strategy:
- S: integration/E2E usually not needed — state why
- M: propose whether integration tests make sense, explain reasoning
- L: propose specific integration and E2E scope with justification
Phase 3: Code Scanning
Launch code-researcher subagent (Task tool, opus) with feature_path = engagement/specs and the feature description from Cycle 1.
After subagent completes — read engagement/specs/code-research.md. Use findings in Cycle 2 questions. The same file travels into both SDD engagements; the tech architect deepens it later.
If during later phases a gap is discovered — launch code-researcher again with the specific question to investigate.
Phase 4: Cycle 2 — Code-Informed Refinement
Scope: phase2_user_experience + phase3_integration items.
- Summarize understanding: "Я понял задачу так: [X]. Делать планирую так: [Y, based on code]."
- Questions based on code findings: "Нашёл модуль X, который делает Y — переиспользуем?"
- Cover deploy and user actions (items
deploy_approach,manual_user_actions):- "Нужны ли ручные шаги для запуска? (создать бота, получить API ключи, настроить сервис, зарегистрироваться где-то)"
- "Как деплоить? Что нужно настроить? (уже есть CI/CD, нужно настроить, ручной деплой)"
- "Как проверить что работает после деплоя? (MCP-инструменты, curl, ручная проверка)"
- "Что можно проверить прямо во время разработки, без деплоя? (вызвать внешний API, запустить локально, проверить конфиг, потыкать UI на localhost, протестировать промпт)"
- Run interview loop on phase2 + phase3 items.
Phase 5: Cycle 3 — Review & Finalize
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.
Phase 6: Completeness Check
Launch interview-completeness-checker subagent (Task tool, sonnet) with feature_path = engagement/specs. It reviews interview.yml against PK files and code-research.md.
needs_more→ ask the suggested questions, re-run checkercomplete→ proceed to Phase 7
Phase 7: Create User Spec
- Copy template to working file:
- Copy
~/.claude/shared/work-templates/user-spec.md.template→engagement/specs/user-spec.md - Edit sections one by one using Edit tool, replacing placeholders with interview data Reason: agent sees template structure and comments while editing each section, preventing drift from template format.
- Copy
- Content rules:
- "Что делаем" — self-contained, understandable without the interview
- "Зачем" — concrete user value, not "улучшить UX"
- Acceptance criteria — testable, no "работает корректно"
- Every acceptance criterion gets a stable id
AC-1,AC-2, … (- [ ] AC-1: …). The tech-spec traces its tasks to these ids and the impl engagement'scriteria.mdcites them, so an id is never renumbered or reused once the spec is approved. - Every discussed topic from interview must appear in the spec
- If feature seems large (>10 criteria, >3 user flows, >5 integrations) — suggest splitting.
Phase 8: Validation
Run 2 validators in parallel (Task tool) with feature_path = engagement/specs. Their reports
land in engagement/specs/logs/userspec/, NOT in validation-outputs/: that directory belongs to
the engine's validate phase and the precheck parses every JSON in it.
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:
- Obvious issue → fix silently
- Borderline → discuss with user
- Disagree with finding → reject with reasoning
- Conflict between validators → userspec-adequacy-validator takes priority (substance over form)
After each validation round (validators wrote reports + you applied fixes), re-run validators. Max 3 iterations, then show remaining issues to user.
Phase 9: User Approval
Show user-spec.md link + validation summary. If changes requested — edit and show again.
When approved:
- Set user-spec.md frontmatter
status: approvedandapproved: {YYYY-MM-DD} - Set interview.yml
metadata.status: completed - Return to
agency-intakestep 5c: it writes the{name}-specengagement'scriteria.md.
After approval the user-spec is frozen. Only the user changes it: a gap found later (by the architect, a validator or the manager) comes back to the user as a question, and the fix is a re-approval, never a silent edit.
Interview Loop
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.
Work Type Adaptations
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.
Scope Changes
If understanding changes significantly during interview:
- Update affected scores downward, add new gaps
- Reassess feature size (S/M/L)
- If work_type changes (was feature, actually bug) — pivot items accordingly
- Note the change in interview.yml notes section
Self-Verification
- All cycles completed, completeness checker passed
- user-spec.md filled with real content (no placeholders), every AC has an
AC-Nid - Both validators passed (or issues resolved with user)
- User approved, frontmatter status: approved
- interview.yml metadata.status: completed
- Control returned to
agency-intakestep 5c
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

