diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e798538 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,131 @@ +# AGENTS.md - Agent Coding Guidelines + +This document provides guidelines for agents working on this codebase. + +## Project Overview + +- **Framework**: Nuxt 3 (Vue 3) +- **Styling**: Tailwind CSS +- **State Management**: Pinia +- **UI Components**: Headless UI + Nuxt Icon +- **Image Handling**: @nuxt/image +- **TypeScript**: Enabled (tsconfig extends .nuxt/tsconfig.json) +- **Storybook**: Available for component documentation + +## Build Commands + +```bash +# Development +npm run dev # Start development server +npm run build # Build for production +npm run generate # Generate static site (SSG) +npm run preview # Preview production build + +# No test framework configured +``` + +## Code Style Guidelines + +### General Conventions + +- Use Vue 3 Composition API with ` + + +``` + +### Tailwind CSS + +- Use Tailwind utility classes for all styling +- Common classes used: `flex`, `grid`, `fixed`, `relative`, `z-*`, `p-*`, `m-*`, `text-*`, etc. + +### API Routes (Server) + +```typescript +// server/api/example.ts +export default defineEventHandler((event) => { + // Handle request and return data +}) +``` + +### Store Patterns (Pinia) + +```javascript +// stores/ExampleStore.js +import { defineStore } from "pinia" + +export const useExampleStore = defineStore("ExampleStore", { + state: () => ({ count: 0 }), + actions: { + increment() { + this.count++ + } + } +}) +``` + +### Error Handling + +- Use try/catch in API routes +- Return appropriate HTTP status codes +- Handle undefined/null values gracefully + +### Imports + +- Vue/composables: Use Nuxt auto-imports (no import needed) +- External modules: Explicit import +- Server-only: Place in `/server/` directory +- Path aliases: `@/` maps to project root + +### Additional Notes + +- Project uses Storybook (`.stories.ts` files) for component documentation +- Environment variables should use `.env` files (not committed) +- Image domains configured for `unboundedpress.org` in nuxt.config.ts diff --git a/components/Collapsible/Collapsible.vue b/components/Collapsible/Collapsible.vue index e74556d..a0761ba 100644 --- a/components/Collapsible/Collapsible.vue +++ b/components/Collapsible/Collapsible.vue @@ -75,7 +75,7 @@ const toggle = () => { diff --git a/components/Collapsible/CollapsibleGroup.vue b/components/Collapsible/CollapsibleGroup.vue index 0e71617..5951002 100644 --- a/components/Collapsible/CollapsibleGroup.vue +++ b/components/Collapsible/CollapsibleGroup.vue @@ -1,7 +1,6 @@