Skip to content

Add AGENTS.md with AI coding agent guidelines#4102

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/create-agents-md-file
Draft

Add AGENTS.md with AI coding agent guidelines#4102
Copilot wants to merge 4 commits intomasterfrom
copilot/create-agents-md-file

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Provides structured guidelines for AI coding agents working on The Combine codebase, covering workflow requirements, formatting conventions, and integration points.

Contents

  • Commit Messages: Gitlint compliance requirements (4-character minimum, conventional format)
  • Code Style: References to existing style guides (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 guide
  • Formatting: Commands for backend (npm run fmt-backend) and frontend (npm run fmt-frontend) formatting after changes
  • Dependency Management: License report generation for backend and frontend dependency updates
  • OpenAPI Generation: Workflow for regenerating specifications after Backend/Controllers/ changes (venv setup → python ./scripts/generate_openapi.py)
  • Localization: English-only translations in public/locales/en/translation.json (Crowdin handles other languages)

Includes a summary checklist for pre-commit validation.

Additional Changes

  • TypeScript Style Guide Enhancement: Added "Component Props" subsection to docs/style_guide/ts_style_guide.md documenting 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

This section details on the original issue you should resolve

<issue_title>Create an AGENTS.md file</issue_title>
<issue_description>Some things to include (divided into appropriate sections):

  • commit messages should satisfy the defaults of gitlint
  • follow style guides in docs/style_guide/
  • npm run fmt-backend after any backend changes
  • npm run fmt-frontend after any frontend changes
  • npm run license-report-backend after any backend dependency changes
  • npm run license-report-frontend after any frontend dependency changes
  • in React, alphabetize component props
  • when there are changes in Backend/Controllers/, set up a venv per README instructions (https://github.com/sillsdev/TheCombine?tab=readme-ov-file#python), then with the backend running (npm run backend) do python ./scripts/generate_openapi.py
  • don't translate any strings added to public/locales/en/translation.json; localization is handled externally in Crowdin</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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 Reviewable

Summary by CodeRabbit

  • Documentation
    • Introduced comprehensive agent guidelines documentation covering commit message standards, code style conventions for TypeScript and C#, formatting procedures, dependency management workflows, OpenAPI specification regeneration, localization practices, and verification checklists.
    • Added Component Props guidance to the TypeScript style guide, establishing alphabetization conventions for React component props with illustrative examples and rationale.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

Note

Other AI code review bot(s) detected

CodeRabbit 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.

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Agent Guidelines
AGENTS.md
New documentation file establishing standards for commit messages (gitlint compliance), code style enforcement (formatting, linting), dependency management workflows, OpenAPI spec regeneration procedures after backend changes, and localization practices.
TypeScript Style Guide Expansion
docs/style_guide/ts_style_guide.md
Added new "Component Props" section under Components requiring alphabetization of React component props. Includes Good/Bad examples demonstrating proper ordering in interface/type definitions, prop destructuring, and JSX usage.

Possibly related issues

  • Create an AGENTS.md file #3969 — This PR directly implements the AGENTS.md file requirements and adds the React prop alphabetization guidance specified in the issue.

Poem

🐰 New guidelines hopped into view,
Props alphabetized, clean and true,
Agents united by style so bright,
Documentation guides code just right! ✨


Estimated code review effort: 🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change—adding an AGENTS.md file with AI coding agent guidelines—and is clear and concise.
Linked Issues check ✅ Passed The PR implements all coding requirements from issue #3969: gitlint compliance, style guide references, formatting commands, dependency management, OpenAPI generation workflow, localization rules, and alphabetizing React component props.
Out of Scope Changes check ✅ Passed The PR includes only in-scope changes: AGENTS.md documentation and the addition of Component Props guidance to ts_style_guide.md, both directly aligned with issue #3969 requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits January 16, 2026 17:45
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Copilot AI changed the title [WIP] Create AGENTS.md file with development guidelines Add AGENTS.md with AI coding agent guidelines Jan 16, 2026
Copilot AI requested a review from imnasnainaec January 16, 2026 17:50
Copy link
Collaborator

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
@imnasnainaec
Copy link
Collaborator

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1c058e5 and 1c08836.

📒 Files selected for processing (2)
  • AGENTS.md
  • docs/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.

Comment on lines +27 to +32
```
Add user authentication endpoint

Implements JWT-based authentication for user login.
Includes validation and error handling.
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Suggested change
- 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.md with workflow requirements covering commit messages, code style, formatting, dependency management, OpenAPI generation, and localization
  • Enhanced docs/style_guide/ts_style_guide.md with 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
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- Use single quotes for strings
- Use single quotes for strings
- Alphabetize component props in interfaces and JSX

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create an AGENTS.md file

2 participants