plans
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePlans - Plan Lifecycle Management
计划 - 计划生命周期管理
Operator Context
操作者上下文
This skill operates as an operator for deterministic plan management, configuring Claude's behavior for structured task tracking through . All plan mutations flow through the script; the LLM orchestrates but never edits plan files directly.
scripts/plan-manager.py本技能作为确定性计划管理的操作者,通过配置Claude的行为,以实现结构化任务跟踪。所有计划变更都通过该脚本进行;大语言模型(LLM)负责编排,但绝不直接编辑计划文件。
scripts/plan-manager.pyHardcoded Behaviors (Always Apply)
硬编码行为(始终适用)
- Script-Only Mutations: ALL plan changes go through -- never edit plan files by hand
plan-manager.py - Show Before Modify: ALWAYS run on a plan before any mutation (check, complete, abandon)
show - Stale Check on Entry: ALWAYS run before executing any plan tasks
list --stale - 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 flag for all display commands
--human - 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 across all active plans at session open
audit - 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 directory
completed/ - Move abandoned plans to with documented reason
abandoned/ - 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 command (this is
/plan)/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 --humanIf 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 --humanReview 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.
| Action | Command |
|---|---|
| Create | |
| Check task | |
| Complete | |
| Abandon | |
For complete and abandon: require explicit user confirmation before executing.
Gate: Mutation succeeded (exit code 0). Proceed only when gate passes.
目标:执行用户请求的准确变更。
| 操作 | 命令 |
|---|---|
| 创建 | |
| 标记任务完成 | |
| 完成计划 | |
| 废弃计划 | |
对于完成和废弃操作:执行前必须获得用户的明确确认。
准入条件:变更成功(退出码为0)。仅当满足条件时才可继续。
Phase 4: CONFIRM
阶段4:确认
Goal: Verify mutation applied correctly.
bash
python3 ~/.claude/scripts/plan-manager.py show PLAN_NAME --humanDisplay 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:
- Run to show all active plans
list --human - Check and
completed/directories for archived plansabandoned/ - Confirm correct name with user before retrying
原因:计划名称拼写错误或计划已被归档
解决方案:
- 运行查看所有活跃计划
list --human - 检查和
completed/目录中的归档计划abandoned/ - 在重试前与用户确认正确的计划名称
Error: "Stale Plan Detected"
错误:“检测到过期计划”
Cause: Plan has not been updated in >7 days
Solution:
- Display the stale plan's current state to user
- Ask: continue working, abandon, or update timeline?
- Do NOT execute tasks from stale plans without explicit confirmation
原因:计划已超过7天未更新
解决方案:
- 向用户展示过期计划的当前状态
- 询问用户:继续处理、废弃还是更新时间线?
- 在未获得明确确认的情况下,绝不执行过期计划的任务
Error: "Script Exit Code Non-Zero"
错误:“脚本退出码非零”
Cause: Invalid arguments, missing plan, or filesystem issue
Solution:
- Show the full error output to user (never summarize)
- Check script arguments match expected format
- Verify exists and is executable
scripts/plan-manager.py
原因:参数无效、计划缺失或文件系统问题
解决方案:
- 向用户展示完整的错误输出(绝不总结)
- 检查脚本参数是否符合预期格式
- 验证是否存在且可执行
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.pyAnti-Pattern 2: Skipping Show Before Modify
反模式2:修改前跳过查看步骤
What it looks like: Running or without first running
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)
checkcompleteshow表现:在未先执行操作的情况下运行或命令
错误原因:可能标记错误任务、完成仍有未完成工作的计划,或基于过期状态执行操作
正确做法:始终先执行阶段2(检查详情),再执行阶段3(变更)
showcheckcompleteAnti-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 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表现:检测到所有任务已完成后自动运行命令
错误原因:用户可能想要添加任务、审核工作或保持计划活跃
正确做法:建议完成计划,等待用户的明确确认
completeReferences
参考资料
This skill uses these shared patterns:
- Anti-Rationalization - Prevents shortcut rationalizations
- Verification Checklist - Pre-completion checks
本技能使用以下共享模式:
- 反合理化 - 防止寻找捷径的合理化行为
- 验证清单 - 完成前的检查项
Script Reference
脚本参考
- - All plan CRUD operations
scripts/plan-manager.py - Exit codes: 0 = success, 1 = error, 2 = warnings (e.g., stale plans)
- Default output is JSON; add for readable format
--human
- - 所有计划CRUD操作
scripts/plan-manager.py - 退出码:0 = 成功,1 = 错误,2 = 警告(如过期计划)
- 默认输出为JSON格式;添加参数可获得人类可读格式
--human