vc-generate-spec
**vc-generate-spec** produces a plain-language product-discovery requirements document (SPEC artifact) from research findings and user intent, designed for user review before technical planning begins. Use it to bridge discovery research and planning by capturing what the user wants and why in a reviewable format that confirms scope before any approach or implementation is chosen.
git clone --depth 1 https://github.com/withkynam/vibecode-pro-max-kit /tmp/vc-generate-spec && cp -r /tmp/vc-generate-spec/.claude/skills/vc-generate-spec ~/.claude/skills/vc-generate-specSKILL.md
# Generate SPEC
> **Output style:** Follow `process/development-protocols/communication-standards.md` — answer-first, plain language, no unexplained jargon, TL;DR on long responses.
Use this skill to produce the authoritative **product-discovery SPEC** artifact for a task — a plain-language requirements document written for **user review**, not for an engineer.
A SPEC captures **what the user wants and why** so the user can read it, recognize their own intent, and confirm "yes, build that" before any approach or code is chosen. It is the bridge between RESEARCH (the facts) and INNOVATE (the how). PLAN cannot start until a SPEC exists for non-trivial work.
**SPEC consumes:** RESEARCH findings + the user's stated intent/brainstorm. It does **NOT** consume a chosen approach or a Decision Summary — no approach exists yet at SPEC time.
Normal output is one SPEC file: `{slug}_SPEC_{dd-mm-yy}.md`.
For a phase program, the program-level (umbrella) SPEC is written once during the outer loop and governs every inner phase. Use `templates/program-spec-template.md` for that case. The inner loop never writes a SPEC.
## Workflow
1. Read `references/spec-contract.md` for the full section-by-section writing rules.
2. Run `date +%d-%m-%y` before choosing the filename.
3. Confirm the inputs are present: RESEARCH findings + the user's stated intent. If neither is present, emit `SPEC_INTENT_BLOCKED` instead of writing.
4. Read `process/context/all-context.md` first, then load the relevant context group. When the work touches testing/verification, read `process/context/tests/all-tests.md` so acceptance-criteria scenarios are grounded in the real test-context chain.
5. Save the SPEC inside the task folder alongside the plan: `process/features/{feature}/active/{slug}_{date}/{slug}_SPEC_{date}.md` (or `process/general-plans/active/{slug}_{date}/{slug}_SPEC_{date}.md`). For a phase program, the umbrella task folder holds `{program-slug}_SPEC_{date}.md`. Per task-folder artefact colocation, never write to the deprecated sibling `reports/` or `references/` dirs.
6. Write the SPEC sections in canonical order (see `references/spec-contract.md`):
- `## Summary`
- `## User Stories / Jobs To Be Done`
- `## What The User Wants (Behavioral Outcomes)`
- `## Flow / State Diagram` (ASCII)
- `## Acceptance Criteria (Testable Outcomes)` — each criterion carries `proven by:` + `strategy:`
- `## Out Of Scope`
- `## Constraints`
- `## Open Questions`
- `## Background / Research Findings`
7. Keep the document oriented for **user review**: plain language, no file paths, no library names, no schema or code. Anything engineer-only moves to Background or a later phase.
8. Each acceptance criterion MUST be provable by comprehensive tests, with a fully-automated E2E/integration gate wherever the behavior is automatable. Agent-Probe / Known-Gap stand only as an explicitly-justified residual. Vacuous-green is banned.
9. If `## Open Questions` is non-empty at finalize (interactive session): emit `SPEC_INTENT_BLOCKED` and stop. Under /goal: record each as a backlog note and continue.
10. Once Open Questions is empty/"None" (or backlogged under /goal): save the file and the agent emits `PHASE_COMPLETE: SPEC`.
## Important Rules
- The SPEC is written for a human reviewer. If a sentence only makes sense to an engineer, rewrite it or move it to Background.
- Do NOT choose an implementation approach (INNOVATE's job, downstream), write implementation steps (PLAN), make schema decisions, or include code/library references.
- Do NOT modify any file except the SPEC file being created.
- Acceptance-criteria scenarios must be grounded in the RESEARCH test-context-discovery, not invented here.
- Once INNOVATE/PLAN begins the SPEC is frozen — later scope gaps go to the phase report `## SPEC Gaps` heading and a backlog note, never an edit to the SPEC.
- For a phase program, write the umbrella SPEC once; the inner loop reads it and never writes a per-phase SPEC.
## Required SPEC Sections
Every SPEC file must include all of the following, in this order:
- `## Summary` — one plain-language paragraph: what changes for the user and why
- `## User Stories / Jobs To Be Done` — the heart of the doc; "As a [user], I want [X], so that [Y]" or JTBD
- `## What The User Wants (Behavioral Outcomes)` — observable behavior only, no implementation
- `## Flow / State Diagram` — at least one ASCII flow/state diagram
- `## Acceptance Criteria (Testable Outcomes)` — observable outcomes, each with `proven by:` + `strategy:`; max 20
- `## Out Of Scope` — at least one item
- `## Constraints` — user-stated, system/process, and technical limits from research
- `## Open Questions` — each with an owner; empty/"None" required to finalize (interactive)
- `## Background / Research Findings` — key facts from RESEARCH that shaped the requirements
Use Markdown-structured sections, not a second machine-only schema. Markdown sections are stable across all agents (Claude, Codex, future systems) without requiring a parser.Comprehensive code review with scout-based edge case detection. Use after implementing features, before PRs, for quality assessment, security audits, or performance optimization.
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
Use this agent when you need to investigate issues, analyze system behavior, diagnose performance problems, examine database structures, collect and analyze logs from servers or CI/CD pipelines, run tests for debugging purposes, or optimize system performance. This includes troubleshooting errors, identifying bottlenecks, analyzing failed deployments, investigating test failures, and creating diagnostic reports. Examples:\n\n<example>\nContext: The user needs to investigate why an API endpoint is returning 500 errors.\nuser: "The /api/users endpoint is throwing 500 errors"\nassistant: "I''ll use the debugger agent to investigate this issue"\n<commentary>\nSince this involves investigating an issue, use the Task tool to launch the debugger agent.\n</commentary>\n</example>\n\n<example>\nContext: The user wants to analyze why the CI/CD pipeline is failing.\nuser: "The GitHub Actions workflow keeps failing on the test step"\nassistant: "Let me use the debugger agent to analyze the CI/CD pipeline logs and identify the issue"\n<commentary>\nThis requires analyzing CI/CD logs and test failures, so use the debugger agent.\n</commentary>\n</example>\n\n<example>\nContext: The user notices performance degradation in the application.\nuser: "The application response times have increased by 300% since yesterday"\nassistant: "I''ll launch the debugger agent to analyze system behavior and identify performance bottlenecks"\n<commentary>\nPerformance analysis and bottleneck identification requires the debugger agent.\n</commentary>\n</example>
EXECUTE MODE - Implementing EXACTLY what was planned. Full tool access. Can only be invoked after explicit user confirmation. Use after plan is approved.
FAST MODE - Execute compressed RIPER-5 workflow (RESEARCH + INNOVATE + PLAN) in one session, then pause for EXECUTE confirmation. Use when you want quick end-to-end solution.
Stage, commit, and push code changes with conventional commits. Use when user says "commit", "push", or finishes a feature/fix.
INNOVATE MODE - Brainstorming and exploring implementation approaches. Discusses possibilities without making decisions. Use after research is complete.
PLAN MODE - Creating exhaustive technical specifications and implementation plans. Can write to process/general-plans/active/ and process/features/*/active/ only. Use after approach is decided.