Commit 905f094
refactor(server): remove legacy InstructionsFunc / WithServerInstructions machinery
Skills are the only guidance surface going forward; the per-toolset
inline instruction system is no longer needed. This removes ~308 lines
of toolset instruction generation.
- Delete pkg/github/toolset_instructions.go (5 generate*ToolsetInstructions
helpers), pkg/inventory/instructions.go (generateInstructions aggregator),
and pkg/inventory/instructions_test.go (~265 lines of tests).
- Remove the InstructionsFunc field from inventory.ToolsetMetadata, and
drop it from the 5 toolsets that used it (Context, Issues, PullRequests,
Discussions, Projects).
- Remove the generateInstructions field, WithServerInstructions() method,
and the conditional in Builder.Build() that called generateInstructions(r).
- Remove the instructions field and Instructions() method from Inventory.
- Drop the .WithServerInstructions() call from NewStdioMCPServer
(internal/ghmcp/server.go) and from DefaultInventoryFactory (pkg/http/handler.go).
- Drop `Instructions: inv.Instructions(),` from the serverOpts assembled
in NewMCPServer (pkg/github/server.go).
Inspired by the cleanup in github#2374.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 86f0549 commit 905f094
10 files changed
Lines changed: 20 additions & 463 deletions
File tree
- internal/ghmcp
- pkg
- github
- http
- inventory
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | 146 | | |
148 | 147 | | |
149 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
55 | 53 | | |
56 | 54 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
| |||
97 | 94 | | |
98 | 95 | | |
99 | 96 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
104 | 100 | | |
105 | 101 | | |
106 | 102 | | |
| |||
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
120 | 115 | | |
121 | 116 | | |
122 | 117 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
289 | 287 | | |
290 | 288 | | |
291 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 53 | + | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 97 | | |
104 | 98 | | |
105 | 99 | | |
| |||
267 | 261 | | |
268 | 262 | | |
269 | 263 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | 264 | | |
275 | 265 | | |
276 | 266 | | |
| |||
This file was deleted.
0 commit comments