π₯ Professional GitHub repository topic generator powered by Ollama LLM
Project Status: π§ Pre-release - Core functionality complete, undergoing testing
Ollama Topic Forge automatically analyzes your GitHub repositories and generates relevant, high-quality topics using local LLM analysis. Built with a focus on reliability, formal contracts, and production-ready engineering practices.
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β User/CLI ββββββΆβ Main Tool ββββββΆβ Git Repo β
βββββββββββββββ ββββββββ¬βββββββ βββββββββββββββ
β
ββββββββΌβββββββ
β Validator β β Contracts (specs/)
ββββββββ¬βββββββ
β
ββββββββββββββββββββΌβββββββββββββββββββ
βΌ βΌ βΌ
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Ollama β β GitHub β β jq β
β Server β β CLI β β Parser β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
Key components:
- Data Contracts: JSON schemas and TLA+ specifications in
specs/ - Experiments: 22 documented experiments showing development process
- Validation: Multi-layer validation at every API boundary
- Error Handling: Retry logic with exponential backoff
For detailed architecture, see Getting Started Guide
- π€ LLM-Powered Analysis: Uses Ollama for intelligent repository analysis
- π Smart Topic Generation: Analyzes README, code structure, and dependencies
- β Contract Validation: Formal validation of all API interactions
- π Retry Logic: Robust error handling with exponential backoff
- π― GitHub Integration: Seamless updates via GitHub CLI
- π§ͺ Thoroughly Tested: Comprehensive unit and integration tests
- π Debug Mode: Detailed logging and performance metrics
- Guile Scheme 3.0+ (tested with 3.0.7)
- Ollama v0.1.0+ running locally
- GitHub CLI v2.0+ (for repository updates)
- jq v1.6+ (for JSON processing)
- Git v2.0+ (for repository access)
- GNU Make v4.0+ (for build system)
- Guile: 3.0.7 on FreeBSD 14.3
- Ollama: 0.9.6 (server and CLI)
- GitHub CLI: 2.40.0
- jq: 1.6
- Git: 2.43.0
- GNU Make: 4.4.1
- llama3.2:3b (default) - 2.0 GB, supports structured output and JSON generation
- qwen2.5-coder:7b - 4.7 GB, better code understanding capabilities
# Clone the repository
git clone https://github.com/aygp-dr/ollama-topic-forge.git
cd ollama-topic-forge
# Build and install
make build
sudo make install
# Or install for development
make dev-install# Start Ollama
ollama serve
# Generate topics (dry run)
ollama-topic-forge --dry-run
# Generate and update GitHub topics
ollama-topic-forge --verbose
# Use specific model
ollama-topic-forge --model qwen2.5-coder:7b
# Debug mode with detailed logging
ollama-topic-forge --debug --dry-runmake help # Show all available targets
make build # Build the project
make test # Run all tests
make lint # Code quality checks
make check # Verify dependencies
make clean # Clean build artifacts
make experiments-all # Run all experiments
# Additional tools
./scripts/deps.sh # Detailed dependency check
./scripts/validate-all.sh # Validate all experimentsollama-topic-forge/
βββ src/ # Source code
β βββ ollama-topic-forge # Main executable
βββ tests/ # Test suite
β βββ unit/ # Unit tests
β βββ integration/ # Integration tests
β βββ fixtures/ # Test data
βββ docs/ # Documentation
β βββ api/ # API documentation
β βββ user-guide/ # User documentation
β βββ development/ # Development docs
βββ specs/ # Formal specifications
β βββ contracts/ # API contracts
β βββ schemas/ # JSON schemas
β βββ formal/ # TLA+ specifications
βββ examples/ # Usage examples
βββ scripts/ # Build and release scripts
This project was built using experimental engineering - a methodology that combines:
- π§ͺ Iterative Experimentation: 13 controlled experiments shaped the architecture
- π Contract-Driven Development: Formal API contracts with validation
- π Property-Based Testing: Tests derived from experimental observations
- π Formal Methods: TLA+ specifications for critical invariants
See RFC: Experimental Engineering Methodology for details.
All external integrations are governed by formal contracts:
- Ollama API: Request/response validation with retry logic
- GitHub API: Topic format validation and error handling
- Environment: Prerequisite checking with clear error messages
See System Contracts for complete specifications.
# Analyze current repository
cd your-repo
ollama-topic-forge --dry-run --verbose# .github/workflows/topics.yml
name: Update Repository Topics
on:
push:
branches: [main]
jobs:
topics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update topics
run: |
ollama serve &
sleep 10
ollama-topic-forge --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}# Use specific model with custom retry logic
ollama-topic-forge \
--model llama3.2:3b \
--retry 5 \
--verbose \
--dry-run# Run all tests
make test
# Run specific test categories
make -C tests/unit test
make -C tests/integration test
# Run with coverage
make test-coverage- Read the methodology: See development docs
- Run experiments: Follow the experimental engineering approach
- Write contracts: Define formal specifications for new features
- Test thoroughly: Both unit and property-based tests
- Document learnings: Update specs with experiment results
MIT License - see LICENSE for details.
- Ollama - Local LLM inference
- GitHub CLI - GitHub API client
- Guile Scheme - GNU's Scheme implementation
This project demonstrates engineering practices described in:
- Meyer, Bertrand. "Applying 'Design by Contract'." IEEE Computer, 1992.
- Claessen & Hughes. "QuickCheck: A Lightweight Tool for Random Testing." ICFP, 2000.
- Lamport, Leslie. "The Temporal Logic of Actions." ACM TOPLAS, 1994.
Built with experimental engineering practices and formal methods π¬