Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
feat(pipeline): emit USAGE edges for decorator applications (#208)
Matthew Prockf65afda0df9c
diff --git a/src/pipeline/pass_parallel.c b/src/pipeline/pass_parallel.cindex 9eb24a75c..684f93e27 100644--- a/src/pipeline/pass_parallel.c+++ b/src/pipeline/pass_parallel.c@@ -1615,6 +1615,9 @@ static void resolve_def_decorators(resolve_ctx_t *rc, resolve_worker_state_t *wschar dp[CBM_SZ_256];snprintf(dp, sizeof(dp), "{\"decorator\":\"%s\"}", def->decorators[dc]);cbm_gbuf_insert_edge(ws->local_edge_buf, node->id, dn->id, "DECORATES", dp);+ /* Ensure a reference-style edge exists so the decorator appears in queries+ * without being misclassified as a real call by downstream passes. */+ cbm_gbuf_insert_edge(ws->local_edge_buf, node->id, dn->id, "USAGE", "{}");ws->semantic_resolved++;}}diff --git a/src/pipeline/pass_semantic.c b/src/pipeline/pass_semantic.cindex ef3278010..423375c7c 100644--- a/src/pipeline/pass_semantic.c+++ b/src/pipeline/pass_semantic.c@@ -321,6 +321,9 @@ static void resolve_decorator(cbm_pipeline_ctx_t *ctx, const cbm_gbuf_node_t *nochar props[CBM_SZ_256];snprintf(props, sizeof(props), "{\"decorator\":\"%s\"}", decorator);cbm_gbuf_insert_edge(ctx->gbuf, node->id, dec->id, "DECORATES", props);+ /* Ensure a reference edge exists so the decorator appears in usage queries+ * without being misclassified as a real call by downstream passes. */+ cbm_gbuf_insert_edge(ctx->gbuf, node->id, dec->id, "USAGE", "{}");(*count)++;}}