$npx -y skills add Rune-kit/rune --skill session-bridgeUniversal context persistence across sessions. Auto-saves decisions, conventions, and progress to .rune/ files. Loads state at session start. Use when any skill makes architectural decisions or establishes patterns that must survive session boundaries.
| 1 | # session-bridge |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Solve the #1 developer complaint: context loss across sessions. Session-bridge auto-saves critical context to `.rune/` files in the project directory, and loads them at session start. Every new session knows exactly where the last one left off. |
| 6 | |
| 7 | ## Triggers |
| 8 | |
| 9 | - Auto-trigger: when an architectural decision is made |
| 10 | - Auto-trigger: when a convention/pattern is established |
| 11 | - Auto-trigger: before context compaction |
| 12 | - Auto-trigger: at session end (stop hook) |
| 13 | - Signal: `checkpoint.request` — explicit checkpoint from cook/team mid-phase |
| 14 | - `/checkpoint` — manual checkpoint (save exact resume point) |
| 15 | - `/rune status` — manual state check |
| 16 | |
| 17 | ## Calls (outbound) |
| 18 | |
| 19 | # Exception: L3→L3 coordination (same pattern as hallucination-guard → research) |
| 20 | - `integrity-check` (L3): verify .rune/ file integrity before loading state |
| 21 | |
| 22 | ## Called By (inbound) |
| 23 | |
| 24 | - `cook` (L1): auto-save decisions during feature implementation |
| 25 | - `rescue` (L1): state management throughout refactoring |
| 26 | - `context-engine` (L3): save state before compaction |
| 27 | - `context-pack` (L3): coordinate state for sub-agent handoff |
| 28 | - `neural-memory` (L3): sync key decisions back to `.rune/` files after Capture Mode |
| 29 | - `adversary` (L2): (oracle-mode) detach protocol when target model is opus-class for non-blocking dispatch |
| 30 | |
| 31 | ## State Files Managed |
| 32 | |
| 33 | ``` |
| 34 | .rune/ |
| 35 | ├── decisions.md — Architectural decisions log |
| 36 | ├── conventions.md — Established patterns & style |
| 37 | ├── progress.md — Task progress tracker |
| 38 | ├── session-log.md — Brief log of each session |
| 39 | ├── instincts.md — Learned project-specific patterns (trigger→action) |
| 40 | ├── cumulative-notes.md — Living project understanding (profile, themes, relationships) |
| 41 | ├── learnings.jsonl — Structured learning log (append-only, queryable) |
| 42 | └── checkpoint.md — Exact resume point for cross-session continuity |
| 43 | ``` |
| 44 | |
| 45 | ## Execution |
| 46 | |
| 47 | ### Save Mode (end of session or pre-compaction) |
| 48 | |
| 49 | #### Step 1 — Gather state |
| 50 | |
| 51 | Collect from the current session: |
| 52 | - All architectural or technology choices made (language, library, approach) |
| 53 | - Conventions established (naming patterns, file structure, coding style) |
| 54 | - Tasks completed, in-progress, and blocked |
| 55 | - A one-paragraph summary of what this session accomplished |
| 56 | |
| 57 | **Python project context** (if `pyproject.toml` or `setup.py` detected): |
| 58 | - Python version (from `.python-version`, `pyproject.toml` `requires-python`, or `python --version`) |
| 59 | - Virtual environment path and type (venv, poetry, uv, conda) |
| 60 | - Installed optional dependency groups (e.g., `[dev]`, `[test]`, `[embeddings]`) |
| 61 | - Last mypy error count (from most recent verification run, if available) |
| 62 | - Last test coverage percentage (from most recent test run, if available) |
| 63 | - DB migration version (if alembic, django migrations, or similar detected) |
| 64 | |
| 65 | #### Step 2 — Update .rune/decisions.md |
| 66 | |
| 67 | Use `Glob` to check if `.rune/decisions.md` exists. If not, use `Write` to create it with a `# Decisions Log` header. |
| 68 | |
| 69 | For each architectural decision from this session, use `Edit` to append to `.rune/decisions.md`: |
| 70 | |
| 71 | ```markdown |
| 72 | ## [YYYY-MM-DD HH:MM] Decision: <title> |
| 73 | |
| 74 | **Context:** Why this decision was needed |
| 75 | **Decision:** What was decided |
| 76 | **Rationale:** Why this approach over alternatives |
| 77 | **Impact:** What files/modules are affected |
| 78 | ``` |
| 79 | |
| 80 | #### Step 3 — Update .rune/conventions.md |
| 81 | |
| 82 | Use `Glob` to check if `.rune/conventions.md` exists. If not, use `Write` to create it with a `# Conventions` header. |
| 83 | |
| 84 | For each pattern or convention established, use `Edit` to append to `.rune/conventions.md`: |
| 85 | |
| 86 | ```markdown |
| 87 | ## [YYYY-MM-DD] Convention: <title> |
| 88 | |
| 89 | **Pattern:** Description of the convention |
| 90 | **Example:** Code example showing the pattern |
| 91 | **Applies to:** Where this convention should be followed |
| 92 | ``` |
| 93 | |
| 94 | Python example: |
| 95 | ```markdown |
| 96 | ## [YYYY-MM-DD] Convention: Async-First I/O |
| 97 | |
| 98 | **Pattern:** All I/O functions use `async def`; blocking calls (`requests`, `open`, `time.sleep`) are forbidden in async modules |
| 99 | **Example:** `async def fetch_data(): async with httpx.AsyncClient() as client: ...` |
| 100 | **Applies to:** All modules in `src/` — sync wrappers only in CLI entry points |
| 101 | ``` |
| 102 | |
| 103 | #### Step 4 — Update .rune/progress.md |
| 104 | |
| 105 | Use `Glob` to check if `.rune/progress.md` exists. If not, use `Write` to create it with a `# Progress` header. |
| 106 | |
| 107 | Use `Edit` to append the current task status to `.rune/progress.md`: |
| 108 | |
| 109 | ```markdown |
| 110 | ## [YYYY-MM-DD HH:MM] Session Summary |
| 111 | |
| 112 | **Completed:** |
| 113 | - [x] Task description |
| 114 | |
| 115 | **In Progress:** |
| 116 | - [ ] Task description (step X/Y) |
| 117 | |
| 118 | **Blo |