docs: add project guidelines and commit conventions

- Add AGENTS.md with tech stack, project structure, and code styles
- Add dev/docs/dashboard.md with frontend-specific guidelines
- Include conventional commit types with examples

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-09-21 16:05:39 +00:00
parent bc1f655aab
commit 6323a3f41c
2 changed files with 46 additions and 0 deletions

27
AGENTS.md Normal file
View File

@@ -0,0 +1,27 @@
# Project tech stack
frontend: react, shadcn, tailwindcss
backend: convex
# Project structure
This project uses npm workspaces.
- `packages/convex` - convex functions and models
- `packages/web` - frontend dashboard
- `packages/path` - path utils
# General Guidelines
- For frontend dashboard guidelines, refer to dev/docs/dashboard.md
- Always use bun for package management and running npm scripts.
- When commiting, follow conventional commits: `[type]: msg` and clarify in commit body if necessary. keep your commit header to <= 50 characters.
- `feat:` for new features
- `fix:` for bug fixes
- `docs:` for documentation
- `refactor:` for code restructuring
- `style:` for formatting changes
- `test:` for adding tests
- `ci:` for CI/CD pipeline changes
- `build:` for build system or dependency changes
# Code styles
- file names should always be kebab-case except in convex code, in which case try to use single word file names.

19
dev/docs/dashboard.md Normal file
View File

@@ -0,0 +1,19 @@
# Context
- tech stack: react, tailwindcss, shadcn, tanstack router, tanstack table, jotai
- `@/` maps to `src/`
# Key files
- `src/components`: reusable React components
- `src/lib`: reusable util code
- `src/routes`: tanstack file routes
# Guidelines
- ALWAYS use absolute import using `@/`, unless the file is in the same directory.
- ALWAYS use kebab-case for file names
- when importing useQuery/useMutation from convex/react, alias them with useConvexQuery/useConvexMutation
- Do not attempt to create a preview server. There is one running already at port 3001.
- After create a new file route, run `bunx tsr generate`
- No testing is in place right now, so skip that for now.