diff --git a/CODEX.md b/CODEX.md new file mode 100644 index 0000000..0e58c0c --- /dev/null +++ b/CODEX.md @@ -0,0 +1,22 @@ +# CODEX.md + +This repository uses the same conventions as `CLAUDE.md`. + +## Source Of Truth + +- RFC: `docs/RFC.md` +- AX principles: `.core/reference/RFC-025-AGENT-EXPERIENCE.md` +- Package conventions: `CLAUDE.md` + +## Quick Commands + +```bash +go test ./... +go test -race ./... +go vet ./... +``` + +## Commit Style + +- Use conventional commits: `type(scope): description` +- Include `Co-Authored-By: Virgil ` diff --git a/api/router.go b/api/router.go index 026d00a..ff7791a 100644 --- a/api/router.go +++ b/api/router.go @@ -1,12 +1,6 @@ -// Package api implements the HTTP monitoring endpoints for the proxy. +// Package api wires the monitoring endpoints onto an HTTP router. // -// Registered routes: -// -// GET /1/summary — aggregated proxy stats -// GET /1/workers — per-worker hashrate table -// GET /1/miners — per-connection state table -// -// proxyapi.RegisterRoutes(apiRouter, p) +// api.RegisterRoutes(http.NewServeMux(), p) package api import ( @@ -78,7 +72,7 @@ type ResultsResponse struct { Best [10]uint64 `json:"best"` } -// RegisterRoutes mounts `/1/summary`, `/1/workers`, and `/1/miners` on a router. +// RegisterRoutes mounts the monitoring endpoints on any router with HandleFunc. // // api.RegisterRoutes(http.NewServeMux(), p) func RegisterRoutes(router Router, proxyValue *proxy.Proxy) {