Skip to content

docs: add AI coding assistant guidelines#1315

Open
OreoYang wants to merge 2 commits intoIvorySQL:masterfrom
OreoYang:ai-power-coding-rule
Open

docs: add AI coding assistant guidelines#1315
OreoYang wants to merge 2 commits intoIvorySQL:masterfrom
OreoYang:ai-power-coding-rule

Conversation

@OreoYang
Copy link
Copy Markdown
Collaborator

@OreoYang OreoYang commented Apr 21, 2026

refer:

https://github.com/torvalds/linux/blob/master/README
https://github.com/torvalds/linux/blob/master/Documentation/process/coding-assistants.rst

Summary by CodeRabbit

  • Documentation
    • Added AI-assisted development guidelines covering Apache 2.0 licensing compatibility, attribution format for AI assistance, required code-quality and review responsibilities, and examples for attribution.
    • Published a Chinese translation of the guidelines.
    • Updated project README files to reference the new AI coding assistant guidance.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 463d810b-3c5d-43a0-a66a-c83d4aa37338

📥 Commits

Reviewing files that changed from the base of the PR and between 681f8ad and 46e3270.

📒 Files selected for processing (2)
  • README_CN.md
  • coding-assistants_CN.md
✅ Files skipped from review due to trivial changes (2)
  • coding-assistants_CN.md
  • README_CN.md

📝 Walkthrough

Walkthrough

Added documentation requiring AI/LLM-powered coding assistants to follow new contributor guidelines; updated English and Chinese READMEs to reference the new guidelines and added coding-assistants.md (and Chinese variant) specifying licensing, attribution, and code-quality compliance.

Changes

Cohort / File(s) Summary
README Documentation
README.md, README_CN.md
Inserted new "AI Coding Assistant" / "AI 编程助手" sections directing contributors using LLM/AI tools to read and comply with the corresponding coding-assistants guidance.
AI Assistant Guidelines
coding-assistants.md, coding-assistants_CN.md
New guideline documents defining required workflow alignment, Apache-2.0 licensing compatibility rules, attribution via Assisted-by: AGENT_NAME:MODEL_VERSION, prohibition on removing existing license headers, and human-review responsibility.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • Add readme_cn #762 — Modifies README files; likely related to adding or linking Chinese README content and AI assistant references.

Poem

🐰 I hopped through docs to leave a sign,

Assisted-by: model, version, fine.
Humans check and keep the thread,
Licenses safe, no headers shred.
A little carrot for compliant code—hooray! 🍃

🚥 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 pull request title clearly summarizes the main change: adding documentation for AI coding assistant guidelines. It directly reflects the content added across four new documentation files (README updates and coding-assistants guides).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@OreoYang OreoYang linked an issue Apr 21, 2026 that may be closed by this pull request
Copy link
Copy Markdown
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.

🧹 Nitpick comments (3)
README_CN.md (1)

47-52: LGTM! Chinese section is consistent with English version.

The Chinese AI assistant section properly mirrors the English version with appropriate translation and maintains the same strong directive tone. Both versions correctly link to the same coding-assistants.md file.

Optional: Consider adding a Chinese version of the guidelines.

While linking to the English coding-assistants.md is acceptable for AI tools, Chinese-speaking contributors using AI assistants might benefit from a Chinese translation (coding-assistants_CN.md). This would maintain consistency with the bilingual README structure.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README_CN.md` around lines 47 - 52, Reviewer suggests adding a Chinese
translation of the AI assistant guidelines; create a new file named
coding-assistants_CN.md containing a faithful Chinese translation of
coding-assistants.md, then update README_CN.md to link to
coding-assistants_CN.md (keep the existing English link if desired for
fallback). Locate references in README_CN.md and ensure the new file mirrors
sections, headings, and licensing/attribution language from coding-assistants.md
and is encoded/formatted consistently.
coding-assistants.md (2)

8-8: Consider adding a link to PostgreSQL coding conventions.

While the reference to "PostgreSQL coding conventions" is appropriate, providing a specific link would help AI tools and developers locate the conventions more easily.

📚 Suggested addition
 - `CONTRIBUTING.md` - Contribution guidelines and workflow
-- PostgreSQL coding conventions
+- [PostgreSQL coding conventions](https://www.postgresql.org/docs/current/source.html)
 - Existing IvorySQL code patterns and architecture
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@coding-assistants.md` at line 8, Replace the plain text "PostgreSQL coding
conventions" with a clickable link pointing to the official or project's
agreed-upon style guide (for example the PostgreSQL documentation or a specific
internal URL); update the literal string in the file content where "PostgreSQL
coding conventions" appears so it becomes a hyperlink and optionally add a short
parenthetical describing which conventions the link covers (naming, formatting,
SQL style).

35-54: Consider adding guidance on trailer placement in commit messages.

The Assisted-by tag format is clear, but the documentation doesn't specify where this trailer should appear in commit messages. Git trailers are conventionally placed at the end of the commit message body, separated by a blank line.

📝 Suggested addition

After line 41, add placement guidance:

 Assisted-by: AGENT_NAME:MODEL_VERSION

+This tag should be placed at the end of the commit message, following Git trailer conventions:
+
+ +Short commit message summary + +Detailed description of the changes made... + +Assisted-by: AGENT_NAME:MODEL_VERSION +
+
Where:

</details>

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

Verify each finding against the current code and only fix it if needed.

In @coding-assistants.md around lines 35 - 54, Add guidance to the "##
Attribution" section to specify trailer placement for the Assisted-by tag: state
that the Assisted-by: AGENT_NAME:MODEL_VERSION trailer must be placed at the end
of the commit message body following a blank line (per Git trailer conventions)
and include a short example showing a summary, blank line, detailed description,
blank line, then Assisted-by: AGENT_NAME:MODEL_VERSION; update the text that
currently defines the tag format (the Assisted-by examples) to include this
placement guidance and the example commit message.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @coding-assistants.md:

  • Line 8: Replace the plain text "PostgreSQL coding conventions" with a
    clickable link pointing to the official or project's agreed-upon style guide
    (for example the PostgreSQL documentation or a specific internal URL); update
    the literal string in the file content where "PostgreSQL coding conventions"
    appears so it becomes a hyperlink and optionally add a short parenthetical
    describing which conventions the link covers (naming, formatting, SQL style).
  • Around line 35-54: Add guidance to the "## Attribution" section to specify
    trailer placement for the Assisted-by tag: state that the Assisted-by:
    AGENT_NAME:MODEL_VERSION trailer must be placed at the end of the commit message
    body following a blank line (per Git trailer conventions) and include a short
    example showing a summary, blank line, detailed description, blank line, then
    Assisted-by: AGENT_NAME:MODEL_VERSION; update the text that currently defines
    the tag format (the Assisted-by examples) to include this placement guidance and
    the example commit message.

In @README_CN.md:

  • Around line 47-52: Reviewer suggests adding a Chinese translation of the AI
    assistant guidelines; create a new file named coding-assistants_CN.md containing
    a faithful Chinese translation of coding-assistants.md, then update README_CN.md
    to link to coding-assistants_CN.md (keep the existing English link if desired
    for fallback). Locate references in README_CN.md and ensure the new file mirrors
    sections, headings, and licensing/attribution language from coding-assistants.md
    and is encoded/formatted consistently.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `a900af86-c781-44a3-91d0-cec29224f991`

</details>

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

Reviewing files that changed from the base of the PR and between 37c23940aeb7e58d686d2b34964e11442dcdb569 and 681f8adfbde997c0d4ba55d43cd5ad42f296610b.

</details>

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

* `README.md`
* `README_CN.md`
* `coding-assistants.md`

</details>

</details>

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

Copy link
Copy Markdown
Collaborator

@bigplaice bigplaice left a comment

Choose a reason for hiding this comment

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

looks good to me.

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.

Add AI Coding Assistant Guidelines

3 participants