$npx -y skills add parcadei/Continuous-Claude-v3 --skill create_handoffCreate handoff document for transferring work to another session
| 1 | # Create Handoff |
| 2 | |
| 3 | You are tasked with writing a handoff document to hand off your work to another agent in a new session. You will create a handoff document that is thorough, but also **concise**. The goal is to compact and summarize your context without losing any of the key details of what you're working on. |
| 4 | |
| 5 | |
| 6 | ## Process |
| 7 | ### 1. Filepath & Metadata |
| 8 | Use the following information to understand how to create your document: |
| 9 | |
| 10 | **First, determine the session name from existing handoffs:** |
| 11 | ```bash |
| 12 | ls -td thoughts/shared/handoffs/*/ 2>/dev/null | head -1 | xargs basename |
| 13 | ``` |
| 14 | |
| 15 | This returns the most recently modified handoff folder name (e.g., `open-source-release`). Use this as the handoff folder name. |
| 16 | |
| 17 | If no handoffs exist, use `general` as the folder name. |
| 18 | |
| 19 | **Create your file under:** `thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml`, where: |
| 20 | - `{session-name}` is from existing handoffs (e.g., `open-source-release`) or `general` if none exist |
| 21 | - `YYYY-MM-DD` is today's date |
| 22 | - `HH-MM` is the current time in 24-hour format (no seconds needed) |
| 23 | - `description` is a brief kebab-case description |
| 24 | |
| 25 | **Examples:** |
| 26 | - `thoughts/shared/handoffs/open-source-release/2026-01-08_16-30_memory-system-fix.yaml` |
| 27 | - `thoughts/shared/handoffs/general/2026-01-08_16-30_bug-investigation.yaml` |
| 28 | |
| 29 | ### 2. Write YAML handoff (~400 tokens vs ~2000 for markdown) |
| 30 | |
| 31 | **CRITICAL: Use EXACTLY this YAML format. Do NOT deviate or use alternative field names.** |
| 32 | |
| 33 | The `goal:` and `now:` fields are shown in the statusline - they MUST be named exactly this. |
| 34 | |
| 35 | ```yaml |
| 36 | --- |
| 37 | session: {session-name from ledger} |
| 38 | date: YYYY-MM-DD |
| 39 | status: complete|partial|blocked |
| 40 | outcome: SUCCEEDED|PARTIAL_PLUS|PARTIAL_MINUS|FAILED |
| 41 | --- |
| 42 | |
| 43 | goal: {What this session accomplished - shown in statusline} |
| 44 | now: {What next session should do first - shown in statusline} |
| 45 | test: {Command to verify this work, e.g., pytest tests/test_foo.py} |
| 46 | |
| 47 | done_this_session: |
| 48 | - task: {First completed task} |
| 49 | files: [{file1.py}, {file2.py}] |
| 50 | - task: {Second completed task} |
| 51 | files: [{file3.py}] |
| 52 | |
| 53 | blockers: [{any blocking issues}] |
| 54 | |
| 55 | questions: [{unresolved questions for next session}] |
| 56 | |
| 57 | decisions: |
| 58 | - {decision_name}: {rationale} |
| 59 | |
| 60 | findings: |
| 61 | - {key_finding}: {details} |
| 62 | |
| 63 | worked: [{approaches that worked}] |
| 64 | failed: [{approaches that failed and why}] |
| 65 | |
| 66 | next: |
| 67 | - {First next step} |
| 68 | - {Second next step} |
| 69 | |
| 70 | files: |
| 71 | created: [{new files}] |
| 72 | modified: [{changed files}] |
| 73 | ``` |
| 74 | |
| 75 | **Field guide:** |
| 76 | - `goal:` + `now:` - REQUIRED, shown in statusline |
| 77 | - `done_this_session:` - What was accomplished with file references |
| 78 | - `decisions:` - Important choices and rationale |
| 79 | - `findings:` - Key learnings |
| 80 | - `worked:` / `failed:` - What to repeat vs avoid |
| 81 | - `next:` - Action items for next session |
| 82 | |
| 83 | **DO NOT use alternative field names like `session_goal`, `objective`, `focus`, `current`, etc.** |
| 84 | **The statusline parser looks for EXACTLY `goal:` and `now:` - nothing else works.** |
| 85 | --- |
| 86 | |
| 87 | ### 3. Mark Session Outcome (REQUIRED) |
| 88 | |
| 89 | **IMPORTANT:** Before responding to the user, you MUST ask about the session outcome. |
| 90 | |
| 91 | Use the AskUserQuestion tool with these exact options: |
| 92 | |
| 93 | ``` |
| 94 | Question: "How did this session go?" |
| 95 | Options: |
| 96 | - SUCCEEDED: Task completed successfully |
| 97 | - PARTIAL_PLUS: Mostly done, minor issues remain |
| 98 | - PARTIAL_MINUS: Some progress, major issues remain |
| 99 | - FAILED: Task abandoned or blocked |
| 100 | ``` |
| 101 | |
| 102 | After the user responds, index and mark the outcome: |
| 103 | ```bash |
| 104 | # Mark the most recent handoff (works with PostgreSQL or SQLite) |
| 105 | # Use git root to find project, then opc/scripts/core/ |
| 106 | PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "${CLAUDE_PROJECT_DIR:-.}") |
| 107 | |
| 108 | # First, index the handoff into the database |
| 109 | cd "$PROJECT_ROOT/opc" && uv run python scripts/core/artifact_index.py --file thoughts/shared/handoffs/{session_name}/{filename}.yaml |
| 110 | |
| 111 | # Then mark the outcome |
| 112 | cd "$PROJECT_ROOT/opc" && uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE> |
| 113 | ``` |
| 114 | |
| 115 | **IMPORTANT:** Replace `{session_name}` and `{filename}` with the actual values from step 1. |
| 116 | |
| 117 | These commands auto-detect the database (PostgreSQL if configured, SQLite fallback). |
| 118 | |
| 119 | **Note:** If indexing fails, the marking step will show "Database marking was not available" - this is acceptable for the first handoff but indicates the indexing step was skipped. |
| 120 | |
| 121 | ### 4. Confirm completion |
| 122 | |
| 123 | After marking the outcome, respond to the user: |
| 124 | |
| 125 | ``` |
| 126 | Handoff created! Outcome marked as [OUTCOME]. |
| 127 | |
| 128 | Resume in a new session with: |
| 129 | /resume_handoff path/to/handoff.yaml |
| 130 | ``` |
| 131 | |
| 132 | --- |
| 133 | ##. Additional Notes & Instructions |
| 134 | - **more information, not less**. This is a guideline that defines the minimum of what a handoff should be. Always feel free to include more information if necessary. |
| 135 | - **be thorough and precise**. include both top-level objectives, and lower-level details as necessary. |
| 136 | - **avoid excessive code snippets**. While a brief snippet to describe some key change is |