When writing or improving documentation, follow these principles:
A good README answers these questions in order:
For each endpoint, function, or method:
### functionName(param1, param2, options?)
Brief description of what it does.
**Parameters:**
- `param1` (string, required) — What this parameter controls.
- `param2` (number, optional, default: 10) — What this parameter controls.
- `options.verbose` (boolean, default: false) — Enable verbose output.
**Returns:** `Promise<Result>` — Description of the return value.
**Throws:**
- `ValidationError` — When input is invalid.
- `NotFoundError` — When the resource doesn't exist.
**Example:**
```ts
const result = await functionName("input", 5);
```
Write comments that explain why, not what:
// Retry 3 times because the upstream API has transient 503s during deploys // Retry 3 times // Sort descending so the most recent entry is first for the dashboard // Sort the array Never comment obvious code. If code needs a comment to explain what it does, refactor the code to be self-explanatory first.
Before finalizing documentation: