Skip to content

Commit 0ec78dc

Browse files
committed
chore(copilot): add instructions
1 parent 6e6f1f6 commit 0ec78dc

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/copilot-instructions.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
# Copilot Instructions for AI Agents
3+
4+
## Project Overview
5+
- **Monorepo** for Vue 3 headless UI primitives and composables.
6+
- Main package: `@vuetify/v0` (unstyled, logic-focused components and composables in `packages/0/`)
7+
- **Playground** (`playground/`): Interactive testbed for components.
8+
- **Docs** (`apps/docs/`): Documentation site source.
9+
- **Storybook** (`apps/storybook/`): Component stories and visual tests.
10+
11+
## Architecture & Patterns
12+
- **Headless First**: Components provide logic and accessibility, not styles.
13+
- **Slot-Driven**: Components maximize flexibility via slots.
14+
- **CSS Variables**: All styling is via `--v0-*` custom properties.
15+
- **TypeScript Native**: All code is fully typed.
16+
- **Minimal Dependencies**: Only essential packages used.
17+
- **No global state**: All state is local or context-based.
18+
- **Composable logic**: Use composables for reusable logic (see `src/composables/`).
19+
- **Prop-driven**: Components are configured via props and CSS vars, not hardcoded logic.
20+
21+
## Developer Workflows
22+
- **Install**: `pnpm install`
23+
- **Dev playground**: `pnpm dev`
24+
- **Dev docs**: `pnpm dev:docs`
25+
- **Storybook**: `pnpm storybook`
26+
- **Build all**: `pnpm build`
27+
- **Build docs**: `pnpm build:docs`
28+
- **Test**: `pnpm test` or `pnpm test:ui`
29+
- **Coverage**: `pnpm coverage`
30+
- **Lint**: `pnpm lint`
31+
- **Type check**: `pnpm type-check`
32+
33+
## Project Conventions
34+
- **Component files**: One component per file, named in PascalCase.
35+
- **Composables**: Named `useX` and live in `composables/`.
36+
- **No direct DOM manipulation**: Use Vue refs and composables.
37+
- **All styling via CSS variables**: Never hardcode colors, spacing, etc.
38+
- **Tests**: Use Vitest, colocated in `__tests__` or `*.spec.ts` files.
39+
- **Docs**: Written in Markdown in `apps/docs/pages/`.
40+
41+
## Integration Points
42+
- **Theme system**: Use `createThemePlugin` and `useTheme` for theming.
43+
- **Context**: Use `createContext`/`useContext` for dependency injection.
44+
- **Playground**: For rapid prototyping, add examples to `playground/src/`.
45+
- **Storybook**: Add stories in `apps/storybook/stories/`.
46+
47+
## Key Files & Directories
48+
- `packages/0/`: Core source code
49+
- `playground/`: Interactive testbed
50+
- `apps/docs/`: Documentation site
51+
- `apps/storybook/`: Storybook stories
52+
- `pnpm-workspace.yaml`: Monorepo package management
53+
- `vitest.config.ts`: Test runner config
54+
- `uno.config.ts`: UnoCSS config (utility-first CSS)
55+
56+
## Examples
57+
- See `README.md` and package README for usage patterns and code samples.
58+
- Example theme setup and component usage in root `README.md`.
59+
60+
---
61+
For new patterns, follow the headless, composable, and CSS variable-driven approach. When in doubt, check existing components and composables for style and structure.

0 commit comments

Comments
 (0)