npx skills add https://github.com/softaworks/agent-toolkit --skill gepetto协调一个多步骤的规划流程:研究 → 访谈 → 规格综合 → 计划 → 外部评审 → 分节
在进行任何其他操作之前,请按顺序执行以下步骤:
立即打印介绍横幅:
═══════════════════════════════════════════════════════════════
GEPETTO: AI辅助实施规划
═══════════════════════════════════════════════════════════════
研究 → 访谈 → 规格综合 → 计划 → 外部评审 → 分节
注意:GEPETTO 会将许多 .md 文件写入您传递给它的规划目录
检查用户在调用时是否提供了 @file 并且它是一个规格文件(以 .md 结尾)。
如果没有提供 @file 或者路径不以 .md 结尾,则输出以下内容并停止:
═══════════════════════════════════════════════════════════════
GEPETTO: 需要规格文件
═══════════════════════════════════════════════════════════════
此技能需要一个 markdown 规格文件路径(必须以 .md 结尾)。
规划目录是从规格文件的父目录推断出来的。
要开始一个**新**计划:
1. 创建一个 markdown 规格文件,描述您想要构建的内容
2. 它可以尽可能详细或模糊
3. 将其放在 gepetto 可以保存规划文件的目录中
4. 运行:/gepetto @path/to/your-spec.md
要**恢复**现有计划:
1. 运行:/gepetto @path/to/your-spec.md
示例:/gepetto @planning/my-feature-spec.md
═══════════════════════════════════════════════════════════════
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
不要继续。等待用户使用 .md 文件路径重新调用。
通过检查现有文件来确定会话状态:
设置 planning_dir = 规格文件的父目录
设置 initial_file = 规格文件路径
扫描现有规划文件:
claude-research.mdclaude-interview.mdclaude-spec.mdclaude-plan.mdclaude-integration-notes.mdclaude-ralph-loop-prompt.mdclaude-ralphy-prd.mdreviews/ 目录sections/ 目录确定模式和恢复点:
| 找到的文件 | 模式 | 从何处恢复 |
|---|---|---|
| 无 | new | 步骤 4 |
| 仅 research | resume | 步骤 6 (interview) |
| research + interview | resume | 步骤 8 (spec synthesis) |
| + spec | resume | 步骤 9 (plan) |
| + plan | resume | 步骤 10 (external review) |
| + reviews | resume | 步骤 11 (integrate) |
| + integration-notes | resume | 步骤 12 (user review) |
| + sections/index.md | resume | 步骤 14 (write sections) |
| 所有 sections 完成 | resume | 步骤 15 (execution files) |
| + claude-ralph-loop-prompt.md + claude-ralphy-prd.md | complete | 完成 |
打印状态:
规划目录:{planning_dir}
模式:{mode}
如果是恢复模式:
从步骤 {N} 恢复
要重新开始,请删除规划目录中的文件。
═══════════════════════════════════════════════════════════════
步骤 {N}/17: {STEP_NAME}
═══════════════════════════════════════════════════════════════
{details}
步骤 {N} 完成:{summary}
───────────────────────────────────────────────────────────────
根据步骤 4 的决定,启动研究子代理:
Task(subagent_type=Explore)Task(subagent_type=Explore) 配合 WebSearch如果需要两者,则并行启动两个 Task 工具(单条消息包含多个工具调用)。
重要: 子代理返回他们的发现 - 他们不直接写入文件。从所有子代理收集结果后,将它们合并并写入 <planning_dir>/claude-research.md。
如果用户在步骤 4 选择了不进行任何研究,则完全跳过此步骤。
在主上下文中运行(AskUserQuestion 需要它)。访谈应基于以下信息:
将问答写入 <planning_dir>/claude-interview.md
合并到 <planning_dir>/claude-spec.md:
这将用户的原始需求综合成一个完整的规格说明。
创建详细计划 → <planning_dir>/claude-plan.md
重要:为不熟悉的读者编写。该计划必须是完全自包含的 - 一个没有先前背景的工程师或 LLM 应该仅通过阅读此文档就能理解我们正在构建什么、为什么以及如何构建。
并行启动两个子代理来评审计划:
两者都接收计划内容并返回他们的分析。将结果写入 <planning_dir>/reviews/。
分析 <planning_dir>/reviews/ 中的建议。
您有权决定整合或不整合哪些内容。如果您决定不整合任何内容,也是可以的。
步骤 1: 编写 <planning_dir>/claude-integration-notes.md 记录:
步骤 2: 使用整合的更改更新 <planning_dir>/claude-plan.md。
使用 AskUserQuestion:
计划已根据外部反馈更新。您现在可以评审和编辑 claude-plan.md。
如果您希望 Claude 帮助编辑计划,请打开一个单独的 Claude 会话 - 此会话
正处于工作流程中,在工作流程完成之前无法协助编辑。
当您完成评审后,选择“完成”以继续。
选项:"Done reviewing"
在继续之前等待用户确认。
阅读 claude-plan.md。识别自然的分节边界并创建 <planning_dir>/sections/index.md。
关键: index.md 必须以 SECTION_MANIFEST 块开头。有关格式要求,请参见参考。
在继续创建分节文件之前,先编写 index.md。
启动并行子代理 - 每个分节一个 Task 以实现最高效率:
sections/index.md 以获取 SECTION_MANIFEST 列表# 在一条消息中启动所有任务以实现并行执行:
Task(
subagent_type="general-purpose",
prompt="""
编写分节文件:section-01-{name}
输入:
- <planning_dir>/claude-plan.md
- <planning_dir>/sections/index.md
输出:<planning_dir>/sections/section-01-{name}.md
分节文件必须是**完全自包含的**。包括:
- 背景(为什么存在此分节)
- 需求(完成时必须满足的条件)
- 依赖关系(需要/阻塞)
- 实施细节(来自计划)
- 验收标准(复选框)
- 要创建/修改的文件
实施者**不应**需要参考任何其他文档。
"""
)
Task(
subagent_type="general-purpose",
prompt="编写分节文件:section-02-{name} ..."
)
Task(
subagent_type="general-purpose",
prompt="编写分节文件:section-03-{name} ..."
)
# ... 清单中的每个分节一个 Task
在继续之前等待所有子代理完成。
委托给子代理以减少主上下文的令牌使用:
Task(
subagent_type="general-purpose",
prompt="""
为自主实施生成两个执行文件。
输入文件:
- <planning_dir>/sections/index.md (包含 SECTION_MANIFEST)
- <planning_dir>/sections/section-*.md (所有分节文件)
输出 1:<planning_dir>/claude-ralph-loop-prompt.md
用于 ralph-loop 插件。**内嵌**所有分节内容。
结构:
- 任务声明
- sections/index.md 的完整内容
- **每个**分节文件的完整内容(内嵌,非引用)
- 执行规则(依赖顺序,验证验收标准)
- 完成信号:<promise>ALL-SECTIONS-COMPLETE</promise>
输出 2:<planning_dir>/claude-ralphy-prd.md
用于 Ralphy CLI。**引用**分节文件(不内嵌)。
结构:
- PRD 标题
- 使用方法(ralphy --prd 命令)
- 上下文解释
- 复选框任务列表:每个分节一个 "- [ ] Section NN: {name}"
编写这两个文件。
"""
)
在继续之前等待子代理完成。
验证所有文件是否成功创建:
claude-ralph-loop-prompt.mdclaude-ralphy-prd.md打印生成的文件和后续步骤:
═══════════════════════════════════════════════════════════════
GEPETTO: 规划完成
═══════════════════════════════════════════════════════════════
生成的文件:
- claude-research.md (研究发现)
- claude-interview.md (问答记录)
- claude-spec.md (综合规格)
- claude-plan.md (实施计划)
- claude-integration-notes.md (反馈决策)
- reviews/ (外部 LLM 反馈)
- sections/ (实施单元)
- claude-ralph-loop-prompt.md (用于 ralph-loop 插件)
- claude-ralphy-prd.md (用于 Ralphy CLI)
如何实施:
选项 A - 手动(推荐用于学习/控制):
1. 阅读 sections/index.md 以了解依赖关系
2. 按顺序实施每个分节文件
3. 每个分节都是自包含的,并包含验收标准
选项 B - 使用 ralph-loop 自主实施(Claude Code 插件):
/ralph-loop @<planning_dir>/claude-ralph-loop-prompt.md --completion-promise "COMPLETE" --max-iterations 100
选项 C - 使用 Ralphy 自主实施(外部 CLI):
ralphy --prd <planning_dir>/claude-ralphy-prd.md
# 或者:cp <planning_dir>/claude-ralphy-prd.md ./PRD.md && ralphy
═══════════════════════════════════════════════════════════════
每周安装量
244
代码仓库
GitHub 星标
1.2K
首次出现
Jan 20, 2026
安全审计
安装于
codex181
claude-code181
gemini-cli181
cursor181
opencode132
cline130
Orchestrates a multi-step planning process: Research → Interview → Spec Synthesis → Plan → External Review → Sections
BEFORE anything else , do these in order:
Print intro banner immediately:
═══════════════════════════════════════════════════════════════
GEPETTO: AI-Assisted Implementation Planning
═══════════════════════════════════════════════════════════════
Research → Interview → Spec Synthesis → Plan → External Review → Sections
Note: GEPETTO will write many .md files to the planning directory you pass it
Check if user provided @file at invocation AND it's a spec file (ends with.md).
If NO @file was provided OR the path doesn't end with .md, output this and STOP:
═══════════════════════════════════════════════════════════════
GEPETTO: Spec File Required
═══════════════════════════════════════════════════════════════
This skill requires a markdown spec file path (must end with .md).
The planning directory is inferred from the spec file's parent directory.
To start a NEW plan:
1. Create a markdown spec file describing what you want to build
2. It can be as detailed or as vague as you like
3. Place it in a directory where gepetto can save planning files
4. Run: /gepetto @path/to/your-spec.md
To RESUME an existing plan:
1. Run: /gepetto @path/to/your-spec.md
Example: /gepetto @planning/my-feature-spec.md
═══════════════════════════════════════════════════════════════
Do not continue. Wait for user to re-invoke with a .md file path.
Determine session state by checking existing files:
Set planning_dir = parent directory of the spec file
Set initial_file = the spec file path
Scan for existing planning files:
claude-research.mdclaude-interview.mdclaude-spec.mdclaude-plan.mdclaude-integration-notes.mdclaude-ralph-loop-prompt.mdclaude-ralphy-prd.md| Files Found | Mode | Resume From |
|---|---|---|
| None | new | Step 4 |
| research only | resume | Step 6 (interview) |
| research + interview | resume | Step 8 (spec synthesis) |
| + spec | resume | Step 9 (plan) |
| + plan | resume | Step 10 (external review) |
| + reviews | resume | Step 11 (integrate) |
| + integration-notes | resume | Step 12 (user review) |
| + sections/index.md | resume | Step 14 (write sections) |
| all sections complete | resume | Step 15 (execution files) |
| + claude-ralph-loop-prompt.md + claude-ralphy-prd.md |
Print status:
Planning directory: {planning_dir}
Mode: {mode}
If resuming:
Resuming from step {N}
To start fresh, delete the planning directory files.
═══════════════════════════════════════════════════════════════
STEP {N}/17: {STEP_NAME}
═══════════════════════════════════════════════════════════════
{details}
Step {N} complete: {summary}
───────────────────────────────────────────────────────────────
See research-protocol.md.
See research-protocol.md.
Based on decisions from step 4, launch research subagents:
Task(subagent_type=Explore)Task(subagent_type=Explore) with WebSearchIf both are needed, launch both Task tools in parallel (single message with multiple tool calls).
Important: Subagents return their findings - they do NOT write files directly. After collecting results from all subagents, combine them and write to <planning_dir>/claude-research.md.
Skip this step entirely if user chose no research in step 4.
Run in main context (AskUserQuestion requires it). The interview should be informed by:
Write Q&A to <planning_dir>/claude-interview.md
Combine into <planning_dir>/claude-spec.md:
This synthesizes the user's raw requirements into a complete specification.
Create detailed plan → <planning_dir>/claude-plan.md
IMPORTANT : Write for an unfamiliar reader. The plan must be fully self-contained - an engineer or LLM with no prior context should understand what we're building, why , and how just from reading this document.
Launch TWO subagents in parallel to review the plan:
Both receive the plan content and return their analysis. Write results to <planning_dir>/reviews/.
Analyze the suggestions in <planning_dir>/reviews/.
You are the authority on what to integrate or not. It's OK if you decide to not integrate anything.
Step 1: Write <planning_dir>/claude-integration-notes.md documenting:
Step 2: Update <planning_dir>/claude-plan.md with the integrated changes.
Use AskUserQuestion:
The plan has been updated with external feedback. You can now review and edit claude-plan.md.
If you want Claude's help editing the plan, open a separate Claude session - this session
is mid-workflow and can't assist with edits until the workflow completes.
When you're done reviewing, select "Done" to continue.
Options: "Done reviewing"
Wait for user confirmation before proceeding.
See section-index.md
Read claude-plan.md. Identify natural section boundaries and create <planning_dir>/sections/index.md.
CRITICAL: index.md MUST start with a SECTION_MANIFEST block. See the reference for format requirements.
Write index.md before proceeding to section file creation.
Launch parallel subagents - one Task per section for maximum efficiency:
sections/index.md to get the SECTION_MANIFEST list# Launch all in ONE message for parallel execution:
Task(
subagent_type="general-purpose",
prompt="""
Write section file: section-01-{name}
Inputs:
- <planning_dir>/claude-plan.md
- <planning_dir>/sections/index.md
Output: <planning_dir>/sections/section-01-{name}.md
The section file must be COMPLETELY SELF-CONTAINED. Include:
- Background (why this section exists)
- Requirements (what must be true when complete)
- Dependencies (requires/blocks)
- Implementation details (from the plan)
- Acceptance criteria (checkboxes)
- Files to create/modify
The implementer should NOT need to reference any other document.
"""
)
Task(
subagent_type="general-purpose",
prompt="Write section file: section-02-{name} ..."
)
Task(
subagent_type="general-purpose",
prompt="Write section file: section-03-{name} ..."
)
# ... one Task per section in the manifest
Wait for ALL subagents to complete before proceeding.
Delegate to subagent to reduce main context token usage:
Task(
subagent_type="general-purpose",
prompt="""
Generate two execution files for autonomous implementation.
Input files:
- <planning_dir>/sections/index.md (has SECTION_MANIFEST)
- <planning_dir>/sections/section-*.md (all section files)
OUTPUT 1: <planning_dir>/claude-ralph-loop-prompt.md
For ralph-loop plugin. EMBED all section content inline.
Structure:
- Mission statement
- Full content of sections/index.md
- Full content of EACH section file (embedded, not referenced)
- Execution rules (dependency order, verify acceptance criteria)
- Completion signal: <promise>ALL-SECTIONS-COMPLETE</promise>
OUTPUT 2: <planning_dir>/claude-ralphy-prd.md
For Ralphy CLI. REFERENCE section files (don't embed).
Structure:
- PRD header
- How to use (ralphy --prd command)
- Context explanation
- Checkbox task list: one "- [ ] Section NN: {name}" per section
Write both files.
"""
)
Wait for subagent completion before proceeding.
Verify all files were created successfully:
claude-ralph-loop-prompt.mdclaude-ralphy-prd.mdPrint generated files and next steps:
═══════════════════════════════════════════════════════════════
GEPETTO: Planning Complete
═══════════════════════════════════════════════════════════════
Generated files:
- claude-research.md (research findings)
- claude-interview.md (Q&A transcript)
- claude-spec.md (synthesized specification)
- claude-plan.md (implementation plan)
- claude-integration-notes.md (feedback decisions)
- reviews/ (external LLM feedback)
- sections/ (implementation units)
- claude-ralph-loop-prompt.md (for ralph-loop plugin)
- claude-ralphy-prd.md (for Ralphy CLI)
How to implement:
Option A - Manual (recommended for learning/control):
1. Read sections/index.md to understand dependencies
2. Implement each section file in order
3. Each section is self-contained with acceptance criteria
Option B - Autonomous with ralph-loop (Claude Code plugin):
/ralph-loop @<planning_dir>/claude-ralph-loop-prompt.md --completion-promise "COMPLETE" --max-iterations 100
Option C - Autonomous with Ralphy (external CLI):
ralphy --prd <planning_dir>/claude-ralphy-prd.md
# Or: cp <planning_dir>/claude-ralphy-prd.md ./PRD.md && ralphy
═══════════════════════════════════════════════════════════════
Weekly Installs
244
Repository
GitHub Stars
1.2K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
codex181
claude-code181
gemini-cli181
cursor181
opencode132
cline130
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
56,200 周安装
阿里云文档智能DocMind Node.js SDK使用教程:异步提取文档结构、文本和布局
241 周安装
阿里云轻量应用服务器SWAS-OPEN API管理指南:实例、磁盘、快照、镜像、防火墙
241 周安装
阿里云文档API质量评审工具 - 自动化产品文档与OpenAPI评审报告生成
241 周安装
阿里云OSS ossutil 2.0 测试指南:验证AK配置与存储桶操作
241 周安装
AI求职信写作助手 - 个性化定制求职信模板与写作技巧,提升面试成功率
241 周安装
Modal 无服务器 GPU 指南:在云端运行机器学习工作负载,按秒计费,自动扩缩容
241 周安装
reviews/ directorysections/ directoryDetermine mode and resume point:
| complete |
| Done |