Skip to content

Commit febabf0

Browse files
committed
Update AGENTS.md coding guidelines
- Document parser search order (pixi.toml, conda.toml, pyproject.toml, .condarc) - Add parser-specific conventions and documentation guidelines - Expand import, testing, and linting sections
1 parent 7fc01f0 commit febabf0

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

AGENTS.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
is a thin re-export shim (`configure_parser`, `execute`, `generate_parser`).
1010

1111
- Parser implementations use submodules, not subpackages. The canonical
12-
format parsers live at `conda_tasks/parsers/yaml.py` and
13-
`conda_tasks/parsers/toml.py` — plain modules, not directories with
14-
`__init__.py`. Only create a subpackage when there are multiple files
15-
to group.
12+
format parsers live at `conda_tasks/parsers/toml.py`,
13+
`conda_tasks/parsers/pixi_toml.py`, `conda_tasks/parsers/pyproject_toml.py`,
14+
and `conda_tasks/parsers/condarc.py` — plain modules, not directories
15+
with `__init__.py`. Only create a subpackage when there are multiple
16+
files to group.
1617

1718
- Tests mirror the source structure. Tests for `conda_tasks/cli/run.py`
18-
live in `tests/cli/test_run.py`, tests for `conda_tasks/parsers/yaml.py`
19-
live in `tests/parsers/test_yaml.py`, etc. Test module names match their
19+
live in `tests/cli/test_run.py`, tests for `conda_tasks/parsers/toml.py`
20+
live in `tests/parsers/test_toml.py`, etc. Test module names match their
2021
corresponding source module names.
2122

2223
## Imports
@@ -106,11 +107,23 @@
106107
itself. In docstrings, use `*param*` for parameter names (standard
107108
Sphinx convention) but avoid bold elsewhere.
108109

109-
- Keep `sphinx-design` tab labels short. Use "YAML" / "TOML" instead
110-
of full filenames like "conda-tasks.yml" / "conda-tasks.toml" when
111-
the tab content already identifies the file. This prevents tab
112-
overflow on narrow viewports.
110+
- Keep `sphinx-design` tab labels short. Use "TOML" / "pyproject.toml"
111+
instead of full filenames when the tab content already identifies the
112+
file. This prevents tab overflow on narrow viewports.
113113

114114
- The API reference is split into focused sub-pages by concern (models,
115115
parsers, execution, context) rather than a single monolithic page.
116116
The index uses `sphinx-design` grid cards for navigation.
117+
118+
## Parser search order
119+
120+
- The parser registry searches for task manifests in this order:
121+
1. `pixi.toml` — pixi-native format (task compatibility)
122+
2. `conda.toml` — conda-native task manifest
123+
3. `pyproject.toml` — embedded under `[tool.conda.tasks]`,
124+
`[tool.conda-tasks.tasks]` (legacy), or `[tool.pixi.tasks]`
125+
4. `.condarc` — tasks defined via conda settings
126+
127+
- All parsers produce task models via the same base interface.
128+
Parser-specific logic stays in the parser; downstream code only
129+
depends on the model.

0 commit comments

Comments
 (0)