Skip to content

feat: 生成角色同场关系#23

Merged
xyh202131 merged 2 commits into
mainfrom
feature/character-relationships
Jun 6, 2026
Merged

feat: 生成角色同场关系#23
xyh202131 merged 2 commits into
mainfrom
feature/character-relationships

Conversation

@xyh202131

Copy link
Copy Markdown
Collaborator

功能描述

实现 Sprint 7.1 的角色关系生成:生成器会基于同一 scene 中共同出场的角色填充 characters[].relationships,示例 YAML、README、Schema 说明和测试同步更新。

实现思路

复用现有 Schema 的 relationships 字段,不新增 YAML 结构。关系类型保守使用 co_appears,只表达同场出场,不猜测亲属、同事或情感关系;同时在 validate_data 中校验关系不能自引用、不能指向未知角色、必须有 type。

测试方式

  1. python -m pytest -q
  2. python scripts\verify.py
  3. python -m py_compile novel_to_screenplay.py app.py scripts\verify_ui.py

@xyh202131 xyh202131 merged commit fd09a4b into main Jun 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant