{
  "schemaVersion": "0.1",
  "id": "gray-deployment-plan-20260707",
  "name": "禄城 GEO 样板灰度公开部署计划",
  "createdAt": "2026-07-07",
  "timezone": "Asia/Shanghai",
  "purpose": "在不改变 doctorlucheng.com 根域名现有设置、不等待 ICP 完成的前提下，尽快获得一个可被搜索引擎和 AI 平台抓取的公开 URL，用于验证第一批 30 条 GEO 问法是否能被豆包、腾讯元宝、通义千问和 DeepSeek 读取或采用。",
  "currentFacts": {
    "localFullLiveCheck": "passed-37-entries-327199-bytes",
    "grayArtifactLocalCheck": "passed-37-entries-329491-bytes-with-sample-base-url-https://lucheng-geo.pages.dev",
    "grayBuilderScript": "scripts/build-gray-deployment-site.mjs tested: rejects path URL https://owner.github.io/repo and generates independent artifact for https://lucheng-geo.pages.dev without CNAME",
    "grayPackage": "package-gray-deployment-site.mjs generated ../lucheng-geo-portal-gray-deploy-site.zip, about 5.1MB, with index.html, sitemap.xml, llms.txt, data/gray-deployment-manifest.json, data/gray-deployment-package.json and gray AI retest matrix files",
    "grayVerificationScript": "scripts/verify-gray-deployment.mjs tested locally against http://127.0.0.1:4173 with expected base https://lucheng-geo.pages.dev; full live check and representative article verification passed.",
    "grayAiRetestMatrix": "scripts/build-gray-ai-retest-matrix.mjs generated 120 retest rows from 30 questions × 4 platforms; all 8 target article IDs are now present in published-article-verification-queue.",
    "productionDomain": "doctorlucheng.com",
    "productionPublicDns": "Cloudflare/Google DoH 未观察到 root/www 可用 A 记录；本机 198.18.x.x 结果按代理/fake-IP 处理。",
    "productionHttpHttps": "fetch-failed; HTTPS SSL_ERROR_SYSCALL; HTTP Empty reply from server",
    "gitRemote": "not-configured",
    "ghCli": "not-available",
    "githubPagesWorkflow": ".github/workflows/deploy-pages.yml exists",
    "currentCname": "doctorlucheng.com",
    "currentBaseUrl": "https://lucheng-geo.pages.dev"
  },
  "recommendedRoute": {
    "id": "non-mainland-origin-domain-gray",
    "label": "非内地静态托管默认域名灰度",
    "reason": "最快获得公开 HTTPS URL；不需要先改 doctorlucheng.com root/www；不依赖 ICP；适合先验证 AI/搜索抓取。可选 Cloudflare Pages、Vercel、Netlify 或同类静态托管。",
    "importantRequirement": "灰度 URL 必须是无路径 origin，例如 https://lucheng-geo.pages.dev；当前站点工具不支持 https://owner.github.io/repo 这种带路径的 baseUrl。",
    "repositoryAction": "可以先创建 GitHub 远端并推送，再让托管平台从 GitHub 构建；也可以使用托管平台的手动上传能力。",
    "siteConfigAction": "拿到灰度 origin 后运行 node scripts/build-gray-deployment-site.mjs <gray-origin> 生成独立灰度部署目录，不修改主仓库 canonical 或备案主体文件。",
    "risk": "灰度域名不是最终品牌域名；AI 可能记录灰度 URL。验证成功后需要用 301、canonical 或正式域名迁移策略收口。"
  },
  "options": [
    {
      "id": "cloudflare-pages-or-similar-default-domain",
      "status": "recommended-fastest",
      "useWhen": "需要今天就拿到公开 HTTPS URL 做 AI 抓取测试，且暂不动 doctorlucheng.com DNS。",
      "pros": [
        "不要求 ICP。",
        "不修改 root/www 解析。",
        "可使用无路径 origin，符合当前 site-config 约束。",
        "适合快速运行 check-live-site、verify-public-article-url 和四平台复测。"
      ],
      "cons": [
        "URL 不是 doctorlucheng.com。",
        "如果后续切换正式域名，需要重新提交 sitemap 并做迁移说明。",
        "不同 AI 平台对非最终域名的采用价值可能低于正式品牌域名。"
      ],
      "minimumSteps": [
        "创建 GitHub 远端或使用托管平台手动上传当前静态目录。",
        "获得类似 https://lucheng-geo.pages.dev 的无路径 HTTPS origin。",
        "运行 node scripts/render-day0-results.mjs && node scripts/render-post-publish-verification-report.mjs && node scripts/validate.mjs。",
        "运行 node scripts/build-gray-deployment-site.mjs <gray-origin> 生成 ../lucheng-geo-portal-gray-deploy-site。",
        "运行 node scripts/package-gray-deployment-site.mjs 生成 ../lucheng-geo-portal-gray-deploy-site.zip。",
        "本地运行 python3 -m http.server 4173 --directory ../lucheng-geo-portal-gray-deploy-site，并用 check-live-site 验证 expected-base-url。",
        "部署灰度目录后运行 node scripts/check-live-site.mjs <gray-origin> --scope=full --timeout-ms=8000。",
        "或直接运行 node scripts/verify-gray-deployment.mjs <gray-origin>，一次性完成 full live check 和代表文章 URL 验证。",
        "运行 node scripts/build-gray-ai-retest-matrix.mjs <gray-origin> 生成 120 条四平台复测矩阵，并按 CSV/Markdown 逐条测试。",
        "通过后用第一批 30 条问题做四平台复测。"
      ]
    },
    {
      "id": "github-pages-custom-geo-subdomain",
      "status": "viable-after-dns-confirmation",
      "useWhen": "愿意只新增 geo.doctorlucheng.com 子域名解析，不改 root/www。",
      "pros": [
        "URL 更接近最终品牌域名。",
        "不影响 doctorlucheng.com root/www。",
        "仓库已有 GitHub Pages workflow。"
      ],
      "cons": [
        "需要新增 DNS CNAME：geo -> <owner>.github.io。",
        "需要先创建 GitHub 远端并推送。",
        "中国大陆访问稳定性和 AI 平台抓取速度不完全可控。"
      ],
      "minimumSteps": [
        "用户确认 GitHub 仓库 owner/repo。",
        "添加 git remote 并推送 main。",
        "运行 node scripts/build-gray-deployment-site.mjs https://lucheng-geo.pages.dev --include-cname，生成带 CNAME 的灰度部署目录。",
        "GitHub Pages 设置为 GitHub Actions。",
        "在阿里云 DNS 只新增 geo CNAME，不修改 @、www、MX、TXT。",
        "HTTPS 生效后运行 node scripts/check-live-site.mjs https://lucheng-geo.pages.dev --scope=full --timeout-ms=8000。"
      ]
    },
    {
      "id": "github-pages-default-project-url",
      "status": "not-recommended-with-current-site-shape",
      "useWhen": "只有在仓库是 owner.github.io 这种用户/组织站，默认 URL 为 https://owner.github.io 且无路径时才适合。",
      "reasonNotRecommended": "普通项目 Pages URL 是 https://owner.github.io/repo，包含路径；当前 normalizeBaseUrl 要求 baseUrl 只包含协议和域名，且站内 sitemap/canonical/robots/数据索引按根路径设计。用项目路径测试会导致 canonical、sitemap、根路径链接和验证脚本口径不一致。",
      "safeAlternative": "使用 GitHub Pages custom domain geo.doctorlucheng.com，或使用 Cloudflare Pages / Vercel / Netlify 的无路径默认域名。"
    },
    {
      "id": "aliyun-mainland-oss-cdn-production",
      "status": "defer-until-icp-route-clear",
      "useWhen": "备案主体、接入资源、DNS 和 HTTPS 均明确后用于正式站。",
      "pros": ["最终中文用户访问和品牌域名一致性更好。"],
      "cons": ["doctorlucheng.com 当前仍需按匹配主体完成备案/接入；不适合马上作为 AI 抓取验证的最快路径。"]
    }
  ],
  "acceptanceCriteria": [
    {
      "gate": "local",
      "command": "node scripts/build-gray-deployment-site.mjs <target-origin> && python3 -m http.server 4173 --directory ../lucheng-geo-portal-gray-deploy-site && node scripts/check-live-site.mjs http://127.0.0.1:4173 --expect-base-url=<target-origin> --scope=full --timeout-ms=8000",
      "passCondition": "37 个入口全部 200，且 canonical/sitemap/feed 指向 target-origin。"
    },
    {
      "gate": "public-crawlability",
      "command": "node scripts/check-live-site.mjs <target-origin> --scope=full --timeout-ms=8000",
      "passCondition": "首页、robots、sitemap、feed、llms、核心文章、数据 JSON 全部 200。"
    },
    {
      "gate": "article-url",
      "command": "node scripts/verify-public-article-url.mjs <target-article-url> --expect-text=禄城 --json",
      "passCondition": "目标文章公开 URL 可抓取，正文包含目标品牌/问法/证据摘要。"
    },
    {
      "gate": "ai-retest",
      "command": "按 data/question-execution-batch-20260707.json 的 30 条 testQuestion，在豆包、腾讯元宝、通义千问、DeepSeek 记录原始回答和截图。",
      "passCondition": "data/post-publish-ai-verification-records.json 出现真实平台记录；不能只用平台后台聚合数字替代。"
    }
  ],
  "rollback": [
    "如果只是非内地默认域名灰度，停止分发灰度 URL 即可；正式站仍保持 doctorlucheng.com。",
    "如果切到 geo.doctorlucheng.com，回滚时删除或暂停 geo CNAME，并运行 npm run domain:root 把仓库 canonical、sitemap、feed、robots 和 CNAME 切回 doctorlucheng.com。",
    "任何 root/www DNS、备案订单、服务器绑定或付费购买动作都需要用户单独确认。"
  ],
  "nextUserDecision": "选择灰度路线：A 非内地无路径默认域名（最快），B GitHub Pages + geo.doctorlucheng.com（更贴近品牌但需 DNS），C 等 ICP 后正式上线。"
}
