Skip to content

feat(docs): Add AGENTS.md for project guidelines and development instructions#37

Merged
qzhhhi merged 1 commit intomainfrom
dev/agent-md
Mar 22, 2026
Merged

feat(docs): Add AGENTS.md for project guidelines and development instructions#37
qzhhhi merged 1 commit intomainfrom
dev/agent-md

Conversation

@qzhhhi
Copy link
Member

@qzhhhi qzhhhi commented Mar 22, 2026

概述

新增仓库指南文档 AGENTS.md,为开发者提供项目组织、构建流程、代码风格和提交规范的详细说明。

核心变更

新增文件:AGENTS.md

  • 中文项目指南文档,包含以下主要内容:

项目结构

  • 明确了 core/(共享协议和工具)、host/(桌面SDK)、firmware/rmcs_board/(HPM板卡固件)、firmware/c_board/(STM32固件)等模块的职责
  • 说明了 bsp/ 为第三方子模块依赖,.scripts/ 包含 CI 对齐的工具脚本

开发命令

  • 提供了 host、rmcs_board、c_board 的 CMake 构建预设命令
  • 文档了代码检查工具使用方式(clang-format-check --fixclang-tidy-check
  • 注明 clang-tidy 自动修复可能不完美,需手动调整

代码规范

  • 语言标准:C11 + C++23,禁用 GNU 扩展
  • 格式要求:4空格缩进、100列宽度限制、指针左对齐、启用include排序
  • 命名规范:Google 风格但函数采用小写下划线
  • 代码禁止非 ASCII 字符(Markdown 文档除外)

质量与提交规范

  • CI 质量门禁:clang-format、clang-tidy 和编译验证
  • Git 工作流:必须使用 unstaged changes 供审查,Agent 禁止执行 git add
  • Commit Message:全英文、ASCII 字符限制、遵循 Conventional Commits 格式、破坏性变更使用 ! 标记、冒号后首字母大写

新增/修改文件

  • AGENTS.md(+46 行)
  • CLAUDE.md 更新(+1 行,添加了对 AGENTS.md 的记录)

代码审查难度

低(纯文档新增)

@coderabbitai
Copy link

coderabbitai bot commented Mar 22, 2026

走访总览

本PR添加了项目指导文档AGENTS.md,包含目录组织结构、构建与测试命令、代码风格规则、lint工作流程以及提交流程规范。同时更新了CLAUDE.md文件以引用新增文档。

变更内容

内聚组 / 文件 总结
项目指导文档
AGENTS.md
新增中文指导文档,涵盖项目目录组织、CMake构建预设、代码风格规范(C11/C++23、4空格缩进、100列限制)、命名约定、lint工作流程、测试与CI流程、以及Conventional Commits提交规则。
文档索引
CLAUDE.md
添加AGENTS.md文件引用。

代码审查工作量估计

🎯 1 (Trivial) | ⏱️ ~3 分钟

兔兔之诗

🐰 新文档降临,规范已明晰,
目录如梳理,构建步步细。
风格与提交,代码更整洁,
诸位开发者,欢呼来相聚!🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了本次变更的主要内容——添加AGENTS.md文档,用于项目指南和开发说明。
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev/agent-md

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.

Tip

CodeRabbit can use Clang for C/C++ static analysis and code quality checks.

Clang provides comprehensive static analysis for C and C++ code, including syntax checking, type checking, and various warning diagnostics.

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.

🧹 Nitpick comments (2)
CLAUDE.md (1)

1-1: 建议改为明确的 Markdown 链接。

当前是裸文件名,建议改为可点击链接并补一句用途说明,减少读者歧义(例如“详细规范见 AGENTS.md”)。

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

In `@CLAUDE.md` at line 1, 在 CLAUDE.md 中把裸文件名 "AGENTS.md" 替换为明确的 Markdown
链接并补充用途说明:查找文本 AGENTS.md(在 CLAUDE.md 中出现的位置,例如链接列表或参考处),将其改为可点击的 Markdown
链接形式并在同一段或下一句添加一句短说明(例如“详细规范见 AGENTS.md,用于说明 Agent 行为与接口规范”),以减少歧义并让读者知道该文件的用途。
AGENTS.md (1)

42-42: 请澄清“严禁执行 git add”的适用范围。

这句放在“提交指南”里容易被理解为对所有贡献者生效,建议明确为“仅针对自动化 Agent 的评审流程约束”,避免与常规开发提交流程产生歧义。

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

In `@AGENTS.md` at line 42, Update the ambiguous guideline sentence "Git unstaged
changes 是必要的 code review 渠道。Agent 严禁执行 git add。" in AGENTS.md to explicitly
scope the prohibition to automation agents only—e.g., change to wording like
"仅针对自动化 Agent(自动运行的脚本或机器人)的评审流程约束:严禁执行 git add。"—so contributors understand
normal human workflows are unaffected; locate and replace the exact sentence in
AGENTS.md and ensure surrounding "提交指南" text references "自动化 Agent" rather than
all contributors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@AGENTS.md`:
- Line 42: Update the ambiguous guideline sentence "Git unstaged changes 是必要的
code review 渠道。Agent 严禁执行 git add。" in AGENTS.md to explicitly scope the
prohibition to automation agents only—e.g., change to wording like "仅针对自动化
Agent(自动运行的脚本或机器人)的评审流程约束:严禁执行 git add。"—so contributors understand normal human
workflows are unaffected; locate and replace the exact sentence in AGENTS.md and
ensure surrounding "提交指南" text references "自动化 Agent" rather than all
contributors.

In `@CLAUDE.md`:
- Line 1: 在 CLAUDE.md 中把裸文件名 "AGENTS.md" 替换为明确的 Markdown 链接并补充用途说明:查找文本
AGENTS.md(在 CLAUDE.md 中出现的位置,例如链接列表或参考处),将其改为可点击的 Markdown
链接形式并在同一段或下一句添加一句短说明(例如“详细规范见 AGENTS.md,用于说明 Agent 行为与接口规范”),以减少歧义并让读者知道该文件的用途。

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ae0c21da-2903-42cb-a403-57e02b7e205b

📥 Commits

Reviewing files that changed from the base of the PR and between 0707f99 and 81e59ad.

📒 Files selected for processing (2)
  • AGENTS.md
  • CLAUDE.md

@qzhhhi qzhhhi merged commit 0a7abcc into main Mar 22, 2026
5 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in RMCS Slave SDK Mar 22, 2026
@qzhhhi qzhhhi deleted the dev/agent-md branch March 22, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant