planning-prompts

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<objective> Enable effective project planning and Claude-to-Claude meta-prompting for solo developers. Creates executable plans (PLAN.md files that ARE prompts), hierarchical planning structures (Brief → Roadmap → Phase), and multi-stage research-plan-implement workflows. </objective>
<quick_start> Start a new project:
bash
undefined
<objective> 为独立开发者实现高效的项目规划与Claude-to-Claude元提示词功能。可生成可执行计划(PLAN.md文件本身就是提示词)、分层规划结构(概要→路线图→阶段)以及“研究-规划-落地”多阶段工作流。 </objective>
<quick_start> 启动新项目:
bash
undefined

Claude creates planning structure

Claude 创建规划结构

mkdir -p .planning/phases
mkdir -p .planning/phases

Creates: BRIEF.md, ROADMAP.md, phase plans

生成文件:BRIEF.md、ROADMAP.md、阶段计划


**Invoke via routing:**
- "brief" / "new project" → Create BRIEF.md
- "roadmap" / "phases" → Create ROADMAP.md
- "plan phase" / "next phase" → Create phase PLAN.md
- "meta-prompt" / "research then plan" → Create prompt chain

Plans ARE prompts - PLAN.md is directly executable by Claude.
</quick_start>

<essential_principles>

<principle name="solo_developer_plus_claude">
You are planning for ONE person (the user) and ONE implementer (Claude).
No teams. No stakeholders. No ceremonies. No coordination overhead.
The user is the visionary/product owner. Claude is the builder.
</principle>

<principle name="plans_are_prompts">
PLAN.md is not a document that gets transformed into a prompt.
PLAN.md IS the prompt. It contains:
- Objective (what and why)
- Context (@file references)
- Tasks (type, files, action, verify, done, checkpoints)
- Verification (overall checks)
- Success criteria (measurable)
- Output (SUMMARY.md specification)

When planning a phase, you are writing the prompt that will execute it.
</principle>

<principle name="claude_to_claude_optimization">
Outputs are structured for Claude consumption, not humans:
- Heavy XML structure for parsing
- Metadata blocks (confidence, dependencies, open_questions, assumptions)
- Explicit next steps
- Code examples with context
- Every execution produces SUMMARY.md for quick human scanning
</principle>

<principle name="scope_control">
Plans must complete within ~50% of context usage to maintain consistent quality.

**The quality degradation curve:**
- 0-30% context: Peak quality (comprehensive, thorough, no anxiety)
- 30-50% context: Good quality (engaged, manageable pressure)
- 50-70% context: Degrading quality (efficiency mode, compression)
- 70%+ context: Poor quality (self-lobotomization, rushed work)

**The 2-3 Task Rule:** Each plan should contain 2-3 tasks maximum.

Examples:
- `01-01-PLAN.md` - Phase 1, Plan 1 (2-3 tasks: database schema only)
- `01-02-PLAN.md` - Phase 1, Plan 2 (2-3 tasks: database client setup)
- `01-03-PLAN.md` - Phase 1, Plan 3 (2-3 tasks: API routes)

See: reference/plans.md (scope estimation section)
</principle>

<principle name="human_checkpoints">
Claude automates everything that has a CLI or API. Checkpoints are for verification and decisions, not manual work.

**Checkpoint types:**
- `checkpoint:human-verify` - Human confirms Claude's automated work (visual checks, UI verification)
- `checkpoint:decision` - Human makes implementation choice (auth provider, architecture)

**Rarely needed:** `checkpoint:human-action` - Only for actions with no CLI/API (email verification links, account approvals requiring web login with 2FA)

See: reference/plans.md (checkpoints section)
</principle>

<principle name="deviation_rules">
Plans are guides, not straitjackets. During execution, deviations handled automatically:

1. **Auto-fix bugs** - Broken behavior -> fix immediately, document in Summary
2. **Auto-add missing critical** - Security/correctness gaps -> add immediately, document
3. **Auto-fix blockers** - Can't proceed -> fix immediately, document
4. **Ask about architectural** - Major structural changes -> stop and ask user
5. **Log enhancements** - Nice-to-haves -> auto-log to ISSUES.md, continue
</principle>

<principle name="ship_fast_iterate_fast">
No enterprise process. No approval gates. No multi-week timelines.
Plan -> Execute -> Ship -> Learn -> Repeat.

Milestones mark shipped versions: v1.0 -> v1.1 -> v2.0
</principle>

<principle name="anti_enterprise_patterns">
NEVER include in plans:
- Team structures, roles, RACI matrices
- Stakeholder management, alignment meetings
- Sprint ceremonies, standups, retros
- Multi-week estimates, resource allocation
- Change management, governance processes
- Documentation for documentation's sake

If it sounds like corporate PM theater, delete it.
</principle>

</essential_principles>

<context_scan>
**Run on every invocation** to understand current state:

```bash

**通过指令调用:**
- "brief" / "new project" → 创建BRIEF.md
- "roadmap" / "phases" → 创建ROADMAP.md
- "plan phase" / "next phase" → 创建阶段PLAN.md
- "meta-prompt" / "research then plan" → 创建提示词链

计划即提示词 - PLAN.md可直接由Claude执行。
</quick_start>

<essential_principles>

<principle name="solo_developer_plus_claude">
你是为一个人(用户)和一个执行者(Claude)做规划。
无需考虑团队、利益相关者、流程仪式或协调成本。
用户是愿景者/产品负责人,Claude是落地者。
</principle>

<principle name="plans_are_prompts">
PLAN.md并非需要转换为提示词的文档,它本身就是提示词。内容包含:
- 目标(做什么及原因)
- 上下文(@file引用)
- 任务(类型、文件、操作、验证、完成状态、检查点)
- 验证(整体检查项)
- 成功标准(可量化)
- 输出(SUMMARY.md规范)

在规划阶段时,你实际上是在编写可执行该阶段的提示词。
</principle>

<principle name="claude_to_claude_optimization">
输出内容专为Claude处理而设计,而非面向人类:
- 采用便于解析的XML结构
- 元数据块(置信度、依赖项、未解决问题、假设条件)
- 明确的下一步操作
- 带上下文的代码示例
- 每次执行都会生成SUMMARY.md供人类快速浏览
</principle>

<principle name="scope_control">
计划必须在上下文占用率约50%以内完成,以保证输出质量稳定。

**质量衰减曲线:**
- 0-30%上下文:最佳质量(全面、深入、无焦虑)
- 30-50%上下文:良好质量(专注、压力可控)
- 50-70%上下文:质量下降(效率模式、内容压缩)
- 70%+上下文:质量极差(自我简化、工作仓促)

**2-3任务规则:**每个计划最多包含2-3个任务。

示例:
- `01-01-PLAN.md` - 阶段1,计划1(2-3个任务:仅数据库架构)
- `01-02-PLAN.md` - 阶段1,计划2(2-3个任务:数据库客户端设置)
- `01-03-PLAN.md` - 阶段1,计划3(2-3个任务:API路由)

参考:reference/plans.md(范围估算章节)
</principle>

<principle name="human_checkpoints">
Claude会自动化所有可通过CLI或API完成的工作。检查点仅用于验证和决策,而非手动操作。

**检查点类型:**
- `checkpoint:human-verify` - 人类确认Claude的自动化工作(视觉检查、UI验证)
- `checkpoint:decision` - 人类做出实现方案选择(认证提供商、架构选型)

**极少需要:** `checkpoint:human-action` - 仅适用于无CLI/API的操作(邮件验证链接、需要网页登录+双因素认证的账户审批)

参考:reference/plans.md(检查点章节)
</principle>

<principle name="deviation_rules">
计划是指南而非枷锁。执行过程中,偏差会自动处理:

1. **自动修复bug** - 出现异常行为→立即修复,记录在Summary中
2. **自动补充关键缺失项** - 安全/正确性漏洞→立即补充,记录在案
3. **自动解决阻塞问题** - 无法推进→立即修复,记录在案
4. **询问架构相关问题** - 重大结构变更→暂停并询问用户
5. **记录优化建议** - 锦上添花的功能→自动记录到ISSUES.md,继续执行
</principle>

<principle name="ship_fast_iterate_fast">
无需企业级流程、审批闸门或数周的时间线。
计划→执行→发布→学习→重复。

里程碑标记已发布版本:v1.0 → v1.1 → v2.0
</principle>

<principle name="anti_enterprise_patterns">
计划中绝对禁止包含以下内容:
- 团队结构、角色、RACI矩阵
- 利益相关者管理、对齐会议
- 冲刺仪式、站会、回顾会
- 数周的估算、资源分配
- 变更管理、治理流程
- 为了文档而写文档

如果内容听起来像企业级项目管理的形式主义,直接删除。
</principle>

</essential_principles>

<context_scan>
**每次调用时运行**以了解当前状态:

```bash

Check for planning structure

检查规划结构

ls -la .planning/ 2>/dev/null ls -la .prompts/ 2>/dev/null
ls -la .planning/ 2>/dev/null ls -la .prompts/ 2>/dev/null

Find any continue-here files

查找所有continue-here文件

find . -name ".continue-here*.md" -type f 2>/dev/null
find . -name ".continue-here*.md" -type f 2>/dev/null

Check for existing artifacts

检查现有工件

[ -f .planning/BRIEF.md ] && echo "BRIEF: exists" [ -f .planning/ROADMAP.md ] && echo "ROADMAP: exists"

**Present findings before intake question.**
</context_scan>

<intake>
Based on scan results, present context-aware options:

**If planning structure exists:**
Project: [from BRIEF or directory] Brief: [exists/missing] Roadmap: [X phases defined] Current: [phase status]
What would you like to do?
  1. Plan next phase
  2. Execute current phase
  3. Create handoff (stopping for now)
  4. View/update roadmap
  5. Create a meta-prompt (for Claude-to-Claude pipeline)
  6. Something else

**If prompts structure exists:**
Found .prompts/ directory with [N] prompt folders. Latest: {most recent folder}
What would you like to do?
  1. Create new prompt (Research/Plan/Do/Refine)
  2. Run existing prompt
  3. View prompt chain
  4. Something else

**If no structure found:**
No planning or prompt structure found.
What would you like to do?
  1. Start new project (create brief + roadmap)
  2. Create a meta-prompt chain (research -> plan -> implement)
  3. Jump straight to phase planning
  4. Get guidance on approach

**Wait for response before proceeding.**
</intake>

<routing>
| Intent | Go to |
|--------|-------|
| "brief", "new project", "start project" | reference/plans.md (create-brief section) |
| "roadmap", "phases", "structure" | reference/plans.md (create-roadmap section) |
| "phase", "plan phase", "next phase" | reference/plans.md (plan-phase section) |
| "meta-prompt", "prompt chain", "research then plan" | reference/meta-prompts.md |
| "research prompt", "gather info" | reference/meta-prompts.md (research section) |
| "plan prompt", "create approach" | reference/meta-prompts.md (plan section) |
| "do prompt", "implement", "execute" | reference/meta-prompts.md (do section) |
| "refine", "improve", "iterate" | reference/meta-prompts.md (refine section) |
| "handoff", "pack up", "stopping" | reference/plans.md (handoff section) |
| "resume", "continue" | reference/plans.md (resume section) |
| "guidance", "help" | Show this menu again with explanations |

**After reading the reference, follow it exactly.**
</routing>

<hierarchies>

<project_planning_hierarchy>
The project planning hierarchy (each level builds on previous):
BRIEF.md -> Human vision (you read this) | ROADMAP.md -> Phase structure (overview) | RESEARCH.md -> Research prompt (optional, for unknowns) | FINDINGS.md -> Research output (if research done) | PLAN.md -> THE PROMPT (Claude executes this) | SUMMARY.md -> Outcome (existence = phase complete)

**Structure:**
.planning/ ├── BRIEF.md # Human vision ├── ROADMAP.md # Phase structure + tracking └── phases/ ├── 01-foundation/ │ ├── 01-01-PLAN.md # Plan 1: Database setup │ ├── 01-01-SUMMARY.md # Outcome (exists = done) │ ├── 01-02-PLAN.md # Plan 2: API routes │ └── 01-02-SUMMARY.md └── 02-auth/ ├── 02-01-RESEARCH.md # Research prompt (if needed) ├── 02-01-FINDINGS.md # Research output └── 02-02-PLAN.md # Implementation prompt
</project_planning_hierarchy>

<meta_prompt_hierarchy>
The meta-prompt hierarchy (for Claude-to-Claude pipelines):
.prompts/ ├── 001-auth-research/ │ ├── completed/ │ │ └── 001-auth-research.md # Prompt (archived after run) │ ├── auth-research.md # Full output (XML for Claude) │ └── SUMMARY.md # Executive summary (markdown for human) ├── 002-auth-plan/ │ ├── completed/ │ │ └── 002-auth-plan.md │ ├── auth-plan.md │ └── SUMMARY.md ├── 003-auth-implement/ │ ├── completed/ │ │ └── 003-auth-implement.md │ └── SUMMARY.md # Do prompts create code elsewhere

**Purpose types:**
- **Research** - Gather information that planning prompt consumes
- **Plan** - Create approach/roadmap that implementation consumes
- **Do** - Execute a task, produce an artifact
- **Refine** - Improve an existing research or plan output
</meta_prompt_hierarchy>

</hierarchies>

<workflow_patterns>

<research_plan_implement>
The classic three-stage workflow:

1. **Research Prompt** -> Gathers information, produces structured findings
2. **Plan Prompt** -> References research, creates phased approach
3. **Do Prompt** -> References plan, implements each phase

Each stage:
- Produces output for next stage to consume
- Creates SUMMARY.md for human scanning
- Archives prompt after completion
- Captures metadata (confidence, dependencies, open questions)

**Chain detection:** When creating prompts, scan for existing research/plan files to reference.
</research_plan_implement>

<parallel_research>
For topics with multiple independent research areas:
Layer 1 (parallel): 001-api-research, 002-db-research, 003-ui-research Layer 2 (depends on all): 004-architecture-plan Layer 3 (depends on 004): 005-implement

**Execution:** Parallel within layers, sequential between layers.
</parallel_research>

<iterative_refinement>
When initial research/plan needs improvement:
001-auth-research -> Initial research 002-auth-research-refine -> Deeper dive on specific finding 003-auth-plan -> Plan based on refined research

Refine prompts preserve version history and track changes.
</iterative_refinement>

</workflow_patterns>

<output_requirements>

<summary_md>
Every execution produces SUMMARY.md:

```markdown
[ -f .planning/BRIEF.md ] && echo "BRIEF: exists" [ -f .planning/ROADMAP.md ] && echo "ROADMAP: exists"

**在提问前先展示扫描结果。**
</context_scan>

<intake>
根据扫描结果,展示上下文感知的选项:

**如果规划结构已存在:**
项目:[来自BRIEF或目录名] 概要:[存在/缺失] 路线图:[已定义X个阶段] 当前状态:[阶段状态]
你想要执行什么操作?
  1. 规划下一阶段
  2. 执行当前阶段
  3. 创建交接包(暂时停止)
  4. 查看/更新路线图
  5. 创建元提示词(用于Claude-to-Claude流水线)
  6. 其他操作

**如果提示词结构已存在:**
发现.prompts/目录包含[N]个提示词文件夹。 最新的:{最近的文件夹}
你想要执行什么操作?
  1. 创建新提示词(研究/规划/执行/优化)
  2. 运行现有提示词
  3. 查看提示词链
  4. 其他操作

**如果未找到任何结构:**
未找到规划或提示词结构。
你想要执行什么操作?
  1. 启动新项目(创建概要+路线图)
  2. 创建元提示词链(研究→规划→落地)
  3. 直接进入阶段规划
  4. 获取方法指导

**等待用户响应后再继续。**
</intake>

<routing>
| 意图 | 跳转至 |
|--------|-------|
| "brief", "new project", "start project" | reference/plans.md(create-brief章节) |
| "roadmap", "phases", "structure" | reference/plans.md(create-roadmap章节) |
| "phase", "plan phase", "next phase" | reference/plans.md(plan-phase章节) |
| "meta-prompt", "prompt chain", "research then plan" | reference/meta-prompts.md |
| "research prompt", "gather info" | reference/meta-prompts.md(research章节) |
| "plan prompt", "create approach" | reference/meta-prompts.md(plan章节) |
| "do prompt", "implement", "execute" | reference/meta-prompts.md(do章节) |
| "refine", "improve", "iterate" | reference/meta-prompts.md(refine章节) |
| "handoff", "pack up", "stopping" | reference/plans.md(handoff章节) |
| "resume", "continue" | reference/plans.md(resume章节) |
| "guidance", "help" | 再次显示此菜单并附带说明 |

**阅读参考文档后,严格按照其内容执行。**
</routing>

<hierarchies>

<project_planning_hierarchy>
项目规划层级(每个层级基于前一层级构建):
BRIEF.md -> 人类愿景(由你阅读) | ROADMAP.md -> 阶段结构(概览) | RESEARCH.md -> 研究提示词(可选,针对未知领域) | FINDINGS.md -> 研究输出(如果已完成研究) | PLAN.md -> 提示词本身(由Claude执行) | SUMMARY.md -> 成果(存在即表示阶段完成)

**目录结构:**
.planning/ ├── BRIEF.md # 人类愿景 ├── ROADMAP.md # 阶段结构+跟踪 └── phases/ ├── 01-foundation/ │ ├── 01-01-PLAN.md # 计划1:数据库设置 │ ├── 01-01-SUMMARY.md # 成果(存在即完成) │ ├── 01-02-PLAN.md # 计划2:API路由 │ └── 01-02-SUMMARY.md └── 02-auth/ ├── 02-01-RESEARCH.md # 研究提示词(如有需要) ├── 02-01-FINDINGS.md # 研究输出 └── 02-02-PLAN.md # 落地提示词
</project_planning_hierarchy>

<meta_prompt_hierarchy>
元提示词层级(用于Claude-to-Claude流水线):
.prompts/ ├── 001-auth-research/ │ ├── completed/ │ │ └── 001-auth-research.md # 提示词(运行后归档) │ ├── auth-research.md # 完整输出(供Claude处理的XML格式) │ └── SUMMARY.md # 执行摘要(供人类阅读的Markdown格式) ├── 002-auth-plan/ │ ├── completed/ │ │ └── 002-auth-plan.md │ ├── auth-plan.md │ └── SUMMARY.md ├── 003-auth-implement/ │ ├── completed/ │ │ └── 003-auth-implement.md │ └── SUMMARY.md # 执行类提示词会在其他位置生成代码

**用途类型:**
- **Research** - 收集信息,供规划提示词使用
- **Plan** - 创建实现方法/路线图,供落地环节使用
- **Do** - 执行任务,生成工件
- **Refine** - 优化现有研究或规划输出
</meta_prompt_hierarchy>

</hierarchies>

<workflow_patterns>

<research_plan_implement>
经典的三阶段工作流:

1. **研究提示词** -> 收集信息,生成结构化成果
2. **规划提示词** -> 参考研究结果,创建分阶段方案
3. **执行提示词** -> 参考规划,落地每个阶段

每个阶段:
- 生成供下一阶段使用的输出
- 创建SUMMARY.md供人类快速浏览
- 完成后归档提示词
- 捕获元数据(置信度、依赖项、未解决问题)

**链检测:**创建提示词时,扫描现有研究/规划文件并引用。
</research_plan_implement>

<parallel_research>
针对包含多个独立研究领域的主题:
第一层(并行):001-api-research, 002-db-research, 003-ui-research 第二层(依赖所有第一层):004-architecture-plan 第三层(依赖004):005-implement

**执行方式:**同层级并行,跨层级串行。
</parallel_research>

<iterative_refinement>
当初始研究/规划需要优化时:
001-auth-research -> 初始研究 002-auth-research-refine -> 针对特定发现深入研究 003-auth-plan -> 基于优化后的研究结果制定规划

优化类提示词会保留版本历史并跟踪变更。
</iterative_refinement>

</workflow_patterns>

<output_requirements>

<summary_md>
每次执行都会生成SUMMARY.md:

```markdown

{Topic} {Purpose} Summary

{主题} {用途}摘要

{Substantive one-liner describing outcome}
{描述成果的实质性单行内容}

Version

版本

{v1 or "v2 (refined from v1)"}
{v1 或 "v2(基于v1优化)"}

Key Findings

关键成果

  • {Most important finding or action}
  • {Second key item}
  • {Third key item}
  • {最重要的发现或操作}
  • {第二个关键项}
  • {第三个关键项}

Files Created

创建的文件

{Only for Do prompts}
  • path/to/file.ts
    - Description
{仅适用于执行类提示词}
  • path/to/file.ts
    - 描述

Decisions Needed

需要做出的决策

{Specific actionable decisions, or "None"}
{具体可执行的决策,或“无”}

Blockers

阻塞问题

{External impediments, or "None"}
{外部障碍,或“无”}

Next Step

下一步操作

{Concrete forward action}

Confidence: {High|Medium|Low} Full output: {filename.md}

**One-liner must be substantive:**
- Good: "JWT with jose library and httpOnly cookies recommended"
- Bad: "Research completed"
</summary_md>

<metadata_block>
For research and plan outputs, include:

```xml
<metadata>
  <confidence level="{high|medium|low}">
    {Why this confidence level}
  </confidence>
  <dependencies>
    {What's needed to proceed}
  </dependencies>
  <open_questions>
    {What remains uncertain}
  </open_questions>
  <assumptions>
    {What was assumed}
  </assumptions>
</metadata>
</metadata_block>
</output_requirements>
<reference_index> All in
reference/
:
ReferenceContents
plans.mdProject plans: briefs, roadmaps, phases, checkpoints, scope estimation, handoffs
meta-prompts.mdClaude-to-Claude pipelines: research/plan/do/refine patterns, execution engine
</reference_index>
<success_criteria> Skill succeeds when:
  • Context scan runs before intake
  • Appropriate workflow selected based on intent
  • Plans ARE executable prompts (not separate)
  • Hierarchy is maintained (brief -> roadmap -> phase)
  • Meta-prompts include metadata and SUMMARY.md
  • Chain dependencies detected and honored
  • Quality controls prevent research gaps
  • Handoffs preserve full context for resumption
  • Context limits respected (auto-handoff at 10%)
  • All work documented with deviations noted </success_criteria>
{具体的推进动作}

置信度:{高|中|低} 完整输出:{filename.md}

**单行内容必须具有实质性:**
- 良好示例:“推荐使用jose库的JWT+httpOnly Cookie方案”
- 不良示例:“研究已完成”
</summary_md>

<metadata_block>
对于研究和规划输出,需包含:

```xml
<metadata>
  <confidence level="{high|medium|low}">
    {此置信度的原因}
  </confidence>
  <dependencies>
    {推进所需的前置条件}
  </dependencies>
  <open_questions>
    {仍不确定的问题}
  </open_questions>
  <assumptions>
    {做出的假设条件}
  </assumptions>
</metadata>
</metadata_block>
</output_requirements>
<reference_index> 所有参考文档均在
reference/
目录下:
参考文档内容
plans.md项目规划:概要、路线图、阶段、检查点、范围估算、交接
meta-prompts.mdClaude-to-Claude流水线:研究/规划/执行/优化模式、执行引擎
</reference_index>
<success_criteria> 技能成功的标准:
  • 每次调用前先运行上下文扫描
  • 根据用户意图选择合适的工作流
  • 计划本身就是可执行的提示词(而非独立文档)
  • 保持层级结构(概要→路线图→阶段)
  • 元提示词包含元数据和SUMMARY.md
  • 检测并尊重链依赖关系
  • 质量控制防止研究漏洞
  • 交接包保留完整上下文以便恢复
  • 遵守上下文限制(10%时自动交接)
  • 所有工作均有文档记录并标注偏差 </success_criteria>