agentleFS
MicrosoftKnown publishermicrosoft/skala/AGENTS.md

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
  1. Distinctive:

    Add type hints to new public functions and classes.

    line 46
  2. Very specific:

    Use Google-style docstrings with Args:, Returns:, Raises: sections.

    line 47
  3. Very specific:

    Keep tests beside their owning component with a test_ prefix.

    line 58
  4. Distinctive:

    Use fixtures for expensive setup (molecule construction, model loading).

    line 59
  5. Distinctive:

    Prefer fast unit tests; integration tests that run DFT should be marked or placed separately.

    line 60
  6. Distinctive:

    Use reStructuredText for standalone pages.

    line 72
  7. Distinctive:

    Create a feature branch from main.

    line 76
  8. Distinctive:

    Ensure pre-commit hooks pass.

    line 77
  9. Distinctive:

    Add or update tests for new functionality.

    line 78
  10. Distinctive:

    Update documentation if public API changes.

    line 79
  11. Distinctive:

    Keep commits atomic; write clear commit messages.

    line 80

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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:

PathDescription
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

  1. Python version: 3.11–3.13 (target 3.11 for compatibility tooling).
  2. 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-files

Code 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> and pre-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

  1. Create a feature branch from main.
  2. Ensure pre-commit hooks pass.
  3. Add or update tests for new functionality.
  4. Update documentation if public API changes.
  5. Keep commits atomic; write clear commit messages.
  6. 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/): Custom numint module and SkalaKS class 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

TaskCommand
Format codepixi run -e default pre-commit run ruff-format --all-files
Lint codepixi run -e default pre-commit run --all-files
Run runtime testsOMP_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 testsOMP_NUM_THREADS=4 pixi run -e default pytest -v model/tests/test_model.py model/tests/test_utils.py gauxc/tests/ benchmark/tests/
Build docspixi 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 checkpixi run -e default mypy skala/src model/src gauxc/src benchmark/src

Contact

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.