Skip to content

feat: 画面建档(防卫战/快捷手册)+ skill 方法论 + analyze_screen vision_hint - #2517

Merged
DoctorReid merged 11 commits into
mainfrom
feat/screen-onboarding-vision-hint
Jul 19, 2026
Merged

feat: 画面建档(防卫战/快捷手册)+ skill 方法论 + analyze_screen vision_hint#2517
DoctorReid merged 11 commits into
mainfrom
feat/screen-onboarding-vision-hint

Conversation

@DoctorReid

@DoctorReid DoctorReid commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

改动

1. analyze_screen 返回 vision_hint 能力边界提示(backend)

AnalyzeScreenResult 增加 vision_hint 字段(success 时填):提醒智能体本结果仅含 OCR + 模板匹配的部分识别,需要全面判断画面时配合视觉工具 / 多模态再看(防把部分识别当画面全貌)。

  • schemas / backend_context / mcp.app / http.routes(MCP + HTTP 对称)
  • design-principles.md 新增 P14(观察类工具可返回能力边界提示,含与 P1「capability over compensation」的边界论证)
  • mcp.md 补字段说明

2. 式舆防卫战 + 快捷手册 画面建档

  • docs/game/screens/式舆防卫战.md(选关主界面 + 子态:弱点/编队/战斗/阶段切换/入口交互/挑战结果/领奖/多间)
  • docs/game/screens/快捷手册.md(目标 / 作战 TAB)
  • docs/game/gameplay/式舆防卫战.md(玩法 doc)

3. onboard skill 方法论强化

  • skills/zzz-od-dev-screen-onboarding/(SKILL.md + design.md):覆盖检查、source_image 归档路径规范、强制触发 gameplay-onboarding
  • convert_to_webp.py 覆盖提醒

4. AGENTS.md + pr 类 skill

  • AGENTS.md 加「改/建 skill」节(触发 skill-guide + 同步 design.md + 写方法论不写特定)
  • pr-finishing / pr-review skill 补合并后删分支提示 + 测试仓分支占位方法论

5. 23 个画面 doc source_image 统一

统一为测试仓相对路径 screens/<screen>/<state>.webp(自描述可找)。

测试配套

测试仓 PR #19:OneDragon-Anything/zzz-od-test#19
(防卫战 / 快捷手册 fixture + vision_hint 断言)

验证

  • ruff(backend 4 文件)pass
  • pytest backend 套件 147 passed
  • 实跑 MCP:analyze_screen 返回 JSON 含 vision_hint(server 重启后实时验证通过)

Summary by CodeRabbit

  • 新功能
    • /game/analyze 与 MCP analyze_screen 返回新增 vision_hint 能力边界提示(成功返回;失败为 null)。
  • 玩法资料
    • 新增《式舆防卫战》和《快捷手册》的玩法说明与画面识别/操作指引。
  • 文档与资料维护
    • 多个游戏画面资料统一更新截图资源引用路径,并补充《画面描述索引》记录。
  • 规范与指引
    • 完善屏幕建档/技能编写与截图归档流程要求,并补充设计原则。

kawayiYokami and others added 9 commits July 19, 2026 10:49
…e-node

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…e-node

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- pr-review + pr-finishing: PR 合并后提示删本地 + remote 分支(只提示,不主动)
- pr-review: 审 PR 时无论有无配套测试仓 PR,都先本地建同名分支占位(防补测试忘记切分支 → 误 commit 测试仓 main,即 #2348 的 4ca301d 教训)

Co-Authored-By: Claude Code <noreply@anthropic.com>
战斗 app 首次建档(L4 导航触发):式舆防卫战选关主界面(前哨档案+节点01-05+剧变节点进度)+ 快捷手册(5 TAB 入口)+ 式舆防卫战玩法。截图归档测试仓 fix/issue-2506-defense-node 分支。

Co-Authored-By: Claude Code <noreply@anthropic.com>
- AGENTS.md 加「改/建 skill」节(触发 skill-guide + design.md + 写方法论,工具无关)
- onboard skill:覆盖检查写方法论(去 mock_screen 等具体 API)+ source_image 归档后用 screens/<screen>/<state>.webp + 玩法 doc 触发 gameplay skill;design.md 同步
- convert_to_webp.py 加覆盖提醒
- 式舆防卫战 + 快捷手册 source_image 更新为归档 state 名完整路径

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
23 个旧 doc 的 source_image 从 .debug 临时名/英文 fixture 名/只 state 名统一为 screens/<screen>/<state>.webp(自描述可找);顺带修正 doc 名 ≠ 测试仓名(3D地图 map_3d_default→默认、仓库 storage_drive_disc_default→默认、战斗画面 _xxx.png→默认/精英、大世界 _xxx→普通 等)。待补的吼吼饼铺/委托助手不动。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…e-node

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a74fc320-795d-4614-a731-55f58fc9a027

📥 Commits

Reviewing files that changed from the base of the PR and between f111c76 and e282d47.

📒 Files selected for processing (1)
  • docs/develop/zzz/screenshot_archive.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/develop/zzz/screenshot_archive.md

📝 Walkthrough

Walkthrough

本次变更新增 analyze_screen 的视觉能力边界提示,完善屏幕建档与截图归档规范,新增式舆防卫战和快捷手册文档,并统一多份屏幕资料的截图资源路径。

Changes

视觉能力边界提示

Layer / File(s) Summary
vision_hint 数据契约与返回链路
src/zzz_od/backend/..., docs/develop/zzz/backend/...
AnalyzeScreenResult 新增 vision_hint,分析成功时返回固定能力边界提示,并通过 HTTP/MCP 暴露相关语义。

屏幕建档流程规范

Layer / File(s) Summary
屏幕建档与截图归档规则
AGENTS.md, skills/zzz-od-dev-screen-onboarding/*, docs/develop/zzz/screenshot_archive.md
补充 skill 触发、玩法分流、截图归档路径和覆盖前检查测试 fixture 的规则。

玩法与屏幕资料更新

Layer / File(s) Summary
新增玩法与屏幕识别资料
docs/game/gameplay/式舆防卫战.md, docs/game/screens/式舆防卫战.md, docs/game/screens/快捷手册.md, docs/game/screens/README.md
新增式舆防卫战和快捷手册的玩法、入口、状态流转、识别锚点及交互说明。
屏幕截图资源路径统一
docs/game/screens/*.md
将多份屏幕文档中的 source_image 更新为 screens/<screen>/<state>.webp 格式。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: usagi-wusaqi

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了本次变更的三条主线:画面建档、skill 方法论强化以及 analyze_screen 的 vision_hint。
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/screen-onboarding-vision-hint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/game/gameplay/式舆防卫战.md`:
- Around line 77-78: 统一“剧变节点”的刷新周期描述,依据已验证的游戏规则在 docs/game/gameplay/式舆防卫战.md
第77-78行保留或修正周期,并同步更新 docs/game/screens/式舆防卫战.md
第10行;确保两处使用完全一致的唯一表述,稳定/纷争节点说明保持不变。

In `@docs/game/screens/式舆防卫战.md`:
- Line 113: 统一 Line 113 与 Line 136 对防卫战结算画面的描述:围绕 screen_info 和
shiyu_defense.yml 明确其当前到底是仅有通用
area、尚未精准建模,还是已能可靠识别;根据实际实现同步两处表述,避免一处称未独立建模、另一处称已包含可识别的“战斗结束”子态。

In `@skills/zzz-od-dev-screen-onboarding/SKILL.md`:
- Around line 111-114: 更新 SKILL.md 的“转换”说明,移除 convert_to_webp.py
的仓库路径、命令示例及具体实现细节,仅保留使用 WebP 转换工具的方法论描述;将脚本路径和具体调用方式迁移到 design.md。
- Line 74: 统一 source_image 与测试 fixture 的职责:在
skills/zzz-od-dev-screen-onboarding/SKILL.md:74-74 保留 source_image 记录 .debug
原始截图 ID;在 skills/zzz-od-dev-screen-onboarding/SKILL.md:109-109 独立记录测试仓归档路径
screens/<screen>/<state>.webp;同步修改
skills/zzz-od-dev-screen-onboarding/design.md:49-49 的设计决策,避免传播将 fixture 路径作为
source_image 的错误契约。

In `@src/zzz_od/backend/backend_context.py`:
- Around line 539-540: 同步更新两个返回契约文档:在 src/zzz_od/backend/backend_context.py 的
analyze Returns 说明中补充 vision_hint,并注明成功时有值、失败时为 None;在
src/zzz_od/backend/http/routes.py 的 handle_game_analyze JSON 返回说明中补充
vision_hint,并注明失败时为 null。无需修改实际返回逻辑。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7daefe7d-78c2-4d08-83cd-a4fcd7cb29aa

📥 Commits

Reviewing files that changed from the base of the PR and between 3022593 and ea1d52d.

📒 Files selected for processing (37)
  • AGENTS.md
  • docs/develop/zzz/backend/design-principles.md
  • docs/develop/zzz/backend/mcp.md
  • docs/game/gameplay/式舆防卫战.md
  • docs/game/screens/3D地图.md
  • docs/game/screens/README.md
  • docs/game/screens/丽都周纪.md
  • docs/game/screens/丽都城募.md
  • docs/game/screens/仓库-驱动仓库.md
  • docs/game/screens/兑换码输入.md
  • docs/game/screens/加载画面.md
  • docs/game/screens/卦象集录.md
  • docs/game/screens/咖啡店.md
  • docs/game/screens/地图.md
  • docs/game/screens/大世界.md
  • docs/game/screens/对话.md
  • docs/game/screens/式舆防卫战.md
  • docs/game/screens/影像店营业.md
  • docs/game/screens/快捷手册-日常.md
  • docs/game/screens/快捷手册.md
  • docs/game/screens/战斗画面.md
  • docs/game/screens/打开游戏.md
  • docs/game/screens/报刊亭.md
  • docs/game/screens/米哈游启动页.md
  • docs/game/screens/绝区零标题页.md
  • docs/game/screens/菜单-更多功能.md
  • docs/game/screens/警告_游戏前详阅.md
  • docs/game/screens/邮件.md
  • docs/game/screens/随便观.md
  • docs/game/screens/驱动盘拆解.md
  • skills/zzz-od-dev-screen-onboarding/SKILL.md
  • skills/zzz-od-dev-screen-onboarding/convert_to_webp.py
  • skills/zzz-od-dev-screen-onboarding/design.md
  • src/zzz_od/backend/backend_context.py
  • src/zzz_od/backend/http/routes.py
  • src/zzz_od/backend/mcp/app.py
  • src/zzz_od/backend/schemas.py

Comment thread docs/game/gameplay/式舆防卫战.md
Comment thread docs/game/screens/式舆防卫战.md Outdated
Comment thread skills/zzz-od-dev-screen-onboarding/SKILL.md
Comment thread skills/zzz-od-dev-screen-onboarding/SKILL.md Outdated
Comment thread src/zzz_od/backend/backend_context.py
…onvert_to_webp 移 design + vision_hint docstring)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/develop/zzz/screenshot_archive.md`:
- Line 33: 更新“更新溯源”流程说明,除 frontmatter 的 source_image
外,明确要求同步多子态画面各子态标题中的独立截图路径,确保识别快照引用新的归档图片;保留现有归档路径和 README 索引更新要求。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2467d185-6ade-47ff-ad7e-f8c6142a31b7

📥 Commits

Reviewing files that changed from the base of the PR and between ea1d52d and f111c76.

📒 Files selected for processing (6)
  • docs/develop/zzz/screenshot_archive.md
  • docs/game/screens/式舆防卫战.md
  • skills/zzz-od-dev-screen-onboarding/SKILL.md
  • skills/zzz-od-dev-screen-onboarding/design.md
  • src/zzz_od/backend/backend_context.py
  • src/zzz_od/backend/http/routes.py
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/zzz_od/backend/http/routes.py
  • skills/zzz-od-dev-screen-onboarding/design.md
  • src/zzz_od/backend/backend_context.py
  • skills/zzz-od-dev-screen-onboarding/SKILL.md

Comment thread docs/develop/zzz/screenshot_archive.md Outdated
…eRabbit)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
@DoctorReid
DoctorReid merged commit a29a2ea into main Jul 19, 2026
7 of 8 checks passed
@DoctorReid
DoctorReid deleted the feat/screen-onboarding-vision-hint branch July 19, 2026 17:47
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants