This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- AVOID inline comments in code!!!
# Install with development dependencies
pip install -e .[dev]# Run all tests
pytest
# Run specific test file
pytest tests/test_compare.py# Format and lint code (required before commits)
ruff check --fix --select I && ruff formatsmollest (Minimum Viable Language Model) provides drop-in wrappers for OpenAI and Anthropic clients that silently replay requests to smaller candidate LLMs and compare structured outputs.
smollest/openai.py— Drop-inOpenAIwrapper, interceptschat.completions.create()smollest/anthropic.py— Drop-inAnthropicwrapper, interceptsmessages.create()smollest/candidates.py— Runs candidate models (HuggingFace serverless + OpenAI-compatible local servers)smollest/compare.py— JSON field-by-field exact match comparisonsmollest/results.py— Logging to JSON file + console output
Tests are located in the tests/ directory. Always run tests before committing changes.
- Adding new features: Modify relevant modules in
smollest/ - Adding dependencies: Update
pyproject.tomlunder[project.dependencies]or[project.optional-dependencies]
When given a GitHub issue to solve, follow this workflow:
- Create a new branch named after the issue (e.g.,
fix-issue-123or descriptive name) - Implement the solution following the existing code patterns and conventions
- Run tests to ensure nothing is broken:
pytest - Run linting/formatting:
ruff check --fix --select I && ruff format - That's it. Never use the
gitcommit command after a task is finished.
git checkout -b fix-issue-NUMBERAlways ensure tests pass and code is formatted before pushing.