feat(ack): support project agent routing overrides
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://git.yumee.top/laily/pouch/skills/ack/templates/agents.schema.json",
|
||||
"title": "ACK project agent routing override",
|
||||
"description": "Optional .pouch/ack/agents.yaml. It has the same routing shape as project.orchestration.",
|
||||
"type": "object",
|
||||
"required": ["profileVersion", "mode", "modelAllowlist", "profiles", "defaults"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profileVersion": {"type": "integer", "const": 1},
|
||||
"mode": {"type": "string", "enum": ["orca", "manual"]},
|
||||
"modelAllowlist": {"$ref": "#/definitions/modelAllowlist"},
|
||||
"profiles": {
|
||||
"type": "object",
|
||||
"propertyNames": {"$ref": "#/definitions/profileId"},
|
||||
"additionalProperties": {"$ref": "#/definitions/workerProfile"}
|
||||
},
|
||||
"defaults": {"$ref": "#/definitions/defaults"}
|
||||
},
|
||||
"definitions": {
|
||||
"profileId": {"type": "string", "pattern": "^[a-z][a-z0-9-]{1,63}$"},
|
||||
"model": {
|
||||
"oneOf": [
|
||||
{"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"},
|
||||
{"type": "null", "description": "仅 pi 使用 null 表示默认模型"}
|
||||
]
|
||||
},
|
||||
"modelList": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/model"}},
|
||||
"modelTierAllowlist": {
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"standard": {"$ref": "#/definitions/modelList"},
|
||||
"strong": {"$ref": "#/definitions/modelList"}
|
||||
}
|
||||
},
|
||||
"modelRoleAllowlist": {
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"developer": {"$ref": "#/definitions/modelTierAllowlist"},
|
||||
"test": {"$ref": "#/definitions/modelTierAllowlist"}
|
||||
}
|
||||
},
|
||||
"modelAllowlist": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"codex": {"$ref": "#/definitions/modelRoleAllowlist"},
|
||||
"cursor-agent": {"$ref": "#/definitions/modelRoleAllowlist"},
|
||||
"grok": {"$ref": "#/definitions/modelRoleAllowlist"},
|
||||
"omp": {"$ref": "#/definitions/modelRoleAllowlist"},
|
||||
"pi": {"$ref": "#/definitions/modelRoleAllowlist"}
|
||||
}
|
||||
},
|
||||
"workerProfile": {
|
||||
"type": "object",
|
||||
"required": ["role", "cli", "tier", "model", "reasoningEffort", "permissionMode"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"role": {"type": "string", "enum": ["developer", "test"]},
|
||||
"cli": {"type": "string", "enum": ["codex", "cursor-agent", "grok", "omp", "pi"]},
|
||||
"tier": {"type": "string", "enum": ["standard", "strong"]},
|
||||
"model": {"$ref": "#/definitions/model"},
|
||||
"reasoningEffort": {"type": ["string", "null"], "enum": ["low", "medium", "high", "xhigh", null]},
|
||||
"permissionMode": {"type": "string", "enum": ["read-only", "workspace-write"]}
|
||||
}
|
||||
},
|
||||
"defaults": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["developer", "test"],
|
||||
"properties": {
|
||||
"developer": {"$ref": "#/definitions/profileId"},
|
||||
"test": {"$ref": "#/definitions/profileId"},
|
||||
"developerUpgraded": {"$ref": "#/definitions/profileId"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
# Optional project-local worker routing override.
|
||||
# Save as .pouch/ack/agents.yaml when a temporary role/CLI/model selection is needed.
|
||||
# This file intentionally has the same shape as tasks.yaml.project.orchestration.
|
||||
profileVersion: 1
|
||||
mode: "orca"
|
||||
modelAllowlist:
|
||||
pi:
|
||||
developer:
|
||||
standard: [null]
|
||||
strong: [null]
|
||||
cursor-agent:
|
||||
test:
|
||||
standard: ["auto"]
|
||||
profiles:
|
||||
pi-dev-standard:
|
||||
role: "developer"
|
||||
cli: "pi"
|
||||
tier: "standard"
|
||||
model: null
|
||||
reasoningEffort: "medium"
|
||||
permissionMode: "workspace-write"
|
||||
pi-dev-strong:
|
||||
role: "developer"
|
||||
cli: "pi"
|
||||
tier: "strong"
|
||||
model: null
|
||||
reasoningEffort: "high"
|
||||
permissionMode: "workspace-write"
|
||||
cursor-test-standard:
|
||||
role: "test"
|
||||
cli: "cursor-agent"
|
||||
tier: "standard"
|
||||
model: "auto"
|
||||
reasoningEffort: null
|
||||
permissionMode: "workspace-write"
|
||||
defaults:
|
||||
developer: "pi-dev-standard"
|
||||
test: "cursor-test-standard"
|
||||
developerUpgraded: "pi-dev-strong"
|
||||
@@ -9,7 +9,7 @@
|
||||
> 不会自动修改 `AGENTS.md`、`CLAUDE.md` 或其它 Agent 指令文件。
|
||||
> 无论叫什么,都在 `tasks.yaml` 的 `project.overlayFile` 记录实际路径。
|
||||
> `.pouch/ack/` 只保存本项目的 `project.md`、`tasks.yaml`、`knowledge.yaml`、默认关闭的
|
||||
> `delivery.yaml` 与空的 `regression.yaml`,
|
||||
> `delivery.yaml`、空的 `regression.yaml`,以及可选的 `agents.yaml` 角色启动覆盖,
|
||||
> 不复制或链接 Skill。
|
||||
|
||||
## 项目概览
|
||||
@@ -22,6 +22,7 @@
|
||||
- 项目知识:`.pouch/ack/knowledge.yaml`
|
||||
- 交付契约:`.pouch/ack/delivery.yaml`(默认关闭)
|
||||
- 回归目录:`.pouch/ack/regression.yaml`
|
||||
- 角色启动覆盖(可选):`.pouch/ack/agents.yaml`
|
||||
- 覆盖层文件:`<overlay_file_path>`(默认 `.pouch/ack/project.md`)
|
||||
|
||||
## 通用规范(由 ACK Skill 按需读取)
|
||||
@@ -39,8 +40,8 @@
|
||||
## Worker 路由
|
||||
|
||||
机器可校验的模型、reasoning effort、权限模式、默认 profile、允许 worktree 和启动
|
||||
receipt 全部以 `.pouch/ack/tasks.yaml` 的 `project.orchestration` 与顶层
|
||||
`workerReceipts` 为准。本文件不保存可执行 worker 命令。
|
||||
receipt 以 `.pouch/ack/agents.yaml`(存在时)或 `.pouch/ack/tasks.yaml` 的
|
||||
`project.orchestration` 与顶层 `workerReceipts` 为准。本文件不保存可执行 worker 命令。
|
||||
|
||||
默认 profile:
|
||||
|
||||
|
||||
@@ -591,8 +591,16 @@
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"
|
||||
},
|
||||
{
|
||||
"type": "null",
|
||||
"description": "仅 Pi 使用 null 表示其配置的默认模型"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"modelTierAllowlist": {
|
||||
@@ -633,6 +641,12 @@
|
||||
},
|
||||
"grok": {
|
||||
"$ref": "#/definitions/modelRoleAllowlist"
|
||||
},
|
||||
"omp": {
|
||||
"$ref": "#/definitions/modelRoleAllowlist"
|
||||
},
|
||||
"pi": {
|
||||
"$ref": "#/definitions/modelRoleAllowlist"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -661,7 +675,8 @@
|
||||
"codex",
|
||||
"cursor-agent",
|
||||
"grok",
|
||||
"omp"
|
||||
"omp",
|
||||
"pi"
|
||||
]
|
||||
},
|
||||
"tier": {
|
||||
@@ -672,8 +687,16 @@
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"
|
||||
},
|
||||
{
|
||||
"type": "null",
|
||||
"description": "仅 Pi 使用 null 表示其配置的默认模型"
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningEffort": {
|
||||
"type": [
|
||||
@@ -860,7 +883,8 @@
|
||||
"codex",
|
||||
"cursor-agent",
|
||||
"grok",
|
||||
"omp"
|
||||
"omp",
|
||||
"pi"
|
||||
]
|
||||
},
|
||||
"tier": {
|
||||
@@ -871,8 +895,16 @@
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"
|
||||
},
|
||||
{
|
||||
"type": "null",
|
||||
"description": "仅 Pi 使用 null 表示其配置的默认模型"
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningEffort": {
|
||||
"type": [
|
||||
@@ -1018,6 +1050,13 @@
|
||||
"boardHash": {
|
||||
"$ref": "#/definitions/sha256"
|
||||
},
|
||||
"routingSource": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"routingHash": {
|
||||
"$ref": "#/definitions/sha256"
|
||||
},
|
||||
"slot": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
|
||||
@@ -29,6 +29,7 @@ project:
|
||||
# attachments: "<field_id>"
|
||||
# updatedAt: "<field_id>"
|
||||
orchestration:
|
||||
# 可选:临时角色路由写到 .pouch/ack/agents.yaml;存在时由 launcher 优先读取。
|
||||
# worker 默认在 --project-root(权威状态目录)工作;不再配置 allowedWorktrees 白名单
|
||||
# (v0.19 起废弃)。需要隔离 worktree 时由 Coordinator 在派发时显式指定。
|
||||
profileVersion: 1
|
||||
|
||||
Reference in New Issue
Block a user