diff --git a/content/tags-ai.md b/content/tags-ai.md new file mode 100644 index 0000000..1638a62 --- /dev/null +++ b/content/tags-ai.md @@ -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() { + // ... +} +``` +:::