lili
|
496f8b6de7
|
merge: W-GENRE 非遗品类四件套(skill heritage-game-design + _template-feiyi 9/9 + _fewshot-feiyi 正例 + rubric fixture/金标 spec;n=5 过 4/5·首败根因=import 断链已加护栏后 3 连过·幻觉 0)——品类路由并集 v1.3.0(剧情6/TRPG7/非遗8)
docs-gate / docs-gate (push) Has been cancelled
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-02 23:16:52 -07:00 |
|
lili
|
8301f650fa
|
Merge branch 'p11-trpg' into dev/2.0.0
docs-gate / docs-gate (push) Has been cancelled
# Conflicts:
# cheap-worker/cheap_roles.py
# cheap-worker/tests/test_golden_specs.py
# contracts/prompts/04-config/cheap-system.md
# contracts/prompts/registry.yaml
# game-runtime/tools/amodel-gen/prompt.mjs
|
2026-07-02 23:09:27 -07:00 |
|
lili
|
89f1c60534
|
feat(cheap): TRPG 品类设计 skill + 双源 prompt 品类条目注册(W-GENRE 品类件①③)
件① .agents/skills/trpg-game-design.md:TRPG(掷骰冒险)「设计什么才好玩」作业手册,照
sim-business-game-design 体例——6 心理引擎(掷骰悬念/抉择掌控/成长兑现/叙事感/连胜/收集)
/ 玩法范式可达子集(掷骰爬塔·事件链·queue 试炼·轻队伍) / 掷骰概率数值锚(首层 ~70% 成功
·成长写进概率) / §9 红线(单局可完非长流程·核心动作单击即结算 driver 可达·掷骰过程可见
非黑箱·亮牌取舍非纯随机) / §10 品类自检 5 条与 cheap_verify.GENRE_CHECKLISTS 同源 /
底线四件映射逐条确认(质量模型 SoT §7 档位要求,TRPG 全可映射、无需申报替代轴)。
件③ 双源 prompt 只加本品类条目(few-shot 过门正例 = _template-trpg 骨架本身,scaffold
clone 后即 agent 起点范例,check 门〔API 静态门+形状门〕对范例签名 PASS 已在件② 验):
· 读手册第 6 条(TRPG/掷骰/冒险/地牢爬塔类 → read trpg-game-design.md)
· 设计步品类范式一句(掷骰可见/亮牌取舍/难度爬坡)
· 步骤 A「读手册(1 + 按品类 5/6)」
三处物理文件同改:prompt.mjs(Node 半角)/ cheap_roles.py 内置回落(全角)/
contracts/prompts/04-config/cheap-system.md 热取正文(version 1.0.0→1.1.0,registry 同步)。
验证:node --check + buildSystemPrompt 出 TRPG 条目、新增行零反引号;cheap_roles 热取/
内置两路都含 TRPG 条目;test_roles 2 failed 与基线逐项一致(基线既有热取-内置分叉红:
⑨条升级只落热取路,pre-existing、非本次回归,回落路同步归编排层)、零新增红。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-02 22:46:44 -07:00 |
|
lili
|
c18e7f5324
|
feat(cheap-worker): 非遗品类件①②④+品类路由——heritage-game-design skill + _template-feiyi 工序节拍骨架(独立过九门) + 品类rubric/金标spec fixtures (W-GENRE)
① .agents/skills/heritage-game-design.md:非遗品类设计手册(照 sim-business 体例:玩法化
范式/工序节奏目标值/双层奖励/文化表述红线/§11 品类 rubric 5 条 逐条 0/1+层标 L2×3/L3×1/
L4×1+正反例,对齐质量模型 SoT §4 计分制;成长轴按 SoT §7 申报为工艺步骤解锁)。
② game-runtime/games/_template-feiyi/:工序节拍品类骨架(轻起点):一条工序链依次就绪→
火候窗口内点击完成→出成品,过窗回炉不判死;L1 plumbing 逐字节复用 _template-shop;
core.js 顶部多样性参数空间(CRAFT_CHAIN/WORKS/节奏常量);_forensicsView targets/score
取证契约(occupied=当前就绪且窗口内可点的工位)。独立过九门:A-I 全绿、H_progress
score 0→302、latch advisory(限时类口径,同经营打样)(verdict=
games/_wg1-gen/p11d-tpl/evidence/verdict.json,本品类金标 spec 驱动);tools.mjs check
机器门 PASS;单测 11/11(core 8 + headless 3,headless 按本品类语义重写、不复刻陈旧拷贝)。
④ fixtures/golden-specs/heritage-craft.play-spec.json(tap-targets occupied 族 + score
递增 + expectLatch;test_golden_specs 登记 heritage-craft,6/6 绿)+
fixtures/genre-rubrics/heritage.rubric.json(机器可读评分尺,锚定值待金标复验回填)。
路由(双源+热取三处同改):cheap_roles.py _SYSTEM_PROMPT 与 prompt.mjs 与
contracts/prompts/04-config/cheap-system.md 各加先读手册第 6 步(非遗品类→heritage
skill + _fewshot-feiyi few-shot 指针,正例随品类小批蒸馏后落库);cheap-system
version 1.0.0→1.1.0 + registry 同步(check_registry 17 条对齐 OK)。
既存问题(非本单造成,未扩大):cheap-system.md 自 8ea97234 起领先内置 _SYSTEM_PROMPT
一段「决策层/9 条自检」→ test_roles 两条 hotload 不变量测试基线即红;本单第 6 步在
热取/内置双路对称加入、漂移行数不变(仍 7 行)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-02 22:25:05 -07:00 |
|
lili
|
3223117d49
|
feat(cheap): 剧情品类路由三源同改 + story-branch 金标 play-spec(W-GENRE 品类件③④)
品类路由(保持最小,只加本品类条目):手册列表 +6「剧情/互动叙事/文字冒险类读
narrative-game-design + read _template-story/src/game-logic.js 过门范例(few-shot
read-on-demand 供给,与经营件同构)」+ 自检末行加剧情分支(选项单击即推进/latch/
选择有重量)。三源同改:contracts/prompts/04-config/cheap-system.md(热取生效面,
version 1.0.0→1.1.0)+ cheap_roles._SYSTEM_PROMPT(回落面)+ prompt.mjs(Node 双源,
禁反引号守住,node --check 过)。注:热取面与内置面的逐字节漂移是基线 pre-existing
(test_roles 10/12,fail 集未扩大;两面均已含剧情条目、语义一致)。
金标 play-spec:fixtures/golden-specs/story-branch.play-spec.json(tap-targets
occupied 反应族 + score increased + expectLatch,formalize p11a-tpl 独立九门 9/9
已验证的取证契约;无货币轴,不用货币递减门=质量模型 SoT §3 裁定二档位判据不跨档);
test_golden_specs._EXPECTED_GENRES 追加 story-branch,6/6 绿;
contracts/prompts/check_registry.py 17 条全对齐。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-02 22:22:51 -07:00 |
|
lili
|
e6525aaa3d
|
feat(cheap-worker): 便宜档生成丰富度 + M1 达标门富化重验(切片一 A/B)
接 sim-business 设计指导到生成 agent(cheap_roles+prompt.mjs 双源,先设计后写码+MVP-first);新建纯 LLM 丰富度验证 agent cheap_verify(非阻塞·不进 verdict·零 code-presence 断言,红线落地);bake_off 加 richness 列;cheap_roles 三级回落配置热取(C2a 加载器);cheap_studio trace 接线(C1b)。富游戏 M1 三品类各 5/5=100% 过九门达标。测试 test_roles 12 / test_cheap_verify 11 / test_bake_off 17 / test_cheap_trace 4 全绿。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-30 01:39:06 -07:00 |
|
lili
|
47d6394347
|
feat(cheap-worker): per-genre 脚手架路由接入 scaffold_template/scaffold_desc(扩模板数据点)
扩模板需让难品类 AI 从预置品类骨架起步、少写。接入(全缺省回落 _template、create 路零改):
- tools.mjs scaffoldSaa(gameId, templateName='_template'):clone 指定模板;CLI 加第 3 参;模板缺失 warn 回落。
- cheap_run.scaffold(game_id, template=None):shell-out 透传模板名。
- cheap_studio.run_studio(scaffold_template, scaffold_desc):线程到 prep + build_system_prompt。
- cheap_roles:system prompt 脚手架描述参数化(⟦SCAFFOLD_DESC⟧),让 AI 知道起点已是该品类完整游戏、换皮而非重写。
管线 routing 单测 27/27、prompt 参数化 8/8。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-30 01:39:05 -07:00 |
|
lili
|
619351052d
|
feat(cheap-gen): 阶段一B #1 ctx.random/ctx.time 改可调用(双 API·向母语直觉,最高频)
附A #1(最高频·每游戏用):ctx.random/ctx.time 原是对象、须 .next()/.nowMs(),AI 直觉 ctx.random()/
ctx.time() 当函数调会抛错——prompt/形状门都教"是对象不是函数"当幻觉拦。改成双 API:既可直接调用
(ctx.time()=毫秒、ctx.random()=[0,1))又保留全部方法(.nowMs()/.elapsedMs()、.next()/.range()/.reseed()),
向后兼容(框架/插件内部仍用方法形态)。
单点实现:boot-game-host 复用 createHostDevContext(单一 context 源),故 buildContext 一处包装即覆盖
host-dev + 真游戏。加 _callableTime/_callableRandom 双 API 包装器,ctx 装配处 time/random 包装。
全链路同改:plugin.js(包装器+装配)+ tools.mjs(CTX_METHODS 加 time/random、API 门错误文案翻转)
+ prompt.mjs/cheap_roles.py 双源(调用形态翻转:两形态都对、但 ctx.nowMs() 漏 .time 仍错)+ skill:144。
验证:core plugin 31/31(核心不破)+ 确定性(ctx.random()/time() 可调用 + .next()/.range()/.reseed()/
.nowMs()/.elapsedMs() 双 API)+ 形状门 11/11 + [check] PASS(双形态同段)+ cheap-worker 16/16 + 双源一致。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-30 01:39:05 -07:00 |
|
lili
|
ea229edf78
|
docs(cheap-gen): 阶段一B #7+#11 timer 单位钉死 + juice.render 每帧手调钉死
附A #7(文档钉死类·timer 是 ms 时钟、改秒是破坏性重构,取显式标注):timerScheduler.after/every
收毫秒、与 update(dt) 的 dt=秒相反——AI 易混(3 秒误写 after(3))。skill:129 + prompt.mjs/cheap_roles.py
双源钉死"3 秒=after(3000)、别 after(3)、与 dt 秒相反"。
附A #11(文档钉死/自动化·自动化不可行=render 需游戏侧 g):juice.render(g) 须每帧在游戏 render 里手调,
忘了粒子/打击感不显示。skill:116 强化(原已钉死、补 #11 标记 + 后果)。
均 doc-only(timer 本就标 ms、juice.render 本就钉死),本次显式化 + 双源对齐。验证:prompt node --check
+ cheap_roles py_compile 绿、双源一致。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-30 01:39:05 -07:00 |
|
lili
|
c6d31c0d81
|
docs(cheap-gen): 阶段一B #15 scene 回调签名钉死(防臆造首参)
附A #15(文档钉死类、非 API 改):scene-fsm 回调表里 update 只收 (dt)、render 只收 (g)
(api.d.ts:38 本就如此),但 prompt/skill 未明示防臆造首参。加钉死:别写 update(scene, dt)
这类场景名/state 首参、与五法同形。prompt.mjs + cheap_roles.py 双源 + skill define footgun 同改。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-30 01:39:05 -07:00 |
|
lili
|
bdcd7d472c
|
feat(cheap-gen): 阶段一B #10 juice 加 burst(x,y) 便利方法(向母语直觉)
附A #10:AI 母语直觉是 juice.burst(x,y),旧 API 只有 spawnEmitter('burst',x,y)、burst 仅预设名
——prompt 原本教"particles-juice 没有 burst"当幻觉拦。加 burst(x,y,overrides?) 便利方法委托
spawnEmitter('burst',...) 后,直觉名直接可用。全链路同改:
- particles-juice/impl.js:加 burst(x,y,overrides) 委托 plugin.spawnEmitter('burst',...)(引 plugin 自身不依赖 this)
- particles-juice/api.d.ts:实例接口加 burst 声明
- prompt.mjs + cheap_roles.py 双源:删"particles-juice 没有 burst"(它现在有了)
- skill line116:spawnEmitter 旁注 burst(x,y) 母语别名
验证:particles-juice 18/18(含 burst 别名 spec 等价测试)+ 确定性 burst≡spawnEmitter('burst')
+ [check] PASS(juice.burst 被 API 门认可)+ 双源一致。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-30 01:39:05 -07:00 |
|
lili
|
dc49f5f866
|
feat(cheap-gen): 阶段一B #5 drawButton 改返命中矩形(黄金首件·治 #1 翻车点根因)
降AI参与·阶段一B 改签名第一处(附A #5)。逐插件改逐插件回归的黄金样板。
drawButton 由返 void 改为回吐它绘制的归一化命中矩形 {x,y,w,h}——AI 的直觉写法
const btn = hudUi.drawButton(g,{x,y,w,h},{label}); if (hudUi.pointInRect(px,py,btn)) 现在就对,
治了 #1 翻车点(drawButton 返 void 误用→变量恒 undefined→命中短路→卡菜单)的根因,而非教绕路。
全链路同改(漏一个造新脏数据):
- hud-ui/impl.js:drawButton 模块函数 + 实例方法回吐归一化矩形 r(g=null 也回吐、绝不 undefined)
- hud-ui/api.d.ts:模块函数 + 实例方法 两处 :void → :Rect + JSDoc
- tools.mjs 形状门:删 drawButton 特例分支(api.d.ts 改后自然掉出 void 名集),
泛化判据留给仍真返 void 的方法(drawText/drawPanel/drawBar/play/flashScreen)
- prompt.mjs/cheap_roles.py(双源)/skill:指引由"返void绝不接"翻为"回吐命中矩形可直接 pointInRect"
- check.test.mjs:drawButton 测试反转(赋值不再拦)+ 链式测改 drawText
- test_roles.py/test_toolkit.py:footgun 断言 + 形状门 drawButton 测试随签名更新
验证(逐插件回归矩阵):
- 形状门单测 11/11(amodel-gen)+ cheap-worker test_roles/test_toolkit 16/16 + hud-ui 19/19
- 确定性 impl 铁证:drawButton 回吐 {x,y,w,h}、g=null 不 undefined、回吐矩形直接 pointInRect 闭环
- 真生成代码(菜单+按钮游戏)用了 drawButton、check 未拦 drawButton,证明 #5 不破坏生成
- 双源 drawButton 文案一致;prompt.mjs node --check + cheap_roles.py py_compile 绿
正交发现(非 #5):该局九门 gen 栽在 save.get() 方法名幻觉(save 插件无 get)——
是另一处方法名摩擦,记为阶段一B 后续/补密度候选,不在 #5 范围。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-30 01:39:05 -07:00 |
|
lili
|
74a7135746
|
feat(cheap-gen): 便宜档降AI参与 设计落仓 + 阶段一A 清脏数据(治传导断裂)
探索会话诊断+设计(Codex+Opus 双评审、证据驱动重定位),认领进 plan① 切片一里程碑。
落仓产物:
- 动因 evidence(母语vs方言:M3 不弱、便宜档现状方言产同款要 ~26× token)
- 方向设计(降AI参与=减摩擦[小头]+扩模板覆盖[大头未验];附A 22处摩擦/15可改签名清单)
- tech-decisions §5.1 + agent-specs/_index 蒸馏
阶段一A 清脏数据 + 文档治理锚(prompt.mjs + cheap_roles.py 双源 + skill 三文件):
- 治"传导断裂"根因:植入定位锚——便宜档=AI参与深度低的高质游戏(轻量≠简单),
复杂度靠工程脚手架+L2 插件库、少写多调;"极小/最小游戏「点圆得分」"重框成
"脚手架起点、借插件能力改造成高质游戏"
- collision.pointInRect(不存在)收敛 hudUi、删干净
- 漂移范例 catch-fruit/wanglanmei(旧 opts 签名)→ _template(唯一匹配现契约)
- 插件数口径统一"注入 11 + runtime-probe 取证不注入"
验证:prompt.mjs node --check + cheap_roles.py py_compile 绿;九门复验跑一局打地鼠
(历史翻车品类)attempts=1、verdict.pass、failedGates=[]、¥0.95——清脏数据未破坏生成。
核心结论(创始人确认):便宜档≠简单游戏;L2 插件库是降AI参与核心载体非税;
"换母语扔插件"=升参与、与策略相反,已推翻。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-30 01:39:05 -07:00 |
|
lili
|
14c79dbfdd
|
feat(studio): A11 切片三 M4 模块重生成执行(有界单文件 LLM 重写 game-logic.js)
两段式第二段的 regenerate-module 类:改玩法 = 据 intent 有界重写 game-logic.js,不动其余。
复用机制(参数化、不复制 resume/熔断/收口):
- cheap_studio.run_studio 加 4 个默认 None 可选参(system_prompt/initial_kick/write_whitelist/prepare)
切到 modify 态,create 路零行为变化(params=None 等价原逻辑)
- cheap_toolkit.build_toolkit 加 write_whitelist(非白名单 basename 写直接拒)
- cheap_roles.build_modify_system_prompt(复用 create 红线契约块)
cheap_modify.execute_regenerate_modify:
- 取 intent(空→failed)→ materialize base 源 → 重写前后对非目标文件算 hash
- 有界重写(写边界收窄到只 game-logic.js)→ 九门
- status=succeeded ⟺ 九门过 ∧ 非目标稳;manifest{file,kind:behavior,intent,changed,untouchedStable}(断言②地基)
worker_service._process_regenerate_job(regen_fn):把 M3 的 regenerate-module 显式 failed 占位换成真执行;
deterministic/create/生成路一字未动。
测试:test_a11_m4_regenerate 10/10(全注入桩零 LLM)+ 全回归独立复跑 73 测试全绿。
一次真 LLM smoke(单跑):intent=连击递增 → status=succeeded、untouchedStable=True、九门 pass、
attempts=1、¥0.31、137s;独立 diff 佐证 5 非目标文件字节相同、仅 game-logic.js 变。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-29 02:16:22 -07:00 |
|
lili
|
675a8e688b
|
feat(cheap-worker): 便宜档 Node→Python 重写进 AgentScope spike — 范式可移植坐实
WU-A 迁移面 spike:便宜档生成核心(多轮 ReAct + 五工具沙箱 + done 门)用 Python 在新建 cheap-worker/
重写成 AgentScope agent,import 复用 tier2 框架层(model client/四道熔断/历史压缩/observability),
check/build/九门 shell-out 现有 node/cjs(不重写 esbuild/CDP/形状门)。
- U1 地基:跨包 sys.path import tier2 worker + 代理旁路 + key 从内网文档注入 env + M3 装配
- U2 五工具:read/list/write Python 实现 + check/build shell-out(形状门三态与 Node 一致)
- U3 LittleJS system prompt:prompt.mjs Python 化(两条 footgun 正反例 + 输入契约)
- U4 scaffold/stage/play 薄壳 + ensure_play_spec(据 state 形态产 play-spec 治链路假绿)
- U5 ReAct 主编排:内置 Agent+ReActConfig+外层有界 resume + done 门 + 收口 stage/smoke/九门
- U6 对照 Node:产物形态 + 九门逐门 + 过门率对比
验收:同 brief Python 新路 vs Node 旧路,产物都真 src/ 6 文件、九门都 9/9 全 PASS、过门率 1.0=1.0
→ spikePass=True。端到端单局 attempt 1 一次收敛、148s。落点 cheap-worker/ 对 tier2/amodel-gen
零改动(结构性零回归)。测试 38/38 全绿。
origin: docs/plans/2026-06-26-001-feat-cheap-worker-python-spike-plan.md
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-26 02:42:14 -07:00 |
|