4.5 KiB
4.5 KiB
Quick Start Guide - Infinite Variant 6
Get started with the Stateful Infinite Loop in 5 minutes.
Installation
cd infinite_variants/infinite_variant_6
That's it! No dependencies required (Python 3.6+ already on your system).
Your First Run
1. Run a Simple Generation
/infinite-stateful specs/example_spec.md my_output 3
This will:
- Generate 3 interactive visualizations
- Save them to
my_output/ - Create state file in
.claude/state/
2. Check Status
/status
You'll see:
- Your run ID (e.g.,
run_20250310_143022) - Progress (3 of 3)
- Consistency score (1.00 = perfect)
3. Try Interrupting and Resuming
# Start a longer run
/infinite-stateful specs/example_spec.md outputs 10
# Stop it after a few iterations (Ctrl+C or context limit)
# Check what completed
/status run_20250310_143022
# Resume exactly where you left off
/resume run_20250310_143022
Common Commands
Generate with URL Strategy
# Create URL strategy
cat > specs/my_urls.json << 'URLS'
{
"foundation": [
"https://observablehq.com/@d3/learn-d3"
],
"intermediate": [
"https://observablehq.com/@d3/force-directed-graph"
]
}
URLS
# Run with strategy
/infinite-stateful specs/example_spec.md outputs 5 specs/my_urls.json
Check State Consistency
# Using command
/status run_20250310_143022
# Using validator script
./validators/check_state_consistency.sh run_20250310_143022
# Using Python utility
python state_manager.py validate run_20250310_143022
Recover from Issues
# If files were deleted or state is corrupted
/reset-state run_20250310_143022 --rebuild
# Verify the rebuild worked
/status run_20250310_143022
Understanding Output
Generated Files
my_output/
├── visualization_1.html # Self-contained HTML
├── visualization_2.html
└── visualization_3.html
.claude/state/
└── run_20250310_143022.json # State file
What's in the State File?
{
"run_id": "run_20250310_143022",
"completed_iterations": 3,
"used_urls": ["https://..."],
"validation": {
"consistency_score": 1.0
}
}
Key Features Demo
1. Resume After Interruption
# This run will be interrupted
/infinite-stateful specs/example_spec.md outputs 100
# ... context limit reached at iteration 47 ...
# Later, resume
/resume run_20250310_143022
# Continues from iteration 48!
2. No URL Duplicates
# First run uses some URLs
/infinite-stateful specs/example_spec.md outputs 10 specs/urls.json
# Resume uses only NEW URLs
/resume run_20250310_143022
# Never repeats a URL!
3. Self-Consistency Validation
# Check state health
/status run_20250310_143022
# You'll see 6 validation checks:
# ✓ Schema Validation: PASS
# ✓ File Count: PASS
# ✓ Iteration Records: PASS
# ✓ URL Uniqueness: PASS
# ✓ File Existence: PASS
# ✓ Timestamp Validity: PASS
# Consistency Score: 1.00 (100%)
Troubleshooting
"State file not found"
# List available runs
/status
# Use the correct run_id
/resume run_20250310_143022
"Low consistency score"
# Rebuild state from files
/reset-state run_20250310_143022 --rebuild
"Output directory already exists"
That's fine! The system will:
- Scan existing files
- Continue from next iteration number
- Not overwrite anything
Next Steps
- Read Full Docs: See
README.mdfor complete features - Understand State: See
.claude/state/README.md - Deep Dive: See
docs/state_management_guide.md(21KB guide) - Custom Specs: Create your own in
specs/ - Extend System: Add custom commands in
.claude/commands/
Quick Reference
| Task | Command |
|---|---|
| Start run | /infinite-stateful <spec> <output> <count> |
| List runs | /status |
| Check run | /status <run_id> |
| Resume | /resume <run_id> |
| Validate | ./validators/check_state_consistency.sh <run_id> |
| Rebuild | /reset-state <run_id> --rebuild |
Help
- README.md - Full feature documentation
- CLAUDE.md - System architecture and principles
- docs/state_management_guide.md - Complete usage guide
- MANIFEST.md - All files explained
What Makes This Special?
- Never lose progress - Resume from any interruption
- Never duplicate URLs - State tracks everything
- Self-healing - Rebuild state from files if corrupted
- Self-validating - 6 independent checks ensure reliability
- Production-ready - Used in real infinite generation scenarios
Start generating! 🚀