From 50a41a39a6bf075d1a61a6cc480442ef4b8e0766 Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 30 Jun 2025 19:49:18 +0800 Subject: [PATCH] chore: tweak instructions --- .github/copilot-instructions.md | 44 ++++++++++++++++++++++++++++++++ .github/prompts/claude.prompt.md | 5 ---- 2 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 .github/copilot-instructions.md delete mode 100644 .github/prompts/claude.prompt.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000..10fed5606 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,44 @@ +# Memos Project - AI Assistant Instructions + +## Frontend Refactoring Goal + +**PRIORITY**: Replace all MUI Joy UI (@mui/joy) and @usememos/mui components with shadcn/ui + Tailwind CSS v4 + +## Key Rules + +1. **Replace all MUI components** with shadcn/ui + Tailwind v4 +2. **Never modify generated shadcn/ui files** from `pnpm dlx shadcn@latest add` +3. **Use https://tweakcn.com/ for custom variants** when standard components need customization + +## Setup Commands + +```bash +# Initialize shadcn/ui +pnpm dlx shadcn@latest init + +# Add components +pnpm dlx shadcn@latest add [component] +``` + +## Migration Pattern + +```typescript +// OLD +import { Button, Card, Input } from "@mui/joy"; + +// NEW +import { Button } from "@/components/ui/button"; +import { Card } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +``` + +## When Suggesting Changes + +- Include `pnpm dlx shadcn@latest add [component]` commands +- Use Tailwind classes for styling +- Mention https://tweakcn.com/ for custom variants +- Preserve TypeScript types and accessibility + +## Target Files + +Files containing `@mui/joy` or `@usememos/mui` imports diff --git a/.github/prompts/claude.prompt.md b/.github/prompts/claude.prompt.md deleted file mode 100644 index 341f911c3..000000000 --- a/.github/prompts/claude.prompt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -mode: agent ---- - -Please follow `./CLAUDE.md` for the basic structure and development guidelines of the Memos project.