webnovel-resume
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTask Resume Skill
Task Resume Skill
Project Root Guard(必须先确认)
Project Root Guard (Must Confirm First)
- 必须在项目根目录执行(需存在 )
.webnovel/state.json - 若当前目录不存在该文件,先询问用户项目路径并 进入
cd - 进入后设置变量:
$PROJECT_ROOT = (Resolve-Path ".").Path
- Must be executed in the project root directory (must exist)
.webnovel/state.json - If the file does not exist in the current directory, first ask the user for the project path and into it
cd - After entering, set the variable:
$PROJECT_ROOT = (Resolve-Path ".").Path
Workflow Checklist
Workflow Checklist
Copy and track progress:
任务恢复进度:
- [ ] Step 1: 加载恢复协议 (cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-resume/references/workflow-resume.md")
- [ ] Step 2: 加载数据规范 (cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-resume/references/system-data-flow.md")
- [ ] Step 3: 确认上下文充足
- [ ] Step 4: 检测中断状态
- [ ] Step 5: 展示恢复选项 (AskUserQuestion)
- [ ] Step 6: 执行恢复
- [ ] Step 7: 继续任务 (可选)Copy and track progress:
Task Recovery Progress:
- [ ] Step 1: Load Recovery Protocol (cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-resume/references/workflow-resume.md")
- [ ] Step 2: Load Data Specification (cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-resume/references/system-data-flow.md")
- [ ] Step 3: Confirm Sufficient Context
- [ ] Step 4: Detect Interruption State
- [ ] Step 5: Display Recovery Options (AskUserQuestion)
- [ ] Step 6: Execute Recovery
- [ ] Step 7: Continue Task (Optional)Reference Loading Levels (strict, lazy)
Reference Loading Levels (strict, lazy)
- L0: 不加载任何参考,直到确认存在中断恢复需求。
- L1: 只加载恢复协议主文件。
- L2: 仅在数据一致性检查时加载数据规范。
- L0: Do not load any references until interruption recovery needs are confirmed.
- L1: Only load the main recovery protocol file.
- L2: Load data specifications only during data consistency checks.
L1 (minimum)
L1 (minimum)
references/workflow-resume.md
references/workflow-resume.md
L2 (conditional)
L2 (conditional)
- (仅在需要核对状态字段/恢复策略时)
references/system-data-flow.md
- (Only when verifying state fields/recovery strategies is required)
references/system-data-flow.md
Step 1: 加载恢复协议(必须执行)
Step 1: Load Recovery Protocol (Mandatory Execution)
bash
cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-resume/references/workflow-resume.md"核心原则(读取后应用):
- 禁止智能续写: 上下文丢失风险高
- 必须检测后恢复: 不猜测中断点
- 必须用户确认: 不自动恢复
bash
cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-resume/references/workflow-resume.md"Core Principles (Apply after reading):
- Prohibit Intelligent Continuation: High risk of context loss
- Recover Only After Detection: Do not guess the interruption point
- Must Confirm with User: Do not recover automatically
Step 2: 加载数据规范
Step 2: Load Data Specification
bash
cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-resume/references/system-data-flow.md"bash
cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-resume/references/system-data-flow.md"Step 3: 确认上下文充足
Step 3: Confirm Sufficient Context
检查清单:
- 恢复协议已理解
- Step 难度分级已知
- 状态结构已理解
- "删除重来" vs "智能续写" 原则已明确
如有缺失 → 返回对应 Step
Checklist:
- Recovery protocol is understood
- Step difficulty levels are known
- State structure is understood
- Principles of "Restart from Scratch" vs "Intelligent Continuation" are clear
If any items are missing → Return to the corresponding Step
Step 难度分级(来自 workflow-resume.md)
Step Difficulty Levels (from workflow-resume.md)
| Step | 难度 | 恢复策略 |
|---|---|---|
| Step 1 | ⭐ | 直接重新执行 |
| Step 1.5 | ⭐ | 重新设计 |
| Step 2A | ⭐⭐ | 删除半成品,重新开始 |
| Step 2B | ⭐⭐ | 继续适配或回到 2A |
| Step 3 | ⭐⭐⭐ | 用户决定:重审或跳过 |
| Step 4 | ⭐⭐ | 继续润色或删除重写 |
| Step 5 | ⭐⭐ | 重新运行(幂等) |
| Step 6 | ⭐⭐⭐ | 检查暂存区,决定提交/回滚 |
| Step | Difficulty | Recovery Strategy |
|---|---|---|
| Step 1 | ⭐ | Re-execute directly |
| Step 1.5 | ⭐ | Redesign |
| Step 2A | ⭐⭐ | Delete semi-finished products and restart |
| Step 2B | ⭐⭐ | Continue adaptation or return to 2A |
| Step 3 | ⭐⭐⭐ | User's decision: Review or skip |
| Step 4 | ⭐⭐ | Continue polishing or delete and rewrite |
| Step 5 | ⭐⭐ | Re-run (idempotent) |
| Step 6 | ⭐⭐⭐ | Check staging area and decide to commit/rollback |
Step 4: 检测中断状态
Step 4: Detect Interruption State
bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" detect输出情况:
- 无中断 → 结束流程,通知用户
- 检测到中断 → 继续 Step 5
bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" detectOutput Scenarios:
- No interruption → End the process and notify the user
- Interruption detected → Proceed to Step 5
Step 5: 展示恢复选项(必须执行)
Step 5: Display Recovery Options (Mandatory Execution)
展示给用户:
- 任务命令和参数
- 中断时间和已过时长
- 已完成步骤
- 当前(中断)步骤
- 剩余步骤
- 恢复选项及风险等级
示例输出:
🔴 检测到中断任务:
任务:/webnovel-write 7
中断位置:Step 2 - 章节内容生成中
已完成:
✅ Step 1: 上下文加载
未完成:
⏸️ Step 2: 章节内容(已写1500字)
⏹️ Step 3-7: 未开始
恢复选项:
A) 删除半成品,从Step 1重新开始(推荐)
B) 回滚到Ch6,放弃Ch7所有进度
请选择(A/B):Display to User:
- Task command and parameters
- Interruption time and elapsed duration
- Completed steps
- Current (interrupted) step
- Remaining steps
- Recovery options and risk levels
Sample Output:
🔴 Interrupted Task Detected:
Task: /webnovel-write 7
Interruption Location: Step 2 - In the middle of chapter content generation
Completed:
✅ Step 1: Context Loading
Incomplete:
⏸️ Step 2: Chapter Content (1500 words written)
⏹️ Step 3-7: Not started
Recovery Options:
A) Delete semi-finished products and restart from Step 1 (Recommended)
B) Roll back to Ch6 and discard all progress of Ch7
Please select (A/B):Step 6: 执行恢复
Step 6: Execute Recovery
选项 A - 删除重来(推荐):
bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" cleanup --chapter {N} --confirm
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" clear选项 B - Git 回滚:
bash
git -C "$PROJECT_ROOT" reset --hard ch{N-1:04d}
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" clearOption A - Restart from Scratch (Recommended):
bash
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" cleanup --chapter {N} --confirm
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" clearOption B - Git Rollback:
bash
git -C "$PROJECT_ROOT" reset --hard ch{N-1:04d}
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" clearStep 7: 继续任务(可选)
Step 7: Continue Task (Optional)
如用户选择立即继续:
bash
/{original_command} {original_args}If the user chooses to continue immediately:
bash
/{original_command} {original_args}特殊场景
Special Scenarios
Step 6 中断(成本高)
Step 6 Interruption (High Cost)
恢复选项:
A) 重新执行双章审查(成本:~$0.15)⚠️
B) 跳过审查,继续下一章(可后续补审)Recovery Options:
A) Re-execute dual-chapter review (Cost: ~$0.15) ⚠️
B) Skip review and proceed to the next chapter (Can be reviewed later)Step 4 中断(部分状态)
Step 4 Interruption (Partial State)
⚠️ state.json 可能部分更新
A) 检查并修复 state.json
B) 回滚到上一章(安全)⚠️ state.json may be partially updated
A) Check and repair state.json
B) Roll back to the previous chapter (Safe)长时间中断(>1小时)
Long Interruption (>1 Hour)
⚠️ 中断已超过1小时
上下文丢失风险高
建议重新开始而非续写⚠️ Interruption has lasted over 1 hour
High risk of context loss
It is recommended to restart instead of continuing the unfinished content禁止事项
Prohibited Actions
- ❌ 智能续写半成品内容
- ❌ 自动选择恢复策略
- ❌ 跳过中断检测
- ❌ 不验证就修复 state.json
- ❌ Intelligently continue semi-finished content
- ❌ Automatically select recovery strategies
- ❌ Skip interruption detection
- ❌ Repair state.json without verification