session-resume
Session continuity — save/restore state, git gate, sparse skill pre-load, Engram recall
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- session-resume
- triggers
- session resume, dónde lo dejamos, continuá, session start, code memory, memory, recordar, acordate, multi-session, donde quedamos, handoff
- changelog
- docs/ciclos/cycle28-20260815.md
- description
- Session continuity — save/restore state, git gate, sparse skill pre-load, Engram recall
- token_budget
- 2400
03 SKILL.md 正文
When to Use
- Is git repo? NO →
mem_contextonly. YES → check 2 states. - Dirty (uncommitted)? WARN+ask: commit/stash/continue.
- Ahead (unpushed)? WARN+ask: push/keep/continue.
- Both clean → silent,
mem_contextonly. - One question, max 4 options. Terse (numbers+paths).
Output (dirty)
{branch}: {N} uncommitted ({paths}) + {M} unpushed ({sha} {msg})
Action: commit/push/stash/continue?
commit→git add -A+msg · push→git push (quality-gate) · stash→git stash push -m "auto-stash" · continue→Engram.
Refs
dreaming · skill-graph · recovery-protocol · context-watchdog · quality-gate
Anti-Patterns
Auto-commit/push · mid-task runs · output >10 lines · skip "small project" · skip skill-graph
Anti-Rationalization
| Rationalization | Red Flag | Verification |
|---|---|---|
| "Continue without checking git" | Skipping dirty/ahead states 2-3 | git status --porcelain=v1 -b before any work — dirty/ahead must be WARNed |
| "Session is small, no need" | Auto-skip skill-graph/Engram | Even tiny session → mem_context (cost ~0, saves hours) |
| "Will remember later" | Not calling mem_save before RED zone | Every 25 calls or YELLOW → mem_save(topic_key=checkpoint/session-state) |
Red Flags
- Unpushed commits silently growing (>5 ahead) → push now or
git branchdiverges — STOP new work until push/stash/continue is chosen (When to Use 2-3) - Restoring session without
mem_context→ re-discover what you already solved
Verification
git status --porcelain=v1 -brun before any work — dirty/ahead states drive When-to-Use paths 2–4- Resume output matches the
## Output (dirty)contract:{branch}: {N} uncommitted…, ≤10 lines, ≤4 options - Branch/commit info verified via
git rev-parse --abbrev-ref HEAD+git log --oneline -3 mem_contextrecalled before restore;mem_save(topic_key=checkpoint/session-state)every 25 calls or YELLOW zone
docs/skills/session-resume/reference.md
04 同仓库更多 Skills
web-quality-audit
Comprehensive web audit: performance, a11y, SEO, responsive, animation, design tokens.
ui-engine
UI system — Grid/Flexbox/@layer/:has(), container queries, compositor-only animation, OKLCH tokens, component patterns
baseline-ui
Anti-slop UI — layout, typography, responsive, animation, tokens. Use for cleanup or polish.
skill-creator
Create new AI agent skills following Agent Skills spec -- auto-bootstrap unknown tasks, define structure, register in AGENTS.md
senior-engineer
Apply senior engineering competencies — system design, trade-off analysis, delegation, mentoring, and tech debt strategy
prompt-engineering
Design effective prompts using SPEARS framework — scope, principles, examples, assertions, refinements, with ReAct and multi-agent patterns