一键导入
technical-spec
Generate TECHNICAL_SPEC.md through guided Q&A. Use after /product-spec to define the technical architecture.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate TECHNICAL_SPEC.md through guided Q&A. Use after /product-spec to define the technical architecture.
用 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 | technical-spec |
| description | Generate TECHNICAL_SPEC.md through guided Q&A. Use after /product-spec to define the technical architecture. |
| argument-hint | [--lean] |
| allowed-tools | Read, Write, Edit, AskUserQuestion, Grep, Glob, Bash, Agent |
Generate a technical specification document for the current project.
Copy this checklist and track progress:
Technical Spec Progress:
- [ ] Step 1: Directory guard
- [ ] Step 2: Project root confirmation
- [ ] Step 3: Check prerequisites (plans/greenfield/PRODUCT_SPEC.md)
- [ ] Step 4: Check for existing plans/greenfield/TECHNICAL_SPEC.md
- [ ] Step 5: Conduct guided Q&A with user
- [ ] Step 6: Cross-verify against PRODUCT_SPEC.md
- [ ] Step 7: Handle deferred decisions
- [ ] Step 8: Review and refine with user
- [ ] Step 9: Suggest next step (/generate-plan)
--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 production issue with a chosen technology, a clearly superior alternative, a deprecation or breaking change). Skip routine benchmark comparisons and ecosystem 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 && /technical-spec"Before generating any files, confirm the output location with the user:
Will write TECHNICAL_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.
plans/greenfield/PRODUCT_SPEC.md first.PRODUCT_SPEC.md in the current directory.plans/greenfield/PRODUCT_SPEC.md before continuing so the project adopts the canonical layout./product-spec first."Before asking any questions, ensure plans/greenfield/ exists, then check whether
plans/greenfield/TECHNICAL_SPEC.md already exists.
plans/greenfield/TECHNICAL_SPEC.md.bak.YYYYMMDD-HHMMSS, then write the new document to plans/greenfield/TECHNICAL_SPEC.mdplans/greenfield/TECHNICAL_SPEC.md with the new documentRead .claude/skills/technical-spec/PROMPT.md and follow its instructions exactly:
plans/greenfield/PRODUCT_SPEC.md as inputWrite the completed specification to plans/greenfield/TECHNICAL_SPEC.md.
After writing plans/greenfield/TECHNICAL_SPEC.md, run the spec-verification workflow:
.claude/skills/spec-verification/SKILL.md for the verification processPRODUCT_SPEC.md appear in TECHNICAL_SPEC.mdIMPORTANT: Do not proceed to "Next Step" until verification passes or user explicitly chooses to proceed with noted issues.
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 technical decision:
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:
What's being deferred? "In one sentence, what's the technical decision or feature?" (Pre-fill with your understanding from context)
Why defer it? Options: "Premature optimization" / "Over-engineering for MVP" / "Needs more research" / "V2 feature" / "Other"
Notes for later? "Any technical context that will help when revisiting this?" (Optional — user can skip)
After collecting answers, append to DEFERRED.md right away.
If this is the first technical spec entry, add a new section:
## From plans/greenfield/TECHNICAL_SPEC.md ({date})
| Requirement | Reason | Notes |
|-------------|--------|-------|
| {user's answer} | {selected reason} | {notes or "—"} |
If section exists, append row:
| {user's answer} | {selected reason} | {notes or "—"} |
After capturing (or skipping), continue the spec Q&A where you left off.
--lean mode)If --lean was passed, skip this entire section and proceed to Next Step.
After verification passes, run cross-model review if Codex CLI is available:
codex --version/codex-consult with upstream contextConsultation invocation:
/codex-consult --upstream plans/greenfield/PRODUCT_SPEC.md --research "{detected technologies}" plans/greenfield/TECHNICAL_SPEC.md
If Codex finds issues:
If Codex unavailable: Skip silently and proceed to Next Step.
| Situation | Action |
|---|---|
PRODUCT_SPEC.md not found in plans/greenfield/ or project root | Stop and report "Run /product-spec first" |
PROMPT.md not found at .claude/skills/technical-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 verification is complete, inform the user:
TECHNICAL_SPEC.md created and verified at ./plans/greenfield/TECHNICAL_SPEC.md
Verification: PASSED | PASSED WITH NOTES | NEEDS REVIEW
Cross-Model Review: PASSED | PASSED WITH NOTES | SKIPPED
Deferred Requirements: {count} items captured to DEFERRED.md
Next: Run /generate-plan