一键导入
feature-plan
Generate EXECUTION_PLAN.md and scoped AGENTS.md files for a feature. Use after /feature-technical-spec to create the task breakdown.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate EXECUTION_PLAN.md and scoped AGENTS.md files for a feature. Use after /feature-technical-spec to create the 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.
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.
Generate the greenfield execution plan plus root and scoped AGENTS.md files. Use after /technical-spec to create the phased task breakdown.
| name | feature-plan |
| description | Generate EXECUTION_PLAN.md and scoped AGENTS.md files for a feature. Use after /feature-technical-spec to create the task breakdown. |
| argument-hint | <feature-name> |
| allowed-tools | Bash, Read, Write, Edit, AskUserQuestion, Glob, Grep |
Generate the execution plan and scoped agent instructions for the feature $1.
Copy this checklist and track progress:
Feature Plan Progress:
- [ ] Directory guard
- [ ] Handle arguments (feature name)
- [ ] Check prerequisites (FEATURE_SPEC.md + FEATURE_TECHNICAL_SPEC.md)
- [ ] Existing file guard (prevent overwrite)
- [ ] Generate EXECUTION_PLAN.md and feature-local AGENTS.md
- [ ] Verify execution skills installed
- [ ] Codex CLI detection and skill install
- [ ] Run spec-verification
- [ ] Run criteria audit
- [ ] Cross-model review (if Codex available)
If .toolkit-marker exists in the current working directory → STOP:
"You're in the toolkit repo. Feature skills run from your project directory.
Run: cd ~/Projects/your-project && /feature-plan $1"
Check .claude/toolkit-version.json exists in the current working directory (confirms /setup was run).
If missing → STOP: "Toolkit not installed. Run /setup from the toolkit first."
Check AGENTS.md exists in the current working directory (confirms project root).
If missing → STOP: "Run this from your project root (where AGENTS.md lives)."
$1 = feature name (e.g., analytics, dark-mode)$1 is empty, ask the user for the feature namePROJECT_ROOT = current working directoryFEATURE_DIR = PROJECT_ROOT/features/$1FEATURE_DIR/FEATURE_SPEC.md exists. If not:
"FEATURE_SPEC.md not found at features/$1/. Run /feature-spec $1 first."FEATURE_DIR/FEATURE_TECHNICAL_SPEC.md exists. If not:
"FEATURE_TECHNICAL_SPEC.md not found at features/$1/. Run /feature-technical-spec $1 first."PROJECT_ROOT/AGENTS.md exists. If not:
"AGENTS.md not found. Feature development requires an existing AGENTS.md."Before generating anything, check whether any output files already exist:
FEATURE_DIR/EXECUTION_PLAN.md
FEATURE_DIR/AGENTS.md
If neither exists: continue normally.
If one or both 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/feature-plan/PROMPT.md and follow its instructions exactly:
FEATURE_DIR/FEATURE_SPEC.md and FEATURE_DIR/FEATURE_TECHNICAL_SPEC.md as inputsPROJECT_ROOT/AGENTS.md to understand current conventionsFEATURE_DIR/AGENTS.md with feature-scoped workflow guidanceWrite both documents to the feature directory:
FEATURE_DIR/EXECUTION_PLAN.mdFEATURE_DIR/AGENTS.mdIf FEATURE_DIR/CLAUDE.md does not exist, create it with:
@AGENTS.md
If it already exists, do not overwrite it.
After writing the documents, verify the execution skills are available so /fresh-start, /phase-start, etc. work from the feature directory.
Check if .claude/skills/fresh-start/SKILL.md exists in PROJECT_ROOT:
/setup from the toolkit to install them."Check if OpenAI Codex CLI is installed:
command -v codex >/dev/null 2>&1
If Codex is NOT detected: skip silently.
If Codex IS detected:
Check for new skills by comparing toolkit skills to installed skills:
# Get installed skills
INSTALLED_SKILLS=$(ls ~/.codex/skills/ 2>/dev/null | grep -v '^\.')
If no installed skills exist (first time), use AskUserQuestion:
Question: "Codex CLI detected. Install toolkit skills for Codex?"
Options:
- "Yes, install" — Install skills via symlink (auto-updates with toolkit)
- "No, skip" — Don't install Codex skills
If user selects install, resolve toolkit location from .claude/toolkit-version.json:
TOOLKIT_PATH=$(jq -r '.toolkit_location' .claude/toolkit-version.json)
"$TOOLKIT_PATH/scripts/install-codex-skill-pack.sh" --method symlink
Report installation result.
After writing EXECUTION_PLAN.md, run the spec-verification workflow:
.claude/skills/spec-verification/SKILL.md for the verification processIMPORTANT: Do not proceed to "Next Step" until verification passes or user explicitly chooses to proceed with noted issues.
Run /criteria-audit FEATURE_DIR to validate verification metadata in EXECUTION_PLAN.md.
This passes the feature directory so criteria-audit reads features/$1/EXECUTION_PLAN.md
instead of looking in the project root.
After verification passes, run cross-model review if Codex CLI is available:
codex --version/codex-consult with upstream contextConsultation invocation:
/codex-consult --upstream features/$1/FEATURE_TECHNICAL_SPEC.md --research "execution planning, task breakdown" features/$1/EXECUTION_PLAN.md
If Codex finds issues:
If Codex unavailable: Skip silently and proceed to Next Step.
| Situation | Action |
|---|---|
FEATURE_SPEC.md or FEATURE_TECHNICAL_SPEC.md missing | STOP with message directing user to run /feature-spec or /feature-technical-spec first |
| EXECUTION_PLAN.md generation produces empty or malformed output | Re-read input specs, retry generation once; if still empty, report error and ask user to check spec completeness |
/criteria-audit returns FAIL | STOP and present failing criteria to user; do not proceed until metadata is fixed |
| Codex CLI invocation errors or times out | Log the error, mark cross-model review as SKIPPED, and continue to Next Step |
| Backup file write fails (disk full or permissions) | Report the write failure, do NOT overwrite the original file, and suggest user free disk space or fix permissions |
When verification is complete, inform the user:
EXECUTION_PLAN.md and AGENTS.md created and verified at features/$1/
Verification: PASSED | PASSED WITH NOTES | NEEDS REVIEW
Cross-Model Review: PASSED | PASSED WITH NOTES | SKIPPED
Next steps:
1. cd features/$1
2. /fresh-start
3. /configure-verification
4. /phase-prep 1
5. /phase-start 1