stop
Use Cautionnpx machina-cli add skill anombyte93/atlas-session-lifecycle/stop --openclawSession Stop Skill
Graceful session close, pause, or verification. Three intents: Pause | Finish | Verify.
All session operations use atlas-session MCP tools directly (prefixed session_* and contract_*). Use ToolSearch to discover them.
Hard Invariants
- User authority is absolute — AI NEVER closes without confirmation.
- Human-visible memory only — All state lives in files.
- Trust separation — for bounty verify, spawn a separate finality Task agent. Never the same agent that submits.
- AtlasCoin is optional — if down, skip bounty steps and continue.
- Idempotent — Running /stop on an already-closed session exits cleanly.
- Archive after verification — Soul purpose is archived AFTER bounty settlement, not before.
UX Contract
- User sees ONE intent question, then results. Nothing else.
- No step announcements, no narration, no internal process descriptions.
Phase 0: Sync + State Detection
First, save the current session state so context files are up to date:
- Invoke
/sync— updates all session-context files and MEMORY.md with current progress. Silent, no output shown.
Then detect state:
- Call
session_read_context(project_dir)— get soul purpose, status hint, open tasks. - If
status_hintisno_purposeor soul purpose is empty: tell user "No active soul purpose to close." EXIT. - Check bounty: if
session-context/BOUNTY_ID.txtexists, callcontract_get_status(project_dir). StoreHAS_BOUNTY.
Phase 1: Intent Question
Ask ONE question via AskUserQuestion:
Question: "Soul purpose: '[soul purpose text]'. What would you like to do?"
- "Pause for the day" — Save state, keep purpose active.
- "Finished — verify and close" — Full settlement + PR + archive.
- "Just verify" — Check status, show results, return to work.
- "Cancel" — Do nothing. EXIT.
Store the user's choice as INTENT.
Read custom.md if it exists, follow instructions under "During Settlement".
Intent A: Pause for the Day
Save progress. Soul purpose, bounty, and Ralph Loop all stay active.
Step 1: Harvest
- Call
session_harvest(project_dir). - If promotable content exists, assess and present to user for approval.
- After approval, append promoted content to target files via Edit tool.
Step 2: Write Checkpoint
Read session-context/CLAUDE-activeContext.md, then append a timestamped checkpoint:
## [CHECKPOINT] HH:MM DD/MM/YY
### Session Paused — Progress Saved
**Accomplished this session:**
- [AI fills in based on what was done]
**In progress:**
- [AI fills in based on current state]
**Next steps:**
- [AI fills in based on remaining work]
**Blockers/Decisions pending:**
- [AI fills in, or "None"]
Fill each section with real, specific content — not placeholders.
Step 3: Optional Save-Point Commit
Ask: "Create a save-point commit?" (Yes / No)
If Yes and project is git: git add -A && git commit -m "checkpoint: [brief summary]". If commit fails, inform user and continue.
Step 4: Done
- Do NOT archive the soul purpose — it stays active.
- Do NOT settle the bounty — it stays active.
- Do NOT remove Ralph Loop indicator.
- Tell user: "Progress saved. Soul purpose '[text]' remains active. Run
/startto pick up where you left off."
Intent B: Finished — Verify and Close
Full settlement: harvest, verify, review, PR, bounty, archive.
Step 1: Harvest + Promote
- Call
session_harvest(project_dir). - If promotable content exists, assess and present to user. Append approved content.
Step 2: Feature Verification
- Call
session_features_read(project_dir). - If pending features exist, run their proofs. Update status in
CLAUDE-features.md.
Step 3: Verification Gate
- Invoke
superpowers:verification-before-completion— run doubt review on recent changes. - If critical issues: present to user — "Fix first" / "Close anyway" / "Continue working".
- If "Continue working": EXIT (return to active work).
Step 4: Deactivate Hook
Call session_hook_deactivate(project_dir).
Step 5: PR Creation
- Push current branch:
git push -u origin HEAD - Invoke
superpowers:requesting-code-reviewfor review body. - Create PR:
gh pr create --title "..." --body "..."with review summary. - Return PR URL to user.
Step 6: Bounty Settlement (if bounty exists)
- Call
contract_run_tests(project_dir)— execute all criteria. - If tests pass: call
contract_submit(project_dir). - Spawn a single finality Task agent:
Task(subagent_type: "general-purpose", prompt: "You are finality-agent. Verify bounty [ID] independently. Call contract_verify(project_dir). Report pass/fail.") - Wait for finality result.
- If verified: call
contract_settle(project_dir). Tell user tokens earned. - If failed: "Fix and re-verify" / "Close anyway (forfeit)" / "Continue working".
Step 7: Archive + Cleanup
- If user chose to set a new purpose, ask for it now. Store as
NEW_PURPOSE. - Call
session_archive(project_dir, OLD_PURPOSE, NEW_PURPOSE). - Remove Ralph Loop indicator:
rm -f ~/.claude/ralph-loop.local.md - Tell user: "Session closed. Soul purpose '[text]' archived." (Include token/PR info.)
Intent C: Just Verify
Check status without closing. Return to work after.
- Invoke
superpowers:verification-before-completion— doubt review. - Call
session_features_read(project_dir)— show feature status. - If bounty exists: call
contract_run_tests(project_dir)— show results. - Present all findings to user. No close, no archive.
- Tell user: "Verification complete. Returning to work."
Source
git clone https://github.com/anombyte93/atlas-session-lifecycle/blob/main/skills/stop/SKILL.mdView on GitHub Overview
Session Stop gracefully closes, pauses, or verifies a session. It defines three intents—Pause, Finish, and Verify—and uses atlas-session MCP tools to read context, harvest promotable content, save progress, and handle bounty and archive flows. The process enforces user authority, memory-only state, and idempotence.
How This Skill Works
Phase 0 synchronizes state with /sync and reads context via session_read_context. Phase 1 asks a single intent question; based on the choice, Pause saves progress and keeps the soul purpose active, or Finish performs harvest, verification, PR creation, bounty settlement, and archiving. All operations invoke the session_* and contract_* tools directly, with a separate finality task for bounty verification when needed.
When to Use It
- User wants to pause the session for the day and keep the soul purpose active
- User wants finished status with full settlement and archive
- User wants to verify status without closing the session
- User chooses Cancel to exit the stop flow without changes
- System detects no active soul purpose to close and informs the user
Quick Start
- Step 1: Run /sync and read session context with session_read_context
- Step 2: Ask ONE intent question and capture the user's choice (Pause / Finish / Verify)
- Step 3: Execute the chosen path: Pause saves progress, Finish settles and archives, Verify shows status
Best Practices
- Ask ONE clear intent question with distinct options; avoid multiple prompts
- Harvest promotable content before applying changes and obtain explicit approval
- Save progress to stable checkpoints and preserve the soul purpose when pausing
- Respect user authority: do not close or settle without confirmation
- Archive only after verification and bounty finality steps; handle optional AtlasCoin downtime
Example Use Cases
- Pause for the day: user selects pause; progress is saved and the soul purpose remains active
- Finished — verify and close: harvests content, verifies, creates PR, settles bounty, and archives
- Just verify: performs status checks and returns results without closing the session
- Cancel: user cancels the stop flow; no state changes are made
- No active soul purpose: system responds with 'No active soul purpose to close.'