一键导入
generate-plan
Generate the greenfield execution plan plus root and scoped AGENTS.md files. Use after /technical-spec to create the phased task breakdown.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate the greenfield execution plan plus root and scoped AGENTS.md files. Use after /technical-spec to create the phased task breakdown.
用 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 | generate-plan |
| description | Generate the greenfield execution plan plus root and scoped AGENTS.md files. Use after /technical-spec to create the phased task breakdown. |
| allowed-tools | Read, Write, Edit, AskUserQuestion, Grep, Glob, Bash |
Generate the execution plan and agent guidelines for the current project.
Copy this checklist and track progress:
Generate Plan Progress:
- [ ] Step 1: Directory guard
- [ ] Step 2: Check prerequisites (plans/greenfield specs)
- [ ] Step 3: Check for toolkit setup
- [ ] Step 4: Check for existing output files
- [ ] Step 5: Process specs into task breakdown
- [ ] Step 6: Create root and scoped CLAUDE.md files (if missing)
- [ ] Step 7: Verify plan completeness
- [ ] Step 8: Review and refine with user
- [ ] Step 9: Suggest next step (/fresh-start)
.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 && /generate-plan"Before generating any files, confirm the output location with the user:
Will write:
- `AGENTS.md` to: {absolute path of cwd}/
- planning docs 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/TECHNICAL_SPEC.md first.TECHNICAL_SPEC.md in the current directory.plans/greenfield/ before proceeding so the project adopts the canonical layout./product-spec and /technical-spec first."Check if .claude/toolkit-version.json exists in the current directory:
Toolkit not initialized in this project. Execution skills (/fresh-start,
/phase-start, etc.) won't be available after plan generation.
Recommended: Run /setup from the toolkit first to install execution skills.
Continue with plan generation anyway? (Yes / Run /setup first)
If user says "Run /setup first", stop and instruct them to run /setup from the toolkit directory.
If user says "Yes", continue — spec generation will work, but they'll need /setup before execution.Before generating anything, ensure plans/greenfield/ exists, then check whether any output files already exist:
AGENTS.md
plans/greenfield/EXECUTION_PLAN.md
plans/greenfield/AGENTS.md
If none exist: continue normally.
If one or more exist: STOP and ask the user what to do for the existing file(s):
{path}.bak.YYYYMMDD-HHMMSS, then write the new document(s) to the original path(s)Read .claude/skills/generate-plan/PROMPT.md and follow its instructions exactly:
plans/greenfield/AGENTS.md with durable project-wide workflow guidelinesplans/greenfield/AGENTS.md with greenfield execution-specific guidanceWrite these files:
AGENTS.mdplans/greenfield/EXECUTION_PLAN.mdplans/greenfield/AGENTS.mdIf CLAUDE.md does not exist in the current directory, create it with:
@AGENTS.md
If it already exists, do not overwrite it.
If plans/greenfield/CLAUDE.md does not exist, create it with:
@AGENTS.md
If it already exists, do not overwrite it.
After writing the root and scoped files:
Count the lines in the generated root AGENTS.md:
Thresholds:
AGENTS.mdIf WARN or FAIL, offer to help split the file before proceeding.
Run the spec-verification workflow:
.claude/skills/spec-verification/SKILL.md for the verification processTECHNICAL_SPEC.md and PRODUCT_SPEC.md appear as tasks or acceptance criteriaIMPORTANT: Do not proceed to "Next Step" until verification passes or user explicitly chooses to proceed with noted issues.
Run /criteria-audit plans/greenfield to validate verification metadata in plans/greenfield/EXECUTION_PLAN.md.
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/TECHNICAL_SPEC.md --research "execution planning, task breakdown" plans/greenfield/EXECUTION_PLAN.md
If Codex finds issues:
If Codex unavailable: Skip silently and proceed to Next Step.
| Situation | Action |
|---|---|
PRODUCT_SPEC.md or TECHNICAL_SPEC.md not found in plans/greenfield/ or project root | Stop and report which file is missing with instructions to generate it |
PROMPT.md not found at .claude/skills/generate-plan/PROMPT.md | Stop and report "Skill asset missing — reinstall toolkit or run /setup" |
AGENTS_TEMPLATE.md not found at .claude/skills/generate-plan/AGENTS_TEMPLATE.md | Stop and report "Skill asset missing — reinstall toolkit or run /setup" |
PLAN_AGENTS_TEMPLATE.md not found at .claude/skills/generate-plan/PLAN_AGENTS_TEMPLATE.md | Stop and report "Skill asset missing — reinstall toolkit or run /setup" |
| Contradictions between specs | Stop and list contradictions. Ask user to resolve before continuing |
| 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:
Root AGENTS.md plus greenfield plan files created and verified.
Verification: PASSED | PASSED WITH NOTES | NEEDS REVIEW
Cross-Model Review: PASSED | PASSED WITH NOTES | SKIPPED
Your project is ready for execution:
1. cd plans/greenfield
2. /fresh-start
3. /configure-verification
4. /phase-prep 1
5. /phase-start 1