1213 lines
34 KiB
JSON
1213 lines
34 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "https://git.yumee.top/laily/skills/skills/ack/templates/tasks.schema.json",
|
|
"title": "ACK task board",
|
|
"description": "tasks.yaml 的权威结构。跨语言可用;参考校验实现见 scripts/validate_tasks.py。",
|
|
"type": "object",
|
|
"required": ["version", "project", "tasks"],
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"version": { "type": "integer", "minimum": 1 },
|
|
"updatedAt": { "type": "string" },
|
|
"source": { "type": "string" },
|
|
"ackVersion": {
|
|
"type": "string",
|
|
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$",
|
|
"description": "接入时所基于的 ack 版本,便于日后 diff 升级"
|
|
},
|
|
"kitVersion": {
|
|
"type": "string",
|
|
"description": "旧版 ACK 版本字段;兼容读取,新项目应使用 ackVersion"
|
|
},
|
|
"project": {
|
|
"type": "object",
|
|
"required": ["name"],
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"name": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"repoPath": {
|
|
"type": "string",
|
|
"deprecated": true,
|
|
"description": "Legacy informational field; ACK derives project files from --project-root/docs/ack"
|
|
},
|
|
"baseUrl": { "type": "string" },
|
|
"devWorktree": {
|
|
"type": "string",
|
|
"deprecated": true,
|
|
"description": "Legacy informational field; pass the actual worker path with --worktree"
|
|
},
|
|
"overlayFile": {
|
|
"type": "string",
|
|
"description": "项目覆盖层文件路径,默认 docs/ack/project.md,可自定义"
|
|
},
|
|
"knowledgeFile": {
|
|
"type": "string",
|
|
"const": "docs/ack/knowledge.yaml",
|
|
"description": "项目知识护栏库的唯一权威路径"
|
|
},
|
|
"deliveryFile": {
|
|
"type": "string",
|
|
"const": "docs/ack/delivery.yaml",
|
|
"description": "可选项目交付契约的唯一权威路径"
|
|
},
|
|
"bugIntake": { "$ref": "#/definitions/feishuBugIntake" },
|
|
"orchestration": {
|
|
"$ref": "#/definitions/orchestration"
|
|
}
|
|
}
|
|
},
|
|
"summary": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"verified": { "type": "array", "items": { "type": "string" } },
|
|
"open": { "type": "array", "items": { "type": "string" } },
|
|
"failedRetest": { "type": "array", "items": { "type": "string" } },
|
|
"leftovers": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
"statusReference": { "type": "object" },
|
|
"workerReceipts": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/workerReceipt" }
|
|
},
|
|
"deliveryRuns": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/deliveryRun" }
|
|
},
|
|
"tasks": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/task" }
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"ackVersion": {
|
|
"type": "string",
|
|
"pattern": "^(?:0\\.[1-9][0-9]+\\.[0-9]+|[1-9][0-9]*\\.[0-9]+\\.[0-9]+)(?:-|\\+|$)"
|
|
}
|
|
},
|
|
"required": ["ackVersion"]
|
|
},
|
|
"then": {
|
|
"required": ["workerReceipts"],
|
|
"properties": {
|
|
"workerReceipts": {},
|
|
"tasks": { "$ref": "#/definitions/launchableTasks" },
|
|
"project": {
|
|
"type": "object",
|
|
"required": ["orchestration"],
|
|
"properties": {
|
|
"orchestration": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"project": {
|
|
"type": "object",
|
|
"required": ["orchestration"],
|
|
"properties": {
|
|
"orchestration": {}
|
|
}
|
|
}
|
|
},
|
|
"required": ["project"]
|
|
},
|
|
"then": {
|
|
"required": ["workerReceipts"],
|
|
"properties": {
|
|
"workerReceipts": {},
|
|
"tasks": { "$ref": "#/definitions/launchableTasks" }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"required": ["workerReceipts"],
|
|
"properties": {
|
|
"workerReceipts": {}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"tasks": { "$ref": "#/definitions/launchableTasks" },
|
|
"project": {
|
|
"type": "object",
|
|
"required": ["orchestration"],
|
|
"properties": {
|
|
"orchestration": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"project": {
|
|
"type": "object",
|
|
"required": ["deliveryFile"],
|
|
"properties": {
|
|
"deliveryFile": {}
|
|
}
|
|
}
|
|
},
|
|
"required": ["project"]
|
|
},
|
|
"then": {
|
|
"required": ["deliveryRuns"],
|
|
"properties": {
|
|
"deliveryRuns": {}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"definitions": {
|
|
"sha256": {
|
|
"type": "string",
|
|
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
},
|
|
"feishuBugIntake": {
|
|
"type": "object",
|
|
"required": ["provider", "profile", "baseToken", "tableId", "viewId", "fields"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"provider": { "const": "feishu-base" },
|
|
"workflow": {
|
|
"type": "string",
|
|
"enum": ["read-only-v1", "reviewed-writeback-v1", "clarified-writeback-v1"]
|
|
},
|
|
"profile": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$" },
|
|
"baseToken": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"tableId": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"viewId": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"fields": {
|
|
"type": "object",
|
|
"required": [],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"title": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"actual": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"expected": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"stepsToReproduce": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"fixLogic": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"acceptance": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"priority": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"attachments": { "type": "string", "minLength": 1, "pattern": "^\\S+$" },
|
|
"updatedAt": { "type": "string", "minLength": 1, "pattern": "^\\S+$" }
|
|
,"details": { "type": "string", "minLength": 1, "pattern": "^\\S+$" }
|
|
,"problemStatement": { "type": "string", "minLength": 1, "pattern": "^\\S+$" }
|
|
,"expectedOutcome": { "type": "string", "minLength": 1, "pattern": "^\\S+$" }
|
|
,"intakeStatus": { "type": "string", "minLength": 1, "pattern": "^\\S+$" }
|
|
,"ackTaskId": { "type": "string", "minLength": 1, "pattern": "^\\S+$" }
|
|
}
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"not": {
|
|
"properties": { "workflow": { "const": "clarified-writeback-v1" } },
|
|
"required": ["workflow"]
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"fields": { "required": ["title", "actual", "expected", "stepsToReproduce", "acceptance", "attachments", "updatedAt"] }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": { "workflow": { "const": "reviewed-writeback-v1" } },
|
|
"required": ["workflow"]
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"fields": { "required": ["fixLogic", "priority"] }
|
|
}
|
|
}
|
|
}
|
|
,{
|
|
"if": {
|
|
"properties": { "workflow": { "const": "clarified-writeback-v1" } },
|
|
"required": ["workflow"]
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"fields": { "required": ["title", "details", "problemStatement", "expectedOutcome", "acceptance", "intakeStatus", "ackTaskId", "attachments", "updatedAt"] }
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"feishuTaskSource": {
|
|
"type": "object",
|
|
"required": ["kind", "ref", "recordId", "updatedAt"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"kind": { "const": "feishu-base" },
|
|
"workflow": {
|
|
"type": "string",
|
|
"enum": ["read-only-v1", "reviewed-writeback-v1", "clarified-writeback-v1"]
|
|
},
|
|
"ref": {
|
|
"type": "string",
|
|
"pattern": "^feishu-base:sha256:[0-9a-f]{64}$"
|
|
},
|
|
"recordId": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,255}$"
|
|
},
|
|
"updatedAt": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"approvedRevision": { "$ref": "#/definitions/sha256" },
|
|
"approvedPayloadHash": { "$ref": "#/definitions/sha256" }
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": { "workflow": { "const": "reviewed-writeback-v1" } },
|
|
"required": ["workflow"]
|
|
},
|
|
"then": {
|
|
"required": ["approvedRevision", "approvedPayloadHash"]
|
|
}
|
|
}
|
|
,{
|
|
"if": {
|
|
"properties": { "workflow": { "const": "clarified-writeback-v1" } },
|
|
"required": ["workflow"]
|
|
},
|
|
"then": {
|
|
"required": ["approvedRevision", "approvedPayloadHash"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"profileId": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]{1,63}$"
|
|
},
|
|
"launchableTasks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"modelList": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"
|
|
}
|
|
},
|
|
"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" }
|
|
}
|
|
},
|
|
"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"]
|
|
},
|
|
"tier": {
|
|
"type": "string",
|
|
"enum": ["standard", "strong"]
|
|
},
|
|
"model": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"
|
|
},
|
|
"reasoningEffort": {
|
|
"type": ["string", "null"],
|
|
"enum": ["low", "medium", "high", "xhigh", null]
|
|
},
|
|
"permissionMode": {
|
|
"type": "string",
|
|
"enum": ["read-only", "workspace-write"]
|
|
}
|
|
}
|
|
},
|
|
"workerDefaults": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"developer": { "$ref": "#/definitions/profileId" },
|
|
"test": { "$ref": "#/definitions/profileId" },
|
|
"developerUpgraded": { "$ref": "#/definitions/profileId" }
|
|
}
|
|
},
|
|
"orchestration": {
|
|
"type": "object",
|
|
"required": [
|
|
"profileVersion",
|
|
"mode",
|
|
"allowedWorktrees",
|
|
"modelAllowlist",
|
|
"profiles",
|
|
"defaults"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"profileVersion": {
|
|
"type": "integer",
|
|
"const": 1
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"enum": ["orca", "manual"]
|
|
},
|
|
"allowedWorktrees": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "^/"
|
|
}
|
|
},
|
|
"modelAllowlist": {
|
|
"$ref": "#/definitions/modelAllowlist"
|
|
},
|
|
"profiles": {
|
|
"type": "object",
|
|
"propertyNames": {
|
|
"$ref": "#/definitions/profileId"
|
|
},
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/workerProfile"
|
|
}
|
|
},
|
|
"defaults": {
|
|
"$ref": "#/definitions/workerDefaults"
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"mode": { "const": "orca" }
|
|
},
|
|
"required": ["mode"]
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"allowedWorktrees": { "type": "array", "minItems": 1 },
|
|
"modelAllowlist": { "type": "object", "minProperties": 1 },
|
|
"profiles": { "type": "object", "minProperties": 1 },
|
|
"defaults": {
|
|
"type": "object",
|
|
"required": ["developer", "test"],
|
|
"properties": {
|
|
"developer": {},
|
|
"test": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"worktreeIdentity": {
|
|
"type": "object",
|
|
"required": [
|
|
"path",
|
|
"device",
|
|
"inode",
|
|
"gitCommonDir",
|
|
"gitCommonDevice",
|
|
"gitCommonInode"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"path": {
|
|
"type": "string",
|
|
"pattern": "^/"
|
|
},
|
|
"device": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"inode": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"gitCommonDir": {
|
|
"type": "string",
|
|
"pattern": "^/"
|
|
},
|
|
"gitCommonDevice": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"gitCommonInode": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
}
|
|
}
|
|
},
|
|
"receiptRequested": {
|
|
"type": "object",
|
|
"required": [
|
|
"cli",
|
|
"tier",
|
|
"model",
|
|
"reasoningEffort",
|
|
"permissionMode",
|
|
"executable",
|
|
"executableDevice",
|
|
"executableInode",
|
|
"cliVersion",
|
|
"argv",
|
|
"argvHash",
|
|
"environmentPolicy"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"cli": {
|
|
"type": "string",
|
|
"enum": ["codex", "cursor-agent", "grok", "omp"]
|
|
},
|
|
"tier": {
|
|
"type": "string",
|
|
"enum": ["standard", "strong"]
|
|
},
|
|
"model": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/+@-]{0,127}$"
|
|
},
|
|
"reasoningEffort": {
|
|
"type": ["string", "null"],
|
|
"enum": ["low", "medium", "high", "xhigh", null]
|
|
},
|
|
"permissionMode": {
|
|
"type": "string",
|
|
"enum": ["read-only", "workspace-write"]
|
|
},
|
|
"executable": {
|
|
"type": "string",
|
|
"pattern": "^/"
|
|
},
|
|
"executableDevice": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"executableInode": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"cliVersion": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"argv": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"argvHash": {
|
|
"$ref": "#/definitions/sha256"
|
|
},
|
|
"environmentPolicy": {
|
|
"type": "string",
|
|
"const": "per-cli-allowlist-v1"
|
|
}
|
|
}
|
|
},
|
|
"receiptBinding": {
|
|
"type": "object",
|
|
"required": [
|
|
"orchestrator",
|
|
"runtimeId",
|
|
"handle",
|
|
"incarnationId",
|
|
"observedWorktreePath",
|
|
"connected",
|
|
"writable",
|
|
"boundAt"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"orchestrator": {
|
|
"type": "string",
|
|
"const": "orca"
|
|
},
|
|
"runtimeId": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"handle": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"incarnationId": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"observedWorktreePath": {
|
|
"type": "string"
|
|
},
|
|
"connected": {
|
|
"type": "boolean"
|
|
},
|
|
"writable": {
|
|
"type": "boolean"
|
|
},
|
|
"boundAt": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
}
|
|
},
|
|
"workerReceipt": {
|
|
"type": "object",
|
|
"required": [
|
|
"receiptVersion",
|
|
"id",
|
|
"launchId",
|
|
"profileId",
|
|
"profileHash",
|
|
"launchFingerprint",
|
|
"slot",
|
|
"createdFor",
|
|
"worktree",
|
|
"requested",
|
|
"binding",
|
|
"createdAt",
|
|
"receiptHash"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"receiptVersion": {
|
|
"type": "integer",
|
|
"const": 1
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^WR-[0-9a-f]{64}$"
|
|
},
|
|
"launchId": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-f]{64}$"
|
|
},
|
|
"profileId": {
|
|
"$ref": "#/definitions/profileId"
|
|
},
|
|
"profileHash": {
|
|
"$ref": "#/definitions/sha256"
|
|
},
|
|
"launchFingerprint": {
|
|
"$ref": "#/definitions/sha256"
|
|
},
|
|
"projectRoot": {
|
|
"type": "string",
|
|
"pattern": "^/"
|
|
},
|
|
"boardHash": {
|
|
"$ref": "#/definitions/sha256"
|
|
},
|
|
"slot": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 99
|
|
},
|
|
"createdFor": {
|
|
"type": "object",
|
|
"required": ["taskId", "attemptId", "role"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"taskId": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"attemptId": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*-A[1-3]$"
|
|
},
|
|
"role": {
|
|
"type": "string",
|
|
"enum": ["developer", "test"]
|
|
}
|
|
}
|
|
},
|
|
"worktree": {
|
|
"$ref": "#/definitions/worktreeIdentity"
|
|
},
|
|
"requested": {
|
|
"$ref": "#/definitions/receiptRequested"
|
|
},
|
|
"binding": {
|
|
"$ref": "#/definitions/receiptBinding"
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"receiptHash": {
|
|
"$ref": "#/definitions/sha256"
|
|
}
|
|
}
|
|
},
|
|
"roleDispatch": {
|
|
"type": "object",
|
|
"required": ["profileId", "receiptId", "attemptId", "taskId", "dispatchId"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"profileId": {
|
|
"type": ["string", "null"],
|
|
"pattern": "^[a-z][a-z0-9-]{1,63}$"
|
|
},
|
|
"receiptId": {
|
|
"type": ["string", "null"],
|
|
"pattern": "^WR-[0-9a-f]{64}$"
|
|
},
|
|
"attemptId": {
|
|
"type": ["string", "null"],
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*-A[1-3]$"
|
|
},
|
|
"taskId": {
|
|
"type": ["string", "null"]
|
|
},
|
|
"dispatchId": {
|
|
"type": ["string", "null"]
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"receiptId": { "type": "null" }
|
|
},
|
|
"required": ["receiptId"]
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"attemptId": { "type": "null" }
|
|
}
|
|
},
|
|
"else": {
|
|
"properties": {
|
|
"profileId": { "type": "string" },
|
|
"attemptId": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"open",
|
|
"dispatched",
|
|
"fixed_by_dev",
|
|
"retesting",
|
|
"failed_retest",
|
|
"verified",
|
|
"blocked",
|
|
"leftover"
|
|
]
|
|
},
|
|
"round": {
|
|
"type": "object",
|
|
"required": ["round", "result"],
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"round": { "type": "integer", "minimum": 1, "maximum": 3 },
|
|
"attemptId": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*-A[1-3]$",
|
|
"description": "稳定逻辑轮次 ID,应为 <task-id>-A<round>;旧轮次可缺省,但作为知识来源前必须补齐"
|
|
},
|
|
"result": { "type": "string", "enum": ["passed", "failed"] },
|
|
"evidence": { "type": "string" }
|
|
}
|
|
},
|
|
"environmentIncident": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"role",
|
|
"phase",
|
|
"status",
|
|
"summary",
|
|
"evidence",
|
|
"impact",
|
|
"recoveryAction",
|
|
"userAction",
|
|
"reportedAt"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*-ENV-[1-9][0-9]*$"
|
|
},
|
|
"attemptId": { "type": ["string", "null"] },
|
|
"role": {
|
|
"type": "string",
|
|
"enum": ["coordinator", "developer", "test"]
|
|
},
|
|
"phase": {
|
|
"type": "string",
|
|
"enum": [
|
|
"launch",
|
|
"orchestration",
|
|
"service",
|
|
"test_data",
|
|
"browser",
|
|
"tooling",
|
|
"permissions",
|
|
"other"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["open", "resolved"]
|
|
},
|
|
"summary": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"evidence": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"impact": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"recoveryAction": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"userAction": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"reportedAt": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"resolvedAt": { "type": ["string", "null"] }
|
|
}
|
|
},
|
|
"knowledgeRef": {
|
|
"type": "string",
|
|
"pattern": "^K-[A-Z0-9][A-Z0-9-]*@[1-9][0-9]*$"
|
|
},
|
|
"knowledgeCandidate": {
|
|
"type": "object",
|
|
"required": [
|
|
"kind",
|
|
"title",
|
|
"claim",
|
|
"scope",
|
|
"appliesWhen",
|
|
"directive",
|
|
"rationale",
|
|
"evidenceRefs"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": ["guardrail", "pitfall", "verification"]
|
|
},
|
|
"title": { "type": "string", "minLength": 1 },
|
|
"claim": { "type": "string", "minLength": 1 },
|
|
"scope": {
|
|
"type": "object",
|
|
"minProperties": 1,
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"all": { "type": "boolean" },
|
|
"components": {
|
|
"type": "array",
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"uniqueItems": true
|
|
},
|
|
"paths": {
|
|
"type": "array",
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"uniqueItems": true
|
|
},
|
|
"dependencies": {
|
|
"type": "array",
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"uniqueItems": true
|
|
},
|
|
"versions": {
|
|
"type": "array",
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"uniqueItems": true
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"uniqueItems": true
|
|
},
|
|
"symbols": {
|
|
"type": "array",
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"uniqueItems": true
|
|
},
|
|
"errorSignatures": {
|
|
"type": "array",
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"uniqueItems": true
|
|
}
|
|
}
|
|
},
|
|
"appliesWhen": { "type": "string", "minLength": 1 },
|
|
"directive": { "type": "string", "minLength": 1 },
|
|
"rationale": { "type": "string", "minLength": 1 },
|
|
"evidenceRefs": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": { "type": "string", "minLength": 1 },
|
|
"uniqueItems": true
|
|
},
|
|
"proposedBy": { "type": "string" },
|
|
"proposedAt": { "type": "string" }
|
|
}
|
|
},
|
|
"knowledgeApplication": {
|
|
"type": "object",
|
|
"required": ["ref", "result", "evidence"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"ref": { "$ref": "#/definitions/knowledgeRef" },
|
|
"result": {
|
|
"type": "string",
|
|
"enum": ["applied", "not_applicable"]
|
|
},
|
|
"evidence": { "type": "string", "minLength": 1 }
|
|
}
|
|
},
|
|
"knowledgeCheck": {
|
|
"type": "object",
|
|
"required": ["ref", "result", "evidence"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"ref": { "$ref": "#/definitions/knowledgeRef" },
|
|
"result": {
|
|
"type": "string",
|
|
"enum": ["passed", "failed", "not_applicable"]
|
|
},
|
|
"evidence": { "type": "string", "minLength": 1 },
|
|
"checkedBy": { "type": "string" },
|
|
"checkedAt": { "type": "string" }
|
|
}
|
|
},
|
|
"deliveryArtifactEvidence": {
|
|
"type": "object",
|
|
"required": ["id", "type", "reference"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" },
|
|
"type": { "type": "string", "enum": ["deb", "oci-image", "file"] },
|
|
"reference": { "type": "string", "minLength": 1 },
|
|
"digest": {
|
|
"type": ["string", "null"],
|
|
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
}
|
|
}
|
|
},
|
|
"deliveryDeploymentEvidence": {
|
|
"type": "object",
|
|
"required": ["environment", "result", "evidence"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"environment": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]{0,63}$"
|
|
},
|
|
"result": {
|
|
"type": "string",
|
|
"enum": ["succeeded", "failed", "rolled_back"]
|
|
},
|
|
"evidence": { "type": "string", "minLength": 1 }
|
|
}
|
|
},
|
|
"deliveryRun": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"profile",
|
|
"taskIds",
|
|
"status",
|
|
"sourceRevision",
|
|
"configRevision",
|
|
"pullRequest",
|
|
"artifacts",
|
|
"deployments",
|
|
"evidence",
|
|
"updatedAt"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^DR-[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
|
|
},
|
|
"profile": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]{0,63}$"
|
|
},
|
|
"intent": {
|
|
"type": "string",
|
|
"enum": ["testEnvironment", "release"],
|
|
"description": "用户触发的测试环境或发版操作;有 intent 时 taskIds 可为 []"
|
|
},
|
|
"taskIds": {
|
|
"type": "array",
|
|
"minItems": 0,
|
|
"uniqueItems": true,
|
|
"items": { "type": "string", "minLength": 1 }
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"planned",
|
|
"running",
|
|
"blocked",
|
|
"failed",
|
|
"validation_ready",
|
|
"review_ready",
|
|
"released",
|
|
"skipped"
|
|
]
|
|
},
|
|
"sourceRevision": {
|
|
"type": ["string", "null"],
|
|
"pattern": "^[0-9a-f]{7,64}$"
|
|
},
|
|
"configRevision": {
|
|
"type": ["string", "null"],
|
|
"pattern": "^[0-9a-f]{7,64}$"
|
|
},
|
|
"pullRequest": { "type": ["string", "null"] },
|
|
"artifacts": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/deliveryArtifactEvidence" }
|
|
},
|
|
"deployments": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/deliveryDeploymentEvidence" }
|
|
},
|
|
"evidence": {
|
|
"type": "array",
|
|
"items": { "type": "string", "minLength": 1 }
|
|
},
|
|
"updatedAt": { "type": "string", "minLength": 1 }
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"status": {
|
|
"enum": [
|
|
"planned",
|
|
"running",
|
|
"blocked",
|
|
"failed",
|
|
"validation_ready",
|
|
"review_ready",
|
|
"released"
|
|
]
|
|
}
|
|
},
|
|
"required": ["status"]
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"sourceRevision": { "type": "string" },
|
|
"configRevision": { "type": "string" }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"status": {
|
|
"enum": [
|
|
"blocked",
|
|
"failed",
|
|
"validation_ready",
|
|
"review_ready",
|
|
"released",
|
|
"skipped"
|
|
]
|
|
}
|
|
},
|
|
"required": ["status"]
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"evidence": { "minItems": 1 }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"status": { "enum": ["review_ready", "released"] }
|
|
},
|
|
"required": ["status"]
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"sourceRevision": { "type": "string" },
|
|
"configRevision": { "type": "string" },
|
|
"pullRequest": { "type": "string", "minLength": 1 },
|
|
"evidence": { "minItems": 1 }
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"task": {
|
|
"type": "object",
|
|
"required": ["id", "title", "status"],
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"id": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"type": { "type": "string" },
|
|
"title": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"priority": { "type": "string" },
|
|
"status": { "$ref": "#/definitions/status" },
|
|
"assignee": { "type": "string" },
|
|
"component": { "type": "string" },
|
|
"specRefs": { "type": "array", "items": { "type": "string" } },
|
|
"testRefs": { "type": "array", "items": { "type": "string" } },
|
|
"knowledgeRefs": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/knowledgeRef" },
|
|
"uniqueItems": true
|
|
},
|
|
"knowledgeApplied": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/knowledgeApplication" }
|
|
},
|
|
"knowledgeCandidates": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/knowledgeCandidate" }
|
|
},
|
|
"knowledgeChecks": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/knowledgeCheck" }
|
|
},
|
|
"source": {
|
|
"if": {
|
|
"type": "object",
|
|
"required": ["kind"],
|
|
"properties": { "kind": { "const": "feishu-base" } }
|
|
},
|
|
"then": {
|
|
"$ref": "#/definitions/feishuTaskSource"
|
|
}
|
|
},
|
|
"description": { "type": "string" },
|
|
"fixLogic": { "type": "string", "minLength": 1, "pattern": "\\S" },
|
|
"acceptanceCriteria": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": { "type": "string", "minLength": 1, "pattern": "\\S" }
|
|
},
|
|
"stepsToReproduce": { "type": "array", "items": { "type": "string" } },
|
|
"expected": { "type": "string" },
|
|
"actual": { "type": "string" },
|
|
"evidence": { "type": "object" },
|
|
"verification": { "type": "object" },
|
|
"dispatch": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"taskId": { "type": ["string", "null"] },
|
|
"dispatchId": { "type": ["string", "null"] },
|
|
"worker": { "type": ["string", "null"] },
|
|
"developer": { "$ref": "#/definitions/roleDispatch" },
|
|
"test": { "$ref": "#/definitions/roleDispatch" },
|
|
"rounds": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/round" }
|
|
},
|
|
"environmentIncidents": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/environmentIncident" }
|
|
}
|
|
}
|
|
},
|
|
"resolution": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"fixedBy": { "type": ["string", "null"] },
|
|
"verifiedBy": { "type": ["string", "null"] },
|
|
"verifiedAt": { "type": ["string", "null"] },
|
|
"leftoverReason": { "type": ["string", "null"] },
|
|
"evidence": { "type": "object" }
|
|
}
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": { "properties": { "status": { "const": "leftover" } } },
|
|
"then": {
|
|
"properties": {
|
|
"resolution": {
|
|
"type": "object",
|
|
"properties": {
|
|
"leftoverReason": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "\\S"
|
|
}
|
|
},
|
|
"required": ["leftoverReason"]
|
|
}
|
|
},
|
|
"required": ["resolution"]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|