docs(ax): add codex conventions

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-04 14:12:59 +00:00
parent c26136b208
commit 22d3cd9c09
2 changed files with 25 additions and 9 deletions

22
CODEX.md Normal file
View file

@ -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 <virgil@lethean.io>`

View file

@ -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) {