com um clique
resume
Pick up where you left off. Restores context and suggests next action.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Pick up where you left off. Restores context and suggests next action.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Run multiple phases hands-free. Chains discuss, plan, build, and verify automatically.
Start a new project. Deep questioning, research, requirements, and roadmap.
Execute all plans in a phase. Spawns agents to build in parallel, commits atomically.
Configure settings: depth, model profiles, features, git, and gates.
Execute the next logical step automatically. No prompts, no decisions — just do it.
Systematic debugging with hypothesis testing. Persistent across sessions.
| name | resume |
| description | Pick up where you left off. Restores context and suggests next action. |
| allowed-tools | Read, Write, Bash, Glob, Grep, AskUserQuestion |
| argument-hint | [--from <file>] |
STOP — DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes ~7,600 tokens. Begin executing Step 1 immediately.
Before ANY tool calls, display this banner:
╔══════════════════════════════════════════════════════════════╗
║ PLAN-BUILD-RUN ► RESUMING SESSION ║
╚══════════════════════════════════════════════════════════════╝
Then proceed to Step 1.
You are running the resume skill. Your job is to find the last pause point, restore context for the user, and suggest the next action so they can continue seamlessly.
This skill runs inline (no Task delegation).
Get the user back to work in under 30 seconds. Read the handoff, show what matters, and suggest the next command. Don't make them re-discover their own project state.
When resuming, scan for conditions in this priority order. Handle the HIGHEST priority item first:
1. 🔴 UAT-BLOCKER (diagnosed) → Fix must come first
2. 🟡 Interrupted agent → Resume agent from checkpoint
3. 🟡 .continue-here checkpoint → Resume from checkpoint
4. 🟡 Incomplete plan → Complete plan execution
5. 🟢 Phase complete → Transition to next phase
6. 🟢 Ready to plan/execute → Normal workflow
Before presenting the standard resume view, check:
UAT Blockers: Search for VERIFICATION.md files with status: gaps_found in any phase. If found and gaps are marked as blocking, surface them first: "Phase {N} has {count} blocking verification gaps. These should be fixed before continuing."
Interrupted Agents: Check for .checkpoint-manifest.json files in phase directories with checkpoints_pending entries. These indicate a build was interrupted mid-checkpoint.
Stale .continue-here.md: If the file references commits that don't exist in git log, warn about state corruption.
On every resume, reconcile STATE.md claims against filesystem reality:
pbr-tools state check-progress
Parse the JSON output:
discrepancies array is empty: proceed silently (state is consistent)severity: "corruption": present repair and ask for confirmation via AskUserQuestionseverity: "drift": auto-repair silently and note the changes.planning/logs/events.jsonl with category state-reconcileIf the CLI fails, display a branded ERROR box: "Failed to check state consistency." and proceed with resume (non-blocking — state reconciliation is advisory).
Read .planning/STATE.md for the last known position.
Extract from frontmatter:
session_last — when the last session ended (ISO timestamp)session_stopped_at — brief description of where work stoppedsession_resume — path to .continue-here.md fileIf session_last exists in frontmatter, display it immediately before any other output:
Last session: {session_last}
Stopped at: {session_stopped_at}
This gives the user instant context before the full resume analysis runs.
Also extract from body:
CRITICAL -- DO NOT SKIP: After successful resume, clear session_stopped_at from STATE.md frontmatter (set to empty string or remove) to indicate the session has been resumed. Keep session_last and session_resume intact for reference.
If STATE.md doesn't exist:
Before searching for .continue-here.md, check for structured state files:
Check if .planning/HANDOFF.json exists:
Check if .planning/WAITING.json exists:
Project is in WAITING state
Reason: {reason}
Waiting since: {created_at}
Expected duration: {expected_duration}
/pbr:resume-work to clear the waiting state and continue."Check if .planning/.autonomous-state.json exists:
current_phase -- the phase the autonomous run was on when interruptedcompleted_phases -- list of phases already completedbranch_state -- map of phase -> branch name (may be empty {})started_at -- when the run beganfailed_phase / error -- whether the run failed vs. was interruptedAutonomous Run Detected
Started: {started_at}
Completed phases: {completed_phases list, or "none"}
Current phase: {current_phase}
{If branch_state non-empty:}
Active branch: {branch for current_phase, if present}
{If failed_phase non-null:}
Failed at phase: {failed_phase} — {error}
Use AskUserQuestion:
question: "An autonomous run was interrupted at Phase {current_phase}. Continue it?"
header: "Autonomous Resume"
options:
- label: "Continue autonomous run from Phase {current_phase}"
description: "Run /pbr:autonomous --from {current_phase}"
- label: "Resume manually (normal resume flow)"
description: "Continue with the standard resume process"
- label: "Discard autonomous state"
description: "Delete .autonomous-state.json and start fresh"
multiSelect: false
Run: /pbr:autonomous --from {current_phase} and stop (do not proceed with normal resume flow).planning/.autonomous-state.json, then proceed with normal resume flow.autonomous-state.json does NOT exist: skip this block entirely, proceed with Step 2Check if .planning/sessions/snapshots/ directory exists:
*-snapshot.md, sorted alphabetically (newest last).timestamp field.Store the extracted snapshot data for use in Step 3a/3b display. Do NOT display anything yet.
Search for .continue-here.md files across all phase directories:
.planning/phases/**/.continue-here.md
If exactly one found:
If multiple found:
CRITICAL -- DO NOT SKIP: Present the following choice to the user via AskUserQuestion before proceeding:
Use the pause-point-select pattern (see skills/shared/gate-prompts.md):
Use AskUserQuestion: question: "Found multiple pause points. Which would you like to resume?" header: "Resume" options: - label: "Phase {A}" description: "Paused {date}, {brief context}" - label: "Phase {B}" description: "Paused {date}, {brief context}" - label: "Phase {C}" description: "Paused {date}, {brief context}" - label: "Phase {D}" description: "Paused {date}, {brief context}" multiSelect: false
Build options dynamically from discovered .continue-here.md files. Include phase name and pause date in each option. If more than 4 pause points exist, show the 4 most recent and replace the last option with:
When "Show earlier" is selected, re-prompt with the next batch of 4.
Use the selected pause point for the rest of the resume flow.
If none found:
Read the .continue-here.md file completely
Parse sections. If the file contains <current_state>, parse XML sections. Otherwise, fall back to parsing markdown headers (## Position, ## Completed This Session, etc.) for backward compatibility with old-format files.
<current_state> -- phase, plan, status, branch, working files<completed_work> -- what was done last session<remaining_work> -- what's left in this phase<decisions_made> -- key decisions that affect future work<context> -- approach, reasoning, things to watch out for<next_action> -- the single most important next step with exact commandDisplay the resume context using the branded banner:
╔══════════════════════════════════════════════════════════════╗
║ PLAN-BUILD-RUN ► SESSION RESTORED ✓ ║
╚══════════════════════════════════════════════════════════════╝
Resuming session from {pause date}
Position: Phase {N} -- {name}
Plan: {M} of {total}
Status: {status}
Completed last session:
{bulleted list of completed work}
{If snapshot loaded and not stale:}
Last session context:
- Working on: {files from Working Set, max 5}
- Approach: {Current Approach text, truncated to 150 chars}
{If pending decisions exist:}
- Pending decisions: {count} unresolved
{If open questions exist:}
- Open questions: {count} remaining
Remaining in this phase:
{bulleted list of remaining plans}
{If decisions were made:}
Key decisions:
{bulleted list of decisions}
{If context section has content:}
Session context:
{approach and reasoning from <context> section}
{If blockers exist:}
Blockers:
{bulleted list of blockers}
Validate the resume point:
Present the next action from the continue-here file. When a <next_action> section exists with a Command: field, prefer that over inferring the next action from state -- the pause skill captured the exact command to run.
If only one clear next action exists, present it with branded routing:
╔══════════════════════════════════════════════════════════════╗
║ ▶ NEXT UP ║
╚══════════════════════════════════════════════════════════════╝
**{explanation from continue-here}**
`{suggested command}`
<sub>`/clear` first → fresh context window</sub>
If multiple reasonable actions exist (e.g., the continue-here suggests one thing but the filesystem state suggests another):
CRITICAL -- DO NOT SKIP: Present the following choice to the user via AskUserQuestion before proceeding:
Use the action-routing pattern (see skills/shared/gate-prompts.md):
Use AskUserQuestion: question: "How would you like to proceed?" header: "Next Step" options: - label: "{continue-here suggestion}" description: "Resume from pause point" - label: "{filesystem-inferred action}" description: "Based on current state" - label: "Show status" description: "Run /pbr:progress for full overview" - label: "Something else" description: "Enter a different command" multiSelect: false
After user selects an option:
/pbr:{action} {args}" so the user can execute itWhen there's no .continue-here.md but STATE.md has position info:
Resuming from STATE.md (no pause file found)
Position: Phase {N} -- {name}
Progress: {completed}/{total} plans complete
{If snapshot loaded and not stale:}
Last session context:
- Working on: {files from Working Set, max 5}
- Approach: {Current Approach text, truncated to 150 chars}
{If pending decisions exist:}
- Pending decisions: {count} unresolved
{If open questions exist:}
- Open questions: {count} remaining
{Plans with summaries listed as complete}
{Plans without summaries listed as remaining}
Note: No detailed pause context available. Run `/pbr:progress` for a full overview.
CRITICAL -- DO NOT SKIP: Present the following choice to the user via AskUserQuestion before proceeding: Use AskUserQuestion: question: "What would you like to do next?" header: "Next Step" options: (build dynamically from phase state) - label: "/pbr:execute-phase {N}" description: "Continue building (plans remaining)" - label: "/pbr:verify-work {N}" description: "Review completed phase" - label: "/pbr:plan-phase {N} --gaps" description: "Fix verification gaps" - label: "/pbr:plan-phase {N+1}" description: "Plan the next phase" multiSelect: false
Show only the options that apply to the current state (1-3 real options + "Something else").
When neither .continue-here.md nor STATE.md position data exists:
Check if .planning/ directory exists at all
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
No Plan-Build-Run project found.
**To fix:** Run `/pbr:new-project` to start a new project, or `/pbr:map-codebase` to analyze an existing codebase.
If .planning/ exists, scan for any project state:
If some state exists:
Found a Plan-Build-Run project but no pause point.
Project has:
- {count} phases in ROADMAP.md
- {count} phase directories
- {count} completed plans (SUMMARY.md files)
Attempting to determine position...
Infer position:
Present recovery status:
Best guess for current position:
Phase {N}: {name}
- {X} of {Y} plans completed
- Last activity: {date from most recent SUMMARY.md or git log}
Suggested: Run `/pbr:progress` for a full overview, then choose your next action.
After displaying context, route to the appropriate action:
| Situation | Suggested Action |
|---|---|
| Autonomous run interrupted | /pbr:autonomous --from {N} |
| Mid-phase, plans remaining | /pbr:execute-phase {N} (executor will skip completed plans) |
| Phase complete, not reviewed | /pbr:verify-work {N} |
| Phase reviewed, has gaps | /pbr:plan-phase {N} --gaps |
| Phase complete and verified | /pbr:plan-phase {N+1} |
| Between milestones | /pbr:new-milestone |
| Active debug session | /pbr:debug (will offer to resume) |
| Pending todos exist | Mention: "Also {count} pending todos. /pbr:check-todos" |
When resuming, validate that the project state is consistent:
git status --short
If there are uncommitted changes:
For each plan file in the current phase:
partial or failed, warnIf .continue-here.md is more than 7 days old:
/pbr:progress to verify the current state before continuing."Reference: skills/shared/error-reporting.md for branded error output patterns.
/pbr:progress for recovery{current} but the pause was on {paused-branch}.".planning/ exists but only has config.json, display:
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
Project was initialized but no work has been done.
**To fix:** Run `/pbr:plan-phase 1` to start planning, or `/pbr:discuss-phase 1` to talk through the first phase.