/state-load
Restore session context from a previous save and detect VCS drift since the save.
Reads the state files written by /state-save,
checks for VCS drift, and produces a context restoration briefing.
Trigger phrases#
/state-load, restore session, load state, where was I, resume work,
what was I working on, continue from last time, or at the start of a new
session after a /clear.
Do NOT use for: loading individual source files or syncing from version control.
This skill is read-only#
/state-load never creates, modifies, or deletes files. It reads state and
reports what it finds.
What it does#
Step 1: Reads saved state#
Reads Docs/_working/state/SESSION_SNAPSHOT.json and
Docs/_working/state/SESSION_CONTEXT.md.
If neither file exists, it reports "No saved state found" and suggests running
/state-save at the end of your next session.
Step 2: Checks for stale state#
Verifies the described task is still active:
- Checks that referenced source files still exist
- Flags snapshots older than 7 days as potentially stale
- For Perforce: checks if a referenced changelist was submitted or reverted
- For Git: verifies the referenced branch still exists
Step 3: VCS drift detection#
Compares the current VCS state against what was recorded in the snapshot.
Git drift detection:
| Drift type | Severity |
|---|---|
| Remote has new commits | HIGH: may conflict with local changes |
| Files you modified were changed remotely | HIGH: merge conflict risk |
| Uncommitted changes differ from snapshot | MEDIUM: unexpected local changes |
| Branch no longer exists | HIGH: branch was deleted or merged |
Perforce drift detection:
| Drift type | Severity |
|---|---|
| New teammate submissions after snapshot timestamp | HIGH: may conflict |
| Files you edited changed by others | HIGH: merge conflict risk |
| Files no longer opened in your changelist | MEDIUM: may have been reverted |
| Workspace mismatch from snapshot | HIGH: wrong workspace |
Step 4: Build status check#
If source files listed in the snapshot have been modified since the save timestamp, the build status is flagged as stale and a rebuild is recommended.
Step 5: Self-learning backlog#
Counts unprocessed friction entries in Docs/_working/retro/. If 5 or more
new entries have accumulated since the last /update run, it includes a
reminder in the briefing.
Step 6: Context restoration briefing#
## Session Restored
**Last saved**: [timestamp]
**Current task**: [goal]
**Checkpoint**: [ID] ([completed]/[total] complete)
### Completed
- [PT-01] description: pass/fail
### Remaining
- [PT-02] description <-- resume here
### Blocked (if any)
- [Playtest gate, Blueprint work, etc.]
### Drift detected (if any)
- [HIGH] Remote branch has 3 new commits touching Source/Combat/CombatComponent.h
### Key decisions from last session
- [Architecture decisions preserved here]
### Build status
[Last build: SUCCESS at timestamp] or [STALE: source files changed]
### Ready to continue
[Recommended next action]
Edge cases#
- Corrupted JSON: Falls back to
SESSION_CONTEXT.mdfor narrative restoration - State older than 7 days: Notes the age and recommends syncing from VCS first
- Partial state: Reports what was found. Never fabricates missing categories
- No VCS connection: Skips drift detection and notes that VCS state could not be verified
- First session ever: No state files exist. Reports this and suggests describing your task