A streamlined TDD framework for Claude Code hooks with real-time feedback
Project description
QuickHooks
A streamlined TDD framework for Claude Code hooks with intelligent agent analysis and discovery. Built with Python 3.12+ and modern UV package management, featuring automatic agent detection from your ~/.claude/agents directory and smart prompt modification for optimal AI collaboration.
๐ UV-Powered Development
QuickHooks leverages the blazing-fast UV package manager for 10-100x faster dependency resolution and installation. Our development workflow is optimized for UV's modern Python project management.
Features
๐ง Intelligent Agent Analysis
- AI-powered prompt analysis using Groq and Pydantic AI
- Automatic agent discovery from
~/.claude/agentsdirectory - Semantic similarity matching with Chroma vector database
- Smart prompt modification for guaranteed agent usage
- Context-aware chunking for large inputs (up to 128K tokens)
๐ง Development Tools
- Hot-reload development server with
watchfiles - Test-driven development workflow
- Fast and efficient file watching
- Modern Python with type hints and async/await
- Developer-friendly CLI with rich output
๐ Claude Code Integration
- Seamless hook integration with Claude Code settings
- Automatic prompt interception and modification
- Environment-based configuration
- Verbose logging and debugging support
๐ฆ Installation
Quick Start (PyPI)
# Install via pip (when published)
pip install quickhooks[agent-analysis]
export GROQ_API_KEY=your_groq_api_key_here
quickhooks agents analyze "Write a Python function"
๐ ๏ธ Development Installation with UV
-
Install UV (if not already installed):
# macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Windows PowerShell powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Clone and setup:
git clone https://github.com/kivo360/quickhooks.git cd quickhooks
-
Install with UV (recommended):
uv sync --all-extras # Install all dependencies including dev extras
-
Alternative: Classic installation:
make install # Uses UV under the hood
๐ง UV Project Workflow
graph TD
A["๐ uv init"] --> B["๐ฆ uv add dependency"]
B --> C["๐ uv run command"]
C --> D["๐ uv lock"]
D --> E["๐ uv sync"]
E --> F["๐๏ธ uv build"]
F --> G["๐ค uv publish"]
style A fill:#e1f5fe
style B fill:#f3e5f5
style C fill:#e8f5e8
style D fill:#fff3e0
style E fill:#fce4ec
style F fill:#f1f8e9
style G fill:#e3f2fd
๐ Claude Code Integration Setup
# Install globally for Claude Code integration
uv run python -m quickhooks install install-global
# OR setup via script
uv run python scripts/setup_claude_code_integration.py
# Verify integration
quickhooks agents analyze "Write a Python function"
๐ ๏ธ Development Workflow
๐ Start Development Server
# UV-native approach (recommended)
uv run quickhooks-dev run src/ --delay 0.5
# Using Makefile (UV under the hood)
make dev
This starts the development server with hot-reload enabled. The server automatically restarts when you make changes.
๐งช Run Tests
# UV-native testing
uv run pytest tests/ -v --cov=quickhooks
# Using Makefile
make test
๐จ Code Quality
# Format code
uv run ruff format src/ tests/ # or: make format
# Lint code
uv run ruff check src/ tests/ # or: make lint
# Type checking
uv run mypy src/quickhooks # or: make typecheck
# All quality checks
uv run make check # or: make check
๐ UV Command Reference
| Task | UV Command | Makefile Equivalent |
|---|---|---|
| Install deps | uv sync --all-extras |
make install |
| Dev server | uv run quickhooks-dev run src/ |
make dev |
| Run tests | uv run pytest |
make test |
| Format code | uv run ruff format |
make format |
| Type check | uv run mypy src/ |
make typecheck |
| Add dependency | uv add package-name |
N/A |
| Lock deps | uv lock |
N/A |
| Build package | uv build --no-sources |
N/A |
Project Structure
quickhooks/
โโโ src/
โ โโโ quickhooks/ # Main package
โ โโโ __init__.py # Package initialization
โ โโโ cli/ # CLI commands
โ โโโ agent_analysis/ # Agent analysis system
โ โ โโโ analyzer.py # Core analysis engine
โ โ โโโ agent_discovery.py # Local agent discovery
โ โ โโโ context_manager.py # Context chunking
โ โ โโโ command.py # CLI commands
โ โ โโโ types.py # Type definitions
โ โโโ dev.py # Development server
โ โโโ ...
โโโ hooks/ # Claude Code hooks
โ โโโ agent_analysis_hook.py # Main integration hook
โโโ examples/ # Example configurations
โ โโโ claude_code_settings.json
โ โโโ agent_analysis_demo.py
โโโ scripts/ # Setup and utility scripts
โ โโโ setup_claude_code_integration.py
โโโ tests/ # Test files
โโโ .gitignore
โโโ Makefile # Development commands
โโโ pyproject.toml # Project configuration
โโโ README.md
โโโ AGENT_ANALYSIS_README.md # Detailed agent analysis docs
Development Server
The development server provides a smooth development experience with:
- Automatic reload on file changes
- Rich console output
- Clean error reporting
- Configurable watch paths and reload delay
Usage
# Start the development server
python -m quickhooks.dev run src/
# With custom reload delay (in seconds)
python -m quickhooks.dev run src/ --delay 1.0
Or using the CLI:
quickhooks-dev run src/
CLI Commands
Agent Analysis
# Analyze a prompt for agent recommendations
quickhooks agents analyze "Write a Python function that sorts a list"
# With context file
quickhooks agents analyze "Review this code for security issues" --context code.py
# Custom configuration
quickhooks agents analyze "Debug this error" \
--model qwen/qwen3-32b \
--threshold 0.8 \
--format rich
Development Commands
# Show version
quickhooks version
# Say hello
quickhooks hello
quickhooks hello --name "Your Name"
# Development server
quickhooks-dev run src/
๐ Documentation
๐ค Agent Analysis System
For detailed documentation on the AI-powered agent analysis system, see AGENT_ANALYSIS_README.md.
Key Topics:
- ๐ Complete API Reference - All classes, methods, and types
- ๐ Agent File Formats - Python, Markdown, JSON examples
- ๐ Claude Code Integration - Step-by-step setup guide
- ๐ง Troubleshooting - Common issues and solutions
- ๐ Performance Optimization - Tips for faster analysis
๐ UV Package Management
Comprehensive guides for modern Python development with UV:
- ๐ UV Development Guide - Complete UV workflow and best practices
- ๐ Package Lifecycle - Mermaid diagrams of development workflows
- ๐ Deployment Guide - PyPI publishing and production deployment
- ๐ค Contributing Guide - UV-based contribution workflow
๐ Workflow Diagrams
Visual documentation with Mermaid charts:
- ๐ Development lifecycle workflows
- ๐ฆ Dependency management flows
- ๐๏ธ Build and distribution pipelines
- ๐ CI/CD integration patterns
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for detailed information about our UV-based development workflow.
๐ Quick Start for Contributors
-
Fork & Clone:
git clone https://github.com/YOUR_USERNAME/quickhooks.git cd quickhooks
-
Setup Development Environment:
uv sync --all-extras # Install all dependencies
-
Create Feature Branch:
git checkout -b feature/your-amazing-feature
-
Develop & Test:
uv run pytest tests/ -v # Run tests uv run ruff format src/ tests/ # Format code uv run mypy src/quickhooks # Type check
-
Submit PR:
git push origin feature/your-amazing-feature # Create Pull Request on GitHub
๐ Development Commands
# Core development workflow
uv sync --dev # Sync dev environment
uv run pytest tests/ -v # Run comprehensive tests
uv run pytest tests/test_agent_analysis.py -v # Specific tests
uv run make check # Run all quality checks
uv build --no-sources # Test build
# Code quality
uv run ruff format src/ tests/ # Format code
uv run ruff check src/ tests/ # Check linting
uv run mypy src/quickhooks # Type checking
See our UV Guide for detailed development practices and workflow diagrams for visual references.
License
MIT
๐ Project Stats
- ๐ฅ UV-Powered: 10-100x faster dependency management
- ๐ง AI-Enhanced: Intelligent agent analysis with Groq + Pydantic AI
- ๐ Hot-Reload: Development server with instant feedback
- ๐งช Well-Tested: Comprehensive test suite with 90%+ coverage
- ๐ Type-Safe: Full type annotations with mypy validation
- ๐จ Modern Code: Ruff formatting and linting
- ๐ Production-Ready: Docker support and CI/CD pipelines
Made with โค๏ธ and โก UV for the Claude Code community
Powered by Rust-speed dependency management and AI-driven development
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quickhooks-0.1.1.tar.gz.
File metadata
- Download URL: quickhooks-0.1.1.tar.gz
- Upload date:
- Size: 473.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e467a5a4fabf0690f675a7f66b0463ddf3e1bbc14726739bbbf383bb7ca4808
|
|
| MD5 |
0b617cddfd61d7dcf1810fac5942397e
|
|
| BLAKE2b-256 |
c19a9d056ebd6c27ef3756fd2e3cc72bd3951aed66d1783cd7d62f1be4b3767b
|
File details
Details for the file quickhooks-0.1.1-py3-none-any.whl.
File metadata
- Download URL: quickhooks-0.1.1-py3-none-any.whl
- Upload date:
- Size: 64.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4688b76bb0b640391ba30d28b5bc91c5a1d55dc50d65af12608b1b41e105d478
|
|
| MD5 |
ecb92f50d0604f7384ab224acb90c861
|
|
| BLAKE2b-256 |
104a281c986394876a1e607ae3ca3dafe27207162850ac85ce0e3b332ee056c7
|