plans

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Plans - Plan Lifecycle Management

计划 - 计划生命周期管理

Operator Context

操作者上下文

This skill operates as an operator for deterministic plan management, configuring Claude's behavior for structured task tracking through
scripts/plan-manager.py
. All plan mutations flow through the script; the LLM orchestrates but never edits plan files directly.
本技能作为确定性计划管理的操作者,通过
scripts/plan-manager.py
配置Claude的行为,以实现结构化任务跟踪。所有计划变更都通过该脚本进行;大语言模型(LLM)负责编排,但绝不直接编辑计划文件。

Hardcoded Behaviors (Always Apply)

硬编码行为(始终适用)

  • Script-Only Mutations: ALL plan changes go through
    plan-manager.py
    -- never edit plan files by hand
  • Show Before Modify: ALWAYS run
    show
    on a plan before any mutation (check, complete, abandon)
  • Stale Check on Entry: ALWAYS run
    list --stale
    before executing any plan tasks
  • Full Output: NEVER summarize or truncate script output -- show it completely to the user
  • User Confirmation: NEVER complete or abandon a plan without explicit user confirmation
  • 仅通过脚本变更:所有计划修改必须通过
    plan-manager.py
    进行——绝不手动编辑计划文件
  • 先查看再修改:在进行任何变更(检查、完成、废弃)之前,必须先对计划执行
    show
    操作
  • 进入时检查过期计划:在执行任何计划任务之前,必须先运行
    list --stale
  • 完整输出:绝不总结或截断脚本输出——将完整内容展示给用户
  • 用户确认:在未获得用户明确确认的情况下,绝不完成或废弃计划

Default Behaviors (ON unless disabled)

默认行为(开启状态,除非手动关闭)

  • Human-Readable Output: Pass
    --human
    flag for all display commands
  • Stale Plan Warnings: Warn user about plans older than 7 days before proceeding
  • Task-Order Enforcement: Work tasks in listed order unless user specifies otherwise
  • Status Logging: Report current plan state after every mutation
  • 人类可读输出:所有显示命令都传递
    --human
    参数
  • 过期计划警告:在继续操作前,提醒用户注意超过7天未更新的计划
  • 任务顺序强制执行:除非用户另有指定,否则按列表顺序处理任务
  • 状态记录:每次变更后报告当前计划状态

Optional Behaviors (OFF unless enabled)

可选行为(关闭状态,除非手动开启)

  • Audit on Session Start: Run
    audit
    across all active plans at session open
  • Auto-Complete Detection: Suggest completing plans when all tasks are checked
  • Cross-Plan Dependencies: Track dependencies between related plans
  • 会话启动时审核:会话开启时对所有活跃计划执行
    audit
    操作
  • 自动完成检测:当所有任务都已标记完成时,建议用户完成计划
  • 跨计划依赖关系:跟踪相关计划之间的依赖关系

What This Skill CAN Do

本技能可执行的操作

  • Create new plans with structured phases and tasks
  • List active plans, filter by staleness, show details
  • Mark individual tasks as complete within a plan
  • Archive completed plans to
    completed/
    directory
  • Move abandoned plans to
    abandoned/
    with documented reason
  • Audit all active plans for structural issues
  • 创建包含结构化阶段和任务的新计划
  • 列出活跃计划、按过期状态筛选、显示详细信息
  • 标记计划中的单个任务为已完成
  • 将已完成的计划归档到
    completed/
    目录
  • 将废弃的计划移动到
    abandoned/
    目录并记录原因
  • 审核所有活跃计划的结构问题

What This Skill CANNOT Do

本技能不可执行的操作

  • Execute plan tasks (it tracks them; other skills execute)
  • Edit plan files directly (all mutations go through the script)
  • Skip the stale-check gate before working on plans
  • Complete or abandon plans without user confirmation
  • Replace Claude Code's built-in
    /plan
    command (this is
    /plans
    )

  • 执行计划任务(仅负责跟踪,其他技能负责执行)
  • 直接编辑计划文件(所有变更必须通过脚本进行)
  • 在处理计划前跳过过期检查环节
  • 在未获得用户确认的情况下完成或废弃计划
  • 替代Claude Code内置的
    /plan
    命令(本技能对应
    /plans

Instructions

操作步骤

Phase 1: CHECK

阶段1:检查

Goal: Understand current plan landscape before any action.
bash
python3 ~/.claude/scripts/plan-manager.py list --human
python3 ~/.claude/scripts/plan-manager.py list --stale --human
If stale plans exist (>7 days), warn user before proceeding.
Gate: Plan landscape is known. Stale plans are surfaced. Proceed only when gate passes.
目标:在执行任何操作前了解当前计划状况。
bash
python3 ~/.claude/scripts/plan-manager.py list --human
python3 ~/.claude/scripts/plan-manager.py list --stale --human
如果存在过期计划(超过7天未更新),在继续操作前提醒用户。
准入条件:已了解计划状况,已发现过期计划。仅当满足条件时才可继续。

Phase 2: INSPECT

阶段2:检查详情

Goal: Understand the target plan's current state before mutation.
bash
python3 ~/.claude/scripts/plan-manager.py show PLAN_NAME --tasks --human
Review remaining tasks, completed tasks, and overall progress.
Gate: Plan state is displayed to user. Proceed only when gate passes.
目标:在变更前了解目标计划的当前状态。
bash
python3 ~/.claude/scripts/plan-manager.py show PLAN_NAME --tasks --human
查看剩余任务、已完成任务和整体进度。
准入条件:已向用户展示计划状态。仅当满足条件时才可继续。

Phase 3: MUTATE

阶段3:变更

Goal: Apply exactly the requested change.
ActionCommand
Create
python3 ~/.claude/scripts/plan-manager.py create NAME
Check task
python3 ~/.claude/scripts/plan-manager.py check NAME TASK_NUM
Complete
python3 ~/.claude/scripts/plan-manager.py complete NAME
Abandon
python3 ~/.claude/scripts/plan-manager.py abandon NAME --reason "reason"
For complete and abandon: require explicit user confirmation before executing.
Gate: Mutation succeeded (exit code 0). Proceed only when gate passes.
目标:执行用户请求的准确变更。
操作命令
创建
python3 ~/.claude/scripts/plan-manager.py create NAME
标记任务完成
python3 ~/.claude/scripts/plan-manager.py check NAME TASK_NUM
完成计划
python3 ~/.claude/scripts/plan-manager.py complete NAME
废弃计划
python3 ~/.claude/scripts/plan-manager.py abandon NAME --reason "reason"
对于完成废弃操作:执行前必须获得用户的明确确认。
准入条件:变更成功(退出码为0)。仅当满足条件时才可继续。

Phase 4: CONFIRM

阶段4:确认

Goal: Verify mutation applied correctly.
bash
python3 ~/.claude/scripts/plan-manager.py show PLAN_NAME --human
Display updated state to user. If exit code != 0, report error and stop.
Gate: Post-mutation state matches expectation. User sees final result.

目标:验证变更已正确应用。
bash
python3 ~/.claude/scripts/plan-manager.py show PLAN_NAME --human
向用户展示更新后的状态。如果退出码不为0,报告错误并停止操作。
准入条件:变更后的状态符合预期,用户已查看最终结果。

Error Handling

错误处理

Error: "Plan Not Found"

错误:“计划未找到”

Cause: Typo in plan name or plan already archived Solution:
  1. Run
    list --human
    to show all active plans
  2. Check
    completed/
    and
    abandoned/
    directories for archived plans
  3. Confirm correct name with user before retrying
原因:计划名称拼写错误或计划已被归档 解决方案:
  1. 运行
    list --human
    查看所有活跃计划
  2. 检查
    completed/
    abandoned/
    目录中的归档计划
  3. 在重试前与用户确认正确的计划名称

Error: "Stale Plan Detected"

错误:“检测到过期计划”

Cause: Plan has not been updated in >7 days Solution:
  1. Display the stale plan's current state to user
  2. Ask: continue working, abandon, or update timeline?
  3. Do NOT execute tasks from stale plans without explicit confirmation
原因:计划已超过7天未更新 解决方案:
  1. 向用户展示过期计划的当前状态
  2. 询问用户:继续处理、废弃还是更新时间线?
  3. 在未获得明确确认的情况下,绝不执行过期计划的任务

Error: "Script Exit Code Non-Zero"

错误:“脚本退出码非零”

Cause: Invalid arguments, missing plan, or filesystem issue Solution:
  1. Show the full error output to user (never summarize)
  2. Check script arguments match expected format
  3. Verify
    scripts/plan-manager.py
    exists and is executable

原因:参数无效、计划缺失或文件系统问题 解决方案:
  1. 向用户展示完整的错误输出(绝不总结)
  2. 检查脚本参数是否符合预期格式
  3. 验证
    scripts/plan-manager.py
    是否存在且可执行

Anti-Patterns

反模式

Anti-Pattern 1: Editing Plan Files Directly

反模式1:直接编辑计划文件

What it looks like: Using Write/Edit to modify a plan markdown file Why wrong: Bypasses script validation, breaks audit trail, may corrupt format Do instead: All mutations through
plan-manager.py
表现:使用写入/编辑操作修改计划Markdown文件 错误原因:绕过脚本验证,破坏审核轨迹,可能损坏文件格式 正确做法:所有变更必须通过
plan-manager.py
进行

Anti-Pattern 2: Skipping Show Before Modify

反模式2:修改前跳过查看步骤

What it looks like: Running
check
or
complete
without first running
show
Why wrong: May mark wrong task, complete plan with remaining work, or act on stale state Do instead: Always Phase 2 (INSPECT) before Phase 3 (MUTATE)
表现:在未先执行
show
操作的情况下运行
check
complete
命令 错误原因:可能标记错误任务、完成仍有未完成工作的计划,或基于过期状态执行操作 正确做法:始终先执行阶段2(检查详情),再执行阶段3(变更)

Anti-Pattern 3: Summarizing Script Output

反模式3:总结脚本输出

What it looks like: "The plan has 3 remaining tasks" instead of showing full output Why wrong: User loses details, task descriptions, staleness info, and audit data Do instead: Display complete script output, let user read it
表现:用“计划还有3项剩余任务”代替展示完整输出 错误原因:用户会丢失任务详情、任务描述、过期信息和审核数据 正确做法:展示完整的脚本输出,让用户自行阅读

Anti-Pattern 4: Auto-Completing Without Confirmation

反模式4:未确认自动完成计划

What it looks like: Detecting all tasks done and running
complete
automatically Why wrong: User may want to add tasks, review work, or keep plan active Do instead: Suggest completion, wait for explicit user confirmation

表现:检测到所有任务已完成后自动运行
complete
命令 错误原因:用户可能想要添加任务、审核工作或保持计划活跃 正确做法:建议完成计划,等待用户的明确确认

References

参考资料

This skill uses these shared patterns:
  • Anti-Rationalization - Prevents shortcut rationalizations
  • Verification Checklist - Pre-completion checks
本技能使用以下共享模式:
  • 反合理化 - 防止寻找捷径的合理化行为
  • 验证清单 - 完成前的检查项

Script Reference

脚本参考

  • scripts/plan-manager.py
    - All plan CRUD operations
  • Exit codes: 0 = success, 1 = error, 2 = warnings (e.g., stale plans)
  • Default output is JSON; add
    --human
    for readable format
  • scripts/plan-manager.py
    - 所有计划CRUD操作
  • 退出码:0 = 成功,1 = 错误,2 = 警告(如过期计划)
  • 默认输出为JSON格式;添加
    --human
    参数可获得人类可读格式