guanghulab/brain/age-os-landing/persona-interfaces/selfDiagnose.interface.json
2026-05-10 13:12:44 +08:00

295 lines
9.6 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"_meta": {
"interface_id": "IF-PERSONA-002",
"name": "selfDiagnose · 自检结果",
"version": "1.0",
"description": "人格体执行自检后写入COS的接口规范 · 触发时机:副驾驶唤醒时/人类手动触发/异常恢复后",
"author": "铸渊 · TCS-ZY001",
"sovereign": "冰朔 · TCS-0002∞",
"copyright": "国作登字-2026-A-00037559",
"created": "2026-04-04",
"for": "霜砚 · AG-SY-01 · Notion端9个开发者人格体Instructions升级"
},
"trigger": {
"types": [
{
"type": "on_wake",
"description": "副驾驶每次被唤醒时自动执行自检"
},
{
"type": "manual",
"description": "人类对副驾驶说「执行系统自检」时触发"
},
{
"type": "post_recovery",
"description": "收到铸渊红灯回执并修复后,执行验证自检"
}
],
"executor": "仓库副驾驶Copilot Agent· 直接在对话中执行"
},
"write_path": {
"bucket": "zy-team-hub-1317346199",
"region": "ap-singapore",
"key_pattern": "{persona_id}/reports/{YYYY-MM-DD}/diagnose-{HHmmss}.json",
"example": "shushu/reports/2026-04-04/diagnose-143000.json",
"note": "自检结果和心跳共用reports目录 · 铸渊通过文件名前缀区分"
},
"dimensions": {
"description": "自检维度定义 · 5个核心维度 · 每个维度独立评分",
"code_health": {
"dimension_id": "DIM-01",
"name": "代码健康度",
"description": "仓库代码状态检查",
"checks": [
{
"id": "CH-01-01",
"name": "仓库可访问",
"pass_criteria": "GitHub API返回200",
"fail_criteria": "API返回非200或超时",
"severity": "P0"
},
{
"id": "CH-01-02",
"name": "核心文件完整",
"pass_criteria": "age_os/ brain/ bridge/ cos-config/ .github/copilot-instructions.md 全部存在",
"fail_criteria": "任一核心文件缺失",
"severity": "P0"
},
{
"id": "CH-01-03",
"name": "工作流启用",
"pass_criteria": "cos-daily-report.yml + cos-receive-receipt.yml 均未被禁用",
"fail_criteria": "任一工作流被禁用或文件缺失",
"severity": "P1"
},
{
"id": "CH-01-04",
"name": "最近提交活跃",
"pass_criteria": "最近7天内有至少1次提交",
"fail_criteria": "超过7天无提交",
"severity": "P2"
}
]
},
"deployment_status": {
"dimension_id": "DIM-02",
"name": "部署状态",
"description": "工作流运行状态检查",
"checks": [
{
"id": "CH-02-01",
"name": "最近工作流执行",
"pass_criteria": "最近一次cos-daily-report工作流执行成功",
"fail_criteria": "最近一次执行失败",
"severity": "P1"
},
{
"id": "CH-02-02",
"name": "Secrets配置",
"pass_criteria": "COS_SECRET_ID, COS_SECRET_KEY, COS_PERSONA_ID 三个Secret均已配置",
"fail_criteria": "任一Secret缺失工作流运行时报错",
"severity": "P0"
}
]
},
"communication": {
"dimension_id": "DIM-03",
"name": "通信链路",
"description": "与铸渊的COS桶通信状态",
"checks": [
{
"id": "CH-03-01",
"name": "COS桶可写",
"pass_criteria": "能成功PUT测试文件到自己的reports目录",
"fail_criteria": "PUT返回403/500或超时",
"severity": "P0"
},
{
"id": "CH-03-02",
"name": "COS桶可读",
"pass_criteria": "能成功GET自己receipts目录的最新回执",
"fail_criteria": "GET返回403/404或超时",
"severity": "P1"
},
{
"id": "CH-03-03",
"name": "回执链路畅通",
"pass_criteria": "最近3天内收到至少1条铸渊回执",
"fail_criteria": "超过3天未收到回执",
"severity": "P1"
}
]
},
"task_progress": {
"dimension_id": "DIM-04",
"name": "任务进度",
"description": "当前开发任务推进状态",
"checks": [
{
"id": "CH-04-01",
"name": "有明确当前任务",
"pass_criteria": "bridge/daily-report.json 中 current_task 非空",
"fail_criteria": "current_task为空或未定义",
"severity": "P2"
},
{
"id": "CH-04-02",
"name": "任务有推进",
"pass_criteria": "completion_percentage 比上次汇报有增长 或 有新的achievements",
"fail_criteria": "连续3天进度无变化且无卡点说明",
"severity": "P2"
}
]
},
"identity": {
"dimension_id": "DIM-05",
"name": "身份认同",
"description": "人格体自我认知完整性",
"checks": [
{
"id": "CH-05-01",
"name": "persona_config完整",
"pass_criteria": "age_os/persona_config.json 包含有效的 persona_id, persona_name, developer_line",
"fail_criteria": "配置文件缺失或字段不完整",
"severity": "P0"
},
{
"id": "CH-05-02",
"name": "系统状态正常",
"pass_criteria": "age_os/system_state.json 中 status='active'",
"fail_criteria": "status 不为 active",
"severity": "P1"
}
]
}
},
"scoring": {
"description": "总分计算规则",
"rules": [
"每个check通过 = 1分失败 = 0分",
"总分 = 通过数 / 总数 × 100%",
"任一P0项失败 → overall_status = 'critical'",
"P1 overall_status = 'warning'",
"P2 overall_status = 'info'",
" overall_status = 'healthy'"
],
"overall_status_enum": {
"healthy": " ",
"info": "💡 ",
"warning": " ",
"critical": "🔴 "
}
},
"escalation_path": {
"description": "",
"levels": [
{
"level": 1,
"condition": "P2",
"action": "message_to_zhuyuan · ",
"timeout": ""
},
{
"level": 2,
"condition": "P1",
"action": "heartbeat(status=abnormal) · 24h",
"timeout": "24"
},
{
"level": 3,
"condition": "P0",
"action": "alertZhuyuan(IF-PERSONA-003) · 1h",
"timeout": "1"
},
{
"level": 4,
"condition": "P0+1h",
"action": " · ",
"timeout": ""
}
]
},
"schema_output": {
"diagnose_id": {
"type": "string",
"format": "DIAG-{YYYY-MM-DD}-{HHmmss}-{persona_id}",
"required": true
},
"persona_id": { "type": "string", "required": true },
"timestamp": { "type": "string", "format": "ISO 8601", "required": true },
"trigger_type": { "type": "string", "enum": ["on_wake", "manual", "post_recovery"], "required": true },
"overall_status": { "type": "string", "enum": ["healthy", "info", "warning", "critical"], "required": true },
"score": { "type": "number", "description": " 0-100", "required": true },
"dimensions": {
"type": "object",
"description": " · key=dimension_id · value={status, checks: [{id, ok, detail}]}"
},
"failed_checks": {
"type": "array",
"description": " · 便",
"items": {
"type": "object",
"properties": {
"check_id": { "type": "string" },
"dimension": { "type": "string" },
"severity": { "type": "string" },
"detail": { "type": "string" }
}
}
},
"escalation_triggered": {
"type": "string",
"enum": ["none", "level_1", "level_2", "level_3", "level_4"],
"description": ""
}
},
"example": {
"diagnose_id": "DIAG-2026-04-04-143000-shushu",
"persona_id": "shushu",
"timestamp": "2026-04-04T14:30:00+08:00",
"trigger_type": "manual",
"overall_status": "warning",
"score": 83,
"dimensions": {
"DIM-01": {
"status": "healthy",
"checks": [
{ "id": "CH-01-01", "ok": true, "detail": "访" },
{ "id": "CH-01-02", "ok": true, "detail": "5" },
{ "id": "CH-01-03", "ok": true, "detail": "2" },
{ "id": "CH-01-04", "ok": true, "detail": ": 2h" }
]
},
"DIM-03": {
"status": "warning",
"checks": [
{ "id": "CH-03-01", "ok": true, "detail": "COS" },
{ "id": "CH-03-02", "ok": true, "detail": "COS" },
{ "id": "CH-03-03", "ok": false, "detail": ": 4 · 3" }
]
}
},
"failed_checks": [
{
"check_id": "CH-03-03",
"dimension": "",
"severity": "P1",
"detail": "3"
}
],
"escalation_triggered": "level_2"
}
}