Help us improve
Share bugs, ideas, or general feedback.
From deep-work
Resumes an active deep-work session by restoring context from artifacts and continuing from the current phase. Supports explicit session ID, phase override, and worktree path.
npx claudepluginhub sungmin-cho/claude-deep-suite --plugin deep-workHow this skill is triggered — by the user, by Claude, or both
Slash command
/deep-work:deep-resumeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
이 스킬은 두 가지 경로로 호출됩니다 — 어느 쪽이든 본 SKILL 본문의 절차를 그대로 실행합니다:
Orchestrates evidence-driven workflow across Brainstorm, Research, Plan, Implement, and Test phases. Handles session init, resume, migration, and model routing.
Restores session context from a previous Claude Code session after context resets, compaction, or new conversations. Checks for handoff files and project state to resume work.
Resumes coding sessions by detecting blockers, reconciling STATE.md with filesystem, and suggesting next actions from checkpoints or plans.
Share bugs, ideas, or general feedback.
이 스킬은 두 가지 경로로 호출됩니다 — 어느 쪽이든 본 SKILL 본문의 절차를 그대로 실행합니다:
/deep-resume [args...] 입력 (skill 의 user-invocable: true 가 슬래시 진입을 허용).Skill({ skill: "deep-work:deep-resume", args: "..." }) 형태로 명시 invoke (cross-platform 표준 경로).두 경로 모두 args 는 동일한 토큰 문자열로 전달되며, 본문 ($ARGUMENTS 자리) 의 파서가 동일하게 처리합니다.
| 인자 | 의미 |
|---|---|
| (없음) | Auto-detect active session + 현재 phase resume |
--session=<id> | 명시 세션 ID resume |
--resume-from=<phase> | `brainstorm |
--worktree=<path> | worktree 경로 명시 |
빈 args / 매칭되지 않는 토큰 → 본문의 default 분기로 진입.
이 entry skill 은 deep-work-orchestrator (Phase dispatch) 및 deep-work-workflow (reference skill — Phase 규약/Exit Gate/M3 envelope) 와 함께 동작합니다. 활성 deep-work 세션이 있을 때는 세션 state file (.claude/deep-work.<SESSION_ID>.md) 의 변수 (work_dir, current_phase, active_slice 등) 를 읽어 동작하며, 세션 외부에서도 standalone 실행이 가능한 경우 본문의 분기를 따릅니다.
Cross-platform self-containment: Claude Code 에서는 sibling skill 이 description 매칭으로 자동 로드됩니다. Codex / Copilot CLI / Gemini CLI / Agent SDK 에서 Skill() 로 호출 시 sibling auto-load 보장이 약할 수 있으므로, 본문은 self-contained 으로 보존되어 있습니다 — state file 해석, $ARGUMENTS 파싱, AskUserQuestion 분기, 출력 포맷이 인라인.
Utility (v6.2.4) — standalone 명령.
/deep-workinit은 stale 세션 감지만 수행하며, active 세션 선택·worktree 컨텍스트 복원·state 마이그레이션·phase cache 정리·phase별 resume dispatch는 이 커맨드가 유일한 경로입니다. 향후 기능 이관 후 삭제 예정 (spec §7 follow-up).v6.4.2:
parse-deep-work-flags파서가--session=<id>,--resume-from=brainstorm(및research|plan|implement|test),--worktree=<path>플래그를 지원합니다.
You are resuming an active Deep Work session — restoring context from previous artifacts and continuing from the current phase.
Detect the user's language from their messages or the Claude Code language setting. Output ALL user-facing messages in the detected language. The display templates below use Korean as the reference format — translate naturally to the user's language while preserving emoji, formatting, and structure. Do NOT mix languages within a single message.
Resolve the session to resume using the following priority:
If DEEP_WORK_SESSION_ID environment variable is set:
.claude/deep-work.${DEEP_WORK_SESSION_ID}.md directlycurrent_phase is not idle: proceed to Step 1.5 with this sessionidle: fall through to 1bRead the registry (.claude/deep-work-sessions.json). Filter to sessions where current_phase is NOT idle.
If no active sessions in registry:
.claude/deep-work.local.md
current_phase is NOT idle and NOT empty: use this file as the state file. Display:
ℹ️ 레거시 세션을 감지했습니다. 이 세션을 재개합니다.
Proceed to Step 1.5.ℹ️ 활성 세션이 없습니다.
새 세션을 시작하려면: /deep-work <작업 설명>
Stop here.If exactly 1 active session in registry:
write_session_pointer SESSION_ID.claude/deep-work.${SESSION_ID}.mdIf 2+ active sessions in registry:
재개할 세션을 선택하세요:
1. [SESSION_ID] [task_description] ([current_phase], [last_activity])
2. [SESSION_ID] [task_description] ([current_phase], [last_activity])
...
write_session_pointer SELECTED_SESSION_ID.claude/deep-work.${SELECTED_SESSION_ID}.mdFrom the resolved state file, extract current_phase, work_dir, task_description, started_at, team_mode, plan_approved, test_retry_count, max_test_retries, preset, evaluator_model, assumption_adjustments, skipped_phases, plan_review_retries, and auto_loop_enabled from the YAML frontmatter.
execution_override: inline | delegate | null (v6.4.0 — sets decide_execution_mode override for inline escape hatches)active_cluster_takeover: "<cluster_id>" | null (v6.4.0 — debug takeover 중 세션 중단 시, resume 하면 해당 cluster를 inline으로 이어 실행)delegation_snapshot: "<git hash>" | null (v6.4.0 C-1.1 — delegate 진입 직전 capture된 commit hash. verify-receipt pass 시 null로 clear. resume 시 non-null이면 "verify-receipt fail 후 interrupt" 신호로 해석되어 Rollback Protocol AskUserQuestion을 재표시한다.)Set $WORK_DIR to the value of work_dir (used in all subsequent steps).
If current_phase is idle or empty:
ℹ️ 완료된 세션입니다.
리포트 확인: `/deep-status --report` · 재생성: `/deep-report`
새 세션 시작: /deep-work <작업 설명>
Stop here.
Resume 시 state 파일에 phase_review 필드가 없으면 빈 객체로 자동 초기화:
If phase_review field is missing from state YAML frontmatter:
phase_review: {} to the state file📋 phase_review 필드 초기화 완료 (v6.0.2 마이그레이션)If review_results field exists (v5.5 legacy):
review_results.{phase} valuesphase_review.{phase}.reviewed: true for phases that have review datareview_results for backward compatibility (read-only)If worktree_enabled is true in the state file:
Read worktree_path from state file
Check if the worktree still exists on disk:
[ -d "[worktree_path]" ] && echo "exists" || echo "missing"
If exists: Set working directory context to the worktree path.
cd [absolute_worktree_path] &&Worktree 복원: [worktree_branch]
Path: [worktree_path]
If missing (user manually deleted the worktree):
⚠️ Worktree가 삭제되었습니다: [worktree_path]
현재 브랜치에서 계속 진행합니다.
Worktree 재생성은 지원하지 않습니다 — /deep-finish로 세션을 정리하세요.
worktree_enabled: falseBased on the current phase, load the relevant artifacts to restore AI context:
brainstorm$WORK_DIR/brainstorm.md if it exists
phase_context to "탐색 중"research$WORK_DIR/research.md if it exists
phase_context to "분석 중"plan$WORK_DIR/research.md if it exists — only the Executive Summary and Key Findings sections (stop reading after --- separator or the next ## heading after Key Findings). This provides research context without consuming excessive tokens.
$WORK_DIR/plan.md if it exists (for review continuation)phase_context to "리뷰 대기" if plan.md exists, "작성 대기" if notreview_state from state file
"in_progress": note "리뷰 진행 중이었음"
review_results.plan.judgments_timestamp exists: note "종합 판단 완료, 사용자 확인 대기""completed": note "리뷰 완료됨"$WORK_DIR/plan-review.json and $WORK_DIR/plan-cross-review.json if they existimplement$WORK_DIR/research.md if it exists — only Executive Summary (1 paragraph)$WORK_DIR/plan.md in full — this is the implementation guide
- [x] (completed) and - [ ] (incomplete)completed / total * 100phase_context to "N/M 완료"test$WORK_DIR/plan.md — only Plan Summary section (approach, scope, risk)$WORK_DIR/test-results.md if it exists — focus on the most recent attempt's Failures sectiontest_retry_count and max_test_retries from the state filephase_context to "시도 N/M"File resilience: If any file fails to read (missing, corrupted), display a warning but continue with available data. Only stop if a critical dependency is missing (e.g., plan.md missing during implement phase).
Deep Work 세션을 재개합니다
작업: [task_description]
현재 단계: [Phase 이름] ([phase_context])
작업 폴더: [work_dir]
프리셋: [preset]
평가자 모델: [evaluator_model]
시작: [started_at]
Assumption 조정: [N]건 또는 없음
건너뛴 단계: [list] 또는 없음
컨텍스트 복원:
[✅/⬜] research.md [요약 로드 / 없음]
[✅/⬜] plan.md [전문 로드 / 요약 로드 / 없음]
[✅/⬜] 체크리스트 진행률: N/M (XX%) ← implement만
[✅/⬜] 테스트 결과 (시도 N/M) ← test만
[✅/⬜] 리뷰 상태: [완료 (8/10) / 진행중 / 대기 / 스킵] ← plan만
▶️ [다음 행동]
Omit lines that don't apply to the current phase (e.g., don't show 체크리스트 for research phase). (If preset is empty or not set, omit the 프리셋 line.) If evaluator_model is empty or not set, omit the 평가자 모델 line. If assumption_adjustments is empty or not set, show "없음". If skipped_phases is empty or not set, show "없음".
Before dispatching to the phase skill, delete any stale phase cache to ensure a clean resume:
rm -f .claude/.phase-cache-${SESSION_ID} 2>/dev/null
Where ${SESSION_ID} is the resolved session ID from Step 1.
Execute the appropriate phase skill based on the current phase. Each skill handles its own resume logic (review state detection, checkpoint restoration, etc.) internally.
brainstormBrainstorm phase는 Orchestrator Exit Gate 재표시(v6.3.1 F1)가 필요합니다. Orchestrator를 경유하여 resume합니다:
Skill("deep-work-orchestrator", args="--session={SESSION_ID} --resume-from=brainstorm")
brainstorm_completed_at이 있으면 Orchestrator §3-1 Exit Gate 재표시.researchResearch phase는 Orchestrator의 Review + Approval Workflow를 거쳐야 current_phase가 진전합니다. Phase skill을 직접 호출하면 current_phase가 변경되지 않아 dead-end가 됩니다. Orchestrator를 경유하여 resume합니다:
Skill("deep-work-orchestrator", args="--session={SESSION_ID} --resume-from=research")
Orchestrator가 research skill 호출 → review → approval → plan 진전까지 처리합니다.
planPlan phase도 Orchestrator Exit Gate 재표시(v6.3.1 F1)가 필요합니다. Orchestrator를 경유하여 resume합니다:
Skill("deep-work-orchestrator", args="--session={SESSION_ID} --resume-from=plan")
plan_completed_at + plan_approved: true이면 Orchestrator §3-3 Exit Gate 재표시 (paused-after-approval 복귀 경로). current_phase를 implement로 강제 전환하지 않음 — Option A F1에서 이 상태는 정당한 일시정지 상태임.plan_approved: false이면 Orchestrator §3-3이 review+approval 단계 재개.implementImplement phase도 Orchestrator Exit Gate 재표시(v6.3.1 F1)가 필요합니다. Orchestrator를 경유하여 resume합니다:
Skill("deep-work-orchestrator", args="--session={SESSION_ID} --resume-from=implement")
implement_completed_at + 모든 slice receipt complete이면 Orchestrator §3-4 Exit Gate 재표시.testTest phase도 Orchestrator Exit Gate 재표시(v6.3.1 F1)가 필요합니다.
If test_passed: true:
All Pass된 세션. Orchestrator §3-5 Exit Gate 재표시:
Skill("deep-work-orchestrator", args="--session={SESSION_ID} --resume-from=test")
Otherwise (retry 진행 중 또는 exhausted):
Skill("deep-work-orchestrator", args="--session={SESSION_ID} --resume-from=test")
Orchestrator §3-5가 test skill을 호출하고 retry loop을 이어서 관리합니다.