Skip to content

Comments

Add doc regeneration rule to AGENTS.md#846

Open
polmichel wants to merge 2 commits intodevelopfrom
pmi-20260220-update-AGENTS-rules
Open

Add doc regeneration rule to AGENTS.md#846
polmichel wants to merge 2 commits intodevelopfrom
pmi-20260220-update-AGENTS-rules

Conversation

@polmichel
Copy link

@polmichel polmichel commented Feb 20, 2026

Just seen the Agents.MD rule update on stable branch https://github.com/opsmill/infrahub-sdk-python/pull/837/changes

Adapted it to new documentation generation code which has been merged in the following PRs: #822 & #832 & #833

Documentation
Add reminder to run invoke docs-generate after changing CLI commands, SDK config or Python docstrings so generated docs stay in sync.

Summary by CodeRabbit

  • Documentation
    • Updated documentation guidelines with a new requirement to regenerate documentation after creating, modifying, or deleting CLI commands, SDK configuration, or Python docstrings.

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Walkthrough

A new documentation rule was added to the AGENTS.md file specifying that after creating, modifying, or deleting CLI commands, SDK config, or Python docstrings, a bullet point should be added to run docs-generate via uv run invoke docs-generate. This is a single-line addition that establishes a requirement for documentation generation as part of the development workflow for these specific types of changes.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a documentation rule about doc regeneration to the AGENTS.md file.
Description check ✅ Passed The description provides context about the change (referencing related PRs and the stable branch), explains the documentation requirement, and covers the 'Why' and 'What changed' sections adequately for this straightforward documentation update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@polmichel polmichel force-pushed the pmi-20260220-update-AGENTS-rules branch from 6b35d23 to 48e4957 Compare February 20, 2026 10:58
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 20, 2026

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6a7ebfa
Status: ✅  Deploy successful!
Preview URL: https://4b29f623.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pmi-20260220-update-agents-r.infrahub-sdk-python.pages.dev

View logs

@polmichel polmichel self-assigned this Feb 20, 2026
@polmichel polmichel marked this pull request as ready for review February 20, 2026 12:44
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Line 57: The Never section still references legacy tasks; find the entries
that mention `uv run invoke generate-infrahubctl` and `uv run invoke
generate-sdk` (the lines that tell contributors how to regenerate docs) and
replace them with unified guidance to regenerate using `uv run invoke
docs-generate`, e.g., update the two bullets to read that
`docs/infrahubctl/*.mdx` and `docs/python-sdk/reference/config.mdx` should be
edited directly and regenerated with `uv run invoke docs-generate` instead of
the old individual commands.

✅ **Always**

- Run `uv run invoke format lint-code` before committing Python code
- Run `uv run invoke docs-generate` after creating, modifying or deleting CLI commands, SDK config, or Python docstrings
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Search for invoke task definitions related to docs generation
fd -e py "tasks" | head -20

Repository: opsmill/infrahub-sdk-python

Length of output: 104


🏁 Script executed:

# Look for docs-generate, docs_generate, and old command definitions
rg "docs.generate|docs_generate|generate.sdk|generate_sdk|generate.infrahubctl|generate_infrahubctl" --type=py -B 2 -A 5

Repository: opsmill/infrahub-sdk-python

Length of output: 6029


🏁 Script executed:

# Check docs/AGENTS.md for any references to these commands
fd "AGENTS" -e md -e mdx

Repository: opsmill/infrahub-sdk-python

Length of output: 175


🏁 Script executed:

# Check docs/AGENTS.md for references to old commands
cat -n docs/AGENTS.md | head -100

Repository: opsmill/infrahub-sdk-python

Length of output: 2792


🏁 Script executed:

# Also check the content of the root AGENTS.md file to see the context
sed -n '50,70p' AGENTS.md

Repository: opsmill/infrahub-sdk-python

Length of output: 702


Update docs/AGENTS.md to use docs-generate instead of legacy commands in the Never section.

The docs-generate task exists and properly covers all stated triggers (CLI commands, SDK config, and Python docstrings via API documentation). However, docs/AGENTS.md currently contradicts itself: line 13 references the unified uv run invoke docs-generate, but lines 69-70 still instruct contributors to regenerate using the old individual commands (uv run invoke generate-infrahubctl and uv run invoke generate-sdk).

Update the Never section to:

- 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`)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` at line 57, The Never section still references legacy tasks; find
the entries that mention `uv run invoke generate-infrahubctl` and `uv run invoke
generate-sdk` (the lines that tell contributors how to regenerate docs) and
replace them with unified guidance to regenerate using `uv run invoke
docs-generate`, e.g., update the two bullets to read that
`docs/infrahubctl/*.mdx` and `docs/python-sdk/reference/config.mdx` should be
edited directly and regenerated with `uv run invoke docs-generate` instead of
the old individual commands.

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