jagreehal avatar

session-continuity

Persistent task workflow with state machine. Every message MUST announce state. Uses .claude/ files

提供方 jagreehal|开源

Session Continuity

Critical rules

  • State lives in project .claude/ files (tasks.md, requirements.md, session.md), not conversation memory.
  • EVERY message must start with the current state prefix.
  • Never re-derive progress by investigating the codebase — read session.md.
  • Never auto-advance tasks; never commit for the user; never use TodoWrite.
  • VERIFY before COMPLETE; mark [x] only after user yes in AWAITING_COMMIT.
  • Before operating or setting up, read references/state-machine.md and references/setup-and-antipatterns.md.

Workflow

  1. On "continue": enter CHECK_STATUS — read only session.md, route by Status.
  2. WORKING: implement current task only; update session.md at triggers.
  3. VERIFY: run all requirements verification commands; show output; fail → WORKING.
  4. COMPLETE → CHECK_STATUS → AWAITING_COMMIT (ask permission, STOP).
  5. On yes: MARK_COMPLETE then CHECK_STATUS for next task.
  6. On "create a plan" / "setup tasks": create the three files per setup reference.

Resources

Validation

  • Every message has state prefix
  • Three .claude/ files exist at project root
  • CHECK_STATUS only reads session.md
  • VERIFY ran all commands with verbatim output
  • No [x] without user approval; no TodoWrite; no agent commits

Constraints

  • Not for single self-contained one-session changes.
  • Related: implementation-planning, verification-before-completion, tdd-workflow, investigation-modes, create-tasks.