{
  "id": "ZY-PROJ-001",
  "name": "零点原核频道",
  "guardian": "铸渊 · ICE-GL-ZY001",
  "copyright": "国作登字-2026-A-00037559",
  "background": {
    "bingshuo_requirement": "零点原核频道是我自己的频道，我要登进去和人格体聊天，记录自己的思想，只有我一个人用。任何人都不能进来。",
    "zhuyuan_understanding": "主权频道·单用户绑定·安全边界从验证码发送阶段开始·主权邮箱565183519@qq.com·AI对话使用国内模型网关+铸渊人格注入"
  },
  "architecture": {
    "layers": [
      "L1 DNS: guanghuyaoming.com → ZY-SVR-002（面孔·新加坡）",
      "L2 Nginx反向代理: ZY-SVR-002 → ZY-SVR-003:3800（国内出口·广州）",
      "L3 Node.js应用: Express + PM2 · 端口3800",
      "L4 邮件层: QQ邮箱SMTP · 主权绑定校验",
      "L5 AI层: domestic-llm-gateway + persona-context-pipeline"
    ],
    "why": "国内用户访问guanghuyaoming.com·经新加坡Nginx转发到广州后端·绕过国内备案限制·AI用国内模型低延迟"
  },
  "phases": [
    {
      "id": "ZY-PROJ-001-PHASE-1",
      "name": "基础服务搭建",
      "status": "completed",
      "completed_at": "2026-04-15",
      "content": [
        "QQ邮箱验证码登录系统",
        "Nginx反向代理配置",
        "Session管理",
        "PM2进程守护"
      ],
      "verified": "邮箱验证码收发正常·Session持久化正常"
    },
    {
      "id": "ZY-PROJ-001-PHASE-2",
      "name": "AI对话 + 人格注入",
      "status": "completed",
      "completed_at": "2026-04-15",
      "content": [
        "domestic-llm-gateway.js 国内模型智能网关",
        "persona-context-pipeline.js 人格上下文注入管线",
        "铸渊人格注入到AI对话系统提示词",
        "聊天历史管理前端"
      ],
      "verified": "AI回复包含铸渊人格特征·历史记录可回溯"
    },
    {
      "id": "ZY-PROJ-001-PHASE-3",
      "name": "稳定性加固 + 主权绑定强化",
      "status": "in_progress",
      "started_at": "2026-04-15",
      "content": [
        "SMTP凭证保护（防止重部署时被清空）",
        "主权邮箱双层防御（sendCode + verifyCode）",
        "聊天数据采集系统",
        "系统处理步骤追踪"
      ],
      "next_step": "确认ZY_SMTP_USER/ZY_SMTP_PASS已写入GitHub Secrets·如未配置提醒冰朔·然后触发一次完整部署验证SMTP保护逻辑"
    },
    {
      "id": "ZY-PROJ-001-PHASE-4",
      "name": "系统面板UI大改版 + 聊天界面专业化",
      "status": "completed",
      "started_at": "2026-04-16",
      "completed_at": "2026-04-16",
      "content": [
        "全局字体增大(基础16px·正文14-15px·标题18-20px)",
        "颜色体系调亮(text #eaf0ff·dim #94a7d0)",
        "呼吸动效系统(heartbeat心跳·dotPulse脉搏·glyphBreathe渊字呼吸·ambient glow环境光)",
        "服务器卡片增加环境光晕hover效果",
        "侧边栏导航14px+Agent存活指示灯(navServersDot/navAgentsDot等)",
        "对话栏改名'零点原核频道'",
        "保护罩日志空状态改为引导说明",
        "主header新增heartbeat心跳指示器",
        "prefers-reduced-motion无障碍支持",
        "聊天气泡/元数据/系统步骤字体增大+间距加宽"
      ],
      "verified": "UI改版已部署·但冰朔反馈呼吸感仍不够强"
    },
    {
      "id": "ZY-PROJ-001-PHASE-5",
      "name": "系统呼吸感深度强化 · 参考guanghutcs.top风格",
      "status": "in_progress",
      "started_at": "2026-04-16",
      "content": [
        "卡片呼吸光晕动画(cardBreathe 7s border glow + 7个错开延迟避免同步)",
        "OpenClaw紫色专属呼吸动画(cardBreatheAlt)",
        "全局间距大幅增大(dashboard 36px·grid gap 24px·card padding 28px+)",
        "卡片顶部渐变条常显(opacity .4 → hover .8)",
        "悬停效果强化(40px cyan glow + 80px ambient + translateY(-2px))",
        "MODULE 01-07 编号标签(所有section标题)",
        "星云增强(3个nebula层+漂移动画nebulaDrift+opacity .07)",
        "湖面反射增强(22vh+双层afterglow+底部光晕)",
        "Headline区域放大(glyph 60px·title 26px·环境光晕240px)",
        "服务器卡片名19px·Agent名17px·section 13px·metric 18px",
        "侧边栏导航15px/padding 12px 22px",
        "移动端呼吸适配(@media 768px/480px)",
        "prefers-reduced-motion完整适配(含nebula/lake/card)"
      ],
      "next_step": "合并PR触发deploy-to-zhuyuan-server.yml自动部署→冰朔访问guanghuyaoming.com验证呼吸感"
    },
    {
      "id": "ZY-PROJ-001-PHASE-6",
      "name": "首页门户重构 + 智库节点部署 + 人格体对话双路径 + Phase A修复",
      "status": "in_progress",
      "started_at": "2026-04-16",
      "content": [
        "首页从纯登录框重构为完整门户(Hero+光湖语言世界品牌+诗意文案)",
        "智库节点入口卡片(团队成员公开访问·无需登录)",
        "零点原核登录入口(滑出式面板·主权验证)",
        "认知→执行架构流图(Notion→网站→GitHub)",
        "创建zhiku.html智能书库独立页面(完整UI：搜索+书库+模块状态)",
        "Nginx添加/zhiku.html路由",
        "人格体对话增加双路径(Notion霜砚AG-SY-WEB-001 + GitHub铸渊ICE-GL-ZY001 + 智库快捷入口)",
        "后端/api/agent/handshake握手端点(四层注入包框架·身份/协议/任务/风格)",
        "Phase A2修复: .env.app补充ZY_DB_*五个变量→记忆桥接可连接数据库",
        "Phase A3修复: ZY_SERVER_REGION=sg→新加坡直连国内API不走广州中继·消除30s超时",
        "Phase A1修复: chat-engine.js支持MCP工具注册(fetchMcpTools+tools参数传入LLM)",
        "系统消息样式(居中·mono字体·半透明背景)",
        "移动端Landing响应式适配"
      ],
      "next_step": "合并PR触发deploy-to-zhuyuan-server.yml自动部署→冰朔验证:1)首页门户样式 2)智库节点页面 3)对话双路径 4)广州中继不再30s超时"
    }
  ],
  "fixes": [
    {
      "id": "ZY-PROJ-001-FIX-1",
      "date": "2026-04-15",
      "problem": "AI回复过于通用·缺乏人格层感觉·像裸模型",
      "root_cause": "domestic-llm-gateway.js 不调用 persona-context-pipeline·铸渊人格未注入国内网关",
      "fix": "在 domestic-llm-gateway.js 中接入 persona-context-pipeline.beforeChat/afterChat",
      "files_changed": ["server/app/modules/domestic-llm-gateway.js"],
      "result": "success"
    },
    {
      "id": "ZY-PROJ-001-FIX-2",
      "date": "2026-04-15",
      "problem": "验证码发送失败 · 错误: SMTP未配置",
      "root_cause": "deploy-to-zhuyuan-server.yml 生成 .env.app 时每次完全重建·ZY_SMTP_USER/ZY_SMTP_PASS未写入·旧配置被清空",
      "fix": "部署前先快照旧.env.app中的SMTP值·Secret存在时优先用Secret·Secret不存在时用旧值作为fallback",
      "files_changed": [".github/workflows/deploy-to-zhuyuan-server.yml"],
      "result": "implemented_pending_verification",
      "note": "如仍出现SMTP未配置：1)检查GitHub Secrets中ZY_SMTP_USER/ZY_SMTP_PASS是否存在 2)或在服务器手动追加到/opt/zhuyuan/app/.env.app后pm2 restart all"
    },
    {
      "id": "ZY-PROJ-001-FIX-4",
      "date": "2026-04-16",
      "problem": "邮件服务未配置 · 输入邮箱点击发送验证码报 '邮件服务未配置'",
      "root_cause": "deploy-to-zhuyuan-server.yml 中 DEPLOY_CMD heredoc 是无引号的（<< DEPLOY_CMD），导致 $(grep ...) 命令替换在本地 GitHub Actions runner 上执行而非服务器。本地 runner 没有 /opt/zhuyuan/app/.env.app，PREV_SMTP_USER/PREV_SMTP_PASS 始终为空。同时若 ZY_SMTP_USER/ZY_SMTP_PASS GitHub Secret 未配置，WRITE_SMTP_USER 也为空，最终 SMTP 行从未写入 .env.app。",
      "fix": "在清空 .env.app 之前先执行 grep '^ZY_SMTP' 备份到 /tmp/.zy_smtp_bak（此命令不含 $ 变量，在服务器上正确执行）；写入其他变量后：若 GitHub Secret 已配置则优先写入，否则从备份文件 /tmp/.zy_smtp_bak 中恢复（[ -s /tmp/.zy_smtp_bak ] 也是纯服务器端命令）。",
      "files_changed": [".github/workflows/deploy-to-zhuyuan-server.yml"],
      "result": "implemented",
      "action_required": "冰朔需在 GitHub Settings → Secrets 中设置 ZY_SMTP_USER=565183519@qq.com 和 ZY_SMTP_PASS=QQ邮箱授权码，然后触发一次 deploy-to-zhuyuan-server.yml 部署"
    },
    {
      "id": "ZY-PROJ-001-FIX-5",
      "date": "2026-04-15",
      "problem": "非主权邮箱可以登录频道",
      "root_cause": "原来只在verifyCode阶段校验·sendCode阶段无拦截·任何邮箱都能收到验证码",
      "fix": "在sendCode和verifyCode双层加OWNER_EMAIL校验·纵深防御",
      "files_changed": ["server/app/modules/email-auth.js"],
      "result": "success"
    },
    {
      "id": "ZY-PROJ-001-FIX-6",
      "date": "2026-04-16",
      "problem": "系统面板UI字体密集看不清·排版暗沉·感觉像死的静态看板·不像活着的AGE OS",
      "root_cause": "全局字体10-12px过小·card padding 16px过紧·text颜色#e2eaf8不够亮·缺少呼吸动效·保护罩日志空白无引导·侧边栏nav 12px太小·聊天元数据不够专业",
      "fix": "全面UI改版: 字体增大(基础16px·正文14-15px·标题18-20px)·颜色调亮(text #eaf0ff·dim #94a7d0)·增加heartbeat心跳+dotPulse脉搏+ambient glow环境光+prefers-reduced-motion无障碍·保护罩增加引导空状态·侧边栏nav 14px+Agent存活指示灯·对话栏改名零点原核频道·主header新增heartbeat指示器",
      "files_changed": ["server/sites/yaoming/index.html"],
      "result": "implemented"
    }
  ],
  "modules_used": [
    "server/app/modules/email-auth.js",
    "server/app/modules/domestic-llm-gateway.js",
    "server/app/modules/persona-context-pipeline.js",
    "server/app/modules/chat-engine.js",
    "server/app/modules/persona-memory.js",
    "server/nginx/zhuyuan-sovereign.conf",
    "server/nginx/guanghuyaoming.conf",
    ".github/workflows/deploy-to-zhuyuan-server.yml",
    "server/sites/yaoming/index.html",
    "server/sites/yaoming/zhiku.html",
    "server/app/server.js"
  ],
  "next_step": "合并PR→deploy-to-zhuyuan-server.yml自动部署→冰朔验证首页门户+智库节点+对话双路径+中继修复",
  "status": "in_progress",
  "current_phase": "ZY-PROJ-001-PHASE-6"
}
