Last active
August 4, 2025 14:09
-
-
Save cortfritz/b6188cf19a7cde8d17655fab7ed0b231 to your computer and use it in GitHub Desktop.
mise toml to support a workflow using ollama
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AI-Powered Development Tasks Configuration | |
# ===================================================== | |
# | |
# This configuration provides AI-powered development tasks using Ollama and repomix | |
# to analyze your repository and generate various development artifacts. | |
# | |
# It is based on Harper Reed's Feb 2025 LLM workflow described here: https://harper.blog/2025/02/16/my-llm-codegen-workflow-atm/ | |
# ...worth a read. | |
# | |
# PREREQUISITES: | |
# -------------- | |
# 1. Install Ollama: https://ollama.ai or `brew install ollama` | |
# 2. Install repomix: `npm install -g repomix` | |
# 3. Pull the AI model: `ollama pull qwen2.5-coder:latest` | |
# 4. Start Ollama service: `ollama serve` (if not auto-started) | |
# | |
# USAGE EXAMPLES: | |
# --------------- | |
# | |
# # Generate repository bundle and run code review | |
# mise run AI:generate_code_review | |
# | |
# # Generate all AI analysis tasks at once | |
# mise run AI:generate_all | |
# | |
# # Copy repository bundle to clipboard for external use | |
# mise run AI:copy_buffer_bundle | |
# | |
# # Generate specific artifacts | |
# mise run AI:generate_github_issues | |
# mise run AI:generate_missing_tests | |
# mise run AI:generate_readme | |
# mise run AI:generate_issue_prompts | |
# | |
# # Use a different model temporarily | |
# OLLAMA_MODEL=llama3.2:8b mise run AI:generate_code_review | |
# OLLAMA_MODEL=codellama:7b mise run AI:generate_missing_tests | |
# | |
# # List all available AI tasks | |
# mise tasks | grep AI: | |
# | |
# # Check what files were generated | |
# ls -la *.md | |
# | |
# OUTPUT FILES: | |
# ------------- | |
# - output.txt # Repository bundle (generated by repomix) | |
# - code_review.md # Comprehensive code review and recommendations | |
# - github_issues.md # Suggested GitHub issues with templates | |
# - issue_prompts.md # Reusable prompt templates for common issues | |
# - missing_tests.md # Test coverage analysis and suggested tests | |
# - README_generated.md # Auto-generated README based on codebase | |
# | |
# CUSTOMIZATION: | |
# -------------- | |
# To change the default model, update OLLAMA_MODEL below or set it in your environment: | |
# export OLLAMA_MODEL=mistral:7b | |
# | |
# Popular models for coding tasks: | |
# - qwen2.5-coder:latest # Best for code analysis (default) | |
# - codellama:7b # Meta's code-focused model | |
# - llama3.2:8b # Good general-purpose model | |
# - mistral:7b # Fast and capable | |
# - gemma2:9b # Google's efficient model | |
# Environment variables | |
[env] | |
OLLAMA_MODEL = "qwen2.5-coder:latest" | |
[tasks."AI:clean_bundles"] | |
description = "Generate AI bundle output file using repomix" | |
run = [ | |
"repomix --output output.txt", | |
"echo 'Bundle generated successfully in output.txt'" | |
] | |
[tasks."AI:copy_buffer_bundle"] | |
description = "Copy generated AI bundle from output.txt to system clipboard for external use" | |
depends = ["AI:clean_bundles"] | |
run = [ | |
"cat output.txt | pbcopy", # macOS clipboard | |
# "cat output.txt | xclip -selection clipboard", # Linux alternative | |
# "cat output.txt | clip", # Windows alternative | |
"echo 'Bundle copied to clipboard'" | |
] | |
[tasks."AI:generate_code_review"] | |
description = "Generate code review output from repository content stored in output.txt using Ollama" | |
depends = ["AI:clean_bundles"] | |
env = { OLLAMA_MODEL = "${OLLAMA_MODEL:-llama3.2}" } | |
run = [ | |
"cat output.txt | ollama run $OLLAMA_MODEL 'Please provide a comprehensive code review of this repository. Focus on: 1) Code quality and best practices, 2) Potential bugs or issues, 3) Architecture and design patterns, 4) Performance considerations, 5) Security concerns, 6) Maintainability improvements. Provide specific examples and actionable recommendations.' > code_review.md", | |
"echo 'Code review generated in code_review.md'" | |
] | |
[tasks."AI:generate_github_issues"] | |
description = "Generate GitHub issues from repository content stored in output.txt using Ollama" | |
depends = ["AI:clean_bundles"] | |
env = { OLLAMA_MODEL = "${OLLAMA_MODEL:-llama3.2}" } | |
run = [ | |
"cat output.txt | ollama run $OLLAMA_MODEL 'Analyze this repository and generate 5-10 actionable GitHub issues. Each issue should include: 1) Clear title, 2) Detailed description, 3) Acceptance criteria, 4) Labels (bug, enhancement, documentation, etc.), 5) Priority level. Focus on improvements, bug fixes, and missing features. Format as GitHub issue templates.' > github_issues.md", | |
"echo 'GitHub issues generated in github_issues.md'" | |
] | |
[tasks."AI:generate_issue_prompts"] | |
description = "Generate issue prompts from repository content stored in output.txt using Ollama" | |
depends = ["AI:clean_bundles"] | |
env = { OLLAMA_MODEL = "${OLLAMA_MODEL:-llama3.2}" } | |
run = [ | |
"cat output.txt | ollama run $OLLAMA_MODEL 'Create a set of prompt templates for common development issues based on this repository. Include prompts for: 1) Bug report templates, 2) Feature request templates, 3) Code improvement suggestions, 4) Documentation updates, 5) Testing scenarios. Make them specific to this codebase and its patterns.' > issue_prompts.md", | |
"echo 'Issue prompts generated in issue_prompts.md'" | |
] | |
[tasks."AI:generate_missing_tests"] | |
description = "Generate missing tests for code in repository content stored in output.txt using Ollama" | |
depends = ["AI:clean_bundles"] | |
env = { OLLAMA_MODEL = "${OLLAMA_MODEL:-llama3.2}" } | |
run = [ | |
"cat output.txt | ollama run $OLLAMA_MODEL 'Analyze this codebase and identify missing test coverage. Generate: 1) Unit tests for untested functions/methods, 2) Integration tests for key workflows, 3) Edge case tests, 4) Error handling tests. Use the same testing framework and patterns already present in the codebase. Provide complete, runnable test code.' > missing_tests.md", | |
"echo 'Missing tests analysis generated in missing_tests.md'" | |
] | |
[tasks."AI:generate_readme"] | |
description = "Generate README.md from repository content stored in output.txt using Ollama" | |
depends = ["AI:clean_bundles"] | |
env = { OLLAMA_MODEL = "${OLLAMA_MODEL:-llama3.2}" } | |
run = [ | |
"cat output.txt | ollama run $OLLAMA_MODEL 'Generate a comprehensive README.md for this repository. Include: 1) Project title and description, 2) Installation instructions, 3) Usage examples, 4) API documentation, 5) Configuration options, 6) Contributing guidelines, 7) License information, 8) Badges and status indicators. Make it professional and user-friendly.' > README_generated.md", | |
"echo 'README generated in README_generated.md'" | |
] | |
# Convenience task to run all AI generation tasks | |
[tasks."AI:generate_all"] | |
description = "Run all AI generation tasks" | |
depends = [ | |
"AI:generate_code_review", | |
"AI:generate_github_issues", | |
"AI:generate_issue_prompts", | |
"AI:generate_missing_tests", | |
"AI:generate_readme" | |
] | |
run = "echo 'All AI generation tasks completed'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment