Extract hardcore role graph builder

This commit is contained in:
2026-06-26 16:57:08 +02:00
parent 3cbded3f45
commit f27ba23a62
4 changed files with 593 additions and 577 deletions
+5 -4
View File
@@ -95,12 +95,13 @@ Keep here:
Move or isolate later:
- role graph generation for hardcore interaction categories into a dedicated
module, for example `hardcore_role_graphs.py`;
- category-library loading and inheritance helpers into `category_library.py`.
Already isolated:
- hardcore configured-cast role graph generation lives in
`hardcore_role_graphs.py`; `prompt_builder.py` selects item/axis metadata and
then asks that module for the source role graph.
- camera-scene prose and coworking composition adaptation live in
`scene_camera_adapters.py`; `prompt_builder.py` still owns camera config
parsing and row mutation.
@@ -357,7 +358,7 @@ Medium-term:
1. Split `__init__.py` node classes by family after behavior is covered by smoke
checks.
2. Extract hardcore role graph generation from `prompt_builder.py` into a
dedicated `hardcore_role_graphs.py` module.
2. Split the internals of `hardcore_role_graphs.py` by action family once more
generated edge cases are covered by smoke fixtures.
3. Add more route-level smoke fixtures for generated edge cases that are not
covered by the current static Krea/SDXL/caption metadata fixtures.
+9
View File
@@ -60,6 +60,15 @@ call the same core generation functions.
| `SxCP SDXL Formatter` | `format_sdxl_prompt` | Converts metadata rows or pair metadata into SDXL/tag style prompts. |
| `SxCP Caption Naturalizer` | `naturalize_caption` | Converts rows into more natural sentence captions. |
Core helper ownership:
| Python module | What it owns |
| --- | --- |
| `hardcore_role_graphs.py` | Source role graph construction for hardcore configured-cast rows, including POV-aware interaction geometry. |
| `hardcore_action_metadata.py` | Source action-family and position-family metadata used by Krea2, SDXL, and caption routes. |
| `scene_camera_adapters.py` | Location-aware camera/scene prose such as coworking lounge camera layout. |
| `prompt_hygiene.py` | Generic prompt, caption, and negative-prompt cleanup. |
## Node IO Map
Use this when wiring or debugging a workflow. If the formatter can receive