A complete, battle-tested session lifecycle for Hermes Agent. Every session follows the same cycle: warm up → plan → build → recap → wrap up. This skill integrates all five stages into one workflow so nothing is forgotten and every session picks up exactly where the last one left off.
text
warmup → plan → build → recap → wrapup → (next session) warmup → ...
StageWhat it doesWhenWarmupLoad project context, check active plans, check knowledge graphSession startPlanDraft a feature plan with acceptance criteriaBefore non-trivial workBuildImplement the plan (the actual work)After plan is acceptedRecapWalk acceptance criteria, draft session recapBefore wrapping upWrapupVerify handoff, update docs, drift checkSession end
Use at session start. Loads project memory, recent recaps, active plans, and knowledge graph health into one state summary.
bash
[ -f CLAUDE.md ] || [ -f PROJECT.md ] || echo "WARNING: no project memory file found"
[ -d docs/recaps ] && echo "OK: recaps" || echo "INFO: no recaps yet"
[ -d docs/plans ] && echo "OK: plans" || echo "INFO: no plans yet"
If no project memory file exists, suggest running init-project-structure
(see References) to scaffold the methodology.
bash
python3 ~/.hermes/scripts/project-knowledge-index.py doctor 2>/dev/null | head -10
If healthy, note the chunk count and project list. Cross-project knowledge is available during the session. If not installed, skip — it's additive.
Read in this order:
bash
# Probe for recap directories
for dir in docs/recaps .hermes/recaps docs/daily-recaps; do
[ -d "$dir" ] && ls -t "$dir"/*.md 2>/dev/null | head -3 && break
done
Read the most recent recap in full. Read the previous 1-2 in headlines only (Summary, Plans worked on, Open questions).
bash
LATEST_RECAP=$(ls -t docs/recaps/SESSION-RECAP-*.md 2>/dev/null | head -1)
if [ -n "$LATEST_RECAP" ]; then
RECAP_DATE=$(date -r "$LATEST_RECAP" "+%Y-%m-%d %H:%M")
echo "Latest recap: $LATEST_RECAP ($RECAP_DATE)"
echo "--- Post-recap commits ---"
git log --since="$RECAP_DATE" --oneline -20
fi
Cross-reference commit messages against the recap's "Open questions" and "Doc updates deferred" sections. If commits resolved listed items, mute them in your state summary.
bash
grep -rl '^status: active' docs/plans/*.md .hermes/plans/*.md 2>/dev/null
Read each active plan in full. Note acceptance criteria progress (met/partial/unmet).
Cross-reference against recaps: If a recap claims a plan is completed
but the plan file still shows status: active, flag the discrepancy.
The plan file with its unchecked acceptance criteria is the source of truth.
bash
grep -riE '^##? ' docs/technical-documentation.md docs/functional-specifications.md 2>/dev/null | head -20
Don't read the full files. Just know what sections exist.
Build and present:
text
## Last session: {date} — {one-line summary}
## Active plans: {list with criteria progress}
## Project knowledge graph: {healthy/unavailable}
## Deferred blockers: {schema drift, environment issues, etc.}
## Open follow-ups: {aggregated from recaps, minus what git resolved}
Then ask: "What do you want to work on?"
/opt/homebrew/CLAUDE.md is Homebrew, not a projectUse before starting non-trivial work. Creates an ISO-date-prefixed plan file at
docs/plans/YYYY-MM-DD-<slug>.md.
Each plan file has YAML frontmatter and the following sections:
markdown
---
status: draft|active|completed|cancelled
created: YYYY-MM-DD
updated: YYYY-MM-DD
slug: feature-name
---
# Plan: Feature Name
## Context
Why this work exists. What problem does it solve? What's the user-facing or
system-facing gap? Include references to relevant docs, user feedback, or
observed behavior.
## Approach
How the feature will be built. Technical approach, key design decisions,
trade-offs made. Think-aloud rather than final spec.
## Acceptance Criteria
- [ ] Criterion 1 — verifiable, specific
- [ ] Criterion 2
- [ ] Criterion 3
## Files to be touched
- `path/to/file.ts` — what changes
- `path/to/new-file.ts` — new file
## Out of scope
- What this plan explicitly does NOT cover
## Verification
How to confirm it works. Manual steps, test commands, URL patterns.
## Linked artifacts
- `docs/features/X.md` — update with new behavior
status: completed and bump updated: in the same turn as the final
commit. Do not defer this to recap or wrapup.The actual work happens here. Methodology considerations during build:
[BLOCKED] tagprisma db push for changes going to staging/production —
use prisma migrate dev + prisma migrate deployUse at the natural end of a working session after implementation. Drafts a
structured recap at docs/recaps/SESSION-RECAP-YYYY-MM-DD.md.
markdown
# Session Recap — YYYY-MM-DD
## Summary
One-paragraph overview of what was accomplished.
## Plans worked on
For each plan touched this session:
- Plan name and status after session
- Acceptance criteria walk: met/partial/unmet with notes
## Commits
| Hash | Message |
|------|---------|
| `abc1234` | feat: description |
## What was added
New files, features, infrastructure. Describe what and why.
## What was fixed
Bugs found and fixed. Include root cause.
## Files changed
Organized by category (backend, frontend, scripts, docs).
## Doc updates applied
List contract docs updated inline this session.
## Doc updates deferred
List contract docs that need updates but were deferred.
These MUST be addressed before the next session on this area.
## Open questions / next steps
Unresolved issues, known follow-ups, items for the next session.
git log --oneline for the sessionstatus: completedUse at session end. Ensures the next session picks up cleanly.
bash
ls -t docs/recaps/*.md 2>/dev/null | head -1
If no recap was written (trivial session), note it.
bash
wc -l CLAUDE.md
If >300 lines, suggest a CLAUDE.md organization pass.
bash
git status --short | head -20
If uncommitted work exists, note it in the wrap-up. Never commit on the user's behalf.
bash
grep -rl '^status: active' docs/plans/*.md 2>/dev/null
For any plan whose work was completed this session but still shows active,
flag the staleness. The recap should have handled this, but catch it here
as a safety net.
Scan the recap's "Doc updates deferred" section. If any exist, they go into the next session's warmup state summary as open follow-ups.
bash
python3 ~/.hermes/scripts/project-knowledge-index.py index 2>/dev/null
This picks up the new recap, updated plans, modified project memory file content, and any new or changed skills.
bash
wc -l CLAUDE.md # should be ≤300
git status CLAUDE.local.md # should be hidden by gitignore
A one-paragraph summary of what the next session should pick up:
bash
# Find project root
find ~ -maxdepth 5 -name "CLAUDE.md" 2>/dev/null | head -5
search_files(path="~", pattern="CLAUDE.md", limit=10)
search_files(path="~", pattern="PROJECT.md", limit=10)
# Find active plans
grep -rl '^status: active' docs/plans/*.md .hermes/plans/*.md 2>/dev/null
# Find recent recaps
ls -t docs/recaps/*.md | head -3
# Check post-recap commits
git log --since="$(date -r docs/recaps/SESSION-RECAP-*.md '+%Y-%m-%d %H:%M')" --oneline -20
# Read contract doc sections
grep -riE '^##? ' docs/technical-documentation.md docs/functional-specifications.md 2>/dev/null | head -20
# Check git status
git status --short
# Check project memory file size
wc -l CLAUDE.md
text
draft → active → completed
→ cancelled
→ (archived)
Transition rules:
draft → active: User approves plan, work beginsactive → completed: All ACs confirmed metactive → cancelled: Superseded by a newer plan or abandonedcompleted → active — if work resumes, create a new plantext
project/
├── CLAUDE.md # Slim router — hard rules, pointers, today's state
├── CLAUDE.local.md # Gitignored — credentials, URLs (never commit)
├── docs/
│ ├── recaps/ # Session recaps — SESSION-RECAP-YYYY-MM-DD.md
│ ├── plans/ # Feature plans — YYYY-MM-DD-slug.md
│ ├── architecture/ # Architecture docs
│ ├── features/ # Feature docs
│ └── operations/ # Operations and pipeline docs
├── TECHNICAL-DOCUMENTATION.md # Technical contract
└── FUNCTIONAL-SPECIFICATIONS.md # Functional contract
references/stale-data-verification.md — how to verify dynamic data against
live sources instead of trusting snapshot filesreferences/project-scaffold.md — complete instructions for
init-project-structure and slim-claude-md workflowstemplates/plan.md — markdown template for feature planstemplates/recap.md — markdown template for session recaps