add-coder 0.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.
Files changed (97) hide show
  1. package/README.md +50 -0
  2. package/bin/add-coder.js +2 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +576 -0
  5. package/package.json +64 -0
  6. package/templates/adapters/claude/hooks/doc-format-guard.sh +17 -0
  7. package/templates/adapters/claude/hooks/notification.sh +9 -0
  8. package/templates/adapters/claude/hooks/permission-gate.sh +18 -0
  9. package/templates/adapters/claude/hooks/post-tool-failure.sh +10 -0
  10. package/templates/adapters/claude/hooks/post-tool-use.sh +18 -0
  11. package/templates/adapters/claude/hooks/pre-compact.sh +14 -0
  12. package/templates/adapters/claude/hooks/pre-tool-use.sh +28 -0
  13. package/templates/adapters/claude/hooks/prompt-submit.sh +16 -0
  14. package/templates/adapters/claude/hooks/review-checklist.sh +10 -0
  15. package/templates/adapters/claude/hooks/session-start.sh +23 -0
  16. package/templates/adapters/claude/hooks/stop-check.sh +10 -0
  17. package/templates/adapters/claude/hooks/subagent-guard.sh +15 -0
  18. package/templates/adapters/claude/mcp.json +13 -0
  19. package/templates/adapters/claude/settings.json +125 -0
  20. package/templates/adapters/qoder/hooks/doc-format-guard.sh +164 -0
  21. package/templates/adapters/qoder/hooks/lib/context-inject.sh +96 -0
  22. package/templates/adapters/qoder/hooks/lib/state-detect.sh +104 -0
  23. package/templates/adapters/qoder/hooks/lib/vocabulary.sh +49 -0
  24. package/templates/adapters/qoder/hooks/notification.sh +22 -0
  25. package/templates/adapters/qoder/hooks/permission-gate.sh +8 -0
  26. package/templates/adapters/qoder/hooks/post-tool-failure.sh +8 -0
  27. package/templates/adapters/qoder/hooks/post-tool-use.sh +20 -0
  28. package/templates/adapters/qoder/hooks/pre-compact.sh +12 -0
  29. package/templates/adapters/qoder/hooks/pre-tool-use.sh +77 -0
  30. package/templates/adapters/qoder/hooks/prompt-submit.sh +72 -0
  31. package/templates/adapters/qoder/hooks/review-checklist.sh +157 -0
  32. package/templates/adapters/qoder/hooks/session-start.sh +16 -0
  33. package/templates/adapters/qoder/hooks/stop-check.sh +71 -0
  34. package/templates/adapters/qoder/hooks/subagent-guard.sh +11 -0
  35. package/templates/adapters/qoder/mcp.json +13 -0
  36. package/templates/adapters/qoder/settings.json +125 -0
  37. package/templates/adapters/qoder/sync-policy.json +18 -0
  38. package/templates/adapters/vscode/extensions.json +5 -0
  39. package/templates/adapters/vscode/launch.json +16 -0
  40. package/templates/adapters/vscode/settings.json +16 -0
  41. package/templates/adapters/vscode/tasks.json +38 -0
  42. package/templates/core/agents/add-flow-guardian.md +276 -0
  43. package/templates/core/agents/add-orchestrator.md +217 -0
  44. package/templates/core/plans/2026-07/08/farm-agent-add-coder-npm-package-add-route-v1.md +323 -0
  45. package/templates/core/plans/2026-07/08/farm-agent-add-coder-npm-package-handoff-v1.md +678 -0
  46. package/templates/core/plans/2026-07/08/farm-agent-add-coder-npm-package-plan-v1.md +785 -0
  47. package/templates/core/prisma/add.prisma +34 -0
  48. package/templates/core/reports/REPORT-WORKFLOW.md +250 -0
  49. package/templates/core/reports/boundary-runtime-report.md +134 -0
  50. package/templates/core/reports/code-review-combined-report.md +227 -0
  51. package/templates/core/reports/code-review-fix-verification-report.md +505 -0
  52. package/templates/core/reports/code-review-suggestions.md +66 -0
  53. package/templates/core/reports/index.md +57 -0
  54. package/templates/core/reports/runtime-report/gateway.md +741 -0
  55. package/templates/core/rules/project_rules.md +905 -0
  56. package/templates/core/rules/theory-practice-map.toml +105 -0
  57. package/templates/core/scripts/mcp-server.ts +3492 -0
  58. package/templates/core/skills/add-paradigm/SKILL.md +1086 -0
  59. package/templates/core/skills/session-init/SKILL.md +215 -0
  60. package/templates/core/specs/farm-agent-add-coder-npm-package/checklist.md +125 -0
  61. package/templates/core/specs/farm-agent-add-coder-npm-package/spec.md +343 -0
  62. package/templates/core/specs/farm-agent-add-coder-npm-package/tasks.md +203 -0
  63. package/templates/core/templates/01-/346/236/266/346/236/204//343/200/212ADD/345/274/200/345/217/221/345/267/245/344/275/234/350/267/257/345/276/204/344/270/216/346/226/207/346/241/243/345/215/217/345/220/214/350/247/204/350/214/203/343/200/213.md +386 -0
  64. package/templates/core/templates/TERMINOLOGY.md +81 -0
  65. package/templates/core/templates/add-route-template-heavyweight.md +288 -0
  66. package/templates/core/templates/add-route-template.md +242 -0
  67. package/templates/core/templates/add-route-template.schema.json +35 -0
  68. package/templates/core/templates/checklist-template.md +72 -0
  69. package/templates/core/templates/checklist-template.schema.json +20 -0
  70. package/templates/core/templates/fix-verification-template.md +132 -0
  71. package/templates/core/templates/fix-verification-template.schema.json +54 -0
  72. package/templates/core/templates/handoff-multi-round-template.md +295 -0
  73. package/templates/core/templates/handoff-multi-round.schema.json +48 -0
  74. package/templates/core/templates/handoff-single-round-template.md +145 -0
  75. package/templates/core/templates/handoff-single-round.schema.json +92 -0
  76. package/templates/core/templates/index.md +60 -0
  77. package/templates/core/templates/report-template.md +126 -0
  78. package/templates/core/templates/report-template.schema.json +69 -0
  79. package/templates/core/templates/review-implementation-template.md +66 -0
  80. package/templates/core/templates/review-implementation-template.schema.json +58 -0
  81. package/templates/core/templates/review-runtime-template.md +73 -0
  82. package/templates/core/templates/review-runtime-template.schema.json +47 -0
  83. package/templates/core/templates/review-template.md +37 -0
  84. package/templates/core/templates/review-template.schema.json +42 -0
  85. package/templates/core/templates/runtime-report-template.md +73 -0
  86. package/templates/core/templates/runtime-report-template.schema.json +48 -0
  87. package/templates/core/templates/simple-plan-template.md +166 -0
  88. package/templates/core/templates/simple-plan-template.schema.json +109 -0
  89. package/templates/core/templates/spec-template.md +22 -0
  90. package/templates/core/templates/spec-template.schema.json +41 -0
  91. package/templates/core/templates/standard-plan-template.md +96 -0
  92. package/templates/core/templates/standard-plan-template.schema.json +73 -0
  93. package/templates/core/templates/tasks-template.md +54 -0
  94. package/templates/core/templates/tasks-template.schema.json +43 -0
  95. package/templates/core/tools/README.md +361 -0
  96. package/templates/core/vocabulary/add-governance-vocabulary.md +370 -0
  97. package/templates/shared/hooks-lib/common.sh +22 -0
@@ -0,0 +1,73 @@
1
+ {
2
+ "template": "standard-plan-template.md",
3
+ "sections": [
4
+ {
5
+ "id": "meta",
6
+ "heading": "## PLAN 元信息",
7
+ "required": true
8
+ },
9
+ {
10
+ "id": "background",
11
+ "heading": "## 一、背景与目标",
12
+ "required": true
13
+ },
14
+ {
15
+ "id": "approaches",
16
+ "heading": "## 二、方案选型",
17
+ "required": false
18
+ },
19
+ {
20
+ "id": "architecture",
21
+ "heading": "## 三、架构设计",
22
+ "required": true,
23
+ "subsections": [
24
+ {
25
+ "id": "arch-dataflow",
26
+ "heading": "### 3.1 数据流转"
27
+ },
28
+ {
29
+ "id": "arch-topology",
30
+ "heading": "### 3.2"
31
+ },
32
+ {
33
+ "id": "arch-model",
34
+ "heading": "### 3.3"
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "id": "steps",
40
+ "heading": "## 四、实施 Task + 依赖图",
41
+ "required": true
42
+ },
43
+ {
44
+ "id": "acceptance",
45
+ "heading": "## 五、验收标准",
46
+ "required": true
47
+ },
48
+ {
49
+ "id": "references",
50
+ "heading": "## 六、关联文档",
51
+ "required": true
52
+ }
53
+ ],
54
+ "placeholders": [
55
+ "{需求域名}",
56
+ "{核心内容}",
57
+ "{版本号}",
58
+ "{ISO 时间戳}",
59
+ "{AI 助手标识}",
60
+ "{英文名}",
61
+ "{序号}",
62
+ "{YYYY-MM}",
63
+ "{DD}",
64
+ "{版本}"
65
+ ],
66
+ "forbidden_terms": [
67
+ "Phase",
68
+ "Round",
69
+ "轮次",
70
+ "阶段",
71
+ "步骤"
72
+ ]
73
+ }
@@ -0,0 +1,54 @@
1
+ # Tasks
2
+
3
+ > **验证规范**:每个 Task 完成时必须附带验证证据(如 `tsc=0` / `vitest 18/18` / `grep确认`)。
4
+
5
+ ## Preconditions
6
+
7
+ - [ ] Plan 已生成
8
+ - [ ] Spec 已就绪
9
+
10
+ ## Forbidden
11
+
12
+ - 禁止修改业务逻辑以外的模块
13
+ - 禁止引入新依赖
14
+
15
+ ## Tasks
16
+
17
+ - [ ] Task 1: {任务描述} — 验证: (待填写)
18
+ - [ ] SubTask 1.1: {子任务描述}
19
+ - [ ] Task 2: {任务描述} — 验证: (待填写)
20
+
21
+ ## Task Dependencies
22
+
23
+ - Task 2 依赖 Task 1
24
+
25
+ ## Verification
26
+
27
+ - [ ] `npx tsc --noEmit` 通过
28
+ - [ ] `npx eslint src/` 零 error
29
+ # Tasks
30
+
31
+ > **验证规范**:每个 Task 完成时必须附带双检证据(`tsc=0` + `eslint 0 errors`,缺一不可)。可选补充 `vitest 18/18` / `grep确认`。
32
+
33
+
34
+ - [ ] Task 1.1: {任务描述} — 验证: (待填写)
35
+ - [ ] SubTask 1.1.1: {子任务描述}
36
+ - [ ] SubTask 1.1.2: {子任务描述}
37
+ - [ ] Task 1.2: {任务描述} — 验证: (待填写)
38
+
39
+
40
+ - [ ] Task 2.1: {任务描述} — 验证: (待填写)
41
+ - [ ] Task 2.2: {任务描述} — 验证: (待填写)
42
+ # Tasks
43
+
44
+ > **验证规范**:每个 Task 完成时必须附带验证证据(如 `tsc=0` / `vitest 18/18` / `grep确认`)。
45
+
46
+
47
+ - [ ] Task 1.1: {任务描述} — 验证: (待填写)
48
+ - [ ] SubTask 1.1.1: {子任务描述}
49
+ - [ ] SubTask 1.1.2: {子任务描述}
50
+ - [ ] Task 1.2: {任务描述} — 验证: (待填写)
51
+
52
+
53
+ - [ ] Task 2.1: {任务描述} — 验证: (待填写)
54
+ - [ ] Task 2.2: {任务描述} — 验证: (待填写)
@@ -0,0 +1,43 @@
1
+ {
2
+ "template": "tasks-template.md",
3
+ "sections": [
4
+ {
5
+ "id": "preconditions",
6
+ "heading": "## Preconditions",
7
+ "required": true
8
+ },
9
+ {
10
+ "id": "forbidden",
11
+ "heading": "## Forbidden",
12
+ "required": true
13
+ },
14
+ {
15
+ "id": "tasks",
16
+ "heading": "- [ ] Task",
17
+ "required": true
18
+ },
19
+ {
20
+ "id": "dependencies",
21
+ "heading": "## Task Dependencies",
22
+ "required": false
23
+ },
24
+ {
25
+ "id": "verification",
26
+ "heading": "## Verification",
27
+ "required": true
28
+ }
29
+ ],
30
+ "placeholders": [
31
+ "{功能名称}",
32
+ "{阶段名称}",
33
+ "{任务描述}",
34
+ "{子任务描述}"
35
+ ],
36
+ "forbidden_terms": [
37
+ "Phase",
38
+ "Step",
39
+ "Round",
40
+ "阶段",
41
+ "步骤"
42
+ ]
43
+ }
@@ -0,0 +1,361 @@
1
+ # IDE AI 编程工具定义机制
2
+
3
+ ## 现状分析
4
+
5
+ 当前 VS Code + Copilot 的工具调用机制存在明显局限:
6
+
7
+ ### 现有机制的限制
8
+ 1. **Skill/Rule 机制**:通过 markdown 文件定义,只能提供指导性工作流,无法执行实际代码
9
+ 2. **无 Code Tool Call**:AI 助手无法直接调用代码执行工具,只能生成代码建议
10
+ 3. **静态定义**:工具定义是静态的,无法根据上下文动态调整
11
+
12
+ ### 用户痛点
13
+ - AI 助手能分析问题,但无法直接执行验证、测试、部署等操作
14
+ - 需要手动复制粘贴 AI 生成的代码到终端执行
15
+ - 无法形成"分析→执行→验证"的闭环开发流程
16
+
17
+ ## 超越 Skill/Rule 的工具定义方案
18
+
19
+ ### 方案一:MCP (Model Context Protocol) 集成
20
+
21
+ **优势**:
22
+ - 标准化协议,支持多种工具类型
23
+ - 可以在 VS Code 中注册自定义工具
24
+ - 支持工具执行结果的结构化返回
25
+
26
+ **实现方式**:
27
+ ```typescript
28
+ // .vscode/settings.json
29
+ {
30
+ "mcp": {
31
+ "servers": {
32
+ "add-dev-tools": {
33
+ "command": "node",
34
+ "args": ["./scripts/mcp-server.js"],
35
+ "env": { "NODE_ENV": "development" }
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ // scripts/mcp-server.js - MCP 服务器
42
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js'
43
+
44
+ const server = new Server(
45
+ { name: 'add-dev-tools', version: '1.0.0' },
46
+ { capabilities: { tools: {} } }
47
+ )
48
+
49
+ // 注册 ADD 相关工具
50
+ server.setRequestHandler('tools/list', async () => {
51
+ return {
52
+ tools: [
53
+ {
54
+ name: 'add_audit_check',
55
+ description: '检查代码是否符合 ADD 范式审计要求',
56
+ inputSchema: {
57
+ type: 'object',
58
+ properties: {
59
+ filePath: { type: 'string' },
60
+ checkType: {
61
+ type: 'string',
62
+ enum: ['phase_symmetry', 'min_unit', 'failure_path']
63
+ }
64
+ }
65
+ }
66
+ },
67
+ {
68
+ name: 'add_test_runner',
69
+ description: '运行 ADD 范式的集成测试',
70
+ inputSchema: {
71
+ type: 'object',
72
+ properties: {
73
+ testType: { type: 'string', enum: ['unit', 'integration', 'audit'] }
74
+ }
75
+ }
76
+ },
77
+ {
78
+ name: 'add_code_generator',
79
+ description: '根据 ADD 范式生成审计驱动的代码模板',
80
+ inputSchema: {
81
+ type: 'object',
82
+ properties: {
83
+ featureName: { type: 'string' },
84
+ auditPhases: { type: 'array', items: { type: 'string' } }
85
+ }
86
+ }
87
+ }
88
+ ]
89
+ }
90
+ })
91
+
92
+ // 工具执行处理器
93
+ server.setRequestHandler('tools/call', async (request) => {
94
+ const { name, arguments: args } = request.params
95
+
96
+ switch (name) {
97
+ case 'add_audit_check':
98
+ return await checkAuditCompliance(args.filePath, args.checkType)
99
+ case 'add_test_runner':
100
+ return await runAddTests(args.testType)
101
+ case 'add_code_generator':
102
+ return await generateAddCode(args.featureName, args.auditPhases)
103
+ }
104
+ })
105
+ ```
106
+
107
+ ### 方案二:VS Code 扩展 API 自定义工具
108
+
109
+ **优势**:
110
+ - 深度集成 VS Code
111
+ - 可以访问编辑器状态、文件系统、终端等
112
+ - 支持复杂的 UI 交互
113
+
114
+ **实现方式**:
115
+ ```typescript
116
+ // src/extension.ts
117
+ import * as vscode from 'vscode'
118
+
119
+ export function activate(context: vscode.ExtensionContext) {
120
+ // 注册 ADD 工具提供者
121
+ const addToolProvider = new AddToolProvider()
122
+ context.subscriptions.push(
123
+ vscode.commands.registerCommand('add.runAuditCheck', async () => {
124
+ const result = await addToolProvider.runAuditCheck()
125
+ // 在输出面板显示结果
126
+ addToolProvider.showResults(result)
127
+ })
128
+ )
129
+
130
+ // 注册工具到 Copilot
131
+ vscode.commands.registerCommand('add.registerTools', () => {
132
+ // 通过 Copilot API 注册工具
133
+ registerCopilotTools([
134
+ {
135
+ name: 'audit_code_check',
136
+ description: '检查当前文件的 ADD 审计合规性',
137
+ parameters: {
138
+ type: 'object',
139
+ properties: {
140
+ checkType: { type: 'string', enum: ['all', 'phases', 'logs'] }
141
+ }
142
+ },
143
+ handler: async (params) => {
144
+ const activeEditor = vscode.window.activeTextEditor
145
+ if (!activeEditor) return { error: 'No active editor' }
146
+
147
+ const result = await checkFileAuditCompliance(
148
+ activeEditor.document.fileName,
149
+ params.checkType
150
+ )
151
+
152
+ return {
153
+ success: true,
154
+ result: result,
155
+ suggestions: generateFixSuggestions(result)
156
+ }
157
+ }
158
+ }
159
+ ])
160
+ })
161
+ }
162
+
163
+ class AddToolProvider {
164
+ async runAuditCheck(): Promise<AuditCheckResult> {
165
+ // 执行审计检查逻辑
166
+ const workspace = vscode.workspace.workspaceFolders?.[0]
167
+ if (!workspace) throw new Error('No workspace found')
168
+
169
+ // 扫描所有 TypeScript 文件
170
+ const files = await vscode.workspace.findFiles('src/**/*.ts', '**/node_modules/**')
171
+
172
+ const results = []
173
+ for (const file of files) {
174
+ const content = await vscode.workspace.fs.readFile(file)
175
+ const auditResult = await checkFileAuditCompliance(file.fsPath, content.toString())
176
+ results.push({ file: file.fsPath, ...auditResult })
177
+ }
178
+
179
+ return { files: results }
180
+ }
181
+
182
+ showResults(result: AuditCheckResult) {
183
+ // 在输出面板显示结果
184
+ const output = vscode.window.createOutputChannel('ADD Audit Check')
185
+ output.clear()
186
+ output.appendLine('=== ADD 审计合规性检查结果 ===\n')
187
+
188
+ for (const fileResult of result.files) {
189
+ output.appendLine(`📄 ${fileResult.file}`)
190
+ output.appendLine(` ✅ 阶段对称: ${fileResult.phaseSymmetry ? '通过' : '失败'}`)
191
+ output.appendLine(` ✅ 最小单元: ${fileResult.minUnit ? '通过' : '失败'}`)
192
+ output.appendLine(` ✅ 失败路径: ${fileResult.failurePath ? '通过' : '失败'}`)
193
+ output.appendLine('')
194
+ }
195
+
196
+ output.show()
197
+ }
198
+ }
199
+ ```
200
+
201
+ ### 方案三:自定义工具注册协议
202
+
203
+ **优势**:
204
+ - 轻量级实现
205
+ - 不依赖外部协议
206
+ - 易于扩展和维护
207
+
208
+ **实现方式**:
209
+ ```typescript
210
+ // .qoder/tools/index.ts - 工具注册中心
211
+ export interface ToolDefinition {
212
+ name: string
213
+ description: string
214
+ category: 'audit' | 'codegen' | 'test' | 'deploy'
215
+ parameters: ToolParameter[]
216
+ handler: ToolHandler
217
+ requiresConfirmation?: boolean
218
+ }
219
+
220
+ export interface ToolParameter {
221
+ name: string
222
+ type: 'string' | 'number' | 'boolean' | 'enum'
223
+ description: string
224
+ required: boolean
225
+ enum?: string[]
226
+ }
227
+
228
+ export type ToolHandler = (params: Record<string, any>) => Promise<ToolResult>
229
+
230
+ export interface ToolResult {
231
+ success: boolean
232
+ data?: any
233
+ error?: string
234
+ logs?: string[]
235
+ }
236
+
237
+ // 注册 ADD 工具
238
+ export const ADD_TOOLS: ToolDefinition[] = [
239
+ {
240
+ name: 'audit_compliance_check',
241
+ description: '检查代码是否符合 ADD 范式审计要求',
242
+ category: 'audit',
243
+ parameters: [
244
+ {
245
+ name: 'target',
246
+ type: 'enum',
247
+ description: '检查目标',
248
+ required: true,
249
+ enum: ['current_file', 'workspace', 'specific_file']
250
+ },
251
+ {
252
+ name: 'filePath',
253
+ type: 'string',
254
+ description: '指定文件路径(当 target 为 specific_file 时)',
255
+ required: false
256
+ }
257
+ ],
258
+ handler: async (params) => {
259
+ try {
260
+ const result = await runAuditCheck(params)
261
+ return { success: true, data: result }
262
+ } catch (error) {
263
+ return { success: false, error: error.message }
264
+ }
265
+ }
266
+ },
267
+ {
268
+ name: 'generate_add_code',
269
+ description: '生成符合 ADD 范式的代码模板',
270
+ category: 'codegen',
271
+ parameters: [
272
+ {
273
+ name: 'featureName',
274
+ type: 'string',
275
+ description: '功能名称',
276
+ required: true
277
+ },
278
+ {
279
+ name: 'phases',
280
+ type: 'string',
281
+ description: '审计阶段(逗号分隔)',
282
+ required: true
283
+ }
284
+ ],
285
+ handler: async (params) => {
286
+ const code = generateAddCodeTemplate(params.featureName, params.phases.split(','))
287
+ return { success: true, data: { code } }
288
+ }
289
+ }
290
+ ]
291
+
292
+ // 工具执行引擎
293
+ export class ToolExecutor {
294
+ private tools = new Map<string, ToolDefinition>()
295
+
296
+ registerTool(tool: ToolDefinition) {
297
+ this.tools.set(tool.name, tool)
298
+ }
299
+
300
+ async executeTool(name: string, params: Record<string, any>): Promise<ToolResult> {
301
+ const tool = this.tools.get(name)
302
+ if (!tool) {
303
+ return { success: false, error: `Tool '${name}' not found` }
304
+ }
305
+
306
+ // 参数验证
307
+ const validation = validateParameters(tool.parameters, params)
308
+ if (!validation.valid) {
309
+ return { success: false, error: validation.error }
310
+ }
311
+
312
+ // 确认执行(如果需要)
313
+ if (tool.requiresConfirmation) {
314
+ const confirmed = await requestUserConfirmation(tool.name, params)
315
+ if (!confirmed) {
316
+ return { success: false, error: 'User cancelled execution' }
317
+ }
318
+ }
319
+
320
+ // 执行工具
321
+ try {
322
+ const result = await tool.handler(params)
323
+ return result
324
+ } catch (error) {
325
+ return { success: false, error: error.message }
326
+ }
327
+ }
328
+ }
329
+
330
+ // Copilot 集成
331
+ export function integrateWithCopilot(executor: ToolExecutor) {
332
+ // 通过 VS Code API 或 MCP 注册工具到 Copilot
333
+ // AI 助手可以调用这些工具
334
+ }
335
+ ```
336
+
337
+ ## 实施建议
338
+
339
+ ### 阶段一:MCP 集成(推荐首选)
340
+ 1. 实现基本的 MCP 服务器
341
+ 2. 注册核心 ADD 工具(审计检查、代码生成、测试运行)
342
+ 3. 在 VS Code 中配置 MCP 服务器
343
+
344
+ ### 阶段二:扩展 API 深度集成
345
+ 1. 开发 VS Code 扩展
346
+ 2. 实现工具 UI 和结果展示
347
+ 3. 添加代码修复建议功能
348
+
349
+ ### 阶段三:生态建设
350
+ 1. 定义工具开发规范
351
+ 2. 建立工具市场/共享机制
352
+ 3. 完善工具生命周期管理
353
+
354
+ ## 与 Skill/Rule 的关系
355
+
356
+ - **Skill/Rule**:提供指导性工作流和约束规则
357
+ - **Tools**:提供可执行的代码操作能力
358
+ - **互补关系**:Skill 定义"应该怎么做",Tools 提供"怎么执行"
359
+
360
+ 通过 Tools 机制,可以让 AI 助手从"只能建议代码"升级为"可以直接执行开发操作",形成真正的 AI 编程助手生态。</content>
361
+ <parameter name="filePath">{{projectRoot}}/.qoder/tools/README.md