From 805fded258bde23f39c6d9caa3af2130d0fb5753 Mon Sep 17 00:00:00 2001 From: andig Date: Wed, 27 May 2026 09:54:08 +0200 Subject: [PATCH] chore: writing/comment style and posting-on-behalf rules (#30252) --- AGENTS.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index ea5e80d5d..831e0adfd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -83,6 +83,20 @@ Deep documentation on specific subsystems is available in `docs/agents/`. Load w - **tests/** contains Playwright integration tests and test configuration files - **dist/** contains built frontend assets (generated) +## Writing Style + +- No em dashes (—) in comments, commit messages, or docs. Use periods, commas, or colons +- Project name is `evcc`, always lowercase +- Acronyms uppercase in prose: OCPP, MQTT, HEMS, SoC +- Commit subjects: `Component: short description`, no trailing period. Sub-scope in parens: `Meter (Home Assistant): ...`. Use `chore:`/`fix:`/`docs:` only for non-feature changes + +## Comment Style + +- Prefer self-documenting code over comments; comment the *why*, not the *what* +- Default to no comment. Only add one for a non-obvious constraint, invariant, workaround, or surprising behavior. Keep it to one line, two if necessary +- Skip refs to the current task, PR, issue, or caller ("added for X flow", "see #1234"). Git history covers that +- Exception: Go exported identifiers follow godoc convention. Short `// FuncName does X` summary starting with the identifier name + ## Go Coding Standards ### Core Principles @@ -269,7 +283,6 @@ Deep documentation on specific subsystems is available in `docs/agents/`. Load w - Handle concurrent operations safely with Go's concurrency primitives - Implement proper caching strategies and connection pooling - Avoid blocking operations in main application loop -- Include appropriate comments for complex business logic ## Pull Request Descriptions