skill-session-statelisted
Install: claude install-skill MatrixFounder/Agentic-development
# Session State Management
This skill provides the mechanism to persist your current working state to a file. This allows you to "reboot" from a seamless context state if the session window is reset.
## 1. The Session File
* **Path**: `.agent/sessions/latest.yaml` — resolved from the **repo root** regardless of the
invocation CWD (walk-up to `.git`, `CLAUDE_PROJECT_DIR` fallback; SS-1).
* **Purpose**: Stores the exact arguments from your last `task_boundary` call, plus session metadata.
* **Persistence**: surviving session clears, allowing you to pick up exactly where you left off.
* **Never committed**: this is per-machine runtime data — `.agent/sessions/` is gitignored (SS-2).
Do not `git add` it and do not ship a committed "seed" state.
## 2. Boot Protocol (Start of Session)
**IF** `.agent/sessions/latest.yaml` exists **AND** you are starting a new session (blank context):
1. **READ** the file using `read_file` or `view_file`.
2. **RESTORE** your state:
* Set your internal `Mode` to the file's `mode`.
* Set your `TaskName` and `TaskStatus` to the file's `current_task`.
* Read the `context_summary` to understand what you were doing.
* Check `active_blockers` to see if you were blocked.
## 3. Update Protocol (During Work)
> **First: can you execute at all?** This skill is TIER 0 — it loads into **every** role, including
> the read-only reviewers and critics (`task-reviewer`, `plan-reviewer`, `architecture-reviewer`,
> `critic-*`