diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..eab94a2 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,122 @@ +# AGENTS.md + +Guidelines for AI agents working in this SeaTime (航海时代) codebase. + +## Project Structure + +Full-stack web game with two components: +- **Web/**: Nuxt 4 (Vue 3 + TypeScript) frontend +- **Service/**: .NET 10 Web API backend using Photon.Core framework + +## Build Commands + +### Web (Frontend) + +```bash +cd Web +npm install # Install dependencies +npm run dev # Start dev server on port 5068 +npm run build # Production build +npm run generate # Static site generation +npm run preview # Preview production build +npm run postinstall # Nuxt prepare (runs automatically after install) +``` + +### Service (Backend) + +```bash +cd Service +dotnet build # Build solution +dotnet run --project Application.Web # Run web API +dotnet watch --project Application.Web # Run with hot reload +``` + +## Testing Commands + +**No test framework configured yet.** To add tests: + +- **Web**: Install Vitest or Jest for unit tests +- **Service**: Use `dotnet test` after adding xUnit/NUnit test projects + +When tests are added, run them with: +```bash +# Web (Vitest example) +npm run test # Run all tests +npm run test:unit # Run unit tests only +npm run test -- # Run single test file + +# Service +dotnet test # Run all tests +dotnet test --filter "FullyQualifiedName~ClassName" # Run specific test class +``` + +## Code Style Guidelines + +### TypeScript / Vue (Web) + +- **Imports**: Use `~/` alias for src directory imports (e.g., `import type { IUserInfo } from '~/types/user'`) +- **Vue SFCs**: Use `