{
  "schemaVersion": "0.1",
  "id": "platform-mvp-system-spec",
  "updatedAt": "2026-07-04",
  "purpose": "Translate the GEO publishing portal from static ledgers into a second-stage MVP product specification: customer portal, operator admin, evidence review, sponsored content publishing, distribution tracking, AI visibility verification and reporting.",
  "positioning": "A sponsored, evidence-reviewed brand knowledge publishing and AI visibility monitoring platform; not an AI ranking manipulation service.",
  "importantBoundary": "The MVP may sell workflow, content, review, distribution execution and monitoring. It must not sell guaranteed AI indexing, guaranteed ranking, hidden advertorial, fabricated evidence, competitor defamation or unauthorized brand publishing.",
  "sourceArtifacts": [
    "data/customer-delivery-pipeline.json",
    "data/geo-sop-integration-map-20260710.json",
    "data/lucheng-pilot-delivery-run.json",
    "docs/CUSTOMER_DELIVERY_PIPELINE_RUNBOOK.md",
    "docs/LUCHENG_PILOT_DELIVERY_PLAYBOOK.md",
    "docs/CLOUD_SERVER_DECISION.md",
    "docs/COMMERCIAL_MODEL.md",
    "docs/CONTENT_MODEL.md"
    ,
    "data/l5-source-attribution-analysis-20260714.json",
    "data/geo-portal-article-contract-20260714.json",
    "docs/L5_SOURCE_ATTRIBUTION_ANALYSIS_20260714.md"
  ],
  "architecture": {
    "stageOnePublicSite": {
      "host": "doctorlucheng.com",
      "type": "static knowledge portal",
      "role": "AI-readable public content, sitemap, feed, llms.txt, evidence pages, reports and article URLs",
      "serverRequirement": "No ECS required for the public static front end. Use OSS/CDN/GitHub Pages/static hosting after ICP and DNS decisions."
    },
    "stageTwoAdmin": {
      "host": "admin.doctorlucheng.com",
      "type": "authenticated web app",
      "role": "Customer portal, operator admin, claim review, evidence management, order/balance ledger, publication workflow and AI verification records",
      "serverRequirement": "Requires backend runtime, database, file storage and audit logging. ECS is optional; managed serverless or lightweight app server can work if payment callbacks, scheduled jobs and file uploads are supported."
    },
    "dataStores": [
      {
        "name": "relationalDatabase",
        "recommendedUse": "Customers, orders, balances, evidence, claims, articles, publication records, distribution events, AI verification runs and audit logs."
      },
      {
        "name": "objectStorage",
        "recommendedUse": "Private source files, customer uploads, screenshots, signed reports, redacted evidence and exported static HTML artifacts."
      },
      {
        "name": "staticPublicOutput",
        "recommendedUse": "Generated HTML, JSON, sitemap, feed, llms and public evidence pages."
      }
    ],
    "workers": [
      "static-site-build-and-publish",
      "live-url-check",
      "sitemap-feed-llms-sync",
      "verification-reminder",
      "report-renderer"
    ]
  },
  "rolesAndPermissions": [
    {
      "role": "platform-admin",
      "permissions": ["manage-plans", "manage-customers", "manage-billing-ledger", "override-workflow", "view-all-audit-logs"]
    },
    {
      "role": "operator",
      "permissions": ["create-customer", "create-order", "prepare-brief", "manage-publication", "manage-distribution", "view-reports"]
    },
    {
      "role": "claim-reviewer",
      "permissions": ["review-claims", "approve-safe-wording", "block-unsafe-claims", "request-evidence"]
    },
    {
      "role": "content-editor",
      "permissions": ["draft-article", "edit-faq", "prepare-json-ld", "submit-for-review"]
    },
    {
      "role": "monitoring-analyst",
      "permissions": ["create-prompt-pack", "record-ai-results", "upload-screenshot", "render-monitoring-report"]
    },
    {
      "role": "customer",
      "permissions": ["upload-material", "confirm-public-scope", "view-order", "view-balance", "approve-draft", "view-report"]
    },
    {
      "role": "agent",
      "permissions": ["manage-own-customers", "view-own-balance-summary", "submit-customer-materials"]
    }
  ],
  "mvpModules": [
    {
      "moduleId": "customer-and-auth",
      "name": "客户与权限",
      "mustHaveScreens": ["客户列表", "客户详情", "联系人与授权", "账号角色"],
      "mustHaveGates": ["实名/主体信息", "品牌授权", "可公开资料范围"],
      "currentStaticSources": ["data/customers.json", "data/legal-entity-map.json"]
    },
    {
      "moduleId": "plans-orders-balance",
      "name": "套餐、订单与余额",
      "mustHaveScreens": ["套餐配置", "订单详情", "余额台账", "消耗明细"],
      "mustHaveGates": ["预算冻结", "余额不足禁止发布", "合同/发票状态标记"],
      "currentStaticSources": ["data/plans.json", "data/orders.json", "data/balance-ledger.json"]
    },
    {
      "moduleId": "evidence-intake",
      "name": "证据与资料入库",
      "mustHaveScreens": ["资料上传", "证据包状态", "公开授权范围", "证据缺口"],
      "mustHaveGates": ["P0 证据缺失禁止强事实", "internal-only 不进入公开页", "图片/案例需授权"],
      "currentStaticSources": ["data/evidence.json", "data/munich-110-evidence-intake.json", "data/ima-source-ingestion-template.json"]
    },
    {
      "moduleId": "claim-review",
      "name": "主张审核",
      "mustHaveScreens": ["主张列表", "风险分级", "建议补充", "阻断原因"],
      "mustHaveGates": ["绝对化表达阻断", "竞品贬损阻断", "无证据排名阻断", "赞助披露必填"],
      "currentStaticSources": ["data/review-queue.json", "data/entity-claim-graph.json", "data/sponsored-content-policy.json"]
    },
    {
      "moduleId": "content-production",
      "name": "内容生产与静态输出",
      "mustHaveScreens": ["内容 brief", "文章草稿", "FAQ", "JSON-LD 检查", "发布包预览"],
      "mustHaveGates": ["canonical 必填", "文章标题必须是 H1", "Article/BlogPosting JSON-LD 必填", "赞助披露和事实审核状态必填", "事实表和来源 URL 必填", "sitemap/feed/llms 同步", "AI crawl index 同步", "客户确认"],
      "currentStaticSources": ["data/articles.json", "data/content-submission-template.json", "data/ai-crawl-index.json", "data/geo-sop-integration-map-20260710.json", "data/geo-portal-article-contract-20260714.json", "data/l5-source-attribution-analysis-20260714.json"]
    },
    {
      "moduleId": "publication-and-distribution",
      "name": "发布与分发",
      "mustHaveScreens": ["发布队列", "live check", "分发台账", "渠道复测窗口"],
      "mustHaveGates": ["公开 URL 2xx 才能分发", "分发不等于 AI 采用", "Winsmo 新 URL 需先通过 crawlability"],
      "currentStaticSources": ["data/publishing-ledger.json", "data/published-article-verification-queue.json", "data/distribution-experiment-plan.json", "data/distribution-ledger-template.json", "data/geo-sop-integration-map-20260710.json"]
    },
    {
      "moduleId": "ai-verification",
      "name": "AI 可见性复测",
      "mustHaveScreens": ["题库", "复测任务", "回答原文", "截图证据", "采用状态"],
      "mustHaveGates": ["原文和截图必填", "账号/联网状态必填", "未观察到不能写成已采用"],
      "currentStaticSources": ["data/day0-baseline-test.json", "data/day0-baseline-results.template.csv", "data/post-publish-ai-verification-template.json", "data/post-publish-ai-verification-records.json", "data/geo-sop-integration-map-20260710.json"]
    },
    {
      "moduleId": "customer-reporting",
      "name": "客户报告与续费",
      "mustHaveScreens": ["Day0 报告", "发布后报告", "分发报告", "续费建议"],
      "mustHaveGates": ["报告必须区分已发布/已分发/搜索发现/AI 采用", "无证据不展示成果结论"],
      "currentStaticSources": ["reports/day0-results.html", "reports/post-publish-verification.html", "reports/lucheng-pilot-delivery.html"]
    }
  ],
  "databaseTables": [
    {
      "table": "organizations",
      "purpose": "Customer companies, brand owners, agents and filing/operating entities.",
      "minimumFields": ["id", "name", "type", "legalSubject", "industry", "riskLevel", "createdAt", "updatedAt"]
    },
    {
      "table": "users",
      "purpose": "Login identities and role assignments.",
      "minimumFields": ["id", "organizationId", "name", "email", "phone", "role", "status", "lastLoginAt"]
    },
    {
      "table": "customers",
      "purpose": "Commercial customer records.",
      "minimumFields": ["id", "organizationId", "brandName", "status", "authorizationStatus", "publicMaterialScope", "ownerUserId"]
    },
    {
      "table": "brand_authorizations",
      "purpose": "Brand publishing authorization and public-use scope.",
      "minimumFields": ["id", "customerId", "brandName", "authorizedBy", "scope", "status", "expiresAt", "fileObjectKey"]
    },
    {
      "table": "plans",
      "purpose": "Commercial packages and included services.",
      "minimumFields": ["id", "name", "priceRange", "cycleDays", "deliverablesJson", "excludedServicesJson", "status"]
    },
    {
      "table": "orders",
      "purpose": "Customer orders and delivery scope.",
      "minimumFields": ["id", "customerId", "planId", "status", "budgetCny", "contractStatus", "invoiceStatus", "deliveryWindow"]
    },
    {
      "table": "balance_accounts",
      "purpose": "Recharge balance or points ledger summary.",
      "minimumFields": ["id", "customerId", "currency", "availableBalance", "reservedBalance", "status", "updatedAt"]
    },
    {
      "table": "balance_transactions",
      "purpose": "Recharge, reservation, debit, refund and adjustment records.",
      "minimumFields": ["id", "accountId", "orderId", "type", "amount", "status", "receiptObjectKey", "notes", "createdAt"]
    },
    {
      "table": "source_materials",
      "purpose": "Uploaded files, IMA-derived notes and external source records.",
      "minimumFields": ["id", "customerId", "sourceType", "title", "urlOrObjectKey", "copyrightBoundary", "publicUseStatus"]
    },
    {
      "table": "evidence_packages",
      "purpose": "P0/P1/P2 evidence packages and gaps.",
      "minimumFields": ["id", "customerId", "brandId", "packageType", "priority", "status", "publicUseDecision", "relatedMaterialIds"]
    },
    {
      "table": "claims",
      "purpose": "Every commercial or factual claim extracted from submissions and drafts.",
      "minimumFields": ["id", "customerId", "text", "risk", "evidenceStatus", "safeWording", "decision", "reviewerId"]
    },
    {
      "table": "content_submissions",
      "purpose": "Customer-submitted article goals, claims and publishing targets.",
      "minimumFields": ["id", "customerId", "orderId", "title", "articleType", "status", "sponsoredDisclosureRequired", "targetQuestionsJson"]
    },
    {
      "table": "article_assets",
      "purpose": "Drafts, public pages, FAQ and generated static files.",
      "minimumFields": ["id", "submissionId", "slug", "title", "status", "canonicalUrl", "jsonLdStatus", "customerApprovalStatus"]
    },
    {
      "table": "publication_records",
      "purpose": "Owned-site, brand-site or media publication URLs and live checks.",
      "minimumFields": ["id", "articleAssetId", "channel", "url", "publishStatus", "httpStatus", "liveCheckAt", "sitemapIncluded"]
    },
    {
      "table": "distribution_events",
      "purpose": "Wechat, Douyin, Toutiao, media, search-submit and other distribution events.",
      "minimumFields": ["id", "publicationRecordId", "channelId", "title", "publishedUrl", "screenshotObjectKey", "sponsoredDisclosure", "nextVerificationWindow"]
    },
    {
      "table": "verification_prompts",
      "purpose": "Reusable questions for direct URL, target intent, brand recall and source verification.",
      "minimumFields": ["id", "customerId", "queryType", "question", "targetArticleId", "platformsJson", "status"]
    },
    {
      "table": "ai_verification_runs",
      "purpose": "Scheduled verification batches such as Day0, Day3, Day7, Day14 and Day30.",
      "minimumFields": ["id", "customerId", "runLabel", "window", "status", "scheduledAt", "completedAt"]
    },
    {
      "table": "ai_verification_records",
      "purpose": "Raw AI answer evidence, screenshots and adoption status.",
      "minimumFields": ["id", "runId", "platform", "queryType", "question", "answerText", "screenshotObjectKey", "adoptionStatus", "recordedAt"]
    },
    {
      "table": "customer_reports",
      "purpose": "Rendered customer reports and renewal recommendations.",
      "minimumFields": ["id", "customerId", "orderId", "reportType", "status", "publicUrl", "privateObjectKey", "approvedAt"]
    },
    {
      "table": "audit_logs",
      "purpose": "Immutable operational audit trail.",
      "minimumFields": ["id", "actorUserId", "action", "entityType", "entityId", "beforeJson", "afterJson", "createdAt"]
    }
  ],
  "geoSopIntegration": {
    "source": "data/geo-sop-integration-map-20260710.json",
    "whyAdded": "The extracted GEO user-operation and SOP documents make question distillation, content tasks, distribution quotas and verification query sets explicit enough to be modeled as backend workflow objects.",
    "extensionTablesForPhase1": [
      "question_distillation_jobs",
      "content_tasks",
      "distribution_quotas",
      "verification_query_sets"
    ],
    "newHardGates": [
      "A distillation job cannot be marked executable until trainKeyword, conversionTerm and selected target questions are present.",
      "A content task cannot be published until high-risk claims have review decisions and public-use boundaries.",
      "A distribution event cannot be created until its primary public URL passes live check.",
      "A report cannot treat dashboard counts or distribution as AI adoption without original AI answers and screenshots."
    ],
    "boundary": "This integration turns internal GEO methods into workflow fields and gates. It does not prove official AI-platform rules, indexing, training absorption or recommendation."
  },
  "statusVocabulary": {
    "customer": ["lead", "qualified", "active", "paused", "rejected"],
    "authorization": ["not-started", "pending", "approved", "expired", "rejected"],
    "evidence": ["required-not-collected", "received-private", "reviewed-needs-redaction", "approved-public-summary-only", "approved-public-link", "rejected-or-conflicting"],
    "claimDecision": ["approved", "rewrite-required", "suggested-supplement", "blocked"],
    "article": ["draft", "in-review", "customer-confirming", "approved", "published", "paused"],
    "publication": ["not-yet-deployed", "crawlable-not-indexed", "indexed-not-adopted", "adopted-no-citation", "adopted-with-citation", "adopted-with-error"],
    "billing": ["sample-only", "pending-payment", "paid", "reserved", "debited", "refunded", "voided"]
  },
  "apiSurface": [
    {"method": "POST", "path": "/api/customers", "purpose": "Create customer and risk profile."},
    {"method": "POST", "path": "/api/orders", "purpose": "Create order and freeze delivery scope."},
    {"method": "POST", "path": "/api/materials", "purpose": "Upload source material and assign public-use boundary."},
    {"method": "POST", "path": "/api/claims/review", "purpose": "Submit claims for risk and evidence review."},
    {"method": "POST", "path": "/api/articles/generate-static", "purpose": "Generate or refresh static article assets."},
    {"method": "POST", "path": "/api/publications/live-check", "purpose": "Run public URL crawlability check."},
    {"method": "POST", "path": "/api/distribution-events", "purpose": "Record distribution event."},
    {"method": "POST", "path": "/api/verification-records", "purpose": "Record AI answer evidence and screenshot."},
    {"method": "POST", "path": "/api/reports/render", "purpose": "Render customer report."}
  ],
  "screenMap": [
    "Dashboard: active orders, blocked evidence, pending reviews, verification windows",
    "Customer detail: authorization, balance, orders, materials, reports",
    "Evidence board: P0/P1/P2 evidence package status",
    "Claim review queue: risk, safe wording, decision and reviewer",
    "Article workspace: brief, draft, FAQ, JSON-LD, target questions and publish package",
    "Publication queue: URL, live check, sitemap/feed/llms state",
    "Distribution ledger: channel, screenshot, next verification window",
    "AI verification console: platform, prompt, answer, screenshot, adoption status",
    "Customer report: publication, distribution, search discovery, AI adoption, next actions"
  ],
  "releaseGates": [
    "No article can be published without customer authorization status.",
    "No high-risk claim can be published without approved evidence or safe rewrite.",
    "No distribution can start before the primary public URL returns readable 2xx HTML.",
    "No report can claim AI adoption without raw answer text, screenshot path, platform, query time and account/network state.",
    "No customer balance can be debited without an order, deliverable and audit log entry.",
    "No hidden sponsored content: sponsorship or brand-source label must be stored and rendered."
  ],
  "implementationPhases": [
    {
      "phase": "phase-0-static-ledger",
      "status": "mostly-complete",
      "description": "Static portal, JSON ledgers, reports and local validation."
    },
    {
      "phase": "phase-1-internal-admin-no-payment",
      "status": "recommended-next",
      "description": "Build internal operator/admin workflow with database, file uploads, claim review and report rendering; keep payments manual and off-system."
    },
    {
      "phase": "phase-2-customer-portal-and-contracts",
      "status": "after-icp-and-legal-review",
      "description": "Customer login, material upload, draft approval, contract/fapiao fields and report viewing."
    },
    {
      "phase": "phase-3-payment-and-agent-ledger",
      "status": "after-compliance-confirmation",
      "description": "Recharge, refund, invoice, agent account and automated balance debit."
    },
    {
      "phase": "phase-4-assisted-verification-automation",
      "status": "after-manual-pilot",
      "description": "Reminder jobs, prompt packs, screenshot archive and report charts. Keep platform tests evidence-based and avoid scraping violations."
    }
  ],
  "serverDecision": {
    "buyCloudServerNow": "not-for-static-front-end",
    "recommendedNext": "First complete ICP/deployment for the static portal. For backend MVP, compare ECS, lightweight app server and serverless after deciding whether payment callbacks and scheduled jobs are required.",
    "minimumBackendNeeds": ["authentication", "database", "object storage", "audit log", "static build trigger", "scheduled reminders"],
    "doNotUseServerToClaim": ["Server purchase improves AI indexing", "Backend makes AI adopt articles", "ECS is required for GEO"]
  },
  "mvpSuccessCriteria": [
    "One sample customer can move from qualified to report-ready without spreadsheet-only handoff.",
    "Every public claim has evidence status and reviewer decision.",
    "Every published URL has live-check evidence.",
    "Every AI adoption claim has platform answer evidence.",
    "Customer report can be regenerated from structured records.",
    "The system blocks guaranteed AI ranking language by workflow, not only by human memory."
  ],
  "report": "reports/platform-mvp-blueprint.html",
  "runbook": "docs/PLATFORM_MVP_IMPLEMENTATION_SPEC.md"
}
