Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Use when you need to resume an interrupted workflow from where it left off.
user-invocable
true
team-shinchan:resume
Resume a paused/interrupted workflow by loading saved state and delegating to the appropriate agent.
Step 0: Input Validation
If DOC_ID not provided:
Big projects (nested bigproject):
Scan .shinchan-docs/*/PROJECT.yaml, filter current.status: active|paused|blocked.
For each, collect project_id, title, current.active_phase, and the phase count from
phases[]. These are resumed as a unit (see Step 0.5).
Active/Paused workflows:
Scan .shinchan-docs/*/WORKFLOW_STATE.yaml (exclude archived/ subfolder), filter
status: active|paused. Suppress any workflow that is a project child — i.e. its
current.parent_doc_id is set, or its DOC_ID matches {project_id}-phase-* for a project
listed above — so phases don't appear twice.
Archived workflows:
Scan .shinchan-docs/archived/*/*/WORKFLOW_STATE.yaml, collect all entries.
If the user selects a P# project entry: resume = re-enter the bigproject phase loop.
Read .shinchan-docs/{project_id}/PROJECT.yaml.
Find the first phase with status != complete (in execution_order if present, else by n).
If that phase's child workflow already exists and is mid-flight
(.shinchan-docs/{project_id}-phase-{n}/WORKFLOW_STATE.yaml with status active/paused),
resume that child via Steps 1–5 below (using its DOC_ID), then return to the loop.
Otherwise start the phase fresh per skills/bigproject/SKILL.md Step 5.
Continue executing bigproject Step 5 (phase loop) and Step 6 (completion) on the main
thread from that phase onward. Do NOT delegate the whole project to a sub-agent.
Standalone (non-project) selections continue with Steps 1–5 unchanged.
completed_phases: array → join with ,; string → display as-is
last_decision: null → display none
blocking_issues: null → display none
If file does not exist or Read fails: skip silently. Proceed to Step 2 without error.
If JSON parse fails (malformed content): skip silently. Proceed to Step 2 without error.
Step 1.6: Load JSONL Checkpoint (Conditional)
Check if .shinchan-docs/{DOC_ID}/work-tracker.jsonl exists (using Read tool). If not found, also check .shinchan-docs/work-tracker.jsonl as fallback.
If file exists:
Read the last 32KB of the file (tail approach — do NOT read the full file to avoid memory issues on large JSONL logs). Scan lines in reverse order (last line first) for the first entry matching:
"event": "phase_complete" or "event": "task_complete"
If a matching entry is found, parse it and store as {jsonl_checkpoint}.
Prepend the following block to the Step 4 output header (before the separator line):
If ak_gate is present but missing sub-fields (e.g., requirements exists but planning is absent, or vice versa): add only the missing sub-fields using the same defaults above. Do NOT modify any sub-fields that already exist.
If ak_gate is fully present with both requirements and planning: skip silently. No changes needed.
After any write, proceed to Step 2 without error.
Step 2: Load Documents
Always: Read .shinchan-docs/{DOC_ID}/REQUESTS.md (warn if missing)
If stage >= planning: Read .shinchan-docs/{DOC_ID}/PROGRESS.md
If requirements stage with current.interview: extract step/collected_count/last_question for Nene handoff
Step 3: Update State
Add resumed event to history, set status: active.
Step 4: Output Status
If handoff state was loaded in Step 1.5, prepend the [Handoff] block before the separator: