zizi 7033cef382 feat(contracts): M-c批② idle+tycoon契约面——双schema+双designer v1.0.0+registry两条目+Golden六守卫样本
- idle.schema(11字段)/tycoon.schema(10字段)全收敛 integer/string/const(judge零改);升级档扁平化(upgradeCost+upgradeMultiplier)/顾客节奏档位化(customerIntervalLevel)规避judge新分支
- 对抗/fix版本一字不动(创始人拍板不升patch);Golden append-only +6守卫(idle/tycoon各 kill题文不符+kill越模板机制+accept正例),README记v1.1.2维持+守卫为细则①跨域验证手段+级3全中为放行硬前提

HJ-MC-TPL-EXEC-002 §3/§4

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 16:45:42 +00:00

70 lines
4.3 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://wanxiang.ai/contracts/templates/tycoon.schema.json",
"title": "TycoonGameConfig",
"description": "tycoon(模拟经营)模板 GameConfig 契约(HJ-MC-TPL-EXEC-002 §3,owner=WS2)。GamePackage 契约(#4)gameConfig 字段的模板级细化。玩法:进货(花 purchaseCost)→ 顾客到来 → 售出(得 salePrice)赚差价的经营循环,金币攒到 targetCoin 即通关;开局 initialCoin 本金。诚实边界:tycoon runtime 本波(M-c 批②)已实现(game-studio/src/host/runtime/index.ts 按 templateId 分发 initTycoon),可据此宣称可玩——区别于 dodge/runner/match(仅契约落盘未实现)。tycoon 无离线态(不碰 storage,与 clicker/merge 同)。字段风格对齐 clicker/merge.schema.json:const templateId 精确等值防串台 + additionalProperties:false;字段全为 integer/string/const,无 array/object(judge 子集内)。",
"type": "object",
"required": ["templateId", "title", "theme", "purchaseCost", "salePrice", "targetCoin", "initialCoin", "customerIntervalLevel", "goodsLabel", "customerLabel"],
"additionalProperties": false,
"properties": {
"templateId": {
"description": "玩法模板 ID,必须精确等于 \"tycoon\"(精确等值校验,防 LLM 跨模板串台)。",
"const": "tycoon"
},
"title": {
"description": "游戏标题,非空且非纯空白。回调组包时截 60 字落 GamePackage.meta.title,经 feed 卡片对玩家展示。",
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"theme": {
"description": "主题/氛围描述,非空且非纯空白,为生成与对抗评审提供题文一致性语境;runtime 据此哈希派生底色(M-b② 渲染面)。",
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"purchaseCost": {
"description": "进货成本,整数且 1≤purchaseCost≤50 含边界。每次进货花费的金币数。与 salePrice 构成差价对。",
"type": "integer",
"minimum": 1,
"maximum": 50
},
"salePrice": {
"description": "售价,整数且 2≤salePrice≤100 含边界。每件商品售出获得的金币数。语义约束 salePrice>purchaseCost(保正差价,schema 无法跨字段表达,由 prompt 硬约束 + runtime 钳制 max(salePrice,purchaseCost+1) 兜底,防「越卖越亏」)。",
"type": "integer",
"minimum": 2,
"maximum": 100
},
"targetCoin": {
"description": "目标金币,整数且 50≤targetCoin≤800 含边界。金币累计达此值即通关。CDP「进货→售出」循环净赚(salePrice-purchaseCost)/轮,循环数=ceil((targetCoin-initialCoin)/差价)。范围 + prompt 硬约束(达标循环 ≤250 轮)保单局取证 ≤90s。",
"type": "integer",
"minimum": 50,
"maximum": 800
},
"initialCoin": {
"description": "初始金币,整数且 10≤initialCoin≤100 含边界。开局金币(保第一次进货有本金)。语义约束 initialCoin≥purchaseCost(保首轮可进货,schema 无法跨字段表达,由 prompt 硬约束 + runtime 钳制 max(initialCoin,purchaseCost) 兜底,防「开局进不起货」死局)。",
"type": "integer",
"minimum": 10,
"maximum": 100
},
"customerIntervalLevel": {
"description": "顾客节奏档位,整数且 1≤customerIntervalLevel≤3 含边界(整数档位规避 object/string enum,落 judge integer 子集)。1=慢/2=中/3=快;runtime 据此映射顾客到来间隔(1→3s、2→2s、3→1s,runtime 内查表)。CDP 取证为玩家主动「进货→售出」点击循环(确定性可推演),顾客节奏仅影响表现层/可售上限,不阻断取证。",
"type": "integer",
"minimum": 1,
"maximum": 3
},
"goodsLabel": {
"description": "商品文案(如「奶茶」「书」「面包」),非空且非纯空白。runtime 绘商品/进货按钮文案用。",
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"customerLabel": {
"description": "顾客文案(如「顾客」「客人」),非空且非纯空白。runtime 绘顾客/售出文案用。",
"type": "string",
"minLength": 1,
"pattern": "\\S"
}
}
}