State List
List all state files in the current repository.
Workflow
- •Get repo root:
git rev-parse --show-toplevel - •Check if
.state/directory exists - •List all
.state/*.state.mdfiles - •For each file, extract:
- •Timestamp (from filename)
- •Human-readable date (convert timestamp)
- •Topic (from frontmatter)
- •Status (from frontmatter)
- •Display as formatted table
Output Format
code
State files in .state/: | Timestamp | Date | Topic | Status | |------------|---------------------|--------------------|-----------| | 1737999600 | 2026-01-27 14:30:00 | API refactoring | active | | 1737985200 | 2026-01-27 10:30:00 | Bug fix session | completed | | 1737912000 | 2026-01-26 14:00:00 | Initial setup | paused | To resume: /stateResume [timestamp]
Empty State
If no state files exist:
code
No state files found in .state/ Use /stateCreate to start a new session.
Parsing Frontmatter
Extract topic and status from YAML frontmatter:
yaml
--- topic: "API refactoring" status: active ---
If topic is empty, show "(no topic)".