Session Start
Initialize a new work session with proper state management.
Execution Protocol
Step 1: Create Brain Backup
bash
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
BACKUP_DIR=".brain-backups/${TIMESTAMP}"
mkdir -p "${BACKUP_DIR}"
cp -r brain/* "${BACKUP_DIR}/"
echo "✓ Brain backup created: ${BACKUP_DIR}"
Step 2: Validate Environment
- • Confirm in git repository
- • Check current branch (should be feature branch or worktree)
- • Verify brain/ files exist
- • Confirm no uncommitted changes (or stash them)
Step 3: Load Context
Read these files to understand current state:
- •
brain/development_standard.md— Standards to follow - •
brain/general_index.md— Project structure - •
brain/history_log.md(last 2 entries) — Recent context
Step 4: Output Session Header
code
═══════════════════════════════════════════════════════ SESSION INITIALIZED Date: [current date/time] Branch: [current branch] Backup: [backup path] ═══════════════════════════════════════════════════════ Ready for work request. Provide a feature description to begin planning. Next step: /plan "your feature request"
Session Rules
- •Each session targets 1-2 hours of work
- •Maximum 6 atomic tasks per session
- •All tasks must be in plan.md before execution
- •End session with
/session-endbefore merging
Failure Recovery
If session-start fails:
- •Check
.brain-backups/for recent backups - •Verify brain/ directory integrity
- •Run
git statusto check repository state