Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

393 B
Raw Blame
"use client";

import useSWR from "swr";
import { getKnowledgeMatrix } from "@/lib/api/owners";

/** The one key every surface reads the knowledge matrix under, so it is fetched once. */
export function useKnowledgeMatrix(repoId: string, enabled = true) {
  return useSWR(enabled ? `knowledge-matrix:${repoId}` : null, () => getKnowledgeMatrix(repoId), {
    revalidateOnFocus: false,
  });
}