home / skills / duc01226 / easyplatform / recover
This skill helps you restore workflow context and todo items from the latest checkpoint after session loss, enabling seamless resumption.
npx playbooks add skill duc01226/easyplatform --skill recoverReview the files below or copy the command above to add this skill to your agents.
---
name: recover
description: "[Tooling & Meta] Restore workflow context from checkpoint after session loss"
infer: true
---
# 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 -5
```
Or search for all recent checkpoints:
```bash
find plans -name "memory-checkpoint-*.md" -mmin -60 | head -5
```
### Step 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.md
```
### Step 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 `activePlan` is set in the metadata, read the plan file.
### Step 6: Continue Workflow
Resume from the `currentStep` identified in the metadata. Execute the remaining workflow steps in order.
## Recovery 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 | `session-resume.cjs` hook |
| New session in same directory | Manual | This `/recover` command |
| Explicit user request | Manual | This `/recover` command |
| No workflow state found | Manual | This `/recover` command |
## Related Commands
- `/checkpoint` - Create a manual checkpoint (before expected loss)
- `/compact` - Manually trigger context compaction
- `/context` - Load project context
- `/watzup` - Generate progress summary
---
**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
This skill restores workflow state and todo items from checkpoint files after context compaction or a lost session. It helps recover the active plan, current workflow step, and pending todos so you can resume work with minimal manual reconstruction. Use it when automatic recovery did not occur or you started a new session in the same project directory.
The skill locates the latest memory checkpoint files in the plans/reports directory and reads the most recent checkpoint markdown. It extracts the JSON recovery metadata block (sessionId, activePlan, workflowType, currentStep, remainingSteps, pendingTodos). It immediately reinstates pending todos via TodoWrite, optionally loads the active plan file, and then resumes the workflow from the recorded currentStep, executing remaining steps in order.
What files does recovery inspect?
It searches for files named memory-checkpoint-*.md in plans/reports and picks the most recent checkpoint to read its embedded JSON metadata.
What if the checkpoint lacks an activePlan entry?
You still restore pending todos and resume from currentStep. If activePlan is absent, manually load project context or recreate the plan as needed.
How are todos restored safely?
The process immediately calls TodoWrite with the pendingTodos block from the checkpoint to re-create tasks in the task store before executing further workflow steps.