giselle / rules
Cursor rule556 starsChanged 12 months agoApache-2.0View on GitHub
Update ai-sdk(ai, @ai/*) to latest
- Installs packages
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,531 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/design-mode.mdcCursor rule
- .cursor/rules/development-guide.mdcCursor rule
- .cursor/rules/edit-workspace-tour.mdcCursor rule
- .cursor/rules/language-support.mdcCursor rule
- .cursor/rules/naming-guide.mdcCursor rule
- .cursor/rules/nodejs.mdcCursor rule
- .cursor/rules/vercel-cli.mdcCursor rule
- add-modelSkill
The file
We split this update-ai-sdk.mdc into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Check which AI SDK packages need to be updated:
- Very specific: line 25
Look for entries with ai and @ai-sdk/* in the results.
- Very specific: line 31
Update the catalog entries in pnpm-workspace.yaml:
- Distinctive: line 45
Run the installation command to update all packages:
- Distinctive: line 54
After fixing type issues, build the SDK:
- Distinctive: line 60
When you see these errors, record them and seek guidance on how to address each specific case.
- Distinctive: line 64
Run the type checking command to ensure there are no remaining type errors:
- Distinctive: line 74
Run the application and request user to make sure everything works as expected:
- Distinctive: line 82
If you encounter peer dependency warnings, they may be safely ignored if the application works correctly.
- Distinctive: line 85
Update code to accommodate breaking changes in the new SDK versions
- Very specific: line 86
Add explicit dependency resolutions in package.json
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: Update ai-sdk(ai, @ai/*) to latest
globs:
alwaysApply: false
---
# Updating AI SDK in Giselle
This document provides a step-by-step guide for updating the AI SDK packages in this project.
## What is AI SDK
The AI SDK is a TypeScript toolkit for building AI-powered applications using frameworks like Next.js, React, Svelte, Vue and Node.js runtimes. It provides a unified interface for working with different AI providers.
Package namespaces include `ai` and `@ai-sdk/{provider}` (such as `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc.).
## Step 1: Check current AI SDK versions
Check which AI SDK packages need to be updated:
```sh
pnpm outdated -r --json
```
Look for entries with `ai` and `@ai-sdk/*` in the results.
## Step 2: Update catalog entries
This project uses pnpm's "Catalogs" feature to define dependency version ranges as reusable constants. These constants can be referenced in package.json files.
Update the catalog entries in `pnpm-workspace.yaml`:
```yaml
catalog:
"ai": 4.2.9 # Update to latest version
"@ai-sdk/openai": 1.3.6 # Update to latest version
"@ai-sdk/anthropic": 1.2.4 # Update to latest version
"@ai-sdk/google": 1.2.5 # Update to latest version
"@ai-sdk/react": 1.2.5 # Update to latest version
"@ai-sdk/fal": 0.1.1 # Update if needed
```
## Step 3: Install updated packages
Run the installation command to update all packages:
```sh
pnpm i
```
## Step 4: Build the SDK
After fixing type issues, build the SDK:
```sh
pnpm build-sdk
```
When you see these errors, record them and seek guidance on how to address each specific case.
## Step 5: Verify types
Run the type checking command to ensure there are no remaining type errors:
```sh
pnpm check-types
```
When you see these errors, record them and seek guidance on how to address each specific case.
## Step 6: Test the application
Run the application and request user to make sure everything works as expected:
```sh
pnpm dev
```
## Troubleshooting
If you encounter peer dependency warnings, they may be safely ignored if the application works correctly. However, if you encounter runtime errors, you may need to:
1. Revert to earlier versions of specific packages
2. Update code to accommodate breaking changes in the new SDK versions
3. Add explicit dependency resolutions in package.json
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

