Thank you for your interest in contributing to Lux!
Lux is an open-source puzzle platform featuring:
- A Flask-based puzzle server
- A CLI agent for solving puzzles
- Ollama-powered contextual hints
- Docker-based validation for code challenges
- Automated testing, linting, and security scanning
We welcome bug fixes, new puzzles, documentation improvements, tests, and new features.
- Python 3.10+
- Git
- Docker (for script-based puzzle validation)
- Ollama (optional, required for AI hints)
git clone https://github.com/johnny603/lux.git
cd luxpython3 -m venv venv
source venv/bin/activateApplication dependencies:
pip install -r requirements.txtDevelopment dependencies:
pip install -r requirements-dev.txtpython3 server.pyBy default the server listens on:
http://127.0.0.1:5050
In a separate terminal:
source venv/bin/activate
python3 agent.pyIf using a custom server URL:
export PUZZLE_SERVER=http://127.0.0.1:5050
python3 agent.pyInstall Ollama and ensure a model is available locally:
ollama pull llama3.2
ollama serveThe agent uses Ollama to generate hints while avoiding direct solutions.
Run all tests:
pytestCurrent tests are located in:
tests/
When adding new functionality, please add tests when practical.
Run Ruff:
ruff check .Check formatting:
ruff format --check .Auto-format:
ruff format .Run Bandit:
bandit -r .Security checks are also performed automatically through:
- Bandit
- CodeQL
- Snyk
- Dependabot
- Fork the repository.
- Create a feature branch.
- Make your changes.
- Run:
ruff check .
pytest
bandit -r .- Commit using Conventional Commits.
- Open a Pull Request.
Please follow the Conventional Commits specification.
Examples:
feat: add new puzzle category
fix: correct level validation logic
docs: update installation guide
test: add API smoke tests
refactor: simplify puzzle lookup
chore: update dependencies
ci: add CodeQL workflow
For breaking changes:
feat!: redesign puzzle API
or
feat(api): redesign puzzle API
BREAKING CHANGE: endpoint responses changed
Some ideas for contributors:
- Add new Linux puzzles
- Add new C programming puzzles
- Improve Docker sandboxing
- Add web UI support
- Add progress persistence
- Improve Ollama prompt engineering
- Expand automated test coverage
- Improve documentation
- Prefer clear, readable code.
- Keep functions focused and small.
- Add comments when behavior is non-obvious.
- Avoid unnecessary dependencies.
- Maintain compatibility with Python 3.10+.
Before opening an issue:
- Search existing issues first.
- Include reproduction steps.
- Include relevant logs and screenshots.
- Provide environment information.
Use the provided issue templates whenever possible.
Be respectful and constructive.
We welcome contributors of all experience levels and encourage collaboration, learning, and knowledge sharing.
Thank you for helping improve Lux!