docs(skill): update router packaging and categorization guidelines in documentation

- Updated `new-api` skill `SKILL.md` to document the centralized v1.go route registration and domain-driven sub-routing patterns
- Updated `AGENTS.md` instructions with the new router subpackages (`root`, `v1`) and route file layout guidelines
This commit is contained in:
ryan
2026-06-15 23:44:03 +08:00
parent 0adc5e8189
commit e50e600bc8
6 changed files with 158 additions and 204 deletions
+4 -7
View File
@@ -10,15 +10,12 @@ import (
// RegisterV1Routes registers all routes under API V1.
func RegisterV1Routes(apiV1Router *gin.RouterGroup, apiGroup *gin.RouterGroup) {
// 1. Public (captcha, health, config)
RegisterPublicRoutes(apiV1Router, apiGroup)
// 1. User & Public routes (OAuth, User, Upload, CAPTCHA, Health, Config)
RegisterUserRoutes(apiV1Router, apiGroup)
// 2. OAuth, User, Upload
RegisterUserRoutes(apiV1Router)
// 3. Admin
// 2. Admin routes
RegisterAdminRoutes(apiV1Router)
// 4. Register custom business routes
// 3. Register custom business routes
RegisterCustomRoutes(apiV1Router)
}