280 lines
9.0 KiB
JSON
280 lines
9.0 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",
|
|
"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" },
|
|
"baseUrl": { "type": "string" },
|
|
"devWorktree": { "type": "string" },
|
|
"overlayFile": {
|
|
"type": "string",
|
|
"description": "项目覆盖层文件路径,默认 docs/ack/project.md,可自定义"
|
|
},
|
|
"knowledgeFile": {
|
|
"type": "string",
|
|
"const": "docs/ack/knowledge.yaml",
|
|
"description": "项目知识护栏库的唯一权威路径"
|
|
}
|
|
}
|
|
},
|
|
"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" },
|
|
"tasks": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/task" }
|
|
}
|
|
},
|
|
"definitions": {
|
|
"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-9][0-9]*$",
|
|
"description": "稳定逻辑轮次 ID,应为 <task-id>-A<round>;旧轮次可缺省,但作为知识来源前必须补齐"
|
|
},
|
|
"result": { "type": "string", "enum": ["passed", "failed"] },
|
|
"evidence": { "type": "string" }
|
|
}
|
|
},
|
|
"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" }
|
|
}
|
|
},
|
|
"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" }
|
|
},
|
|
"description": { "type": "string" },
|
|
"stepsToReproduce": { "type": "array", "items": { "type": "string" } },
|
|
"expected": { "type": "string" },
|
|
"actual": { "type": "string" },
|
|
"evidence": { "type": "object" },
|
|
"verification": { "type": "object" },
|
|
"dispatch": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"taskId": { "type": ["string", "null"] },
|
|
"dispatchId": { "type": ["string", "null"] },
|
|
"worker": { "type": ["string", "null"] },
|
|
"rounds": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/definitions/round" }
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|