import type { GitHistory, GraphEdge } from "audit-tools/shared"; import type { RepoManifest, UnitManifest } from "../types.js"; import type { FileDisposition } from "audit-tools/shared"; /** * Git-history mining. * * Deterministic extractor that turns the repository's commit log into the * language-neutral `git_history.json` artifact: co-change (temporal coupling), * churn (change frequency), and authorship breadth (bus-factor). All mining * runs through `audit-tools/shared`'s `mineGitHistory`, which itself degrades to * empty when git is unavailable / the log fails — so this extractor never * throws and is safe to run on any tree (including a fresh, history-less repo). * * Declared upstream deps: `{repo_manifest, file_disposition}`. Both are used to * scope mined paths to the audited file set (excluded / non-manifest paths are * dropped) so downstream consumers see only in-scope signals. */ declare const GIT_CO_CHANGE_EDGE_KIND = "git-co-change"; /** * Graph-bundle edge category co-change edges are merged into. DELIBERATELY its * own bucket (not `references`): co-change is temporal coupling, not a structural * dependency, so `allGraphEdges` (graphSignals) skips this category — co-change * never inflates fan-in/out, hubs, cycles, or seams. Consumers that want the * coupling view read `graph_bundle.graphs.co_change` explicitly. */ declare const GIT_CO_CHANGE_CATEGORY = "co_change"; /** * Mine `git_history.json` for `root`, keeping only paths present (and not * audit-excluded) in the manifest/disposition. Output is deterministic: the * shared miner already sorts every list by a total order, and the in-scope * filter preserves that order. */ /** * The set of in-scope, graph-normalized path keys the git-history mine is scoped * to: every manifest file that is neither file-excluded nor audit-excluded by * disposition. SINGLE-SOURCED here so the mine's in-scope filter and the * incremental-reuse scope key (`deriveGitHistoryScopeKey`) can never drift in * what "in scope" means. */ export declare function gitHistoryInScopeKeys(repoManifest: RepoManifest, disposition?: FileDisposition): string[]; export declare function mineGitHistoryArtifact(root: string, repoManifest: RepoManifest, disposition?: FileDisposition): GitHistory; /** * Project mined co-change pairs into language-neutral, undirected graph edges * suitable for merging into the graph bundle via * `mergeAnalyzerGraphContribution`. Confidence scales with co-change count * (more shared commits → stronger coupling) up to a cap. Degrades to an empty * list when there is no co-change history. */ export declare function gitHistoryGraphEdges(history: GitHistory): GraphEdge[]; /** * Derive per-unit git-history risk signals (`change_hotspot`, `broad_authorship`) * keyed by `unit_id`, suitable for merging into the risk register via * `mergeAnalyzerRiskSignals`. A unit inherits a signal when ANY of its files is * so flagged. These are informational signals (they widen the picture, they do * not by themselves saturate risk). Degrades to empty when history is empty. */ export declare function gitHistoryRiskSignals(history: GitHistory, unitManifest: UnitManifest): Map; export type { GitHistory } from "audit-tools/shared"; export { GIT_CO_CHANGE_EDGE_KIND, GIT_CO_CHANGE_CATEGORY }; //# sourceMappingURL=gitHistory.d.ts.map