-
Notifications
You must be signed in to change notification settings - Fork 39
Add AGENTS files #7765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AGENTS files #7765
Conversation
WalkthroughRepository-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)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used📓 Path-based instructions (2)**/*.md📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{mdx,md}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (6)📓 Common learnings📚 Learning: 2025-11-24T16:31:06.160ZApplied to files:
📚 Learning: 2025-11-24T16:30:42.208ZApplied to files:
📚 Learning: 2025-11-24T16:30:16.254ZApplied to files:
📚 Learning: 2025-11-24T16:30:16.254ZApplied to files:
📚 Learning: 2025-11-24T16:31:06.160ZApplied to files:
⏰ 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)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this 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.logwhile allowingconsole.error,console.warn,console.infois 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 preventconsole.logstatements 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
📒 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.mddocs/AGENTS.mdbackend/AGENTS.mdCLAUDE.mdfrontend/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.mddocs/AGENTS.mdbackend/AGENTS.mdCLAUDE.mdfrontend/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.mddocs/AGENTS.mdCLAUDE.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.mdbackend/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.mddocs/AGENTS.mdCLAUDE.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.mdCLAUDE.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-unit→test_unit()in tasks/backend.py (line 78)backend.test-integration→test_integration()in tasks/backend.py (line 98)backend.format→format_all()in tasks/backend.py (line 35)backend.lint→lint()in tasks/backend.py (line 69)backend.generate→generate()in tasks/backend.py (line 169)dev.build→build()in tasks/dev.py (line 41)docs.lint→lint()in tasks/docs.py (line 161)format→format_all()in tasks/main.py (line 30)Invoke automatically converts Python function underscores to hyphens in the CLI (e.g.,
test_unitbecomestest-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, andrelease-*branches, but verification shows only thestablebranch exists in the repository. Thedevelopandrelease-*branches are not present. Althoughdevelopis 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.yamland 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 consistencyLearnt 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 filesLearnt 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 checkedLearnt 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 accomplishesbackend/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→ runsuv run pyteston unit tests ✓backend.test-integration→ runsuv run pyteston 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
backendcollection.
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.1is listed in dev dependencies (pyproject.toml:103)- Custom
infrahub-testcontainerswrapper extendstestcontainers.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=1environment 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. TheQuery.init()classmethod and async interface match the actual codebase. However,NodeGetQuerydoes not exist—replace with a real Query subclass likeStandardNodeGetItemQueryfor 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.tsconfigures codegen output tosrc/shared/api/graphql/generated/- ✓ AGENTS.md line 98 documents: "Never Do: Edit files in
src/shared/api/graphql/generated/"- ✓ Root
.gitignoreincludesgenerated/entry, preventing accidental commits of manual editsWhat 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
.gitignoreexclusions, 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:
- Configuration exists:
frontend/app/biome.jsoncwith Biome schema defined- Import sorting enabled:
organizeImportsis set to"level": "on"underassist.actions.source- 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)- npm script available:
"biome:fix": "biome check --write ."is configured inpackage.jsonDevelopers can run
npm run biome:fixto 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 confirmsuv run invoke docs.lintcorrectly 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.yamland.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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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)orSee [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.
| @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 Performance ReportMerging #7765 will not alter performanceComparing Summary
|
There was a problem hiding this 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
📒 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix alphabetical ordering of new spelling exceptions.
Both new entries are added in incorrect alphabetical positions:
-
Line 42 "Diataxis": Should appear after "datacenter" (line 43), not before it. In case-insensitive alphabetical order, "datacenter" (da...) precedes "Diataxis" (di...).
-
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
datastoreThen move "Diataxis" after "datacenter":
datacenter
dataloader
datastore
+ Diataxis
default_branchSimilarly 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
+ unoptimizedAlso 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.
frontend/app/AGENTS.md
Outdated
| ### 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 | ||
| ``` |
There was a problem hiding this comment.
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.
ogenstad
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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)
backend/AGENTS.md
Outdated
| await query.execute(db=db) | ||
| return query.get_node() | ||
|
|
||
| # ❌ Bad - blocks event loop |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
backend/AGENTS.md
Outdated
|
|
||
| class BranchCreateInput(BaseModel): | ||
| name: str = Field(..., min_length=1, max_length=250) | ||
| description: str | None = None |
There was a problem hiding this comment.
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.
backend/AGENTS.md
Outdated
|
|
||
| ## Testing | ||
|
|
||
| - Unit tests: no external dependencies, mock everything |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
Add fairly minimalist
AGENTS.mdfiles in aSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.