crash-proof-planning
Skill1 starsChanged 5 months agoMITView on GitHub
Ensure plans survive context resets, agent handoffs, and session interruptions by using a persistent plan format with YAML frontmatter, explicit checkpoint markers, and a structured recovery workflow that restores context from the plan file alone. Use whenever work spans multiple sessions, involves multiple agents, or carries enough risk that losing planning context would cause significant rework. Use proactively before starting a multi-file or multi-day feature, and reactively when resuming work after a context reset. Every crash-proof plan has three sections:
In this repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- advanced-orchestrationSkill
- architect-agentSkill
- implementer-agentSkill
- quality-councilSkill
- reviewer-agentSkill
- tester-agentSkill
- writer-critic-pairSkill
- authoring-skillsSkill
- api-endpoint-qualitySkill
- async-job-qualitySkill
- auth-qualitySkill
- db-migration-qualitySkill
- frontend-state-qualitySkill
- acceptance-criteriaSkill
- adaptive-flowSkill
- adaptive-prompt-selectionSkill
- adversarial-code-reviewSkill
- architecture-decision-recordsSkill
- brainstormingSkill
- brownfield-spec-enhancementSkill
- bug-fix-lifecycleSkill
- checkpoint-validationSkill
- cicd-integrationSkill
- clarify-before-codeSkill
- claude-code-hooks-packSkill
- code-context-packSkill
- code-intelligence-reviewSkill
- context-policySkill
- context-rich-implementationSkill
- critique-pass-protocolSkill
- dependency-aware-task-orderingSkill
- deprecation-migrationSkill
- disciplined-diagnosisSkill
- docs-authorSkill
- executing-plansSkill
- external-skillSkill
- finishing-a-development-branchSkill
- git-guardrailsSkill
- goal-driven-executionSkill
- grill-user-before-buildingSkill
- guard-bypass-protocolSkill
- improve-codebase-architectureSkill
- incremental-reviewSkill
- issue-slicingSkill
- lessons-learned-dbSkill
- loop-engineeringSkill
- model-aware-configSkill
- model-weakness-memorySkill
- multi-repo-learningSkill
- orchestration-workflowsSkill
- plan-driven-executionSkill
- plan-from-specSkill
- prd-from-contextSkill
- project-constitutionSkill
- prompt-architectureSkill
- prototype-before-commitmentSkill
- quality-engineSkill
- quality-execution-contractSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Ensure plans survive context resets, agent handoffs, and session interruptions by using a persistent plan format with YAML frontmatter, …
- Distinctive: line 23
Use whenever work spans multiple sessions, involves multiple agents, or carries enough risk that losing planning context would cause …
- Distinctive: line 35
Every crash-proof plan has three sections:
- Distinctive: line 116
When context is lost (session reset, agent handoff, crash), the recovery workflow re-establishes planning context from the plan file alone:
- Distinctive: line 199
Not applied: runtime plan engine, plan daemon, auto-save hooks, inotify watchers, cloud-synced plan state, or any external runtime …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Crash-Proof Planning & Session Recovery
Purpose
Ensure plans survive context resets, agent handoffs, and session interruptions by using a persistent plan format with YAML frontmatter, explicit checkpoint markers, and a structured recovery workflow that restores context from the plan file alone.
When to use
Use whenever work spans multiple sessions, involves multiple agents, or carries enough risk that losing planning context would cause significant rework. Use proactively before starting a multi-file or multi-day feature, and reactively when resuming work after a context reset.
Inputs
- A persistent plan file following
templates/crash-proof-plan-template.md. - Current workspace state (file tree, git status, open changes).
- Optional: previous session summary or handoff notes.
Persistent Plan Format
Every crash-proof plan has three sections:
1. YAML Frontmatter
The frontmatter carries all metadata needed to identify, version, and track the plan across sessions:
---
plan-id: PLAN-2026-06-19-crash-proof-batch
created: 2026-06-19T10:00:00Z
author: agent-session-alpha
status: in-progress
checkpoint: step-3 # last completed checkpoint label
total-steps: 7
recovery-count: 0 # incremented each time recovery runs
last-modified: 2026-06-19T11:30:00Z
depends-on: [] # optional plan dependencies
tags: [feature, crash-proof]
---Mandatory fields: plan-id, created, status, checkpoint, total-steps.
Optional fields: author, recovery-count, last-modified, depends-on, tags.
2. Body with Completion Markers
Each step in the plan body carries a completion marker that is unambiguous regardless of formatting or whitespace changes. The marker system uses bracket prefixes on step lines:
[ ]— not started. The step has not been worked on.[~]— in progress. Work has begun but is not complete.[x]— complete. All verification for this step passes.[!]— blocked. A named blocker prevents progress; recorded in step notes.[-]— skipped. Explicit decision to skip, with reason in step notes.
Markers survive re-read because they are part of the markdown source, not derived state. Example:
## Steps
[x] Step 1: Assess current crash-points in workspace.
Files: workspace-audit.md
Verification: grep for existing plan files
Notes: Found three active plan files, none with recovery markers.
[~] Step 2: Design plan format with frontmatter.
Files: SKILL.md
Verification: reviewed against 8 crash scenarios
Notes: Format handles context-loss, partial-completion, agent-handoff crashes.
[ ] Step 3: Implement recovery workflow.
Files: commands/vibe-session-catchup.md
Verification: dry-run recovery against mock plan3. Checkpoint Block
At the end of the plan body, a checkpoint block records the last known-good state:
## Checkpoint
Current: step-3 (Step 2 verified green)
Completed steps: 1, 2
In-progress: step-3
Blocked: none
Next action: Complete step 3 implementation then verifyWorkflow
- Create plan — Use
templates/crash-proof-plan-template.mdto initialize a plan with YAML frontmatter, completion markers, and checkpoint block. - Execute steps — Work through each step, updating completion markers (
[ ],[~],[x],[!],[-]) as progress advances. - Update checkpoint — After each step, update the checkpoint block with current status, completed steps, and next action.
- Save plan — Commit or save the plan file; the frontmatter
last-modifiedtimestamp tracks freshness. - Recover on context loss — When context is reset, run the recovery workflow to re-establish from the plan file alone.
Recovery Workflow
When context is lost (session reset, agent handoff, crash), the recovery workflow re-establishes planning context from the plan file alone:
- Locate plan file — Search for the most recent crash-proof plan by
plan-idor by glob pattern*plan*with YAML frontmatter. If multiple exist, present choices. - Parse frontmatter — Read
status,checkpoint,total-steps,recovery-count. Incrementrecovery-count(soft increment; the human or next agent verifies the update). Scan completion markers — Walk each step in the body, collect counts per marker type:
Marker Meaning Action [x]Complete Skip; do not redo [~]In progress Verify partial work; resume or restart step [!]Blocked Assess if blocker resolved; unblock or abandon [-]Skipped Respect skip unless context changed [ ]Not started Available for work - Re-establish workspace context — Run
git status,git log --oneline -5,ls -laon relevant directories to confirm file tree matches plan expectations. Report completion state — Print a summary:
PLAN-2026-06-19-crash-proof-batch Status: in-progress | Checkpoint: step-3 | Recovery: 1 Completed: 2/7 steps (28%) In-progress: step-3 Blocked: none Next: Complete step 3 implementation then verify- Suggest next action — Based on current step status, recommend the concrete next
command or edit. For
[~]steps, verify partial work before continuing. For[ ]steps with[x]dependencies, start the step. For[!]steps, check blocker resolution. - Update plan frontmatter — Set
last-modifiedto current timestamp and save.
Crash Scenarios
| Scenario | How plan survives |
| Session timeout / context reset | Plan file remains on disk; recovery workflow loads and reports |
| Agent handoff to different agent | Plan frontmatter identifies author; recovery workflow re-establishes |
| Partial completion between sessions | Completion markers preserve partial state unambiguously |
| Git stash or branch switch | Plan file is tracked or referenced in task list; recovery finds it |
| File rename or workspace move | Plan file path should be stable (plans/ directory); recovery searches by content |
| Multi-agent conflict on same plan | Recovery workflow audits markers; human reconciles conflicts |
| Verification failure mid-step | Step stays [~] until re-verified; recovery re-scans markers |
| Human deletes plan file | Recovery workflow reports plan missing; suggests re-creation from template |
Outputs
- A readable completion summary showing step status, checkpoint, and next action.
- An updated plan file with correct
last-modifiedand (if applicable) incrementedrecovery-count. - A context report that the next agent or human can act on immediately.
Failure modes
- Plan file is missing and no backup exists. Mitigation: commit plan files to version control; recovery workflow suggests template-based re-creation from memory or handoff notes.
- Completion markers are inconsistent with actual file state. Mitigation: verify step state against file system before reporting; flag mismatches explicitly.
- Recovery runs before the plan is saved. Mitigation: recovery workflow checks for frontmatter before attempting recovery; aborts with clear message if format is invalid.
- Multiple agents write competing markers. Mitigation: human must reconcile conflicts; recovery workflow audits all markers and flags collisions.
Verification checklist
- Plan file has valid YAML frontmatter with all mandatory fields.
- Every step has a completion marker (
[ ],[~],[x],[!], or[-]). - Checkpoint block matches the actual markdown state.
- Recovery workflow produces a correct summary from a mock plan file.
- Recovery-count increments, recovery-count survives re-read.
- Partial plan (some steps done, some in-progress) is recovered correctly.
Applied / Not Applied
- Applied: persistent plan format with YAML frontmatter, bracket completion markers, checkpoint block, structured recovery workflow, crash scenario taxonomy.
- Not applied: runtime plan engine, plan daemon, auto-save hooks, inotify watchers, cloud-synced plan state, or any external runtime dependency.
Ghi chú tiếng Việt
Kế hoạch chống sập: YAML frontmatter (plan-id, checkpoint, status), đánh dấu bước
([ ] chưa làm, [~] đang làm, [x] xong, [!] bị chặn, [-] bỏ qua), block checkpoint
ghi trạng thái cuối. Khi mất ngữ cảnh, quy trình phục hồi tìm file plan, đọc frontmatter và
marker, chạy git status, báo cáo, và gợi ý bước tiếp theo. Không có runtime engine hay
daemon. Lấy cảm hứng từ othmanadi/planning-with-files, viết lại hoàn toàn nguyên bản.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

