survey
Explore codebase structure, entry points, tech stack, hotspots, and call graphs
What this skill does
# Codebase Survey **Recommended model tier:** balanced (sonnet) - this skill performs structured queries Understand the structure, technology, entry points, and change hotspots of a codebase. Survey describes WHAT the codebase IS — not code problems (use `findings` for that). ## Available Tools ### 1. Survey Stats (`mcp__plugin_aide_aide__survey_stats`) **Start here.** Get an overview of what has been surveyed: total entries, breakdown by analyzer and kind. ``` Is the codebase surveyed? → Uses survey_stats → Returns: counts by analyzer (topology, entrypoints, churn) and kind ``` ### 2. Survey Run (`mcp__plugin_aide_aide__survey_run`) Run analyzers to populate survey data. Three analyzers available: - **topology** — Modules, packages, workspaces, build systems, tech stack detection - **entrypoints** — main() functions, HTTP handlers, gRPC services, CLI roots (cobra/urfave). Uses code index when available; falls back to file scanning - **churn** — Git history hotspots (files/dirs that change most often) ``` Survey this codebase → Uses survey_run (no analyzer param = run all) → Returns: entry counts per analyzer ``` ### 3. Survey List (`mcp__plugin_aide_aide__survey_list`) Browse entries filtered by analyzer, kind, or file path. No search query needed. **Kinds:** module, entrypoint, dependency, tech_stack, churn, submodule, workspace, arch_pattern ``` What modules are in this codebase? → Uses survey_list with kind=module → Returns: all module entries What technologies does this use? → Uses survey_list with kind=tech_stack → Returns: detected frameworks, languages, build systems What files change most? → Uses survey_list with kind=churn → Returns: high-churn files ranked by commit count ``` ### 4. Survey Search (`mcp__plugin_aide_aide__survey_search`) Full-text search across entry names, titles, and details. Use when looking for specific modules or technologies. ``` Find anything related to "auth" → Uses survey_search with query="auth" → Returns: modules, entrypoints, churn entries matching "auth" ``` ### 5. Call Graph (`mcp__plugin_aide_aide__survey_graph`) Build a call graph for a symbol showing callers, callees, or both. BFS traversal over the code index. ``` Who calls BuildCallGraph? → Uses survey_graph with symbol="BuildCallGraph" direction="callers" → Returns: graph of calling symbols with file:line locations What does handleSurveyRun call? → Uses survey_graph with symbol="handleSurveyRun" direction="callees" → Returns: graph of called symbols Show call neighborhood of RunTopology → Uses survey_graph with symbol="RunTopology" direction="both" → Returns: both callers and callees ``` **Parameters:** - `symbol` (required): Function/method name - `direction`: "both" (default), "callers", "callees" - `max_depth`: BFS hops (default 2) - `max_nodes`: Max nodes (default 50) **Requires:** Code index must be populated (`aide code index`). ## Workflow ### Orienting in an unfamiliar codebase 1. **Check survey status:** - Use `survey_stats` to see if data exists - If empty, run `survey_run` to populate 2. **Understand the structure:** - `survey_list kind=module` — What are the major modules? - `survey_list kind=tech_stack` — What technologies are used? - `survey_list kind=workspace` — Is this a monorepo? 3. **Find entry points:** - `survey_list kind=entrypoint` — Where does execution start? - Identifies main() functions, HTTP handlers, CLI roots 4. **Identify hotspots:** - `survey_list kind=churn` — What files change most? (complexity/bug magnets) 5. **Trace call relationships:** - `survey_graph symbol="handleRequest"` — Map the call neighborhood - Use `direction=callers` to find who invokes a function - Use `direction=callees` to understand what a function depends on ### Answering specific questions | Question | Tool | Parameters | | ----------------------------- | --------------- | --------------------------- | | "What is this codebase?" | `survey_list` | kind=module | | "What tech stack?" | `survey_list` | kind=tech_stack | | "Where are the entry points?" | `survey_list` | kind=entrypoint | | "What changes most?" | `survey_list` | kind=churn | | "Is there an auth module?" | `survey_search` | query="auth" | | "Who calls this function?" | `survey_graph` | symbol=X, direction=callers | | "What does this call?" | `survey_graph` | symbol=X, direction=callees | ## Survey vs Findings vs Code Search | Tool | Purpose | Example | | --------------- | -------------------- | ---------------------------------------- | | **Survey** | WHAT the codebase IS | Modules, tech stack, entry points, churn | | **Findings** | Code PROBLEMS | Complexity, security issues, duplication | | **Code Search** | Symbol DEFINITIONS | Find function signatures, call sites | Survey gives you the big picture. Code search gives you specific symbols. Findings gives you problems to fix. ## Prerequisites - **Survey data:** Run `aide survey run` or use `survey_run` tool - **Code index (for entrypoints + graph):** Run `aide code index` - **Git history (for churn):** Must be a git repository (uses go-git, no git binary needed) **Binary location:** The aide binary is at `.aide/bin/aide`. If it's on your `$PATH`, you can use `aide` directly. ## Notes - Survey results are cached in BoltDB — re-run analyzers to refresh after significant changes - Topology analyzer inspects the filesystem (build files, directory structure) - Entrypoints analyzer uses the code index when available; falls back to file scanning - Churn analyzer uses go-git to read git history directly (no git binary required) - Call graph is computed on demand from the code index (not stored)
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.