--- name: fe-feature-plan description: 前端功能循环第 2 步。将 FE 规格转化为任务级实现计划(每任务 2-5 分钟,含组件路径、props 契约、测试意图),输出到 docs/superpowers/plans/。 user-invocable: false allowed-tools: Read Write Grep Skill --- **所有输出必须使用中文。** # fe-feature-plan ## 阶段范围(前端) 把当前 FE 的规格转成任务级实现计划,委托 `superpowers:writing-plans` 起草。任务粒度限定为:**组件文件 / 路由配置 / store hook / API client 包装函数**。**不允许**生成涉及后端文件(controller / service / repository / SQL)的任务。 ## 执行步骤 1. 收集输入: - 当前 FE 的规格文件 `docs/superpowers/specs/-.md`(不存在则报错) - `docs/04-技术规范.md § 一前端架构`(路由 / 状态库 / 组件目录约定 / 测试栈) - `docs/09-项目目录结构.md § 前端目录结构`(文件落盘位置规范) - 相关代码指针(待修改的现有前端文件,通过 grep 在 `frontend/` 下定位) 2. 委托 `superpowers:writing-plans`,把上下文 + 落盘路径 `docs/superpowers/plans/-.md` 作为 caller-provided path 传入。caller-provided 上下文显式标注: > 本次为前端阶段任务计划。任务粒度 = 组件 / 路由 / hook / API client。每个任务必须含:`test_file::test_name` + `impl_file` + 完成判据。`impl_file` 必须落在 `frontend/` 目录下(具体根路径见 docs/09 § 前端目录结构)。每个任务标注"测试先行类型" = jsdom 组件测试 OR Playwright E2E。 3. 按 `${CLAUDE_SKILL_DIR}/templates/fe-feature-plan-template.md` 渲染输出,写入推导路径。 4. **验证**: - 每个任务必须含 `test_file::test_name`、`impl_file`、完成标准 - **每个任务的 `impl_file` 路径必须以 `frontend/` 开头**(或 docs/09 声明的前端根目录),命中 `backend/` / `sql/` / `scripts/` → 修正后重渲染 - 全文不得出现 `TBD` / `【人工填写:...】`——查不到值用 `AskUserQuestion` 问用户 5. 输出 `fe-feature-plan: `,立即调用 `Skill(fe-feature-tdd)`。 ## 参考 - `${CLAUDE_SKILL_DIR}/templates/fe-feature-plan-template.md` - 委托:`superpowers:writing-plans`(本插件 `skills/internal/superpower-writing-plans/`) - 上游:`fe-feature-brainstorm` - 下游:`fe-feature-tdd`