skala
AGENTS.md263 starsChanged 3 months agoMITView on GitHub
Follow these conventions to produce consistent, high-quality contributions. Skala is a neural network-based exchange-correlation (XC) functional for density functional theory (DFT). The codebase includes: - Formatter/linter: Ruff (ruff format, ruff check --fix --select I). - Type checking: mypy in strict mode. Ignore missing type information only for explicitly named untyped dependencies in pyproject.toml; do not use global --ignore-missing-imports. - Line length: 100 characters (Black-compatible). - Imports sorted via Ruff's isort rules. - Generated build, coverage, and documentation output is excluded…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Add type hints to new public functions and classes.
- Very specific: line 47
Use Google-style docstrings with Args:, Returns:, Raises: sections.
- Very specific: line 58
Keep tests beside their owning component with a test_ prefix.
- Distinctive: line 59
Use fixtures for expensive setup (molecule construction, model loading).
- Distinctive: line 60
Prefer fast unit tests; integration tests that run DFT should be marked or placed separately.
- Distinctive: line 72
Use reStructuredText for standalone pages.
- Distinctive: line 76
Create a feature branch from main.
- Distinctive: line 77
Ensure pre-commit hooks pass.
- Distinctive: line 78
Add or update tests for new functionality.
- Distinctive: line 79
Update documentation if public API changes.
- Distinctive: line 80
Keep commits atomic; write clear commit messages.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file provides guidance to AI coding agents (e.g., GitHub Copilot, Cursor, OpenAI Codex) working within the Skala repository. Follow these conventions to produce consistent, high-quality contributions.
Repository overview
Skala is a neural network-based exchange-correlation (XC) functional for density functional theory (DFT). The codebase includes:
| Path | Description |
skala/ | Published ASE, PySCF, and GPU4PySCF runtime plus tests |
model/ | Trainable model definition, tests, and LibTorch/FTorch examples |
gauxc/ | GauXC exporter, native examples, tests, and documentation |
benchmark/ | Benchmark runner, reference data, report tooling, and tests |
website/ | Main Sphinx site |
.github/workflows/ | CI workflows (test, docs) |
Development environment
- Python version: 3.11–3.13 (target 3.11 for compatibility tooling).
- Environment setup (Pixi 0.75):
pixi install --locked -e default
3. **Pre-commit hooks** (required before committing):
```bash
pixi run -e default pre-commit install
pixi run -e default pre-commit run --all-filesCode style & linting
- Formatter/linter: Ruff (
ruff format,ruff check --fix --select I). - Type checking: mypy in strict mode. Ignore missing type information only for explicitly
named untyped dependencies in
pyproject.toml; do not use global--ignore-missing-imports. - Line length: 100 characters (Black-compatible).
- Imports sorted via Ruff's isort rules.
- Generated build, coverage, and documentation output is excluded from static analysis.
When editing code:
- Run
pre-commit run ruff-format --files <file>andpre-commit run ruff --files <file>before committing. - Add type hints to new public functions and classes.
- Use Google-style docstrings with
Args:,Returns:,Raises:sections.
Testing
- Framework: pytest with pytest-cov.
- Run tests:
OMP_NUM_THREADS=4 pixi run -e default pytest -v --doctest-modules \ --cov=skala --cov-report=xml --cov-report=term-missing --cov-report=html \ --durations=50 --durations-min=1.0 skala/src/skala/ skala/tests/ - Keep tests beside their owning component with a
test_prefix. - Use fixtures for expensive setup (molecule construction, model loading).
- Prefer fast unit tests; integration tests that run DFT should be marked or placed separately.
Documentation
- Engine: Sphinx with myst-nb (executes notebooks during build).
- Build locally:
pixi run -e docs sphinx-build -b html website website/_build/html pixi run -e docs sphinx-build -b html gauxc/docs website/_build/html/gauxc touch website/_build/html/.nojekyll - Notebooks in
website/should be executable with a 5-minute timeout. - Use reStructuredText for standalone pages; Jupyter notebooks for tutorials.
Pull request guidelines
- Create a feature branch from
main. - Ensure pre-commit hooks pass.
- Add or update tests for new functionality.
- Update documentation if public API changes.
- Keep commits atomic; write clear commit messages.
- CI must pass (tests, linting, docs build).
Architecture notes
- Runtime functional API (
skala/src/skala/functional/): Loads traced checkpoints and defines traditional functionals and the runtime interface. - Model definition (
model/src/skala_model/): Defines trainable layers and the enhancement-factor network; it is not part of release artifacts. - PySCF integration (
skala/src/skala/pyscf/): Customnumintmodule andSkalaKSclass hook the model into PySCF's DFT machinery. - ASE calculator (
skala/src/skala/ase/): Provides an ASE-compatible calculator for energy/force evaluations and geometry optimizations. - GauXC integration (
gauxc/): Exporter and C/C++/Fortran examples for external GauXC builds.
Common commands
| Task | Command |
| Format code | pixi run -e default pre-commit run ruff-format --all-files |
| Lint code | pixi run -e default pre-commit run --all-files |
| Run runtime tests | OMP_NUM_THREADS=4 pixi run -e default pytest -v --doctest-modules --cov=skala --cov-report=xml --cov-report=term-missing --cov-report=html --durations=50 --durations-min=1.0 skala/src/skala/ skala/tests/ |
| Run component tests | OMP_NUM_THREADS=4 pixi run -e default pytest -v model/tests/test_model.py model/tests/test_utils.py gauxc/tests/ benchmark/tests/ |
| Build docs | pixi run -e docs sphinx-build -b html website website/_build/html && pixi run -e docs sphinx-build -b html gauxc/docs website/_build/html/gauxc && touch website/_build/html/.nojekyll |
| Type check | pixi run -e default mypy skala/src model/src gauxc/src benchmark/src |
Contact
- Issues: https://github.com/microsoft/skala/issues
- Security: See
SECURITY.md - Code of Conduct: Microsoft Open Source CoC (see
CONTRIBUTING.md)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

