Skip to content

Commit 9249ac1

Browse files
committed
docs: update AGENTS.md for rpc→rpchandler rename and CI workflows
- Update Go/pnpm versions (1.26, Fiber v3, pnpm 10.30) - Document internal/rpc → internal/rpchandler rename and type changes - Add dependency management notes (pnpm overrides, unified packages) - Document pr-quality.yml and auto-merge-deps.yml workflows
1 parent ab64d53 commit 9249ac1

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

AGENTS.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Agent Guidelines
22

3-
<!-- Managed by agent: keep sections & order; edit content, not structure. Last updated: 2026-02-04 -->
3+
<!-- Managed by agent: keep sections & order; edit content, not structure. Last updated: 2026-02-22 -->
44

55
**Precedence**: Nearest AGENTS.md wins. This is the root file with global defaults.
66

@@ -17,7 +17,7 @@
1717

1818
Self-service password change/reset web app for LDAP/ActiveDirectory with email-based password reset, rate limiting, and strict accessibility standards. Single binary deployment with embedded assets.
1919

20-
**Stack**: Go 1.25 + Fiber, TypeScript (ultra-strict), Tailwind CSS 4, Docker multi-stage builds, pnpm 10.28
20+
**Stack**: Go 1.26 + Fiber v3, TypeScript (ultra-strict), Tailwind CSS 4, Docker multi-stage builds, pnpm 10.30
2121

2222
**Key characteristics**:
2323

@@ -49,7 +49,7 @@ See [docs/development-guide.md](docs/development-guide.md) for comprehensive set
4949

5050
### Build & Test Commands
5151

52-
**Package manager**: pnpm (specified in package.json: `pnpm@10.28.2`)
52+
**Package manager**: pnpm (specified in package.json: `pnpm@10.30.1`)
5353

5454
```bash
5555
# Build everything
@@ -286,3 +286,11 @@ func connectLDAP(config LDAPConfig) *ldap.Conn {
286286
- Major version updates require changelog review
287287
- Use Context7 MCP or official docs for migrations
288288
- Keep pnpm-lock.yaml and go.sum committed
289+
- Use `pnpm.overrides` for transitive dependency CVE fixes when upstream hasn't patched yet
290+
- Don't add redundant direct deps if a unified package re-exports them (e.g., `typescript-eslint` provides `@typescript-eslint/parser` + `@typescript-eslint/eslint-plugin`)
291+
292+
**CI/CD Workflows**:
293+
294+
- `pr-quality.yml`: Auto-approves PRs from repo collaborators (solo-maintainer pattern)
295+
- `auto-merge-deps.yml`: Auto-merges Dependabot/Renovate PRs with strategy auto-detection
296+
- Bootstrap: The PR introducing `pr-quality.yml` requires manual approval; all subsequent PRs auto-approve

internal/AGENTS.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Go Backend Services
22

3-
<!-- Managed by agent: keep sections & order; edit content, not structure. Last updated: 2026-02-04 -->
3+
<!-- Managed by agent: keep sections & order; edit content, not structure. Last updated: 2026-02-22 -->
44

55
**Scope**: Go backend packages in `internal/` directory
66

@@ -14,7 +14,7 @@ Backend services for LDAP selfservice password change/reset functionality. Organ
1414
- **options/**: Configuration management from environment variables
1515
- **ratelimit/**: IP-based rate limiting (3 req/hour default)
1616
- **resettoken/**: Cryptographic token generation and validation
17-
- **rpc/**: JSON-RPC 2.0 API handlers (password change/reset)
17+
- **rpchandler/**: JSON-RPC 2.0 API handlers (password change/reset) — renamed from `rpc/` to avoid Go stdlib `net/rpc` conflict
1818
- **validators/**: Password policy validation logic
1919
- **web/**: HTTP server setup, static assets, routing (see [web/AGENTS.md](web/AGENTS.md))
2020

@@ -45,11 +45,11 @@ RATE_LIMIT_WINDOW=1h
4545
TOKEN_EXPIRY_DURATION=1h
4646
```
4747

48-
**Go toolchain**: Requires Go 1.25+ (specified in `go.mod`)
48+
**Go toolchain**: Requires Go 1.26+ (specified in `go.mod`)
4949

5050
**Key dependencies**:
5151

52-
- `github.com/gofiber/fiber/v2` - HTTP server
52+
- `github.com/gofiber/fiber/v3` - HTTP server
5353
- `github.com/netresearch/simple-ldap-go` - LDAP client
5454
- `github.com/testcontainers/testcontainers-go` - Integration testing
5555
- `github.com/joho/godotenv` - Environment loading
@@ -358,9 +358,11 @@ go build -gcflags="all=-N -l"
358358
- Base64 URL encoding (safe for URLs)
359359
- Store tokens server-side with expiry
360360

361-
### rpc/
361+
### rpchandler/
362362

363363
- JSON-RPC 2.0 specification compliance
364+
- Renamed from `rpc/` to avoid Go stdlib `net/rpc` conflict (revive var-naming)
365+
- Types: `Request` (was `JSONRPC`), `Response` (was `JSONRPCResponse`) — avoid stuttering (`rpchandler.JSONRPCResponse`)
364366
- Error codes defined in [docs/api-reference.md](../docs/api-reference.md)
365367
- Request validation before processing
366368
- Endpoint: `POST /api/rpc`

0 commit comments

Comments
 (0)