Names and functions Required
Name things for what they mean
Every name says why the thing exists, what it does and how it is used. A reader should never need a comment to learn what a name means.
How to do it
Name values for what they hold, such as unpaidInvoices, not data or list2. Name functions for what they do or return, such as sendReceipt or isOverdue. Name booleans as questions, such as hasStock.
Example
// Bad
const d = getData(u);
// Good
const unpaidInvoices = findUnpaidInvoices(customer);
How to check
A linter bans vague names, for example ESLint id-denylist with data, info, tmp, obj and foo. A reviewer can guess each name's meaning without reading its code.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers architecture playbook: https://agentwranglers.se/playbook/architecture/names-and-functions/intention-revealing-names.