agentleFS
giselles-aigiselles-ai/giselle/.cursor/rules/update-ai-sdk.mdc

giselle / rules

Cursor rule556 starsChanged 12 months agoApache-2.0View on GitHub

Update ai-sdk(ai, @ai/*) to latest

  • Installs packages

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
  1. Distinctive:

    Check which AI SDK packages need to be updated:

    line 19
  2. Very specific:

    Look for entries with ai and @ai-sdk/* in the results.

    line 25
  3. Very specific:

    Update the catalog entries in pnpm-workspace.yaml:

    line 31
  4. Distinctive:

    Run the installation command to update all packages:

    line 45
  5. Distinctive:

    After fixing type issues, build the SDK:

    line 54
  6. Distinctive:

    When you see these errors, record them and seek guidance on how to address each specific case.

    line 60
  7. Distinctive:

    Run the type checking command to ensure there are no remaining type errors:

    line 64
  8. Distinctive:

    Run the application and request user to make sure everything works as expected:

    line 74
  9. Distinctive:

    If you encounter peer dependency warnings, they may be safely ignored if the application works correctly.

    line 82
  10. Distinctive:

    Update code to accommodate breaking changes in the new SDK versions

    line 85
  11. Very specific:

    Add explicit dependency resolutions in package.json

    line 86

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
update-ai-sdk.mdc
---
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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.