Enhance CLAUDE guidelines and agent linkage (#1464)

Detail Go formatting and race-safe test expectations for backend work.

List frontend linting commands so CLAUDE matches current workflows.

Link AGENTS.md to CLAUDE.md so other agents reuse the strengthened guide.
This commit is contained in:
Peter Dave Hello
2025-12-06 17:08:35 +08:00
committed by GitHub
parent 79344395f5
commit 2093509b46
2 changed files with 7 additions and 2 deletions
Symlink
+1
View File
@@ -0,0 +1 @@
CLAUDE.md
+6 -2
View File
@@ -23,10 +23,12 @@ This project is a web-based NGINX management interface built with Go backend and
### Development Guidelines
- Write concise, maintainable Go code with clear examples
- Run `gofmt`/`goimports` before committing backend changes
- Use Gen to streamline database queries and reduce boilerplate
- Follow Cosy Error Handler best practices for error management
- Implement standardized CRUD operations using Cosy framework
- Apply efficient database pagination for large datasets
- Validate changes with `go test ./... -race -cover` before pushing
- Keep files modular and well-organized by functionality
- **All comments and documentation must be in English**
@@ -70,10 +72,12 @@ This project is a web-based NGINX management interface built with Go backend and
### Code Quality
- **Always use ESLint MCP after generating frontend code** to ensure code quality and consistency
- Run `pnpm lint`, `pnpm lint:fix`, and `pnpm typecheck` to keep style and typings aligned
## Development Commands
- **Frontend**: `pnpm run dev`, `pnpm typecheck`, `pnpm run build`
- **Backend**: Standard Go commands (`go run`, `go build`, `go test`)
- **Frontend**: `pnpm run dev`, `pnpm lint`, `pnpm typecheck`, `pnpm run build`
- **Backend**: `go generate ./...`, `go build ./...`, run `go test ./... -race -cover`; for release artifacts reuse the README command with `-tags=jsoniter -ldflags "$LD_FLAGS ..."`.
- **Demo stack**: `docker-compose -f docker-compose-demo.yml up` to bootstrap the sample environment
## Language Requirements
- **All code comments, documentation, and communication must be in English**