You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+24-12Lines changed: 24 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,14 @@ This is the **GitHub MCP Server**, a Model Context Protocol (MCP) server that co
11
11
-**Secondary Package:** mcpcurl (testing utility - don't break it, but not the priority)
12
12
-**Framework:** Uses mark3labs/mcp-go for MCP protocol, google/go-github for GitHub API
13
13
-**Size:**~60MB repository, 70 Go files
14
+
-**Library Usage:** This repository is also used as a library by the remote server. Functions that could be called by other repositories should be exported (capitalized), even if not required internally. Preserve existing export patterns.
15
+
16
+
**Code Quality Standards:**
17
+
-**Popular Open Source Repository** - High bar for code quality and clarity
18
+
-**Comprehension First** - Code must be clear to a wide audience
19
+
-**Clean Commits** - Atomic, focused changes with clear messages
20
+
-**Structure** - Always maintain or improve, never degrade
21
+
-**Code over Comments** - Prefer self-documenting code; comment only when necessary
14
22
15
23
##Critical Build & Validation Steps
16
24
@@ -166,11 +174,14 @@ All workflows run on push/PR unless noted. Located in `.github/workflows/`:
166
174
###Code Patterns
167
175
168
176
-**Keep changes minimal and focused** on the specific issue being addressed
169
-
- Prefer explicit over clever code
177
+
-**Prefer clarity over cleverness** - code must be understandable by a wide audience
178
+
-**Atomic commits** - each commit should be a complete, logical change
179
+
-**Maintain or improve structure** - never degrade code organization
170
180
- Use table-driven tests for behavioral testing
171
181
- Comment sparingly - code should be self-documenting
172
182
- Follow standard Go conventions (Effective Go, Go proverbs)
173
183
-**Test changes thoroughly** before committing
184
+
- Export functions (capitalize) if they could be used by other repos as a library
174
185
175
186
##Common Development Workflows
176
187
@@ -267,14 +278,15 @@ server.json - MCP server registry metadata
267
278
##Important Reminders
268
279
269
280
1.**PRIMARY FOCUS:** The local stdio MCP server (github-mcp-server) - this is what you should work on and test with
270
-
2.**ALWAYS** trust these instructions first - only search if information is incomplete or incorrect
271
-
3.**NEVER** use`script/tag-release` or push tags
272
-
4.**NEVER** skip`script/lint` before committing Go code changes
273
-
5.**ALWAYS** update toolsnaps when changing MCP tool schemas
274
-
6.**ALWAYS** run`script/generate-docs` after modifying tools
275
-
7. For specific test files, use`go test ./path -run TestName` not full suite
276
-
8. E2E tests require PAT token - you likely cannot run them
277
-
9. Toolsnaps are API documentation - treat changes seriously
278
-
10. Build/test/lint are very fast (~1s each) - run frequently
279
-
11. CI failures for docs-check or license-check have simple fixes (run the script)
280
-
12. mcpcurl is secondary - don't break it, but it's not the priority
281
+
2.**REMOTE SERVER:** Ignore remote server instructions when making code changes (unless specifically asked). This repo is used as a library by the remote server, so keep functions exported (capitalized) if they could be called by other repos, even if not needed internally.
282
+
3.**ALWAYS** trust these instructions first - only search if information is incomplete or incorrect
283
+
4.**NEVER** use`script/tag-release` or push tags
284
+
5.**NEVER** skip`script/lint` before committing Go code changes
285
+
6.**ALWAYS** update toolsnaps when changing MCP tool schemas
286
+
7.**ALWAYS** run`script/generate-docs` after modifying tools
287
+
8. For specific test files, use`go test ./path -run TestName` not full suite
288
+
9. E2E tests require PAT token - you likely cannot run them
289
+
10. Toolsnaps are API documentation - treat changes seriously
290
+
11. Build/test/lint are very fast (~1s each) - run frequently
291
+
12. CI failures for docs-check or license-check have simple fixes (run the script)
292
+
13. mcpcurl is secondary - don't break it, but it's not the priority