Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions content/tags-ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
tag: ai
tags: blockTags
description: Document notes left by AI tools.
---

## Syntax

`@ai text of the note.`


## Overview

The @ai tag documents a note left by an AI tool, such as a record of a change the tool made or the
reasoning behind a decision. Without a dedicated place for these notes, AI tools tend to leave them
as inline comments throughout your code, which makes the surrounding code harder to read.

You can use the @ai tag more than once in a single JSDoc comment, so that notes from several tools,
or from several sessions, accumulate instead of overwriting each other.


## Examples

::: example "Using the @ai tag"

```js
/**
* Fetches all users from the API.
*
* @ai Refactored to use async/await.
* @ai Added a null guard for the user ID.
*/
function getUsers() {
// ...
}
```
:::