Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.72 KB

File metadata and controls

41 lines (30 loc) · 1.72 KB

AGENTS.md

Rules for all AI agents working on rt-claw. Read CLAUDE.md first for build, style, and commit conventions.

Core Rules

  1. OSAL boundary: code in src/ must only include claw_os.h — never include FreeRTOS or RT-Thread headers directly.
  2. Minimal change: modify only what is necessary. Do not refactor, add comments, or "improve" unrelated code.
  3. No backward compatibility: prefer breaking changes over shims. Remove dead code, do not deprecate.
  4. Build before commit: ensure the change compiles on at least one platform.
  5. Run checks: scripts/check-patch.sh --staged must pass before committing.

File Organization

  • Platform-independent logic goes in src/.
  • RTOS-specific code goes in osal/<rtos>/.
  • Platform BSP code goes in platform/<board>/.
  • New services go in src/services/<name>/.
  • Never put application logic in platform/ or osal/.

Code Constraints

  • C99 only. No C++ in core code.
  • No dynamic memory allocation in OSAL layer — use static buffers or pool from claw_config.h.
  • Config macros follow CLAW_<SUBSYSTEM>_<PARAM> naming in src/claw_config.h.
  • Every new .c/.h file needs the MIT SPDX license header.

Commit Rules

  • Format: subsystem: description — see CLAUDE.md for prefix list.
  • Every commit must have Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>.
  • Do not add any AI/Claude co-author lines.
  • One logical change per commit.

Do NOT

  • Add unit test frameworks, CI/CD pipelines, or automation without explicit request.
  • Modify files under vendor/ — these are git submodules.
  • Use // comments in C code.
  • Create .md documentation files unless explicitly asked.
  • Guess or fabricate API behavior — read the source first.