@jmylchreest/aide-plugin 0.0.43 → 0.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/survey/SKILL.md +174 -0
package/package.json
CHANGED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: survey
|
|
3
|
+
description: Explore codebase structure, entry points, tech stack, hotspots, and call graphs
|
|
4
|
+
triggers:
|
|
5
|
+
- survey
|
|
6
|
+
- codebase structure
|
|
7
|
+
- what is this codebase
|
|
8
|
+
- tech stack
|
|
9
|
+
- entry points
|
|
10
|
+
- entrypoints
|
|
11
|
+
- what modules
|
|
12
|
+
- what packages
|
|
13
|
+
- code churn
|
|
14
|
+
- hotspots
|
|
15
|
+
- call graph
|
|
16
|
+
- who calls
|
|
17
|
+
- what calls
|
|
18
|
+
- orient me
|
|
19
|
+
- onboard
|
|
20
|
+
- codebase overview
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Codebase Survey
|
|
24
|
+
|
|
25
|
+
**Recommended model tier:** balanced (sonnet) - this skill performs structured queries
|
|
26
|
+
|
|
27
|
+
Understand the structure, technology, entry points, and change hotspots of a codebase.
|
|
28
|
+
Survey describes WHAT the codebase IS — not code problems (use `findings` for that).
|
|
29
|
+
|
|
30
|
+
## Available Tools
|
|
31
|
+
|
|
32
|
+
### 1. Survey Stats (`mcp__plugin_aide_aide__survey_stats`)
|
|
33
|
+
|
|
34
|
+
**Start here.** Get an overview of what has been surveyed: total entries, breakdown by analyzer and kind.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Is the codebase surveyed?
|
|
38
|
+
→ Uses survey_stats
|
|
39
|
+
→ Returns: counts by analyzer (topology, entrypoints, churn) and kind
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 2. Survey Run (`mcp__plugin_aide_aide__survey_run`)
|
|
43
|
+
|
|
44
|
+
Run analyzers to populate survey data. Three analyzers available:
|
|
45
|
+
|
|
46
|
+
- **topology** — Modules, packages, workspaces, build systems, tech stack detection
|
|
47
|
+
- **entrypoints** — main() functions, HTTP handlers, gRPC services, CLI roots (cobra/urfave). Uses code index when available; falls back to file scanning
|
|
48
|
+
- **churn** — Git history hotspots (files/dirs that change most often)
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Survey this codebase
|
|
52
|
+
→ Uses survey_run (no analyzer param = run all)
|
|
53
|
+
→ Returns: entry counts per analyzer
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 3. Survey List (`mcp__plugin_aide_aide__survey_list`)
|
|
57
|
+
|
|
58
|
+
Browse entries filtered by analyzer, kind, or file path. No search query needed.
|
|
59
|
+
|
|
60
|
+
**Kinds:** module, entrypoint, dependency, tech_stack, churn, submodule, workspace, arch_pattern
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
What modules are in this codebase?
|
|
64
|
+
→ Uses survey_list with kind=module
|
|
65
|
+
→ Returns: all module entries
|
|
66
|
+
|
|
67
|
+
What technologies does this use?
|
|
68
|
+
→ Uses survey_list with kind=tech_stack
|
|
69
|
+
→ Returns: detected frameworks, languages, build systems
|
|
70
|
+
|
|
71
|
+
What files change most?
|
|
72
|
+
→ Uses survey_list with kind=churn
|
|
73
|
+
→ Returns: high-churn files ranked by commit count
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 4. Survey Search (`mcp__plugin_aide_aide__survey_search`)
|
|
77
|
+
|
|
78
|
+
Full-text search across entry names, titles, and details. Use when looking for specific modules or technologies.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Find anything related to "auth"
|
|
82
|
+
→ Uses survey_search with query="auth"
|
|
83
|
+
→ Returns: modules, entrypoints, churn entries matching "auth"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 5. Call Graph (`mcp__plugin_aide_aide__survey_graph`)
|
|
87
|
+
|
|
88
|
+
Build a call graph for a symbol showing callers, callees, or both. BFS traversal over the code index.
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Who calls BuildCallGraph?
|
|
92
|
+
→ Uses survey_graph with symbol="BuildCallGraph" direction="callers"
|
|
93
|
+
→ Returns: graph of calling symbols with file:line locations
|
|
94
|
+
|
|
95
|
+
What does handleSurveyRun call?
|
|
96
|
+
→ Uses survey_graph with symbol="handleSurveyRun" direction="callees"
|
|
97
|
+
→ Returns: graph of called symbols
|
|
98
|
+
|
|
99
|
+
Show call neighborhood of RunTopology
|
|
100
|
+
→ Uses survey_graph with symbol="RunTopology" direction="both"
|
|
101
|
+
→ Returns: both callers and callees
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Parameters:**
|
|
105
|
+
|
|
106
|
+
- `symbol` (required): Function/method name
|
|
107
|
+
- `direction`: "both" (default), "callers", "callees"
|
|
108
|
+
- `max_depth`: BFS hops (default 2)
|
|
109
|
+
- `max_nodes`: Max nodes (default 50)
|
|
110
|
+
|
|
111
|
+
**Requires:** Code index must be populated (`aide code index`).
|
|
112
|
+
|
|
113
|
+
## Workflow
|
|
114
|
+
|
|
115
|
+
### Orienting in an unfamiliar codebase
|
|
116
|
+
|
|
117
|
+
1. **Check survey status:**
|
|
118
|
+
- Use `survey_stats` to see if data exists
|
|
119
|
+
- If empty, run `survey_run` to populate
|
|
120
|
+
|
|
121
|
+
2. **Understand the structure:**
|
|
122
|
+
- `survey_list kind=module` — What are the major modules?
|
|
123
|
+
- `survey_list kind=tech_stack` — What technologies are used?
|
|
124
|
+
- `survey_list kind=workspace` — Is this a monorepo?
|
|
125
|
+
|
|
126
|
+
3. **Find entry points:**
|
|
127
|
+
- `survey_list kind=entrypoint` — Where does execution start?
|
|
128
|
+
- Identifies main() functions, HTTP handlers, CLI roots
|
|
129
|
+
|
|
130
|
+
4. **Identify hotspots:**
|
|
131
|
+
- `survey_list kind=churn` — What files change most? (complexity/bug magnets)
|
|
132
|
+
|
|
133
|
+
5. **Trace call relationships:**
|
|
134
|
+
- `survey_graph symbol="handleRequest"` — Map the call neighborhood
|
|
135
|
+
- Use `direction=callers` to find who invokes a function
|
|
136
|
+
- Use `direction=callees` to understand what a function depends on
|
|
137
|
+
|
|
138
|
+
### Answering specific questions
|
|
139
|
+
|
|
140
|
+
| Question | Tool | Parameters |
|
|
141
|
+
| ----------------------------- | --------------- | --------------------------- |
|
|
142
|
+
| "What is this codebase?" | `survey_list` | kind=module |
|
|
143
|
+
| "What tech stack?" | `survey_list` | kind=tech_stack |
|
|
144
|
+
| "Where are the entry points?" | `survey_list` | kind=entrypoint |
|
|
145
|
+
| "What changes most?" | `survey_list` | kind=churn |
|
|
146
|
+
| "Is there an auth module?" | `survey_search` | query="auth" |
|
|
147
|
+
| "Who calls this function?" | `survey_graph` | symbol=X, direction=callers |
|
|
148
|
+
| "What does this call?" | `survey_graph` | symbol=X, direction=callees |
|
|
149
|
+
|
|
150
|
+
## Survey vs Findings vs Code Search
|
|
151
|
+
|
|
152
|
+
| Tool | Purpose | Example |
|
|
153
|
+
| --------------- | -------------------- | ---------------------------------------- |
|
|
154
|
+
| **Survey** | WHAT the codebase IS | Modules, tech stack, entry points, churn |
|
|
155
|
+
| **Findings** | Code PROBLEMS | Complexity, security issues, duplication |
|
|
156
|
+
| **Code Search** | Symbol DEFINITIONS | Find function signatures, call sites |
|
|
157
|
+
|
|
158
|
+
Survey gives you the big picture. Code search gives you specific symbols. Findings gives you problems to fix.
|
|
159
|
+
|
|
160
|
+
## Prerequisites
|
|
161
|
+
|
|
162
|
+
- **Survey data:** Run `aide survey run` or use `survey_run` tool
|
|
163
|
+
- **Code index (for entrypoints + graph):** Run `aide code index`
|
|
164
|
+
- **Git history (for churn):** Must be a git repository (uses go-git, no git binary needed)
|
|
165
|
+
|
|
166
|
+
**Binary location:** The aide binary is at `.aide/bin/aide`. If it's on your `$PATH`, you can use `aide` directly.
|
|
167
|
+
|
|
168
|
+
## Notes
|
|
169
|
+
|
|
170
|
+
- Survey results are cached in BoltDB — re-run analyzers to refresh after significant changes
|
|
171
|
+
- Topology analyzer inspects the filesystem (build files, directory structure)
|
|
172
|
+
- Entrypoints analyzer uses the code index when available; falls back to file scanning
|
|
173
|
+
- Churn analyzer uses go-git to read git history directly (no git binary required)
|
|
174
|
+
- Call graph is computed on demand from the code index (not stored)
|