Development
Development setup, test commands, deploy paths, and structural rules for the Hyperliquid module backend.
This repo holds the technical backend for Axe's Hyperliquid module, the MkDocs build that ships these docs, and the Next.js landing page. Some directory and Cloud Run service names still use the legacy hlq codename — the product is Axe; renaming infrastructure is deferred work.
Setup
Running tests
Tests use a mock bridge fixture (conftest.py) — no BigQuery credentials needed.
Current: 89 tests, all passing.
Project structure
Dev rules
- Inference only — No training loops, gradients, or reward functions.
- Bridge-first — Never hardcode values that come from bridge artifacts.
- No RL imports — Never import from
prime_rl,verifiers,search_prime_env. - Run tests before committing:
pytest tests/
Building docs
Deploying docs to Cloud Run
The docs are hosted on Cloud Run at a permanent URL. The Cloud Run service is named hlq-docs for legacy reasons:
https://hlq-docs-i6dghycg5q-uc.a.run.app/
The URL is stable across deployments — each gcloud run deploy creates a new
revision behind the same URL, with automatic traffic switching.
Push an update
Infrastructure details
| Setting | Value |
|---|---|
| Service name | hlq-docs |
| Region | us-central1 |
| Project | cs-poc-dzog4rv1rdnbpi2aawjhbvk |
| Image registry | us-central1-docker.pkg.dev/.../cloud-run-source-deploy/hlq-docs |
| Port | 8080 (nginx) |
| Memory | 256Mi |
| Min instances | 0 (scales to zero when idle — no cost) |
| Max instances | 1 |
| Auth | Unauthenticated (public) |
Deploying the current Next.js web surface
The public landing page lives in work/hlq/web. The Cloud Run service is named hlq-web for legacy reasons.
See web/WIRING_GUIDE.md in the repo root for the detailed backend wiring notes. The short deploy path is:
How it works
The Dockerfile at the repo root builds a minimal nginx:alpine image that serves
the static site/ directory. Cloud Run runs this container and routes HTTPS
traffic to it. Revisions are immutable — each push creates a new one, and the
previous revision remains available for rollback via gcloud run services update-traffic.
GCS snapshots
Upload a new snapshot:
Retrieve:
Key documents
| Document | Purpose |
|---|---|
NOTEBOOK.md | Chronological dev log (what changed, why, results) |
RL_REQUESTS.md | Single channel for requests to RL backend team |
POLICY_DELTA_ROADMAP.md | Feature roadmap and planned phases |
CLAUDE.md | Context rules for Claude Code sessions |
Adding a new intent family
- Add regex pattern in
semantics.py→infer_intent_family() - Add RouteAction to bridge
action_space.json - Add SQL template to bridge
sql_templates/ - Map intent → template in bridge
intent_priors/intent_template_map.json - Add test in
test_search_pipeline.py - Update bridge manifest version and checksums
Transitional surface
Intent classification is currently regex_v1 (transitional). REQ-006 transfers ownership to the RL team for model-based classification.
Adding a new MCP tool
- Add function with
@mcp.tool()decorator inmcp.py - Call
backend.search()orbackend.status()as appropriate - Include
"provenance": result.get("provenance", {})in the response - Add corresponding CLI command in
cli.pyif applicable - Add skill guide in
skills/if the tool has non-obvious usage patterns