A practical framework for AI-assisted development with continuous learning from your code.
feedback-loop turns test failures into reusable patterns, then uses those patterns to improve code generation, review, and onboarding.
- Learns from tests: captures failures and turns them into structured metrics.
- Builds a living pattern library: good/bad examples + explanations.
- Improves AI outputs: pattern-aware code generation and review.
- Supports teams (optional): cloud sync and shared configuration.
# Clone and install
git clone https://github.com/doronpers/feedback-loop.git
cd feedback-loop
# Core runtime
pip install -e .
# Or install with testing extras
pip install -e .[test]For Cursor IDE users: feedback-loop provides seamless AI-powered development:
# 1. Install feedback-loop (see above)
# 2. Open this repository in Cursor
# 3. Cursor automatically reads .cursorrules file
# 4. Start coding with pattern-aware AI assistance!See Cursor Integration Guide for:
- Complete setup instructions
- Pattern-aware code generation with Cursor Composer
- Interactive workflows and tasks
- Language server integration
Mac: Double-click launch-feedback-loop.command
Windows: Double-click launch-feedback-loop.bat
These launchers provide an interactive menu to run any feedback-loop tool. See DESKTOP_LAUNCHERS.md for details.
./bin/fl-setup./bin/fl-chatpython demo.py
python demo_metrics.py# Collect metrics from pytest
pytest --enable-metrics
# Analyze and update patterns
feedback-loop analyze
# Generate code with pattern awareness
feedback-loop generate "Create a safe file handler"- Cursor Integration Guide β NEW - Complete Cursor IDE setup
- Getting Started
- Quick Reference
- AI Patterns Guide
- Metrics Guide
- Memory Integration β NEW - Semantic pattern learning with MemU
- Superset Analytics Integration β NEW
- LLM Integration Guide
- Cloud Sync
- Desktop Launchers
- API Reference
- Contributing
- Security
- Results
feedback-loop now supports intelligent pattern memory via MemU, enabling:
β¨ Semantic Search: Query patterns by concept, not just name π§ Self-Evolving: Patterns improve based on usage over time π Cross-Project: Share learnings across all your codebases π‘ Smart Recommendations: Get context-aware pattern suggestions
# 1. Install MemU
pip install memu-py
# 2. Enable memory (optional)
export FEEDBACK_LOOP_MEMORY_ENABLED=true
export OPENAI_API_KEY=sk-... # For embeddings
# 3. Sync patterns to memory
feedback-loop memory sync
# 4. Query semantically
feedback-loop memory query "How do I handle JSON serialization with NumPy?"
# 5. Get recommendations
feedback-loop memory recommend --context "Building FastAPI file upload endpoint"Note: Memory integration is opt-in and backward compatible. All existing functionality works without MemU.
See Memory Integration Guide for detailed documentation.
The framework ships with 9 production-tested patterns, including:
- NumPy type conversion
- NaN/Inf validation
- Bounds checking
- Specific exception handling
- Structured logging
- Temp file hygiene
- Large file streaming
- FastAPI streaming uploads
- Metadata-driven logic
Use Quick Reference for the full catalog and examples.
βββββββββββββββββββββββββββββββ
β Tests β
β (pytest) β
ββββββββββββββββ¬βββββββββββββββ
β failures
βΌ
βββββββββββββββββββββββββββββββ
β Metrics Collector β
β (collector/analyzer) β
ββββββββββββββββ¬βββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββ
β Pattern Library β
β (pattern_manager/generator) β
ββββββββββββββββ¬βββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββ
β AI + Code Review β
β (pattern-aware outputs) β
βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββ
β Apache Superset Dashboardsβ
β (analytics/insights) β
βββββββββββββββββββββββββββββββ
feedback-loop integrates with Apache Superset to provide powerful analytics dashboards:
π Code Quality Dashboard - Track bugs, test failures, and code review issues π Pattern Analysis Dashboard - Visualize pattern frequency and effectiveness π Development Trends Dashboard - Monitor AI-assisted development metrics
See Superset Integration Guide for setup instructions.
See documentation/Status/RESULTS.md for test coverage and verification details.
CRITICAL: All AI agents MUST read
AGENT_KNOWLEDGE_BASE.mdbefore performing any tasks. It contains non-negotiable Patent, Security, and Design rules.
Additional resources: