From 3ba00bbcf31395d4f3b691b09c11cba637d40300 Mon Sep 17 00:00:00 2001 From: omermac Date: Sun, 8 Feb 2026 20:57:53 -0800 Subject: [PATCH 1/3] feat(templates): add .cursor/rules/echo_rules.mdc to all echo-start templates New projects created with echo-start will now include Cursor IDE rules that provide context about Echo SDK usage, architecture patterns, environment variable conventions, and common mistakes to avoid. This helps AI-assisted coding tools give accurate suggestions when working in Echo projects. Fixes #636 --- .../assistant-ui/.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ templates/authjs/.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ .../echo-cli/.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ .../next-chat/.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ .../next-image/.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ .../.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ templates/next/.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ .../.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ .../react-chat/.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ .../react-image/.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ templates/react/.cursor/rules/echo_rules.mdc | 96 +++++++++++++++++++ 11 files changed, 1056 insertions(+) create mode 100644 templates/assistant-ui/.cursor/rules/echo_rules.mdc create mode 100644 templates/authjs/.cursor/rules/echo_rules.mdc create mode 100644 templates/echo-cli/.cursor/rules/echo_rules.mdc create mode 100644 templates/next-chat/.cursor/rules/echo_rules.mdc create mode 100644 templates/next-image/.cursor/rules/echo_rules.mdc create mode 100644 templates/next-video-template/.cursor/rules/echo_rules.mdc create mode 100644 templates/next/.cursor/rules/echo_rules.mdc create mode 100644 templates/nextjs-api-key-template/.cursor/rules/echo_rules.mdc create mode 100644 templates/react-chat/.cursor/rules/echo_rules.mdc create mode 100644 templates/react-image/.cursor/rules/echo_rules.mdc create mode 100644 templates/react/.cursor/rules/echo_rules.mdc diff --git a/templates/assistant-ui/.cursor/rules/echo_rules.mdc b/templates/assistant-ui/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/assistant-ui/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/authjs/.cursor/rules/echo_rules.mdc b/templates/authjs/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/authjs/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/echo-cli/.cursor/rules/echo_rules.mdc b/templates/echo-cli/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/echo-cli/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/next-chat/.cursor/rules/echo_rules.mdc b/templates/next-chat/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/next-chat/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/next-image/.cursor/rules/echo_rules.mdc b/templates/next-image/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/next-image/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/next-video-template/.cursor/rules/echo_rules.mdc b/templates/next-video-template/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/next-video-template/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/next/.cursor/rules/echo_rules.mdc b/templates/next/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/next/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/nextjs-api-key-template/.cursor/rules/echo_rules.mdc b/templates/nextjs-api-key-template/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/nextjs-api-key-template/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/react-chat/.cursor/rules/echo_rules.mdc b/templates/react-chat/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/react-chat/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/react-image/.cursor/rules/echo_rules.mdc b/templates/react-image/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/react-image/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. diff --git a/templates/react/.cursor/rules/echo_rules.mdc b/templates/react/.cursor/rules/echo_rules.mdc new file mode 100644 index 000000000..368804881 --- /dev/null +++ b/templates/react/.cursor/rules/echo_rules.mdc @@ -0,0 +1,96 @@ +--- +description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems +globs: +alwaysApply: true +--- + +# Echo Project Rules + +This project uses **Echo** by Merit Systems -- user-pays AI infrastructure that lets end users pay for their own AI usage while developers earn a markup. + +Documentation: https://echo.merit.systems/docs + +## Architecture Overview + +- Echo replaces direct AI SDK provider imports with Echo-wrapped providers that handle authentication, billing, and metering automatically. +- Users authenticate via OAuth through Echo, receive a balance, and pay per token/request. +- Developers set a markup percentage and earn revenue on every API call. + +## Echo Next.js SDK (`@merit-systems/echo-next-sdk`) + +### Initialization + +Echo is initialized in a single file (typically `src/echo/index.ts`) that exports all needed utilities: + +```typescript +import Echo from '@merit-systems/echo-next-sdk'; + +export const { handlers, isSignedIn, openai, anthropic } = Echo({ + appId: process.env.ECHO_APP_ID!, +}); +``` + +- `handlers` -- must be re-exported as `GET` and `POST` in the Echo API catch-all route (`src/app/api/echo/[...echo]/route.ts`). +- `isSignedIn` -- async function to check if a user is authenticated server-side. +- `openai`, `anthropic`, `google`, `groq`, `openrouter`, `xai` -- AI provider functions that work as drop-in replacements for their respective AI SDK providers. + +### API Route Setup + +The Echo catch-all route must exist at `src/app/api/echo/[...echo]/route.ts`: + +```typescript +import { handlers } from '@/echo'; +export const { GET, POST } = handlers; +``` + +Do not add custom logic to this route file. All OAuth and proxy handling is managed internally by Echo. + +### AI Provider Usage + +Echo providers are used identically to Vercel AI SDK providers: + +```typescript +import { openai } from '@/echo'; +import { generateText, streamText } from 'ai'; + +const result = await generateText({ + model: openai('gpt-4o'), + prompt: '...', +}); +``` + +- Always import providers from the local `@/echo` module, never directly from `@ai-sdk/openai` or similar packages. +- The Echo providers handle authentication token injection and request routing automatically. + +## Echo React SDK (`@merit-systems/echo-react-sdk`) + +For client-side React (Vite) applications: + +- Wrap the app in ``. +- Use `useEchoModelProviders()` hook to get AI provider instances on the client. +- Use ``, ``, `` components for auth and balance UI. +- Use `useEcho()` for auth state, `useEchoBalance()` for balance info, `useEchoUser()` for user info. + +## Environment Variables + +- **Next.js templates**: Use `ECHO_APP_ID` (server-side) and `NEXT_PUBLIC_ECHO_APP_ID` (client-side) in `.env.local`. +- **React/Vite templates**: Use `VITE_ECHO_APP_ID` in `.env.local`. +- Never hardcode or hallucinate App IDs. Always reference the environment variable. +- App IDs can be created at https://echo.merit.systems/new. + +## Coding Standards + +- Use **TypeScript** for all new code with strict mode enabled. +- Use **kebab-case** for filenames (`user-profile.tsx`, `api-client.ts`). +- Use **PascalCase** for components and types, **camelCase** for functions and variables. +- Prefer **absolute imports** with the `@/` alias over relative imports. +- Use **functional components** with hooks; avoid class components. +- Group imports: external packages, then internal packages, then local files. +- Follow the **Vercel AI SDK** patterns for AI interactions (`generateText`, `streamText`, `useChat`). + +## Common Mistakes to Avoid + +- Do not import AI providers directly from `@ai-sdk/openai`, `@ai-sdk/anthropic`, etc. Always use the Echo-wrapped providers from `@/echo` or via `useEchoModelProviders()`. +- Do not modify the Echo catch-all API route beyond re-exporting `handlers`. +- Do not store or expose Echo access tokens in client-side code for Next.js apps; token management is handled server-side by the SDK. +- Do not call `Echo()` more than once; initialize it in a single file and import from there. From 1741ec8d37e419159b5b81e6d6afd8c8a3976d16 Mon Sep 17 00:00:00 2001 From: buildingvibes Date: Sun, 8 Feb 2026 21:28:37 -0800 Subject: [PATCH 2/3] fix: set proper globs value in cursor rules frontmatter --- templates/assistant-ui/.cursor/rules/echo_rules.mdc | 1 - templates/authjs/.cursor/rules/echo_rules.mdc | 1 - templates/echo-cli/.cursor/rules/echo_rules.mdc | 1 - templates/next-chat/.cursor/rules/echo_rules.mdc | 1 - templates/next-image/.cursor/rules/echo_rules.mdc | 1 - templates/next-video-template/.cursor/rules/echo_rules.mdc | 1 - templates/next/.cursor/rules/echo_rules.mdc | 1 - templates/nextjs-api-key-template/.cursor/rules/echo_rules.mdc | 1 - templates/react-chat/.cursor/rules/echo_rules.mdc | 1 - templates/react-image/.cursor/rules/echo_rules.mdc | 1 - templates/react/.cursor/rules/echo_rules.mdc | 1 - 11 files changed, 11 deletions(-) diff --git a/templates/assistant-ui/.cursor/rules/echo_rules.mdc b/templates/assistant-ui/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/assistant-ui/.cursor/rules/echo_rules.mdc +++ b/templates/assistant-ui/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/authjs/.cursor/rules/echo_rules.mdc b/templates/authjs/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/authjs/.cursor/rules/echo_rules.mdc +++ b/templates/authjs/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/echo-cli/.cursor/rules/echo_rules.mdc b/templates/echo-cli/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/echo-cli/.cursor/rules/echo_rules.mdc +++ b/templates/echo-cli/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/next-chat/.cursor/rules/echo_rules.mdc b/templates/next-chat/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/next-chat/.cursor/rules/echo_rules.mdc +++ b/templates/next-chat/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/next-image/.cursor/rules/echo_rules.mdc b/templates/next-image/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/next-image/.cursor/rules/echo_rules.mdc +++ b/templates/next-image/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/next-video-template/.cursor/rules/echo_rules.mdc b/templates/next-video-template/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/next-video-template/.cursor/rules/echo_rules.mdc +++ b/templates/next-video-template/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/next/.cursor/rules/echo_rules.mdc b/templates/next/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/next/.cursor/rules/echo_rules.mdc +++ b/templates/next/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/nextjs-api-key-template/.cursor/rules/echo_rules.mdc b/templates/nextjs-api-key-template/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/nextjs-api-key-template/.cursor/rules/echo_rules.mdc +++ b/templates/nextjs-api-key-template/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/react-chat/.cursor/rules/echo_rules.mdc b/templates/react-chat/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/react-chat/.cursor/rules/echo_rules.mdc +++ b/templates/react-chat/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/react-image/.cursor/rules/echo_rules.mdc b/templates/react-image/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/react-image/.cursor/rules/echo_rules.mdc +++ b/templates/react-image/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- diff --git a/templates/react/.cursor/rules/echo_rules.mdc b/templates/react/.cursor/rules/echo_rules.mdc index 368804881..c3bfb9ea7 100644 --- a/templates/react/.cursor/rules/echo_rules.mdc +++ b/templates/react/.cursor/rules/echo_rules.mdc @@ -1,6 +1,5 @@ --- description: Rules for working with Echo, the user-pays AI infrastructure SDK by Merit Systems -globs: alwaysApply: true --- From 365bd495a8f159f01f190c989cf145acfa7326c8 Mon Sep 17 00:00:00 2001 From: buildingvibes Date: Sun, 8 Feb 2026 21:47:17 -0800 Subject: [PATCH 3/3] fix: remove malformed globs field from posthog-integration.mdc Remove the bare `globs:` frontmatter field that was missed in the previous fix across the 11 template files. This resolves the remaining Vercel build warning for packages/app/control/.cursor/rules/posthog-integration.mdc. --- packages/app/control/.cursor/rules/posthog-integration.mdc | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/app/control/.cursor/rules/posthog-integration.mdc b/packages/app/control/.cursor/rules/posthog-integration.mdc index f6cbda8f7..81ed9f197 100644 --- a/packages/app/control/.cursor/rules/posthog-integration.mdc +++ b/packages/app/control/.cursor/rules/posthog-integration.mdc @@ -1,6 +1,5 @@ --- description: apply when interacting with PostHog/analytics tasks -globs: alwaysApply: true ---