Two-tier documentation system - Read BOTH types:
- Read folder-level docs (detailed architecture)
- Read function-level docs (concise: 1-3 sentences)
Examples:
-
Modifying
internal/api/router.go?- Read
docs/internal/api-docs.md(folder-level: detailed) - Read
docs/internal/api/router.md(function-level: concise)
- Read
-
Adding
internal/api/handlers/user.go?- Read
docs/internal/api-docs.md+docs/internal/api/handlers-docs.md(folder-level) - Read existing handler docs in
docs/internal/api/handlers/(function-level)
- Read
Run this ONE command (all must pass):
go build ./... && go test ./... && go test -race ./... && golangci-lint run ./...If ANY command fails: FIX BEFORE PROCEEDING. NO EXCEPTIONS.
- All commands above passed? β
- Updated function-level docs in
docs/**/*.md? (concise: 1-3 sentences) β - Updated folder-level docs if architecture changed? (detailed) β
- All code files under 250 lines? β
Two-Tier Documentation:
Folder-Level (Detailed):
docs/internal/api-docs.mdβ Architecture forinternal/api/docs/internal/api/handlers-docs.mdβ Architecture forinternal/api/handlers/
Function-Level (Concise: 1-3 sentences):
cmd/api/main.goβdocs/cmd/api/main.mdinternal/api/router.goβdocs/internal/api/router.mdinternal/api/handlers/health.goβdocs/internal/api/handlers/health.md
250 Line Limit:
- If file exceeds 250 lines, split immediately
- Update both doc types to reflect new structure
No Exceptions. No Shortcuts.