refactor(structure): move layered firmware modules from main to components
This commit is contained in:
12
AGENTS.md
12
AGENTS.md
@@ -1,12 +1,12 @@
|
||||
# Repository Guidelines
|
||||
|
||||
## Project Structure & Layering
|
||||
- `main/platform/{include,internal,src}`: hardware/system abstraction only.
|
||||
- `main/domain/{include,internal,src}`: business-domain services.
|
||||
- `main/control_plane/{include,internal,src}`: lifecycle, policy, health, retry/backoff orchestration.
|
||||
- `main/app_composition/{include,internal,src}`: composition boundary; `app_main` only wires modules.
|
||||
- `components/platform/{include,internal,src}`: hardware/system abstraction only.
|
||||
- `components/domain/{include,internal,src}`: business-domain services.
|
||||
- `components/control_plane/{include,internal,src}`: lifecycle, policy, health, retry/backoff orchestration.
|
||||
- `components/app_composition/{include,internal,src}`: composition boundary; `app_main` only wires modules.
|
||||
- `main/dependency_whitelist.md`: approved exceptions for unavoidable lateral dependencies.
|
||||
- `main/third_party/`, `main/domain/assets/fonts/`, `tools/`: vendored code, embedded assets, utility scripts.
|
||||
- `main/third_party/`, `components/domain/assets/fonts/`, `tools/`: vendored code, embedded assets, utility scripts.
|
||||
- `build/`: generated artifacts only (ignored).
|
||||
|
||||
## Mandatory Architecture Constraints
|
||||
@@ -31,7 +31,7 @@ source $IDF_PATH/export.sh
|
||||
- `idf.py fullclean && idf.py build`: clear stale artifacts.
|
||||
|
||||
## Coding Style & Naming Conventions
|
||||
- Use 4-space indentation and keep braces/function style consistent with existing `main/*.c`.
|
||||
- Use 4-space indentation and keep braces/function style consistent with existing `components/*/*.c`.
|
||||
- Prefer `lower_snake_case` for functions and variables; use module-prefixed public APIs.
|
||||
- Use `UPPER_SNAKE_CASE` for macros/constants (`CMD_SEND_DATA`, `WIFI_CONNECTED_BIT`).
|
||||
- Prefix file-local statics with `s_` (for example `s_server`, `s_jobs`) and keep per-file `TAG` logging constants.
|
||||
|
||||
Reference in New Issue
Block a user