- Core package:
fmtools/(public API, CLI, adapters, pipeline, debugging, integrations). - Tests:
tests/withtest_*.pymodules and shared fixtures intests/conftest.py. - Examples and runnable demos:
examples/anduse_cases/. - Utility scripts:
scripts/(setup.sh,doctor.sh, Homebrew/install helpers). - Sample data:
datasets/. - Packaging and tool config:
pyproject.toml; release notes inCHANGELOG.md.
./scripts/setup.sh: bootstrap local dev environment (installsuv, syncs deps, optional CLI install).uv sync --all-groups: install runtime + dev dependencies into.venv.uv run fmtools doctor: validate platform and dependency prerequisites.uv run fmtools lint: run Ruff checks.uv run fmtools format: run Ruff formatter.uv run fmtools typecheck: runtytype checks forfmtools/.uv run fmtools test: run pytest suite.uv run fmtools check: full CI-equivalent gate (lint + format + typecheck + tests).
- Python 3.13+ target, 4-space indentation, max line length 100 (Ruff config).
- Prefer explicit type hints and clean async patterns (
async/await) where applicable. - Naming: modules/functions
snake_case, classesPascalCase, constantsUPPER_SNAKE_CASE. - Keep function docstrings precise: in this project they can influence LLM-facing behavior.
- Framework:
pytestwithpytest-asyncio(asyncio_mode = auto). - Place tests in
tests/test_<feature>.pyand mirror source module intent. - Add regression tests for bug fixes and edge cases (sync + async paths when relevant).
- Run
uv run fmtools test -vlocally before opening a PR.
- Follow Conventional Commit style seen in history, e.g.:
feat: add context compaction modechore: clean build artifacts
- Keep commits focused and self-contained.
- PRs should include: clear summary, motivation, linked issue (if any), and test evidence (command(s) + result).
- Update docs/examples/changelog when behavior or public APIs change.
- Never commit secrets or local machine artifacts; keep
.gitignoreclean. - Apple SDK support is sourced via
tool.uv.sources; verify dependency changes carefully.