guanghulab/hldp/hnl/industry-bridge-protocol.json
2026-05-10 13:12:44 +08:00

253 lines
9.1 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

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.

{
"_sovereign": "TCS-0002∞ | SYS-GLW-0001",
"_copyright": "国作登字-2026-A-00037559",
"_description": "行业桥接协议 · HNL母语 · 铸渊↔行业人格体通信规范",
"_note": "这是用HNL母语定义的行业桥接协议。人格体之间用母语通信=零歧义。",
"hldp_v": "3.0",
"hnl_v": "1.0",
"protocol_id": "HNL-INDUSTRY-BRIDGE-001",
"created_at": "2026-04-13T15:00:00Z",
"created_by": "ICE-GL-ZY001",
"essence": {
"zh": "行业人格体通过COS桶向铸渊提交开发方案铸渊从全局视角审核后回执回执自动触发开发",
"hnl": "TRACE.YM001/ZY001.YM001/{persona}.RTL → ECHO.{submission}.{status}"
},
"axioms_applied": [
{
"axiom": "AX-01: Path = Identity",
"application": "COS路径 /industry/{code}/dev-submissions/{persona_id}/ 就是这个人格体的开发通道。路径=身份=权限。"
},
{
"axiom": "AX-02: Structure = Meaning",
"application": "提交的JSON结构本身携带语义。submission_type='dev_proposal'不需要额外解释。"
},
{
"axiom": "AX-03: Type = Intent",
"application": "msg_type='report' + submission_type='dev_proposal' = 开发方案提交。类型决定意图。"
},
{
"axiom": "AX-04: Tree = Memory",
"application": "每一次提交和回执都是光之树的一片叶子。审核历史=成长记录。"
}
],
"message_types": {
"dev_submission": {
"direction": "行业人格体 → 铸渊",
"hnl_verb": "GROW",
"hnl_expression": "GROW.YM001/{persona}/trunk/experience.leaf.dev-{submission_id}",
"msg_type": "report",
"required_payload_fields": {
"submission_type": {
"type": "string",
"enum": ["dev_proposal", "hotfix", "dependency_update", "architecture_change"],
"hnl_meaning": {
"dev_proposal": "新功能开发方案 → 需要完整审核",
"hotfix": "紧急修复 → 快速审核(安全检查优先)",
"dependency_update": "依赖更新 → 检查CVE漏洞",
"architecture_change": "架构变更 → 严格审核(可能影响全局)"
}
},
"title": {
"type": "string",
"hnl_meaning": "一句话说明要做什么"
},
"description": {
"type": "string",
"hnl_meaning": "详细说明为什么要做这个 + 怎么做"
},
"target_files": {
"type": "array",
"hnl_meaning": "会改动哪些文件路径 → 铸渊据此判断影响范围"
},
"architecture_impact": {
"type": "object",
"hnl_meaning": "对架构的影响 → 铸渊审核的核心依据",
"fields": {
"new_api_endpoints": "新增哪些API路径",
"database_changes": "数据库有什么变更",
"external_dependencies": "引入哪些外部依赖",
"estimated_resource": "预估资源消耗"
}
},
"development_plan": {
"type": "object",
"hnl_meaning": "开发步骤 → 铸渊可以逐步审核",
"fields": {
"steps": "开发步骤列表",
"estimated_scope": "规模评估: small/medium/large"
}
}
},
"cos_destination": "/industry/{industry_code}/dev-submissions/{persona_id}/{msg_id}.json",
"example_hnl": "GROW.YM001/ZQ001/trunk/experience.leaf.dev-20260413-001 → [推荐算法API] △=新增AI推荐能力"
},
"dev_receipt": {
"direction": "铸渊 → 行业人格体",
"hnl_verb": "ECHO",
"hnl_expression": "ECHO.{submission_id}.{APPROVED|REJECTED|REVISION_NEEDED}",
"msg_type": "ack",
"required_payload_fields": {
"ref_submission_id": {
"type": "string",
"hnl_meaning": "回复的是哪个提交 → 一一对应"
},
"status": {
"type": "string",
"enum": ["APPROVED", "REJECTED", "REVISION_NEEDED"],
"hnl_meaning": {
"APPROVED": " ",
"REJECTED": " blockers",
"REVISION_NEEDED": " "
}
},
"review_result": {
"type": "object",
"hnl_meaning": "",
"fields": {
"architecture": ": PASS/WARN/FAIL",
"security": ": PASS/WARN/FAIL",
"naming": ": PASS/WARN/FAIL",
"overall": ": APPROVED/REJECTED/REVISION_NEEDED"
}
},
"guidance": {
"type": "object",
"hnl_meaning": " ·",
"fields": {
"suggestions": " ()",
"warnings": " ()",
"blockers": " (REJECTED)"
}
},
"auto_trigger": {
"type": "object",
"hnl_meaning": " APPROVED",
"fields": {
"enabled": "",
"target_repo": "",
"trigger_type": "repository_dispatch",
"event_type": "zhuyuan-dev-approved",
"payload": ""
}
}
},
"cos_destination": "/industry/{industry_code}/dev-receipts/{persona_id}/{msg_id}.json",
"example_hnl": "ECHO.HLDP-ZQ-20260413-DEV-001.APPROVED · | ="
}
},
"review_criteria": {
"hnl_explanation": "TRACE.YM001/ZY001.RTL ",
"dimensions": [
{
"name": "architecture",
"hnl": "",
"checks": [
"API",
"",
"(CPU//)",
""
],
"fail_conditions": [
"",
"",
""
]
},
{
"name": "security",
"hnl": "",
"checks": [
"npm/pipCVE",
"",
"SQL()",
"//token"
],
"fail_conditions": [
"criticalCVE",
"",
"SSH"
]
},
{
"name": "naming",
"hnl": "",
"checks": [
"",
"persona_id",
"HLDPv3.0"
],
"fail_conditions": [
"使persona_id",
"HLDP"
]
}
]
},
"auto_trigger_protocol": {
"hnl_explanation": "ECHO.{id}.APPROVED ALERT.{repo}.DISPATCH ",
"flow": [
{
"step": 1,
"action": "COS",
"hnl": "ECHO.{submission_id}.APPROVED"
},
{
"step": 2,
"action": "GitHub APIrepository_dispatch",
"hnl": "ALERT.{target_repo}.DISPATCH",
"api": "POST https://api.github.com/repos/{owner}/{repo}/dispatches",
"headers": {
"Authorization": "Bearer {ZHUYUAN_DISPATCH_TOKEN}",
"Accept": "application/vnd.github.v3+json"
},
"body": {
"event_type": "zhuyuan-dev-approved",
"client_payload": {
"submission_id": "{msg_id}",
"approved_steps": "从回执中提取",
"constraints": "从回执中提取",
"guidance": "从回执中提取"
}
}
},
{
"step": 3,
"action": "对方仓库的workflow被触发",
"hnl": "WAKE.{persona}.TASK",
"workflow_trigger": "on: repository_dispatch: types: [zhuyuan-dev-approved]"
},
{
"step": 4,
"action": "副驾驶读取payload·按指导开发",
"hnl": "GROW.{persona}/trunk/experience.leaf.{task}"
}
]
},
"error_handling": {
"submission_malformed": {
"response": "REVISION_NEEDED",
"guidance": "HLDP消息格式不符合v3.0规范。请参照 hldp/hnl/industry-bridge-protocol.json 中的 required_payload_fields。"
},
"cos_write_failed": {
"action": "ALERT.YM001/ZY001.URGENT.cos-write-failed",
"fallback": "在铸渊主仓库创建Issue记录"
},
"dispatch_failed": {
"action": "重试3次(间隔30秒)",
"fallback": "回执中标记 auto_trigger.enabled=false · 通知人格体手动触发"
},
"review_timeout": {
"threshold_hours": 24,
"action": "ALERT.TCS-0002∞.IMPORTANT.review-timeout",
"fallback": "通知冰朔"
}
}
}