Goal
Detect HTTP route definitions as first-class symbols in the code graph.
Scope
Detect REST endpoint definitions and create ROUTE nodes + HANDLER edges.
Per-Framework Patterns
| Framework |
Pattern |
Example |
| Axum |
#[get("/path")] |
#[get("/users/:id")] |
| Actix-web |
.route("/path", get(handler)) |
.resource("/users") |
| Rocket |
#[get("/path")] |
#[get("/users/<id>")] |
| Express |
app.get("/path", handler) |
router.post("/api/users") |
| FastAPI |
@app.get("/path") |
@router.post("/users/{id}") |
| Gin |
r.GET("/path", handler) |
g.POST("/api/users", handler) |
Implementation
- Add
ROUTE symbol kind
- Extract route paths from decorators/attributes
- Create edges: ROUTE → HANDLER → function symbol
- Store in
edges table with DEFINES kind
CLI
cora routes # List all HTTP routes
cora routes --method GET # Filter by method
cora routes --prefix /api # Filter by path prefix
Acceptance
cora routes lists detected HTTP endpoints
- Routes appear as symbols in brain search
cora query "/api/users -> *" traces route to handler
Depends On
Estimated Effort
1-2 weeks
Goal
Detect HTTP route definitions as first-class symbols in the code graph.
Scope
Detect REST endpoint definitions and create ROUTE nodes + HANDLER edges.
Per-Framework Patterns
#[get("/path")]#[get("/users/:id")].route("/path", get(handler)).resource("/users")#[get("/path")]#[get("/users/<id>")]app.get("/path", handler)router.post("/api/users")@app.get("/path")@router.post("/users/{id}")r.GET("/path", handler)g.POST("/api/users", handler)Implementation
ROUTEsymbol kindedgestable withDEFINESkindCLI
Acceptance
cora routeslists detected HTTP endpointscora query "/api/users -> *"traces route to handlerDepends On
store_kg_edges()— populateedgestable #429 (edges table)Estimated Effort
1-2 weeks