Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
"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,
});
}