Skip to content
Development
Command

/memory-checkpoint

Create a checkpoint of the current semantic tree state for recovery, branching, or milestone marking.

From plugin
claude-command-suite
1.3k199 skills89 agents199 commands
Install
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/memory-checkpoint

Context preview

What this command does when you run it.

Create a checkpoint of the current semantic tree state for recovery, branching, or milestone marking.

Command definition

memory-checkpoint.md
tools:
  - read
  - write
  - bash
  - grep
arguments: $CHECKPOINT_NAME

Memory Checkpoint Creation

Create a checkpoint of the current semantic tree state for recovery, branching, or milestone marking.

Based on the WFGY project: https://github.com/onestardao/WFGY

Instructions

1. **Prepare Checkpoint**

  • Parse checkpoint name from "$CHECKPOINT_NAME"
  • If empty, auto-generate: "checkpoint_[timestamp]"
  • Read active tree from `.wfgy/trees/active_tree.json`
  • Calculate current state metrics

2. **Capture State Snapshot**

  • Tree structure and all nodes
  • Current context from `.wfgy/context.json`
  • Active configuration
  • Boundary maps
  • Formula states:
  • BBMC residue levels
  • BBPF path states
  • BBAM attention distribution
  • Current ΔS and λ_observe

3. **Create Checkpoint Package**

   {
     "id": "checkpoint_uuid",
     "name": "$CHECKPOINT_NAME",
     "timestamp": "ISO_8601",
     "tree_state": {
       "tree_name": "name",
       "node_count": N,
       "last_node": "node_id",
       "nodes": [...]
     },
     "context_state": {
       "current_deltaS": value,
       "lambda": "direction",
       "e_resonance": value,
       "active_module": "BBMC/BBPF/BBCR/BBAM"
     },
     "metrics": {
       "avg_deltaS": value,
       "stability": value,
       "confidence": percentage
     },
     "metadata": {
       "reason": "manual/auto/pre-risk",
       "tags": ["milestone", "stable", "experimental"]
     }
   }

4. **Store Checkpoint**

  • Save to `.wfgy/checkpoints/[tree_name]/[checkpoint_name].json`
  • Update checkpoint index
  • Create recovery instructions
  • Log in `.wfgy/logs/checkpoints.log`
  • Maintain max checkpoints (default: 50)

5. **Verify Checkpoint**

  • Test checkpoint integrity
  • Validate all data preserved
  • Ensure recovery possible
  • Calculate checkpoint size
  • Update checkpoint registry

Output Format

CHECKPOINT CREATED SUCCESSFULLY
═══════════════════════════════════════
Checkpoint Name: $CHECKPOINT_NAME
Checkpoint ID: [uuid]
Created: [timestamp]

State Captured:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Tree: [tree_name]
Nodes: [count]
Position: Node [id] "[topic]"

Current Metrics:
• ΔS: [value]
• λ: [direction]
• E_resonance: [value]
• Confidence: [percentage]%

Checkpoint Statistics:
┌─────────────────────────────────────┐
│ Metric         │ Value  │ Status    │
├─────────────────────────────────────┤
│ Completeness   │ 100%   │ ✓ Full    │
│ Size           │ [size] │ Normal    │
│ Compression    │ [ratio]│ Applied   │
│ Recovery Time  │ ~[sec] │ Fast      │
└─────────────────────────────────────┘

Checkpoint Contents:
• Semantic nodes: [count]
• Relationships: [count]
• Context state: Preserved
• Configuration: Saved
• Boundaries: Mapped

Tags Applied:
[#manual] [#stable] [#milestone]

Recovery Instructions:
────────────────────────────────────────
To restore this checkpoint:
/memory:restore "$CHECKPOINT_NAME"

To branch from this checkpoint:
/semantic:tree-init "new_branch"
/memory:restore "$CHECKPOINT_NAME"

To compare with current:
/memory:diff "$CHECKPOINT_NAME"

Checkpoint Location:
.wfgy/checkpoints/[tree_name]/$CHECKPOINT_NAME.json

Related Checkpoints:
• Previous: [previous_checkpoint] ([time_ago])
• Next: None (latest)
• Similar: [similar_checkpoint]

Checkpoint Types

Manual Checkpoint

User-initiated save point

/memory:checkpoint "before_major_change"

Automatic Checkpoint

System-triggered saves:

  • Every N nodes (default: 50)
  • Before high-risk operations
  • At stability points
  • Daily backups

Recovery Checkpoint

Created before BBCR operations

/memory:checkpoint --type recovery

Milestone Checkpoint

Major achievement markers

/memory:checkpoint "v1.0_complete" --milestone

Checkpoint Management

List Checkpoints

/memory:checkpoint --list

Delete Old Checkpoints

/memory:checkpoint --cleanup --keep 10

Export Checkpoint

/memory:checkpoint --export "checkpoint_name"

Compare Checkpoints

/memory:checkpoint --compare "checkpoint1" "checkpoint2"

Auto-Checkpoint Rules

Configure in `.wfgy/config.json`:

{
  "auto_checkpoint": {
    "enabled": true,
    "frequency": 50,
    "on_risk": true,
    "risk_threshold": 0.7,
    "max_checkpoints": 50,
    "cleanup_age_days": 30
  }
}

Recovery Scenarios

1. **Logic Failure**: Return to last stable 2. **Exploration**: Branch for experiments 3. **Milestone**: Mark achievements 4. **Backup**: Regular safety saves 5. **Comparison**: Track progress

Integration

Checkpoints work with:

  • `/memory:restore` to recover state
  • `/wfgy:bbcr` for failure recovery
  • `/semantic:tree-switch` for branches
  • `/boundary:risk-assess` for auto-saves
Read more
Ships withclaude-command-suite

A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.

Get the whole plugin