放宽GDD一句话概念校验范围
删除决策首项必须为 confirmed 且 round=0 的阻断校验 将 Runtime 的 oneLiner 实际接受范围调整为 10~160 将模型 schema 提示范围调整为 25~90 并记录有意不对称设计 修复 Planning V2 系统提示词参数占位符
This commit is contained in:
+1
-7
@@ -261,7 +261,7 @@ pub(crate) fn planning_v2_function_tools() -> Vec<platform_llm::LlmFunctionTool>
|
||||
},
|
||||
"required": ["visualType", "keywords", "moodAndColor", "mvpArtBoundary"]
|
||||
},
|
||||
"oneLiner": {"type": "string", "description": "一句话概念"},
|
||||
"oneLiner": {"type": "string", "minLength": 25, "maxLength": 90, "description": "一句话概念(建议 25~90 字;Runtime 实际接受 10~160 字,两者有意不对称,不是缺陷或 bug)"},
|
||||
"pillars": {
|
||||
"type": "array",
|
||||
"description": "游戏支柱",
|
||||
@@ -596,7 +596,6 @@ fn validate_v2_decision_content(
|
||||
topic: &str,
|
||||
state: &str,
|
||||
answer_source: Option<String>,
|
||||
round: u32,
|
||||
answer_summary: &str,
|
||||
) -> Result<(), String> {
|
||||
validate_text(topic, &format!("decisions[{index}].topic"), 1, 120)
|
||||
@@ -614,9 +613,6 @@ fn validate_v2_decision_content(
|
||||
},
|
||||
)
|
||||
.map_err(|error| error.to_string())?;
|
||||
if index == 0 && (normalize_v2_decision_state(state)? != "confirmed" || round != 0) {
|
||||
return Err("PLANNING_INVALID_GDD: decisions 首项必须是 confirmed 且 round=0".to_string());
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -651,7 +647,6 @@ fn validate_v2_decision_inputs(
|
||||
&decision.topic,
|
||||
&decision.state,
|
||||
decision.answer_source.clone(),
|
||||
decision.round,
|
||||
&decision.answer_summary,
|
||||
)?;
|
||||
}
|
||||
@@ -690,7 +685,6 @@ fn validate_v2_durable_decisions(
|
||||
&decision.topic,
|
||||
&decision.state,
|
||||
Some(decision.answer_source.clone()),
|
||||
decision.round,
|
||||
&decision.answer_summary,
|
||||
)?;
|
||||
if decision.state == "prototype_pending" {
|
||||
|
||||
+1
-1
@@ -789,7 +789,7 @@ fn planning_v2_system_prompt(session: &PlanningSessionV2) -> String {
|
||||
// 问询策略只是偏好,两者不要求数值一致。这里仅传当前已展示数,
|
||||
// 达到硬上限时再明确禁止本次继续提问。
|
||||
format!(
|
||||
"你是立项策划 Agent。当前会话 {},回合 {}。每轮必须且只能调用一个工具:问询用 plan_ask_question,出稿用 plan_submit_gdd。不要在正文输出 JSON、Markdown、解释或代码围栏。\n\n除非用户明确要求直接出稿,否则先进行关键设计澄清。\n整个会话最多提问 3 轮。\n3 轮是上限,不是配额;信息已经足够时允许 0~2 轮提前出稿。\n达到第 3 轮或信息足够时,整理当前信息并调用 plan_submit_gdd。\n每轮收到用户回答后重新选择最重要的下一个未决决定,不要重复已回答的问题。\n提问优先顺序:核心行为与本局目标 → 重玩动力 → 制作边界与 MVP。\n主题包装、美术、数值和次要系统可以用 assumption_pending,answerSource 记为 agent_inferred。修改以最新用户意见为准,提交完整 GDD,不要打补丁。",
|
||||
"你是立项策划 Agent。当前会话 {},回合 {}。{}\n\n每轮必须且只能调用一个工具:问询用 plan_ask_question,出稿用 plan_submit_gdd。不要在正文输出 JSON、Markdown、解释或代码围栏。\n\n除非用户明确要求直接出稿,否则先进行关键设计澄清。\n整个会话最多提问 3 轮。\n3 轮是上限,不是配额;信息已经足够时允许 0~2 轮提前出稿。\n达到第 3 轮或信息足够时,整理当前信息并调用 plan_submit_gdd。\n每轮收到用户回答后重新选择最重要的下一个未决决定,不要重复已回答的问题。\n提问优先顺序:核心行为与本局目标 → 重玩动力 → 制作边界与 MVP。\n主题包装、美术、数值和次要系统可以用 assumption_pending,answerSource 记为 agent_inferred。修改以最新用户意见为准,提交完整 GDD,不要打补丁。",
|
||||
session.session_id,
|
||||
session.turn_index,
|
||||
planning_v2_question_policy(session),
|
||||
|
||||
@@ -692,7 +692,9 @@ pub(crate) fn validate_plan_game(game: &PlanGddGame) -> Result<(), PlanningStora
|
||||
1,
|
||||
400,
|
||||
)?;
|
||||
validate_text(&game.one_liner, "game.oneLiner", 45, 90)?;
|
||||
// 设计约定:Runtime 接受范围为 10~160,模型 schema 提示范围收紧为 25~90;
|
||||
// 两者有意不对称,用于避免过短概念同时保留对已有/人工 GDD 的兼容,不是缺陷或 bug。
|
||||
validate_text(&game.one_liner, "game.oneLiner", 10, 160)?;
|
||||
|
||||
if !(2..=4).contains(&game.pillars.len()) {
|
||||
return Err(invalid("game.pillars 必须有 2~4 条"));
|
||||
|
||||
@@ -790,7 +790,7 @@ input 是当前 GDD 的完整快照,不要求与 source session 的 `decisions
|
||||
| title | 1~80 scalar |
|
||||
| genre.primary / fusion | primary 1~40;fusion 为 `null` 或 1~40 |
|
||||
| artStyle | visualType 1~80;keywords 3~5 个且去重,每项 1~32;其余各 1~400 |
|
||||
| oneLiner | 45~90 scalar |
|
||||
| oneLiner | Runtime 实际接受 10~160 scalar;模型 schema 提示 25~90 scalar(有意不对称,不是缺陷或 bug) |
|
||||
| pillars | 2~4 条;name 1~40,其余文本各 1~240;name 唯一 |
|
||||
| coreLoop | 4~8 步,每步 1~120 |
|
||||
| targetUsers | 三个主文本各 1~240;referenceGames 0~5 项,每项 1~80 |
|
||||
|
||||
Reference in New Issue
Block a user