docs(gen-engine): 生成引擎模块补图 P0 四张电梯图 + 《生成引擎图说》总入口

- 图① 全局两线+tier体系(廉价线vs自治线·零耦合·公共组件交汇)
- 图② 游戏=长生命周期源项目(源目录+六操作+改源不改包闭环+免LLM/要LLM)
- 图③ 廉价线端到端(一句话→开闸→SAA16节点→九门→落库→feed·串编排/验收/prompt/开闸)
- 图④ 数据飞轮全景(生成→发布→播放→遥测→反馈→优化·三轮咬合)
- 新建《生成引擎图说.md》总入口索引全模块(P0四张+tier2九图指针+各档mermaid+P1/P2待补)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
zizi 2026-06-22 13:42:15 +00:00
parent d5efe45f71
commit 4abc0f1e5f
5 changed files with 366 additions and 0 deletions

View File

@ -0,0 +1,73 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1480 940" font-family="-apple-system,'PingFang SC','Microsoft YaHei',Segoe UI,sans-serif">
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#334155"/></marker>
<style>
.t{fill:#0f172a}.mut{fill:#475569}.sm{font-size:12px}.xs{font-size:11px}
.h1{font-size:24px;font-weight:700}.h2{font-size:16px;font-weight:700}.lbl{font-size:13px;font-weight:600}
.flow{stroke:#334155;stroke-width:2;fill:none}.badge{font-size:10.5px;font-weight:700}
</style>
</defs>
<rect x="0" y="0" width="1480" height="940" fill="#f8fafc"/>
<text x="40" y="38" class="t h1">图 ① · 生成引擎全局:两条生成线 + tier 体系</text>
<text x="40" y="58" class="mut sm">一句话按品类/复杂度分流到两条线;两线**运行期零耦合**、各跑各运行时,只在公共组件(计费/送审/feed/验收基线)交汇。tier2 线详见 agentic 图说 9 图。</text>
<rect x="565" y="82" width="350" height="48" rx="10" fill="#e2e8f0" stroke="#0f172a" stroke-width="2"/>
<text x="740" y="105" text-anchor="middle" class="t lbl">用户一句话 brief + play_spec</text>
<text x="740" y="123" text-anchor="middle" class="mut xs">按品类 / 复杂度分流</text>
<line x1="660" y1="130" x2="400" y2="166" class="flow" marker-end="url(#arrow)"/>
<line x1="820" y1="130" x2="1080" y2="166" class="flow" marker-end="url(#arrow)"/>
<!-- 左线 Tier0/1 廉价线 -->
<rect x="40" y="168" width="685" height="452" rx="12" fill="#eff6ff" stroke="#2563eb" stroke-width="2.4"/>
<text x="58" y="196" class="t h2">Tier0/1 廉价线</text>
<text x="58" y="216" class="mut xs">超休闲单局:pong / 点击器 / 躲避 / 跑酷(几何色块)</text>
<g class="sm">
<rect x="58" y="232" width="649" height="40" rx="7" fill="#dbeafe" stroke="#2563eb" stroke-width="1.4"/><text x="70" y="257" class="t">范式:声明式数据壳 + 便宜模型填 + 固定运行时</text>
<rect x="58" y="280" width="649" height="40" rx="7" fill="#fff" stroke="#2563eb" stroke-width="1.2"/><text x="70" y="305" class="t">编排:SAA 16 节点裸 StateGraph〔Java〕</text>
<rect x="58" y="328" width="649" height="40" rx="7" fill="#fff" stroke="#2563eb" stroke-width="1.2"/><text x="70" y="353" class="t">模型:便宜档(deepseek-v4 / M3)</text>
<rect x="58" y="376" width="649" height="40" rx="7" fill="#fff" stroke="#2563eb" stroke-width="1.2"/><text x="70" y="401" class="t">引擎:LittleJS(55KB gz)</text>
<rect x="58" y="424" width="649" height="40" rx="7" fill="#fff" stroke="#2563eb" stroke-width="1.2"/><text x="70" y="449" class="t">验收:九门 harness(真浏览器真玩)</text>
<rect x="58" y="472" width="649" height="48" rx="7" fill="#dbeafe" stroke="#2563eb" stroke-width="1.4"/><text x="70" y="492" class="t">产物:结构化源项目(gameDefinition → src/ 终态)</text>
<text x="70" y="510" class="mut xs">现默认 factory(iife) 路 ~60%,gamedef→src 灰度中</text>
</g>
<text x="58" y="556" class="mut xs">端到端怎么转 → 图 ③ 廉价线端到端全景;九门 → 图 ⑤</text>
<!-- 右线 tier2 自治线 -->
<rect x="755" y="168" width="685" height="452" rx="12" fill="#f0fdf4" stroke="#16a34a" stroke-width="2.4"/>
<text x="773" y="196" class="t h2">tier2 自治富游戏线</text>
<text x="773" y="216" class="mut xs">合成 / 经营 / 挂机(肥鹅档;Marvel·KOF = 对标天花板)</text>
<g class="sm">
<rect x="773" y="232" width="649" height="40" rx="7" fill="#dcfce7" stroke="#16a34a" stroke-width="1.4"/><text x="785" y="257" class="t">范式:O2 约束自治 + 单写 ReAct</text>
<rect x="773" y="280" width="649" height="40" rx="7" fill="#fff" stroke="#16a34a" stroke-width="1.2"/><text x="785" y="305" class="t">编排:AgentScope 独立 service(工作室 Agent Team → 单写)〔Python〕</text>
<rect x="773" y="328" width="649" height="40" rx="7" fill="#fff" stroke="#16a34a" stroke-width="1.2"/><text x="785" y="353" class="t">模型:M3 Anthropic 原生(thinking 分离)</text>
<rect x="773" y="376" width="649" height="40" rx="7" fill="#fff" stroke="#16a34a" stroke-width="1.2"/><text x="785" y="401" class="t">引擎:Phaser / Pixi</text>
<rect x="773" y="424" width="649" height="40" rx="7" fill="#fff" stroke="#16a34a" stroke-width="1.2"/><text x="785" y="449" class="t">验收:三层校验(L1 必须 / L2 尽量 / L3 评分)</text>
<rect x="773" y="472" width="649" height="48" rx="7" fill="#dcfce7" stroke="#16a34a" stroke-width="1.4"/><text x="785" y="492" class="t">产物:Phaser 源工程</text>
<text x="785" y="510" class="mut xs">全悬 0 号 spike(便宜模型能否自治写富游戏)</text>
</g>
<text x="773" y="556" class="mut xs">→ 详见 agentic 运行时架构图说(图 A + 1–8,共 9 图)</text>
<!-- 零耦合 -->
<rect x="600" y="582" width="280" height="34" rx="8" fill="#fef2f2" stroke="#dc2626" stroke-width="1.4" stroke-dasharray="5 4"/>
<text x="740" y="604" text-anchor="middle" class="xs" fill="#b91c1c">两线运行期零耦合 · 各跑各运行时 · 可独立删</text>
<!-- 公共组件 -->
<rect x="40" y="650" width="1400" height="100" rx="12" fill="#fffbeb" stroke="#b45309" stroke-width="2.4"/>
<text x="58" y="676" class="t h2">公共组件(两线共享 · 均为自建)</text>
<g class="sm">
<rect x="58" y="688" width="255" height="48" rx="7" fill="#fff" stroke="#b45309" stroke-width="1.3"/><text x="68" y="710" class="t">计费台账</text><text x="68" y="728" class="mut xs">new-api quota → ¥</text>
<rect x="328" y="688" width="240" height="48" rx="7" fill="#fff" stroke="#b45309" stroke-width="1.3"/><text x="338" y="710" class="t">送审 / 审核台</text>
<rect x="583" y="688" width="240" height="48" rx="7" fill="#fff" stroke="#b45309" stroke-width="1.3"/><text x="593" y="710" class="t">feed / 发行</text>
<rect x="838" y="688" width="290" height="48" rx="7" fill="#fff" stroke="#b45309" stroke-width="1.3"/><text x="848" y="710" class="t">CDP 验收基线</text><text x="848" y="728" class="mut xs">九门 harness 泛化</text>
<rect x="1143" y="688" width="282" height="48" rx="7" fill="#fff" stroke="#b45309" stroke-width="1.3"/><text x="1153" y="710" class="t">源项目契约</text><text x="1153" y="728" class="mut xs">各线独立 schema</text>
</g>
<line x1="380" y1="620" x2="380" y2="648" class="flow" marker-end="url(#arrow)"/>
<line x1="1100" y1="620" x2="1100" y2="648" class="flow" marker-end="url(#arrow)"/>
<!-- tier 体系 + 图例 -->
<text x="40" y="800" class="t h2">tier 体系:</text>
<text x="150" y="800" class="sm t">Tier0/1 = 超休闲廉价线(本图左) · tier2 = 富游戏自治线(本图右) · Tier3 = Cocos 3D / 渠道导出(人在环·future·不在本模块)</text>
<text x="40" y="828" class="mut xs">差异化护城河 = 生成 + 流量 + 变现全闭环(数据飞轮见图 ④);两条生成线吃不同市场、各跑各运行时,只经上面公共组件交汇。</text>
<text x="40" y="900" class="mut xs">映射:README · 固定游戏架构.md · 自治富游戏引擎.md · 设计合理性裁决.md | 与 agentic 图说 svg 风格统一 | 设计变动须同步本图</text>
</svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -0,0 +1,82 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1480 900" font-family="-apple-system,'PingFang SC','Microsoft YaHei',Segoe UI,sans-serif">
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#334155"/></marker>
<marker id="arrowB" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#b45309"/></marker>
<style>
.t{fill:#0f172a}.mut{fill:#475569}.sm{font-size:12px}.xs{font-size:11px}
.h1{font-size:24px;font-weight:700}.h2{font-size:15px;font-weight:700}.lbl{font-size:13px;font-weight:600}
.flow{stroke:#334155;stroke-width:1.8;fill:none}.loop{stroke:#b45309;stroke-width:2;fill:none}
.llm{font-size:10.5px;font-weight:700;fill:#15803d}.det{font-size:10.5px;font-weight:700;fill:#2563eb}
</style>
</defs>
<rect x="0" y="0" width="1480" height="900" fill="#f8fafc"/>
<text x="40" y="38" class="t h1">图 ② · 游戏 = 长生命周期源项目(LLM as 工作室)</text>
<text x="40" y="58" class="mut sm">规范物是**结构化源项目**(配置驱动/模块化/资产分离),不是打包 blob;改源不改包、重新构建出新版本;生成质量的真标尺 = 可维护性。</text>
<!-- 中心 源项目 -->
<rect x="540" y="300" width="400" height="300" rx="12" fill="#fffbeb" stroke="#b45309" stroke-width="2.8"/>
<text x="740" y="328" text-anchor="middle" class="t h2">game-project 源项目(in repo)</text>
<rect x="560" y="344" width="360" height="34" rx="6" fill="#fff" stroke="#b45309" stroke-width="1.2"/><text x="572" y="366" class="sm t">game.json — 清单 / 元信息</text>
<rect x="560" y="384" width="360" height="34" rx="6" fill="#fff" stroke="#b45309" stroke-width="1.2"/><text x="572" y="406" class="sm t">design.md — 设计文档(in repo)</text>
<rect x="560" y="424" width="360" height="34" rx="6" fill="#fff" stroke="#b45309" stroke-width="1.2"/><text x="572" y="446" class="sm t">config/ — 数值 · 关卡数据(确定性编辑)</text>
<rect x="560" y="464" width="360" height="34" rx="6" fill="#fff" stroke="#b45309" stroke-width="1.2"/><text x="572" y="486" class="sm t">src/ — 多文件逻辑(玩法代码)</text>
<rect x="560" y="504" width="360" height="34" rx="6" fill="#fff" stroke="#b45309" stroke-width="1.2"/><text x="572" y="526" class="sm t">assets/ — 资产分离(图/音/特效)</text>
<rect x="560" y="544" width="360" height="34" rx="6" fill="#fff" stroke="#b45309" stroke-width="1.2"/><text x="572" y="566" class="sm t">build.json — 构建 profile + 依赖锁</text>
<!-- 左列:写源操作 -->
<rect x="90" y="190" width="330" height="86" rx="10" fill="#dcfce7" stroke="#16a34a" stroke-width="2"/>
<text x="105" y="214" class="t lbl">create 创建</text>
<text x="105" y="235" class="mut xs">全新一句话 → 生成 src/config/assets</text>
<text x="105" y="265" class="llm">要 LLM(整项目生成)</text>
<rect x="90" y="412" width="330" height="86" rx="10" fill="#fff" stroke="#16a34a" stroke-width="2"/>
<text x="105" y="436" class="t lbl">modify 修改</text>
<text x="105" y="457" class="mut xs">改玩法逻辑 / 改数值 · 换美术</text>
<text x="105" y="487" class="llm">改逻辑=要 LLM(重生成单模块)</text>
<text x="278" y="487" class="det">改参/美术=确定性</text>
<rect x="90" y="634" width="330" height="86" rx="10" fill="#dcfce7" stroke="#16a34a" stroke-width="2"/>
<text x="105" y="658" class="t lbl">extend 扩展</text>
<text x="105" y="679" class="mut xs">加系统 / 关卡 / 玩法</text>
<text x="105" y="709" class="llm">要 LLM(新增模块)</text>
<line x1="420" y1="233" x2="538" y2="340" class="flow" marker-end="url(#arrow)"/>
<line x1="420" y1="455" x2="538" y2="450" class="flow" marker-end="url(#arrow)"/>
<line x1="420" y1="677" x2="538" y2="540" class="flow" marker-end="url(#arrow)"/>
<text x="430" y="300" class="xs mut">写 / 改源</text>
<!-- 右列:构建发布维护 -->
<rect x="1060" y="190" width="330" height="86" rx="10" fill="#fff" stroke="#475569" stroke-width="2"/>
<text x="1075" y="214" class="t lbl">maintain 维护</text>
<text x="1075" y="235" class="mut xs">接遥测 / 反馈 → 决定改什么</text>
<text x="1075" y="265" class="det">回 modify(数据驱动迭代)</text>
<rect x="1060" y="412" width="330" height="86" rx="10" fill="#eff6ff" stroke="#2563eb" stroke-width="2"/>
<text x="1075" y="436" class="t lbl">release 发布</text>
<text x="1075" y="457" class="mut xs">bundle 落库 + 入 feed / 渠道</text>
<text x="1075" y="487" class="det">确定性(免 LLM)</text>
<rect x="1060" y="634" width="330" height="86" rx="10" fill="#eff6ff" stroke="#2563eb" stroke-width="2"/>
<text x="1075" y="658" class="t lbl">build 构建</text>
<text x="1075" y="679" class="mut xs">esbuild 编译 src/ → bundle</text>
<text x="1075" y="709" class="det">确定性(免 LLM)· 改源不改包</text>
<line x1="942" y1="540" x2="1058" y2="677" class="flow" marker-end="url(#arrow)"/>
<text x="952" y="640" class="xs mut">构建</text>
<!-- 闭环 -->
<path d="M 1225,634 L 1225,498" class="loop" marker-end="url(#arrowB)"/>
<text x="1235" y="570" class="xs" fill="#b45309">build→release</text>
<path d="M 1225,412 L 1225,276" class="loop" marker-end="url(#arrowB)"/>
<text x="1235" y="350" class="xs" fill="#b45309">上线→maintain</text>
<path d="M 1060,233 L 700,150 L 255,150 L 255,410" class="loop" marker-end="url(#arrowB)"/>
<text x="600" y="142" class="xs" fill="#b45309">maintain 接遥测/反馈 → 回 modify(改源不改包闭环)</text>
<!-- 底注 -->
<rect x="90" y="770" width="1300" height="90" rx="10" fill="#f8fafc" stroke="#94a3b8" stroke-width="1.4"/>
<text x="105" y="794" class="t lbl">两条铁律:</text>
<text x="105" y="818" class="sm t">· <tspan class="det">确定性编辑(免 LLM)</tspan>:改数值/关卡参数、换美术资产 —— 直接编辑 config/ 与 assets/,不动逻辑、不调模型。</text>
<text x="105" y="842" class="sm t">· <tspan class="llm">要 LLM(重生成单模块)</tspan>:改玩法逻辑/加系统 —— 只重生成 src/ 里相关模块,其余源码不动;改源 → 重新 build → 新版本(包是构建产物,不直接改包)。</text>
<text x="40" y="888" class="mut xs">映射:README §3 · 固定游戏架构.md · generation-lifecycle-project-model | 设计变动须同步本图</text>
</svg>

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -0,0 +1,85 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1480 900" font-family="-apple-system,'PingFang SC','Microsoft YaHei',Segoe UI,sans-serif">
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#334155"/></marker>
<marker id="arrowP" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#7c3aed"/></marker>
<marker id="arrowR" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#dc2626"/></marker>
<style>
.t{fill:#0f172a}.mut{fill:#475569}.sm{font-size:12px}.xs{font-size:11px}
.h1{font-size:23px;font-weight:700}.h2{font-size:14px;font-weight:700}.lbl{font-size:13px;font-weight:600}
.flow{stroke:#334155;stroke-width:2;fill:none}
</style>
</defs>
<rect x="0" y="0" width="1480" height="900" fill="#f8fafc"/>
<text x="40" y="36" class="t h1">图 ③ · Tier0/1 廉价线生成端到端(一句话 → 入 feed 真人玩)</text>
<text x="40" y="56" class="mut sm">串起四个子系统的接合点:开闸(D12/GP9)+ SAA 16 节点编排 + prompt 治理 + 九门验收。</text>
<!-- 入口 + 开闸 -->
<rect x="36" y="300" width="150" height="90" rx="10" fill="#e2e8f0" stroke="#0f172a" stroke-width="2"/>
<text x="111" y="338" text-anchor="middle" class="t lbl">创作页</text>
<text x="111" y="360" text-anchor="middle" class="mut xs">一句话 brief</text>
<rect x="206" y="300" width="220" height="90" rx="10" fill="#fef2f2" stroke="#dc2626" stroke-width="2"/>
<text x="316" y="330" text-anchor="middle" class="t lbl">开闸</text>
<text x="316" y="352" text-anchor="middle" class="mut xs">D12 控制平面(降级/配额/背压)</text>
<text x="316" y="372" text-anchor="middle" class="mut xs">+ GP9 合规门</text>
<line x1="186" y1="345" x2="204" y2="345" class="flow" marker-end="url(#arrow)"/>
<line x1="426" y1="345" x2="466" y2="345" class="flow" marker-end="url(#arrow)"/>
<!-- SAA 编排 -->
<rect x="470" y="170" width="600" height="430" rx="12" fill="#eff6ff" stroke="#2563eb" stroke-width="2.4"/>
<text x="488" y="196" class="t h2">SAA 16 节点裸 StateGraph(编排 · 框架可换 · 禁 LLM 自评)</text>
<rect x="490" y="210" width="560" height="40" rx="7" fill="#dbeafe" stroke="#2563eb" stroke-width="1.3"/><text x="502" y="235" class="sm t">① 接入:render(题面)→ classify(品类分类)</text>
<rect x="490" y="258" width="560" height="40" rx="7" fill="#fff" stroke="#2563eb" stroke-width="1.3"/><text x="502" y="283" class="sm t">② 设计:design(GDD:玩法/胜负/机制)</text>
<rect x="490" y="306" width="560" height="40" rx="7" fill="#fff" stroke="#2563eb" stroke-width="1.3"/><text x="502" y="331" class="sm t">③ 生成:generate(填逻辑/参数 · 救场阶梯)</text>
<rect x="490" y="354" width="560" height="40" rx="7" fill="#fff" stroke="#2563eb" stroke-width="1.3"/><text x="502" y="379" class="sm t">④ 装配:scaffold(骨架)→ asset(资产)</text>
<rect x="490" y="402" width="560" height="40" rx="7" fill="#dcfce7" stroke="#15803d" stroke-width="1.8"/><text x="502" y="427" class="sm t">⑤ 构建验收:build(esbuild)→ play(九门 harness 真玩)→ player → nreview</text>
<rect x="490" y="450" width="560" height="40" rx="7" fill="#fff" stroke="#2563eb" stroke-width="1.3"/><text x="502" y="475" class="sm t">⑥ 终态:verdict.pass → emit ┃ 修复回环 ┃ giveup</text>
<line x1="770" y1="250" x2="770" y2="256" class="flow" marker-end="url(#arrow)"/>
<line x1="770" y1="298" x2="770" y2="304" class="flow" marker-end="url(#arrow)"/>
<line x1="770" y1="346" x2="770" y2="352" class="flow" marker-end="url(#arrow)"/>
<line x1="770" y1="394" x2="770" y2="400" class="flow" marker-end="url(#arrow)"/>
<line x1="770" y1="442" x2="770" y2="448" class="flow" marker-end="url(#arrow)"/>
<!-- 修复回环 -->
<path d="M 490,470 L 466,470 L 466,330 L 488,330" class="flow" marker-end="url(#arrow)" stroke-dasharray="5 4"/>
<text x="430" y="540" class="xs" fill="#b45309">未过→修复回环</text>
<line x1="426" y1="360" x2="466" y2="420" class="flow" marker-end="url(#arrow)"/>
<!-- prompt Registry 注入 -->
<rect x="490" y="110" width="420" height="40" rx="8" fill="#f5f3ff" stroke="#7c3aed" stroke-width="2"/>
<text x="500" y="135" class="sm t">prompt Registry(第8契约 · id@version · 四道闸 + HITL)</text>
<line x1="640" y1="150" x2="600" y2="256" class="flow" stroke="#7c3aed" marker-end="url(#arrowP)" stroke-dasharray="5 3"/>
<line x1="700" y1="150" x2="700" y2="304" class="flow" stroke="#7c3aed" marker-end="url(#arrowP)" stroke-dasharray="5 3"/>
<text x="720" y="170" class="xs" fill="#7c3aed">注入 design/generate</text>
<!-- 九门 -->
<rect x="490" y="612" width="560" height="56" rx="8" fill="#dcfce7" stroke="#15803d" stroke-width="2"/>
<text x="500" y="634" class="sm t" font-weight="700">九门 harness(CDP 真浏览器真玩 · L1 硬约束为主 · 零 LLM 自评)</text>
<text x="500" y="654" class="mut xs">能装载/不报错/帧 delta/像素回读/活动 hash/引擎调用/输入改状态/机制进展+latch/控制跟手 → verdict</text>
<line x1="770" y1="442" x2="770" y2="610" class="flow" stroke="#15803d" marker-end="url(#arrow)"/>
<text x="780" y="560" class="xs mut">play 调九门</text>
<!-- 落库 + feed -->
<rect x="1100" y="260" width="160" height="80" rx="10" fill="#fffbeb" stroke="#b45309" stroke-width="2"/>
<text x="1180" y="294" text-anchor="middle" class="t lbl">落库 emit</text>
<text x="1180" y="316" text-anchor="middle" class="mut xs">源项目 + 组B 观测</text>
<rect x="1290" y="260" width="150" height="80" rx="10" fill="#dcfce7" stroke="#16a34a" stroke-width="2"/>
<text x="1365" y="294" text-anchor="middle" class="t lbl">入 feed</text>
<text x="1365" y="316" text-anchor="middle" class="mut xs">真人玩</text>
<line x1="1070" y1="470" x2="1180" y2="342" class="flow" marker-end="url(#arrow)"/>
<text x="1085" y="420" class="xs mut">pass→落库</text>
<line x1="1260" y1="300" x2="1288" y2="300" class="flow" marker-end="url(#arrow)"/>
<!-- 侧注 -->
<rect x="36" y="430" width="390" height="100" rx="10" fill="#f8fafc" stroke="#94a3b8" stroke-width="1.3"/>
<text x="50" y="453" class="t lbl">救场阶梯(成本/可靠)</text>
<text x="50" y="475" class="mut xs">stage1 便宜档 —连续 5 次九门失败→ stage2 强档</text>
<text x="50" y="495" class="mut xs">—再 3 次→ giveup + dump;判定锚=九门 verdict.pass</text>
<text x="50" y="519" class="mut xs">缓存三段式:前缀冻结,第二款起命中 76–93%</text>
<text x="40" y="712" class="t h2">四子系统接合点:</text>
<text x="40" y="736" class="sm t">开闸(D12/GP9)放行 → SAA 编排(generate 调 prompt Registry · build/play 调 harness)→ 九门裁决(pass/修复/giveup)→ 落库 + 入 feed。</text>
<text x="40" y="760" class="mut xs">三层校验定位:九门多数 = L1 硬约束(编译/运行/机制)+ 少数 L2(机制进展);L3 效果由 player 软门只评分(见三层校验 / 图 ⑤ 九门内部)。</text>
<text x="40" y="864" class="mut xs">映射:SAA编排.md · 验收门-W-G1.md · prompt治理.md · 开闸接线.md | 与 agentic 图说 svg 风格统一 | 设计变动须同步本图</text>
</svg>

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -0,0 +1,63 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1480 940" font-family="-apple-system,'PingFang SC','Microsoft YaHei',Segoe UI,sans-serif">
<defs>
<marker id="arrow" markerWidth="11" markerHeight="11" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#334155"/></marker>
<style>
.t{fill:#0f172a}.mut{fill:#475569}.sm{font-size:12px}.xs{font-size:11px}
.h1{font-size:24px;font-weight:700}.h2{font-size:15px;font-weight:700}.lbl{font-size:13px;font-weight:600}
.ring{stroke:#334155;stroke-width:2.4;fill:none}
</style>
</defs>
<rect x="0" y="0" width="1480" height="940" fill="#f8fafc"/>
<text x="40" y="38" class="t h1">图 ④ · 数据飞轮全景:三轮咬合闭环</text>
<text x="40" y="58" class="mut sm">生成 → 发布 → feed 播放 → 遥测 → 反馈 → 优化 → 回生成;三条飞轮(网络效应/资产/数据)互相咬合、自我加速 = 差异化护城河。</text>
<!-- 主闭环六节点 -->
<rect x="665" y="190" width="150" height="64" rx="10" fill="#dcfce7" stroke="#16a34a" stroke-width="2"/><text x="740" y="218" text-anchor="middle" class="lbl t">① 生成</text><text x="740" y="238" text-anchor="middle" class="mut xs">两线产物</text>
<rect x="873" y="310" width="150" height="64" rx="10" fill="#fff" stroke="#16a34a" stroke-width="1.8"/><text x="948" y="338" text-anchor="middle" class="lbl t">② 发布</text><text x="948" y="358" text-anchor="middle" class="mut xs">落库 / 上架</text>
<rect x="873" y="546" width="150" height="64" rx="10" fill="#fff" stroke="#16a34a" stroke-width="1.8"/><text x="948" y="574" text-anchor="middle" class="lbl t">③ feed 播放</text><text x="948" y="594" text-anchor="middle" class="mut xs">玩家消费</text>
<rect x="665" y="666" width="150" height="64" rx="10" fill="#fff" stroke="#16a34a" stroke-width="1.8"/><text x="740" y="694" text-anchor="middle" class="lbl t">④ 遥测</text><text x="740" y="714" text-anchor="middle" class="mut xs">留存/行为/收益</text>
<rect x="457" y="546" width="150" height="64" rx="10" fill="#fff" stroke="#16a34a" stroke-width="1.8"/><text x="532" y="574" text-anchor="middle" class="lbl t">⑤ 反馈</text><text x="532" y="594" text-anchor="middle" class="mut xs">同款/资产/语料</text>
<rect x="457" y="310" width="150" height="64" rx="10" fill="#fff" stroke="#16a34a" stroke-width="1.8"/><text x="532" y="338" text-anchor="middle" class="lbl t">⑥ 优化</text><text x="532" y="358" text-anchor="middle" class="mut xs">质量/推荐</text>
<!-- 顺时针主箭头 -->
<path d="M 815,228 Q 900,250 895,308" class="ring" marker-end="url(#arrow)"/>
<path d="M 948,610 L 948,544" class="ring" marker-end="url(#arrow)" transform="rotate(180 948 577)"/>
<line x1="948" y1="374" x2="948" y2="544" class="ring" marker-end="url(#arrow)"/>
<path d="M 895,612 Q 900,690 815,700" class="ring" marker-end="url(#arrow)"/>
<line x1="665" y1="698" x2="609" y2="610" class="ring" marker-end="url(#arrow)"/>
<line x1="532" y1="544" x2="532" y2="376" class="ring" marker-end="url(#arrow)"/>
<path d="M 585,308 Q 600,250 663,230" class="ring" marker-end="url(#arrow)"/>
<!-- 中心 -->
<circle cx="740" cy="460" r="120" fill="#fffbeb" stroke="#b45309" stroke-width="2.4"/>
<text x="740" y="438" text-anchor="middle" class="h2 t">数据飞轮</text>
<text x="740" y="462" text-anchor="middle" class="mut xs">生成 + 流量 + 变现</text>
<text x="740" y="480" text-anchor="middle" class="mut xs">全闭环 = 护城河</text>
<text x="740" y="504" text-anchor="middle" class="xs" fill="#b45309">越转越快</text>
<!-- 三轮咬合注 -->
<rect x="1060" y="430" width="380" height="92" rx="10" fill="#eff6ff" stroke="#2563eb" stroke-width="1.8"/>
<text x="1074" y="454" class="lbl" fill="#1d4ed8">网络效应轮</text>
<text x="1074" y="476" class="xs mut">③feed →「做同款」→ 溯源链(血缘) → 导流回 ①生成;</text>
<text x="1074" y="494" class="xs mut">原作者看「被 N 人做同款」→ 消费流量回创作侧。</text>
<text x="1074" y="514" class="xs mut">(阶段一先落 · 见溯源链模型图)</text>
<rect x="40" y="120" width="380" height="92" rx="10" fill="#fffbeb" stroke="#b45309" stroke-width="1.8"/>
<text x="54" y="144" class="lbl" fill="#b45309">资产轮</text>
<text x="54" y="166" class="xs mut">①生成/创作 → 私有素材沉淀 → 资产市场</text>
<text x="54" y="184" class="xs mut">(可检索/流通/分成)→ 跨创作者复用回生成。</text>
<text x="54" y="204" class="xs mut">(阶段二/三 · 卡素材契约 + 支付闸)</text>
<rect x="40" y="700" width="400" height="92" rx="10" fill="#dcfce7" stroke="#15803d" stroke-width="1.8"/>
<text x="54" y="724" class="lbl" fill="#15803d">数据轮</text>
<text x="54" y="746" class="xs mut">①生成全过程数据 + ④遥测(留存/收益) → 按 gameId</text>
<text x="54" y="764" class="xs mut">统一 schema 归档语料 → ⑥优化抬升生成质量与推荐。</text>
<text x="54" y="784" class="xs mut">(阶段四 · 卡统一 trace 契约 + 两 join 键待补)</text>
<line x1="1060" y1="476" x2="1024" y2="500" class="ring" stroke="#2563eb" marker-end="url(#arrow)"/>
<line x1="420" y1="170" x2="660" y2="220" class="ring" stroke="#b45309" marker-end="url(#arrow)" stroke-dasharray="5 4"/>
<line x1="440" y1="740" x2="560" y2="600" class="ring" stroke="#15803d" marker-end="url(#arrow)" stroke-dasharray="5 4"/>
<text x="40" y="864" class="mut xs">映射:数据飞轮.md(溯源同款 / 资产市场 / 收益回流三飞轮)· README §10 | 分期与子模型见溯源链模型图(待补) | 设计变动须同步本图</text>
<text x="40" y="886" class="mut xs">注:三轮分期落地(一→二/三→四),非一次到位;阶段排序是物理依赖(素材契约/支付/统一 trace),不是优先级偏好。</text>
</svg>

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -0,0 +1,63 @@
# 生成引擎图说(总入口)
> **这是什么**:整个游戏生成引擎模块的「看图入口」。一处索引全模块的架构图——两条生成线、廉价线端到端、tier2 自治线、数据飞轮、引擎运行时、验收、设计裁决。复杂承重的图用手绘 svg,简单的关系图用 mermaid(嵌在各设计档内)。
> **给谁看**:想一图看懂"整个生成引擎怎么转"的创始人;照图实现的工程师 / vibecoding 的人。
## 0. 怎么用这份图说
- **先看 §1 的 P0 四张电梯图**——它们是各子系统的顶层全景,看完就懂"两条线怎么分工、游戏作为长生命周期项目怎么演进、廉价线怎么从一句话到 feed、数据飞轮怎么自我加速"。
- **tier2 自治富游戏线**的运行时细节(9 张图)在另册 [`agentic运行时架构图说.md`](agentic运行时架构图说.md)。
- **各子系统的机制细节**散在各设计档内的 mermaid,§3 给索引。
- **同步纪律**:设计文档一变动,对应图必须同步更新;svg 入仓(GitHub/编辑器直接渲染),png 在 mini-desktop 转。新图续号入 `assets/`(07 起,00–06 归 tier2)。
## 1. P0 电梯图(看图懂全局)
### 图 ① · 全局两线 + tier 体系
![全局两线与tier体系](assets/07-全局两线与tier体系.svg)
整个生成引擎分两条生成线:**Tier0/1 廉价线**(超休闲单局,SAA 16 节点裸图 + 便宜模型 + LittleJS + 九门)与 **tier2 自治富游戏线**(合成/经营/挂机,AgentScope 独立 service + 单写 ReAct + Phaser + 三层校验)。两条线**运行期零耦合、各跑各运行时**,只在底部公共组件(计费/送审/feed/CDP 验收基线/源项目契约)交汇。一句话按品类/复杂度分流——超休闲走左线,富游戏走右线。tier2 线细节见另册 9 图。
### 图 ② · 游戏 = 长生命周期源项目
![长生命周期源项目](assets/08-长生命周期源项目.svg)
范式灵魂:游戏不是一次性产物、也不是打包 blob,而是一个**结构化源项目**(game.json/design.md/config/src/assets/build.json)。围绕它有六个生命周期操作(create/modify/extend/build/release/maintain)。关键的两条铁律:**改数值、换美术 = 确定性编辑(免 LLM)**;**改玩法逻辑 = 要 LLM 重生成相关模块**。改源永远不直接改包——改完重新 build 出新版本;maintain 接遥测/反馈决定下一轮改什么,形成闭环。生成质量的真标尺是"可维护性"。
### 图 ③ · 廉价线生成端到端(一句话 → 入 feed)
![廉价线端到端](assets/09-廉价线端到端.svg)
把四个子系统的接合点串成一条主轴:创作页一句话 →(开闸 D12 控制平面 + GP9 合规门)→ SAA 16 节点编排(design/generate 节点调 **prompt Registry**,build/play 节点调 **harness**)→ **九门**在真浏览器真玩判 verdict(pass / 修复回环 / giveup,救场阶梯兜底)→ 落库 + 入 feed 真人玩。这是目前唯一一张同时显示"编排 + 验收 + prompt + 开闸"怎么接在一起的图。
### 图 ④ · 数据飞轮全景(三轮咬合)
![数据飞轮全景](assets/10-数据飞轮全景.svg)
护城河的电梯图:生成 → 发布 → feed 播放 → 遥测 → 反馈 → 优化 → 回生成的主闭环,被三条飞轮咬合加速——**网络效应轮**(feed 做同款 → 溯源链 → 导流回创作)、**资产轮**(创作沉淀素材 → 资产市场 → 跨创作者复用)、**数据轮**(生成+线上数据 → 统一语料 → 抬升生成质量)。三轮分期落地(阶段一溯源链 → 二/三资产市场 → 四收益回流),排序是物理依赖、非优先级偏好。
## 2. tier2 自治富游戏线(9 图 · 另册)
细节见 [`agentic运行时架构图说.md`](agentic运行时架构图说.md):图 A 生成两阶段(工作室→单写)、图 1 系统全景、图 2 调用时序、图 3 运行时内部、图 4 ReAct 循环、图 5 编排配置、图 6 reuse 边界、图 7 产物契约、图 8 类图。
## 3. 各子系统机制图索引(档内 mermaid)
| 子系统 | 档 | 主要图 |
|---|---|---|
| 廉价线编排 | `SAA编排.md` | 16 节点拓扑(四泳道)、工作负载→编排映射 |
| 固定架构 | `固定游戏架构.md` | 工作室链路 / 固定vs可填 / 游戏定义→适配器 / 8 契约 / 事务边界 / 救场阶梯 / 缓存三段式(7 张) |
| 验收 | `验收门-W-G1.md` | 六门全景 / D12 门序 / GP9 判定 / 首局子门 / 9d trace / 开闸前置(6 张) |
| prompt 治理 | `prompt治理.md` | 治理数据流 / 四道闸 + HITL |
| 开闸 | `开闸接线.md` | 一句话→首局接线 / 三处协同 |
| 便宜模型基准 | `WG1基准.md` | 靶集三分档 / 缺口分流 / 三批执行(4 张) |
| 引擎运行时 | `引擎与运行时.md` | bundle→渲染链 / 装载时序 / Runner v2 三阶段 |
| 数据飞轮 | `数据飞轮.md` | 溯源时序 / 资产边界 / 收益三源 / 分期依赖(4 张) |
| 设计裁决 | `设计合理性裁决.md` | 裂缝树 / 四改优先级 |
| 历史对照 | `OpenGame对照.md` | 8 张(reference,不补 svg) |
## 4. 待补清单(已确认清单 · 待画)
- **P1(承重 svg)**:⑤ 九门验收 harness 内部 · ⑥ gameDefinition→src/ 终态展开 + doc↔code 兑现门 · ⑦ SAA 16 节点拓扑升 svg · ⑧ 溯源链数据模型 + 血缘边状态机 · ⑨ 引擎能力边界三分 + 插件可达性。
- **P2(mermaid 扩 / 可选)**:设计裁决坚持/裂缝/改全景 · 救场阶梯+模型路由 · 双轨灰度+cutover · 缓存三段式命中 · 收益回流三源缺口 · 分期落地闸门。
> 进度:P0 四张 ✅(本册);tier2 9 图 ✅(另册);P1/P2 待画。