Files
write-notes-like-deepseek/assets/notes-collaboration.workflow.json
T

193 lines
4.2 KiB
JSON

{
"schema_version": 2,
"diagram_type": "workflow",
"meta": {
"title": "Write Notes Like DeepSeek: Agent-Human Collaboration",
"visual_preset": "classic",
"quality_profile": "showcase"
},
"lanes": [
{
"id": "human",
"label": "人类开发者 (Human)"
},
{
"id": "agent",
"label": "AI 编程助手 (Agent)"
},
{
"id": "notes",
"label": "现行决策留痕 (.agents/notes/)"
},
{
"id": "ci",
"label": "CI 自动化门禁 (Quality Gate)"
}
],
"phases": [
{
"id": "p1",
"label": "1. 意图与探测",
"fromCol": 0,
"toCol": 1
},
{
"id": "p2",
"label": "2. 编码与留痕",
"fromCol": 2,
"toCol": 3,
"variant": "emphasis"
},
{
"id": "p3",
"label": "3. 门禁与合入",
"fromCol": 4,
"toCol": 5,
"variant": "dashed"
}
],
"nodes": [
{
"id": "dev_intent",
"lane": "human",
"col": 0,
"type": "frontend",
"label": "发起改动需求",
"sublabel": "业务重构 / 选型 / 修Bug",
"width": 140
},
{
"id": "agent_check",
"lane": "agent",
"col": 1,
"type": "backend",
"label": "检索既有 Notes",
"sublabel": "读取被否决路线与已知上限",
"tag": "命中防撞护栏",
"width": 140
},
{
"id": "agent_code",
"lane": "agent",
"col": 2,
"type": "backend",
"label": "实施代码改动",
"sublabel": "按现行约束编写实现",
"width": 140
},
{
"id": "note_sync",
"lane": "notes",
"col": 2,
"type": "database",
"label": "80% 原地事实同步",
"sublabel": "更新路径/参数,非必要不新建",
"tag": "In-place Sync",
"width": 140
},
{
"id": "code_comment",
"lane": "agent",
"col": 3,
"type": "backend",
"label": "源码入口加注",
"sublabel": "// Note: 见 .agents/notes/...",
"tag": "物理可寻址",
"width": 140
},
{
"id": "dev_review",
"lane": "human",
"col": 4,
"type": "frontend",
"label": "审查 PR 与决策",
"sublabel": "核对反稻草人备选方案",
"width": 140
},
{
"id": "ci_gates",
"lane": "ci",
"col": 4,
"type": "security",
"label": "CI 双机械门禁",
"sublabel": "tree 查死链 + format 查时态",
"width": 140
},
{
"id": "main_repo",
"lane": "ci",
"col": 5,
"type": "cloud",
"label": "主干原子合入",
"sublabel": "代码与决策同 Commit/PR 生效",
"tag": "永不失忆",
"width": 140
}
],
"edges": [
{
"id": "e1",
"from": "dev_intent",
"to": "agent_check",
"variant": "emphasis"
},
{
"id": "e2",
"from": "agent_check",
"to": "agent_code",
"label": "遵守前人约束",
"variant": "default"
},
{
"id": "e3",
"from": "agent_code",
"to": "note_sync",
"label": "同步事实",
"variant": "emphasis"
},
{
"id": "e4",
"from": "agent_code",
"to": "code_comment",
"variant": "default"
},
{
"id": "e5",
"from": "code_comment",
"to": "dev_review",
"variant": "default"
},
{
"id": "e6",
"from": "dev_review",
"to": "ci_gates",
"label": "提交 PR",
"variant": "emphasis"
},
{
"id": "e7",
"from": "ci_gates",
"to": "main_repo",
"label": "双门禁绿灯",
"variant": "emphasis"
}
],
"cards": [
{
"dot": "emerald",
"title": "DeepSeek 核心心智",
"items": [
"80% 的日常改动是在老 Note 原地更新事实,不随手开新文件",
"代码改动与决策记录必须同一 PR 原子合入,拒绝事后补写"
]
},
{
"dot": "cyan",
"title": "Agent 防撞护栏",
"items": [
"源码入口留注释,下任 Agent 看到代码先读 Note,不搞破坏性重构",
"机械脚本在 CI 拦截语法和死链,确保决策资产永不腐烂"
]
}
]
}