Skip to content

Conversation

@chrisjsewell
Copy link
Member

This PR adds comprehensive tooling and documentation to enable GitHub Copilot agents (and other AI coding assistants) to work effectively with the sphinx-codelinks project.

Summary

Add agent documentation, GitHub Copilot setup workflow, tox configuration for standardized development, and PEP 735 dependency groups for modern dependency management.

Inspiration

This PR follows patterns established in these repositories:

Changes

New Files

File Description
AGENTS.md Comprehensive guide for AI coding agents (~450 lines) with project overview, repository structure, development commands, code style guidelines, commit message format, testing guidelines, Sphinx integration flow diagram, architecture documentation, and common patterns

Modified Files

File Changes
pyproject.toml Added [dependency-groups] section with testing, docs, mypy, ruff, and build groups (PEP 735)

Details

AGENTS.md highlights

  • Project overview and repository structure
  • Development commands (all tox-based)
  • Code style guidelines with markdownlint, Ruff, and Mypy
  • Commit message format with emoji keywords (✨, 🐛, 📚, etc.)
  • Sphinx integration flow with mermaid diagram and event handler table
  • Common patterns for adding languages, markers, CLI commands, and config options
  • Reference documentation with links to all dependencies

tox.ini environments

  • py{312,313,314}-sphinx{7,8,9} — Test matrix across Python and Sphinx versions
  • docs — Documentation building with CLEAN/BUILDER env var support
  • mypy — Type checking
  • ruff-check / ruff-fmt — Linting and formatting

pyproject.toml dependency groups

  • testing — pytest, syrupy, coverage tools
  • docs — Sphinx themes and documentation extensions
  • mypy — Type checking and stub packages
  • ruff — Linting/formatting
  • build — Build and packaging tools

This PR adds comprehensive tooling and documentation to enable GitHub Copilot agents (and other AI coding assistants) to work effectively with the sphinx-codelinks project.

## Summary

Add agent documentation, GitHub Copilot setup workflow, tox configuration for standardized development, and PEP 735 dependency groups for modern dependency management.

## Inspiration

This PR follows patterns established in these repositories:

- [useblocks/sphinx-needs](https://github.com/useblocks/sphinx-needs) — AGENTS.md structure, dependency groups
- [executablebooks/sphinx-design](https://github.com/executablebooks/sphinx-design) — tox.ini, copilot-setup-steps.yml, commit message format
- [executablebooks/MyST-Parser](https://github.com/executablebooks/MyST-Parser) — AGENTS.md sections, Sphinx integration documentation

## Changes

### New Files

| File | Description |
| ---- | ----------- |
| `AGENTS.md` | Comprehensive guide for AI coding agents (~450 lines) with project overview, repository structure, development commands, code style guidelines, commit message format, testing guidelines, Sphinx integration flow diagram, architecture documentation, and common patterns |
| `tox.ini` | Standardized tox configuration with test matrix (`py{312,313,314}-sphinx{7,8,9}`), docs, mypy, and ruff environments |
| `.github/workflows/copilot-setup-steps.yml` | GitHub Copilot agent setup workflow installing uv, pre-commit, and tox |

### Modified Files

| File | Changes |
| ---- | ------- |
| `pyproject.toml` | Added `[dependency-groups]` section with `testing`, `docs`, `mypy`, `ruff`, and `build` groups (PEP 735) |

## Details

### AGENTS.md highlights

- Project overview and repository structure
- Development commands (all tox-based)
- Code style guidelines with markdownlint, Ruff, and Mypy
- Commit message format with emoji keywords (✨, 🐛, 📚, etc.)
- Sphinx integration flow with mermaid diagram and event handler table
- Common patterns for adding languages, markers, CLI commands, and config options
- Reference documentation with links to all dependencies

### tox.ini environments

- `py{312,313,314}-sphinx{7,8,9}` — Test matrix across Python and Sphinx versions
- `docs` — Documentation building with CLEAN/BUILDER env var support
- `mypy` — Type checking
- `ruff-check` / `ruff-fmt` — Linting and formatting

### pyproject.toml dependency groups

- `testing` — pytest, syrupy, coverage tools
- `docs` — Sphinx themes and documentation extensions
- `mypy` — Type checking and stub packages
- `ruff` — Linting/formatting
- `build` — Build and packaging tools
@ubmarco ubmarco self-requested a review January 21, 2026 14:10
Copy link
Member

@ubmarco ubmarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tox fails for me locally

py314-sphinx7: Exception running subprocess [Errno 2] No such file or directory: 'pytest'
py314-sphinx7: exit 2 (0.00 seconds) /home/marco/git/useblocks/sphinx-test-reports> pytest tests
py314-sphinx7: FAIL ✖ in 16.04 seconds

@chrisjsewell
Copy link
Member Author

@ubmarco yeh needs to look more like this https://github.com/executablebooks/MyST-Parser/blob/master/tox.ini

Also the ### Testing of AGENTS.md needs to be updated, to use the correct environments

@chrisjsewell
Copy link
Member Author

@ubmarco fixed in d302a7c

@chrisjsewell chrisjsewell requested a review from ubmarco January 21, 2026 15:16
@ubmarco ubmarco merged commit c440f59 into useblocks:main Jan 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants