Compress and synthesize state.md by abstracting to higher-level patterns
Synthesizes accumulated knowledge in state.md to higher-level abstractions, reducing size while preserving critical insights. Use when state.md grows unwieldy or after batch distillation to maintain navigable, concise documentation.
/plugin marketplace add cloud-atlas-ai/bottle/plugin install bottle@bottleinheritSynthesize accumulated knowledge in state.md to higher-level abstractions, reducing size while preserving critical insights.
Platform Support:
.wm/state.md.backup before modifying# Compress state.md
wm compress
# Example output:
# Compressed: 42 → 18 lines (57% reduction)
# Backup saved to .wm/state.md.backup
The LLM applies these strategies when compressing:
Before:
- Prefer `Result<T, E>` for recoverable errors in Rust
- Use `Option<T>` for nullable values in Rust
- Return early with `?` operator in Rust
After:
- Rust error handling: Use `Result<T, E>` for recoverable errors, `Option<T>` for nullables, early return with `?` operator
Before:
- Don't use `unwrap()` in production code
- Don't use `expect()` without clear reason
- Don't ignore error cases
After:
- Error handling principle: Always handle errors explicitly; never panic in production
Before:
- Use old API version 1.x (deprecated)
- Migrate to API version 2.x (in progress)
- API 3.x is now stable and preferred
After:
- Use API version 3.x (current stable)
These are NEVER compressed away:
Compress works well after distillation:
# 1. Batch extract from all sessions
wm distill
# 2. Review raw extractions
cat .wm/distill/raw_extractions.md
# 3. Compress both raw extractions and state.md
wm compress
# Result: synthesized knowledge in state.md
If compression removes something important:
# Restore from backup
cp .wm/state.md.backup .wm/state.md
# Or manually cherry-pick from backup
cat .wm/state.md.backup # Review what was removed
Backups are timestamped, so multiple compressions create multiple backups.
.wm/state.md.backup exists for recoveryYou are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.