{
  "module": "kanban",
  "version": "1.0",
  "purpose": "Dashboard 'Kanban' tab 展示看板任务列表，支持按状态(Ready/In Progress/Blocked/Done)和负责人筛选，实时刷新。",
  "ui_location": "主菜单 → Kanban tab",

  "human_help": {
    "title": "Kanban 看板",
    "description": [
      "本页面展示系统中的看板任务卡片，每个任务包含标题、状态标签、负责人和创建日期。",
      "顶部筛选器可按状态和负责人过滤任务列表。",
      "任务卡片可点击展开/收起详细描述。"
    ],
    "usage": [
      "1. 使用顶部筛选器（All Status / All）缩小任务范围",
      "2. 点击任务卡片展开详情（支持 multi-line 描述）",
      "3. 状态颜色标识：绿色=Ready、黄色=In Progress、红色=Blocked、灰色=Done",
      "4. 页面每 15s 自动刷新任务列表"
    ],
    "troubleshooting": [
      "如果任务列表为空：检查 Kanban API 是否正常运行",
      "如果筛选器无反应：页面自动刷新后会重置筛选状态 — 请确保在刷新间隔内操作"
    ],
    "related": "G 规范定义开发流程和任务管理规范"
  },

  "ai_spec": {
    "apis": [
      {"method": "GET", "path": "/api/kanban", "returns": "{ok, tasks[{id,title,body,status,assignee,created_at}]}"}
    ],
    "dependencies": [
      "看板数据由 dashboard.py 从后端 Kanban 服务/数据库获取"
    ],
    "constraints": [
      "页面每 15s 轮询刷新 (setInterval(fK,15000))",
      "筛选器状态通过 DOM 直接读取 (document.getElementById)",
      "任务卡片展开使用 onclick 切换 expanded class — max-height 从 60px ↔ none 切换"
    ],
    "tests": [
      {"id": "KB01", "name": "/api/kanban 返回任务列表", "endpoint": "GET /api/kanban"},
      {"id": "KB02", "name": "筛选器过滤正确", "endpoint": "n/a (frontend)"}
    ],
    "related_files": [
      "gateway/scripts/templates/dashboard.html — fK() 渲染函数",
      "gateway/scripts/dashboard.py — /api/kanban 端点",
      "gateway/scripts/specs/kanban.json — 本 spec 文件"
    ]
  }
}
