planning

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PRD Construction

PRD构建

Purpose

目的

The
.prd
is the single source of truth for remaining work. It is a frozen dependency graph created in PLAN phase before any execution. It captures every possible item — steps, substeps, edge cases, corner cases, dependencies, transitive dependencies, unknowns, assumptions to validate, decisions, trade-offs, factors, variables, acceptance criteria, scenarios, failure paths, recovery paths, integration points, state transitions, race conditions, concurrency concerns, input variations, output validations, error conditions, boundary conditions, configuration variants, environment differences, platform concerns, backwards compatibility, data migration, rollback paths, monitoring checkpoints, verification steps.
Longer is better. Missing items means missing work. Err towards every possible item.
.prd
文件是剩余工作的唯一真实数据源。它是在任何执行开始前的PLAN阶段创建的冻结依赖图。它涵盖所有可能的事项——步骤、子步骤、边缘情况、极端场景、依赖关系、传递依赖、未知项、需要验证的假设、决策、权衡因素、变量、验收标准、场景、失败路径、恢复路径、集成点、状态转换、竞态条件、并发问题、输入变体、输出验证、错误条件、边界条件、配置变体、环境差异、平台相关问题、向后兼容性、数据迁移、回滚路径、监控检查点、验证步骤。
越详细越好。遗漏事项意味着遗漏工作。尽量涵盖所有可能的事项。

File Rules

文件规则

Path: exactly
./.prd
in current working directory. No variants (.prd-rename, .prd-temp, .prd-backup), no subdirectories, no path transformations, no extensions. Valid JSON.
路径:当前工作目录下必须为
./.prd
。不允许变体(如.prd-rename、.prd-temp、.prd-backup),不允许子目录,不允许路径转换,不允许扩展名。必须是有效的JSON格式。

Item Schema

事项 Schema

json
{
  "id": "descriptive-kebab-id",
  "subject": "Imperative verb describing outcome",
  "status": "pending",
  "description": "What must be true when this is done",
  "blocking": ["ids-this-prevents"],
  "blockedBy": ["ids-that-must-finish-first"],
  "effort": "small|medium|large",
  "category": "feature|bug|refactor|docs|infra",
  "acceptance": ["measurable criteria"],
  "edge_cases": ["known complications"]
}
Subject: imperative form — "Fix auth bug", "Add webhook support", "Consolidate templates". Never "Bug: auth" or "New feature".
Blocking/blockedBy: bidirectional. If A blocks B, then B blockedBy A. Every dependency explicit.
Status:
pending
in_progress
completed
. No other values.
Effort:
small
(one attempt, <15min),
medium
(2 rounds, <45min),
large
(multiple rounds, 1h+).
json
{
  "id": "descriptive-kebab-id",
  "subject": "Imperative verb describing outcome",
  "status": "pending",
  "description": "What must be true when this is done",
  "blocking": ["ids-this-prevents"],
  "blockedBy": ["ids-that-must-finish-first"],
  "effort": "small|medium|large",
  "category": "feature|bug|refactor|docs|infra",
  "acceptance": ["measurable criteria"],
  "edge_cases": ["known complications"]
}
Subject:祈使句式——例如“修复认证漏洞”、“添加Webhook支持”、“整合模板”。禁止使用“Bug: 认证”或“新功能”这类表述。
Blocking/blockedBy:双向关联。如果A阻塞B,那么B的blockedBy字段必须包含A。所有依赖关系必须明确声明。
Status:仅允许
pending
in_progress
completed
这几种值,无其他选项。
Effort
small
(一次尝试,耗时<15分钟)、
medium
(两轮操作,耗时<45分钟)、
large
(多轮操作,耗时1小时以上)。

Construction

构建流程

  1. Enumerate every possible unknown as a work item.
  2. Map every possible dependency (blocking/blockedBy).
  3. Group independent items into parallel waves (max 3 per wave).
  4. Capture every possible edge case as either a separate item or an edge_case field.
  5. Write
    ./.prd
    to disk.
  6. FREEZE — no additions or reorganizations after creation. Only mutation: removing finished items.
  1. 将所有可能的未知项列为工作项。
  2. 梳理所有可能的依赖关系(blocking/blockedBy)。
  3. 将独立事项分组为并行批次(每批最多3个)。
  4. 将所有可能的边缘情况作为单独事项或填入edge_case字段。
  5. .prd
    文件写入磁盘。
  6. 冻结——创建后不允许添加或重组内容。仅允许修改:移除已完成的事项。

Execution

执行流程

  1. Find all
    pending
    items with empty
    blockedBy
    .
  2. Launch ≤3 parallel subagents (
    subagent_type: gm:gm
    ) per wave.
  3. Each subagent completes one item, verifies via witnessed execution.
  4. On completion: remove item from
    .prd
    , write updated file.
  5. Check for newly unblocked items. Launch next wave.
  6. Continue until
    .prd
    is empty.
Never execute independent items sequentially. Never launch more than 3 at once.
  1. 找出所有
    pending
    状态且
    blockedBy
    为空的事项。
  2. 每批启动最多3个并行子代理(
    subagent_type: gm:gm
    )。
  3. 每个子代理完成一个事项,并通过可观测的执行过程进行验证。
  4. 完成后:从
    .prd
    中移除该事项,写入更新后的文件。
  5. 检查是否有新的未阻塞事项。启动下一批次。
  6. 持续执行直到
    .prd
    文件为空。
禁止按顺序执行独立事项。禁止同时启动超过3个事项。

Completion

完成标准

.prd
must be empty at COMPLETE — zero pending, zero in_progress items. The stop hook blocks session end when items remain. Empty
.prd
= all work done.
当处于COMPLETE状态时,
.prd
文件必须为空——无pending或in_progress状态的事项。当仍有剩余事项时,停止钩子会阻止会话结束。空的
.prd
文件意味着所有工作已完成。

Do Not Use

禁用场景

Skip this skill if the task is trivially single-step (under 5 minutes, no dependencies, no unknowns).
如果任务是极其简单的单步骤操作(耗时5分钟以内,无依赖关系,无未知项),则跳过此技能。