Conversation
WalkthroughA 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 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ 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. Comment |
6b35d23 to
48e4957
Compare
Deploying infrahub-sdk-python with
|
| 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Search for invoke task definitions related to docs generation
fd -e py "tasks" | head -20Repository: 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 5Repository: 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 mdxRepository: 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 -100Repository: 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.mdRepository: 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.
Just seen the Agents.MD rule update on
stablebranch https://github.com/opsmill/infrahub-sdk-python/pull/837/changesAdapted it to new documentation generation code which has been merged in the following PRs: #822 & #832 & #833
Documentation
Add reminder to
run invoke docs-generateafter changing CLI commands, SDK config or Python docstrings so generated docs stay in sync.Summary by CodeRabbit