@@ -270,6 +270,50 @@ if errors.Is(err, errInvalidPKCE) {
270
270
- Test both positive and negative cases
271
271
- Use ` testutil.WaitLong` for timeouts in tests
272
272
273
+ ## Code Navigation and Investigation
274
+
275
+ ### Using Go LSP Tools
276
+
277
+ When working with the Coder codebase, leverage Go Language Server Protocol tools for efficient code navigation:
278
+
279
+ 1 . **Find function definitions**:
280
+
281
+ ` ` ` none
282
+ mcp__go-language-server__definition symbolName
283
+ ` ` `
284
+
285
+ - Example : ` mcp__go-language-server__definition getOAuth2ProviderAppAuthorize`
286
+ - Quickly jump to function implementations across packages
287
+
288
+ 2 . **Find symbol references**:
289
+
290
+ ` ` ` none
291
+ mcp__go-language-server__references symbolName
292
+ ` ` `
293
+
294
+ - Locate all usages of functions, types, or variables
295
+ - Understand code dependencies and call patterns
296
+
297
+ 3 . **Get symbol information**:
298
+
299
+ ` ` ` none
300
+ mcp__go-language-server__hover filePath line column
301
+ ` ` `
302
+
303
+ - Get type information and documentation at specific positions
304
+
305
+ 4 . **When to use LSP vs other tools**:
306
+ - **Use LSP for **: Following function calls, understanding package relationships, finding specific implementations
307
+ - **Use Grep for **: Text -based searches, finding patterns across files
308
+ - **Use Bash for **: Simple file operations, running tests, git commands
309
+
310
+ ### Investigation Strategy
311
+
312
+ 1 . **Start with route registration** in ` coderd/coderd.go` to understand API endpoints
313
+ 2 . **Use LSP definition lookup** to trace from route handlers to actual implementations
314
+ 3 . **Follow the middleware chain** to understand request processing flow
315
+ 4 . **Check test files** for expected behavior and error patterns
316
+
273
317
## Testing Scripts
274
318
275
319
### OAuth2 Test Scripts
0 commit comments