description: alwaysApply: true enabled: true updatedAt: 2026-04-04T02:08:26.852Z
init → start → compiling → running → db-checking → backend-testing → frontend-testing → done
↑ ↑
【后端测试】 【前端测试⚠️】
| 状态 | 含义 |
|---|---|
init |
功能已创建,未开始 |
start |
开始开发 |
compiling |
编译中 |
running |
运行中 |
db-checking |
数据库验证中 |
backend-testing |
后端接口测试中(用 curl) |
frontend-testing |
前端页面测试中(用 Playwright)⚠️ |
done |
功能完成 |
⚠️ 注意:必须测试前端页面,不能只用 curl 测试后端就结束
init.sh:安装依赖、初始化数据库、启动服务agent-progress.txt:进度日志feature_list.json:细粒度功能清单(JSON 格式)pwd
cat agent-progress.txt
cat feature_list.json
git log --oneline -20
feature_list.json 选择最小 id 的未完成功能start# 修改 feature_list.json: status: "start"
# 记录日志
# 根据项目类型执行编译
python -m py_compile backend/*.py # Python
npm run build # Node.js/TS
mvn compile # Java
running# 重启服务
./init.sh
sleep 10
# 验证服务可用
curl -f http://localhost:{backend_port}/health
curl -f http://localhost:{frontend_port}
db-checkingpython backend/db_check.py
backend-testing# 按照 backend_test_steps 逐项测试
# 必须包含增删改查(CRUD)
frontend-testing后端测试要求:
auth_enabled: false,跳过 token 验证【必须测试前端,禁止跳过此步骤】
# 使用 Playwright 进行浏览器自动化测试
npx playwright test
done前端测试要求:
# 修改 feature_list.json: status: "done", passes: true
# 更新日志
# Git 提交
{
"project_name": "项目名称",
"base_config": {
"backend_port": "{根据实际项目配置}",
"frontend_port": "{根据实际项目配置}",
"db_host": "localhost",
"db_port": 3306,
"auth_enabled": false
},
"features": [
{
"id": 1,
"description": "功能描述",
"backend_test_steps": [
"1. curl POST /api/chats - 验证创建(增)",
"2. curl GET /api/chats - 验证查询(查)",
"3. curl PUT /api/chats/{id} - 验证更新(改)",
"4. curl DELETE /api/chats/{id} - 验证删除(删)"
],
"frontend_test_steps": [
"1. 点击按钮",
"2. 验证结果"
],
"status": "init",
"passes": false
}
]
}
auth_enabled: false:开发阶段,跳过登录验证 tokenauth_enabled: true:生产阶段,开启登录验证 token建议:开发阶段关闭 auth_enabled,等核心功能完成后再开启