rea-analysis-optimization
MOmorluto/rea485k近 7 天新增 9,215 个 star
Map an indexed source-code repo into a structured overview — scale, communities, central symbols, execution flows, API surface, recent activity. Use when the user wants to explore, understand, onboard to, map, or get an overview of an indexed source-code repo, architecture, modules, or major flows. Do not use Glob, find, tree, rg, or manual file browsing as the first exploration path; Memtrace provides structured graph briefing. Do NOT use for change history / what-changed questions — use memtrace-evolution.
Full codebase exploration workflow — from indexing through architectural understanding. Chains indexing, graph algorithms, community detection, and temporal analysis into a structured onboarding experience. Use this when someone is new to a codebase and needs to build a mental model.
Call list_indexed_repositories first. If the repo is already indexed, skip to step 2.
Otherwise, call index_directory with the project path, then poll check_job_status until completion.
Success criteria: Repo appears in list_indexed_repositories with non-zero node/edge counts.
Call get_repository_stats to understand scale:
Report these numbers to the user — they set expectations for the codebase's size and complexity.
Call list_communities to see how the codebase naturally clusters into logical modules.
Decision: If >10 communities, summarize the top 5–7 by size and let the user ask about specific ones.
Each community represents a cohesive module — these are the "areas" of the codebase.
Call find_central_symbols — PageRank over CALLS/REFERENCES edges (no method param):
{ "repo_id": "<repo>", "limit": 15 }
These are the symbols that the rest of the codebase depends on most heavily. They form the "skeleton" of the architecture.
Call find_bridge_symbols to identify chokepoints — symbols that connect otherwise-separate parts of the codebase.
Decision: If bridge symbols overlap heavily with central symbols, flag them as critical infrastructure — high importance AND single point of failure.
Call list_processes to discover entry points:
This shows HOW the code is actually used at runtime, not just how it's structured.
Call find_api_endpoints to list all HTTP routes.
Decision: If multiple repos are indexed, also call get_api_topology to map service-to-service dependencies.
Call get_evolution to see recent activity:
{ "repo_id": "<repo>", "from": "30d ago", "mode": "overview" }
Check totals.episode_count and episode boundaries. For file/symbol hotspots, switch to compound:
{ "repo_id": "<repo>", "from": "30d ago", "mode": "compound" }
Review top_changed_files and top_touched_symbols.
Call find_most_complex_functions:
{ "repo_id": "<repo>", "top_n": 10 }
Full parameter spec for every Memtrace tool: references/mcp-parameters.md (bundled at the memtrace-skills plugin root).
Synthesize findings into a structured overview:
The deliverable is the 7-part overview above. Skeleton (one headline per part):
EngineHandle::open (central AND bridge — flag it)top_changed_files| Mistake | Reality |
|---|---|
| Skipping indexing and using file-based grep | The knowledge graph provides structural understanding that grep cannot — callers, callees, communities, processes |
| Reporting raw numbers without interpretation | "450 functions across 12 communities" means nothing; describe what each community does |
| Only looking at code structure | Execution flows (processes) show how the code is actually used — always include them |
| Ignoring temporal context | Recent evolution shows where active development is happening — this is where the user will likely need to work |
MOmorluto/rea485k近 7 天新增 9,215 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star