recover
Original:🇺🇸 English
Translated
[Tooling & Meta] Restore workflow context from checkpoint after session loss
5installs
Sourceduc01226/easyplatform
Added on
NPX Install
npx skill4agent add duc01226/easyplatform recoverTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Recover Workflow Context
Restore workflow state and todo items from checkpoint files after context compaction or session loss.
Usage
Use this command when:
- Context was compacted and you've lost track of the workflow
- Session was interrupted and needs to resume
- Todo items need to be restored from a checkpoint
- The automatic recovery didn't trigger
Recovery Process
Step 1: Find Latest Checkpoint
Look for checkpoint files in the reports directory:
bash
ls -la plans/reports/memory-checkpoint-*.md | tail -5Or search for all recent checkpoints:
bash
find plans -name "memory-checkpoint-*.md" -mmin -60 | head -5Step 2: Read Checkpoint File
Read the most recent checkpoint to understand the saved state:
Read the checkpoint file at: plans/reports/memory-checkpoint-YYMMDD-HHMMSS.mdStep 3: Extract Recovery Metadata
The checkpoint file contains a JSON metadata block at the end:
json
{
"sessionId": "...",
"activePlan": "plans/YYMMDD-slug/",
"workflowType": "feature",
"currentStep": "cook",
"remainingSteps": ["test", "code-review"],
"pendingTodos": [...]
}Step 4: Restore Todo Items
IMMEDIATELY call TodoWrite with the pending todos from the checkpoint.
Step 5: Read Active Plan (if exists)
If is set in the metadata, read the plan file.
activePlanStep 6: Continue Workflow
Resume from the identified in the metadata. Execute the remaining workflow steps in order.
currentStepRecovery Checklist
- Located most recent checkpoint file
- Read checkpoint content
- Extracted recovery metadata JSON
- Restored todo items via TodoWrite
- Read active plan (if applicable)
- Identified current workflow step
- Ready to continue from interrupted step
Automatic vs Manual Recovery
| Scenario | Recovery Type | Trigger |
|---|---|---|
| Session resume after compact | Automatic | |
| New session in same directory | Manual | This |
| Explicit user request | Manual | This |
| No workflow state found | Manual | This |
Related Commands
- - Create a manual checkpoint (before expected loss)
/checkpoint - - Manually trigger context compaction
/compact - - Load project context
/context - - Generate progress summary
/watzup
IMPORTANT Task Planning Notes (MUST FOLLOW)
- Always plan and break work into many small todo tasks
- Always add a final review todo task to verify work quality and identify fixes/enhancements