claude-dev-kit 2.1.0
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/.claude/agents/angelic-workshop-energy-clearing.md +113 -0
- package/.claude/agents/angelic-workshop-intake.md +84 -0
- package/.claude/agents/angelic-workshop-integration.md +140 -0
- package/.claude/agents/angelic-workshop-invocation.md +92 -0
- package/.claude/agents/angelic-workshop-lead.md +225 -0
- package/.claude/agents/angelic-workshop-transmission.md +108 -0
- package/.claude/agents/deep-think-partner.md +41 -0
- package/.claude/agents/dev-backend.md +74 -0
- package/.claude/agents/dev-e2e.md +101 -0
- package/.claude/agents/dev-frontend.md +82 -0
- package/.claude/agents/dev-lead.md +144 -0
- package/.claude/agents/dev-reviewer.md +122 -0
- package/.claude/agents/dev-test.md +88 -0
- package/.claude/agents/documentation-manager.md +73 -0
- package/.claude/agents/haiku-executor.md +8 -0
- package/.claude/agents/pm-groomer.md +98 -0
- package/.claude/agents/pm-prp-writer.md +144 -0
- package/.claude/agents/pm-sizer.md +84 -0
- package/.claude/agents/project-manager.md +91 -0
- package/.claude/agents/system-architect.md +98 -0
- package/.claude/agents/validation-gates.md +121 -0
- package/.claude/agents/workflow-builder.md +416 -0
- package/.claude/commands/ai/detect.md +117 -0
- package/.claude/commands/ai/route.md +128 -0
- package/.claude/commands/ai/switch.md +121 -0
- package/.claude/commands/bs/brainstorm_full.md +149 -0
- package/.claude/commands/bs/claude.md +37 -0
- package/.claude/commands/bs/codex.md +37 -0
- package/.claude/commands/bs/gemini.md +37 -0
- package/.claude/commands/bs/glm.md +37 -0
- package/.claude/commands/bs/grok.md +37 -0
- package/.claude/commands/bs/kimi.md +37 -0
- package/.claude/commands/bs/minimax.md +37 -0
- package/.claude/commands/bs/ollama.md +71 -0
- package/.claude/commands/code/build-and-fix.md +80 -0
- package/.claude/commands/code/simplify.md +77 -0
- package/.claude/commands/dev/backend.md +47 -0
- package/.claude/commands/dev/e2e.md +49 -0
- package/.claude/commands/dev/frontend.md +45 -0
- package/.claude/commands/dev/review.md +48 -0
- package/.claude/commands/dev/test.md +54 -0
- package/.claude/commands/dev-epic.md +121 -0
- package/.claude/commands/dev-issue.md +79 -0
- package/.claude/commands/dev.md +134 -0
- package/.claude/commands/execute-prp.md +113 -0
- package/.claude/commands/fix-github-issue.md +14 -0
- package/.claude/commands/generate-prp.md +73 -0
- package/.claude/commands/git/status.md +14 -0
- package/.claude/commands/haiku.md +13 -0
- package/.claude/commands/improve.md +178 -0
- package/.claude/commands/init.md +311 -0
- package/.claude/commands/pm/groom.md +58 -0
- package/.claude/commands/pm/plan-epic.md +74 -0
- package/.claude/commands/pm/size.md +46 -0
- package/.claude/commands/pm.md +47 -0
- package/.claude/commands/primer.md +16 -0
- package/.claude/commands/self-improve.md +243 -0
- package/.claude/commands/think.md +68 -0
- package/.claude/commands/workflow/angelic-workshop.md +89 -0
- package/.claude/commands/workflow/build.md +91 -0
- package/.claude/hooks/pre-tool-use/block-dangerous-commands.js +196 -0
- package/.claude/hooks/skill-activation-prompt/package-lock.json +560 -0
- package/.claude/hooks/skill-activation-prompt/package.json +16 -0
- package/.claude/hooks/skill-activation-prompt/skill-activation-prompt.ts +135 -0
- package/.claude/hooks/skill-activation-prompt/skill-rules.json +50 -0
- package/.claude/hooks/stop/context_monitor.py +155 -0
- package/.claude/hooks/stop/learning_logger.py +218 -0
- package/.claude/skills/ai-router/SKILL.md +119 -0
- package/.claude/skills/build-and-fix/SKILL.md +271 -0
- package/.claude/skills/build-and-fix/examples/javascript-lint-fix.md +37 -0
- package/.claude/skills/build-and-fix/language-configs/javascript.yaml +139 -0
- package/.claude/skills/build-and-fix/references/config-schema.md +120 -0
- package/.claude/skills/build-and-fix/references/error-patterns.md +273 -0
- package/.claude/skills/code-investigator/SKILL.md +299 -0
- package/.claude/skills/code-investigator/references/investigation-workflows.md +542 -0
- package/.claude/skills/code-investigator/references/language-specific.md +761 -0
- package/.claude/skills/code-investigator/references/search-patterns.md +258 -0
- package/.claude/skills/code-investigator/references/serena-patterns.md +328 -0
- package/.claude/skills/stack-detector/SKILL.md +153 -0
- package/.claude/skills/verification-before-completion/SKILL.md +143 -0
- package/.claude/templates/claude-md-template.md +56 -0
- package/.claude/templates/stacks/express-node.md +134 -0
- package/.claude/templates/stacks/fastapi.md +152 -0
- package/.claude/templates/stacks/generic.md +101 -0
- package/.claude/templates/stacks/nextjs-prisma.md +235 -0
- package/README.md +499 -0
- package/bin/claude-dev-kit.js +11 -0
- package/package.json +31 -0
- package/scripts/install.sh +448 -0
|
@@ -0,0 +1,761 @@
|
|
|
1
|
+
# Language-Specific Investigation Patterns
|
|
2
|
+
|
|
3
|
+
Search patterns and common locations for codebases. Use these Grep patterns as **fallbacks** when Serena and LSP tools are unavailable.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Tool Priority (Serena First)
|
|
8
|
+
|
|
9
|
+
**Primary:** Use Serena MCP tools for semantic operations:
|
|
10
|
+
- `mcp__serena__find_symbol` - Pattern-based symbol discovery
|
|
11
|
+
- `mcp__serena__get_symbols_overview` - File structure
|
|
12
|
+
- `mcp__serena__find_referencing_symbols` - References with snippets
|
|
13
|
+
- `mcp__serena__search_for_pattern` - Filtered regex search
|
|
14
|
+
|
|
15
|
+
**Secondary:** Use LSP when Serena unavailable or for cursor-based ops:
|
|
16
|
+
|
|
17
|
+
| Operation | Use Case |
|
|
18
|
+
|-----------|----------|
|
|
19
|
+
| `goToDefinition` | Find symbol declaration |
|
|
20
|
+
| `findReferences` | Find all usages |
|
|
21
|
+
| `hover` | Get type info + docs |
|
|
22
|
+
| `documentSymbol` | List symbols in file |
|
|
23
|
+
| `workspaceSymbol` | Search symbols globally |
|
|
24
|
+
| `goToImplementation` | Find implementations |
|
|
25
|
+
| `incomingCalls` | Who calls this? |
|
|
26
|
+
| `outgoingCalls` | What does this call? |
|
|
27
|
+
|
|
28
|
+
**Fallback:** Use Grep patterns below only when:
|
|
29
|
+
1. Serena tools return no results
|
|
30
|
+
2. LSP returns "No server available for file type"
|
|
31
|
+
3. LSP returns no results
|
|
32
|
+
4. Searching for non-symbol patterns (comments, TODOs, partial matches)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## TypeScript / JavaScript
|
|
37
|
+
|
|
38
|
+
**LSP:** `typescript-lsp` - Full support for `.ts`, `.tsx`, `.js`, `.jsx`, `.mts`, `.cts`, `.mjs`, `.cjs`
|
|
39
|
+
|
|
40
|
+
### Project Structure (Common Locations)
|
|
41
|
+
|
|
42
|
+
| Looking For | Check First |
|
|
43
|
+
|-------------|-------------|
|
|
44
|
+
| Entry point | `src/index.ts`, `src/main.ts`, `index.ts`, `package.json` "main" |
|
|
45
|
+
| Configuration | `tsconfig.json`, `.env`, `config/` |
|
|
46
|
+
| Types/Interfaces | `src/types/`, `types/`, `*.d.ts`, `src/**/*.types.ts` |
|
|
47
|
+
| API routes | `src/routes/`, `src/api/`, `pages/api/` (Next.js) |
|
|
48
|
+
| Components | `src/components/`, `components/` |
|
|
49
|
+
| Utilities | `src/utils/`, `src/lib/`, `src/helpers/` |
|
|
50
|
+
| Tests | `__tests__/`, `*.test.ts`, `*.spec.ts`, `test/` |
|
|
51
|
+
| Constants | `src/constants/`, `src/config/` |
|
|
52
|
+
|
|
53
|
+
### Symbol Patterns (Grep Fallback)
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
# Interface definition
|
|
57
|
+
Grep pattern="^\s*(export\s+)?interface\s+InterfaceName" type="ts"
|
|
58
|
+
|
|
59
|
+
# Type alias
|
|
60
|
+
Grep pattern="^\s*(export\s+)?type\s+TypeName\s*=" type="ts"
|
|
61
|
+
|
|
62
|
+
# React component (function)
|
|
63
|
+
Grep pattern="^\s*(export\s+)?(default\s+)?function\s+ComponentName" type="tsx"
|
|
64
|
+
Grep pattern="^\s*const\s+ComponentName\s*[:=]\s*(React\.)?FC" type="tsx"
|
|
65
|
+
|
|
66
|
+
# React component (class)
|
|
67
|
+
Grep pattern="class\s+ComponentName\s+extends\s+(React\.)?(Component|PureComponent)" type="tsx"
|
|
68
|
+
|
|
69
|
+
# Hook definition
|
|
70
|
+
Grep pattern="^\s*(export\s+)?(const|function)\s+use[A-Z]\w+" type="ts"
|
|
71
|
+
|
|
72
|
+
# Enum
|
|
73
|
+
Grep pattern="^\s*(export\s+)?(const\s+)?enum\s+EnumName" type="ts"
|
|
74
|
+
|
|
75
|
+
# Decorator usage
|
|
76
|
+
Grep pattern="^\s*@DecoratorName" type="ts"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Dependency Tracing
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
# Find all imports of a module
|
|
83
|
+
Grep pattern="import.*from\s+['\"].*moduleName['\"]" type="ts"
|
|
84
|
+
|
|
85
|
+
# Find re-exports
|
|
86
|
+
Grep pattern="export\s+\*\s+from" type="ts"
|
|
87
|
+
Grep pattern="export\s+\{[^}]+\}\s+from" type="ts"
|
|
88
|
+
|
|
89
|
+
# Find dynamic imports
|
|
90
|
+
Grep pattern="import\(['\"]" type="ts"
|
|
91
|
+
|
|
92
|
+
# Find require calls
|
|
93
|
+
Grep pattern="require\(['\"].*moduleName['\"]\)" type="js"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### React-Specific
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
# useState calls
|
|
100
|
+
Grep pattern="useState<?\w*>?\s*\(" type="tsx"
|
|
101
|
+
|
|
102
|
+
# useEffect with dependencies
|
|
103
|
+
Grep pattern="useEffect\s*\(" -A 10 output_mode="content" type="tsx"
|
|
104
|
+
|
|
105
|
+
# Context usage
|
|
106
|
+
Grep pattern="(createContext|useContext)\s*[<\(]" type="tsx"
|
|
107
|
+
|
|
108
|
+
# Props interface for component
|
|
109
|
+
Grep pattern="interface\s+\w+Props" type="ts"
|
|
110
|
+
Grep pattern="type\s+\w+Props\s*=" type="ts"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Python
|
|
116
|
+
|
|
117
|
+
**LSP:** `pyright-lsp` - Full support for `.py`, `.pyi`
|
|
118
|
+
|
|
119
|
+
### Project Structure (Common Locations)
|
|
120
|
+
|
|
121
|
+
| Looking For | Check First |
|
|
122
|
+
|-------------|-------------|
|
|
123
|
+
| Entry point | `main.py`, `app.py`, `__main__.py`, `manage.py` |
|
|
124
|
+
| Configuration | `config.py`, `settings.py`, `pyproject.toml`, `setup.py` |
|
|
125
|
+
| Models | `models/`, `models.py`, `schemas/` |
|
|
126
|
+
| API routes | `routes/`, `views/`, `api/`, `endpoints/` |
|
|
127
|
+
| Utilities | `utils/`, `helpers/`, `lib/` |
|
|
128
|
+
| Tests | `tests/`, `test_*.py`, `*_test.py` |
|
|
129
|
+
| Types | `types.py`, `typing.py`, `schemas/` |
|
|
130
|
+
|
|
131
|
+
### Symbol Patterns (Grep Fallback)
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
# Class definition
|
|
135
|
+
Grep pattern="^\s*class\s+ClassName\s*[\(:]" type="py"
|
|
136
|
+
|
|
137
|
+
# Function definition
|
|
138
|
+
Grep pattern="^\s*(async\s+)?def\s+function_name\s*\(" type="py"
|
|
139
|
+
|
|
140
|
+
# Method in class (indented def)
|
|
141
|
+
Grep pattern="^\s{4}(async\s+)?def\s+method_name" type="py"
|
|
142
|
+
|
|
143
|
+
# Decorator definition
|
|
144
|
+
Grep pattern="^\s*def\s+decorator_name\s*\(.*\)\s*:" -A 5 output_mode="content" type="py"
|
|
145
|
+
|
|
146
|
+
# Dataclass
|
|
147
|
+
Grep pattern="@dataclass" -A 10 output_mode="content" type="py"
|
|
148
|
+
|
|
149
|
+
# Pydantic model
|
|
150
|
+
Grep pattern="class\s+\w+\(.*BaseModel.*\):" type="py"
|
|
151
|
+
|
|
152
|
+
# Type alias
|
|
153
|
+
Grep pattern="^\s*\w+\s*=\s*(TypeVar|Union|Optional|List|Dict)" type="py"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Dependency Tracing
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
# Import statements
|
|
160
|
+
Grep pattern="^from\s+\S+\s+import" type="py"
|
|
161
|
+
Grep pattern="^import\s+\S+" type="py"
|
|
162
|
+
|
|
163
|
+
# Relative imports
|
|
164
|
+
Grep pattern="^from\s+\.\S*\s+import" type="py"
|
|
165
|
+
|
|
166
|
+
# Find all usages of a function
|
|
167
|
+
Grep pattern="function_name\s*\(" type="py"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Django-Specific
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
# Model definition
|
|
174
|
+
Grep pattern="class\s+\w+\(.*models\.Model.*\):" type="py"
|
|
175
|
+
|
|
176
|
+
# View definition
|
|
177
|
+
Grep pattern="(def|class)\s+\w+(View|Viewset|APIView)" type="py"
|
|
178
|
+
|
|
179
|
+
# URL pattern
|
|
180
|
+
Grep pattern="path\(.*,\s*\w+.*\)" type="py"
|
|
181
|
+
|
|
182
|
+
# Migration operations
|
|
183
|
+
Grep pattern="migrations\.(\w+)\s*\(" type="py"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### FastAPI-Specific
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
# Route definitions
|
|
190
|
+
Grep pattern="@(app|router)\.(get|post|put|delete|patch)\s*\(" type="py"
|
|
191
|
+
|
|
192
|
+
# Dependency injection
|
|
193
|
+
Grep pattern="Depends\s*\(" type="py"
|
|
194
|
+
|
|
195
|
+
# Response models
|
|
196
|
+
Grep pattern="response_model\s*=" type="py"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Rust
|
|
202
|
+
|
|
203
|
+
**LSP:** `rust-analyzer-lsp` - Full support for `.rs`
|
|
204
|
+
|
|
205
|
+
### Project Structure (Common Locations)
|
|
206
|
+
|
|
207
|
+
| Looking For | Check First |
|
|
208
|
+
|-------------|-------------|
|
|
209
|
+
| Entry point | `src/main.rs`, `src/lib.rs` |
|
|
210
|
+
| Configuration | `Cargo.toml`, `config/` |
|
|
211
|
+
| Modules | `src/*/mod.rs`, `src/*.rs` |
|
|
212
|
+
| Types | `src/types.rs`, `src/models/` |
|
|
213
|
+
| Errors | `src/error.rs`, `src/errors/` |
|
|
214
|
+
| Tests | `tests/`, `#[cfg(test)]` modules |
|
|
215
|
+
| Macros | `src/macros.rs`, files with `macro_rules!` |
|
|
216
|
+
|
|
217
|
+
### Symbol Patterns (Grep Fallback)
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
# Function definition
|
|
221
|
+
Grep pattern="^\s*(pub\s+)?(async\s+)?fn\s+function_name" type="rust"
|
|
222
|
+
|
|
223
|
+
# Struct definition
|
|
224
|
+
Grep pattern="^\s*(pub\s+)?struct\s+StructName" type="rust"
|
|
225
|
+
|
|
226
|
+
# Enum definition
|
|
227
|
+
Grep pattern="^\s*(pub\s+)?enum\s+EnumName" type="rust"
|
|
228
|
+
|
|
229
|
+
# Trait definition
|
|
230
|
+
Grep pattern="^\s*(pub\s+)?trait\s+TraitName" type="rust"
|
|
231
|
+
|
|
232
|
+
# Impl block
|
|
233
|
+
Grep pattern="^\s*impl(<[^>]+>)?\s+(StructName|TraitName)" type="rust"
|
|
234
|
+
|
|
235
|
+
# Macro definition
|
|
236
|
+
Grep pattern="macro_rules!\s+macro_name" type="rust"
|
|
237
|
+
|
|
238
|
+
# Derive macros
|
|
239
|
+
Grep pattern="#\[derive\([^)]*DeriveName" type="rust"
|
|
240
|
+
|
|
241
|
+
# Attribute macros
|
|
242
|
+
Grep pattern="#\[(tokio::main|async_trait|test)\]" type="rust"
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Dependency Tracing
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
# Use statements
|
|
249
|
+
Grep pattern="^use\s+.*::\w+;" type="rust"
|
|
250
|
+
Grep pattern="^use\s+crate::" type="rust"
|
|
251
|
+
|
|
252
|
+
# Module declarations
|
|
253
|
+
Grep pattern="^(pub\s+)?mod\s+\w+;" type="rust"
|
|
254
|
+
|
|
255
|
+
# External crate usage (exclude std/crate/self/super)
|
|
256
|
+
Grep pattern="^use\s+\w+::" type="rust"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Error Handling
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
# Result types
|
|
263
|
+
Grep pattern="Result<[^>]+>" type="rust"
|
|
264
|
+
|
|
265
|
+
# Error definitions
|
|
266
|
+
Grep pattern="#\[derive\([^)]*Error" type="rust"
|
|
267
|
+
Grep pattern="impl\s+.*Error\s+for" type="rust"
|
|
268
|
+
|
|
269
|
+
# ? operator usage
|
|
270
|
+
Grep pattern="\?\s*;" type="rust"
|
|
271
|
+
Grep pattern="\.ok\(\)\?" type="rust"
|
|
272
|
+
|
|
273
|
+
# unwrap/expect (potential panics)
|
|
274
|
+
Grep pattern="\.(unwrap|expect)\s*\(" type="rust"
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Async/Tokio
|
|
278
|
+
|
|
279
|
+
```
|
|
280
|
+
# Async functions
|
|
281
|
+
Grep pattern="async\s+fn" type="rust"
|
|
282
|
+
|
|
283
|
+
# Spawn tasks
|
|
284
|
+
Grep pattern="tokio::spawn\s*\(" type="rust"
|
|
285
|
+
Grep pattern="\.spawn\s*\(" type="rust"
|
|
286
|
+
|
|
287
|
+
# Await points
|
|
288
|
+
Grep pattern="\.await" type="rust"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Go
|
|
294
|
+
|
|
295
|
+
**LSP:** `gopls-lsp` - Full support for `.go`
|
|
296
|
+
|
|
297
|
+
### Project Structure (Common Locations)
|
|
298
|
+
|
|
299
|
+
| Looking For | Check First |
|
|
300
|
+
|-------------|-------------|
|
|
301
|
+
| Entry point | `main.go`, `cmd/*/main.go` |
|
|
302
|
+
| Configuration | `config/`, `internal/config/` |
|
|
303
|
+
| Handlers | `handlers/`, `internal/handlers/`, `api/` |
|
|
304
|
+
| Models | `models/`, `internal/models/`, `pkg/models/` |
|
|
305
|
+
| Utilities | `pkg/`, `internal/utils/`, `lib/` |
|
|
306
|
+
| Tests | `*_test.go` (same directory as source) |
|
|
307
|
+
| Interfaces | Often in same file or `interfaces.go` |
|
|
308
|
+
|
|
309
|
+
### Symbol Patterns (Grep Fallback)
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
# Function definition
|
|
313
|
+
Grep pattern="^func\s+FunctionName\s*\(" type="go"
|
|
314
|
+
|
|
315
|
+
# Method definition
|
|
316
|
+
Grep pattern="^func\s+\([^)]+\)\s+MethodName\s*\(" type="go"
|
|
317
|
+
|
|
318
|
+
# Struct definition
|
|
319
|
+
Grep pattern="^type\s+StructName\s+struct" type="go"
|
|
320
|
+
|
|
321
|
+
# Interface definition
|
|
322
|
+
Grep pattern="^type\s+InterfaceName\s+interface" type="go"
|
|
323
|
+
|
|
324
|
+
# Type alias
|
|
325
|
+
Grep pattern="^type\s+TypeName\s+=?\s+\w+" type="go"
|
|
326
|
+
|
|
327
|
+
# Constant block
|
|
328
|
+
Grep pattern="^const\s+\(" -A 20 output_mode="content" type="go"
|
|
329
|
+
|
|
330
|
+
# Variable block
|
|
331
|
+
Grep pattern="^var\s+\(" -A 20 output_mode="content" type="go"
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Dependency Tracing
|
|
335
|
+
|
|
336
|
+
```
|
|
337
|
+
# Import statements (in specific file)
|
|
338
|
+
Grep pattern="^\s*\".*\"" path="path/to/file.go" output_mode="content"
|
|
339
|
+
|
|
340
|
+
# Find interface implementations
|
|
341
|
+
Grep pattern="func\s+\([^)]+\s+\*?TypeName\)\s+" type="go"
|
|
342
|
+
|
|
343
|
+
# Find all calls to a function
|
|
344
|
+
Grep pattern="FunctionName\s*\(" type="go"
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### Error Handling
|
|
348
|
+
|
|
349
|
+
```
|
|
350
|
+
# Error checks
|
|
351
|
+
Grep pattern="if\s+err\s*!=\s*nil" type="go"
|
|
352
|
+
|
|
353
|
+
# Error returns
|
|
354
|
+
Grep pattern="return.*,?\s*err\s*$" type="go"
|
|
355
|
+
|
|
356
|
+
# Error wrapping
|
|
357
|
+
Grep pattern="(fmt\.Errorf|errors\.Wrap|errors\.New)\s*\(" type="go"
|
|
358
|
+
|
|
359
|
+
# Custom error types
|
|
360
|
+
Grep pattern="func\s+\([^)]+Error\)\s+Error\s*\(" type="go"
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Concurrency
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
# Goroutines
|
|
367
|
+
Grep pattern="go\s+func\s*\(" type="go"
|
|
368
|
+
Grep pattern="go\s+\w+\s*\(" type="go"
|
|
369
|
+
|
|
370
|
+
# Channels
|
|
371
|
+
Grep pattern="(make\s*\(\s*chan|<-\s*\w+|\w+\s*<-)" type="go"
|
|
372
|
+
|
|
373
|
+
# Mutex usage
|
|
374
|
+
Grep pattern="(\.Lock\(\)|\.Unlock\(\)|\.RLock\(\)|\.RUnlock\(\))" type="go"
|
|
375
|
+
|
|
376
|
+
# WaitGroup
|
|
377
|
+
Grep pattern="sync\.WaitGroup" type="go"
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### HTTP/Web
|
|
381
|
+
|
|
382
|
+
```
|
|
383
|
+
# Handler functions
|
|
384
|
+
Grep pattern="func.*http\.ResponseWriter.*\*http\.Request" type="go"
|
|
385
|
+
|
|
386
|
+
# Route registration
|
|
387
|
+
Grep pattern="\.(HandleFunc|Handle|Get|Post|Put|Delete)\s*\(" type="go"
|
|
388
|
+
|
|
389
|
+
# Middleware
|
|
390
|
+
Grep pattern="func.*http\.Handler.*http\.Handler" type="go"
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## C / C++
|
|
396
|
+
|
|
397
|
+
**LSP:** `clangd-lsp` - Full support for `.c`, `.cpp`, `.cc`, `.cxx`, `.h`, `.hpp`
|
|
398
|
+
|
|
399
|
+
### Project Structure (Common Locations)
|
|
400
|
+
|
|
401
|
+
| Looking For | Check First |
|
|
402
|
+
|-------------|-------------|
|
|
403
|
+
| Entry point | `main.cpp`, `main.c`, `src/main.cpp` |
|
|
404
|
+
| Headers | `include/`, `src/*.h`, `*.hpp` |
|
|
405
|
+
| Configuration | `CMakeLists.txt`, `Makefile`, `meson.build` |
|
|
406
|
+
| Tests | `tests/`, `test/`, `*_test.cpp` |
|
|
407
|
+
| Libraries | `lib/`, `src/lib/` |
|
|
408
|
+
|
|
409
|
+
### Symbol Patterns (Grep Fallback)
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
# Function definition
|
|
413
|
+
Grep pattern="^\s*(\w+\s+)+FunctionName\s*\(" glob="*.{c,cpp,cc,cxx}"
|
|
414
|
+
|
|
415
|
+
# Class definition
|
|
416
|
+
Grep pattern="^\s*class\s+ClassName" glob="*.{cpp,hpp,h}"
|
|
417
|
+
|
|
418
|
+
# Struct definition
|
|
419
|
+
Grep pattern="^\s*struct\s+StructName" glob="*.{c,cpp,h,hpp}"
|
|
420
|
+
|
|
421
|
+
# Template class
|
|
422
|
+
Grep pattern="^\s*template\s*<.*>\s*class\s+ClassName" glob="*.{cpp,hpp}"
|
|
423
|
+
|
|
424
|
+
# Namespace
|
|
425
|
+
Grep pattern="^\s*namespace\s+NamespaceName" glob="*.{cpp,hpp}"
|
|
426
|
+
|
|
427
|
+
# Macro definition
|
|
428
|
+
Grep pattern="^\s*#define\s+MACRO_NAME" glob="*.{c,cpp,h,hpp}"
|
|
429
|
+
|
|
430
|
+
# Include statements
|
|
431
|
+
Grep pattern="#include\s+[<\"].*[>\"]" glob="*.{c,cpp,h,hpp}"
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### Memory Management
|
|
435
|
+
|
|
436
|
+
```
|
|
437
|
+
# new/delete
|
|
438
|
+
Grep pattern="\b(new|delete)\s+" glob="*.{cpp,cc,cxx}"
|
|
439
|
+
|
|
440
|
+
# malloc/free
|
|
441
|
+
Grep pattern="\b(malloc|free|realloc|calloc)\s*\(" glob="*.{c,cpp}"
|
|
442
|
+
|
|
443
|
+
# Smart pointers
|
|
444
|
+
Grep pattern="(unique_ptr|shared_ptr|weak_ptr|make_unique|make_shared)" glob="*.{cpp,hpp}"
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## Java
|
|
450
|
+
|
|
451
|
+
**LSP:** `jdtls-lsp` - Full support for `.java`
|
|
452
|
+
|
|
453
|
+
### Project Structure (Common Locations)
|
|
454
|
+
|
|
455
|
+
| Looking For | Check First |
|
|
456
|
+
|-------------|-------------|
|
|
457
|
+
| Entry point | `**/Main.java`, `**/Application.java` |
|
|
458
|
+
| Configuration | `pom.xml`, `build.gradle`, `application.properties` |
|
|
459
|
+
| Controllers | `**/controller/`, `**/controllers/` |
|
|
460
|
+
| Services | `**/service/`, `**/services/` |
|
|
461
|
+
| Models | `**/model/`, `**/entity/`, `**/domain/` |
|
|
462
|
+
| Repositories | `**/repository/`, `**/dao/` |
|
|
463
|
+
| Tests | `src/test/`, `**/*Test.java` |
|
|
464
|
+
|
|
465
|
+
### Symbol Patterns (Grep Fallback)
|
|
466
|
+
|
|
467
|
+
```
|
|
468
|
+
# Class definition
|
|
469
|
+
Grep pattern="^\s*(public\s+)?(abstract\s+)?class\s+ClassName" type="java"
|
|
470
|
+
|
|
471
|
+
# Interface definition
|
|
472
|
+
Grep pattern="^\s*(public\s+)?interface\s+InterfaceName" type="java"
|
|
473
|
+
|
|
474
|
+
# Method definition
|
|
475
|
+
Grep pattern="^\s*(public|private|protected)?\s*(\w+\s+)+methodName\s*\(" type="java"
|
|
476
|
+
|
|
477
|
+
# Annotation usage
|
|
478
|
+
Grep pattern="^\s*@AnnotationName" type="java"
|
|
479
|
+
|
|
480
|
+
# Enum definition
|
|
481
|
+
Grep pattern="^\s*(public\s+)?enum\s+EnumName" type="java"
|
|
482
|
+
|
|
483
|
+
# Package declaration
|
|
484
|
+
Grep pattern="^package\s+[\w\.]+;" type="java"
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### Spring-Specific
|
|
488
|
+
|
|
489
|
+
```
|
|
490
|
+
# Controller endpoints
|
|
491
|
+
Grep pattern="@(GetMapping|PostMapping|PutMapping|DeleteMapping|RequestMapping)" type="java"
|
|
492
|
+
|
|
493
|
+
# Service/Component
|
|
494
|
+
Grep pattern="@(Service|Component|Repository|Controller|RestController)" type="java"
|
|
495
|
+
|
|
496
|
+
# Dependency injection
|
|
497
|
+
Grep pattern="@(Autowired|Inject)" type="java"
|
|
498
|
+
|
|
499
|
+
# Configuration
|
|
500
|
+
Grep pattern="@(Configuration|Bean|Value)" type="java"
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
## Kotlin
|
|
506
|
+
|
|
507
|
+
**LSP:** `kotlin-lsp` - Full support for `.kt`, `.kts`
|
|
508
|
+
|
|
509
|
+
### Project Structure (Common Locations)
|
|
510
|
+
|
|
511
|
+
| Looking For | Check First |
|
|
512
|
+
|-------------|-------------|
|
|
513
|
+
| Entry point | `**/Main.kt`, `**/Application.kt` |
|
|
514
|
+
| Configuration | `build.gradle.kts`, `settings.gradle.kts` |
|
|
515
|
+
| Data classes | `**/model/`, `**/dto/` |
|
|
516
|
+
| Tests | `src/test/`, `**/*Test.kt` |
|
|
517
|
+
|
|
518
|
+
### Symbol Patterns (Grep Fallback)
|
|
519
|
+
|
|
520
|
+
```
|
|
521
|
+
# Class definition
|
|
522
|
+
Grep pattern="^\s*(open\s+|abstract\s+|data\s+)?class\s+ClassName" type="kotlin"
|
|
523
|
+
|
|
524
|
+
# Function definition
|
|
525
|
+
Grep pattern="^\s*(suspend\s+)?fun\s+functionName" type="kotlin"
|
|
526
|
+
|
|
527
|
+
# Object declaration
|
|
528
|
+
Grep pattern="^\s*object\s+ObjectName" type="kotlin"
|
|
529
|
+
|
|
530
|
+
# Interface definition
|
|
531
|
+
Grep pattern="^\s*interface\s+InterfaceName" type="kotlin"
|
|
532
|
+
|
|
533
|
+
# Extension function
|
|
534
|
+
Grep pattern="^\s*fun\s+\w+\.extensionName" type="kotlin"
|
|
535
|
+
|
|
536
|
+
# Data class
|
|
537
|
+
Grep pattern="^\s*data\s+class\s+ClassName" type="kotlin"
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
---
|
|
541
|
+
|
|
542
|
+
## C#
|
|
543
|
+
|
|
544
|
+
**LSP:** `csharp-lsp` - Full support for `.cs`
|
|
545
|
+
|
|
546
|
+
### Project Structure (Common Locations)
|
|
547
|
+
|
|
548
|
+
| Looking For | Check First |
|
|
549
|
+
|-------------|-------------|
|
|
550
|
+
| Entry point | `Program.cs`, `Startup.cs` |
|
|
551
|
+
| Configuration | `*.csproj`, `appsettings.json`, `web.config` |
|
|
552
|
+
| Controllers | `Controllers/` |
|
|
553
|
+
| Models | `Models/`, `Entities/` |
|
|
554
|
+
| Services | `Services/` |
|
|
555
|
+
| Tests | `*.Tests/`, `**/*Tests.cs` |
|
|
556
|
+
|
|
557
|
+
### Symbol Patterns (Grep Fallback)
|
|
558
|
+
|
|
559
|
+
```
|
|
560
|
+
# Class definition
|
|
561
|
+
Grep pattern="^\s*(public\s+)?(partial\s+)?(abstract\s+)?class\s+ClassName" type="cs"
|
|
562
|
+
|
|
563
|
+
# Interface definition
|
|
564
|
+
Grep pattern="^\s*(public\s+)?interface\s+IInterfaceName" type="cs"
|
|
565
|
+
|
|
566
|
+
# Method definition
|
|
567
|
+
Grep pattern="^\s*(public|private|protected|internal)\s+(\w+\s+)+MethodName\s*\(" type="cs"
|
|
568
|
+
|
|
569
|
+
# Property definition
|
|
570
|
+
Grep pattern="^\s*(public|private|protected)\s+\w+\s+PropertyName\s*\{" type="cs"
|
|
571
|
+
|
|
572
|
+
# Namespace
|
|
573
|
+
Grep pattern="^\s*namespace\s+[\w\.]+" type="cs"
|
|
574
|
+
|
|
575
|
+
# Attribute usage
|
|
576
|
+
Grep pattern="^\s*\[AttributeName" type="cs"
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
### ASP.NET-Specific
|
|
580
|
+
|
|
581
|
+
```
|
|
582
|
+
# Controller actions
|
|
583
|
+
Grep pattern="\[(HttpGet|HttpPost|HttpPut|HttpDelete|Route)\]" type="cs"
|
|
584
|
+
|
|
585
|
+
# Dependency injection
|
|
586
|
+
Grep pattern="(services\.Add|IServiceCollection)" type="cs"
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
---
|
|
590
|
+
|
|
591
|
+
## Swift
|
|
592
|
+
|
|
593
|
+
**LSP:** `swift-lsp` - Full support for `.swift`
|
|
594
|
+
|
|
595
|
+
### Project Structure (Common Locations)
|
|
596
|
+
|
|
597
|
+
| Looking For | Check First |
|
|
598
|
+
|-------------|-------------|
|
|
599
|
+
| Entry point | `main.swift`, `App.swift`, `*App.swift` |
|
|
600
|
+
| Configuration | `Package.swift`, `*.xcodeproj` |
|
|
601
|
+
| Models | `Models/`, `*Model.swift` |
|
|
602
|
+
| Views | `Views/`, `*View.swift` |
|
|
603
|
+
| Controllers | `Controllers/`, `*ViewController.swift` |
|
|
604
|
+
| Tests | `Tests/`, `*Tests.swift` |
|
|
605
|
+
|
|
606
|
+
### Symbol Patterns (Grep Fallback)
|
|
607
|
+
|
|
608
|
+
```
|
|
609
|
+
# Class definition
|
|
610
|
+
Grep pattern="^\s*(public\s+|open\s+|final\s+)?class\s+ClassName" type="swift"
|
|
611
|
+
|
|
612
|
+
# Struct definition
|
|
613
|
+
Grep pattern="^\s*(public\s+)?struct\s+StructName" type="swift"
|
|
614
|
+
|
|
615
|
+
# Protocol definition
|
|
616
|
+
Grep pattern="^\s*(public\s+)?protocol\s+ProtocolName" type="swift"
|
|
617
|
+
|
|
618
|
+
# Function definition
|
|
619
|
+
Grep pattern="^\s*(public\s+|private\s+)?func\s+functionName" type="swift"
|
|
620
|
+
|
|
621
|
+
# Enum definition
|
|
622
|
+
Grep pattern="^\s*(public\s+)?enum\s+EnumName" type="swift"
|
|
623
|
+
|
|
624
|
+
# Extension
|
|
625
|
+
Grep pattern="^\s*extension\s+TypeName" type="swift"
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
---
|
|
629
|
+
|
|
630
|
+
## PHP
|
|
631
|
+
|
|
632
|
+
**LSP:** `php-lsp` - Full support for `.php`
|
|
633
|
+
|
|
634
|
+
### Project Structure (Common Locations)
|
|
635
|
+
|
|
636
|
+
| Looking For | Check First |
|
|
637
|
+
|-------------|-------------|
|
|
638
|
+
| Entry point | `index.php`, `public/index.php` |
|
|
639
|
+
| Configuration | `composer.json`, `config/`, `.env` |
|
|
640
|
+
| Controllers | `app/Http/Controllers/`, `src/Controller/` |
|
|
641
|
+
| Models | `app/Models/`, `src/Entity/` |
|
|
642
|
+
| Routes | `routes/`, `config/routes.php` |
|
|
643
|
+
| Tests | `tests/`, `**/*Test.php` |
|
|
644
|
+
|
|
645
|
+
### Symbol Patterns (Grep Fallback)
|
|
646
|
+
|
|
647
|
+
```
|
|
648
|
+
# Class definition
|
|
649
|
+
Grep pattern="^\s*(abstract\s+)?class\s+ClassName" type="php"
|
|
650
|
+
|
|
651
|
+
# Interface definition
|
|
652
|
+
Grep pattern="^\s*interface\s+InterfaceName" type="php"
|
|
653
|
+
|
|
654
|
+
# Trait definition
|
|
655
|
+
Grep pattern="^\s*trait\s+TraitName" type="php"
|
|
656
|
+
|
|
657
|
+
# Function definition
|
|
658
|
+
Grep pattern="^\s*(public|private|protected)?\s*function\s+functionName" type="php"
|
|
659
|
+
|
|
660
|
+
# Namespace
|
|
661
|
+
Grep pattern="^\s*namespace\s+[\w\\\\]+;" type="php"
|
|
662
|
+
|
|
663
|
+
# Use statements
|
|
664
|
+
Grep pattern="^\s*use\s+[\w\\\\]+;" type="php"
|
|
665
|
+
```
|
|
666
|
+
|
|
667
|
+
### Laravel-Specific
|
|
668
|
+
|
|
669
|
+
```
|
|
670
|
+
# Route definitions
|
|
671
|
+
Grep pattern="Route::(get|post|put|delete|patch)\s*\(" type="php"
|
|
672
|
+
|
|
673
|
+
# Eloquent models
|
|
674
|
+
Grep pattern="class\s+\w+\s+extends\s+Model" type="php"
|
|
675
|
+
|
|
676
|
+
# Blade directives
|
|
677
|
+
Grep pattern="@(if|foreach|extends|section|yield)" glob="*.blade.php"
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
---
|
|
681
|
+
|
|
682
|
+
## Lua
|
|
683
|
+
|
|
684
|
+
**LSP:** `lua-lsp` - Full support for `.lua`
|
|
685
|
+
|
|
686
|
+
### Project Structure (Common Locations)
|
|
687
|
+
|
|
688
|
+
| Looking For | Check First |
|
|
689
|
+
|-------------|-------------|
|
|
690
|
+
| Entry point | `main.lua`, `init.lua` |
|
|
691
|
+
| Configuration | `config.lua`, `.luacheckrc` |
|
|
692
|
+
| Modules | `lua/`, `lib/` |
|
|
693
|
+
| Tests | `spec/`, `tests/`, `*_spec.lua` |
|
|
694
|
+
|
|
695
|
+
### Symbol Patterns (Grep Fallback)
|
|
696
|
+
|
|
697
|
+
```
|
|
698
|
+
# Function definition (global)
|
|
699
|
+
Grep pattern="^\s*function\s+functionName\s*\(" type="lua"
|
|
700
|
+
|
|
701
|
+
# Function definition (local)
|
|
702
|
+
Grep pattern="^\s*local\s+function\s+functionName\s*\(" type="lua"
|
|
703
|
+
|
|
704
|
+
# Module table
|
|
705
|
+
Grep pattern="^\s*local\s+M\s*=\s*\{\}" type="lua"
|
|
706
|
+
|
|
707
|
+
# Require statement
|
|
708
|
+
Grep pattern="require\s*\(['\"]" type="lua"
|
|
709
|
+
|
|
710
|
+
# Return module
|
|
711
|
+
Grep pattern="^return\s+\w+" type="lua"
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
### Neovim-Specific
|
|
715
|
+
|
|
716
|
+
```
|
|
717
|
+
# Plugin setup
|
|
718
|
+
Grep pattern="\.setup\s*\(" type="lua"
|
|
719
|
+
|
|
720
|
+
# Keymaps
|
|
721
|
+
Grep pattern="vim\.keymap\.set" type="lua"
|
|
722
|
+
|
|
723
|
+
# Autocommands
|
|
724
|
+
Grep pattern="vim\.api\.nvim_create_autocmd" type="lua"
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
---
|
|
728
|
+
|
|
729
|
+
## Cross-Language Patterns
|
|
730
|
+
|
|
731
|
+
### Find All Entry Points
|
|
732
|
+
|
|
733
|
+
```
|
|
734
|
+
Grep pattern="(^func\s+main|^def\s+main|if\s+__name__.*__main__|^fn\s+main|int\s+main|void\s+main)" glob="*.{go,py,rs,c,cpp,java}"
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
### Find Configuration Loading
|
|
738
|
+
|
|
739
|
+
```
|
|
740
|
+
Grep pattern="(load.*config|read.*config|parse.*config|config\.(load|read|parse))" -i=true
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
### Find Database Queries
|
|
744
|
+
|
|
745
|
+
```
|
|
746
|
+
Grep pattern="(SELECT|INSERT|UPDATE|DELETE|\.query|\.execute|\.find|\.findOne|\.aggregate)" -i=true
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
### Find API Endpoints
|
|
750
|
+
|
|
751
|
+
```
|
|
752
|
+
Grep pattern="(@(app|router)\.(get|post)|\.HandleFunc|#\[route|path\(|@GetMapping|@PostMapping)"
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
### Find Test Files
|
|
756
|
+
|
|
757
|
+
```
|
|
758
|
+
Glob pattern="**/*test*"
|
|
759
|
+
Glob pattern="**/*spec*"
|
|
760
|
+
Glob pattern="**/*Test.*"
|
|
761
|
+
```
|