From 56b6e2d86ff77ab179de6880ac4e072869d6a574 Mon Sep 17 00:00:00 2001 From: Pol Michel Date: Fri, 20 Feb 2026 11:49:20 +0100 Subject: [PATCH] docs: Updating AGENTS.md rules regarding documentation generation --- AGENTS.md | 4 +++- docs/AGENTS.md | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 7abf694f..f5896de6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,6 +9,8 @@ uv sync --all-groups --all-extras # Install all deps uv run invoke format # Format code uv run invoke lint # Full pipeline: ruff, yamllint, ty, mypy, markdownlint, vale uv run invoke lint-code # All linters for Python code +uv run invoke docs-generate # Generate all docs (CLI + SDK) +uv run invoke docs-validate # Check generated docs match committed version uv run pytest tests/unit/ # Unit tests uv run pytest tests/integration/ # Integration tests ``` @@ -54,7 +56,7 @@ Key rules: ✅ **Always** - Run `uv run invoke format lint-code` before committing Python code -- Run `uv run invoke generate-sdk generate-infrahubctl` after changing CLI commands or SDK config +- Run `uv run invoke docs-generate` after creating, modifying or deleting CLI commands, SDK config, or Python docstrings - Run markdownlint before committing markdown changes - Follow async/sync dual pattern for new features - Use type hints on all function signatures diff --git a/docs/AGENTS.md b/docs/AGENTS.md index f869e84f..23ae5f68 100644 --- a/docs/AGENTS.md +++ b/docs/AGENTS.md @@ -66,5 +66,7 @@ Use callouts for important notes. 🚫 **Never** -- Edit `docs/infrahubctl/*.mdx` directly (regenerate with `uv run invoke generate-infrahubctl`) -- Edit `docs/python-sdk/reference/config.mdx` directly (regenerate with `uv run invoke generate-sdk`) +- Edit `docs/infrahubctl/*.mdx` directly (regenerate with `uv run invoke docs-generate`) +- Edit `docs/python-sdk/reference/config.mdx` directly (regenerate with `uv run invoke docs-generate`) +- Edit `docs/python-sdk/reference/templating.mdx` directly (regenerate with `uv run invoke docs-generate`) +- Edit `docs/python-sdk/sdk_ref/**/*.mdx` directly (regenerate with `uv run invoke docs-generate`)