Browse Source

feat: Replace /plan with /save + /sync commands

Session state management now uses two dedicated commands:
- /save: Persist TodoWrite tasks, plan content, git context
- /sync: Bootstrap project, restore saved state, show status

This avoids collision with Claude Code's native /plan mode while
providing cleaner separation of concerns.

Changes:
- Add commands/save.md - session state persistence
- Update commands/sync.md - add state restore + new flags
- Delete commands/plan.md - replaced by save/sync
- Flag canvas-tui as experimental in README + frontmatter
- Update all references across docs, skills, agents

Implements pattern from Anthropic's "Effective Harnesses for
Long-Running Agents" engineering post.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0xDarkMatter 3 months ago
parent
commit
2341347b2e

+ 1 - 1
.claude-plugin/plugin.json

@@ -19,7 +19,7 @@
   "components": {
     "commands": [
       "commands/sync.md",
-      "commands/plan.md",
+      "commands/save.md",
       "commands/review.md",
       "commands/testgen.md",
       "commands/explain.md",

+ 1 - 1
AGENTS.md

@@ -4,7 +4,7 @@
 
 This is **claude-mods** - a collection of custom extensions for Claude Code:
 - **23 expert agents** for specialized domains (React, Python, Go, Rust, AWS, etc.)
-- **11 slash commands** for workflows (/sync, /plan, /review, /atomise, etc.)
+- **11 slash commands** for workflows (/sync, /save, /review, /atomise, etc.)
 - **30 skills** for CLI tool integration, patterns, and workflows
 - **Custom output styles** for response personality (e.g., Vesper)
 

+ 22 - 15
README.md

@@ -8,7 +8,7 @@ A comprehensive extension toolkit for [Claude Code](https://docs.anthropic.com/e
 
 Claude Code is powerful out of the box, but it has gaps. This toolkit fills them:
 
-- **Session continuity** — TodoWrite tasks vanish when sessions end. We fix that with `/plan --save` and `/plan --load`, implementing Anthropic's [recommended pattern](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) for long-running agents.
+- **Session continuity** — TodoWrite tasks vanish when sessions end. We fix that with `/save` and `/sync`, implementing Anthropic's [recommended pattern](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) for long-running agents.
 
 - **Expert-level knowledge on demand** — 23 specialized agents covering React, TypeScript, Python, Go, Rust, AWS, PostgreSQL, and more. Each agent is deeply researched with real-world patterns, not generic advice.
 
@@ -94,8 +94,8 @@ Then symlink or copy to your Claude directories:
 
 | Command | Description |
 |---------|-------------|
-| [sync](commands/sync.md) | Session bootstrap - read project context (README, AGENTS, docs, skills, agents). Quick orientation. |
-| [plan](commands/plan.md) | Unified planning command: create plans, save/load session state, show status. Interactive by default. |
+| [sync](commands/sync.md) | Session bootstrap - read project context, restore saved state, show status. Quick orientation with optional deep dive. |
+| [save](commands/save.md) | Save session state - persist TodoWrite tasks, plan content, and git context. |
 | [review](commands/review.md) | Code review staged changes or specific files. Analyzes bugs, security, performance, style. |
 | [testgen](commands/testgen.md) | Generate tests with expert routing, framework detection, focus/depth modes. |
 | [explain](commands/explain.md) | Deep explanation of complex code, files, or concepts. Architecture, data flow, design decisions. |
@@ -106,6 +106,14 @@ Then symlink or copy to your Claude directories:
 | [setperms](commands/setperms.md) | Set tool permissions and CLI preferences. |
 | [archive](commands/archive.md) | Archive completed plans and session state. |
 
+### Experimental Commands
+
+> ⚠️ These features are under active development. APIs may change.
+
+| Command | Description |
+|---------|-------------|
+| [canvas](commands/canvas.md) | Terminal canvas for content drafting with live markdown preview. Requires Warp terminal. |
+
 ### Skills
 
 #### Pattern Reference Skills
@@ -132,7 +140,7 @@ Then symlink or copy to your Claude directories:
 | [tool-discovery](skills/tool-discovery/) | Recommend agents and skills for any task |
 | [git-workflow](skills/git-workflow/) | Enhanced git operations with lazygit, gh, delta |
 | [doc-scanner](skills/doc-scanner/) | Scan and synthesize project documentation |
-| [project-planner](skills/project-planner/) | Track stale plans, suggest /plan command |
+| [project-planner](skills/project-planner/) | Track stale plans, suggest session commands |
 | [python-env](skills/python-env/) | Fast Python environment management with uv |
 | [task-runner](skills/task-runner/) | Run project commands with just |
 
@@ -250,13 +258,13 @@ just list-agents  # List all agents
 
 ## Session Continuity
 
-The `/plan` command fills a gap in Claude Code's native session management.
+The `/save` and `/sync` commands fill a gap in Claude Code's native session management.
 
 **The problem:** Claude Code's `--resume` flag restores conversation history, but **TodoWrite task state does not persist between sessions—by design**. Claude Code treats each session as isolated; the philosophy is that persistent state belongs in files you control.
 
 TodoWrite tasks are stored at `~/.claude/todos/[session-id].json` and deleted when the session ends. This is intentional.
 
-**The solution:** `/plan --save` and `/plan --load` implement the pattern from Anthropic's [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents):
+**The solution:** `/save` and `/sync` implement the pattern from Anthropic's [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents):
 
 > "Every subsequent session asks the model to make incremental progress, then leave structured updates."
 
@@ -273,22 +281,21 @@ TodoWrite tasks are stored at `~/.claude/todos/[session-id].json` and deleted wh
 
 ```
 Session 1:
-  /sync                              # Bootstrap - read project context
+  /sync                              # Bootstrap + restore saved state
   [work on tasks]
-  /plan --save "Stopped at auth module"  # Writes .claude/session-cache.json
+  /save "Stopped at auth module"     # Writes .claude/session-cache.json
 
 Session 2:
-  /sync                              # Read project context
-  /plan --load                       # Restore TodoWrite, show what changed
+  /sync                              # Restore TodoWrite, show status
   → "In progress: Auth module refactor"
   → "Notes: Stopped at auth module"
-  /plan --status                     # Quick status check anytime
+  /sync --status                     # Quick status check anytime
 ```
 
 ### Why Not Just Use `--resume`?
 
-| Feature | `--resume` | `/plan --save/--load` |
-|---------|------------|-----------------------|
+| Feature | `--resume` | `/save` + `/sync` |
+|---------|------------|-------------------|
 | Conversation history | Yes | No |
 | TodoWrite tasks | **No** | Yes |
 | Git context | No | Yes |
@@ -297,7 +304,7 @@ Session 2:
 | Works across machines | No | Yes (if committed) |
 | Team sharing | No | Yes |
 
-**Use both together:** `claude --resume` for conversation context, `/plan --load` for task state.
+**Use both together:** `claude --resume` for conversation context, `/sync` for task state.
 
 ## Updating
 
@@ -311,7 +318,7 @@ Then re-run the install script to update your global Claude configuration.
 
 - [Claude Code Best Practices](https://www.anthropic.com/engineering/claude-code-best-practices) — Official Anthropic guide
 - [Claude Code Plugins](https://claude.com/blog/claude-code-plugins) — Plugin system documentation
-- [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) — The pattern behind `/plan --save`
+- [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) — The pattern behind `/save`
 
 ---
 

+ 2 - 2
agents/project-organizer.md

@@ -585,10 +585,10 @@ Example: "Claude, [do something]"
 
 ## Project Planning
 
-This project uses `/plan` for task management:
+This project uses `/save` and `/sync` for task management:
 - `docs/PLAN.md` - Project goals, progress, and active tasks
 
-Run `/plan --review` to see current status or `/plan --sync` to update from git.
+Run `/sync --status` to see current status or `/sync --git` to update from commits.
 
 ## Tips & Best Practices
 

+ 3 - 0
commands/canvas.md

@@ -1,9 +1,12 @@
 ---
 description: "Terminal canvas for content drafting with live preview. Start split-pane sessions for email, message, and document composition. Triggers on: canvas, draft, compose, write content."
+experimental: true
 ---
 
 # Canvas - Terminal Content Drafting
 
+> ⚠️ **EXPERIMENTAL** - This feature is under active development. APIs may change. Requires Warp terminal for best experience.
+
 Terminal canvas for interactive content drafting with Claude. Creates a split-pane experience in Warp terminal where Claude writes content and you see live markdown preview.
 
 ## Arguments

+ 3 - 3
commands/explain.md

@@ -47,7 +47,7 @@ $ARGUMENTS
     └─→ Step 5: Integrate
           ├─ Offer to save to ARCHITECTURE.md (if significant)
-          └─ Link to /plan --save if working on related task
+          └─ Link to /save if working on related task
 ```
 
 ## Execution Steps
@@ -304,8 +304,8 @@ command -v tokei >/dev/null 2>&1 || echo "ℹ tokei not installed - skipping sta
 |---------|--------------|
 | `/review` | Review after understanding |
 | `/test` | Generate tests for explained code |
-| `/plan --save` | Save progress if working on related task |
-| `/plan` | Add architectural insights to project plan |
+| `/save` | Save progress if working on related task |
+| Native `/plan` | Enter Claude Code's planning mode for implementation |
 
 ## Persistence
 

+ 0 - 670
commands/plan.md

@@ -1,670 +0,0 @@
----
-description: "Unified project planning and session continuity. Create plans, save/load state, track progress. Smart defaults with context detection."
----
-
-# Plan - Project Planning & Session Continuity
-
-Unified command for strategic planning and session state management. Creates persistent plans, saves/loads session state, and provides intelligent context-aware defaults.
-
-## Arguments
-
-$ARGUMENTS
-
-- No args: **Interactive mode** - detects context, suggests action
-- `<goal>`: Create or update plan for goal
-- `save "notes"` or `--save`: Save session state (TodoWrite, plan context, git)
-- `load` or `--load`: Restore session state from previous save
-- `status` or `--status`: Quick read-only status view
-- `sync` or `--sync`: Auto-update plan progress from git commits
-- `diff` or `--diff`: Show what changed since last update
-- `clear` or `--clear`: Archive current plan and start fresh
-
-**Note:** Subcommands work with or without the `--` prefix.
-
-## Architecture
-
-```
-/plan [goal] [--save|--load|--status|--sync|--clear]
-    │
-    ├─→ No args: INTERACTIVE MODE
-    │     │
-    │     ├─ No plan exists?
-    │     │   └─ "No plan found. Create one: /plan 'your goal'"
-    │     │
-    │     ├─ Plan exists + saved state exists?
-    │     │   ├─ State is stale (>2 hours)?
-    │     │   │   └─ "Welcome back! Load previous session? (Y/n)"
-    │     │   └─ State is fresh?
-    │     │       └─ Show status + "Continue: <in_progress_task>"
-    │     │
-    │     └─ Plan exists + no saved state?
-    │         └─ Show status + "Save before leaving: /plan --save"
-    │
-    ├─→ /plan "goal"
-    │     ├─ Capture conversation context (goals, decisions, approaches)
-    │     ├─ Capture git context (branch, uncommitted, recent commits)
-    │     ├─ Merge with existing docs/PLAN.md if present
-    │     └─ Write updated plan
-    │
-    ├─→ /plan --save "notes"
-    │     ├─ Capture TodoWrite state
-    │     ├─ Capture current plan step
-    │     ├─ Capture git context
-    │     ├─ Write .claude/session-cache.json
-    │     └─ Write .claude/claude-progress.md (human-readable)
-    │
-    ├─→ /plan --load
-    │     ├─ Read .claude/session-cache.json
-    │     ├─ Restore TodoWrite tasks
-    │     ├─ Show what changed since save
-    │     └─ Suggest next action
-    │
-    ├─→ /plan --status
-    │     ├─ Read docs/PLAN.md
-    │     ├─ Read TodoWrite state
-    │     ├─ Read git state
-    │     └─ Display unified view
-    │
-    ├─→ /plan --sync
-    │     ├─ Parse recent git commits
-    │     ├─ Match to plan steps
-    │     └─ Auto-update step status
-    │
-    └─→ /plan --clear
-          ├─ Archive to docs/PLAN-<date>.md
-          └─ Start fresh
-```
-
----
-
-## Interactive Mode (No Args)
-
-When you run `/plan` with no arguments, it detects your context and suggests the right action:
-
-### Scenario 1: No Plan Exists
-
-```
-📋 Plan Status
-
-No plan found at docs/PLAN.md
-
-Get started:
-  /plan "your project goal"    Create a new plan
-  /plan --status               View current tasks and git state
-```
-
-### Scenario 2: Plan Exists, Saved State Available
-
-```
-📋 Plan Status
-
-┌─ Welcome Back ─────────────────────────────────────────────────────────────────┐
-│ Last saved: 3 hours ago                                                        │
-│ Branch: feature/auth                                                           │
-│                                                                                 │
-│ You were working on:                                                           │
-│   ◐ Step 3: Implement OAuth flow                                               │
-│   Task: Fix callback URL handling                                              │
-│                                                                                 │
-│ Notes: "Stopped at redirect issue"                                             │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-Load previous session? [Y/n]
-```
-
-### Scenario 3: Plan Exists, No Saved State
-
-```
-📋 Plan Status
-
-┌─ Plan ─────────────────────────────────────────────────────────────────────────┐
-│ Goal: Add user authentication with OAuth2                                      │
-│                                                                                 │
-│ ✓ Step 1: Research OAuth providers                                             │
-│ ✓ Step 2: Set up Google OAuth app                                              │
-│ ◐ Step 3: Implement OAuth flow  ← CURRENT                                      │
-│ ○ Step 4: Add token refresh                                                    │
-│ ○ Step 5: Write integration tests                                              │
-│                                                                                 │
-│ Progress: ██████░░░░ 40% (2/5)                                                 │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-┌─ Tasks ────────────────────────────────────────────────────────────────────────┐
-│ ◐ Fix callback URL handling                                                    │
-│ ○ Add token refresh logic                                                      │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-┌─ Git ──────────────────────────────────────────────────────────────────────────┐
-│ Branch: feature/auth                                                           │
-│ Uncommitted: 3 files (+45/-12)                                                 │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-Suggestions:
-  → Continue: Fix callback URL handling
-  → Save before leaving: /plan --save
-```
-
----
-
-## Create/Update Plan: `/plan "goal"`
-
-Creates or updates `docs/PLAN.md` with strategic planning.
-
-### What It Captures
-
-**From conversation:**
-- Goal statements ("I want to...", "We need to...")
-- Approach discussions ("Option A vs B")
-- Decisions made ("Let's go with...")
-- Steps identified ("First... then...")
-- Open questions
-
-**From git:**
-- Current branch
-- Uncommitted changes
-- Recent commits
-
-### Plan Format: `docs/PLAN.md`
-
-```markdown
-# Project Plan
-
-**Goal**: Add user authentication with OAuth2
-**Created**: 2025-12-13
-**Last Updated**: 2025-12-13
-**Status**: In Progress
-
-## Context
-
-Building OAuth2 authentication for the web app. Need to support Google
-and GitHub providers initially, with ability to add more later.
-
-## Approach
-
-Using JWT tokens with refresh rotation. Chose this over session-based
-auth for better scalability and API compatibility.
-
-### Alternatives Considered
-- **Session-based auth**: Simpler but doesn't scale well
-- **Auth0/Clerk**: Good but adds external dependency
-
-## Implementation Steps
-
-### Completed
-- ✓ Step 1: Research OAuth providers [S]
-  - Completed: 2025-12-12
-  - Commit: `abc123` research: Compare OAuth providers
-
-- ✓ Step 2: Set up Google OAuth app [S]
-  - Completed: 2025-12-12
-  - Commit: `def456` feat: Add Google OAuth credentials
-
-### In Progress
-- ◐ Step 3: Implement OAuth flow [M]
-  - Started: 2025-12-13
-  - Notes: Working on callback URL handling
-
-### Pending
-- ○ Step 4: Add token refresh [S]
-- ○ Step 5: Write integration tests [M]
-
-## Uncommitted Changes
-
-```
-📊 Working Tree Status:
-  Modified:  3 files (+127/-45)
-
-  Files:
-  • src/auth/oauth.ts        +89/-12
-  • src/auth/callback.ts     +25/-20
-  • tests/auth.test.ts       +13/-13
-```
-
-## Decision Log
-
-| Date | Decision | Rationale |
-|------|----------|-----------|
-| 12-12 | Use JWT over sessions | Better API compatibility |
-| 12-12 | Start with Google only | Largest user base |
-
-## Blockers
-
-None currently.
-
-## Open Questions
-
-- Should we support "Remember me" functionality?
-- How long should refresh tokens last?
-
-## Success Criteria
-
-- [ ] Users can sign in with Google
-- [ ] Tokens refresh automatically
-- [ ] 90% test coverage on auth module
-
----
-*Plan managed by `/plan` command. Last captured: 2025-12-13 10:30*
-```
-
-### Execution Steps
-
-```bash
-# Step 1: Capture git context
-git branch --show-current
-git status --short
-git diff --stat
-git log --oneline -5
-
-# Step 2: Check existing plan
-cat docs/PLAN.md 2>/dev/null
-
-# Step 3: Analyze conversation for plan-related content
-# (Extract goals, decisions, approaches, steps)
-
-# Step 4: Merge and write
-mkdir -p docs
-# Write updated docs/PLAN.md
-```
-
----
-
-## Save State: `/plan --save "notes"`
-
-Persists session state for later restoration.
-
-### What It Saves
-
-| Data | Source | Destination |
-|------|--------|-------------|
-| TodoWrite tasks | Current session | `.claude/session-cache.json` |
-| Current plan step | `docs/PLAN.md` | `.claude/session-cache.json` |
-| Git context | `git status/log` | `.claude/session-cache.json` |
-| User notes | Command argument | `.claude/session-cache.json` |
-
-### Output Files
-
-**`.claude/session-cache.json`** (machine-readable):
-```json
-{
-  "version": "2.0",
-  "timestamp": "2025-12-13T10:30:00Z",
-  "todos": {
-    "completed": ["Set up OAuth credentials"],
-    "in_progress": ["Fix callback URL handling"],
-    "pending": ["Add token refresh"]
-  },
-  "plan": {
-    "file": "docs/PLAN.md",
-    "goal": "Add user authentication with OAuth2",
-    "current_step": "Step 3: Implement OAuth flow",
-    "current_step_index": 3,
-    "total_steps": 5,
-    "progress_percent": 40
-  },
-  "git": {
-    "branch": "feature/auth",
-    "last_commit": "abc123f",
-    "last_commit_message": "feat: Add OAuth config",
-    "uncommitted_count": 3
-  },
-  "notes": "Stopped at callback URL issue - need to fix redirect"
-}
-```
-
-**`.claude/claude-progress.md`** (human-readable):
-```markdown
-# Session Progress
-
-**Saved**: 2025-12-13 10:30 AM
-**Branch**: feature/auth
-
-## Plan Context
-
-**Goal**: Add user authentication with OAuth2
-**Current Step**: ◐ Step 3 - Implement OAuth flow
-**Progress**: ██████░░░░ 40% (2/5 steps)
-
-## Tasks
-
-- ✓ Set up OAuth credentials
-- ◐ Fix callback URL handling
-- ○ Add token refresh logic
-
-## Notes
-
-> Stopped at callback URL issue - need to fix redirect
-
----
-*Restore with: /plan --load*
-```
-
-### Output
-
-```
-✓ Session saved
-
-┌─ Saved State ──────────────────────────────────────────────────────────────────┐
-│ Plan: Step 3/5 (40%) - Implement OAuth flow                                    │
-│ Tasks: 1 completed, 1 in progress, 1 pending                                   │
-│ Git: 3 uncommitted files on feature/auth                                       │
-│ Notes: "Stopped at callback URL issue..."                                      │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-Files written:
-  • .claude/session-cache.json
-  • .claude/claude-progress.md
-
-Restore with: /plan --load
-```
-
----
-
-## Load State: `/plan --load`
-
-Restores session from previous save.
-
-### What It Does
-
-1. Reads `.claude/session-cache.json`
-2. Restores TodoWrite tasks
-3. Shows what changed since save
-4. Suggests next action
-
-### Output
-
-```
-📂 Session Loaded
-
-┌─ Time ─────────────────────────────────────────────────────────────────────────┐
-│ Saved: 2 hours ago (2025-12-13 10:30 AM)                                       │
-│ Branch: feature/auth                                                           │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-┌─ Plan Context ─────────────────────────────────────────────────────────────────┐
-│ Goal: Add user authentication with OAuth2                                      │
-│                                                                                 │
-│ ✓ Step 1: Research OAuth providers                                             │
-│ ✓ Step 2: Set up Google OAuth app                                              │
-│ ◐ Step 3: Implement OAuth flow  ← YOU WERE HERE                                │
-│ ○ Step 4: Add token refresh                                                    │
-│ ○ Step 5: Write integration tests                                              │
-│                                                                                 │
-│ Progress: ██████░░░░ 40% (2/5)                                                 │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-┌─ Restored Tasks ───────────────────────────────────────────────────────────────┐
-│ ◐ Fix callback URL handling                                                    │
-│ ○ Add token refresh logic                                                      │
-│ ✓ Set up OAuth credentials                                                     │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-┌─ Since Last Save ──────────────────────────────────────────────────────────────┐
-│ Commits: 0 new                                                                 │
-│ Files: 3 still uncommitted                                                     │
-│ Plan: unchanged                                                                │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-┌─ Notes ────────────────────────────────────────────────────────────────────────┐
-│ "Stopped at callback URL issue - need to fix redirect"                         │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-→ Continue with: Fix callback URL handling
-```
-
-### Edge Cases
-
-**Stale state (>7 days):**
-```
-⚠ Saved state is 12 days old
-
-Options:
-  1. Load anyway (tasks may still be relevant)
-  2. Start fresh: /plan --clear
-```
-
-**Branch changed:**
-```
-⚠ Branch changed since save
-
-Saved on: feature/old-branch
-Current:  feature/new-branch
-
-Options:
-  1. Load anyway
-  2. Switch back: git checkout feature/old-branch
-```
-
----
-
-## Status View: `/plan --status`
-
-Quick read-only view of current state.
-
-### Output
-
-```
-📊 Plan Status
-
-┌─ Plan ─────────────────────────────────────────────────────────────────────────┐
-│ Goal: Add user authentication with OAuth2                                      │
-│                                                                                 │
-│ ✓ Step 1: Research OAuth providers [S]                                         │
-│ ✓ Step 2: Set up Google OAuth app [S]                                          │
-│ ◐ Step 3: Implement OAuth flow [M]  ← CURRENT                                  │
-│ ○ Step 4: Add token refresh [S]                                                │
-│ ○ Step 5: Write integration tests [M]                                          │
-│                                                                                 │
-│ Progress: ██████░░░░ 40% (2/5)                                                 │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-┌─ Active Tasks ─────────────────────────────────────────────────────────────────┐
-│ ◐ Fix callback URL handling                                                    │
-│ ○ Add token refresh logic                                                      │
-└────────────────────────────────────────────────────────────────────────────────┘
-
-┌─ Git ──────────────────────────────────────────────────────────────────────────┐
-│ Branch: feature/auth                                                           │
-│ Uncommitted: 3 files (+45/-12)                                                 │
-│ Recent: abc123f feat: Add OAuth config                                         │
-└────────────────────────────────────────────────────────────────────────────────┘
-```
-
----
-
-## Sync from Git: `/plan --sync`
-
-Auto-updates plan step status from recent commits.
-
-### How It Works
-
-1. Parse recent git commits
-2. Match commit messages to plan steps
-3. Update step status in `docs/PLAN.md`
-
-```bash
-# Get recent commits
-git log --oneline -20
-
-# Match patterns like:
-#   "feat: Add OAuth config" → matches Step 2
-#   "fix: Token refresh" → matches Step 4
-```
-
-### Output
-
-```
-🔄 Syncing plan from git...
-
-Found matches:
-  • abc123f "feat: Add OAuth config" → Step 2 (marked complete)
-  • def456a "fix: Callback handling" → Step 3 (in progress)
-
-Updated docs/PLAN.md:
-  ✓ Step 2: now marked complete
-  ◐ Step 3: now marked in progress
-```
-
----
-
-## Clear and Archive: `/plan --clear`
-
-Archives current plan and starts fresh.
-
-```bash
-/plan --clear "New feature: payment processing"
-```
-
-### What It Does
-
-1. Moves `docs/PLAN.md` → `docs/PLAN-2025-12-13.md`
-2. Clears `.claude/session-cache.json`
-3. Creates new plan with provided goal
-
-### Output
-
-```
-📦 Archived: docs/PLAN.md → docs/PLAN-2025-12-13.md
-
-Starting fresh plan...
-```
-
----
-
-## Status Markers
-
-| Marker | Meaning |
-|--------|---------|
-| ✓ | Completed |
-| ◐ | In Progress |
-| ○ | Pending |
-| ⚠ | Blocked |
-
-## Effort Indicators
-
-| Tag | Meaning |
-|-----|---------|
-| `[S]` | Small - Quick task |
-| `[M]` | Medium - Moderate effort |
-| `[L]` | Large - Significant effort |
-
-Effort is relative to project, not time-based. Avoid time estimates.
-
----
-
-## Usage Examples
-
-```bash
-# Interactive mode - context-aware suggestions
-/plan
-
-# Create new plan
-/plan "Add user authentication with OAuth2"
-
-# Save session before leaving
-/plan --save "Stopped at redirect issue"
-
-# Load previous session
-/plan --load
-
-# Quick status check
-/plan --status
-
-# Sync progress from git commits
-/plan --sync
-
-# See what changed
-/plan --diff
-
-# Archive and start fresh
-/plan --clear "New feature: payments"
-```
-
----
-
-## Flags Reference
-
-| Flag | Effect |
-|------|--------|
-| `save "notes"` or `--save` | Save session state with optional notes |
-| `load` or `--load` | Restore session from saved state |
-| `status` or `--status` | Quick read-only status view |
-| `sync` or `--sync` | Auto-update from git commits |
-| `diff` or `--diff` | Show changes since last update |
-| `clear` or `--clear` | Archive current plan, start fresh |
-| `--capture` | Only capture context, no new planning |
-| `--verbose` | Show detailed operation output |
-
----
-
-## File Locations
-
-| File | Purpose | Git-tracked? |
-|------|---------|--------------|
-| `docs/PLAN.md` | Strategic plan | Yes |
-| `.claude/session-cache.json` | Session state | No (gitignored) |
-| `.claude/claude-progress.md` | Human-readable progress | No (gitignored) |
-| `docs/PLAN-<date>.md` | Archived plans | Yes |
-
----
-
-## Workflow Examples
-
-### Daily Session
-
-```bash
-# Start of day
-/plan                        # Interactive: loads previous state if exists
-
-# During work
-[implement features]
-/plan --status               # Quick check on progress
-
-# End of day
-/plan --save "Completed auth, starting tests tomorrow"
-```
-
-### With Native Plan Mode
-
-```bash
-# Enter Plan Mode for exploration
-[Shift+Tab]
-
-# Discuss approaches, make decisions
-[Explore codebase, discuss options]
-
-# Capture the thinking
-/plan --capture
-
-# Exit and implement
-[Shift+Tab]
-```
-
-### Multi-Session Feature
-
-```bash
-# Session 1
-/plan "Implement payment processing"
-[work on steps 1-2]
-/plan --save "Done with Stripe setup"
-
-# Session 2
-/plan --load                 # Restore context
-[work on steps 3-4]
-/plan --sync                 # Update from commits
-/plan --save "Payment flow working"
-
-# Session 3
-/plan --load
-[complete remaining work]
-/plan --clear "Next: Add subscriptions"
-```
-
----
-
-## Notes
-
-- **Never destructive** - Always archives before clearing
-- **Git-aware** - Tracks uncommitted changes and recent commits
-- **Session-aware** - Knows when state is stale
-- **Human-readable** - Progress files work without Claude Code
-- **Smart defaults** - No args = intelligent context detection

+ 7 - 7
commands/review.md

@@ -58,7 +58,7 @@ $ARGUMENTS
     └─→ Step 6: Integration
           ├─ Auto-create TodoWrite for CRITICAL issues
-          ├─ Link to /plan --save for tracking
+          ├─ Link to /save for tracking
           └─ Suggest follow-up: /test, /explain
 ```
 
@@ -260,7 +260,7 @@ The expert produces a structured review:
 
 - Run `/test src/auth/` to verify security fix
 - Run `/explain src/auth/login.ts` for deeper understanding
-- Use `/plan --save` to track these issues
+- Use `/save` to track these issues
 ```
 
 ### Step 6: Integration
@@ -278,7 +278,7 @@ TodoWrite:
 **Link to session management:**
 ```
 Issues have been added to your task list.
-Run /plan --save to persist before ending session.
+Run /save to persist before ending session.
 ```
 
 ## Severity System
@@ -423,8 +423,8 @@ command -v delta >/dev/null 2>&1 && git diff --cached | delta || git diff --cach
 |---------|--------------|
 | `/explain` | Deep dive into flagged code |
 | `/test` | Generate tests for issues found |
-| `/plan --save` | Persist review findings to session state |
-| `/plan` | Add review findings to project plan |
+| `/save` | Persist review findings to session state |
+| Native `/plan` | Enter Claude Code's planning mode |
 
 ## Workflow Examples
 
@@ -441,7 +441,7 @@ git commit -m "feat: add user auth"
 /review --pr 123 --thorough
 # Creates TodoWrite tasks for critical issues
 # Fix issues...
-/plan --save "Addressed review findings"
+/save "Addressed review findings"
 ```
 
 ### Security Audit
@@ -455,6 +455,6 @@ git commit -m "feat: add user auth"
 - Reviews are suggestions, not absolute rules
 - Context matters - some "issues" may be intentional
 - CRITICAL issues are auto-added to TodoWrite
-- Use `/plan --save` to persist review tasks across sessions
+- Use `/save` to persist review tasks across sessions
 - Expert agents provide framework-specific insights
 - Respects project conventions from AGENTS.md

+ 271 - 0
commands/save.md

@@ -0,0 +1,271 @@
+---
+description: "Save session state - persist TodoWrite tasks, plan content, and git context. Complementary to /sync."
+---
+
+# Save - Session State Persistence
+
+Persist your current session state for later restoration with `/sync`.
+
+## Arguments
+
+$ARGUMENTS
+
+- No args: Save current state (TodoWrite, plan, git context)
+- `"notes"`: Save with descriptive notes
+- `--archive`: Archive current plan to `PLAN-<date>.md`, then save fresh
+
+## What It Saves
+
+| Data | Source | Destination |
+|------|--------|-------------|
+| TodoWrite tasks | Current session | `.claude/session-cache.json` |
+| Plan content | Conversation context | `docs/PLAN.md` |
+| Git context | `git status/log` | `.claude/session-cache.json` |
+| User notes | Command argument | `.claude/session-cache.json` |
+| Human-readable summary | Generated | `.claude/claude-progress.md` |
+
+## Execution
+
+### Step 1: Capture TodoWrite State
+
+Read current TodoWrite tasks and categorize:
+- Completed tasks
+- In-progress tasks
+- Pending tasks
+
+### Step 2: Capture Plan Content
+
+Extract from conversation context:
+- Goal statements ("I want to...", "We need to...")
+- Approach discussions ("Option A vs B")
+- Decisions made ("Let's go with...")
+- Steps identified ("First... then...")
+- Open questions
+- Blockers
+
+### Step 3: Capture Git Context
+
+```bash
+git branch --show-current
+git rev-parse --short HEAD
+git log -1 --format="%s"
+git status --porcelain | wc -l
+```
+
+### Step 4: Write Files
+
+**`.claude/session-cache.json`** (machine-readable):
+```json
+{
+  "version": "2.0",
+  "timestamp": "2025-12-13T10:30:00Z",
+  "todos": {
+    "completed": ["Set up OAuth credentials"],
+    "in_progress": ["Fix callback URL handling"],
+    "pending": ["Add token refresh"]
+  },
+  "plan": {
+    "file": "docs/PLAN.md",
+    "goal": "Add user authentication with OAuth2",
+    "current_step": "Step 3: Implement OAuth flow",
+    "current_step_index": 3,
+    "total_steps": 5,
+    "progress_percent": 40
+  },
+  "git": {
+    "branch": "feature/auth",
+    "last_commit": "abc123f",
+    "last_commit_message": "feat: Add OAuth config",
+    "uncommitted_count": 3
+  },
+  "notes": "Stopped at callback URL issue - need to fix redirect"
+}
+```
+
+**`docs/PLAN.md`** (strategic plan):
+```markdown
+# Project Plan
+
+**Goal**: Add user authentication with OAuth2
+**Created**: 2025-12-13
+**Last Updated**: 2025-12-13
+**Status**: In Progress
+
+## Context
+
+Building OAuth2 authentication for the web app. Need to support Google
+and GitHub providers initially, with ability to add more later.
+
+## Approach
+
+Using JWT tokens with refresh rotation. Chose this over session-based
+auth for better scalability and API compatibility.
+
+### Alternatives Considered
+- **Session-based auth**: Simpler but doesn't scale well
+- **Auth0/Clerk**: Good but adds external dependency
+
+## Implementation Steps
+
+### Completed
+- [x] Step 1: Research OAuth providers [S]
+  - Completed: 2025-12-12
+  - Commit: `abc123` research: Compare OAuth providers
+
+### In Progress
+- [ ] Step 3: Implement OAuth flow [M]
+  - Started: 2025-12-13
+  - Notes: Working on callback URL handling
+
+### Pending
+- [ ] Step 4: Add token refresh [S]
+- [ ] Step 5: Write integration tests [M]
+
+## Decision Log
+
+| Date | Decision | Rationale |
+|------|----------|-----------|
+| 12-12 | Use JWT over sessions | Better API compatibility |
+| 12-12 | Start with Google only | Largest user base |
+
+## Open Questions
+
+- Should we support "Remember me" functionality?
+- How long should refresh tokens last?
+
+---
+*Plan saved by `/save` command. Last updated: 2025-12-13 10:30*
+```
+
+**`.claude/claude-progress.md`** (human-readable):
+```markdown
+# Session Progress
+
+**Saved**: 2025-12-13 10:30 AM
+**Branch**: feature/auth
+
+## Plan Context
+
+**Goal**: Add user authentication with OAuth2
+**Current Step**: Step 3 - Implement OAuth flow
+**Progress**: 40% (2/5 steps)
+
+## Tasks
+
+- [x] Set up OAuth credentials
+- [ ] Fix callback URL handling (in progress)
+- [ ] Add token refresh logic
+
+## Notes
+
+> Stopped at callback URL issue - need to fix redirect
+
+---
+*Restore with: /sync*
+```
+
+## Output Format
+
+```
+Session saved
+
+| Category | Value |
+|----------|-------|
+| **Plan** | Step 3/5 (40%) - Implement OAuth flow |
+| **Tasks** | 1 completed, 1 in progress, 1 pending |
+| **Git** | 3 uncommitted files on feature/auth |
+| **Notes** | "Stopped at callback URL issue..." |
+
+Files written:
+  .claude/session-cache.json
+  .claude/claude-progress.md
+  docs/PLAN.md
+
+Restore with: /sync
+```
+
+---
+
+## Archive Mode: `/save --archive`
+
+Archives current plan before saving fresh state.
+
+### What It Does
+
+1. Moves `docs/PLAN.md` to `docs/PLAN-<date>.md`
+2. Clears `.claude/session-cache.json`
+3. Saves new state (if any)
+
+### Output
+
+```
+Archived: docs/PLAN.md -> docs/PLAN-2025-12-13.md
+
+Session saved (fresh start)
+
+Files written:
+  docs/PLAN-2025-12-13.md (archived)
+  .claude/session-cache.json (cleared)
+```
+
+---
+
+## Usage Examples
+
+```bash
+# Save current state
+/save
+
+# Save with notes
+/save "Stopped at auth module, need to fix redirect"
+
+# Archive current plan and start fresh
+/save --archive
+```
+
+---
+
+## Status Markers
+
+| Marker | Meaning |
+|--------|---------|
+| [x] | Completed |
+| [ ] | Pending/In Progress |
+
+## Effort Indicators
+
+| Tag | Meaning |
+|-----|---------|
+| `[S]` | Small - Quick task |
+| `[M]` | Medium - Moderate effort |
+| `[L]` | Large - Significant effort |
+
+---
+
+## File Locations
+
+| File | Purpose | Git-tracked? |
+|------|---------|--------------|
+| `docs/PLAN.md` | Strategic plan | Yes |
+| `.claude/session-cache.json` | Session state | Optional |
+| `.claude/claude-progress.md` | Human-readable progress | Optional |
+| `docs/PLAN-<date>.md` | Archived plans | Yes |
+
+---
+
+## Integration
+
+| Command | Relationship |
+|---------|--------------|
+| `/save` | **This command** - Persist state out |
+| `/sync` | Complementary - Read state back in |
+| Native `/plan` | Claude Code's planning mode (captured on save) |
+
+---
+
+## Notes
+
+- **Non-destructive** - Never overwrites without archiving option
+- **Git-aware** - Captures branch, commit, uncommitted changes
+- **Human-readable** - Progress files work without Claude Code
+- Ensure `.claude/` directory exists (created if missing)

+ 362 - 57
commands/sync.md

@@ -1,12 +1,65 @@
 ---
-description: "Session bootstrap - read project context (README, AGENTS, docs, skills, agents). Quick project orientation without full codebase exploration."
+description: "Session bootstrap - read project context, restore saved state, show status. Quick orientation with optional deep dive."
 ---
 
-# Sync - Session Bootstrap
+# Sync - Session Bootstrap & Restore
 
-Read yourself into this project. Fast, direct file reads - no caching overhead.
+Read yourself into this project and restore any saved session state. Fast, direct file reads.
 
-## Execution
+## Arguments
+
+$ARGUMENTS
+
+- No args: Quick bootstrap + restore saved state + show status
+- `--verbose`: Deep bootstrap - also reads all `*.md` in root + `docs/`
+- `--diff`: Show what changed since last save
+- `--git`: Auto-update plan steps from recent commits
+- `--status`: Just show status (skip restore prompt)
+
+## Architecture
+
+```
+/sync [--verbose|--diff|--git|--status]
+    |
+    +--> Default (no args): FULL BOOTSTRAP
+    |      |
+    |      +- Read project context (README, AGENTS, CLAUDE)
+    |      +- Read saved state (.claude/session-cache.json)
+    |      +- Restore TodoWrite tasks
+    |      +- Read plan (docs/PLAN.md)
+    |      +- Show unified status
+    |      +- Suggest next action
+    |
+    +--> --verbose: DEEP BOOTSTRAP
+    |      |
+    |      +- Everything above, plus:
+    |      +- Read all *.md in project root
+    |      +- Read all *.md in docs/
+    |
+    +--> --diff: CHANGE DETECTION
+    |      |
+    |      +- Compare current state vs saved state
+    |      +- Show new commits since save
+    |      +- Show file changes since save
+    |
+    +--> --git: AUTO-UPDATE FROM COMMITS
+    |      |
+    |      +- Parse recent git commits
+    |      +- Match to plan steps
+    |      +- Update step status
+    |
+    +--> --status: STATUS ONLY
+           |
+           +- Show current status
+           +- Skip restore prompt
+           +- Read-only quick view
+```
+
+---
+
+## Default Mode: `/sync`
+
+Full bootstrap with state restoration.
 
 ### Step 1: Parallel Reads
 
@@ -17,12 +70,19 @@ Read these files simultaneously (skip any that don't exist):
 | `README.md` | Project overview |
 | `AGENTS.md` | Agent instructions |
 | `CLAUDE.md` | Project-specific rules |
-| `docs/PLAN.md` | Current plan (first 50 lines) |
+| `docs/PLAN.md` | Current plan |
 | `.claude/session-cache.json` | Saved session state |
 
-### Step 2: Parallel Globs
+### Step 2: Restore Session State
+
+If `.claude/session-cache.json` exists:
+1. Parse saved TodoWrite tasks
+2. Restore to TodoWrite (completed, in_progress, pending)
+3. Note time since last save
+
+### Step 3: Parallel Globs
 
-Run these globs simultaneously to discover extensions:
+Discover extensions:
 
 ```
 docs/*.md
@@ -31,101 +91,346 @@ skills/*/SKILL.md OR .claude/skills/*/SKILL.md
 agents/*.md OR .claude/agents/*.md
 ```
 
-### Step 3: Git State
+### Step 4: Git State
 
-One bash command for live state:
 ```bash
-git branch --show-current 2>/dev/null && git status --porcelain 2>/dev/null | wc -l
+git branch --show-current 2>/dev/null
+git status --porcelain 2>/dev/null | wc -l
+git log -1 --format="%h %s" 2>/dev/null
 ```
 
-### Step 4: Output
+### Step 5: Output
 
-Format and display the results.
+Format and display unified status.
+
+---
 
 ## Output Format
 
+### With Saved State
+
+```
+Project Synced: [project-name]
+
+## Session Restored
+
+| Field | Value |
+|-------|-------|
+| **Last saved** | 2 hours ago |
+| **Branch** | feature/auth |
+| **Notes** | "Stopped at callback URL issue" |
+
+## Plan Status
+
+**Goal**: Add user authentication with OAuth2
+
+| Step | Status |
+|------|--------|
+| Step 1: Research OAuth providers | Done |
+| Step 2: Set up Google OAuth app | Done |
+| Step 3: Implement OAuth flow | **Current** |
+| Step 4: Add token refresh | Pending |
+| Step 5: Write integration tests | Pending |
+
+Progress: 40% (2/5)
+
+## Restored Tasks
+
+| Status | Task |
+|--------|------|
+| Done | Set up OAuth credentials |
+| **In Progress** | Fix callback URL handling |
+| Pending | Add token refresh logic |
+
+## Git
+
+| Field | Value |
+|-------|-------|
+| **Branch** | feature/auth |
+| **Uncommitted** | 3 files |
+| **Last commit** | abc123f feat: Add OAuth config |
+
+## Quick Reference
+
+| Category | Items |
+|----------|-------|
+| **Commands** | /save, /sync, /review, /testgen... |
+| **Skills** | 30 available |
+| **Agents** | 23 available |
+
+## Next Steps
+
+1. **Continue**: Fix callback URL handling
+2. **Check diff**: /sync --diff to see changes since save
 ```
-🔄 Project Synced: [project-name]
+
+### Without Saved State
+
+```
+Project Synced: [project-name]
 
 ## Summary
 
-[1-2 paragraph narrative summary based on README.md and AGENTS.md:
-- What this project is and its purpose
-- Key conventions or guidelines from AGENTS.md
-- Current state (active plan, recent work, etc.)
-- Any special instructions from CLAUDE.md that affect how to work]
+[1-2 paragraph narrative based on README.md and AGENTS.md]
 
 ## Quick Reference
 
 | Category | Items |
 |----------|-------|
-| **Project** | [name] - [one-line purpose from README] |
-| **Key Docs** | [list of docs/*.md filenames] |
-| **Commands** | [list of /command names from .claude/commands/] |
-| **Skills** | [list of skill names from .claude/skills/] |
-| **Agents** | [list of agent names from .claude/agents/] |
-| **Plan** | [Step X/Y - description] or "No active plan" |
-| **Saved State** | [timestamp] or "None" |
-| **Git** | [branch], [N] uncommitted files |
+| **Project** | [name] - [purpose] |
+| **Key Docs** | [list of docs/*.md] |
+| **Commands** | [list of /commands] |
+| **Skills** | [count] available |
+| **Agents** | [count] available |
+| **Plan** | No active plan |
+| **Saved State** | None |
+| **Git** | [branch], [N] uncommitted |
+
+## Next Steps
+
+1. **Ready for new task** - No pending work detected
+2. **Create a plan** - Use native /plan for implementation planning
+3. **Save before leaving** - /save "notes" to persist state
+```
 
-## Recommended Next Steps
+---
+
+## Verbose Mode: `/sync --verbose`
+
+Deep context loading for onboarding or complex tasks.
+
+### Additional Reads
 
-Based on the current state, suggest 2-3 logical actions:
+| Location | Files Read |
+|----------|------------|
+| Project root | All `*.md` files |
+| `docs/` | All `*.md` files |
 
-1. **[Primary action]** - [why this makes sense given current state]
-2. **[Secondary action]** - [context]
-3. **[Tertiary action or "Ready for new task"]**
+### Output
+
+Same as default, plus:
 
-Examples of recommendations:
-- If saved state exists: "Run `/plan --load` to restore your previous session tasks"
-- If plan exists and in-progress: "Continue with Step N: [description]"
-- If uncommitted changes: "Review and commit staged changes"
-- If no plan/state: "Ready for new task - no pending work detected"
 ```
+## Documentation Loaded
+
+| File | Summary |
+|------|---------|
+| CONTRIBUTING.md | Contribution guidelines |
+| CHANGELOG.md | Recent changes |
+| docs/ARCHITECTURE.md | System architecture |
+| docs/WORKFLOWS.md | Development workflows |
+| ... | ... |
+```
+
+---
+
+## Diff Mode: `/sync --diff`
+
+Show what changed since last save.
+
+### Output
+
+```
+Changes Since Last Save
+
+## Time
+
+| Field | Value |
+|-------|-------|
+| **Saved** | 2025-12-13 10:30 AM |
+| **Now** | 2025-12-13 12:45 PM |
+| **Elapsed** | 2 hours 15 minutes |
+
+## Git Changes
+
+| Type | Count |
+|------|-------|
+| **New commits** | 3 |
+| **Files changed** | 7 |
+| **Insertions** | +142 |
+| **Deletions** | -38 |
+
+### Recent Commits
+
+| Hash | Message |
+|------|---------|
+| def456 | fix: Handle redirect edge case |
+| abc123 | feat: Add callback validation |
+| 789xyz | test: Add OAuth flow tests |
+
+## Plan Changes
+
+| Field | Saved | Current |
+|-------|-------|---------|
+| **Current step** | Step 3 | Step 3 |
+| **Progress** | 40% | 40% |
+| **Status** | No change | - |
+
+## Task Changes
+
+| Change | Task |
+|--------|------|
+| **Completed** | Fix callback URL handling |
+| **New** | Add error handling for token refresh |
+```
+
+---
+
+## Git Sync Mode: `/sync --git`
+
+Auto-update plan steps from recent commits.
+
+### How It Works
+
+1. Parse recent git commits (last 20)
+2. Match commit messages to plan steps using keywords
+3. Update step status in `docs/PLAN.md`
+
+### Matching Rules
+
+| Commit Pattern | Plan Update |
+|----------------|-------------|
+| `feat: Add OAuth...` | Mark matching step complete |
+| `fix: Token refresh...` | Mark matching step in-progress |
+| `test: OAuth flow...` | Mark matching test step complete |
+
+### Output
+
+```
+Git Sync
+
+## Matches Found
+
+| Commit | Plan Step | Action |
+|--------|-----------|--------|
+| abc123 "feat: Add OAuth config" | Step 2 | Marked complete |
+| def456 "fix: Callback handling" | Step 3 | Marked in-progress |
+
+## Updated docs/PLAN.md
+
+| Step | Previous | New |
+|------|----------|-----|
+| Step 2 | In Progress | Done |
+| Step 3 | Pending | In Progress |
+```
+
+---
+
+## Status Mode: `/sync --status`
+
+Quick read-only status view. No restore prompt.
+
+### Output
+
+```
+Status
+
+## Plan
+
+**Goal**: Add user authentication with OAuth2
+**Progress**: 40% (2/5)
+**Current**: Step 3 - Implement OAuth flow
+
+## Tasks
+
+| Status | Count |
+|--------|-------|
+| Completed | 1 |
+| In Progress | 1 |
+| Pending | 1 |
+
+## Git
+
+| Field | Value |
+|-------|-------|
+| **Branch** | feature/auth |
+| **Uncommitted** | 3 files |
+```
+
+---
 
 ## Edge Cases
 
 ### No README.md
 ```
-⚠ No README.md found - project overview unavailable
+Warning: No README.md found - project overview unavailable
 ```
 
 ### No docs/ directory
 ```
-ℹ No docs/ directory - documentation not set up
+Info: No docs/ directory - documentation not set up
+```
+
+### First time in project
+```
+Info: Fresh project - no Claude configuration found
+Consider: Create CLAUDE.md for project-specific rules
+```
+
+### Stale saved state (>7 days)
+```
+Warning: Saved state is 12 days old
+
+Options:
+  1. Restore anyway (tasks may still be relevant)
+  2. Start fresh: /save --archive
 ```
 
-### First time in project (no .claude/ directory)
+### Branch changed since save
 ```
-ℹ Fresh project - no Claude configuration found
-   Consider: /init to set up CLAUDE.md
+Warning: Branch changed since save
+
+| Field | Value |
+|-------|-------|
+| **Saved on** | feature/old-branch |
+| **Current** | feature/new-branch |
+
+Restore anyway? Tasks may not apply to current branch.
 ```
 
-## Integration with Other Commands
+---
+
+## Integration
 
 | Command | Relationship |
 |---------|--------------|
-| `/sync` | **This command** - Read project context |
-| `/plan --load` | Restore TodoWrite + plan state from saved JSON |
-| `/plan --save` | Persist TodoWrite + plan state to JSON |
-| `/plan --status` | Quick status dashboard (read-only) |
-| `/plan` | Create or manage project plans |
+| `/sync` | **This command** - Read state in |
+| `/save` | Complementary - Persist state out |
+| Native `/plan` | Claude Code's planning mode |
 
 ### Typical Session Flow
 
 ```
-New Session
-────────────────────────────────────────────────────────────────────────
-  1. /sync              ← Read project context (always)
-  2. /plan --load       ← Restore saved tasks (if continuing work)
-  3. ... work ...
-  4. /plan --status     ← Check status anytime
-  5. /plan --save       ← Save before ending session
+Session Start
+  /sync                    <- Read project, restore state
+
+During Work
+  /sync --status           <- Quick status check
+  /sync --diff             <- What changed?
+  /sync --git              <- Update from commits
+
+Session End
+  /save "notes"            <- Persist before leaving
 ```
 
+---
+
+## Flags Reference
+
+| Flag | Effect |
+|------|--------|
+| (none) | Full bootstrap + restore + status |
+| `--verbose` | Also read all *.md in root + docs/ |
+| `--diff` | Show changes since last save |
+| `--git` | Auto-update plan from commits |
+| `--status` | Status only, skip restore prompt |
+
+---
+
 ## Notes
 
-- This is a **read-only** command - never modifies files
-- Designed for **quick orientation**, not deep analysis
+- **Read-focused** - Only `/save` writes files
+- **Fast by default** - Parallel reads, minimal overhead
+- **Git-aware** - Tracks branch, commits, uncommitted changes
+- **Smart restore** - Detects stale state, branch changes
 - Works in any project, with or without Claude configuration
-- Does NOT invoke skills or subagents - pure file reading

+ 3 - 3
commands/testgen.md

@@ -61,7 +61,7 @@ $ARGUMENTS
     └─→ Step 6: Integration
           ├─ Auto-create TodoWrite for generated tests
           ├─ Suggest: run tests to verify
-          └─ Link to /plan --save for tracking
+          └─ Link to /save for tracking
 ```
 
 ## Execution Steps
@@ -212,7 +212,7 @@ Tests generated: src/auth.test.ts
 Next steps:
 1. Run tests: npm test src/auth.test.ts
 2. Review and refine edge cases
-3. Use /plan --save to track test coverage goals
+3. Use /save to track test coverage goals
 ```
 
 ---
@@ -764,7 +764,7 @@ command -v jq >/dev/null 2>&1 && cat package.json | jq '.devDependencies' || cat
 |---------|--------------|
 | `/review` | Review generated tests before committing |
 | `/explain` | Understand complex code before testing |
-| `/plan --save` | Track test coverage goals |
+| `/save` | Track test coverage goals |
 | `/testgen` | This command |
 
 ---

+ 3 - 3
docs/DASH.md

@@ -69,7 +69,7 @@
 | ⚡ **tool-discovery** | — | "Which agent/skill?", recommend tools |
 | ⚡ **git-workflow** | lazygit, gh, delta | Stage, PR, review, rebase, stash, bisect |
 | ⚡ **doc-scanner** | — | AGENTS.md, conventions, consolidate docs |
-| ⚡ **project-planner** | — | Stale plans, `/plan` |
+| ⚡ **project-planner** | — | Stale plans, session commands |
 | ⚡ **python-env** | uv | Fast venv, pyproject.toml |
 | ⚡ **task-runner** | just | Run tests, build |
 
@@ -79,8 +79,8 @@
 
 | Command | Purpose |
 |---------|---------|
-| 🔧 `/sync` | Session bootstrap with project context |
-| 🔧 `/plan` | Unified planning: create plans, save/load state, show status |
+| 🔧 `/sync` | Session bootstrap, restore state, show status |
+| 🔧 `/save` | Save session state (TodoWrite, plan, git context) |
 | 🔧 `/review` | Code review staged changes |
 | 🔧 `/testgen` | Generate tests with expert routing |
 | 🔧 `/explain` | Deep code/concept explanation |

+ 3 - 3
docs/PLAN.md

@@ -24,7 +24,7 @@
 ## Completed Milestones
 
 ### Core Infrastructure
-- [x] Session continuity (`/plan --save`, `/plan --load`)
+- [x] Session continuity (`/save`, `/sync`)
 - [x] Plan persistence to `docs/PLAN.md`
 - [x] Agent genesis system (`/spawn`)
 - [x] Installation scripts (Unix + Windows)
@@ -45,7 +45,7 @@
 - [x] Patterns: REST, SQL, security, testing, tailwind
 
 ### Commands (11)
-- [x] Planning: `/plan`, `/sync`, `/atomise`
+- [x] Session: `/save`, `/sync`, `/atomise`
 - [x] Development: `/review`, `/testgen`, `/explain`
 - [x] Multi-model: `/conclave`, `/spawn`
 - [x] Utilities: `/pulse`, `/setperms`, `/archive`
@@ -169,4 +169,4 @@ Languages needing Python-level depth:
 
 ---
 
-*Plan managed by `/plan` command. Last updated: 2025-12-22*
+*Plan managed by `/save` command. Last updated: 2025-12-22*

+ 6 - 7
docs/WORKFLOWS.md

@@ -205,16 +205,15 @@ Using claude-mods commands for persistent state:
 
 ```
 Session 1:
-  /sync                              # Bootstrap context
+  /sync                              # Bootstrap + restore state
   [work on tasks]
-  /plan --save "Stopped at auth"     # Save state
+  /save "Stopped at auth"            # Save state
 
 Session 2:
-  /sync                              # Bootstrap context
-  /plan --load                       # Restore tasks
-  /plan --status                     # Check progress
+  /sync                              # Bootstrap + restore state
+  /sync --status                     # Check progress
   [continue work]
-  /plan --save "Completed auth"      # Save progress
+  /save "Completed auth"             # Save progress
 ```
 
 ---
@@ -282,6 +281,6 @@ User: "Implement rate limiting"
 | **Debugging** | Reproduce, investigate, fix, test | Bug investigation |
 | **Refactoring** | Test, small changes, verify | Code improvement |
 | **Multi-Agent** | Parallel instances | Large tasks |
-| **Session Continuity** | /sync, /plan --save/--load | Multi-session work |
+| **Session Continuity** | /sync, /save | Multi-session work |
 | **Visual Iteration** | Mock → implement → screenshot → iterate | UI development |
 | **Subagent Verification** | Complete → verify → fix | Critical code |

+ 14 - 15
skills/project-planner/SKILL.md

@@ -1,60 +1,59 @@
 ---
 name: project-planner
-description: "Detects stale project plans and suggests /plan command usage. Triggers on: sync plan, update plan, check status, plan is stale, track progress, project planning."
+description: "Detects stale project plans and suggests session commands. Triggers on: sync plan, update plan, check status, plan is stale, track progress, project planning."
 allowed-tools: "Read Glob TodoWrite"
 ---
 
 # Project Planner Skill
 
-Lightweight awareness layer for `docs/PLAN.md`. Detects when plans need attention and points to `/plan` command.
+Lightweight awareness layer for `docs/PLAN.md`. Detects when plans need attention and points to `/save` and `/sync` commands.
 
 ## Purpose
 
 This skill does NOT manage plans directly. It:
 - Detects when `docs/PLAN.md` exists or is missing
 - Identifies stale plans (no recent updates vs git activity)
-- Suggests appropriate `/plan` commands
+- Suggests appropriate session commands
 
-All plan operations go through the `/plan` command.
+All plan operations go through `/save` (persist) and `/sync` (restore/status).
 
 ## Detection Logic
 
 ### Plan Missing
 ```
 No docs/PLAN.md found
-→ Suggest: /plan "describe your project goal"
+-> Suggest: /save to create initial plan from conversation
 ```
 
 ### Plan Stale
 ```
 docs/PLAN.md last modified: 5 days ago
 git log shows: 12 commits since then
-→ Suggest: /plan --sync
+-> Suggest: /sync --git to update from commits
 ```
 
 ### Uncommitted Work
 ```
 git status shows: 5 modified files
 docs/PLAN.md "In Progress" section outdated
-→ Suggest: /plan --status
+-> Suggest: /sync --status to review
 ```
 
 ### Session Start
 ```
 Resuming work on project with docs/PLAN.md
-→ Suggest: /plan --review
+-> Suggest: /sync to restore state
 ```
 
 ## Quick Reference
 
 | Situation | Suggestion |
 |-----------|------------|
-| No plan exists | `/plan "goal"` |
-| Plan is stale | `/plan --sync` |
-| Need to see plan | `/plan --review` |
-| Update progress | `/plan --status` |
-| Capture thinking | `/plan --capture` |
-| Start fresh | `/plan --clear "new goal"` |
+| No plan exists | `/save` after discussing goals |
+| Plan is stale | `/sync --git` |
+| Need to see plan | `/sync --status` |
+| Update progress | `/save "notes"` |
+| Start fresh | `/save --archive` |
 
 ## Staleness Heuristics
 
@@ -71,5 +70,5 @@ A plan **needs review** when:
 ## Notes
 
 - This skill only suggests, never modifies
-- All operations delegate to `/plan` command
+- `/sync` reads state, `/save` writes state
 - Single source of truth: `docs/PLAN.md`

+ 1 - 2
skills/tool-discovery/references/skills-catalog.md

@@ -217,8 +217,7 @@ Project and development workflow automation.
 **Triggers:** plan, sync plan, track, project planning
 
 **Use For:**
-- Project planning with /plan
-- Session state management
+- Session state with /save and /sync
 - Progress tracking
 - Context preservation
 

+ 1 - 1
tests/skills/reports/skill-analysis.md

@@ -121,7 +121,7 @@ Generated: 2025-12-20
 | Issue | Severity | Details |
 |-------|----------|---------|
 | Specific triggers | Low | "sync plan" is specific enough |
-| Depends on /plan usage | Medium | Only useful if user uses /plan |
+| Depends on session commands | Medium | Only useful if user uses /save and /sync |
 
 **Will it fire?** Appropriately - triggers are specific.