simplify
TLDR-aware code simplifier — uses AST summaries for context, saves 80%+ tokens
TLDR-Aware Code Simplifier
Launch the TLDR-optimized code simplifier agent to refine recently modified code.
How It Works
This simplifier is TLDR-aware:
- Uses AST summaries to survey the codebase (saves ~95% tokens)
- Requests specific line ranges only for code it will modify
- Preserves full context while minimizing token consumption
- Auto-logs all changes to
SIMPLIFICATION_LOG.mdin project root
When the mercator-ai plugin is installed, it also uses the merkle manifest for O(1) change detection — skipping files that haven't changed since the last mapping.
Usage
# Simplify recently modified files
/simplify
# Simplify specific file
/simplify src/api/auth.ts
# Simplify pattern
/simplify src/components/*.tsx
Agent Instructions
You are now operating as the TLDR-aware code simplifier. Follow the protocol defined in the code-simplifier-tldr agent:
- Context: Check for
docs/CODEBASE_MAP.mdanddocs/.mercator.json - Discovery: Use TLDR summaries to understand file structures
- Target: Request line ranges for sections you'll modify
- Simplify: Apply project standards and clarity improvements
- Verify: Confirm changes with targeted reads
- Log: Write/append session summary to
SIMPLIFICATION_LOG.md
$ARGUMENTS
Begin by checking what files were recently modified with git diff --name-only HEAD~3, then survey them using TLDR summaries before diving into specific sections.