配置参考(pipeline.config.yml)
完整配置示例
yaml
project:
name: "my-app"
domain: "myapp.example.com"
description: "一个示例应用"
stages:
- id: prd
name: PRD
org: cnbdocs
npc: codebuddy
model: glm-5.1
work_mode: false
timeout_minutes: 15
- id: ui
name: UI
org: cnbuu
npc: npc/ui-ux-pro-max
model: ""
work_mode: false
timeout_minutes: 15
- id: frontend
name: 前端(用户端)
org: cnbvv
npc: codebuddy
model: ""
work_mode: true
timeout_minutes: 20
- id: backend
name: 后端
org: cnbmm
npc: tencent/cloud/cloudbase/community
npc_role: 云开发工程师
model: ""
work_mode: true
timeout_minutes: 20
- id: admin
name: 管理后台
org: cnbyy
npc: codebuddy
model: ""
work_mode: true
timeout_minutes: 20
- id: integration
name: 集成
org: cnbnn
npc: codebuddy
model: ""
work_mode: true
timeout_minutes: 20
npc:
default_model: glm-5.0-turbo
max_retries: 3
retry_wait_seconds: 30
poll_interval_seconds: 30
cloud:
env_id: ""
region: ap-shanghai
edgeone:
project_name: ""
tech_stack:
frontend: "React 18 + TypeScript + Vite + Ant Design 5 + Zustand + TanStack Query + Recharts"
admin: "React 18 + TypeScript + Vite + Ant Design 5 + @ant-design/pro-components + Zustand + TanStack Query"
backend: "CloudBase 云函数 Node.js 18 + @cloudbase/node-sdk"字段说明
project
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| name | string | 命令行 -p 覆盖 | 项目名,同时作为仓库名 |
| domain | string | 否 | 自定义域名 |
| description | string | 否 | 项目描述,写入 PRD Issue 背景 |
stages
每个工位的配置:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | string | 是 | 工位标识(prd/ui/frontend/backend/admin/integration) |
| name | string | 是 | 显示名 |
| org | string | 是 | CNB 组织 slug |
| npc | string | 是 | NPC 标识 |
| model | string | 否 | 指定模型(留空用 default_model) |
| npc_role | string | 否 | NPC 角色名(如后端工位的"云开发工程师") |
| work_mode | bool | 否 | 是否开启 work_mode |
| timeout_minutes | int | 否 | NPC 完成超时分钟数 |
npc
NPC 全局设置:
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| default_model | string | glm-5.0-turbo | 工位未指定 model 时的回退模型 |
| max_retries | int | 3 | NPC 超时后重试次数 |
| retry_wait_seconds | int | 30 | 重试等待秒数 |
| poll_interval_seconds | int | 30 | 轮询 NPC 状态间隔 |
cloud
腾讯云 CloudBase 设置:
| 字段 | 类型 | 说明 |
|---|---|---|
| env_id | string | CloudBase 环境 ID |
| region | string | 地域,默认 ap-shanghai |
edgeone
EdgeOne Pages 设置:
| 字段 | 类型 | 说明 |
|---|---|---|
| project_name | string | 留空则使用 project.name |
tech_stack
技术栈模板,Issue body 中引用:
| 字段 | 说明 |
|---|---|
| frontend | 用户端前端技术栈 |
| admin | 管理后台技术栈 |
| backend | 后端技术栈 |