|
1 | 1 | # CodeQual |
2 | 2 |
|
3 | | -CodeQual is an intelligent code review system that analyzes pull requests, educates developers based on identified issues, and tracks individual and team growth over time. |
| 3 | +A comprehensive code quality analysis system powered by AI. |
4 | 4 |
|
5 | | -## Overview |
| 5 | +## Directory Structure |
6 | 6 |
|
7 | | -CodeQual uses a flexible, adaptive multi-agent architecture to provide: |
| 7 | +- `/scripts`: Core scripts for repository analysis and testing |
| 8 | +- `/reports`: Generated analysis reports (timestamped) |
| 9 | +- `/docs`: Documentation and guides |
| 10 | +- `/archive`: Archived files from previous versions |
8 | 11 |
|
9 | | -- Code quality analysis |
10 | | -- Security vulnerability detection |
11 | | -- Performance optimization suggestions |
12 | | -- Educational content tailored to developers |
13 | | -- Skill tracking and professional growth insights |
| 12 | +## Getting Started |
14 | 13 |
|
15 | | -## Features |
16 | | - |
17 | | -- **Two-Tier Analysis**: Choose between quick (1-3 minutes) or comprehensive (5-10 minutes) analysis |
18 | | -- **Multi-Agent Architecture**: Uses several AI models to provide the best analysis for each context |
19 | | -- **Repository Analysis Caching**: Stores deep repository analysis for efficient reuse |
20 | | -- **Skills Tracking**: Monitors developer growth across various skill categories |
21 | | -- **Visualization**: Grafana dashboards for insight visualization |
22 | | - |
23 | | -## Installation |
24 | | - |
25 | | -1. Clone the repository |
26 | | - ```bash |
27 | | - git clone https://github.com/your-username/codequal.git |
28 | | - cd codequal |
29 | | - ``` |
30 | | - |
31 | | -2. Install dependencies |
| 14 | +1. Run a quick test to verify the integration is working: |
32 | 15 | ```bash |
33 | | - npm install |
| 16 | + ./scripts/quick_test.sh |
34 | 17 | ``` |
35 | 18 |
|
36 | | -3. Set up environment variables |
| 19 | +2. Analyze a repository: |
37 | 20 | ```bash |
38 | | - cp .env.sample .env |
39 | | - # Edit .env with your Supabase and API credentials |
| 21 | + ./scripts/analyze_repository.sh <repository_url> [model_name] |
40 | 22 | ``` |
41 | | - |
42 | | -4. Set up the database |
| 23 | + |
| 24 | +3. View the latest report: |
43 | 25 | ```bash |
44 | | - ./scripts/make-scripts-executable.sh |
45 | | - ./scripts/migrate-database.sh |
| 26 | + open ./reports/latest/comprehensive_analysis.md |
46 | 27 | ``` |
47 | 28 |
|
48 | | -## Environment Variables |
49 | | - |
50 | | -CodeQual requires the following environment variables: |
| 29 | +## Documentation |
51 | 30 |
|
52 | | -| Variable | Description | Required | |
53 | | -|----------|-------------|----------| |
54 | | -| SUPABASE_URL | URL for your Supabase project | Yes | |
55 | | -| SUPABASE_SERVICE_ROLE_KEY | Service role key for Supabase | Yes | |
56 | | -| PUBLIC_SUPABASE_ANON_KEY | Anonymous key for Supabase | No | |
57 | | -| GITHUB_TOKEN | GitHub API token | No* | |
58 | | -| OPENAI_API_KEY | OpenAI API key for GPT models | No* | |
59 | | -| ANTHROPIC_API_KEY | Anthropic API key for Claude models | No* | |
60 | | -| DEEPSEEK_API_KEY | DeepSeek API key | No* | |
61 | | -| GEMINI_API_KEY | Google Gemini API key | No* | |
| 31 | +For detailed documentation, see: |
62 | 32 |
|
63 | | -\* At least one model API key is required for functionality. |
64 | | - |
65 | | -For local development, create a `.env` file in the project root with these variables. For production, set them in your deployment environment. |
66 | | - |
67 | | -## Usage |
68 | | - |
69 | | -```bash |
70 | | -# Start the CLI |
71 | | -npm run cli |
72 | | - |
73 | | -# Run analysis on a PR |
74 | | -codequal analyze-pr --repo owner/repo --pr 123 --mode quick |
75 | | -``` |
| 33 | +- [Repository Analysis Guide](./docs/guides/repository_analysis.md) |
76 | 34 |
|
77 | 35 | ## Architecture |
78 | 36 |
|
79 | | -The project uses a TypeScript monorepo structure with the following packages: |
80 | | - |
81 | | -- `agents`: AI agent integrations and orchestration |
82 | | -- `cli`: Command-line interface |
83 | | -- `core`: Core types and utilities |
84 | | -- `database`: Database models and Supabase integration |
85 | | -- `testing`: Testing utilities and test repositories |
86 | | -- `ui`: User interface components |
87 | | - |
88 | | -## Contributing |
89 | | - |
90 | | -1. Fork the repository |
91 | | -2. Create your feature branch (`git checkout -b feature/amazing-feature`) |
92 | | -3. Commit your changes (`git commit -m 'Add some amazing feature'`) |
93 | | -4. Push to the branch (`git push origin feature/amazing-feature`) |
94 | | -5. Open a Pull Request |
| 37 | +CodeQual uses a multi-agent approach with fallback capabilities to analyze repositories across multiple dimensions: |
95 | 38 |
|
96 | | -## License |
| 39 | +- Architecture |
| 40 | +- Code Quality |
| 41 | +- Security |
| 42 | +- Dependencies |
| 43 | +- Performance |
97 | 44 |
|
98 | | -This project is licensed under the MIT License - see the LICENSE file for details. |
| 45 | +Each analysis produces a score from 1-10, which are combined to create an overall repository score. |
0 commit comments