Loading...
Loading...
Compare original and translation side by side
⚠️ CONTEXT WARNING: This workflow is token-intensive. Consider compacting first.
═══════════════════════════════════════════════════════════════
DEEP-PLAN: AI-Assisted Implementation Planning
═══════════════════════════════════════════════════════════════
Research → Interview → External LLM Review → TDD Plan
DEEP-PLAN starts by running `validate-env.sh`. This script:
- Checks env for external LLM auth values
- Validates external LLM access by running tiny prompt(s) programmatically
SECURITY:
- `validate-env.sh` reads secret auth values in order to validate LLM access
- It never publishes these values or exposes them to claude
Note: DEEP-PLAN will write many .md files to the planning directory you pass itDEEP_PLUGIN_ROOT=<path>DEEP_SESSION_IDplugin_rootDEEP_PLUGIN_ROOTbash <DEEP_PLUGIN_ROOT value>/scripts/checks/validate-env.shDEEP_PLUGIN_ROOTfind "$(pwd)" -name "validate-env.sh" -path "*/scripts/checks/*" -type f 2>/dev/null | head -1find ~ -name "validate-env.sh" -path "*/scripts/checks/*" -path "*deep*plan*" -type f 2>/dev/null | head -1bash <found_path>{
"valid": true,
"errors": [],
"warnings": [],
"gemini_auth": "api_key",
"openai_auth": true,
"plugin_root": "/path/to/plugin"
}plugin_root⚠️ 上下文警告:此工作流会消耗大量token。请先考虑精简内容。
═══════════════════════════════════════════════════════════════
DEEP-PLAN:AI辅助实施规划
═══════════════════════════════════════════════════════════════
调研 → 访谈 → 外部LLM评审 → TDD计划
DEEP-PLAN 会先运行 `validate-env.sh` 脚本。该脚本:
- 检查环境中的外部LLM认证信息
- 通过程序化运行小型prompt来验证外部LLM的访问权限
安全说明:
- `validate-env.sh` 会读取保密的认证信息以验证LLM访问权限
- 它绝不会发布这些信息或将其暴露给Claude
注意:DEEP-PLAN会在你指定的规划目录中创建多个.md文件DEEP_PLUGIN_ROOT=<路径>DEEP_SESSION_IDplugin_rootDEEP_PLUGIN_ROOTbash <DEEP_PLUGIN_ROOT value>/scripts/checks/validate-env.shDEEP_PLUGIN_ROOTfind "$(pwd)" -name "validate-env.sh" -path "*/scripts/checks/*" -type f 2>/dev/null | head -1find ~ -name "validate-env.sh" -path "*/scripts/checks/*" -path "*deep*plan*" -type f 2>/dev/null | head -1bash <找到的路径>{
"valid": true,
"errors": [],
"warnings": [],
"gemini_auth": "api_key",
"openai_auth": true,
"plugin_root": "/path/to/plugin"
}plugin_rootvalid == falseAskUserQuestion:
question: "No external LLMs configured. How should plan review be handled?"
options:
- label: "Use Claude Opus for review (Recommended)"
description: "Launch an Opus subagent to review the plan"
- label: "Exit to configure LLMs"
description: "Stop to set up Gemini/OpenAI credentials"
- label: "Skip external review"
description: "Proceed without any external plan review"review_modereview_mode = "opus_subagent"review_mode = "skip"review_mode = "external_llm"Environment validated:
Gemini: {gemini_auth or "not configured"}
OpenAI: {openai_auth ? "configured" : "not configured"}
Review mode: {review_mode}valid == falseAskUserQuestion:
question: "未配置外部LLM。应如何处理计划评审?"
options:
- label: "使用Claude Opus进行评审(推荐)"
description: "启动Opus子代理来评审计划"
- label: "退出以配置LLMs"
description: "停止操作以设置Gemini/OpenAI凭证"
- label: "跳过外部评审"
description: "不进行任何外部计划评审,直接继续"review_modereview_mode = "opus_subagent"review_mode = "skip"review_mode = "external_llm"环境验证结果:
Gemini: {gemini_auth或"未配置"}
OpenAI: {openai_auth ? "已配置" : "未配置"}
评审模式: {review_mode}.md.md═══════════════════════════════════════════════════════════════
DEEP-PLAN: Spec File Required
═══════════════════════════════════════════════════════════════
This skill requires a markdown spec file path (must end with .md).
The planning directory is inferred from the spec file's parent directory.
To start a NEW plan:
1. Create a markdown spec file describing what you want to build
2. It can be as detailed or as vague as you like
3. Place it in a directory where deep-plan can save planning files
4. Run: /deep-plan @path/to/your-spec.md
To RESUME an existing plan:
1. Run: /deep-plan @path/to/your-spec.md
Example: /deep-plan @planning/my-feature-spec.md
══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
DEEP-PLAN:需要规格文件
═══════════════════════════════════════════════════════════════
此技能需要一个markdown规格文件路径(必须以.md结尾)。
规划目录会从规格文件的父目录推断得出。
要启动新规划:
1. 创建一个markdown规格文件,描述你想要构建的内容
2. 文件内容可详细可简略
3. 将其放在deep-plan可以保存规划文件的目录中
4. 运行:/deep-plan @path/to/your-spec.md
要恢复现有规划:
1. 运行:/deep-plan @path/to/your-spec.md
示例:/deep-plan @planning/my-feature-spec.md
═══════════════════════════════════════════════════════════════DEEP_SESSION_ID=xxxuv run {plugin_root}/scripts/checks/setup-planning-session.py \
--file "<file_path>" \
--plugin-root "{plugin_root}" \
--review-mode "{review_mode}" \
--session-id "{DEEP_SESSION_ID}"DEEP_SESSION_ID--session-id/clear--session-idreview_modeexternal_llmdeep_plan_config.jsonplugin_rootplanning_dirinitial_file~/.claude/tasks/<task_list_id>/sections/index.mdsuccess == false═══════════════════════════════════════════════════════════════
DEEP-PLAN: Setup Failed
═══════════════════════════════════════════════════════════════
Error: {error}
Please fix the issue and re-run: /deep-plan @path/to/your-spec.md
═══════════════════════════════════════════════════════════════conflictCLAUDE_CODE_TASK_LIST_IDAskUserQuestion--forceunset CLAUDE_CODE_TASK_LIST_ID--forcemode == "no_task_list"AskUserQuestionQuestion: "Cannot proceed: No task list ID available. The SessionStart hook may not have run. How would you like to proceed?"
Options:
- "Start a fresh session" (Recommended) - Exit Claude and start a new session
- "Show troubleshooting steps" - Display the error_details.troubleshooting stepsPlease exit this Claude session and start a new one. The SessionStart hook
will capture the session ID on startup.
Command: claude --plugin-dir <plugin_path>error_details.troubleshootingTaskListtasks_writtenplugin_root=...=planning_dir=...=initial_file=...=review_mode=...=Planning directory: {planning_dir}
Mode: {mode}mode == "resume"Resuming from step {resume_from_step}
To start fresh, delete the planning directory files.DEEP_SESSION_ID=xxxuv run {plugin_root}/scripts/checks/setup-planning-session.py \
--file "<file_path>" \
--plugin-root "{plugin_root}" \
--review-mode "{review_mode}" \
--session-id "{DEEP_SESSION_ID}"DEEP_SESSION_ID--session-id/clear--session-idreview_modeexternal_llmdeep_plan_config.jsonplugin_rootplanning_dirinitial_file~/.claude/tasks/<task_list_id>/sections/index.mdsuccess == false═══════════════════════════════════════════════════════════════
DEEP-PLAN:设置失败
═══════════════════════════════════════════════════════════════
错误:{error}
请修复问题后重新运行:/deep-plan @path/to/your-spec.md
═══════════════════════════════════════════════════════════════conflictCLAUDE_CODE_TASK_LIST_IDAskUserQuestion--forceunset CLAUDE_CODE_TASK_LIST_ID--forcemode == "no_task_list"AskUserQuestion问题:"无法继续:无可用任务列表ID。SessionStart钩子可能未运行。你希望如何处理?"
选项:
- "启动新会话"(推荐) - 退出Claude并启动新会话
- "显示故障排除步骤" - 显示error_details.troubleshooting中的步骤请退出当前Claude会话并启动新会话。SessionStart钩子会在启动时捕获会话ID。
命令:claude --plugin-dir <plugin_path>error_details.troubleshootingTaskListtasks_writtenplugin_root=...=planning_dir=...=initial_file=...=review_mode=...=规划目录: {planning_dir}
模式: {mode}mode == "resume"从步骤{resume_from_step}恢复
要重新开始,请删除规划目录中的文件。{plugin_root}{plugin_root}{plugin_root}/skills/deep-plan/references/research-protocol.mdinitial_file={plugin_root}/skills/deep-plan/references/research-protocol.mdinitial_file={plugin_root}/skills/deep-plan/references/research-protocol.mdTask(subagent_type=Explore)Task(subagent_type=web-search-researcher)<planning_dir>/claude-research.md{plugin_root}/skills/deep-plan/references/research-protocol.mdTask(subagent_type=Explore)Task(subagent_type=web-search-researcher)<planning_dir>/claude-research.md{plugin_root}/skills/deep-plan/references/interview-protocol.mdinitial_file{plugin_root}/skills/deep-plan/references/interview-protocol.mdinitial_file<planning_dir>/claude-interview.md<planning_dir>/claude-interview.md<planning_dir>/claude-spec.mdinitial_file=...<planning_dir>/claude-spec.mdinitial_file=...{plugin_root}/skills/deep-plan/references/plan-writing.md<planning_dir>/claude-plan.md{plugin_root}/skills/deep-plan/references/plan-writing.md<planning_dir>/claude-plan.mduv run {plugin_root}/scripts/checks/check-context-decision.py \
--planning-dir "<planning_dir>" \
--upcoming-operation "External LLM Review"{plugin_root}/skills/deep-plan/references/context-check.mduv run {plugin_root}/scripts/checks/check-context-decision.py \
--planning-dir "<planning_dir>" \
--upcoming-operation "External LLM Review"{plugin_root}/skills/deep-plan/references/context-check.md{plugin_root}/skills/deep-plan/references/external-review.mdreview_modereview_mode=...external_llmopus_subagentskip{plugin_root}/skills/deep-plan/references/external-review.mdreview_mode=...review_modeexternal_llmopus_subagentskip<planning_dir>/reviews/<planning_dir>/claude-integration-notes.md<planning_dir>/claude-plan.md<planning_dir>/reviews/<planning_dir>/claude-integration-notes.md<planning_dir>/claude-plan.mdThe plan has been updated with external feedback. You can now review and edit claude-plan.md.
If you want Claude's help editing the plan, open a separate Claude session - this session
is mid-workflow and can't assist with edits until the workflow completes.
When you're done reviewing, select "Done" to continue.计划已结合外部反馈完成更新。你现在可以评审并编辑claude-plan.md。
如果你需要Claude帮助编辑计划,请打开一个独立的Claude会话 - 当前会话处于工作流中途,在工作流完成前无法提供编辑协助。
评审完成后,选择“完成”继续。{plugin_root}/skills/deep-plan/references/tdd-approach.mdclaude-research.mdclaude-plan-tdd.md{plugin_root}/skills/deep-plan/references/tdd-approach.mdclaude-research.mdclaude-plan-tdd.mduv run {plugin_root}/scripts/checks/check-context-decision.py \
--planning-dir "<planning_dir>" \
--upcoming-operation "Section splitting"{plugin_root}/skills/deep-plan/references/context-check.mduv run {plugin_root}/scripts/checks/check-context-decision.py \
--planning-dir "<planning_dir>" \
--upcoming-operation "Section splitting"{plugin_root}/skills/deep-plan/references/context-check.md{plugin_root}/skills/deep-plan/references/section-index.mdclaude-plan.mdclaude-plan-tdd.md<planning_dir>/sections/index.mdindex.md{plugin_root}/skills/deep-plan/references/section-index.mdclaude-plan.mdclaude-plan-tdd.md<planning_dir>/sections/index.mduv run {plugin_root}/scripts/checks/generate-section-tasks.py \
--planning-dir "<planning_dir>" \
--session-id "{DEEP_SESSION_ID}"DEEP_SESSION_ID--session-id/clear--session-idsuccess == falseerrorstate == "complete"TaskListtasks_written19 + section_task_count19 + section_task_count + 1uv run {plugin_root}/scripts/checks/generate-section-tasks.py \
--planning-dir "<planning_dir>" \
--session-id "{DEEP_SESSION_ID}"DEEP_SESSION_ID--session-id/clear--session-idsuccess == falseerrorstate == "complete"TaskListtasks_written19 + section_task_count19 + section_task_count + 1{plugin_root}/skills/deep-plan/references/section-splitting.mdgenerate-batch-tasks.py --batch-num Nprompt_filessubagent_type="section-writer"prompt="Read {prompt_file} and execute the instructions."ls {planning_dir}/sections/section-*.md | wc -l{plugin_root}/skills/deep-plan/references/section-splitting.mdgenerate-batch-tasks.py --batch-num Nprompt_filessubagent_type="section-writer"prompt="Read {prompt_file} and execute the instructions."ls {planning_dir}/sections/section-*.md | wc -lcheck-sections.pycheck-sections.py{plugin_root}/skills/deep-plan/references/plugin_rootplugin_root=...claude-plan-tdd.mdsections/index.mdresearch-protocol.mdinterview-protocol.mdplan-writing.mdexternal-review.mdtdd-approach.mdsection-index.mdsection-splitting.md{plugin_root}/skills/deep-plan/references/plugin_root=...plugin_rootclaude-plan-tdd.mdsections/index.mdresearch-protocol.mdinterview-protocol.mdplan-writing.mdexternal-review.mdtdd-approach.mdsection-index.mdsection-splitting.md