rank_repository_pagerank
Rank repository modules by PageRank centrality over AST import graphs to identify core architectural modules versus peripheral utilities.
Instructions
Identifies the architectural backbone and most critical modules of any repository using graph-theory PageRank centrality over AST import and reference topologies. Ranks modules by inbound/outbound degree and structural criticality.
Behavior:
Read-only: Graph centrality computation; does not alter files.
Idempotent: Deterministic PageRank convergence for identical import graphs.
100% Offline: Fully local graph traversal without external dependencies.
Usage Guidelines:
When to use: Run when exploring an unfamiliar codebase to immediately identify the core architectural modules versus peripheral utilities.
Sibling Routing: For direct pairwise dependencies of a file, use 'query_module_dependencies'. For blast radius of a single function, use 'analyze_change_impact'.
Returns: Ranked Markdown table with PageRank centrality scores, inbound/outbound degrees, and architectural significance notes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_k | No | Number of top central modules to return in the ranking report (default: 15). | |
| project_root | No | Root directory of the repository to analyze (default: current directory). | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |