Skip to content

Conversation

@dgarros
Copy link
Collaborator

@dgarros dgarros commented Nov 29, 2025

Add fairly minimalist AGENTS.md files in a

  • root
  • backend
  • frontend
  • docs

Summary by CodeRabbit

  • Documentation
    • Added a centralized, repo-wide contributor guide covering project overview, file structure, commands, coding/testing conventions, writing style, and contributor boundaries.
    • Added targeted guidance for backend, frontend, and docs authors; replaced an older guidance file with a pointer to the central guide.
  • Chores
    • Expanded spelling exceptions to include additional accepted terms.

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

@dgarros dgarros requested review from a team as code owners November 29, 2025 16:33
@github-actions github-actions bot added type/documentation Improvements or additions to documentation group/backend Issue related to the backend (API Server, Git Agent) group/frontend Issue related to the frontend (React) labels Nov 29, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 29, 2025

Walkthrough

Repository-wide AGENTS.md documentation added, plus specialized AGENTS.md files in backend, docs, and frontend that specify project overviews, file structures, commands, coding and documentation conventions, testing guidance, and boundary rules. CLAUDE.md was replaced with a single reference to AGENTS.md. The spelling exceptions file (.vale/styles/spelling-exceptions.txt) was updated to add two entries. No functional code, exported/public API, or runtime logic changes were made.

Pre-merge checks

✅ 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 clearly and specifically summarizes the main change: adding AGENTS.md files across multiple repository locations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 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 dc7eefe and 7720452.

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

📄 CodeRabbit inference engine (CLAUDE.md)

Lint markdown files using: markdownlint --config .markdownlint.yaml --ignore "**/node_modules/**" "**/*.md" "**/*.mdx"

Files:

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

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{mdx,md}: Run Vale style checker after documentation updates to check style, sentence-case, and spelling: vale $(find ./docs -type f \( -name "*.mdx" -o -name "*.md" \) -not -path "./docs/node_modules/*")
Define new terminology when first used; use callouts or glossary links where appropriate; maintain consistency with naming conventions established by Infrahub's data model and UI

Files:

  • AGENTS.md
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Applies to **/*.{mdx,md} : Run Vale style checker after documentation updates to check style, sentence-case, and spelling: `vale $(find ./docs -type f \( -name "*.mdx" -o -name "*.md" \) -not -path "./docs/node_modules/*")`
📚 Learning: 2025-11-24T16:31:06.160Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Applies to **/*.py : Use type hints for all function parameters and return values in Python code

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-24T16:30:42.208Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/instructions/python.instructions.md:0-0
Timestamp: 2025-11-24T16:30:42.208Z
Learning: Applies to **/*.py : Use type hints for all function parameters and return values in Python

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-24T16:30:16.254Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Documentation must reflect Infrahub's novel approach by providing clarity around new concepts and demonstrating integration with familiar patterns from Git, IaC, and CI/CD pipelines

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-24T16:30:16.254Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Infrahub provides version control and branch management capabilities similar to Git combined with flexible data model and UI of a graph database

Applied to files:

  • AGENTS.md
📚 Learning: 2025-11-24T16:31:06.160Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Documentation should guide users through installing, configuring, and using Infrahub in real-world workflows; explain concepts and system architecture clearly including new paradigms; support troubleshooting with actionable content; and enable adoption with approachable examples

Applied to files:

  • 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). (9)
  • GitHub Check: E2E-testing-version-upgrade / From 1.3.0
  • GitHub Check: documentation
  • GitHub Check: backend-docker-integration
  • GitHub Check: backend-benchmark
  • GitHub Check: backend-tests-functional
  • GitHub Check: backend-tests-integration
  • GitHub Check: E2E-testing-playwright
  • GitHub Check: backend-tests-unit
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
AGENTS.md (3)

3-87: Well-structured and comprehensive contributor guide.

The document effectively serves as a centralized reference with clear sections on tech stack, file organization, standardized commands, and workflows. The cross-references to backend-, frontend-, and docs-specific AGENTS.md files (lines 18–20) follow a good pattern for progressive detail. The wording at line 94 clarifies the distinction between backend (Python) and frontend (TypeScript) type hints—addressing the earlier feedback. Generated files section (lines 61–70) clearly marks what contributors should not edit.


88-108: Clear and practical boundary guidelines.

The three-tier boundary structure (Always Do / Ask First / Never Do) effectively guides contributors on decision-making. The guidance aligns well with earlier content—e.g., "Never Do: Edit generated files manually" reinforces the "Generated Files" section explanation at lines 61–70. The "Ask First" category appropriately flags high-impact changes that warrant review.


1-109: No issues found. The AGENTS.md file complies with all markdown formatting standards: proper heading hierarchy, consistent list formatting with -, correct spacing around blocks, no trailing whitespace, no bare URLs, and proper fenced code blocks with language identifiers. The content is well-organized and accurately documents the project structure, tech stack, and contributor guidelines.


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.

Copy link
Contributor

@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

🧹 Nitpick comments (2)
frontend/app/AGENTS.md (1)

96-100: Boundary against console.log (except console.error, warn, info) is sensible; consider tooling enforcement.

The prohibition on console.log while allowing console.error, console.warn, console.info is a good practice to enforce proper log levels. Consider whether ESLint rules can enforce this automatically.

Consider adding an ESLint rule (e.g., no-console) to automatically prevent console.log statements in production code, with exceptions for dev-only files or testing utilities. This would catch violations before code review.

docs/AGENTS.md (1)

1-25: Diataxis framework documentation is well-structured and aligns with project learnings.

The file correctly outlines the four Diataxis categories (tutorials, how-to guides, topics/explanations, reference) and maps them to directory structure. This aligns well with the learnings about documentation organization and contributor guidance.

Document the rationale for Diataxis framework adoption (e.g., in a docs/CONTRIBUTING.md or extended section) to help new contributors understand why this structure improves documentation quality, not just what the structure is.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 88327bc and c31ee81.

📒 Files selected for processing (5)
  • AGENTS.md (1 hunks)
  • CLAUDE.md (1 hunks)
  • backend/AGENTS.md (1 hunks)
  • docs/AGENTS.md (1 hunks)
  • frontend/app/AGENTS.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

Lint markdown files using: markdownlint --config .markdownlint.yaml --ignore "**/node_modules/**" "**/*.md" "**/*.mdx"

Files:

  • AGENTS.md
  • docs/AGENTS.md
  • backend/AGENTS.md
  • CLAUDE.md
  • frontend/app/AGENTS.md
**/*.{mdx,md}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{mdx,md}: Run Vale style checker after documentation updates to check style, sentence-case, and spelling: vale $(find ./docs -type f \( -name "*.mdx" -o -name "*.md" \) -not -path "./docs/node_modules/*")
Define new terminology when first used; use callouts or glossary links where appropriate; maintain consistency with naming conventions established by Infrahub's data model and UI

Files:

  • AGENTS.md
  • docs/AGENTS.md
  • backend/AGENTS.md
  • CLAUDE.md
  • frontend/app/AGENTS.md
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Applies to docs/docs/{guides,reference}/**/*.{md,mdx} : Write guides in docs/docs/guides/ and references in docs/docs/reference/ using Docusaurus markdown/MDX
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Documentation must reflect Infrahub's novel approach by providing clarity around new concepts and demonstrating integration with familiar patterns from Git, IaC, and CI/CD pipelines
📚 Learning: 2025-11-24T16:30:16.254Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Documentation must reflect Infrahub's novel approach by providing clarity around new concepts and demonstrating integration with familiar patterns from Git, IaC, and CI/CD pipelines

Applied to files:

  • AGENTS.md
  • docs/AGENTS.md
  • CLAUDE.md
📚 Learning: 2025-11-24T16:30:16.254Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Infrahub provides version control and branch management capabilities similar to Git combined with flexible data model and UI of a graph database

Applied to files:

  • AGENTS.md
  • backend/AGENTS.md
📚 Learning: 2025-11-24T16:31:06.160Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Documentation should guide users through installing, configuring, and using Infrahub in real-world workflows; explain concepts and system architecture clearly including new paradigms; support troubleshooting with actionable content; and enable adoption with approachable examples

Applied to files:

  • AGENTS.md
  • docs/AGENTS.md
  • CLAUDE.md
📚 Learning: 2025-11-24T16:30:16.254Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Applies to docs/docs/{guides,reference}/**/*.{md,mdx} : Write guides in docs/docs/guides/ and references in docs/docs/reference/ using Docusaurus markdown/MDX

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-24T16:31:06.160Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Applies to **/*.mdx : Follow Diataxis framework for documentation structure: organize content into Tutorials (learning-oriented), How-to guides (task-oriented), Explanation (understanding-oriented), and Reference (information-oriented)

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-24T16:31:06.160Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Applies to **/*.mdx : For How-to Guides: use conditional imperatives ("If you want X, do Y"), focus on practical tasks, address user directly with imperative verbs (Configure, Create, Deploy), maintain focus on specific goals, and use clear titles stating exactly what the guide accomplishes

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-24T16:30:31.700Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/instructions/documentation.instructions.md:0-0
Timestamp: 2025-11-24T16:30:31.700Z
Learning: Applies to **/*.mdx : Use MDX syntax and components appropriately in technical documentation files, following the documentation guidelines and templates in the repository including Vale styles for grammar checks and markdownlint rules for formatting consistency

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-24T16:31:06.160Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Applies to **/*.mdx : For Topics/Explanations: use discursive tone inviting understanding, include context and rationale behind design decisions, make connections between concepts, present alternative perspectives, and use illustrative analogies and examples to deepen understanding

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-24T16:31:06.160Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Applies to **/*.{mdx,md} : Define new terminology when first used; use callouts or glossary links where appropriate; maintain consistency with naming conventions established by Infrahub's data model and UI

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-24T16:30:31.700Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/instructions/documentation.instructions.md:0-0
Timestamp: 2025-11-24T16:30:31.700Z
Learning: Follow the Diataxis framework for documentation structure: organize content into tutorials (learning-oriented), how-to guides (task-oriented), explanation topics (understanding-oriented), and reference (information-oriented)

Applied to files:

  • docs/AGENTS.md
📚 Learning: 2025-11-24T16:30:31.700Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/instructions/documentation.instructions.md:0-0
Timestamp: 2025-11-24T16:30:31.700Z
Learning: Validate documentation quality before submission: ensure content is accurate and reflects the latest version of Infrahub, instructions are clear with step-by-step guidance, Markdown formatting is correct and compliant with Infrahub's style, and spelling/grammar are checked

Applied to files:

  • docs/AGENTS.md
  • CLAUDE.md
📚 Learning: 2025-11-24T16:30:16.254Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Backend implements core graph-based infrastructure datastore, API, and business logic

Applied to files:

  • backend/AGENTS.md
📚 Learning: 2025-11-24T16:30:16.254Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Applies to frontend/app/**/*.{js,jsx,ts,tsx} : Use npm scripts (npm start, npm test, npm run build) for frontend development

Applied to files:

  • frontend/app/AGENTS.md
📚 Learning: 2025-11-24T16:30:16.254Z
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:16.254Z
Learning: Applies to frontend/**/*.{test.js,test.jsx,test.ts,test.tsx} : Place frontend tests alongside components

Applied to files:

  • frontend/app/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). (10)
  • GitHub Check: E2E-testing-version-upgrade / From 1.3.0
  • GitHub Check: documentation
  • GitHub Check: backend-benchmark
  • GitHub Check: E2E-testing-playwright
  • GitHub Check: validate-generated-documentation
  • GitHub Check: backend-docker-integration
  • GitHub Check: backend-tests-functional
  • GitHub Check: backend-tests-integration
  • GitHub Check: backend-tests-unit
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (18)
AGENTS.md (4)

1-25: Cross-references to subdirectory AGENTS.md files use correct relative paths.

The document properly links to backend/AGENTS.md, frontend/app/AGENTS.md, and docs/AGENTS.md. The relative paths are correct and align with the repository structure described.


1-25: All referenced invoke tasks are configured and discoverable in the codebase.

Verification confirms that every task mentioned in the AGENTS.md review comment exists and is properly configured:

  • backend.test-unittest_unit() in tasks/backend.py (line 78)
  • backend.test-integrationtest_integration() in tasks/backend.py (line 98)
  • backend.formatformat_all() in tasks/backend.py (line 35)
  • backend.lintlint() in tasks/backend.py (line 69)
  • backend.generategenerate() in tasks/backend.py (line 169)
  • dev.buildbuild() in tasks/dev.py (line 41)
  • docs.lintlint() in tasks/docs.py (line 161)
  • formatformat_all() in tasks/main.py (line 30)

Invoke automatically converts Python function underscores to hyphens in the CLI (e.g., test_unit becomes test-unit), so all referenced commands will work without runtime errors. Contributors will successfully discover and execute these tasks.


80-85: Branch names in AGENTS.md do not match the actual repository configuration.

The document specifies stable, develop, and release-* branches, but verification shows only the stable branch exists in the repository. The develop and release-* branches are not present. Although develop is referenced in CHANGELOG.md, it does not appear in the current git branch listing. Contributors following these guidelines will not find the documented branches to work with.

Update the branch names to reflect the actual repository strategy, or clarify if this is an aspirational workflow that needs to be implemented.


70-78: Markdown files should be validated with linting tools before merging.

The AGENTS.md file (root) correctly documents markdown formatting rules at lines 70-78. The file itself appears to follow these guidelines (proper list markers, code block identifiers, no bare URLs, no trailing spaces). However, all AGENTS.md files in this PR should be validated with markdownlint --config .markdownlint.yaml and Vale (configured at .vale.ini) before merge, as required by the repository's coding guidelines. Configuration files are in place; validation should be performed in CI or locally before merge.

⛔ Skipped due to learnings
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Applies to **/*.md : Lint markdown files using: `markdownlint --config .markdownlint.yaml --ignore "**/node_modules/**" "**/*.md" "**/*.mdx"`
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/instructions/documentation.instructions.md:0-0
Timestamp: 2025-11-24T16:30:31.700Z
Learning: Applies to **/*.mdx : Use MDX syntax and components appropriately in technical documentation files, following the documentation guidelines and templates in the repository including Vale styles for grammar checks and markdownlint rules for formatting consistency
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Applies to **/*.{mdx,md} : Run Vale style checker after documentation updates to check style, sentence-case, and spelling: `vale $(find ./docs -type f \( -name "*.mdx" -o -name "*.md" \) -not -path "./docs/node_modules/*")`
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/instructions/tooling.instructions.md:0-0
Timestamp: 2025-11-24T16:30:47.672Z
Learning: Applies to **/*.{yaml,yml} : Use yamllint to validate YAML files
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: .github/instructions/documentation.instructions.md:0-0
Timestamp: 2025-11-24T16:30:31.700Z
Learning: Validate documentation quality before submission: ensure content is accurate and reflects the latest version of Infrahub, instructions are clear with step-by-step guidance, Markdown formatting is correct and compliant with Infrahub's style, and spelling/grammar are checked
Learnt from: CR
Repo: opsmill/infrahub PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:31:06.160Z
Learning: Applies to **/*.mdx : For How-to Guides: use conditional imperatives ("If you want X, do Y"), focus on practical tasks, address user directly with imperative verbs (Configure, Create, Deploy), maintain focus on specific goals, and use clear titles stating exactly what the guide accomplishes
backend/AGENTS.md (5)

60-81: Google-style docstring format is well-documented and aligns with Python conventions.

The docstring example is clear and follows Google-style format with Args, Returns, and Raises sections. This is a good standard to enforce.


125-128: Boundary against unparameterized Cypher queries is important security measure.

Explicitly prohibiting "Unparameterized Cypher queries" is a strong boundary and protects against injection attacks. This should be enforced via code review and static analysis if possible.


20-28: All invoke task names and commands are correct and properly documented.

Verification confirms:

  • backend.test-unit → runs uv run pytest on unit tests ✓
  • backend.test-integration → runs uv run pytest on integration tests (Neo4j optional) ✓
  • backend.format → runs ruff format and check --fix ✓
  • backend.lint → runs ruff + mypy linters ✓
  • backend.generate → regenerates schemas and protocols ✓

The task names follow Invoke's naming convention (underscores in function names convert to hyphens in CLI), and all tasks are properly registered in the backend collection.


103-108: Perfect! I now have sufficient evidence to complete the verification. Let me provide the final rewritten review comment:


Testing infrastructure properly integrates testcontainers for Neo4j integration tests.

Verification confirms testcontainers is correctly configured:

  • testcontainers==4.8.1 is listed in dev dependencies (pyproject.toml:103)
  • Custom infrahub-testcontainers wrapper extends testcontainers.compose.DockerCompose (python_testcontainers/infrahub_testcontainers/container.py:11, 70)
  • Docker Compose configuration includes Neo4j service (python_testcontainers/infrahub_testcontainers/docker-compose.test.yml:47-76)
  • CI/CD pipeline explicitly enables testcontainers via INFRAHUB_USE_TEST_CONTAINERS=1 environment variable (.github/workflows/ci.yml:27)
  • Integration test fixtures properly reference the containerized database infrastructure

The documentation statement is accurate and the implementation is complete.


30-44: Class name in example is fictional; pattern is correct.

The async-first example (lines 35-39) is accurate in pattern and correctly imports from infrahub.core.query. The Query.init() classmethod and async interface match the actual codebase. However, NodeGetQuery does not exist—replace with a real Query subclass like StandardNodeGetItemQuery for a concrete example, or clarify if this is an aspirational/educational example.

frontend/app/AGENTS.md (4)

1-27: Cross-reference to root AGENTS.md uses correct relative path.

Line 3 correctly references ../../AGENTS.md, and the note at the top directs developers to the root documentation for project-wide guidance. This structure supports consistent contributor experience.


54-61: The review comment's claim about pre-commit hooks is inaccurate; actual protections differ from what was stated.

The GraphQL generated types directory is properly configured and has protections in place, but not exactly as described:

What exists:

  • graphql.config.ts configures codegen output to src/shared/api/graphql/generated/
  • ✓ AGENTS.md line 98 documents: "Never Do: Edit files in src/shared/api/graphql/generated/"
  • ✓ Root .gitignore includes generated/ entry, preventing accidental commits of manual edits

What doesn't exist:

  • ✗ No pre-commit hooks specifically prevent edits to this directory (the pre-commit config only excludes the schema and OpenAPI files)

The directory is adequately protected through documentation and .gitignore exclusions, which prevent committed manual edits. However, there are no pre-commit hooks enforcing this rule, so developers could technically modify files before they realize it's prohibited.


70-79: Biome import sorting configuration is properly in place and functional.

Verification confirms:

  1. Configuration exists: frontend/app/biome.jsonc with Biome schema defined
  2. Import sorting enabled: organizeImports is set to "level": "on" under assist.actions.source
  3. Proper group ordering: Groups are configured to match the documented order:
    • Node/Bun packages (external standard library)
    • General packages (external dependencies like @apollo/client)
    • Aliases excluding @/shared/** and @/entities/** (internal aliases)
    • @/shared/** (shared components)
    • @/entities/** (entities)
    • :PATH: (local relative imports like ./styles.css)
  4. npm script available: "biome:fix": "biome check --write ." is configured in package.json

Developers can run npm run biome:fix to automatically organize imports according to the configured groups, which aligns with the import order documented in AGENTS.md.


20-27: Unable to verify npm scripts due to repository access limitations.

The repository could not be cloned in the sandbox environment, and web searches for the package.json file in the opsmill/infrahub repository returned 404 errors or no results. Without access to the actual package.json configuration, I cannot definitively confirm whether all six npm scripts (dev, build, test, test:e2e, biome:fix, codegen) are defined or verify they map to the correct tools (Vitest, Playwright, Biome) as documented.

Manual verification of the frontend/app/package.json file is required to confirm the scripts section contains all documented commands and their implementations match the descriptions in AGENTS.md.

docs/AGENTS.md (5)

33-47: Writing style guidance is clear with concrete examples of good vs. bad patterns.

The "Good" example uses active voice and imperative mood ("Create a branch by clicking...") versus the "Bad" example using passive construction. This guidance is practical and aligns with the learnings about imperative mood and active voice.


65-113: Document templates provide clear structure for How-to Guides and Topic/Explanations.

The templates (lines 68-113) follow Diataxis conventions and provide a practical structure for contributors:

  • How-to Guide: Includes Introduction, Prerequisites, Steps, Verification, Related Resources
  • Topic/Explanation: Includes Introduction, Concepts, How It Works, Related Topics

These structures should help maintain documentation quality and consistency.


115-128: Quality checklist appropriately distinguishes between guides and topics with actionable criteria.

The Quality Checklist section provides specific, testable criteria:

  • For Guides: actionable titles, instructions vs. explanation, verification steps, real-world complexity
  • For Topics: explanations of "why", context, connections to related concepts

These are practical standards for reviewing documentation contributions.


130-149: Boundaries section includes practical guidance on terminology and style.

Line 146 specifically prohibits words like "simple", "easy", "just" which minimize complexity—this is excellent guidance that protects documentation quality for users at all skill levels. The other boundaries are practical and supportive of good documentation practices.


19-25: Verification confirms uv run invoke docs.lint correctly invokes both markdownlint and Vale.

The task is properly configured at lines 160-164 in tasks/docs.py:

  • Calls markdownlint(context) (lines 132-141)
  • Calls vale(context) (lines 117-128)
  • Both configuration files exist (.markdownlint.yaml and .vale.ini)

The command documented in AGENTS.md line 24 is accurate.

- Repository status: Clean (no uncommitted changes)
- The project emphasizes defensive security practices
- Always validate code changes with the provided linting and testing tools No newline at end of file
@AGENTS.md No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

@AGENTS.md is not valid Markdown syntax; clarify intent and format.

The file now contains only "@AGENTS.md", which is neither a valid Markdown link nor a properly formatted reference. This appears to be an incomplete replacement. Depending on the intent:

  • If intended as a hyperlink to AGENTS.md: Use [See AGENTS.md](./AGENTS.md) or See [AGENTS.md](./AGENTS.md) for Markdown-compliant format.
  • If intended as a directive for AI systems: Consider clarifying with documentation or a comment explaining the format convention.
  • If intended for human readers: Provide at least a brief explanation directing readers to the AGENTS.md files.

Apply one of the following fixes depending on intent:

Option 1: Markdown link (recommended if this is user-facing documentation)

-@AGENTS.md
+# Documentation Guidelines
+
+See [AGENTS.md](./AGENTS.md) for project-wide guidelines and conventions for all contributors.

Option 2: Minimal markdown redirect (if preserving brevity)

-@AGENTS.md
+[See AGENTS.md](./AGENTS.md)

Option 3: If this is specifically for Claude AI instruction: Document that convention clearly in a comment or README.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@AGENTS.md
# Documentation Guidelines
See [AGENTS.md](./AGENTS.md) for project-wide guidelines and conventions for all contributors.
🤖 Prompt for AI Agents
In CLAUDE.md around line 1, the file contains only "@AGENTS.md" which is not
valid Markdown; replace it with a clear, Markdown-compliant entry depending on
intent — for user-facing docs use a link like "See [AGENTS.md](./AGENTS.md)" or
"See AGENTS.md for details", for a terse redirect use a one-line Markdown link,
or if this is an AI directive add a brief explanatory comment describing the
"@AGENTS.md" convention and point to AGENTS.md; update the file with the chosen
option so it is valid and self-explanatory.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 29, 2025

CodSpeed Performance Report

Merging #7765 will not alter performance

Comparing dga-20251119-agents.md (7720452) with release-1.6 (eea9678)

Summary

✅ 12 untouched

Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c31ee81 and dc7eefe.

📒 Files selected for processing (2)
  • .vale/styles/spelling-exceptions.txt (2 hunks)
  • docs/AGENTS.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • 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). (7)
  • GitHub Check: backend-docker-integration
  • GitHub Check: E2E-testing-playwright
  • GitHub Check: validate-generated-documentation
  • GitHub Check: backend-tests-functional
  • GitHub Check: backend-tests-integration
  • GitHub Check: documentation
  • GitHub Check: backend-tests-unit

Cron
cypher
Dagster
Diataxis
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix alphabetical ordering of new spelling exceptions.

Both new entries are added in incorrect alphabetical positions:

  1. Line 42 "Diataxis": Should appear after "datacenter" (line 43), not before it. In case-insensitive alphabetical order, "datacenter" (da...) precedes "Diataxis" (di...).

  2. Line 220 "unoptimized": Should appear after "uniqueness_constraints" (line 221), not before it. In case-insensitive alphabetical order, "uniqueness_constraints" (uni...) precedes "unoptimized" (uno...).

Apply this diff to correct the ordering:

  Dagster
- Diataxis
  datacenter
  dataloader
  datastore

Then move "Diataxis" after "datacenter":

  datacenter
  dataloader
  datastore
+ Diataxis
  default_branch

Similarly for "unoptimized", move it after "uniqueness_constraints":

  uncheck
- unoptimized
  uniqueness_constraints
  upsert
  upserting
  Upserting
  userinfo
  uuid
  UUID
  UUIDs
  uv
  validator
  validators
  Version Control
  Vite
  Vitest
  VLANs
  vscode
  VSCode
  walkthrough
  widget's
  Widget's
  worktrees
  Yaml
  yamllint
  YouTube
+ unoptimized

Also applies to: 220-220

🤖 Prompt for AI Agents
In .vale/styles/spelling-exceptions.txt around lines 42 and 220, the new entries
"Diataxis" (line 42) and "unoptimized" (line 220) are out of case-insensitive
alphabetical order; move "Diataxis" so it appears immediately after "datacenter"
(i.e., place it after the current line 43) and move "unoptimized" so it appears
immediately after "uniqueness_constraints" (i.e., place it after the current
line 221), preserving one entry per line and the file's existing casing and
whitespace.

Comment on lines 54 to 79
### GraphQL

```typescript
// ✅ Good - Use generated types
import type { GetNodesQuery } from "@/shared/api/graphql/generated";

const { data } = useQuery<GetNodesQuery>(GET_NODES);
```

### Naming Conventions

- **Components:** `PascalCase.tsx`
- **Hooks:** `useSomething.ts`
- **Utilities:** `camelCase.ts`
- **Constants:** `UPPER_SNAKE_CASE`

### Import Order (Biome enforced)

```typescript
import { useState } from "react"; // React
import { useQuery } from "@apollo/client"; // External packages
import { useConfig } from "@/config"; // Internal aliases
import { NodeCard } from "@/shared/..."; // Shared
import { useNodeData } from "@/entities/..."; // Entities
import "./styles.css"; // Local
```
Copy link
Contributor

Choose a reason for hiding this comment

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

A big parts of this are inaccurate and don’t align with our project conventions. Feel free to reduce it to the bare minimum or delete the file altogether. I’ll be writing AGENTS.md today anyway.

Copy link
Contributor

@ogenstad ogenstad left a comment

Choose a reason for hiding this comment

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

Added some suggestions.

- `backend/infrahub/core/schema/generated/` – Schema definitions
- `backend/infrahub/core/protocols.py` – Protocol definitions
- `frontend/app/src/shared/api/graphql/generated/` – GraphQL types
- `frontend/app/src/shared/api/rest/types.generated.ts` – REST types
Copy link
Contributor

Choose a reason for hiding this comment

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

Add ./schema/schema.graphql and ./schema/openapi.json

AGENTS.md Outdated

- Run formatters before committing (`uv run invoke format`, `npm run biome:fix`)
- Write tests for new functionality
- Use type hints (Python) and TypeScript types (frontend)
Copy link
Contributor

Choose a reason for hiding this comment

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

The meaning here looks a bit weird with Python and frontend within parentheses.

Would be clearer with something like:
Use type hints for Python (backend) and TypeScript types (frontend)

await query.execute(db=db)
return query.get_node()

# ❌ Bad - blocks event loop
Copy link
Contributor

Choose a reason for hiding this comment

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

Bad - blocks event loop, no type hints


```bash
uv run invoke format # Format all Python code
uv run invoke lint # Lint all Python code
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure here, but to me this would be duplicated info and something that's also included in the backend. I don't know if it hurts to have it here or if it just creates more info in the context. I.e. the Python stuff might not be relevant for work within the frontend and vice versa.

I guess we'll have to test and reiterate on things like this.


class BranchCreateInput(BaseModel):
name: str = Field(..., min_length=1, max_length=250)
description: str | None = None
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest making both of these as Field objects and providing a description parameter with some meaningful text.


## Testing

- Unit tests: no external dependencies, mock everything
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to get rid of the "mock" part and instead focus on having APIs that can use a protocol, interface or adapter. With mocks we can end up with things that doesn't reflect the real world and if something external to the function changes those tests can still pass. I'd like to get rid of all of the mocks throughout the tests.

## Commands

```bash
npm run start # Dev server with hot reload
Copy link
Contributor

Choose a reason for hiding this comment

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

As this is a blocking call that doesn't return the prompt, can Claude do that and understand to run it as a background process? (I don't currently know)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure, will need to test that

@dgarros dgarros merged commit 80e2607 into release-1.6 Dec 1, 2025
42 checks passed
@dgarros dgarros deleted the dga-20251119-agents.md branch December 1, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/backend Issue related to the backend (API Server, Git Agent) group/frontend Issue related to the frontend (React) type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants