Pattern Sweep - Compound Learning Acceleration Tool

Overview

The Pattern Sweep is a standalone automated pattern detection and learning acceleration system. It enables systematic discovery of code patterns, usage patterns, and coordination patterns across the entire codebase to accelerate development workflow optimization.

Note: As of August 18, 2025, Pattern Sweep has been decoupled from TLDR and operates as an independent tool.

Quick Start

# Simple runner (recommended)
./scripts/run_pattern_sweep.sh --verbose

# Direct execution with session log learning
./scripts/run_pattern_sweep.sh --learn-usage-patterns --verbose

# Advanced usage
PYTHONPATH=. python3 scripts/pattern_sweep.py --pattern-sweep-only --verbose

Pattern Categories

1. Code Patterns

2. Usage Patterns

3. Performance Patterns

4. Coordination Patterns

Results and Storage

Pattern data is stored in scripts/pattern_sweep_data.json with:

Standalone Operation

Pattern Sweep operates independently and can be run on-demand:

# Weekly pattern review (recommended)
./scripts/run_pattern_sweep.sh --learn-usage-patterns --verbose

# Quick pattern check
./scripts/run_pattern_sweep.sh

# Help and options
./scripts/run_pattern_sweep.sh --help

Performance

Weekly Pattern Review Process

Recommended workflow for compound learning acceleration:

  1. Weekly Sweep: Run ./scripts/run_pattern_sweep.sh --learn-usage-patterns --verbose
  2. Review Results: Analyze scripts/pattern_sweep_data.json for new patterns
  3. Methodology Update: Incorporate high-confidence patterns into development practices
  4. Documentation: Update process docs with discovered patterns

Compound Learning

Pattern Sweep enables compound learning acceleration by:

  1. Automated Pattern Discovery: Identifies emerging patterns automatically
  2. Confidence Scoring: Ranks patterns by frequency and distribution
  3. Learning Persistence: Tracks pattern evolution over time
  4. Methodology Enhancement: Enables systematic improvement of development practices

Examples

Top Detected Patterns (as of 2025-07-26)

  1. Root cause identification pattern (314 occurrences, 0.83 confidence)
  2. Async test marker pattern (220 occurrences, 1.00 confidence)
  3. Systematic verification methodology (130 occurrences, 0.74 confidence)
  4. Workflow type usage pattern (154 occurrences, 1.00 confidence)
  5. Repository pattern instantiation (70 occurrences, 1.00 confidence)

Usage Pattern Examples

Integration with Development Workflow

Pattern Sweep enhances the systematic verification methodology by:

Future Enhancements

Planned extensions include: