AGENTS.md 289
Turborepo モノレポ
Turborepoモノレポ管理ルール。パッケージ依存関係、共有設定、CI/CDパイプライン。
AGENTS.md 37 lines
# AGENTS.md
## Monorepo Structure
```
apps/
web/ - Next.js frontend
api/ - Express API server
docs/ - Documentation site
packages/
ui/ - Shared React components
config/ - Shared ESLint, TypeScript, Tailwind configs
database/ - Prisma schema and client
utils/ - Shared utility functions
```
## Rules
- NEVER import from apps/ into packages/
- All shared code goes in packages/
- Use workspace protocol for internal deps: "@repo/ui": "workspace:*"
- Changes to packages/ must not break any app
## Development
- turbo dev starts all apps in parallel
- turbo build respects dependency graph
- turbo test runs tests with proper caching
- Always run turbo build before pushing
## Adding Packages
1. Create directory in packages/
2. Add package.json with @repo/ scope
3. Add to turbo.json pipeline if needed
4. Export from package index.ts
## CI/CD
- PRs run turbo build --filter=...[HEAD~1]
- Only affected packages are tested
- Deploy apps independently via separate workflows