with one click
semantic-code-comments
Explain why in comments, do not restate the code
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Explain why in comments, do not restate the code
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
When writing or reviewing BSL, apply 1C standards
При написании или ревью BSL применять стандарты 1С
Orchestrator: routing work and agent phases
Оркестратор: маршрутизация работы и фаз агентов
BSL LSP navigation: definitions, refs, call graph
Rules for using RLM tools for project search and navigation in 1C/BSL
| name | semantic-code-comments |
| description | Explain why in comments, do not restate the code |
| alwaysApply | true |
A good comment explains why, not what. Names, structure, and expressions already show what the code does; a comment is needed for business meaning, constraints, tradeoffs, and hidden invariants.
Code is written once, but read many times. If a future reader asks “why is it like this?”, “what will break if we remove it?”, “what business rule is being protected here?” - a semantic comment is needed.
| Comment (why) | DO NOT comment (what) |
|---|---|
| Non-obvious business rules | Code restatement (// adding A and B) |
| Protection against external failures and edge cases | Obvious operations (// incrementing the counter) |
| Workaround and tradeoffs | |
| Hidden invariants and call order | |
| Reasons for rejecting the obvious solution | |
| Magic numbers and constants |
A comment that contradicts the code is unacceptable: an outdated comment is worse than none - it creates false confidence. When changing code, check nearby comments.
Good:
// Скидку применяем только после подтверждения лимита, потому что договор
// может запрещать ретроспективное изменение цены.
Если ЛимитПодтвержден И ДоговорРазрешаетИзменениеЦены Тогда
Bad:
// Плохо: складываем A и B.
Сумма = A + B;
| Good | Bad |
|---|---|
| "We do not use X because Y" | "X is here" |
| "Protection against an empty response from an external service" | "Checking the value" |
| "If removed, the period invariant will break" | "Do not touch" |
| "First we populate the cache because the next request reads from it" | "Populating the cache" |
agent-code-marking shows who changed the code and when; semantic-code-comments explains why the code is structured this way. Markers provide auditability, comments provide meaning.
depends_on: