full-stack-coding-assistant-agent 0.1.0__py3-none-any.whl
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.
- agents/__init__.py +0 -0
- agents/audit_agent.py +223 -0
- agents/backend_agent.py +179 -0
- agents/base_agent.py +406 -0
- agents/frontend_agent.py +148 -0
- agents/test_agent.py +155 -0
- coordinator/__init__.py +0 -0
- coordinator/coordinator.py +452 -0
- coordinator/dag.py +147 -0
- executor/__init__.py +0 -0
- executor/cb_integration.py +160 -0
- full_stack_coding_assistant_agent/__init__.py +6 -0
- full_stack_coding_assistant_agent/cli.py +10 -0
- full_stack_coding_assistant_agent/main.py +686 -0
- full_stack_coding_assistant_agent-0.1.0.dist-info/METADATA +849 -0
- full_stack_coding_assistant_agent-0.1.0.dist-info/RECORD +31 -0
- full_stack_coding_assistant_agent-0.1.0.dist-info/WHEEL +5 -0
- full_stack_coding_assistant_agent-0.1.0.dist-info/entry_points.txt +2 -0
- full_stack_coding_assistant_agent-0.1.0.dist-info/top_level.txt +7 -0
- model/__init__.py +0 -0
- model/config.py +62 -0
- model/model_router.py +150 -0
- storage/__init__.py +0 -0
- storage/context_db.py +274 -0
- utils/__init__.py +0 -0
- utils/agent_selector.py +243 -0
- utils/config_validator.py +143 -0
- utils/logger.py +95 -0
- utils/output_manager.py +1572 -0
- utils/pdf_reader.py +122 -0
- utils/version.py +188 -0
|
@@ -0,0 +1,849 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: full-stack-coding-assistant-agent
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: 企业级全栈代码助手智能体 - 多智能体协作架构
|
|
5
|
+
Author-email: Kingsdom005 <liyanqi@example.com>
|
|
6
|
+
Maintainer-email: Kingsdom005 <liyanqi@example.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/Kingsdom005/full-stack-coding-assistant-agent
|
|
9
|
+
Project-URL: Repository, https://github.com/Kingsdom005/full-stack-coding-assistant-agent
|
|
10
|
+
Project-URL: Issue Tracker, https://github.com/Kingsdom005/full-stack-coding-assistant-agent/issues
|
|
11
|
+
Keywords: ai,agent,coding-assistant,multi-agent,llm,code-generation
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Information Technology
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Requires-Python: <3.15,>=3.11
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
Requires-Dist: litellm>=1.0.0
|
|
24
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
25
|
+
Requires-Dist: pyyaml>=6.0
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
29
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
30
|
+
Requires-Dist: isort>=5.12.0; extra == "dev"
|
|
31
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
32
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
33
|
+
|
|
34
|
+
# Full-Stack Coding Assistant Agent
|
|
35
|
+
|
|
36
|
+
企业级全栈代码助手智能体 - 多智能体协作架构
|
|
37
|
+
|
|
38
|
+
## 🐍 Python 版本要求
|
|
39
|
+
|
|
40
|
+
- **最低版本**: Python 3.11
|
|
41
|
+
- **推荐版本**: Python 3.13+ (性能最优)
|
|
42
|
+
- **已测试版本**: 3.11, 3.12, 3.13
|
|
43
|
+
|
|
44
|
+
### 检查 Python 版本
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
python --version
|
|
48
|
+
# 或
|
|
49
|
+
python3 --version
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 创建虚拟环境 (Python 3.13+)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 使用 venv (推荐)
|
|
56
|
+
python -m venv venv
|
|
57
|
+
source venv/bin/activate
|
|
58
|
+
|
|
59
|
+
# 或使用 conda
|
|
60
|
+
conda create -n coding-agent python=3.13
|
|
61
|
+
conda activate coding-agent
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 📦 安装
|
|
67
|
+
|
|
68
|
+
### 方法 1: 使用 pip 安装(推荐)
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# 安装最新稳定版本
|
|
72
|
+
pip install full-stack-coding-assistant-agent
|
|
73
|
+
|
|
74
|
+
# 安装指定版本
|
|
75
|
+
pip install full-stack-coding-assistant-agent==0.1.0
|
|
76
|
+
|
|
77
|
+
# 安装预发布版本
|
|
78
|
+
pip install --pre full-stack-coding-assistant-agent
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
安装后,可以使用 `fscaa` 命令启动工具:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
fscaa "开发一个用户登录功能"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 方法 2: 从源码安装
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
git clone git@github.com:Kingsdom005/full-stack-coding-assistant-agent.git
|
|
91
|
+
cd full-stack-coding-assistant-agent
|
|
92
|
+
pip install -e ".[dev]"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 架构概述
|
|
98
|
+
|
|
99
|
+
本项目实现了一个基于多智能体架构的企业级全栈代码助手,包含以下核心组件:
|
|
100
|
+
|
|
101
|
+
- **Coordinator** - 轻量级协调器,负责任务拆解和调度
|
|
102
|
+
- **Frontend Agent** - 前端专家智能体
|
|
103
|
+
- **Backend Agent** - 后端专家智能体
|
|
104
|
+
- **Test Agent** - 测试专家智能体
|
|
105
|
+
- **Audit Agent** - 代码审计智能体
|
|
106
|
+
|
|
107
|
+
## 技术栈
|
|
108
|
+
|
|
109
|
+
- **LiteLLM** - 统一大模型接口,支持多模型切换和 Fallback
|
|
110
|
+
- **SQLite** - 零部署嵌入式数据库 (Python 3.13+ 内置支持)
|
|
111
|
+
- **CodeBuddy CLI** - 代码执行和沙箱环境
|
|
112
|
+
|
|
113
|
+
## 项目结构
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
full-stack-coding-assistant-agent/
|
|
117
|
+
├── full_stack_coding_assistant_agent/ # Python 包
|
|
118
|
+
│ ├── __init__.py # 包初始化
|
|
119
|
+
│ ├── cli.py # CLI 入口
|
|
120
|
+
│ ├── main.py # 主入口文件
|
|
121
|
+
│ ├── coordinator/ # 协调器和调度器
|
|
122
|
+
│ │ ├── coordinator.py # 主协调器
|
|
123
|
+
│ │ └── dag.py # DAG 任务调度器
|
|
124
|
+
│ ├── agents/ # 智能体模块
|
|
125
|
+
│ │ ├── base_agent.py # Agent 基类
|
|
126
|
+
│ │ ├── frontend_agent.py
|
|
127
|
+
│ │ ├── backend_agent.py
|
|
128
|
+
│ │ ├── test_agent.py
|
|
129
|
+
│ │ └── audit_agent.py
|
|
130
|
+
│ ├── model/ # 模型路由
|
|
131
|
+
│ │ ├── model_router.py # LiteLLM 封装
|
|
132
|
+
│ │ └── config.py # 模型配置
|
|
133
|
+
│ ├── storage/ # 数据存储
|
|
134
|
+
│ │ ├── context_db.py # SQLite 操作封装
|
|
135
|
+
│ │ └── schema.sql # 数据库表结构
|
|
136
|
+
│ ├── executor/ # 代码执行器
|
|
137
|
+
│ │ └── cb_integration.py # CodeBuddy CLI 集成
|
|
138
|
+
│ └── utils/ # 工具模块
|
|
139
|
+
│ ├── version.py # 版本管理工具
|
|
140
|
+
│ └── ...
|
|
141
|
+
├── .github/workflows/ # GitHub Actions 工作流
|
|
142
|
+
│ ├── ci.yml # CI 工作流
|
|
143
|
+
│ └── cd.yml # CD 工作流
|
|
144
|
+
├── VERSION # 版本号文件
|
|
145
|
+
├── CHANGELOG.md # 变更日志
|
|
146
|
+
├── config.yaml # 应用配置
|
|
147
|
+
├── run.sh # 运行脚本
|
|
148
|
+
├── requirements.txt # 依赖清单
|
|
149
|
+
├── pyproject.toml # 项目元数据
|
|
150
|
+
├── .env.example # 环境变量模板
|
|
151
|
+
└── README.md # 项目说明
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 🚀 快速开始
|
|
155
|
+
|
|
156
|
+
### 1. 克隆项目
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
git clone git@github.com:Kingsdom005/full-stack-coding-assistant-agent.git
|
|
160
|
+
cd full-stack-coding-assistant-agent
|
|
161
|
+
git checkout develop # 切换到开发分支
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### 2. 创建虚拟环境 (Python 3.13+)
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# 方法 1: 使用 venv
|
|
168
|
+
python -m venv venv
|
|
169
|
+
source venv/bin/activate # Linux/Mac
|
|
170
|
+
# 或
|
|
171
|
+
venv\Scripts\activate # Windows
|
|
172
|
+
|
|
173
|
+
# 方法 2: 使用 conda
|
|
174
|
+
conda create -n coding-agent python=3.13
|
|
175
|
+
conda activate coding-agent
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### 3. 安装依赖
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
pip install -r requirements.txt
|
|
182
|
+
# 或
|
|
183
|
+
pip install -e ".[dev]" # 包含开发依赖
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### 4. 配置环境变量
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
cp .env.example .env
|
|
190
|
+
vim .env # 编辑 .env,填写 TENCENT_API_KEY
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**.env 文件最少配置:**
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
TENCENT_API_KEY=sk-your_actual_key_here
|
|
197
|
+
TENCENT_API_BASE=https://api.hunyuan.cloud.tencent.com/hyllm/v1
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### 5. 运行项目
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# 方法 1: 直接运行
|
|
204
|
+
python main.py "开发一个用户登录功能" "包含前后端实现"
|
|
205
|
+
|
|
206
|
+
# 方法 2: 使用运行脚本
|
|
207
|
+
chmod +x run.sh
|
|
208
|
+
./run.sh "开发一个用户登录功能" "包含前后端实现"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## 🔧 配置说明
|
|
214
|
+
|
|
215
|
+
### 模型配置 (`model/config.py`)
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
MODEL_CONFIG = {
|
|
219
|
+
"default": "hunyuan-lite",
|
|
220
|
+
"agents": {
|
|
221
|
+
"frontend": "hunyuan-lite", # 前端 Agent 使用轻量模型
|
|
222
|
+
"backend": "hunyuan-standard", # 后端 Agent 使用标准模型
|
|
223
|
+
"test": "hunyuan-lite", # 测试 Agent 使用轻量模型
|
|
224
|
+
"audit": "hunyuan-pro", # 审计 Agent 使用专业模型
|
|
225
|
+
},
|
|
226
|
+
"tencent": {
|
|
227
|
+
"api_base": "https://api.hunyuan.cloud.tencent.com/hyllm/v1",
|
|
228
|
+
"api_key": os.getenv("TENCENT_API_KEY"),
|
|
229
|
+
},
|
|
230
|
+
"fallback_chain": ["hunyuan-lite", "hunyuan-standard"],
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### 获取 API Key
|
|
235
|
+
|
|
236
|
+
1. 访问 [腾讯云控制台](https://console.cloud.tencent.com/)
|
|
237
|
+
2. 进入 "混元大模型" 产品页
|
|
238
|
+
3. 创建应用并获取 API Key
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 📊 运行示例
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# 示例 1: 开发登录功能
|
|
246
|
+
python main.py "开发一个用户登录功能" "包含前后端实现,支持 JWT 认证"
|
|
247
|
+
|
|
248
|
+
# 示例 2: 开发 RESTful API
|
|
249
|
+
python main.py "开发一个博客 API" "支持 CRUD 操作,使用 FastAPI"
|
|
250
|
+
|
|
251
|
+
# 示例 3: 修复 Bug
|
|
252
|
+
python main.py "修复用户注册 Bug" "邮箱验证不生效"
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**输出示例:**
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
============================================================
|
|
259
|
+
全栈代码助手智能体 (Full-Stack Coding Assistant Agent)
|
|
260
|
+
============================================================
|
|
261
|
+
|
|
262
|
+
[1/3] 初始化协调器...
|
|
263
|
+
[2/3] 提交任务: 开发一个用户登录功能
|
|
264
|
+
主任务 ID: task_a1b2c3d4
|
|
265
|
+
|
|
266
|
+
[3/3] 开始执行任务...
|
|
267
|
+
------------------------------------------------------------
|
|
268
|
+
[backend] 执行中...
|
|
269
|
+
[frontend] 执行中...
|
|
270
|
+
[test] 执行中...
|
|
271
|
+
[audit] 执行中...
|
|
272
|
+
------------------------------------------------------------
|
|
273
|
+
|
|
274
|
+
执行结果:
|
|
275
|
+
============================================================
|
|
276
|
+
|
|
277
|
+
[task_a1b2c3d4_backend]:
|
|
278
|
+
状态: completed
|
|
279
|
+
|
|
280
|
+
[task_a1b2c3d4_frontend]:
|
|
281
|
+
状态: completed
|
|
282
|
+
|
|
283
|
+
[task_a1b2c3d4_test]:
|
|
284
|
+
状态: completed
|
|
285
|
+
|
|
286
|
+
[task_a1b2c3d4_audit]:
|
|
287
|
+
状态: completed
|
|
288
|
+
|
|
289
|
+
任务状态汇总:
|
|
290
|
+
============================================================
|
|
291
|
+
backend: completed
|
|
292
|
+
frontend: completed
|
|
293
|
+
test: completed
|
|
294
|
+
audit: completed
|
|
295
|
+
|
|
296
|
+
完成!
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## 🏗️ 架构设计
|
|
302
|
+
|
|
303
|
+
### 分层混合架构
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
┌─────────────────────────────────────────┐
|
|
307
|
+
│ User / API Layer │
|
|
308
|
+
└──────────────────┬──────────────────────┘
|
|
309
|
+
│
|
|
310
|
+
┌─────────────────────────────────────────┐
|
|
311
|
+
│ Coordinator (Lite) │
|
|
312
|
+
│ - 任务拆解 - DAG 调度 - 上下文管理 │
|
|
313
|
+
└──────────────────┬──────────────────────┘
|
|
314
|
+
│
|
|
315
|
+
┌──────────┼──────────┐
|
|
316
|
+
│ │ │
|
|
317
|
+
┌───────▼───┐ ┌───▼──────┐ ┌▼──────────┐
|
|
318
|
+
│ Frontend │ │ Backend │ │ Test │
|
|
319
|
+
│ Agent │ │ Agent │ │ Agent │
|
|
320
|
+
└───────────┘ └──────────┘ └───────────┘
|
|
321
|
+
│
|
|
322
|
+
┌───────────────────────────────────▼─────┐
|
|
323
|
+
│ Audit Agent │
|
|
324
|
+
│ (异步审计,不阻塞主流程) │
|
|
325
|
+
└─────────────────────────────────────────┘
|
|
326
|
+
|
|
327
|
+
共享上下文 (SQLite)
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### 模型路由策略
|
|
331
|
+
|
|
332
|
+
- 默认使用腾讯混元免费模型 (`hunyuan-lite`)
|
|
333
|
+
- 各 Agent 可配置不同模型
|
|
334
|
+
- 支持 Fallback 链式降级
|
|
335
|
+
|
|
336
|
+
### 数据存储设计
|
|
337
|
+
|
|
338
|
+
使用 SQLite 零部署方案 (Python 3.13+ 内置支持),设计四张核心表:
|
|
339
|
+
|
|
340
|
+
- `tasks` - 任务记录
|
|
341
|
+
- `code_changes` - 代码变更记录
|
|
342
|
+
- `api_contracts` - 前后端接口契约
|
|
343
|
+
- `audit_reports` - 审计意见
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
#### Mermaid 架构图(GitHub 可自动渲染)
|
|
348
|
+
|
|
349
|
+
```mermaid
|
|
350
|
+
graph BT
|
|
351
|
+
A["用户 / CLI"] --> B["Main Entry (main.py)"]
|
|
352
|
+
B --> C["Coordinator"]
|
|
353
|
+
C --> D["DAGScheduler"]
|
|
354
|
+
D --> E["BackendAgent"]
|
|
355
|
+
D --> F["FrontendAgent"]
|
|
356
|
+
D --> G["TestAgent"]
|
|
357
|
+
D --> H["AuditAgent"]
|
|
358
|
+
E --> I[("SQLite Context DB")]
|
|
359
|
+
F --> I
|
|
360
|
+
G --> I
|
|
361
|
+
H --> I
|
|
362
|
+
C --> J["ModelRouter (LiteLLM)"]
|
|
363
|
+
J --> K["腾讯混元大模型"]
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
#### DAG 任务依赖关系图
|
|
367
|
+
|
|
368
|
+
```mermaid
|
|
369
|
+
graph TD
|
|
370
|
+
A["task_xxx_backend<br/>(无依赖, 最先执行)"] --> B["task_xxx_frontend<br/>(依赖: backend)"]
|
|
371
|
+
A --> C["task_xxx_test<br/>(依赖: backend)"]
|
|
372
|
+
B --> C
|
|
373
|
+
B --> D["task_xxx_audit<br/>(依赖: 所有)"]
|
|
374
|
+
C --> D
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## 🔬 技术细节深挖
|
|
380
|
+
|
|
381
|
+
> 本章节深入剖析项目的设计原理和实现细节,帮助开发者和架构师理解系统全貌。
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
### 1. System Prompt 与 Rules 设计
|
|
386
|
+
|
|
387
|
+
#### 1.1 System Prompt 设计原则
|
|
388
|
+
|
|
389
|
+
所有 Agent 的 System Prompt 通过各子类的 `get_system_prompt()` 方法硬编码实现,遵循以下设计原则:
|
|
390
|
+
|
|
391
|
+
| 设计原则 | 说明 |
|
|
392
|
+
|---------|------|
|
|
393
|
+
| **明确角色定义** | 每个 Agent 都有清晰的专家角色定位(如"资深后端开发专家") |
|
|
394
|
+
| **职责边界清晰** | 明确列出该 Agent 负责的职责(3-5 条) |
|
|
395
|
+
| **输出格式强制约束** | 使用 `### FILE:` 标记 + 代码块格式,确保输出可被机器解析 |
|
|
396
|
+
| **工程化约束** | 要求生成可直接运行的完整项目(含配置文件) |
|
|
397
|
+
|
|
398
|
+
#### 1.2 各 Agent 的 System Prompt 要点
|
|
399
|
+
|
|
400
|
+
- **FrontendAgent**:角色"资深前端开发专家"(React/Vue/Angular);输出格式 `### FILE: frontend/App.tsx` + 代码块;工程约束:必须生成 `package.json` / `tsconfig.json` / `public/index.html`
|
|
401
|
+
- **BackendAgent**:角色"资深后端开发专家"(Python/Java/Node.js);输出格式 `### FILE: backend/main.py` + 代码块;特殊设计:要求在代码注释中嵌入 API 契约(供 FrontendAgent 消费)
|
|
402
|
+
- **TestAgent**:角色"资深测试开发专家"(Jest + RTL / pytest);输出格式 `### FILE: tests/test_api.py` + 代码块;工程约束:必须生成 `jest.config.js` / `setupTests.ts`
|
|
403
|
+
- **AuditAgent**:角色"资深代码安全审计专家"(OWASP Top 10);输出格式 **JSON**(每行一个 JSON 对象,含 `severity`/`category`/`message`/`suggestion`)
|
|
404
|
+
|
|
405
|
+
#### 1.3 API 契约嵌入机制(前后端协同的关键)
|
|
406
|
+
|
|
407
|
+
`BackendAgent` 的 System Prompt 要求在代码注释中嵌入结构化 API 契约:
|
|
408
|
+
|
|
409
|
+
```python
|
|
410
|
+
### API_CONTRACT_START
|
|
411
|
+
endpoint: /api/login
|
|
412
|
+
method: POST
|
|
413
|
+
request_schema: {"username": "string", "password": "string"}
|
|
414
|
+
response_schema: {"token": "string", "user": {"id": "int", "name": "string"}}
|
|
415
|
+
### API_CONTRACT_END
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
`BackendAgent._extract_api_contracts()` 方法解析这些注释,存入 `api_contracts` 表。
|
|
419
|
+
`FrontendAgent.execute()` 从数据库读取契约,注入到自己的 prompt 中,实现前后端契约驱动开发。
|
|
420
|
+
|
|
421
|
+
#### 1.4 Rules 的实现方式
|
|
422
|
+
|
|
423
|
+
项目中没有独立的 `rules/` 配置文件,规则通过三层机制实现:
|
|
424
|
+
|
|
425
|
+
| 层级 | 实现方式 | 示例 |
|
|
426
|
+
|------|---------|------|
|
|
427
|
+
| **隐式规则** | System Prompt 中的指令 | "代码必须可直接运行" |
|
|
428
|
+
| **显式规则** | 代码中的硬编码逻辑 | `_parse_llm_code_output()` 强制解析 `### FILE:` 格式 |
|
|
429
|
+
| **配置规则** | `config.yaml` + `model/config.py` | `fallback_chain: ["hunyuan-lite", "hunyuan-standard"]` |
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
### 2. 上下文工程(Context Engineering)
|
|
434
|
+
|
|
435
|
+
#### 2.1 上下文存储设计
|
|
436
|
+
|
|
437
|
+
使用 SQLite 作为零部署的上下文数据库,设计四张核心表:
|
|
438
|
+
|
|
439
|
+
```sql
|
|
440
|
+
tasks -- 任务记录(task_id, description, status, result, error)
|
|
441
|
+
code_changes -- 代码变更记录(task_id, agent_type, file_path, change_type, diff)
|
|
442
|
+
api_contracts -- API 契约(task_id, endpoint, method, request_schema, response_schema)
|
|
443
|
+
audit_reports -- 审计意见(task_id, severity, category, message, suggestion, file_path)
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
索引策略:在 `task_id` 字段上建立索引,加速上下文查询。
|
|
447
|
+
|
|
448
|
+
#### 2.2 上下文传递机制
|
|
449
|
+
|
|
450
|
+
```
|
|
451
|
+
用户需求
|
|
452
|
+
│
|
|
453
|
+
▼
|
|
454
|
+
Coordinator.submit_task()
|
|
455
|
+
│ 创建 main_task_id
|
|
456
|
+
│ 为每个 Agent 创建子任务:{main_task_id}_{agent_type}
|
|
457
|
+
│ 将共享 context(description, requirements)注入每个任务
|
|
458
|
+
▼
|
|
459
|
+
DAGScheduler.add_task(task_id, agent_type, dependencies, context)
|
|
460
|
+
│ 将任务加入 DAG,建立依赖边
|
|
461
|
+
▼
|
|
462
|
+
DAGScheduler.get_runnable_tasks()
|
|
463
|
+
│ 返回所有依赖已完成的任务(入度为 0)
|
|
464
|
+
▼
|
|
465
|
+
Coordinator.run() → agent.execute(task_id, context)
|
|
466
|
+
│ context = DAGScheduler.get_task_context(task_id)
|
|
467
|
+
│ ↓ 合并依赖任务的结果到 context:
|
|
468
|
+
│ context[f"{dep_agent_type}_result"] = dep_result
|
|
469
|
+
▼
|
|
470
|
+
下游 Agent 的 execute() 方法从 context 中读取上游结果
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
#### 2.3 迭代模式上下文收集
|
|
474
|
+
|
|
475
|
+
`BaseAgent._collect_existing_code()` 方法:
|
|
476
|
+
|
|
477
|
+
1. 扫描 `output_dir/{agent_type}/` 目录下所有已有文件
|
|
478
|
+
2. 格式化为 `### FILE: {rel_path}\n{content}\n` 格式
|
|
479
|
+
3. 注入到 LLM 的 user_prompt 中,实现"基于已有代码迭代修改"
|
|
480
|
+
|
|
481
|
+
#### 2.4 Agent 执行 Trace 保存
|
|
482
|
+
|
|
483
|
+
每次 Agent 执行后,完整的 LLM 输入输出会被保存到 `output_dir/traces/{agent_type}/{timestamp}_{task_id}.md`:
|
|
484
|
+
|
|
485
|
+
```markdown
|
|
486
|
+
# Agent Trace: backend
|
|
487
|
+
|
|
488
|
+
## Token 用量
|
|
489
|
+
| Step | 模型 | Prompt Tokens | ... |
|
|
490
|
+
|
|
491
|
+
## 系统提示词 (System Prompt)
|
|
492
|
+
...
|
|
493
|
+
|
|
494
|
+
## 用户提示词 (User Prompt)
|
|
495
|
+
...
|
|
496
|
+
|
|
497
|
+
## LLM 原始输出 (Raw Response)
|
|
498
|
+
...
|
|
499
|
+
|
|
500
|
+
## 解析结果 (Parsed Result)
|
|
501
|
+
- 生成/修改的文件: backend/main.py, backend/models.py
|
|
502
|
+
- 提取的 API 契约: POST /api/login, GET /api/users
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
---
|
|
506
|
+
|
|
507
|
+
### 3. 规约驱动开发(Spec-Driven Development)
|
|
508
|
+
|
|
509
|
+
#### 3.1 设计理念
|
|
510
|
+
|
|
511
|
+
项目支持从结构化需求文档(PDF/TXT/MD)中提取需求,驱动代码生成。
|
|
512
|
+
|
|
513
|
+
#### 3.2 实现方式
|
|
514
|
+
|
|
515
|
+
| 组件 | 文件路径 | 功能 |
|
|
516
|
+
|------|---------|------|
|
|
517
|
+
| `utils/pdf_reader.py` | PDF/TXT/MD 读取器 | 提取文本、清洗格式、分块处理大文档 |
|
|
518
|
+
| `main.py --pdf` | CLI 参数 | 从 PDF 文件加载项目需求 |
|
|
519
|
+
| 交互模式 `load` 命令 | 交互式加载 | 在对话中动态加载规约文档 |
|
|
520
|
+
| `dataset/` | 测试数据集 | 存放示例规约文档,用于测试和演示 |
|
|
521
|
+
|
|
522
|
+
#### 3.3 使用流程
|
|
523
|
+
|
|
524
|
+
```bash
|
|
525
|
+
# 方式 1:命令行直接指定 PDF
|
|
526
|
+
python main.py --pdf docs/需求规格说明书.pdf "开发一个订单管理系统"
|
|
527
|
+
|
|
528
|
+
# 方式 2:交互模式中加载
|
|
529
|
+
python main.py
|
|
530
|
+
>>> load docs/需求规格说明书.pdf
|
|
531
|
+
>>> 请基于以上文档开发后端 API
|
|
532
|
+
|
|
533
|
+
# 方式 3:继续已有项目 + 加载新需求 PDF
|
|
534
|
+
python main.py --continue output/20260530_230000_xxx --pdf new_spec.pdf
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
### 4. Skills 与 MCP
|
|
540
|
+
|
|
541
|
+
#### 4.1 Skills(技能机制)
|
|
542
|
+
|
|
543
|
+
当前项目**未使用独立的 Skills 机制**。各 Agent 的"技能"通过其 System Prompt 中的角色定义和职责描述来体现。
|
|
544
|
+
|
|
545
|
+
未来可扩展方向:将 Agent 能力拆分为可插拔的 Skill 模块,通过配置文件动态组合。
|
|
546
|
+
|
|
547
|
+
#### 4.2 MCP(Model Context Protocol)
|
|
548
|
+
|
|
549
|
+
当前项目**未集成 MCP**。模型调用通过 **LiteLLM** 统一接口实现,支持:
|
|
550
|
+
|
|
551
|
+
- 多模型切换(按 Agent 类型配置不同模型)
|
|
552
|
+
- Fallback 链式降级(主模型失败时自动切换)
|
|
553
|
+
- Token 用量追踪(每次调用记录 prompt/completion/total tokens)
|
|
554
|
+
- 流式输出支持(`stream_chat()` 方法)
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
558
|
+
### 5. CodeBuddy Agent SDK 集成
|
|
559
|
+
|
|
560
|
+
#### 5.1 架构
|
|
561
|
+
|
|
562
|
+
```
|
|
563
|
+
Coordinator / Agent
|
|
564
|
+
│
|
|
565
|
+
▼
|
|
566
|
+
CodeBuddyExecutor(静态方法类)
|
|
567
|
+
│
|
|
568
|
+
▼ subprocess.run()
|
|
569
|
+
CodeBuddy CLI
|
|
570
|
+
│
|
|
571
|
+
▼
|
|
572
|
+
沙箱环境(代码执行 / 测试运行 / 代码审查)
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
#### 5.2 封装的 CLI 命令
|
|
576
|
+
|
|
577
|
+
| 方法 | CLI 命令 | 功能 |
|
|
578
|
+
|------|---------|------|
|
|
579
|
+
| `apply_code_edit()` | `codebuddy apply-edit` | 应用代码修改(将 LLM 生成的代码写入文件) |
|
|
580
|
+
| `run_code()` | `codebuddy run-code` | 在沙箱中运行代码(支持 python/javascript/typescript) |
|
|
581
|
+
| `run_tests()` | `codebuddy run-tests` | 运行测试套件 |
|
|
582
|
+
| `review_code()` | `codebuddy review` | AI 代码审查(输出 JSON 格式审查意见) |
|
|
583
|
+
| `get_suggestions()` | `codebuddy suggest` | 获取代码补全建议 |
|
|
584
|
+
|
|
585
|
+
#### 5.3 配置与错误处理
|
|
586
|
+
|
|
587
|
+
- CLI 路径和超时时间通过 `model/config.py` 中的 `CODEBUDDY_CONFIG` 配置
|
|
588
|
+
- 超时控制:默认 60 秒,可通过参数覆盖
|
|
589
|
+
- 错误处理:捕获 `subprocess.TimeoutExpired`(超时)和 `FileNotFoundError`(CLI 未安装)
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
### 6. 多 Agent 协同机制
|
|
594
|
+
|
|
595
|
+
#### 6.1 协同架构
|
|
596
|
+
|
|
597
|
+
```mermaid
|
|
598
|
+
graph TD
|
|
599
|
+
User["用户需求"] --> Coord["Coordinator"]
|
|
600
|
+
Coord --> Selector["AgentSelector (LLM 分析)"]
|
|
601
|
+
Selector -->|"agents: [backend, frontend]"| Coord
|
|
602
|
+
Coord --> DAG["DAGScheduler"]
|
|
603
|
+
DAG -->|"task_xxx_backend (无依赖)"| Backend["BackendAgent"]
|
|
604
|
+
Backend -->|"API 契约 → DB"| DB[("SQLite")]
|
|
605
|
+
DAG -->|"task_xxx_frontend (依赖 backend)"| Frontend["FrontendAgent"]
|
|
606
|
+
DB -->|"读取 API 契约"| Frontend
|
|
607
|
+
DAG -->|"task_xxx_test (依赖 backend,frontend)"| Test["TestAgent"]
|
|
608
|
+
DAG -->|"task_xxx_audit (依赖所有)"| Audit["AuditAgent"]
|
|
609
|
+
Backend -->|"结果 → context"| Frontend
|
|
610
|
+
Frontend -->|"结果 → context"| Test
|
|
611
|
+
Test -->|"结果 → context"| Audit
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
#### 6.2 任务依赖与调度
|
|
615
|
+
|
|
616
|
+
| 任务 | 依赖 | 说明 |
|
|
617
|
+
|------|------|------|
|
|
618
|
+
| `task_xxx_backend` | 无 | 最先执行,生成 API 和契约 |
|
|
619
|
+
| `task_xxx_frontend` | `backend` | 读取后端契约,生成前端代码 |
|
|
620
|
+
| `task_xxx_test` | `backend`, `frontend` | 读取前后端代码,生成测试 |
|
|
621
|
+
| `task_xxx_audit` | `backend`, `frontend`, `test` | 审计所有代码 |
|
|
622
|
+
|
|
623
|
+
DAG 调度器使用**拓扑排序**确定执行顺序,支持并行执行无依赖关系的任务。
|
|
624
|
+
|
|
625
|
+
#### 6.3 失败级联机制
|
|
626
|
+
|
|
627
|
+
当某个 Agent 执行失败时:
|
|
628
|
+
|
|
629
|
+
1. `DAGScheduler.mark_failed(task_id)` 被调用
|
|
630
|
+
2. `_cascade_failure(task_id)` 通过 **BFS 遍历**所有下游任务
|
|
631
|
+
3. 所有下游任务被标记为 `failed`(避免死锁)
|
|
632
|
+
4. 错误信息记录到数据库,包含级联取消的原因
|
|
633
|
+
|
|
634
|
+
#### 6.4 智能 Agent 选择
|
|
635
|
+
|
|
636
|
+
`AgentSelector` 使用轻量模型(frontend 配置的模型)分析用户需求:
|
|
637
|
+
|
|
638
|
+
1. 构建包含用户需求和可选 Agent 列表的 prompt
|
|
639
|
+
2. LLM 输出 JSON:`{"agents": ["backend", "frontend"], "reason": "..."}`
|
|
640
|
+
3. `_fix_dependencies()` 自动修正依赖(如选中 frontend 但未选中 backend,则自动添加)
|
|
641
|
+
|
|
642
|
+
#### 6.5 Token 用量汇总
|
|
643
|
+
|
|
644
|
+
每次执行完成后,`Coordinator._collect_usage_summary()` 收集所有 Agent 的 token 用量:
|
|
645
|
+
|
|
646
|
+
- 每个 Agent 的 `_usage_log` 记录每次 LLM 调用的详细信息
|
|
647
|
+
- 汇总报告保存到 `output_dir/usage_summary.md`
|
|
648
|
+
- 控制台打印格式化的汇总表格
|
|
649
|
+
|
|
650
|
+
---
|
|
651
|
+
|
|
652
|
+
### 7. CI/CD 流程详解
|
|
653
|
+
|
|
654
|
+
#### 7.1 流水线全景
|
|
655
|
+
|
|
656
|
+
```mermaid
|
|
657
|
+
graph LR
|
|
658
|
+
A["Push / PR"] --> B["Lint & Format"]
|
|
659
|
+
B --> C["Type Check"]
|
|
660
|
+
C --> D["Tests"]
|
|
661
|
+
D --> E["Build"]
|
|
662
|
+
E --> F["✅ 通过"]
|
|
663
|
+
B -->|失败| G["❌ 失败通知"]
|
|
664
|
+
C -->|失败| G
|
|
665
|
+
D -->|失败| G
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
#### 7.2 各阶段详解
|
|
669
|
+
|
|
670
|
+
| 阶段 | 工具 | 检查内容 | 失败处理 |
|
|
671
|
+
|------|------|---------|---------|
|
|
672
|
+
| **Lint & Format** | `black --check` | 代码格式是否符合 PEP 8 | 终止流水线 |
|
|
673
|
+
| | `isort --check-only` | import 语句排序 | 终止流水线 |
|
|
674
|
+
| | `flake8` | 语法错误、未使用变量、复杂度 | 终止流水线 |
|
|
675
|
+
| **Type Check** | `mypy` | 类型注解一致性检查 | 终止流水线 |
|
|
676
|
+
| **Tests** | `pytest` + `coverage` | 单元测试覆盖率(目标 >80%) | 终止流水线 |
|
|
677
|
+
| **Build** | `python -m build` | 构建 wheel 包并验证导入 | 终止流水线 |
|
|
678
|
+
|
|
679
|
+
#### 7.3 测试矩阵
|
|
680
|
+
|
|
681
|
+
```yaml
|
|
682
|
+
strategy:
|
|
683
|
+
matrix:
|
|
684
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
确保在三个 Python 版本下测试全部通过。
|
|
688
|
+
|
|
689
|
+
#### 7.4 Mock API Key 策略
|
|
690
|
+
|
|
691
|
+
CI 环境中的测试不依赖真实 LLM API 调用:
|
|
692
|
+
|
|
693
|
+
```yaml
|
|
694
|
+
- name: Run tests
|
|
695
|
+
env:
|
|
696
|
+
TENCENT_API_KEY: ci-mock-key
|
|
697
|
+
TENCENT_API_BASE: https://mock-api.example.com/v1
|
|
698
|
+
run: |
|
|
699
|
+
pytest tests/ -v --tb=short \
|
|
700
|
+
--ignore=agents --ignore=executor \
|
|
701
|
+
--ignore=output --ignore=dataset
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
测试聚焦于纯逻辑模块(DAG 调度、输出管理、配置验证、模块导入)。
|
|
705
|
+
|
|
706
|
+
#### 7.5 覆盖率报告
|
|
707
|
+
|
|
708
|
+
- 终端输出:`--cov-report=term`
|
|
709
|
+
- XML 报告:`--cov-report=xml`(用于 Codecov 上传)
|
|
710
|
+
- HTML 报告:`--cov-report=html`(本地查看)
|
|
711
|
+
|
|
712
|
+
---
|
|
713
|
+
|
|
714
|
+
## 🧪 测试
|
|
715
|
+
|
|
716
|
+
```bash
|
|
717
|
+
# 运行单元测试
|
|
718
|
+
pytest tests/
|
|
719
|
+
|
|
720
|
+
# 运行测试并生成覆盖率报告
|
|
721
|
+
pytest --cov=agents --cov=coordinator --cov=model --cov=storage --cov-report=html
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
---
|
|
725
|
+
|
|
726
|
+
## 🔄 CI/CD
|
|
727
|
+
|
|
728
|
+
本项目使用 GitHub Actions 进行持续集成和持续部署,工作流配置位于 `.github/workflows/` 目录。
|
|
729
|
+
|
|
730
|
+
### CI 流水线(`.github/workflows/ci.yml`)
|
|
731
|
+
|
|
732
|
+
| 阶段 | 说明 | 触发条件 |
|
|
733
|
+
|------|------|----------|
|
|
734
|
+
| **Lint & Format** | black + isort + flake8 代码风格检查,VERSION 文件格式校验 | push / PR 到 main/master/develop |
|
|
735
|
+
| **Type Check** | mypy 静态类型检查 | push / PR 到 main/master/develop |
|
|
736
|
+
| **Tests** | pytest 单元测试 (Python 3.11/3.12/3.13) | push / PR 到 main/master/develop |
|
|
737
|
+
| **Build** | 构建验证 | 前三个阶段通过后 |
|
|
738
|
+
|
|
739
|
+
### CD 流水线(`.github/workflows/cd.yml`)
|
|
740
|
+
|
|
741
|
+
CD 流水线在推送 git tag(以 `v` 开头)或手动触发时执行:
|
|
742
|
+
|
|
743
|
+
| 阶段 | 说明 | 触发条件 |
|
|
744
|
+
|------|------|----------|
|
|
745
|
+
| **Validate** | 校验 VERSION 文件格式、版本号一致性、CHANGELOG 条目 | git tag v* / 手动触发 |
|
|
746
|
+
| **Build** | 构建 wheel 包,twine 检查 | Validate 通过后 |
|
|
747
|
+
| **Publish to Test PyPI** | 发布到 Test PyPI(可选) | Build 通过后 |
|
|
748
|
+
| **Publish to PyPI** | 发布到正式 PyPI | Build 通过后 |
|
|
749
|
+
| **Create GitHub Release** | 创建 GitHub Release,附上 wheel 包 | 发布到 PyPI 后 |
|
|
750
|
+
|
|
751
|
+
### 发布流程
|
|
752
|
+
|
|
753
|
+
1. 更新 `CHANGELOG.md`,将 `[Unreleased]` 内容移动到新版本条目
|
|
754
|
+
2. 更新 `VERSION` 文件:
|
|
755
|
+
```bash
|
|
756
|
+
python utils/version.py --bump patch # 升级 patch 版本(如 0.1.0 -> 0.1.1)
|
|
757
|
+
# 或
|
|
758
|
+
python utils/version.py --bump minor # 升级 minor 版本(如 0.1.0 -> 0.2.0)
|
|
759
|
+
# 或
|
|
760
|
+
python utils/version.py --bump major # 升级 major 版本(如 0.1.0 -> 1.0.0)
|
|
761
|
+
```
|
|
762
|
+
3. 提交版本更新:
|
|
763
|
+
```bash
|
|
764
|
+
git add VERSION CHANGELOG.md
|
|
765
|
+
git commit -m "chore: release v0.1.1"
|
|
766
|
+
git push origin develop
|
|
767
|
+
```
|
|
768
|
+
4. 创建并推送 git tag:
|
|
769
|
+
```bash
|
|
770
|
+
git tag v0.1.1
|
|
771
|
+
git push origin v0.1.1
|
|
772
|
+
```
|
|
773
|
+
5. GitHub Actions CD 工作流自动触发,发布到 PyPI
|
|
774
|
+
|
|
775
|
+
### 本地运行 CI 检查
|
|
776
|
+
|
|
777
|
+
```bash
|
|
778
|
+
# 格式检查
|
|
779
|
+
black --check .
|
|
780
|
+
isort --check-only .
|
|
781
|
+
flake8 . --max-line-length=120
|
|
782
|
+
|
|
783
|
+
# 类型检查
|
|
784
|
+
pip install -e ".[dev]"
|
|
785
|
+
mypy .
|
|
786
|
+
|
|
787
|
+
# 运行测试
|
|
788
|
+
TENCENT_API_KEY=sk-mock-key pytest tests/ -v
|
|
789
|
+
|
|
790
|
+
# 校验版本号
|
|
791
|
+
python utils/version.py --validate $(cat VERSION)
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
> 注:CI 中的测试聚焦于纯逻辑模块(DAG 调度、输出管理、配置验证、模块导入),不依赖真实 LLM API 调用。
|
|
795
|
+
|
|
796
|
+
---
|
|
797
|
+
|
|
798
|
+
## 📁 分支策略
|
|
799
|
+
|
|
800
|
+
本项目采用 **Git Flow** 分支策略:
|
|
801
|
+
|
|
802
|
+
- `main` - 生产分支,稳定版本
|
|
803
|
+
- `develop` - 开发集成分支
|
|
804
|
+
- `feature/*` - 功能分支
|
|
805
|
+
- `bugfix/*` - Bug 修复分支
|
|
806
|
+
- `hotfix/*` - 紧急修复分支
|
|
807
|
+
|
|
808
|
+
### 开发流程
|
|
809
|
+
|
|
810
|
+
```bash
|
|
811
|
+
# 1. 切换到 develop 分支
|
|
812
|
+
git checkout develop
|
|
813
|
+
|
|
814
|
+
# 2. 创建功能分支
|
|
815
|
+
git checkout -b feature/new-feature
|
|
816
|
+
|
|
817
|
+
# 3. 开发并提交
|
|
818
|
+
git add -A
|
|
819
|
+
git commit -m "feat: 新功能描述"
|
|
820
|
+
|
|
821
|
+
# 4. 推送到远程
|
|
822
|
+
git push origin feature/new-feature
|
|
823
|
+
|
|
824
|
+
# 5. 创建 Pull Request 合并到 develop
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
---
|
|
828
|
+
|
|
829
|
+
## 🤝 贡献指南
|
|
830
|
+
|
|
831
|
+
1. Fork 本项目
|
|
832
|
+
2. 创建功能分支 (`git checkout -b feature/AmazingFeature`)
|
|
833
|
+
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
|
|
834
|
+
4. 推送到分支 (`git push origin feature/AmazingFeature`)
|
|
835
|
+
5. 创建 Pull Request
|
|
836
|
+
|
|
837
|
+
---
|
|
838
|
+
|
|
839
|
+
## 📄 License
|
|
840
|
+
|
|
841
|
+
MIT License
|
|
842
|
+
|
|
843
|
+
---
|
|
844
|
+
|
|
845
|
+
## 📧 联系方式
|
|
846
|
+
|
|
847
|
+
- 作者: Your Name
|
|
848
|
+
- 邮箱: your.email@example.com
|
|
849
|
+
- GitHub: [@Kingsdom005](https://github.com/Kingsdom005)
|