ワンクリックで
product-spec
Generate PRODUCT_SPEC.md through guided Q&A. Use as the first step when starting a new greenfield project.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Generate PRODUCT_SPEC.md through guided Q&A. Use as the first step when starting a new greenfield project.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Delegate code implementation to Codex CLI. Claude decomposes, scopes context, and verifies; Codex implements. Accepts a spec file, text description, or gathers requirements interactively.
Exploratory conversation before /product-spec. Asks one question at a time, runs background research for open-source/off-the-shelf alternatives, and writes DISCOVERY_NOTES.md. Use when the user has an idea but hasn't scoped it yet.
Generate EXECUTION_PLAN.md and scoped AGENTS.md files for a feature. Use after /feature-technical-spec to create the task breakdown.
Define feature requirements (problem, users, scope, acceptance criteria) through guided Q&A and write FEATURE_SPEC.md. Use when starting a new feature.
Define technical approach (architecture, integration points, data model) for a feature through guided Q&A and write FEATURE_TECHNICAL_SPEC.md. Use after /feature-spec.
Orient to project structure and load context. Use at the start of each new session or after context reset to understand the project state.
| name | product-spec |
| description | Generate PRODUCT_SPEC.md through guided Q&A. Use as the first step when starting a new greenfield project. |
| argument-hint | [--lean] |
| allowed-tools | Read, Write, AskUserQuestion, Bash, Agent |
Generate a product specification document for the current project.
Copy this checklist and track progress:
Product Spec Progress:
- [ ] Step 1: Directory guard
- [ ] Step 2: Project root confirmation
- [ ] Step 3: Check for existing plans/greenfield/PRODUCT_SPEC.md
- [ ] Step 4: Conduct guided Q&A with user
- [ ] Step 5: Write plans/greenfield/PRODUCT_SPEC.md
- [ ] Step 6: Handle deferred decisions
- [ ] Step 7: Review and refine with user
- [ ] Step 8: Suggest next step (/technical-spec)
--lean)When --lean is passed:
run_in_background: true). Continue the Q&A without waiting. When results arrive, only interrupt the flow if a finding would materially change a recommendation (e.g., a critical known issue, a dominant competitor, a clearly superior alternative). Skip routine competitive analysis summaries./codex-consult after writing the spec. Proceed directly to the Next Step..toolkit-marker exists in the current working directory → STOP:
"You're in the toolkit repo. Run this from your project directory instead:
cd ~/Projects/your-project && /product-spec"Before generating any files, confirm the output location with the user:
Will write PRODUCT_SPEC.md to: {absolute path of cwd}/plans/greenfield/
Continue? (Yes / Change directory)
If the user says "Change directory", ask for the correct path and instruct them to cd there first.
Before asking any questions, ensure plans/greenfield/ exists, then check whether
plans/greenfield/PRODUCT_SPEC.md already exists.
plans/greenfield/PRODUCT_SPEC.md.bak.YYYYMMDD-HHMMSS, then write the new document to plans/greenfield/PRODUCT_SPEC.mdplans/greenfield/PRODUCT_SPEC.md with the new documentBefore starting the Q&A, check for discovery notes:
plans/greenfield/DISCOVERY_NOTES.md, then DISCOVERY_NOTES.md in project root.Read .claude/skills/product-spec/PROMPT.md and follow its instructions exactly:
Write the completed specification to plans/greenfield/PRODUCT_SPEC.md.
After writing plans/greenfield/PRODUCT_SPEC.md, verify the file exists and is non-empty by reading the first few lines. If the file was not created successfully, report the error and retry.
IMPORTANT: Capture deferred requirements interactively during the Q&A process, not after.
During the Q&A, watch for signals that the user is deferring a requirement:
When you detect a deferral signal, immediately use AskUserQuestion:
Question: "Would you like to save this to your deferred requirements?"
Header: "Defer?"
Options:
- "Yes, capture it" — I'll ask a few quick questions to document it
- "No, skip" — Don't record this
If user selects "Yes, capture it":
Ask these clarifying questions (can be combined into one AskUserQuestion with multiple questions):
What's being deferred? "In one sentence, what's the requirement or feature?" (Pre-fill with your understanding from context)
Why defer it? Options: "Out of scope for MVP" / "Needs more research" / "V2 feature" / "Resource constraints" / "Other"
Notes for later? "Any context that will help when revisiting this?" (Optional — user can skip)
After collecting answers, append to DEFERRED.md right away (don't wait until end).
If file doesn't exist, create it:
# Deferred Requirements
> Captured during specification Q&A. Review when planning future versions.
## From plans/greenfield/PRODUCT_SPEC.md ({date})
| Requirement | Reason | Notes |
|-------------|--------|-------|
| {user's answer} | {selected reason} | {notes or "—"} |
If file exists, append:
| {user's answer} | {selected reason} | {notes or "—"} |
(If appending to a different spec's section, add a new section header first.)
After capturing (or skipping), continue the spec Q&A where you left off. Don't break the flow.
--lean mode)If --lean was passed, skip this entire section and proceed to Next Step.
After writing plans/greenfield/PRODUCT_SPEC.md, run cross-model review if Codex CLI is available:
codex --version/codex-consult on the generated documentConsultation invocation:
/codex-consult --research "product requirements, user stories" plans/greenfield/PRODUCT_SPEC.md
If Codex finds issues:
If Codex unavailable: Skip silently and proceed to Next Step.
| Situation | Action |
|---|---|
PROMPT.md not found at .claude/skills/product-spec/PROMPT.md | Stop and report "Skill asset missing — reinstall toolkit or run /setup" |
| DEFERRED.md write fails (permissions or disk) | Output deferred items to terminal, warn user, continue with spec generation |
| Codex CLI invocation fails or times out | Log the error, skip cross-model review, proceed to Next Step |
When complete, inform the user:
PRODUCT_SPEC.md created at ./plans/greenfield/PRODUCT_SPEC.md
Deferred Requirements: {count} items captured to DEFERRED.md
Cross-Model Review: PASSED | PASSED WITH NOTES | SKIPPED
Next: Run /technical-spec