---
name: bigmind-session-ritual
description: Executes the mandatory BigMind session start and end rituals in the correct order. Use this skill when a mode or conversation seems to have skipped the session ritual, or as a reference checklist for the full ritual sequence including hypotheses, focus announcement, and stale session cleanup.
---

# BigMind Session Ritual

## When to use
- A session was started without the proper ritual (catch-up)
- Verifying the ritual was done correctly
- Teaching another agent/mode what the ritual is

## When NOT to use
- Normal operation — the ritual should happen automatically from global rules
- If `memory_start_session()` already returned a session_id this conversation

## Session Start Ritual (strict order)

Execute these 4 calls in sequence before any work:

**Step 1 — Open session:**
```
memory_start_session()
```
→ Returns `session_id`. Save it — needed for all subsequent calls.

**Step 2 — Review open hypotheses:**
```
memory_list_hypotheses(status="open")
```
→ Check if any are stale (>1 week old). Assess confidence. Resolve any that are now obviously confirmed/refuted.

**Step 3 — Announce focus:**
```
memory_announce_focus(
  session_id="{id}",
  description="[What this session is doing]",
  files=["list", "of", "files"],
  ide_hint="VS Code"
)
```
→ Enables conflict detection. Other sessions can see what files you're working on.

**Step 4 — Close stale sessions:**
```
memory_close_stale_sessions(session_id="{id}")
```
→ Cleans up orphaned sessions from crashed IDEs. Stale = no activity >2h.

---

## Session End Ritual (mandatory before closing)

```
memory_end_session(
  session_id="{id}",
  one_liner="One sentence summary of what was accomplished.",
  topics=["tag1", "tag2", "tag3"],
  outcome="completed",  # or: partial, blocked, abandoned
  summary="3-8 sentence narrative. Key decisions made. Problems encountered. Solutions applied. Unresolved items carried forward.",
  importance=5  # 1-10. Use 7+ for architectural decisions or critical bugs.
)
```

**Importance guide:**
| Score | Use for |
|-------|---------|
| 1-3 | Reading-only, minor exploration |
| 4-6 | Feature work, standard debugging |
| 7-8 | Architectural decisions, breaking changes |
| 9-10 | Critical bugs, security-relevant choices |

## Troubleshooting
- If `memory_start_session()` fails: retry once, then proceed with a logged warning
- If another session has the same files in focus: coordinate or defer (see Rule 7)
- If `session_id` was lost: use `memory_list_sessions(limit=5)` to find the open one
