<!--
title: Use self-documenting names
domain: ai-agents
topic: Naming Conventions
language: TSX
source: block/goose
updated: 2025-08-13
url: https://awesomereviewers.com/reviewers/goose-use-self-documenting-names/
-->

Choose variable, function, and constant names that clearly express their purpose and eliminate the need for explanatory comments. Break down complex expressions into well-named intermediate variables rather than relying on comments to explain the logic.

For example, instead of:
```typescript
// Use explicit hasEnvVars if provided, otherwise fall back to checking step3Content
const hasConfiguration = hasEnvVars !== undefined ? hasEnvVars : step3Content !== null;
```

Use descriptive intermediate variables:
```typescript
const hasConfigurationContent = step3Content !== null;
const shouldShowConfigurationSteps = hasEnvVars ?? hasConfigurationContent;
```

This principle also applies to extracting repeated string literals into named constants. Instead of using 'New Chat' multiple times throughout the code, define a constant like `DEFAULT_CHAT_TITLE = 'New Chat'` to make the intent clear and improve maintainability.
