implement_plan by parcadei/continuous-claude-v3
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill implement_plan你需要实施来自 thoughts/shared/plans/ 的已批准技术计划。这些计划包含具有具体变更和成功标准的阶段。
你有两种执行模式:
适用于小型计划(3 个或更少任务)或用户要求直接实施时。
适用于包含 4 个或更多任务的计划,或当上下文保存至关重要时。
要使用智能体编排模式,请说:"我将为此计划使用智能体编排",并遵循下面的智能体编排部分。
当获得计划路径时:
在开始实施之前,运行一次深入的预分析:
/premortem deep <plan-path>
这将根据全面的检查清单分析计划:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
如果识别出 HIGH 严重性风险:
跳过预分析的情况:
--skip-premortem)预分析通过后,如果你理解需要做什么,就开始实施。
如果未提供计划路径,请询问。
计划是精心设计的,但现实可能很混乱。你的工作是:
当情况与计划不完全匹配时,思考原因并清晰地沟通。计划是你的指南,但你的判断也很重要。
如果遇到不匹配的情况:
停止并深入思考为什么不能遵循计划
清晰地呈现问题:
阶段 [N] 中的问题:
预期:[计划所述内容]
发现:[实际情况]
为何重要:[解释]
我应该如何进行?
实施一个阶段后:
运行成功标准检查(通常 make check test 涵盖所有内容)
在继续之前修复任何问题
在计划和你的待办事项中更新你的进度
使用 Edit 在计划文件本身中勾选已完成的项目
暂停进行人工验证:完成一个阶段的所有自动化验证后,暂停并告知人类该阶段已准备好进行手动测试。使用以下格式:
阶段 [N] 完成 - 准备进行手动验证
自动化验证通过:
- [列出通过的自动化检查]
请执行计划中列出的手动验证步骤:
- [列出计划中的手动验证项目]
请告诉我手动测试何时完成,以便我可以继续到阶段 [N+1]。
如果指示连续执行多个阶段,则在最后一个阶段之前跳过暂停。否则,假设你只执行一个阶段。
在用户确认之前,不要勾选手动测试步骤中的项目。
当某些事情没有按预期工作时:
谨慎使用子任务 - 主要用于针对性调试或探索不熟悉的领域。
如果计划是由 plan-agent 创建的,你可能能够恢复它以进行澄清:
检查 .claude/cache/agents/agent-log.jsonl 中的 plan-agent 条目
查找 agentId 字段
要澄清或更新计划:
Task(
resume="<agentId>",
prompt="Phase 2 isn't matching the codebase. Can you clarify..."
)
恢复的智能体保留其完整的先前上下文(研究、代码库分析)。
可恢复的智能体:
plan-agent - 创建了实施计划oracle - 研究了最佳实践debug-agent - 调查了问题如果计划已有勾选标记:
记住:你是在实施一个解决方案,而不仅仅是勾选复选框。牢记最终目标并保持前进的动力。
当实施大型计划(4 个或更多任务)时,使用智能体编排以保持抗压缩性。
问题: 在长时间的实施过程中,上下文会累积。如果自动压缩在任务中途触发,你会丢失实施上下文。在 80% 上下文时创建的交接文件会变得过时。
解决方案: 将实施委托给智能体。每个智能体:
交接文件持久保存在磁盘上。如果发生压缩,你重新读取交接文件并继续。
创建交接目录:
mkdir -p thoughts/handoffs/<session-name>
使用你的连续性分类账中的会话名称。
阅读实施智能体技能:
cat .claude/skills/implement_task/SKILL.md
这定义了智能体应如何行为。
在实施之前,确保计划已使用 validate-agent 进行验证。验证步骤是独立的,应该已经创建了一个状态为 VALIDATED 的交接文件。
检查验证交接文件:
ls thoughts/handoffs/<session>/validation-*.md
如果不存在验证,建议先运行验证:
"此计划尚未验证。您希望我先启动 validate-agent 吗?"
如果验证存在但状态为 NEEDS REVIEW,请在继续之前呈现问题。
对于计划中的每个任务:
准备智能体上下文:
启动实施智能体:
Task(
subagent_type="general-purpose",
model="claude-opus-4-5-20251101",
prompt="""
[在此处粘贴 .claude/skills/implement_task/SKILL.md 的内容]
---
## 你的上下文
### 连续性分类账:
[粘贴分类账内容]
### 计划:
[粘贴相关计划部分或完整计划]
### 你的任务:
任务 [N] / [总计]:[计划中的任务描述]
### 先前交接文件:
[粘贴先前任务的交接文件内容,或"这是第一个任务 - 无先前交接文件"]
### 交接目录:
thoughts/handoffs/<session-name>/
### 交接文件名:
task-[NN]-[简短描述].md
---
实施你的任务并创建你的交接文件。
"""
)
处理智能体结果:
[x] 任务 N当智能体失败/受阻时:
如果自动压缩在编排过程中发生:
阅读连续性分类账(由 SessionStart 钩子加载)
列出交接目录:
ls -la thoughts/handoffs/<session-name>/
阅读最后一个交接文件以了解你在哪里
从下一个未完成的任务继续启动智能体
User: /implement_plan thoughts/shared/plans/PLAN-add-auth.md
Claude: 我将为此计划使用智能体编排(6 个任务)。
正在设置交接目录...
[创建 thoughts/handoffs/add-auth/]
任务 1 / 6:创建用户模型
[启动具有完整上下文的智能体]
[智能体完成,创建 task-01-user-model.md]
✅ 任务 1 完成。交接文件:thoughts/handoffs/add-auth/task-01-user-model.md
任务 2 / 6:添加身份验证中间件
[启动具有先前交接文件的智能体]
[智能体完成,创建 task-02-auth-middleware.md]
✅ 任务 2 完成。交接文件:thoughts/handoffs/add-auth/task-02-auth-middleware.md
--- 发生自动压缩 ---
[上下文被压缩,但交接文件保留]
Claude: [阅读分类账,看到任务 1-2 已完成]
[阅读最后一个交接文件 task-02-auth-middleware.md]
从任务 3 / 6 恢复:创建登录端点
[启动智能体]
...
每个智能体读取先前交接文件 → 执行工作 → 创建下一个交接文件:
task-01-user-model.md
↓ (由智能体 2 读取)
task-02-auth-middleware.md
↓ (由智能体 3 读取)
task-03-login-endpoint.md
↓ (由智能体 4 读取)
...
该链即使在压缩过程中也能保留上下文。
| 场景 | 模式 |
|---|---|
| 1-3 个简单任务 | 直接实施 |
| 4 个或更多任务 | 智能体编排 |
| 需要保留关键上下文 | 智能体编排 |
| 快速错误修复 | 直接实施 |
| 主要功能实施 | 智能体编排 |
| 用户明确要求 | 尊重用户偏好 |
每周安装量
198
仓库
GitHub 星标
3.6K
首次出现
2026 年 1 月 22 日
安装于
opencode192
codex190
cursor188
gemini-cli188
github-copilot185
amp183
You are tasked with implementing an approved technical plan from thoughts/shared/plans/. These plans contain phases with specific changes and success criteria.
You have two execution modes:
For small plans (3 or fewer tasks) or when user requests direct implementation.
For plans with 4+ tasks or when context preservation is critical.
To use agent orchestration mode , say: "I'll use agent orchestration for this plan" and follow the Agent Orchestration section below.
When given a plan path:
Before starting implementation, run a deep pre-mortem:
/premortem deep <plan-path>
This analyzes the plan against comprehensive checklists:
If HIGH severity risks are identified:
Skip premortem if:
--skip-premortem)After premortem passes, start implementing if you understand what needs to be done.
If no plan path provided, ask for one.
Plans are carefully designed, but reality can be messy. Your job is to:
When things don't match the plan exactly, think about why and communicate clearly. The plan is your guide, but your judgment matters too.
If you encounter a mismatch:
STOP and think deeply about why the plan can't be followed
Present the issue clearly:
Issue in Phase [N]:
Expected: [what the plan says]
Found: [actual situation]
Why this matters: [explanation]
How should I proceed?
After implementing a phase:
Run the success criteria checks (usually make check test covers everything)
Fix any issues before proceeding
Update your progress in both the plan and your todos
Check off completed items in the plan file itself using Edit
Pause for human verification : After completing all automated verification for a phase, pause and inform the human that the phase is ready for manual testing. Use this format:
Phase [N] Complete - Ready for Manual Verification
Automated verification passed:
- [List automated checks that passed]
Please perform the manual verification steps listed in the plan:
- [List manual verification items from the plan]
Let me know when manual testing is complete so I can proceed to Phase [N+1].
If instructed to execute multiple phases consecutively, skip the pause until the last phase. Otherwise, assume you are just doing one phase.
do not check off items in the manual testing steps until confirmed by the user.
When something isn't working as expected:
Use sub-tasks sparingly - mainly for targeted debugging or exploring unfamiliar territory.
If the plan was created by plan-agent, you may be able to resume it for clarification:
Check .claude/cache/agents/agent-log.jsonl for the plan-agent entry
Look for the agentId field
To clarify or update the plan:
Task(
resume="<agentId>",
prompt="Phase 2 isn't matching the codebase. Can you clarify..."
)
The resumed agent retains its full prior context (research, codebase analysis).
Available agents to resume:
plan-agent - Created the implementation planoracle - Researched best practicesdebug-agent - Investigated issuesIf the plan has existing checkmarks:
Remember: You're implementing a solution, not just checking boxes. Keep the end goal in mind and maintain forward momentum.
When implementing larger plans (4+ tasks), use agent orchestration to stay compaction-resistant.
The Problem: During long implementations, context accumulates. If auto-compact triggers mid-task, you lose implementation context. Handoffs created at 80% context become stale.
The Solution: Delegate implementation to agents. Each agent:
Handoffs persist on disk. If compaction happens, you re-read handoffs and continue.
Create handoff directory:
mkdir -p thoughts/handoffs/<session-name>
Use the session name from your continuity ledger.
Read the implementation agent skill:
cat .claude/skills/implement_task/SKILL.md
This defines how agents should behave.
Before implementing, ensure the plan has been validated using the validate-agent. The validation step is separate and should have created a handoff with status VALIDATED.
Check for validation handoff:
ls thoughts/handoffs/<session>/validation-*.md
If no validation exists, suggest running validation first:
"This plan hasn't been validated yet. Would you like me to spawn validate-agent first?"
If validation exists but status is NEEDS REVIEW, present the issues before proceeding.
For each task in the plan:
Prepare agent context:
Spawn implementation agent:
Task(
subagent_type="general-purpose",
model="claude-opus-4-5-20251101",
prompt="""
[Paste contents of .claude/skills/implement_task/SKILL.md here]
---
## Your Context
### Continuity Ledger:
[Paste ledger content]
### Plan:
[Paste relevant plan section or full plan]
### Your Task:
Task [N] of [Total]: [Task description from plan]
### Previous Handoff:
[Paste previous task's handoff content, or "This is the first task - no previous handoff"]
### Handoff Directory:
thoughts/handoffs/<session-name>/
### Handoff Filename:
task-[NN]-[short-description].md
---
Implement your task and create your handoff.
"""
)
Process agent result:
[x] Task NIf auto-compact happens mid-orchestration:
Read continuity ledger (loaded by SessionStart hook)
List handoff directory:
ls -la thoughts/handoffs/<session-name>/
Read the last handoff to understand where you were
Continue spawning agents from next uncompleted task
User: /implement_plan thoughts/shared/plans/PLAN-add-auth.md
Claude: I'll use agent orchestration for this plan (6 tasks).
Setting up handoff directory...
[Creates thoughts/handoffs/add-auth/]
Task 1 of 6: Create user model
[Spawns agent with full context]
[Agent completes, creates task-01-user-model.md]
✅ Task 1 complete. Handoff: thoughts/handoffs/add-auth/task-01-user-model.md
Task 2 of 6: Add authentication middleware
[Spawns agent with previous handoff]
[Agent completes, creates task-02-auth-middleware.md]
✅ Task 2 complete. Handoff: thoughts/handoffs/add-auth/task-02-auth-middleware.md
--- AUTO COMPACT HAPPENS ---
[Context compressed, but handoffs persist]
Claude: [Reads ledger, sees tasks 1-2 done]
[Reads last handoff task-02-auth-middleware.md]
Resuming from Task 3 of 6: Create login endpoint
[Spawns agent]
...
Each agent reads previous handoff → does work → creates next handoff:
task-01-user-model.md
↓ (read by agent 2)
task-02-auth-middleware.md
↓ (read by agent 3)
task-03-login-endpoint.md
↓ (read by agent 4)
...
The chain preserves context even across compactions.
| Scenario | Mode |
|---|---|
| 1-3 simple tasks | Direct implementation |
| 4+ tasks | Agent orchestration |
| Critical context to preserve | Agent orchestration |
| Quick bug fix | Direct implementation |
| Major feature implementation | Agent orchestration |
| User explicitly requests | Respect user preference |
Weekly Installs
198
Repository
GitHub Stars
3.6K
First Seen
Jan 22, 2026
Installed on
opencode192
codex190
cursor188
gemini-cli188
github-copilot185
amp183
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
62,200 周安装
Next.js App Router 基础教程:从 Pages Router 迁移到现代路由架构
1,900 周安装
AI代码审查专家 | 自动检测安全漏洞、性能问题与代码质量
1,900 周安装
数据分析师技能:精通SQL、Python pandas和统计分析的AI助手
2,000 周安装
文本优化器:基于41条规则减少提示词和文档令牌数量20-40%,降低LLM API成本
1,900 周安装
characteristic-voice:为AI助手注入真实情感与个性语音,打造会叹息会笑的伙伴
2,100 周安装
FastAPI 生产级模板:Pydantic v2 + SQLAlchemy 2.0 异步 + JWT 认证实战
2,000 周安装
On agent failure/blocker: