mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-02 14:23:19 +08:00
docs: refine AGENTS placement rules
This commit is contained in:
@@ -16,11 +16,15 @@
|
||||
- Unrelated refactors, bulk renames, repo-wide formatting, or unrelated file changes. / 与任务无关的重构、批量重命名、全仓格式化或其他无关改动。
|
||||
- Generated artifacts, temporary files, logs, binaries, local environment files, or secrets. / 提交生成物、临时文件、日志、二进制文件、本地环境文件或任何密钥等敏感信息。
|
||||
- Dependency churn, third-party/imported code changes, or weakened/removed tests unless the task explicitly requires them. / 除非任务明确要求,否则禁止随意变更依赖、修改第三方/导入代码,或弱化/删除测试。
|
||||
- Creating Markdown documents without explicit instructions. / 没有明确指令时,禁止随意新建 Markdown 文档。
|
||||
- Placing code in the wrong directory or creating new subdirectories under major directories without a clear requirement. / 禁止乱放代码,禁止在主要目录下无明确要求时新建子目录。
|
||||
- Editing a BSP `rtconfig.h` by hand; generate it from `.config` with `scons --menuconfig` or `scons --pyconfig-silent`. / 禁止手工修改 BSP 的 `rtconfig.h`;应通过 `scons --menuconfig` 或 `scons --pyconfig-silent` 基于 `.config` 生成。
|
||||
- History rewrites or overwriting others' work. / 改写历史或覆盖他人工作成果。
|
||||
|
||||
## Placement / 放置规则
|
||||
|
||||
- Use existing directories such as `bsp/`, `components/`, `documentation/`, `examples/`, `include/`, `libcpu/`, `src/`, and `tools/`. / 使用现有目录,如 `bsp/`、`components/`、`documentation/`、`examples/`、`include/`、`libcpu/`、`src/`、`tools/`。
|
||||
- BSP code only in `bsp/`; kernel code in `src/`; tests/examples in `examples/`; component code in `components/`; abstracted driver code in `components/drivers/`; chip or architecture shared porting code in `libcpu/`. / 板级支持包代码只放在 `bsp/`;内核代码放在 `src/`;测试/例程代码放在 `examples/`;组件代码放在 `components/`;抽象层驱动相关代码放在 `components/drivers/`;芯片或架构公共移植代码放在 `libcpu/`。
|
||||
- Keep repository-entry files such as `AGENTS.md`, `README.md`, and `LICENSE` in the root; put general documentation in `documentation/`. / `AGENTS.md`、`README.md`、`LICENSE` 等仓库入口文件放在根目录;通用文档放在 `documentation/`。
|
||||
|
||||
## Precedence / 优先级
|
||||
|
||||
Reference in New Issue
Block a user