Add AGENTS.md with AI coding agent guidelines#4102
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughThis PR introduces two documentation updates: a new AGENTS.md file with guidelines for commit messages, code formatting, dependency management, OpenAPI spec regeneration, and localization; and an expanded TypeScript style guide with a new "Component Props" section prescribing alphabetized prop ordering. Changes
Possibly related issues
Poem
Estimated code review effort: 🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@AGENTS.md`:
- Line 47: Update the guidance text in AGENTS.md that currently reads "Use
single quotes for strings" to match the TypeScript style guide by changing it to
recommend double quotes (e.g., "Prefer double quotes (\"your text\") to single
quotes (\'your text\')"). Locate the exact string "Use single quotes for
strings" in AGENTS.md and replace it with the corrected guidance so the document
is consistent with the style rule referenced at line 343 of the TypeScript
guide.
- Around line 27-32: Update the commit message example code fence so it includes
a language identifier (e.g., change the opening ``` to ```text) around the block
starting "Add user authentication endpoint" to enable proper syntax
highlighting; edit the fenced block in AGENTS.md where the commit example is
shown so the fence marker includes the language token.
🧹 Nitpick comments (1)
docs/style_guide/ts_style_guide.md (1)
532-535: Consider adding examples for all three contexts.The section states the convention applies to "Interface/type definitions for component props," "Prop destructuring in function parameters," and "Props passed to components in JSX," but only provides examples for interface definitions. Adding examples for the other two contexts would improve clarity.
Example additions
You could add examples like:
Prop destructuring:
// Good function MyComponent({ className, id, onClick, title }: MyComponentProps) { // ... } // Bad function MyComponent({ title, id, onClick, className }: MyComponentProps) { // ... }JSX usage:
// Good <MyComponent className="my-class" id="my-id" onClick={handleClick} title="My Title" /> // Bad <MyComponent title="My Title" id="my-id" onClick={handleClick} className="my-class" />
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
AGENTS.mddocs/style_guide/ts_style_guide.md
🧰 Additional context used
🪛 LanguageTool
AGENTS.md
[uncategorized] ~85-~85: The official name of this software platform is spelled with a capital “H”.
Context: ...YAML files in the frontend directories (.github, .vscode, deploy, docs, `mainten...
(GITHUB)
🪛 markdownlint-cli2 (0.18.1)
AGENTS.md
27-27: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
49-49: No space inside hashes on closed atx style heading
(MD020, no-missing-space-closed-atx)
docs/style_guide/ts_style_guide.md
508-508: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
519-519: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🔇 Additional comments (5)
AGENTS.md (5)
59-92: LGTM!The formatting section clearly documents the commands and their purposes for both backend and frontend.
95-121: LGTM!The dependency management section provides clear instructions for maintaining license reports.
124-168: LGTM!The Backend Controllers section provides comprehensive instructions for regenerating OpenAPI specifications, including prerequisites and important warnings.
171-207: LGTM!The localization section clearly explains the translation workflow and provides helpful examples.
210-221: LGTM!The summary checklist provides a helpful quick reference for all the key guidelines.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| ``` | ||
| Add user authentication endpoint | ||
|
|
||
| Implements JWT-based authentication for user login. | ||
| Includes validation and error handling. | ||
| ``` |
There was a problem hiding this comment.
Add language identifier to code fence.
The commit message example should specify a language identifier for proper syntax highlighting.
Proposed fix
-```
+```text
Add user authentication endpoint
Implements JWT-based authentication for user login.
Includes validation and error handling.</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **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.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
27-27: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In `@AGENTS.md` around lines 27 - 32, Update the commit message example code fence
so it includes a language identifier (e.g., change the opening ``` to ```text)
around the block starting "Add user authentication endpoint" to enable proper
syntax highlighting; edit the fenced block in AGENTS.md where the commit example
is shown so the fence marker includes the language token.
| - Use `PascalCase` for components, classes, and interfaces | ||
| - Prefer `const` over `let`, avoid `var` | ||
| - Use semicolons | ||
| - Use single quotes for strings |
There was a problem hiding this comment.
Incorrect quote style guidance.
This line states "Use single quotes for strings," but the TypeScript style guide at line 343 specifies: "Prefer double quotes ("your text") to single quotes ('your text')."
Proposed fix
- - Use single quotes for strings
+ - Use double quotes for strings📝 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.
| - Use single quotes for strings | |
| - Use double quotes for strings |
🤖 Prompt for AI Agents
In `@AGENTS.md` at line 47, Update the guidance text in AGENTS.md that currently
reads "Use single quotes for strings" to match the TypeScript style guide by
changing it to recommend double quotes (e.g., "Prefer double quotes (\"your
text\") to single quotes (\'your text\')"). Locate the exact string "Use single
quotes for strings" in AGENTS.md and replace it with the corrected guidance so
the document is consistent with the style rule referenced at line 343 of the
TypeScript guide.
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive documentation for AI coding agents working on The Combine codebase. It creates a new AGENTS.md file with structured guidelines and updates the TypeScript style guide to include component props alphabetization conventions.
Changes:
- Added
AGENTS.mdwith workflow requirements covering commit messages, code style, formatting, dependency management, OpenAPI generation, and localization - Enhanced
docs/style_guide/ts_style_guide.mdwith a new "Component Props" subsection documenting the convention to alphabetize React component props
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| AGENTS.md | New comprehensive guide for AI coding agents with workflow requirements, formatting conventions, and integration points including gitlint compliance, style guide references, npm scripts usage, and OpenAPI/localization workflows |
| docs/style_guide/ts_style_guide.md | Added "Component Props" subsection to the table of contents and documented alphabetization convention for React component props with examples and rationale |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Use `PascalCase` for components, classes, and interfaces | ||
| - Prefer `const` over `let`, avoid `var` | ||
| - Use semicolons | ||
| - Use single quotes for strings |
There was a problem hiding this comment.
The TypeScript/JavaScript key points should include alphabetizing React component props, as this was specifically mentioned in the issue requirements and has been added to the style guide. Consider adding "- Alphabetize component props in interfaces and JSX" to this list for completeness.
| - Use single quotes for strings | |
| - Use single quotes for strings | |
| - Alphabetize component props in interfaces and JSX |
Provides structured guidelines for AI coding agents working on The Combine codebase, covering workflow requirements, formatting conventions, and integration points.
Contents
docs/style_guide/ts_style_guide.md,docs/style_guide/c_sharp_style_guide.md), with alphabetizing component props now added to the TypeScript style guidenpm run fmt-backend) and frontend (npm run fmt-frontend) formatting after changesBackend/Controllers/changes (venv setup →python ./scripts/generate_openapi.py)public/locales/en/translation.json(Crowdin handles other languages)Includes a summary checklist for pre-commit validation.
Additional Changes
docs/style_guide/ts_style_guide.mddocumenting the convention to alphabetize React component props for consistency and readability. This guideline applies to interface/type definitions, prop destructuring, and props passed in JSX.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
This change is
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.