Skip to content

Add doc regeneration rule to AGENTS.md#846

Merged
polmichel merged 1 commit intodevelopfrom
pmi-20260220-update-AGENTS-rules
Feb 27, 2026
Merged

Add doc regeneration rule to AGENTS.md#846
polmichel merged 1 commit 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
    • Added two local workflow commands: docs-generate and docs-validate to streamline documentation updates.
    • Updated guidelines to require running docs-generate after creating, modifying, or deleting CLI commands, SDK config, or Python docstrings.
    • Replaced prior separate regeneration instructions with a unified docs-generate workflow and adjusted related wording for consistency.

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Walkthrough

Added two documentation workflow commands: uv run invoke docs-generate and uv run invoke docs-validate. Updated project key rules to require running uv run invoke docs-generate after creating, modifying, or deleting CLI commands, SDK config, or Python docstrings. Removed prior references to generate-sdk and generate-infrahubctl. Documentation targets were consolidated under the new docs-generate invocation (including infrahubctl, config.mdx, templating.mdx, and sdk_ref/**/*.mdx).

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding documentation regeneration rules to AGENTS.md, which aligns with the file modifications and objectives.
Description check ✅ Passed The description covers the core purpose (docs-generate reminder) and context, but lacks sections from the template like impact assessment, testing instructions, checklist items, and structured changelog entry.
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: 56b6e2d
Status: ✅  Deploy successful!
Preview URL: https://641bb6d0.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.

@polmichel polmichel force-pushed the pmi-20260220-update-AGENTS-rules branch from 6a7ebfa to acfa9ec Compare February 27, 2026 08:10
@github-actions github-actions bot added the type/documentation Improvements or additions to documentation label Feb 27, 2026
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 `@docs/AGENTS.md`:
- Line 69: Update the guidance that protects generated infrahubctl docs to use a
recursive glob: replace the current pattern `docs/infrahubctl/*.mdx` with
`docs/infrahubctl/**/*.mdx` and update the instructional text to "Do not edit
`docs/infrahubctl/**/*.mdx` files directly; regenerate with `uv run invoke
generate-infrahubctl`" so nested generated pages are also covered.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a7ebfa and acfa9ec.

📒 Files selected for processing (2)
  • AGENTS.md
  • docs/AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • AGENTS.md

@polmichel polmichel force-pushed the pmi-20260220-update-AGENTS-rules branch from acfa9ec to 56b6e2d Compare February 27, 2026 08:16
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.

♻️ Duplicate comments (1)
docs/AGENTS.md (1)

69-69: ⚠️ Potential issue | 🟡 Minor

Use a recursive glob for generated infrahubctl docs.

docs/infrahubctl/*.mdx misses nested generated pages; use docs/infrahubctl/**/*.mdx instead.

Suggested fix
-- Edit `docs/infrahubctl/*.mdx` directly (regenerate with `uv run invoke docs-generate`)
+- Edit `docs/infrahubctl/**/*.mdx` directly (regenerate with `uv run invoke docs-generate`)

Based on learnings: "Applies to docs/infrahubctl/**/*.mdx : Do not edit docs/infrahubctl/*.mdx files directly; regenerate with uv run invoke generate-infrahubctl instead".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/AGENTS.md` at line 69, Update the documentation text that currently
references the glob "docs/infrahubctl/*.mdx" to use a recursive glob
"docs/infrahubctl/**/*.mdx" so nested generated pages are included, and change
the regeneration instruction from "uv run invoke docs-generate" to the correct
command "uv run invoke generate-infrahubctl"; modify the sentence that warns not
to edit generated files (the string mentioning docs/infrahubctl/*.mdx) to
instead read "Do not edit docs/infrahubctl/**/*.mdx directly; regenerate with uv
run invoke generate-infrahubctl" so both the glob and command are accurate.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/AGENTS.md`:
- Line 69: Update the documentation text that currently references the glob
"docs/infrahubctl/*.mdx" to use a recursive glob "docs/infrahubctl/**/*.mdx" so
nested generated pages are included, and change the regeneration instruction
from "uv run invoke docs-generate" to the correct command "uv run invoke
generate-infrahubctl"; modify the sentence that warns not to edit generated
files (the string mentioning docs/infrahubctl/*.mdx) to instead read "Do not
edit docs/infrahubctl/**/*.mdx directly; regenerate with uv run invoke
generate-infrahubctl" so both the glob and command are accurate.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between acfa9ec and 56b6e2d.

📒 Files selected for processing (2)
  • AGENTS.md
  • docs/AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • AGENTS.md

@polmichel polmichel merged commit bd27571 into develop Feb 27, 2026
15 checks passed
@polmichel polmichel deleted the pmi-20260220-update-AGENTS-rules branch February 27, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants