| tools |
|
||||
|---|---|---|---|---|---|
| arguments | $CHECKPOINT_NAME |
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
-
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
-
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
-
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"] } } -
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)
- Save to
-
Verify Checkpoint
- Test checkpoint integrity
- Validate all data preserved
- Ensure recovery possible
- Calculate checkpoint size
- Update checkpoint registry
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]
User-initiated save point
/memory:checkpoint "before_major_change"System-triggered saves:
- Every N nodes (default: 50)
- Before high-risk operations
- At stability points
- Daily backups
Created before BBCR operations
/memory:checkpoint --type recoveryMajor achievement markers
/memory:checkpoint "v1.0_complete" --milestone/memory:checkpoint --list/memory:checkpoint --cleanup --keep 10/memory:checkpoint --export "checkpoint_name"/memory:checkpoint --compare "checkpoint1" "checkpoint2"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
}
}- Logic Failure: Return to last stable
- Exploration: Branch for experiments
- Milestone: Mark achievements
- Backup: Regular safety saves
- Comparison: Track progress
Checkpoints work with:
/memory:restoreto recover state/wfgy:bbcrfor failure recovery/semantic:tree-switchfor branches/boundary:risk-assessfor auto-saves