This repository contains configuration and templates for managing AI-powered code analysis workflows using mise (a development environment management tool) and llm (a CLI tool for interacting with large language models).
This project provides a streamlined workflow for analyzing code repositories using large language models. It uses:
- mise for environment and task management
- llm for interacting with LLMs (particularly Claude models from Anthropic)
- repomix for bundling repository content for LLM analysis
The project sets up structured tasks to analyze code and generate various types of documentation and insights:
- Code reviews
- GitHub issues based on code analysis
- Prompt engineering for code issues
- Test coverage analysis
- README documentation
- mise for task and environment management
- llm for interacting with language models
- repomix for bundling repository content
- An Anthropic API key for Claude access
- Clone this repository
- Ensure mise is installed on your system
- Copy the sample configuration:
cp config.toml.sample config.toml
- Edit
config.toml
to match your environment:- Adjust Python version if needed
- Set your templates directory path in
MISE_TEMPLATES_DIR
- For Linux, change
pbcopy
toxclip -selection clipboard
orwl-copy
- For Windows, change
pbcopy
toclip.exe
- Set up your Anthropic API key as an environment variable:
export ANTHROPIC_API_KEY=your_api_key_here
This project uses two configuration files:
Contains task definitions and environment settings for mise:
- Sets up Node.js and Python environments
- Defines tasks for setting up Claude, bundling repos, and generating various analysis outputs
- Configures paths and dependencies between tasks
- Uses environment variables to avoid hardcoded paths
Simple configuration that ensures the latest Python version is used.
The repository includes several prompt templates for different analysis tasks:
Template | Purpose |
---|---|
code-review-gen.md |
Generate thorough code reviews |
github-issues-gen.md |
Create GitHub-compatible issue descriptions |
issue-prompts-gen.md |
Create effective prompts for addressing code issues |
missing-tests-gen.md |
Identify test coverage gaps |
readme-gen.md |
Generate project documentation |
The repository provides several pre-configured tasks:
# Set up the Claude integration
mise run llm:setup_claude
# Register all templates with llm
mise run llm:register_templates
# Generate a code review
mise run llm:generate_code_review
# Generate GitHub issues
mise run llm:generate_github_issues
# Generate issue prompts
mise run llm:generate_issue_prompts
# Generate missing tests report
mise run llm:generate_missing_tests
# Generate a README
mise run llm:generate_readme
# Create repository bundle (if not exists)
mise run llm:clean_bundles
# Copy bundle to clipboard for external use
mise run llm:copy_buffer_bundle
- The workflow typically starts by using
repomix
to bundle your repository content into a single file (repomix-output.txt
) - This bundled content is then passed to the appropriate llm template using Claude
- The analysis output is saved to a corresponding markdown file (e.g.,
code-review.md
,github-issues.md
)
Each analysis task generates a corresponding output file:
code-review.md
: Detailed code reviewgithub-issues.md
: Potential issues in GitHub formatissue-prompts.md
: Prompts for addressing issuesmissing-tests.md
: Test coverage analysisREADME.md
: Project documentation
To add new templates:
- Create a new markdown file in the
templates/
directory - Add a new task in
config.toml
to register and use the template
Not specified in the provided code.
No contribution guidelines are specified in the provided code.