Skip to content

Conversation

@dgarros
Copy link
Contributor

@dgarros dgarros commented Nov 9, 2025

This PR adds a few AGENTS.md files across the repository to help AI Agents work on the project.
This is really a starting point and I would expect us to modify them heavily as we really start to use them

Here is the main prompt I use to generate these files in Cursor.

You are a code-analysis and documentation-generation agent.

Your mission is to analyze this repository and implement AGENTS.md files following the open standard described here:
- https://layer5.io/blog/ai/agentsmd-one-file-to-guide-them-all
- https://agents.md/#examples

Your tasks:

1. **Repository Scan**
   - Recursively scan the entire repository.
   - Identify any existing agent instruction files, such as:
     - `AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.cursor/rules/rules.mdc`
     - Any AI assistant configuration (e.g., Copilot, Claude, Cursor, etc.)
   - Output a concise report with each file’s path and a short summary of its content or intent.

2. **Relevance Analysis**
   - Analyze the repo structure to detect *logical modules or contexts* that would benefit from their own agent guidance.
     - Typical examples: `/docs`, `/tests`, `/api`, `/frontend`, `/backend`, `/cli`, `/scripts`, `/infra`, etc.
   - Do **not** create redundant AGENTS.md files everywhere.
   - Only create them where:
     - The subdirectory contains distinct code or documentation domains.
     - The conventions or expectations differ from the root-level project.
     - An agent working in isolation in that subfolder might need specific guidance.

3. **Generate / Update AGENTS.md**
   - Generate or update:
     - A **root-level `AGENTS.md`** as the main entry point (the “source of truth”).
     - Additional **context-specific `AGENTS.md`** files in selected directories identified above.
   - Each file must follow the AGENTS.md standard, and include (as applicable):
     - **Purpose & Context** (what this directory/project area is for)
     - **Tech Stack / Dependencies**
     - **Code Conventions & Standards**
     - **Build / Test / Linting Instructions**
     - **Relevant Tools or Libraries**
     - **How AI agents should contribute or avoid errors**
     - **Interplay with parent modules** (link to main AGENTS.md)
     - **Common pitfalls or edge cases**
   - Cross-reference related AGENTS.md files using relative Markdown links.

4. **Integration & Deduplication**
   - If older instruction/config files exist for specific agents (Claude, Copilot, etc.):
     - Consolidate their content into the new AGENTS.md structure.
     - Leave a short redirect or comment in old files pointing to the unified AGENTS.md.
     - Avoid duplicating information.

5. **Output**
   - Print:
     - A summary table listing each generated or updated AGENTS.md file (with relative paths).
     - The content of each new file in full.
     - A brief justification for why that directory was chosen (based on structure, code type, or unique conventions).

6. **Quality & Formatting**
   - Use clean, readable Markdown.
   - Keep each section concise and informative.
   - Use consistent heading levels (`##`, `###`) across all generated files.
   - Ensure cross-references between AGENTS.md files work properly.

Goal: create a cohesive AGENTS.md ecosystem that helps AI coding assistants (Cursor, Claude, Copilot, etc.) understand and operate safely and productively within this repository.

Begin by scanning and analyzing the repository structure.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive developer guidelines for AI coding assistants across multiple SDK components, including CLI development, testing practices, and documentation standards.
    • Centralized guidance reference for project conventions and best practices.
  • Chores

    • Updated spell-check exceptions to include project-specific terminology.

✏️ Tip: You can customize this high-level summary in your review settings.

@dgarros dgarros marked this pull request as ready for review November 9, 2025 17:10
@coderabbitai
Copy link

coderabbitai bot commented Nov 9, 2025

Walkthrough

This pull request introduces AGENTS.md files across the repository structure to provide guidance for AI coding assistants working with the Infrahub Python SDK. A root-level AGENTS.md is added alongside subdirectory-specific versions (docs/, infrahub_sdk/ctl/, infrahub_sdk/pytest_plugin/, and tests/). Each file documents patterns, conventions, project structure, and boundaries for its respective domain. The existing CLAUDE.md file is replaced with a reference to the root AGENTS.md. Additionally, four spell-check exceptions are added to the Vale configuration for the words callouts, Diataxis, frontmatter, and Typer.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add AGENTS files' accurately summarizes the main change—adding multiple AGENTS.md documentation files across the repository for AI agent guidance.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dga-20251109-agents

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3a7c7c and acfeac0.

📒 Files selected for processing (7)
  • .vale/styles/spelling-exceptions.txt (3 hunks)
  • AGENTS.md (1 hunks)
  • CLAUDE.md (1 hunks)
  • docs/AGENTS.md (1 hunks)
  • infrahub_sdk/ctl/AGENTS.md (1 hunks)
  • infrahub_sdk/pytest_plugin/AGENTS.md (1 hunks)
  • tests/AGENTS.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • infrahub_sdk/pytest_plugin/AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • CLAUDE.md
  • tests/AGENTS.md
  • AGENTS.md
  • .vale/styles/spelling-exceptions.txt
  • infrahub_sdk/ctl/AGENTS.md
🧰 Additional context used
📓 Path-based instructions (3)
**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.md: Use markdownlint for documentation consistency
Use Vale for documentation style checking
Follow markdown style as defined in .markdownlint.yaml configuration

Files:

  • docs/AGENTS.md
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (CLAUDE.md)

docs/**/*.{md,mdx}: Follow Diataxis framework for documentation structure: Tutorials (learning-oriented), How-to guides (task-oriented), Explanation (understanding-oriented), and Reference (information-oriented)
Use professional but approachable tone with plain language and technical precision in documentation
Use concise and direct documentation with short, active sentences and minimal fluff
Maintain informative documentation focused on explaining how and why rather than marketing
Follow consistent documentation structure patterns across documents
Define new terms when first introduced in documentation
Use domain-relevant terminology from the user perspective (playbooks, branches, schemas, commits) in documentation
Maintain consistency with Infrahub's data model and UI naming conventions in documentation
Use proper language tags for all code blocks in documentation
Include both async and sync code examples using Tabs component where applicable
Provide realistic code examples that reflect real-world complexity in documentation
Use callouts for warnings, tips, and important notes in documentation

Files:

  • docs/AGENTS.md
docs/**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

Follow Vale style guidelines as defined in .vale/styles/ for documentation

Files:

  • docs/AGENTS.md
🧠 Learnings (18)
📓 Common learnings
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain consistency with Infrahub's data model and UI naming conventions in documentation
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain consistency with Infrahub's data model and UI naming conventions in documentation

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain informative documentation focused on explaining how and why rather than marketing

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Follow consistent documentation structure patterns across documents

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Include both async and sync code examples using Tabs component where applicable

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/client.py : Use `InfrahubClient` (async) and `InfrahubClientSync` (sync) with identical interfaces following the Dual Client Pattern

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use proper language tags for all code blocks in documentation

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/*.md : Use markdownlint for documentation consistency

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use callouts for warnings, tips, and important notes in documentation

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use concise and direct documentation with short, active sentences and minimal fluff

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use professional but approachable tone with plain language and technical precision in documentation

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*how-to*.{md,mdx} : Add validation steps to confirm success in code examples and how-to guides

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/*.md : Follow markdown style as defined in `.markdownlint.yaml` configuration

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Use Docusaurus-based documentation system with auto-generation for CLI docs and config reference

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Follow Diataxis framework for documentation structure: Tutorials (learning-oriented), How-to guides (task-oriented), Explanation (understanding-oriented), and Reference (information-oriented)

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*how-to*.{md,mdx} : Use conditional imperatives in guides: 'If you want X, do Y' and address users directly with commands like 'Configure...', 'Create...', 'Deploy...'

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use domain-relevant terminology from the user perspective (playbooks, branches, schemas, commits) in documentation

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.md : Follow Vale style guidelines as defined in `.vale/styles/` for documentation

Applied to files:

  • docs/AGENTS.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
docs/AGENTS.md (3)

11-12: Clarify package manager guidance for target branch environment.

Lines 11–12 reference uv run invoke docs and uv run invoke docs-validate, but the PR description documents that the target branch (develop) still uses Poetry as its primary package manager. The PR author acknowledged this mismatch. Verify whether:

  • The project has adopted uv as a standard tool, or
  • These commands should use poetry run invoke instead.

Confirm the package manager used in the target branch and update the commands accordingly.


36-48: Verify scope: pattern template vs. concrete usage examples.

The MDX Pattern section (lines 36–48) provides a structural template with ... placeholders. This is distinct from a complete, fully-typed usage example. Prior feedback requested "fully typed examples." Clarify whether this file intends to show:

  • Pattern templates only (current approach), or
  • Concrete, fully-typed examples for AI agents to emulate.

If concrete examples are needed, they should include imports (e.g., from infrahub_sdk import InfrahubClient) and type annotations per the dual-client pattern learnings.


50-60: Approve general structure and markdown compliance.

The file demonstrates proper markdown conventions: code blocks have language specifications (bash, text, mdx), callouts follow the correct pattern (:::warning), and directory structure is clearly presented. The document serves its purpose as a concise AI-agent guidance reference for the documentation context.


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.

@github-actions github-actions bot added the type/documentation Improvements or additions to documentation label Nov 9, 2025
@dgarros dgarros requested review from a team and petercrocker November 9, 2025 17:10
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 9, 2025

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: acfeac0
Status: ✅  Deploy successful!
Preview URL: https://8baac39a.infrahub-sdk-python.pages.dev
Branch Preview URL: https://dga-20251109-agents.infrahub-sdk-python.pages.dev

View logs

dgarros added a commit that referenced this pull request Nov 9, 2025
… frontmatter

Fix Vale linting errors in docs/AGENTS.md by adding valid terms to spelling exceptions:
- Diataxis: Documentation framework name
- Typer: Python CLI library name
- callouts: Documentation component term
- frontmatter: MDX frontmatter term

This resolves the CI failures in PR #609.
@ogenstad
Copy link
Contributor

LGTM, the main thing I'd update for now is to ensure that all of the code examples are fully typed as that's what we'd expect in any generated code.

@dgarros dgarros force-pushed the dga-20251104-poetry-uv branch 2 times, most recently from e6779d7 to 838fcf6 Compare November 11, 2025 08:33
Base automatically changed from dga-20251104-poetry-uv to develop November 12, 2025 07:23
wvandeun pushed a commit that referenced this pull request Nov 17, 2025
… frontmatter

Fix Vale linting errors in docs/AGENTS.md by adding valid terms to spelling exceptions:
- Diataxis: Documentation framework name
- Typer: Python CLI library name
- callouts: Documentation component term
- frontmatter: MDX frontmatter term

This resolves the CI failures in PR #609.
dgarros added a commit that referenced this pull request Nov 29, 2025
… frontmatter

Fix Vale linting errors in docs/AGENTS.md by adding valid terms to spelling exceptions:
- Diataxis: Documentation framework name
- Typer: Python CLI library name
- callouts: Documentation component term
- frontmatter: MDX frontmatter term

This resolves the CI failures in PR #609.
@dgarros dgarros force-pushed the dga-20251109-agents branch from b07995c to f865861 Compare November 29, 2025 14:49
@dgarros dgarros changed the base branch from develop to stable November 29, 2025 14:49
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: 20

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
CLAUDE.md (2)

92-97: Add full type hints to check validation example.

Based on the PR comment feedback requesting fully typed code examples throughout AGENTS documentation.

Apply this diff:

 ```python
+from typing import Any
+from infrahub_sdk import InfrahubCheck
+
 # CRITICAL: Use validate() method, NOT check()
 class MyCheck(InfrahubCheck):
-    def validate(self, data):  # Must be validate(), not check()
+    def validate(self, data: Any) -> None:  # Must be validate(), not check()
         # validation logic
         pass

---

`104-113`: **Add full type hints to async/sync pattern example.**



Apply this diff:

```diff
 ```python
+from infrahub_sdk import InfrahubClient, InfrahubClientSync, InfrahubNode
+
 # Async version (default)
-client = InfrahubClient()
-node = await client.get(kind="NetworkDevice")
+client: InfrahubClient = InfrahubClient()
+node: InfrahubNode = await client.get(kind="NetworkDevice")
 await node.save()

 # Sync version
-client = InfrahubClientSync()
-node = client.get(kind="NetworkDevice")
+client: InfrahubClientSync = InfrahubClientSync()
+node: InfrahubNode = client.get(kind="NetworkDevice")
 node.save()

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/guides/client.mdx (1)</summary><blockquote>

`39-44`: Based on my verification, I have identified a critical issue with the review comment's framing. Let me generate the rewritten version:

---

**Add type annotations to code examples for improved clarity.**

Type hints improve code readability and help developers understand expected types. The code examples in this guide currently lack type annotations for variables, function parameters, and return types.

All documented code examples should include explicit type annotations:

**For simple client instantiations (lines 39–44, 51–56, etc.), annotate the client variable:**

```diff
  from infrahub_sdk import InfrahubClient
  
- client = InfrahubClient()
+ client: InfrahubClient = InfrahubClient()

For the async hello_world function (lines 271–289), add full type annotations:

  import asyncio
+ from typing import List
  
  from infrahub_sdk import Config, InfrahubClient
  
  
- async def hello_world():
+ async def hello_world() -> None:
-     client = InfrahubClient(config=Config(address="http://localhost:8000"))
+     client: InfrahubClient = InfrahubClient(config=Config(address="http://localhost:8000"))
  
      # Try to query accounts to validate connection
      try:
-         accounts = await client.all(kind="CoreAccount")
+         accounts: List = await client.all(kind="CoreAccount")
          print(f"Successfully connected to Infrahub! Found {len(accounts)} account(s)")
      except Exception as e:
          print(f"Something went wrong: {e}")

For the sync hello_world function (lines 294–310), follow the same pattern:

  from infrahub_sdk import Config, InfrahubClientSync
  
  
  # Test connection and authentication
- def hello_world():
+ def hello_world() -> None:
-     client = InfrahubClientSync(config=Config(address="http://localhost:8000"))
+     client: InfrahubClientSync = InfrahubClientSync(config=Config(address="http://localhost:8000"))
  
      # Try to query accounts to validate connection
      try:
-         accounts = client.all(kind="CoreAccount")
+         accounts: List = client.all(kind="CoreAccount")
          print(f"Successfully connected to Infrahub! Found {len(accounts)} account(s)")
      except Exception as e:
          print(f"Something went wrong: {e}")

Apply similar type annotations to Config examples and proxy configuration examples for consistency across all code blocks listed above.

♻️ Duplicate comments (2)
AGENTS.md (2)

22-24: Consider referencing pyproject.toml for tool versions.

Similar to the approach used for Python versions on Line 19, consider referencing pyproject.toml for mypy and Ruff versions rather than hardcoding them. This will reduce maintenance overhead and prevent the documentation from becoming outdated.


162-173: Add full type hints to check validation example.

Apply this diff:

 ```python
+from typing import Any
+from infrahub_sdk import InfrahubCheck
+
 # CORRECT
 class MyCheck(InfrahubCheck):
-    def validate(self, data):  # Must be validate(), not check()
+    def validate(self, data: Any) -> None:  # Must be validate(), not check()
         # validation logic
         pass

 # WRONG
 class MyCheck(InfrahubCheck):
-    def check(self, data):  # This will NOT work
+    def check(self, data: Any) -> None:  # This will NOT work
         pass

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: CodeRabbit UI

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 983da6143734b21c06ec8c3801b29edc7397822d and f865861ca042ee3374fe921788ab663e76a047ff.

</details>

<details>
<summary>⛔ Files ignored due to path filters (2)</summary>

* `poetry.lock` is excluded by `!**/*.lock`
* `uv.lock` is excluded by `!**/*.lock`

</details>

<details>
<summary>📒 Files selected for processing (17)</summary>

* `.github/workflows/ci.yml` (6 hunks)
* `.github/workflows/define-versions.yml` (1 hunks)
* `.github/workflows/publish-pypi.yml` (1 hunks)
* `.github/workflows/release.yml` (2 hunks)
* `.gitignore` (1 hunks)
* `.vale/styles/spelling-exceptions.txt` (3 hunks)
* `AGENTS.md` (1 hunks)
* `CLAUDE.md` (4 hunks)
* `README.md` (1 hunks)
* `docs/AGENTS.md` (1 hunks)
* `docs/docs/python-sdk/guides/client.mdx` (1 hunks)
* `infrahub_sdk/ctl/AGENTS.md` (1 hunks)
* `infrahub_sdk/ctl/cli.py` (1 hunks)
* `infrahub_sdk/pytest_plugin/AGENTS.md` (1 hunks)
* `pyproject.toml` (3 hunks)
* `tasks.py` (1 hunks)
* `tests/AGENTS.md` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>📓 Path-based instructions (5)</summary>

<details>
<summary>**/*.md</summary>


**📄 CodeRabbit inference engine (CLAUDE.md)**

> `**/*.md`: Use markdownlint for documentation consistency
> Use Vale for documentation style checking
> Follow markdown style as defined in `.markdownlint.yaml` configuration

Files:
- `CLAUDE.md`
- `tests/AGENTS.md`
- `README.md`
- `docs/AGENTS.md`
- `AGENTS.md`
- `infrahub_sdk/pytest_plugin/AGENTS.md`
- `infrahub_sdk/ctl/AGENTS.md`

</details>
<details>
<summary>docs/**/*.{md,mdx}</summary>


**📄 CodeRabbit inference engine (CLAUDE.md)**

> `docs/**/*.{md,mdx}`: Follow Diataxis framework for documentation structure: Tutorials (learning-oriented), How-to guides (task-oriented), Explanation (understanding-oriented), and Reference (information-oriented)
> Use professional but approachable tone with plain language and technical precision in documentation
> Use concise and direct documentation with short, active sentences and minimal fluff
> Maintain informative documentation focused on explaining how and why rather than marketing
> Follow consistent documentation structure patterns across documents
> Define new terms when first introduced in documentation
> Use domain-relevant terminology from the user perspective (playbooks, branches, schemas, commits) in documentation
> Maintain consistency with Infrahub's data model and UI naming conventions in documentation
> Use proper language tags for all code blocks in documentation
> Include both async and sync code examples using Tabs component where applicable
> Provide realistic code examples that reflect real-world complexity in documentation
> Use callouts for warnings, tips, and important notes in documentation

Files:
- `docs/docs/python-sdk/guides/client.mdx`
- `docs/AGENTS.md`

</details>
<details>
<summary>**/*.py</summary>


**📄 CodeRabbit inference engine (CLAUDE.md)**

> `**/*.py`: All async operations must have corresponding sync implementations following the dual implementation pattern
> Use mypy with strict configuration for type checking in Python files

Files:
- `infrahub_sdk/ctl/cli.py`
- `tasks.py`

</details>
<details>
<summary>**/ctl/**/*.py</summary>


**📄 CodeRabbit inference engine (CLAUDE.md)**

> Use Typer framework for building CLI commands in the infrahubctl CLI

Files:
- `infrahub_sdk/ctl/cli.py`

</details>
<details>
<summary>docs/**/*.md</summary>


**📄 CodeRabbit inference engine (CLAUDE.md)**

> Follow Vale style guidelines as defined in `.vale/styles/` for documentation

Files:
- `docs/AGENTS.md`

</details>

</details><details>
<summary>🧠 Learnings (22)</summary>

<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Run unit tests with poetry run pytest --cov infrahub_sdk tests/unit/ to ensure code coverage


**Applied to files:**
- `CLAUDE.md`
- `tests/AGENTS.md`
- `.github/workflows/ci.yml`
- `pyproject.toml`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Run linting with poetry run invoke lint (ruff + mypy + yamllint + markdownlint) to ensure code quality


**Applied to files:**
- `CLAUDE.md`
- `.github/workflows/ci.yml`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Run integration tests with poetry run pytest tests/integration/


**Applied to files:**
- `CLAUDE.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Generate documentation with poetry run invoke docs


**Applied to files:**
- `CLAUDE.md`
- `.github/workflows/ci.yml`
- `tasks.py`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Validate documentation with poetry run invoke docs-validate


**Applied to files:**
- `CLAUDE.md`
- `.github/workflows/ci.yml`
- `tasks.py`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Use poetry install --with dev --all-extras to install dependencies in development environment


**Applied to files:**
- `CLAUDE.md`
- `README.md`
- `.github/workflows/release.yml`
- `pyproject.toml`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to tests/integration/**/*.py : Place integration tests in tests/integration/ directory for testing against real Infrahub instances


**Applied to files:**
- `CLAUDE.md`
- `tests/AGENTS.md`
- `infrahub_sdk/pytest_plugin/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Run poetry run invoke format to format code before committing


**Applied to files:**
- `CLAUDE.md`
- `.github/workflows/ci.yml`
- `tasks.py`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Use Docusaurus-based documentation system with auto-generation for CLI docs and config reference


**Applied to files:**
- `CLAUDE.md`
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain consistency with Infrahub's data model and UI naming conventions in documentation


**Applied to files:**
- `docs/docs/python-sdk/guides/client.mdx`
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/client.py : Use InfrahubClient (async) and InfrahubClientSync (sync) with identical interfaces following the Dual Client Pattern


**Applied to files:**
- `docs/docs/python-sdk/guides/client.mdx`
- `AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/config.py : Use environment variables prefixed with INFRAHUB_ for configuration


**Applied to files:**
- `docs/docs/python-sdk/guides/client.mdx`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain informative documentation focused on explaining how and why rather than marketing


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Follow Diataxis framework for documentation structure: Tutorials (learning-oriented), How-to guides (task-oriented), Explanation (understanding-oriented), and Reference (information-oriented)


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Follow consistent documentation structure patterns across documents


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/how-to.{md,mdx} : For How-to guides, include Prerequisites, Step-by-step Instructions, Validation, and Related Resources sections


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use domain-relevant terminology from the user perspective (playbooks, branches, schemas, commits) in documentation


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use professional but approachable tone with plain language and technical precision in documentation


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/understanding-*.{md,mdx} : For Topic/Explanation pages, include Concepts & Definitions, Background & Context, Architecture & Design, Connections, and Further Reading sections


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use concise and direct documentation with short, active sentences and minimal fluff


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Maintain code coverage through codecov integration in testing


**Applied to files:**
- `.github/workflows/ci.yml`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to /ctl//*.py : Use Typer framework for building CLI commands in the infrahubctl CLI


**Applied to files:**
- `tasks.py`
- `infrahub_sdk/ctl/AGENTS.md`

</details>

</details><details>
<summary>🧬 Code graph analysis (1)</summary>

<details>
<summary>tasks.py (1)</summary><blockquote>

<details>
<summary>infrahub_sdk/ctl/cli_commands.py (1)</summary>

* `run` (130-180)

</details>

</blockquote></details>

</details><details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>AGENTS.md</summary>

[uncategorized] ~106-~106: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...Nodes load attributes and relationships on demand - **Batch Operations**: Support for bul...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)</summary>

* GitHub Check: Cloudflare Pages

</details>

<details>
<summary>🔇 Additional comments (26)</summary><blockquote>

<details>
<summary>.vale/styles/spelling-exceptions.txt (1)</summary><blockquote>

`23-23`: **LGTM!**

All four spell-check exceptions are properly placed in alphabetical order and represent legitimate project-related terms (Diataxis, Typer, callouts, frontmatter) that should not be flagged as spelling errors during documentation linting.




Also applies to: 27-27, 47-47, 120-120

</blockquote></details>
<details>
<summary>.gitignore (1)</summary><blockquote>

`11-12`: **LGTM! Standard virtual environment patterns added.**

The `.venv/` and `.venv` patterns are appropriate for ignoring UV-created virtual environments. Note: `.venv` alone would match both files and directories, making `.venv/` slightly redundant, but having both is harmless and follows common practice. The placement after `.python-version` maintains logical grouping of Python environment markers.

</blockquote></details>
<details>
<summary>.github/workflows/define-versions.yml (1)</summary><blockquote>

`7-8`: **LGTM!**

The version update correctly reflects the migration from Poetry to UV tooling.

</blockquote></details>
<details>
<summary>infrahub_sdk/ctl/cli.py (1)</summary><blockquote>

`6-9`: **LGTM!**

The error message correctly guides users to install the ctl extra using UV's modern workflow.

</blockquote></details>
<details>
<summary>README.md (1)</summary><blockquote>

`60-73`: **LGTM!**

The UV development setup section provides clear guidance for developers using UV for dependency management.

</blockquote></details>
<details>
<summary>tasks.py (1)</summary><blockquote>

`42-55`: **LGTM!**

The documentation generation commands correctly use UV-based Typer execution, maintaining the same functionality while aligning with the new tooling.

</blockquote></details>
<details>
<summary>CLAUDE.md (2)</summary><blockquote>

`3-5`: **LGTM!**

The superseding notice clearly directs users to the new AGENTS.md standard while maintaining backward compatibility.

---

`15-40`: **LGTM!**

The essential commands section correctly reflects the UV-based workflow with clear, actionable examples.

</blockquote></details>
<details>
<summary>tests/AGENTS.md (5)</summary><blockquote>

`236-252`: **Add full type hints to test class example.**



Apply this diff:

```diff
 ```python
 # tests/unit/sdk/test_client.py

 import pytest
 from infrahub_sdk import InfrahubClient

 class TestInfrahubClient:
     """Test suite for InfrahubClient."""

-    async def test_get_node(self):
+    async def test_get_node(self) -> None:
         """Test getting a node."""
         # Test implementation
         pass

-    async def test_create_node(self):
+    async def test_create_node(self) -> None:
         """Test creating a node."""
         # Test implementation
         pass


<details>
<summary>⛔ Skipped due to learnings</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Run unit tests with poetry run pytest --cov infrahub_sdk tests/unit/ to ensure code coverage


Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to tests/integration/**/*.py : Place integration tests in tests/integration/ directory for testing against real Infrahub instances


Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/client.py : Use InfrahubClient (async) and InfrahubClientSync (sync) with identical interfaces following the Dual Client Pattern


</details>

---

`165-169`: **Add full type hints to sync test example.**

Based on the PR comment feedback, all code examples should include complete type annotations.



Apply this diff:

```diff
 ```python
-def test_sync_function():
-    client = InfrahubClientSync()
-    result = client.get(kind="NetworkDevice")
+from infrahub_sdk import InfrahubClientSync
+
+def test_sync_function() -> None:
+    client: InfrahubClientSync = InfrahubClientSync()
+    result = client.get(kind="NetworkDevice")
     assert result is not None


<details>
<summary>⛔ Skipped due to learnings</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/client.py : Use InfrahubClient (async) and InfrahubClientSync (sync) with identical interfaces following the Dual Client Pattern


</details>

---

`154-160`: **Add full type hints to async test example.**

Based on the PR comment feedback, all code examples in AGENTS files should be fully typed with parameter and return type annotations.



Apply this diff:

```diff
 ```python
 import pytest
+from infrahub_sdk import InfrahubClient

-async def test_async_function():
-    client = InfrahubClient()
-    result = await client.get(kind="NetworkDevice")
+async def test_async_function() -> None:
+    client: InfrahubClient = InfrahubClient()
+    result = await client.get(kind="NetworkDevice")
     assert result is not None


<details>
<summary>⛔ Skipped due to learnings</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/client.py : Use InfrahubClient (async) and InfrahubClientSync (sync) with identical interfaces following the Dual Client Pattern


</details>

---

`283-291`: **Add full type hints to integration test example.**



Apply this diff:

```diff
 ```python
 import pytest
+from infrahub_sdk import InfrahubClient
 from infrahub_testcontainers import InfrahubContainer

-async def test_integration():
-    with InfrahubContainer() as container:
-        client = InfrahubClient(
+async def test_integration() -> None:
+    container: InfrahubContainer
+    with InfrahubContainer() as container:
+        client: InfrahubClient = InfrahubClient(
             address=container.get_url(),
             api_token=container.get_api_token(),
         )
         # Test against real instance
         result = await client.get(kind="NetworkDevice")


<details>
<summary>⛔ Skipped due to learnings</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to tests/integration/**/*.py : Place integration tests in tests/integration/ directory for testing against real Infrahub instances


Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/client.py : Use InfrahubClient (async) and InfrahubClientSync (sync) with identical interfaces following the Dual Client Pattern


</details>

---

`302-310`: **Add full type hints to CLI test example.**



Apply this diff:

```diff
 ```python
 from typer.testing import CliRunner
 from infrahub_sdk.ctl.cli_commands import app

-def test_cli_command():
-    runner = CliRunner()
+def test_cli_command() -> None:
+    runner: CliRunner = CliRunner()
     result = runner.invoke(app, ["command", "--option", "value"])
     assert result.exit_code == 0
     assert "expected output" in result.stdout


<details>
<summary>⛔ Skipped due to learnings</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to /ctl//*.py : Use Typer framework for building CLI commands in the infrahubctl CLI


</details>

</blockquote></details>
<details>
<summary>infrahub_sdk/ctl/AGENTS.md (3)</summary><blockquote>

`253-263`: **Add full type hints to command with variables example.**



Apply this diff:

```diff
 ```python
+from typing import Optional
+import typer
 from ..ctl.utils import parse_cli_vars

 @app.command()
 async def my_command(
     variables: Optional[list[str]] = typer.Argument(
         None, help="Variables in key=value format"
     ),
-):
-    variables_dict = parse_cli_vars(variables)
+) -> None:
+    variables_dict: dict[str, str] = parse_cli_vars(variables)
     # Use variables_dict


<details>
<summary>⛔ Skipped due to learnings</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to /ctl//*.py : Use Typer framework for building CLI commands in the infrahubctl CLI


</details>

---

`192-201`: **Add full type hints to CLI test example.**



Apply this diff:

```diff
 ```python
 from typer.testing import CliRunner
+from click.testing import Result
 from infrahub_sdk.ctl.cli_commands import app

-runner = CliRunner()
+runner: CliRunner = CliRunner()

-def test_my_command():
-    result = runner.invoke(app, ["my-command", "--option", "value"])
+def test_my_command() -> None:
+    result: Result = runner.invoke(app, ["my-command", "--option", "value"])
     assert result.exit_code == 0
     assert "expected output" in result.stdout


<details>
<summary>⛔ Skipped due to learnings</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to /ctl//*.py : Use Typer framework for building CLI commands in the infrahubctl CLI


</details>

---

`225-235`: **Add full type hints to command with options example.**



Apply this diff:

```diff
 ```python
+from typing import Optional
+import typer
+
 @app.command()
 @catch_exception(console=console)
 async def my_command(
     path: str = typer.Option(".", help="Path to file"),
     debug: bool = False,
     branch: Optional[str] = None,
     _: str = CONFIG_PARAM,
-):
+) -> None:
     # Implementation
     pass


<details>
<summary>⛔ Skipped due to learnings</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to /ctl//*.py : Use Typer framework for building CLI commands in the infrahubctl CLI


</details>

</blockquote></details>
<details>
<summary>.github/workflows/ci.yml (2)</summary><blockquote>

`132-132`: **Workflow dependency and UV setup looks correct.**

The documentation job properly depends on `prepare-environment` and uses the correct UV installation and dependency sync commands.





Also applies to: 148-159

---

`240-265`: **`codecov` is correctly available through the `dev` dependency group, which is installed via `--all-groups`.**

The workflow correctly uses `uv sync --all-groups --all-extras`, which installs all dependency groups including the `dev` group where `codecov` is listed (line 101 of `pyproject.toml`). The configuration is proper.

</blockquote></details>
<details>
<summary>.github/workflows/release.yml (1)</summary><blockquote>

`33-39`: **UV setup and dependency installation look correct.**

</blockquote></details>
<details>
<summary>pyproject.toml (3)</summary><blockquote>

`41-42`: **Pytest plugin entry point properly configured.**

The pytest11 entry point is correctly set up for the custom pytest plugin.

---

`72-104`: **Dependency groups structure is correct.**

The migration to UV's dependency-groups format is properly structured with test, lint, types, and dev groups. The dev group correctly includes other groups via `{include-group = ...}`.

---

`345-350`: **Build system correctly migrated to Hatchling.**

</blockquote></details>
<details>
<summary>.github/workflows/publish-pypi.yml (1)</summary><blockquote>

`44-76`: **✓ Workflow migration to UV is correctly implemented.**

Both verification conditions are confirmed:
- `uv.lock` exists in the repository root (cache key is valid)
- `UV_VERSION` is properly output from `define-versions.yml` as `0.9.8`

The Poetry-to-UV migration is properly structured with correct cache configuration, command conversions, and all necessary upstream outputs in place.

</blockquote></details>
<details>
<summary>docs/AGENTS.md (2)</summary><blockquote>

`113-126`: **Base class example lacks type hints for method parameters and return types.**

The `InfrahubItem` base class example is missing parameter and return type annotations, which contradicts the fully-typed code expectation. Update to include complete type hints.


Apply this diff to add complete type hints:

```diff
 class InfrahubItem(pytest.Item):
-    def __init__(self, name, parent, resource_name, resource_config, test):
+    def __init__(self, name: str, parent: pytest.Collector, resource_name: str, resource_config: dict | None, test: Any) -> None:
         # Initialization
         pass

-    def validate_resource_config(self):
+    def validate_resource_config(self) -> None:
         # Validate that resource exists in repository config
         pass

-    def runtest(self):
+    def runtest(self) -> None:
         # Execute the test
         pass
⛔ Skipped due to learnings
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Validate documentation with `poetry run invoke docs-validate`
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Generate documentation with `poetry run invoke docs`
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*how-to*.{md,mdx} : Add validation steps to confirm success in code examples and how-to guides
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Run `poetry run invoke format` to format code before committing
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain informative documentation focused on explaining how and why rather than marketing

187-194: New test item class example lacks type annotations.

The "Creating a New Test Item Type" example is missing type hints. Add parameter and return type annotations.

Apply this diff to add complete type hints:

 from .base import InfrahubItem

 class MyCustomItem(InfrahubItem):
-    def runtest(self):
+    def runtest(self) -> None:
         # Test implementation
         pass

Likely an incorrect or invalid review comment.

docs/docs/python-sdk/guides/client.mdx (1)

20-20: Installation instruction updated for UV.

The change to include uv add infrahub-sdk alongside pip install infrahub-sdk aligns with the repository's migration to UV-based tooling and provides users with both options.

tests/AGENTS.md Outdated
Comment on lines 177 to 184
def test_with_mocked_http(httpx_mock: HTTPXMock):
httpx_mock.add_response(
method="POST",
url="http://localhost:8000/api/graphql",
json={"data": {"result": "success"}},
)
# Test code that makes HTTP request
```
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Add full type hints to HTTP mocking example.

Apply this diff:

 ```python
 import pytest
 from pytest_httpx import HTTPXMock

-def test_with_mocked_http(httpx_mock: HTTPXMock):
+def test_with_mocked_http(httpx_mock: HTTPXMock) -> None:
     httpx_mock.add_response(
         method="POST",
         url="http://localhost:8000/api/graphql",
         json={"data": {"result": "success"}},
     )
     # Test code that makes HTTP request

<details>
<summary>🤖 Prompt for AI Agents</summary>

In tests/AGENTS.md around lines 177 to 184, the example test function signature
lacks a return type hint; update the function definition to include the explicit
return type "-> None" (i.e., change "def test_with_mocked_http(httpx_mock:
HTTPXMock):" to "def test_with_mocked_http(httpx_mock: HTTPXMock) -> None:"),
keeping the rest of the example unchanged.


</details>

<!-- This is an auto-generated comment by CodeRabbit -->

@github-actions github-actions bot added the group/ci Issue related to the CI pipeline label Nov 29, 2025
@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

❗ There is a different number of reports uploaded between BASE (4fd8376) and HEAD (7906613). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (4fd8376) HEAD (7906613)
integration-tests 1 0
@@            Coverage Diff             @@
##           stable     #609      +/-   ##
==========================================
- Coverage   75.48%   69.95%   -5.53%     
==========================================
  Files         113      113              
  Lines        9512     9512              
  Branches     1893     1448     -445     
==========================================
- Hits         7180     6654     -526     
- Misses       1832     2369     +537     
+ Partials      500      489      -11     
Flag Coverage Δ
integration-tests ?
python-3.10 48.87% <ø> (+0.08%) ⬆️
python-3.11 48.85% <ø> (+0.06%) ⬆️
python-3.12 48.83% <ø> (+0.08%) ⬆️
python-3.13 48.83% <ø> (+0.06%) ⬆️
python-3.9 47.55% <ø> (+0.07%) ⬆️
python-filler-3.12 24.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/ctl/cli.py 66.66% <ø> (ø)

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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: 3

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

40-55: Code examples in Tabs component need full type hints and imports.

Per PR feedback requiring all code examples to be fully typed, the async and sync examples are missing import statements and type annotations.

Apply this diff to add imports and complete type hints:

 <Tabs>
 <TabItem value="async" label="Async">

 ```python
+from infrahub_sdk import InfrahubClient, InfrahubNode
+
+async def fetch_device() -> None:
-client = InfrahubClient()
-node = await client.get(kind="NetworkDevice")
+    client: InfrahubClient = InfrahubClient()
+    node: InfrahubNode = await client.get(kind="NetworkDevice")
+from infrahub_sdk import InfrahubClientSync, InfrahubNode
+
+def fetch_device() -> None:
-client = InfrahubClientSync()
-node = client.get(kind="NetworkDevice")
+    client: InfrahubClientSync = InfrahubClientSync()
+    node: InfrahubNode = client.get(kind="NetworkDevice")
```
infrahub_sdk/ctl/AGENTS.md (1)

7-27: Add full type hints and missing imports to Command Pattern example.

The code example is missing type annotations on variables, function return types, and several critical imports (typer, Optional, AsyncTyper type hint).

Apply this diff:

 ```python
 from rich.console import Console
+from typing import Optional
+import typer
 from ..async_typer import AsyncTyper
 from ..ctl.client import initialize_client
 from ..ctl.utils import catch_exception
 from .parameters import CONFIG_PARAM

-console = Console()
-app = AsyncTyper()
+console: Console = Console()
+app: AsyncTyper = AsyncTyper()

 @app.command(name="my-command")
 @catch_exception(console=console)
 async def my_command(
     path: str = typer.Option(".", help="Path to file"),
     branch: Optional[str] = None,
     _: str = CONFIG_PARAM,  # Always include, even if unused
-):
+) -> None:
-    client = initialize_client(branch=branch)
+    client: InfrahubClient = initialize_client(branch=branch)
     # implementation using Rich for output
     console.print(Panel("Result", title="Success"))

This ensures full typing for parameter and return values, per PR requirements.

</blockquote></details>
<details>
<summary>AGENTS.md (1)</summary><blockquote>

`21-28`: **Add full type hints, imports, and function wrappers to Code Pattern example.**

The code example lacks necessary imports, type annotations on variables, and proper function wrapping with return types. Per PR requirements, all code examples must be fully typed.




Apply this diff:

```diff
 ## Code Pattern

 ```python
+from infrahub_sdk import InfrahubClient, InfrahubClientSync, InfrahubNode
+
 # Async version (default)
-client = InfrahubClient()           # async
-node = await client.get(kind="NetworkDevice")
-await node.save()
+async def example_async() -> None:
+    client: InfrahubClient = InfrahubClient()
+    node: InfrahubNode = await client.get(kind="NetworkDevice")
+    await node.save()

 # Sync version
-client = InfrahubClientSync()       # sync
-node = client.get(kind="NetworkDevice")
-node.save()
+def example_sync() -> None:
+    client: InfrahubClientSync = InfrahubClientSync()
+    node: InfrahubNode = client.get(kind="NetworkDevice")
+    node.save()

This ensures complete typing and demonstrates proper async/sync patterns per the Dual Client Pattern.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: CodeRabbit UI

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between f865861ca042ee3374fe921788ab663e76a047ff and 80706da28697b3abde63670ae62955ca1eb442d0.

</details>

<details>
<summary>📒 Files selected for processing (6)</summary>

* `AGENTS.md` (1 hunks)
* `CLAUDE.md` (1 hunks)
* `docs/AGENTS.md` (1 hunks)
* `infrahub_sdk/ctl/AGENTS.md` (1 hunks)
* `infrahub_sdk/pytest_plugin/AGENTS.md` (1 hunks)
* `tests/AGENTS.md` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (3)</summary>

* CLAUDE.md
* tests/AGENTS.md
* infrahub_sdk/pytest_plugin/AGENTS.md

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>📓 Path-based instructions (3)</summary>

<details>
<summary>**/*.md</summary>


**📄 CodeRabbit inference engine (CLAUDE.md)**

> `**/*.md`: Use markdownlint for documentation consistency
> Use Vale for documentation style checking
> Follow markdown style as defined in `.markdownlint.yaml` configuration

Files:
- `docs/AGENTS.md`
- `AGENTS.md`
- `infrahub_sdk/ctl/AGENTS.md`

</details>
<details>
<summary>docs/**/*.{md,mdx}</summary>


**📄 CodeRabbit inference engine (CLAUDE.md)**

> `docs/**/*.{md,mdx}`: Follow Diataxis framework for documentation structure: Tutorials (learning-oriented), How-to guides (task-oriented), Explanation (understanding-oriented), and Reference (information-oriented)
> Use professional but approachable tone with plain language and technical precision in documentation
> Use concise and direct documentation with short, active sentences and minimal fluff
> Maintain informative documentation focused on explaining how and why rather than marketing
> Follow consistent documentation structure patterns across documents
> Define new terms when first introduced in documentation
> Use domain-relevant terminology from the user perspective (playbooks, branches, schemas, commits) in documentation
> Maintain consistency with Infrahub's data model and UI naming conventions in documentation
> Use proper language tags for all code blocks in documentation
> Include both async and sync code examples using Tabs component where applicable
> Provide realistic code examples that reflect real-world complexity in documentation
> Use callouts for warnings, tips, and important notes in documentation

Files:
- `docs/AGENTS.md`

</details>
<details>
<summary>docs/**/*.md</summary>


**📄 CodeRabbit inference engine (CLAUDE.md)**

> Follow Vale style guidelines as defined in `.vale/styles/` for documentation

Files:
- `docs/AGENTS.md`

</details>

</details><details>
<summary>🧠 Learnings (12)</summary>

<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain consistency with Infrahub's data model and UI naming conventions in documentation


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain informative documentation focused on explaining how and why rather than marketing


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Follow consistent documentation structure patterns across documents


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Follow Diataxis framework for documentation structure: Tutorials (learning-oriented), How-to guides (task-oriented), Explanation (understanding-oriented), and Reference (information-oriented)


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Use Docusaurus-based documentation system with auto-generation for CLI docs and config reference


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use concise and direct documentation with short, active sentences and minimal fluff


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Include both async and sync code examples using Tabs component where applicable


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/client.py : Use InfrahubClient (async) and InfrahubClientSync (sync) with identical interfaces following the Dual Client Pattern


**Applied to files:**
- `docs/AGENTS.md`
- `AGENTS.md`
- `infrahub_sdk/ctl/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/how-to.{md,mdx} : Use conditional imperatives in guides: 'If you want X, do Y' and address users directly with commands like 'Configure...', 'Create...', 'Deploy...'


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use domain-relevant terminology from the user perspective (playbooks, branches, schemas, commits) in documentation


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use professional but approachable tone with plain language and technical precision in documentation


**Applied to files:**
- `docs/AGENTS.md`

</details>
<details>
<summary>📚 Learning: 2025-11-25T07:18:58.155Z</summary>

Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to /ctl//*.py : Use Typer framework for building CLI commands in the infrahubctl CLI


**Applied to files:**
- `infrahub_sdk/ctl/AGENTS.md`

</details>

</details><details>
<summary>🪛 GitHub Check: markdown-lint</summary>

<details>
<summary>docs/AGENTS.md</summary>

[failure] 60-60: Fenced code blocks should have a language specified
docs/AGENTS.md:60 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md

---

[failure] 60-60: Fenced code blocks should be surrounded by blank lines
docs/AGENTS.md:60 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md

---

[failure] 17-17: Fenced code blocks should have a language specified
docs/AGENTS.md:17 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md

</details>
<details>
<summary>AGENTS.md</summary>

[failure] 57-57: Lists should be surrounded by blank lines
infrahub_sdk/ctl/AGENTS.md:57 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Use `@catch_exception(consol..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md

---

[failure] 31-31: Fenced code blocks should have a language specified
infrahub_sdk/ctl/AGENTS.md:31 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md

---

[failure] 60-60: Fenced code blocks should have a language specified
docs/AGENTS.md:60 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md

---

[failure] 60-60: Fenced code blocks should be surrounded by blank lines
docs/AGENTS.md:60 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md

---

[failure] 17-17: Fenced code blocks should have a language specified
docs/AGENTS.md:17 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md

---

[failure] 53-53: Lists should be surrounded by blank lines
AGENTS.md:53 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Mix async/sync inappropriate..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md

---

[failure] 49-49: Lists should be surrounded by blank lines
AGENTS.md:49 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Adding new dependencies"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md

---

[failure] 44-44: Lists should be surrounded by blank lines
AGENTS.md:44 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Run `uv run invoke format li..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md

---

[failure] 32-32: Fenced code blocks should have a language specified
AGENTS.md:32 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md

</details>
<details>
<summary>infrahub_sdk/ctl/AGENTS.md</summary>

[failure] 63-63: Lists should be surrounded by blank lines
infrahub_sdk/ctl/AGENTS.md:63 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Use plain `print()` statemen..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md

---

[failure] 57-57: Lists should be surrounded by blank lines
infrahub_sdk/ctl/AGENTS.md:57 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Use `@catch_exception(consol..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md

---

[failure] 31-31: Fenced code blocks should have a language specified
infrahub_sdk/ctl/AGENTS.md:31 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)</summary>

* GitHub Check: unit-tests (3.12)
* GitHub Check: unit-tests (3.11)
* GitHub Check: unit-tests (3.13)
* GitHub Check: unit-tests (3.9)
* GitHub Check: unit-tests (3.10)
* GitHub Check: integration-tests-latest-infrahub
* GitHub Check: documentation
* GitHub Check: Cloudflare Pages

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

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: 2

♻️ Duplicate comments (2)
AGENTS.md (1)

21-28: Add full type hints and imports to code pattern example.

Per PR feedback, all code examples must be fully typed. The current example lacks imports and type annotations.

Apply this diff:

 ## Code Pattern

 ```python
+from infrahub_sdk import InfrahubClient, InfrahubClientSync
+
 # Always provide both async and sync versions
-client = InfrahubClient()           # async
-node = await client.get(kind="NetworkDevice")
+client: InfrahubClient = InfrahubClient()           # async
+node: InfrahubNode = await client.get(kind="NetworkDevice")
 await node.save()

 # Sync version
-client = InfrahubClientSync()       # sync
-node = client.get(kind="NetworkDevice")
+client: InfrahubClientSync = InfrahubClientSync()       # sync
+node: InfrahubNode = client.get(kind="NetworkDevice")
 node.save()

Note: Wrap in a function context if demonstrating as executable code, or add the necessary node type import. As per coding guidelines and PR feedback, all examples must include full type hints and imports.

</blockquote></details>
<details>
<summary>docs/AGENTS.md (1)</summary><blockquote>

`41-52`: **Add full type hints and imports to Tabs code examples.**

Per PR feedback, all code examples must be fully typed. The current Tabs examples lack imports and type annotations.


Apply this diff:

```diff
 <TabItem value="async" label="Async">

 ```python
+from infrahub_sdk import InfrahubClient, InfrahubNode
+
+async def fetch_device() -> None:
-client = InfrahubClient()
-node = await client.get(kind="NetworkDevice")
+    client: InfrahubClient = InfrahubClient()
+    node: InfrahubNode = await client.get(kind="NetworkDevice")
+from infrahub_sdk import InfrahubClientSync, InfrahubNode
+
+def fetch_device() -> None:
-client = InfrahubClientSync()
-node = client.get(kind="NetworkDevice")
+    client: InfrahubClientSync = InfrahubClientSync()
+    node: InfrahubNode = client.get(kind="NetworkDevice")
```

This ensures users see fully typed, executable examples consistent with the PR's type-hinting requirements and Infrahub's Dual Client Pattern. Based on learnings, documentation code examples should include both async/sync patterns with full type annotations.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80706da and d7e87d7.

📒 Files selected for processing (5)
  • AGENTS.md (1 hunks)
  • docs/AGENTS.md (1 hunks)
  • infrahub_sdk/ctl/AGENTS.md (1 hunks)
  • infrahub_sdk/pytest_plugin/AGENTS.md (1 hunks)
  • tests/AGENTS.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • infrahub_sdk/pytest_plugin/AGENTS.md
  • tests/AGENTS.md
🧰 Additional context used
📓 Path-based instructions (3)
**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.md: Use markdownlint for documentation consistency
Use Vale for documentation style checking
Follow markdown style as defined in .markdownlint.yaml configuration

Files:

  • docs/AGENTS.md
  • infrahub_sdk/ctl/AGENTS.md
  • AGENTS.md
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (CLAUDE.md)

docs/**/*.{md,mdx}: Follow Diataxis framework for documentation structure: Tutorials (learning-oriented), How-to guides (task-oriented), Explanation (understanding-oriented), and Reference (information-oriented)
Use professional but approachable tone with plain language and technical precision in documentation
Use concise and direct documentation with short, active sentences and minimal fluff
Maintain informative documentation focused on explaining how and why rather than marketing
Follow consistent documentation structure patterns across documents
Define new terms when first introduced in documentation
Use domain-relevant terminology from the user perspective (playbooks, branches, schemas, commits) in documentation
Maintain consistency with Infrahub's data model and UI naming conventions in documentation
Use proper language tags for all code blocks in documentation
Include both async and sync code examples using Tabs component where applicable
Provide realistic code examples that reflect real-world complexity in documentation
Use callouts for warnings, tips, and important notes in documentation

Files:

  • docs/AGENTS.md
docs/**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

Follow Vale style guidelines as defined in .vale/styles/ for documentation

Files:

  • docs/AGENTS.md
🧠 Learnings (17)
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain consistency with Infrahub's data model and UI naming conventions in documentation

Applied to files:

  • docs/AGENTS.md
  • infrahub_sdk/ctl/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain informative documentation focused on explaining how and why rather than marketing

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Follow consistent documentation structure patterns across documents

Applied to files:

  • docs/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Include both async and sync code examples using Tabs component where applicable

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/client.py : Use `InfrahubClient` (async) and `InfrahubClientSync` (sync) with identical interfaces following the Dual Client Pattern

Applied to files:

  • docs/AGENTS.md
  • infrahub_sdk/ctl/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use proper language tags for all code blocks in documentation

Applied to files:

  • docs/AGENTS.md
  • infrahub_sdk/ctl/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/*.md : Use markdownlint for documentation consistency

Applied to files:

  • docs/AGENTS.md
  • infrahub_sdk/ctl/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use callouts for warnings, tips, and important notes in documentation

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use concise and direct documentation with short, active sentences and minimal fluff

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use professional but approachable tone with plain language and technical precision in documentation

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/*.md : Follow markdown style as defined in `.markdownlint.yaml` configuration

Applied to files:

  • docs/AGENTS.md
  • infrahub_sdk/ctl/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*how-to*.{md,mdx} : Add validation steps to confirm success in code examples and how-to guides

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Use Docusaurus-based documentation system with auto-generation for CLI docs and config reference

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Follow Diataxis framework for documentation structure: Tutorials (learning-oriented), How-to guides (task-oriented), Explanation (understanding-oriented), and Reference (information-oriented)

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*how-to*.{md,mdx} : Use conditional imperatives in guides: 'If you want X, do Y' and address users directly with commands like 'Configure...', 'Create...', 'Deploy...'

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use domain-relevant terminology from the user perspective (playbooks, branches, schemas, commits) in documentation

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/ctl/**/*.py : Use Typer framework for building CLI commands in the infrahubctl CLI

Applied to files:

  • infrahub_sdk/ctl/AGENTS.md
🪛 GitHub Check: markdown-lint
docs/AGENTS.md

[failure] 60-60: Fenced code blocks should have a language specified
docs/AGENTS.md:60 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md


[failure] 60-60: Fenced code blocks should be surrounded by blank lines
docs/AGENTS.md:60 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md

AGENTS.md

[failure] 60-60: Fenced code blocks should have a language specified
docs/AGENTS.md:60 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md


[failure] 60-60: Fenced code blocks should be surrounded by blank lines
docs/AGENTS.md:60 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: unit-tests (3.11)
  • GitHub Check: unit-tests (3.12)
  • GitHub Check: unit-tests (3.13)
  • GitHub Check: unit-tests (3.9)
  • GitHub Check: unit-tests (3.10)
  • GitHub Check: integration-tests-latest-infrahub
  • GitHub Check: documentation
  • GitHub Check: Cloudflare Pages

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

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

21-28: Add full type hints and imports to the code example.

The code pattern example lacks full type annotations and necessary imports. Per previous feedback, all code examples should be fully typed with parameter and return type annotations.

Apply this diff:

 ## Code Pattern

 ```python
+from infrahub_sdk import InfrahubClient, InfrahubClientSync, InfrahubNode
+
 # Always provide both async and sync versions
-client = InfrahubClient()           # async
-node = await client.get(kind="NetworkDevice")
-await node.save()
-
-client = InfrahubClientSync()       # sync
-node = client.get(kind="NetworkDevice")
-node.save()
+client: InfrahubClient = InfrahubClient()           # async
+node: InfrahubNode = await client.get(kind="NetworkDevice")
+await node.save()
+
+client_sync: InfrahubClientSync = InfrahubClientSync()       # sync
+node_sync: InfrahubNode = client_sync.get(kind="NetworkDevice")
+node_sync.save()

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>AGENTS.md (1)</summary><blockquote>

`17-17`: **Reference dependency versions from `pyproject.toml` instead of hardcoding.**

Rather than hardcoding specific versions, consider referencing `pyproject.toml` for exact version requirements. This reduces maintenance burden and keeps guidance current as dependencies evolve.



Example revision:

```diff
 ## Tech Stack

-Python 3.9-3.13, UV, pydantic >=2.0, httpx, graphql-core
+See `pyproject.toml` for exact versions. Core: Python 3.9–3.13, UV, pydantic, httpx, graphql-core.

This aligns with the previous feedback that hardcoded versions become obsolete and are difficult to maintain.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7e87d7 and a3a7c7c.

📒 Files selected for processing (1)
  • AGENTS.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.md: Use markdownlint for documentation consistency
Use Vale for documentation style checking
Follow markdown style as defined in .markdownlint.yaml configuration

Files:

  • AGENTS.md
🧠 Learnings (6)
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/client.py : Use `InfrahubClient` (async) and `InfrahubClientSync` (sync) with identical interfaces following the Dual Client Pattern

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Use proper language tags for all code blocks in documentation

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Maintain consistency with Infrahub's data model and UI naming conventions in documentation

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/*.md : Use markdownlint for documentation consistency

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to docs/**/*.{md,mdx} : Follow consistent documentation structure patterns across documents

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-25T07:18:58.155Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T07:18:58.155Z
Learning: Applies to **/*.md : Follow markdown style as defined in `.markdownlint.yaml` configuration

Applied to files:

  • AGENTS.md
🪛 GitHub Check: markdown-lint
AGENTS.md

[failure] 60-60: Fenced code blocks should have a language specified
docs/AGENTS.md:60 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md


[failure] 60-60: Fenced code blocks should be surrounded by blank lines
docs/AGENTS.md:60 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md


[failure] 49-49: Spaces inside code span elements
AGENTS.md:49:60 MD038/no-space-in-code Spaces inside code span elements [Context: "python, "] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: unit-tests (3.13)
  • GitHub Check: integration-tests-latest-infrahub
  • GitHub Check: Cloudflare Pages

@dgarros dgarros force-pushed the dga-20251109-agents branch from b370b45 to 7906613 Compare November 29, 2025 15:38
@petercrocker
Copy link
Contributor

@dgarros you're trying to merge this on to stable which is still on poetry but you're switching various things to use uv. Maybe this should be either 1) not switched to poetry and just focus on the agents file, or 2) brought in to develop or 1.6 branch instead?

@dgarros
Copy link
Contributor Author

dgarros commented Nov 29, 2025

@dgarros you're trying to merge this on to stable which is still on poetry but you're switching various things to use uv. Maybe this should be either 1) not switched to poetry and just focus on the agents file, or 2) brought in to develop or 1.6 branch instead?

Good point, somehow I thought the SDK switched to uv in the previous version 🤦🏼‍♂️

@dgarros dgarros changed the base branch from stable to develop November 29, 2025 15:42
@dgarros dgarros force-pushed the dga-20251109-agents branch from 7906613 to f0cb766 Compare November 29, 2025 15:44
@github-actions github-actions bot removed the group/ci Issue related to the CI pipeline label Nov 29, 2025
@dgarros dgarros requested a review from ogenstad November 29, 2025 15:48
@dgarros
Copy link
Contributor Author

dgarros commented Nov 29, 2025

@ogenstad
I asked Claude to review and simplify these files based on the best practices listed here
The files are much smaller and it's probably a better place to start

Would be good to get it merged ASAP, sorry for the delay to get it across the finish line

AGENTS.md Outdated

## Markdown Style

When editing `.md` files, run `uv run invoke lint-docs` before committing.
Copy link
Contributor

Choose a reason for hiding this comment

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

when editing .md or .mdx files

AGENTS.md Outdated

## Tech Stack

Python 3.9-3.13, UV, pydantic >=2.0, httpx, graphql-core
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we're minimum python 3.10 now?

Copy link
Contributor

@petercrocker petercrocker left a comment

Choose a reason for hiding this comment

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

I did some very minor corrections. Looks good, and we can improve it over time.

@dgarros dgarros merged commit 5093a3f into develop Nov 30, 2025
15 checks passed
@dgarros dgarros deleted the dga-20251109-agents branch November 30, 2025 09:19
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.

4 participants