用途:Spec Writing 提供编写 specs.md 文件的指导,该文件驱动 Sprint 插件的自主开发工作流。规格写得好坏直接决定智能体输出质量,需清晰定义目标、范围边界与测试要求。
前提条件:已安装 Sprint 插件(/plugin install sprint);已通过 /sprint:setup 完成项目接入(生成 project-goals.md 与 project-map.md);已通过 /sprint:new 创建 sprint 目录(生成 .claude/sprint/[N]/specs.md);了解 sprint 阶段生命周期。
主要能力与用法:在 .claude/sprint/[N]/specs.md 顶部写一句简洁目标;用 In Scope 与 Out of Scope 明确范围,智能体只实现范围内内容;添加 Testing 段配置 QA(required/optional/skip)、UI Testing(required/optional/skip)、UI Testing Mode(automated/manual)。新增 API、业务逻辑或数据校验时 QA 设为 required;纯前端、文档或配置改动可设 skip。面向用户的功能、表单提交、导航流程 UI Testing 设 required;回归测试与标准 CRUD 用 automated,复杂交互或视觉验证用 manual。规格应精简精确,架构师会将其扩展为 backend-specs.md、frontend-specs.md、api-contract.md,过度指定实现细节会限制架构师。迭代时查看上一轮 status.md,移除已完成项并补充新需求或缺陷修复。
输出:含目标、范围与测试配置的完整 specs.md;清晰范围边界;测试配置;迭代精炼后的规格。
限制与错误处理:缺少 Out of Scope 会导致实现意外功能;Testing 段缺失或 skip 会导致测试不运行;规格过宽会导致 sprint 不收敛,应拆分为更小 sprint;需求含糊矛盾会让架构师产出冲突文件;UI Testing Mode 设为 automated 时手动测试不会触发。参考资料包括 ${CLAUDE_SKILL_DIR}/references/testing-configuration.md。