docs(rsk002): close asset review gate

This commit is contained in:
2026-08-23 16:13:47 +08:00
parent 3767ca0891
commit 13f862ea07
16 changed files with 479 additions and 32 deletions
+31 -25
View File
@@ -14,12 +14,14 @@
## Current State
- Stage: `M06_RSK002_RISK_COMMITMENT_DESIGN`
- Active implementation step: `M06_RSK002_RISK_COMMITMENT_ASSET_GENERATION`
- Active implementation step: `M06_RSK002_RISK_COMMITMENT_RECONSTRUCTION_PACKAGE`
- Repository cleanup and page-production baseline are complete at `f848e20`.
- Previous product steps: `SYS-005 Initial Company`, `HUB-001 Guild desk`,
`PTY-001 Party Line / Formation`, `PTY-002 Readiness Review` and `RSK-001
Risk Board` are complete after Owner runtime acceptance; RSK-002 Risk
Commitment is now the active page at `ASSET_GENERATION_IN_PROGRESS`.
Commitment has a closed asset gate; the active handoff step is the
reconstruction package while the page remains `ASSET_REVIEW` until that
package is complete.
- Planning baseline: `d59555c5a3cf95fc44de79ba06c02e650eb3df3b`
- Documentation consolidation baseline:
`53824d2394e7facdc8dca19aa20a690a5c960aca`
@@ -69,12 +71,12 @@
the three capture attempts are recorded in the RSK-001 package, and page
preflight passes 24/24. Owner accepted the page at actual size on
2026-08-23; the next boundary is the separate RSK-002 commitment page.
- RSK-002 Risk Commitment v001 is at `ASSET_GENERATION_IN_PROGRESS` after
Owner accepted both the draft and deconstruction package on 2026-08-23. Its
- RSK-002 Risk Commitment v001 remains at `ASSET_REVIEW` after Owner accepted
the draft, deconstruction package and asset package on 2026-08-23. Its
singular selected-risk relic, connected six-fact consequence band, frozen
four-member Party staging and bottom commitment rail are visual authority.
The asset plan now limits work to static-master cleaning and reuse of
accepted Recruit/command provenance; Runtime remains frozen.
The asset gate is closed; Runtime remains frozen pending the reconstruction
handoff package.
- `M01 Entry` direction v001 was generated as a 2x3 board covering Boot,
first launch, Title continuity, Settings, Credits and shared overlays. The
single 2K call cost `$0.014`; the board is not a runtime asset and no
@@ -654,33 +656,37 @@
## RSK-002 Asset Issue Register
- `RSK002-ASSET-01` `OPEN_ASSET_REVIEW`: the reuse/processing package is being
prepared. Owner must confirm the clean static master, dynamic mask, reused
Recruit/command provenance and no-baked-text policy before reconstruction.
- `RSK002-ASSET-01` `RESOLVED_OWNER_ACCEPTED`: Owner replied `OK` to the
full-size clean static master and contact sheet on 2026-08-23. World/relic
continuity, dynamic mask ownership, reused Recruit provenance and the
no-baked-text policy are accepted; the reconstruction handoff is the next
separate boundary.
## Active Step Plan
`M06_RSK002_RISK_COMMITMENT_ASSET_GENERATION` owns the RSK-002 v001 asset
processing package. The player-visible stopping point remains a contained,
reviewable commitment surface where the selected risk and frozen four-member
Party snapshot remain simultaneously readable, all sourced consequences are
explicit, and `Begin Battle` is unavailable until the player confirms once.
The step stops at the Owner asset gate, before reconstruction or Runtime.
`M06_RSK002_RISK_COMMITMENT_RECONSTRUCTION_PACKAGE` owns the RSK-002 v001
runtime handoff package after the closed asset gate. The player-visible
stopping point remains a contained, reviewable commitment surface where the selected risk and frozen
four-member Party snapshot remain simultaneously readable, all sourced
consequences are explicit, and `Begin Battle` is unavailable until the player
confirms once. The step stops after the reconstruction handoff is validated,
before Godot Runtime.
Ordered checks:
1. Reuse accepted Party actors, command icons and project font provenance where
their semantic role is truthful; do not generate replacement art by default.
2. Clean dynamic actor/fact/command regions from the approved master while
preserving the painted world, relic shell, consequence shell and rail.
3. Record source/output hashes, masks, processing tools and a contact sheet.
4. Submit the asset package for Owner review; stop before reconstruction and
Godot implementation.
1. Inspect the clean static master and confirm the world, relic, consequence
shell and rail remain continuous at actual size.
2. Confirm the single cleanup call, source/output hashes and dynamic mask are
traceable, and no new player-facing content was introduced.
3. Confirm reused Recruit provenance and Engine-owned semantic icons/labels.
4. Write and validate the reconstruction spec, runtime asset manifest and
independent hit-area handoff; only then advance the page to
`RECONSTRUCTION_READY`.
Frozen scope: no reconstruction, Runtime implementation, battle simulation,
Frozen scope: no Godot Runtime implementation, battle simulation,
result/recovery UI, new content, packaging or unrelated cleanup.
## Next Action
Prepare and submit the RSK-002 v001 asset package for Owner review. Reconstruction,
Runtime and BAT-001 remain frozen until that gate is accepted.
Prepare the RSK-002 runtime reconstruction package. Do not modify Godot code or
advance the page state until the three handoff files pass focused preflight.
+14 -5
View File
@@ -11,7 +11,7 @@ Complete-game Goal, hand-drawn repair boundary, ordered implementation plan, roa
## Repository Reset And Page Production Baseline
> Status: `OWNER_APPROVED / M06_RSK002_RISK_COMMITMENT_DESIGN`
> Active step: `M06_RSK002_RISK_COMMITMENT_ASSET_GENERATION`
> Active step: `M06_RSK002_RISK_COMMITMENT_RECONSTRUCTION_PACKAGE`
The repository is being reset around one explicit production contract. Product
and systems design remain in the six numbered owner documents. Page-specific
@@ -715,13 +715,22 @@ opens `BAT-001` Battle Opening.
| `RSK2-1` Contract and state matrix | `COMPLETE` | `page-contract.json` and `state-matrix.json` define the normal 100% landscape layout, sourced consequence fields, receipt ownership, return paths and loading/stale/insufficient-Coin/invalid/interruption states. JSON and predevelopment design checks pass. |
| `RSK2-2` Independent design draft | `COMPLETE` | Owner accepted v001 at actual size on 2026-08-23; it uses one selected-risk relic, one consequence band and one connected four-member staging area rather than the RSK-001 three-option board layout. |
| `RSK2-3` Deconstruction review | `COMPLETE` | Owner accepted the layer map, text slots, normal 100% anchors, transparent hit areas and no-duplicate-frame policy at actual size on 2026-08-23. |
| `RSK2-4` Asset generation and processing | `IN_PROGRESS` | Reuse accepted Recruit/command provenance, clean dynamic regions from the approved master, record hashes and prepare a contact sheet; stop at Owner asset review. |
| `RSK2-5` Reconstruction package | `PENDING` | Runtime reconstruction spec, asset manifest and hit-area handoff pass after the asset gate. |
| `RSK2-6` Runtime implementation | `PENDING` | Godot implementation creates one idempotent risk commitment receipt only after explicit confirmation and enters BAT-001; no battle simulation is added in M06. |
| `RSK2-4` Asset generation and processing | `COMPLETE` | One constrained cleanup edit removed dynamic regions from the approved master; accepted Recruit provenance is reused, hashes are recorded and the contact sheet is built. |
| `RSK2-5` Owner asset review | `COMPLETE` | Owner replied `OK` to the full-size clean static master and contact sheet on 2026-08-23; the asset gate is closed. |
| `RSK2-6` Reconstruction package | `IN_PROGRESS` | Runtime reconstruction spec, asset manifest and hit-area handoff pass before the page advances to `RECONSTRUCTION_READY`. |
| `RSK2-7` Runtime implementation | `PENDING` | Godot implementation creates one idempotent risk commitment receipt only after explicit confirmation and enters BAT-001; no battle simulation is added in M06. |
Frozen scope: no battle simulation, result/recovery UI, new content, packaging,
release or unrelated cleanup.
### 2026-08-23 - RSK-002 Asset Gate Closed
- Owner replied `OK` to the full-size clean static master and asset contact
sheet. The single cleanup task, dynamic mask, accepted Recruit provenance and
no-baked-text policy are recorded in the closed asset review.
- The page remains `ASSET_REVIEW` until the separate Runtime reconstruction
handoff is written and preflighted; Godot implementation remains frozen.
### Milestone Rules
Every phase receives its own child Goal, frozen contract and implementation
@@ -1097,7 +1106,7 @@ Only one row may be `IN_PROGRESS`. A failed check keeps that row active.
| `M04_PTY002_RUNTIME_IMPLEMENTATION` | `COMPLETE` | Import the accepted PTY-002 static master and command assets, reconstruct the contained 16:9 readiness composition with engine-owned text, actors, relation line, warning group and truthful command boundary; preserve existing FormationRiskService semantics and stop before Risk/Battle | Focused readiness behavior/input marker, 760x360/844x390/1280x720 live-resize captures in zh_CN/en at 100%/130%, strict diagnostics, 48px hit areas, text-fit and schema-v2 rendered-pixel gate against the clean static master | Runtime implementation and evidence commits `a47c6fe`, `f501f6e` |
| `M04_PTY002_OWNER_RUNTIME_REVIEW` | `COMPLETE` | Owner reviews the source-bound PTY-002 Runtime at actual size and confirms actor scale, warning readability, command hierarchy and no-battle stopping boundary | Owner accepted the 760x360/844x390/1280x720 Runtime set; automated evidence remains supporting evidence only | Owner acceptance record `PTY-002/verification/owner-acceptance.md` |
| `M05_RSK001_RISK_BOARD_RUNTIME_REVIEW` | `COMPLETE` | Implemented the approved RSK-001 Risk Board reconstruction: frozen party header, three equal sourced options, semantic fact rows and local Review boundary; stopped before Risk Commitment receipt | `ABG_DEV4_RISK_OK` with Settings return and no-receipt assertions, 48px targets, strict normal 100% captures at 760x360/844x390/1280x720 in zh_CN/en, package preflight 24/24 and Owner actual-size acceptance on 2026-08-23 | Focused RSK-001 package, Runtime, verification and acceptance commits |
| `M06_RSK002_RISK_COMMITMENT_ASSET_GENERATION` | `IN_PROGRESS` | Process the Owner-approved RSK-002 v001 assets without expanding visual scope: clean dynamic regions, reuse accepted Recruit/command provenance and preserve the relic/world/rail composition | Asset-generation plan, clean static master, dynamic mask, source/output hashes, contact sheet and Owner asset review; reconstruction and Runtime remain frozen | Focused RSK-002 asset package and plan/checkpoint/ledger commit |
| `M06_RSK002_RISK_COMMITMENT_RECONSTRUCTION_PACKAGE` | `IN_PROGRESS` | Author the bounded RSK-002 v001 Runtime handoff without expanding visual scope: preserve the cleaned relic/world/rail composition, bind accepted Recruit provenance and keep all semantics engine-owned | Runtime reconstruction spec, asset manifest, independent hit areas, focused preflight and a `RECONSTRUCTION_READY` checkpoint; Godot remains frozen | Focused RSK-002 reconstruction-package commit |
<!-- markdownlint-enable MD013 -->
+4 -1
View File
@@ -212,7 +212,7 @@
},
"RSK-002": {
"name": "Risk commitment",
"status": "ASSET_GENERATION_IN_PROGRESS",
"status": "ASSET_REVIEW",
"active_version": "v001",
"contract": "pages/RSK-002-risk-commitment/page-contract.json",
"state_matrix": "pages/RSK-002-risk-commitment/state-matrix.json",
@@ -230,6 +230,9 @@
"deconstruction_text_slots": "pages/RSK-002-risk-commitment/approved/v001/text-slots.json",
"deconstruction_hit_areas": "pages/RSK-002-risk-commitment/approved/v001/hit-areas.json",
"asset_plan": "pages/RSK-002-risk-commitment/reconstruction/v001/asset-generation-plan.json",
"asset_manifest": "pages/RSK-002-risk-commitment/reconstruction/v001/asset-manifest.json",
"asset_contact_sheet": "pages/RSK-002-risk-commitment/reconstruction/v001/asset-contact-sheet.png",
"asset_review": "pages/RSK-002-risk-commitment/reconstruction/v001/asset-review.md",
"provenance": "runtime/entry/entry_shell.gd"
}
}
@@ -3,7 +3,7 @@
"page_id": "RSK-002",
"page_name": "Risk commitment",
"module_id": "M04",
"state": "ASSET_GENERATION_IN_PROGRESS",
"state": "ASSET_REVIEW",
"active_version": "v001",
"player_purpose": "Confirm one selected risk against the exact frozen Party snapshot, understand the sourced cost and consequences, and deliberately create the single commitment receipt that opens Battle Opening.",
"primary_read_order": [
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

@@ -0,0 +1,40 @@
{
"schema_version": 1,
"page_id": "RSK-002",
"version": "v001",
"state": "ASSET_REVIEW",
"new_ai_calls": 1,
"call_scope": "One constrained image-to-image cleanup of the approved master; no new player-facing content, character family or icon set was generated.",
"reuse": [
"approved v001 world/relic/consequence/rail composition",
"accepted Recruit texture family pf_b01-512 through pf_b12-512",
"project font stack",
"engine-drawn semantic fact and command icons",
"accepted PTY-002 snapshot semantics and actor bindings"
],
"processing": [
"remove dynamic actors, attached markers and identity bars from the approved composition",
"remove six consequence glyph/value marks while preserving the ledger shell and separators",
"remove generated command/settings symbols while preserving rail geometry",
"retain the clean image as a coordinate-master hybrid with all dynamic slots engine-owned",
"record source, prompt, task, output and mask hashes",
"build a contact sheet containing approved master, clean master, mask and reused Recruit examples"
],
"outputs": [
"runtime/assets/entry/rsk_002_risk_commitment/risk-commitment-static-master.png",
"runtime/assets/entry/rsk_002_risk_commitment/dynamic-regions.png",
"runtime/assets/entry/rsk_002_risk_commitment/static-master-report.md",
"reconstruction/v001/static-cleanup-v002.png",
"reconstruction/v001/static-cleanup-v002.prompt.txt",
"reconstruction/v001/static-cleanup-v002.generation.json",
"reconstruction/v001/asset-contact-sheet.png"
],
"review_scope": [
"world and relic continuity",
"natural reconstruction behind the four actor slots",
"clean consequence band and rail surfaces",
"accepted Recruit provenance",
"no baked text or state semantics",
"no duplicate static/runtime frame or icon ownership"
]
}
@@ -0,0 +1,64 @@
{
"schema_version": 1,
"page_id": "RSK-002",
"version": "v001",
"state": "ASSET_REVIEW",
"assets": [
{
"id": "approved_master",
"path": "approved/v001/master.png",
"sha256": "6787f1804545710807152166fc83a6da8e4b385c1778945d374016f3b12b1713",
"use": "visual composition authority only"
},
{
"id": "clean_static_master",
"path": "runtime/assets/entry/rsk_002_risk_commitment/risk-commitment-static-master.png",
"sha256": "ec8d5e9ef427ae61cfcf8ebb58fc527dd0b381e22ee94d7c4ad03a55cc0ed80e",
"processing": "constrained GPT-Image-2 image-to-image cleanup task_01M0PNRTS1CWK8BC8MMNG4DXC0"
},
{
"id": "dynamic_mask",
"path": "runtime/assets/entry/rsk_002_risk_commitment/dynamic-regions.png",
"sha256": "3fb2ba98ca9599c499f9ced06ebc7330e80df232ee943bb30cac4e9ac3d0a5a0",
"processing": "tools/prepare_rsk002_clean_master.py; audit mask for actor/fact/command ownership"
},
{
"id": "cleanup_prompt",
"path": "reconstruction/v001/static-cleanup-v002.prompt.txt",
"sha256": "12961786739d36a43b1d369bb6f58375765b9931bc0f1ff422b4ec10e0dd5015",
"use": "image-edit instruction provenance"
},
{
"id": "cleanup_generation_report",
"path": "reconstruction/v001/static-cleanup-v002.generation.json",
"sha256": "cf13e9fa5c673544a322021337a53f9f89a987a6db7f8820ddfa45d6c8c0eb62",
"task_id": "task_01M0PNRTS1CWK8BC8MMNG4DXC0",
"cost_usd": 0.014
},
{
"id": "reused_recruit_family",
"path": "runtime/assets/entry/recruit_stickers/pf_b01-512.png through pf_b12-512.png",
"sha256s": {
"pf_b01-512.png": "c1a159c1d7e58aa91f3dfb22a596959cdb651825418d0ba0b12b05e9cc3e039e",
"pf_b06-512.png": "62a0184fc8ad910152e1cd0771f19c86a0e39248d7427a0af995955e640b6ac4",
"pf_b09-512.png": "4f934054b34ffaca1ce65d7a7483c0923c18cca4ea3ebf622177f32a3d57c49f",
"pf_b12-512.png": "dc1d334045958e23c3b857398c0a039cc2109352ba78c62f419335dc7350e1da"
},
"use": "representative accepted family; all twelve remain available for current IDs"
},
{
"id": "contact_sheet",
"path": "reconstruction/v001/asset-contact-sheet.png",
"sha256": "ded0d9ce240ade56831fa3e58000a87250f02d1bfd3d52ec47f4d2d236f5788d",
"use": "Owner asset review evidence"
}
],
"generated_player_assets": [
"clean static master only; no new character, icon or text asset"
],
"text_policy": "No dynamic fact, value, actor identity, selection, confirmation or command label is sourced from raster art.",
"review_status": "owner_accepted",
"approved_on": "2026-08-23",
"approval_source": "Owner replied OK to the full-size RSK-002 asset contact sheet in HAPI.",
"runtime_boundary": "Asset review is complete, but this package remains non-runtime authority until the separate reconstruction handoff is marked RECONSTRUCTION_READY."
}
@@ -0,0 +1,46 @@
# RSK-002 Risk Commitment v001 Asset Review
Status: `COMPLETE` (Owner asset gate)
## Package
The asset package contains one constrained static cleanup edit and reused
accepted project provenance:
- the approved v001 master remains the composition authority;
- `risk-commitment-static-master.png` restores the painted overlook, left risk
relic, Party arc, consequence-band shell and bottom rail while removing the
four generated actors and all stateful symbols;
- `dynamic-regions.png` records the actor/fact/command regions that Runtime must
own;
- the accepted `pf_b01` through `pf_b12` Recruit family is reused unchanged;
- semantic fact and command icons remain Engine-drawn; no new icon sheet was
generated; and
- the contact sheet records the approved master, clean master, mask and
representative Recruit provenance.
The cleanup edit was one GPT-Image-2 image-to-image task:
`task_01M0PNRTS1CWK8BC8MMNG4DXC0`, cost `$0.014`. Prompt, report, source URL,
task ID and hashes are recorded in `asset-manifest.json`.
## Owner Gate
Owner must inspect the clean static master at actual size and confirm:
1. the world and relic remain continuous and faithful to the approved draft;
2. the four actor slots are naturally reconstructed without blur or seams;
3. the consequence band and bottom rail remain clean physical surfaces;
4. reused Recruit art is the same accepted compact family; and
5. no baked text, value, selection or command state has become asset authority.
The asset gate is now closed. Runtime imports, the reconstruction spec and
Godot implementation remain frozen until the separate reconstruction package
is authored and marked `RECONSTRUCTION_READY`.
## Owner Approval (Closed)
Owner replied `OK` after checking the full-size clean master and contact sheet
in HAPI on 2026-08-23. The world/relic continuity, natural actor clearings,
consequence and rail shells, reused Recruit family and engine-owned text/state
boundary are accepted. No new player-facing content was introduced by the
cleanup edit.
@@ -0,0 +1,17 @@
{
"mode": "execute",
"model": "gpt-image-2",
"size": "16:9",
"resolution": "2k",
"output": "/tmp/rsk002-static-cleanup-v002.png",
"local_references": [
"docs/design-authority/pages/RSK-002-risk-commitment/approved/v001/master.png"
],
"remote_reference_count": 0,
"prompt_chars": 1606,
"task_id": "task_01M0PNRTS1CWK8BC8MMNG4DXC0",
"status": "completed",
"bytes": 3577900,
"cost": 0.014,
"credits_cost": 0.14
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

@@ -0,0 +1,20 @@
Edit the supplied Aetherbound Guild RSK-002 approved composition into a clean static runtime background while preserving the exact 2048x1152 landscape framing, camera, painted floating-island overlook, blue banners, stone floor, left expedition dossier, consequence ledger shell, bottom dark command rail, all parchment borders, separators and decorative materials.
REMOVE COMPLETELY:
- all four human Recruit figures on the right side, including hair, faces, clothing, weapons, hands, shadows and feet;
- the small shield/coverage markers, identity bars and actor labels around them;
- all six semantic glyphs and value marks inside the consequence ledger band;
- the three large command symbols and the utility/settings symbol in the bottom/top rails.
RECONSTRUCT NATURALLY:
- restore the original sky, distant floating ruins, stone overlook and floor texture behind the removed figures;
- keep the Party arc/cord and its small neutral anchor points as physical decoration, but no people or data;
- keep the ledger and rail as clean empty physical surfaces with their borders and separators intact;
- keep the left dossier's abstract threat crest and empty parchment wells because they are static composition, not values.
STRICT OUTPUT RULES:
- no readable text, letters, numerals, names, labels, prices, pseudo-writing or logos;
- no replacement characters, portraits, enemies, battle scene or reward inventory;
- no new UI panels, cards, gradients or layout changes;
- preserve the accepted Japanese 2D hand-painted style and exact world-first composition;
- output one clean 16:9 raster image only.
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

@@ -0,0 +1,11 @@
# RSK-002 Clean Static Master
- Source composition: `docs/design-authority/pages/RSK-002-risk-commitment/approved/v001/master.png`
- Output: `runtime/assets/entry/rsk_002_risk_commitment/risk-commitment-static-master.png`
- Cleanup prompt: `docs/design-authority/pages/RSK-002-risk-commitment/reconstruction/v001/static-cleanup-v002.prompt.txt`
- Cleanup task: `task_01M0PNRTS1CWK8BC8MMNG4DXC0` (GPT-Image-2 image-to-image, `$0.014`)
- Dynamic-region mask: `runtime/assets/entry/rsk_002_risk_commitment/dynamic-regions.png`
- Removed: four generated actors, attached fact/identity markers, six consequence glyph/value wells, command symbols and Settings symbol.
- Preserved: painted overlook, flags, selected-risk relic shell, Party arc, consequence-band shell, command-rail shell and parchment separators.
- Runtime policy: Recruit identity, labels, values, semantic icons, selection, confirmation and hit areas are engine-owned.
- Deterministic mask helper: `tools/prepare_rsk002_clean_master.py` remains available for audit masks and future revisions; the current clean image is the recorded image-edit output above.
+94
View File
@@ -0,0 +1,94 @@
#!/usr/bin/env python3
"""Build the RSK-002 asset provenance/contact sheet."""
from __future__ import annotations
from pathlib import Path
from PIL import Image, ImageDraw, ImageFont
ROOT = Path(__file__).resolve().parents[1]
PAGE = ROOT / "docs/design-authority/pages/RSK-002-risk-commitment"
APPROVED = PAGE / "approved/v001/master.png"
STATIC = ROOT / "runtime/assets/entry/rsk_002_risk_commitment/risk-commitment-static-master.png"
MASK = ROOT / "runtime/assets/entry/rsk_002_risk_commitment/dynamic-regions.png"
ACTORS = ROOT / "runtime/assets/entry/recruit_stickers"
OUTPUT = PAGE / "reconstruction/v001/asset-contact-sheet.png"
def font(size: int, bold: bool = False):
candidates = [
"/System/Library/Fonts/Supplemental/Arial Bold.ttf" if bold else "/System/Library/Fonts/Supplemental/Arial.ttf",
"/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf" if bold else "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
]
for candidate in candidates:
path = Path(candidate)
if path.is_file():
return ImageFont.truetype(str(path), size)
return ImageFont.load_default()
def fit(image: Image.Image, width: int, height: int) -> Image.Image:
copy = image.convert("RGB")
copy.thumbnail((width, height), Image.Resampling.LANCZOS)
canvas = Image.new("RGB", (width, height), "#16252d")
canvas.paste(copy, ((width - copy.width) // 2, (height - copy.height) // 2))
return canvas
def build() -> None:
width, height = 1640, 1180
sheet = Image.new("RGB", (width, height), "#16252d")
draw = ImageDraw.Draw(sheet)
draw.text((36, 24), "RSK-002 ASSET CONTACT SHEET", fill="#f8e7b0", font=font(30, True))
draw.text((36, 66), "One constrained cleanup edit; no new player-facing content asset.", fill="#d5e2e4", font=font(15))
tiles = [
("approved master / composition authority", APPROVED),
("clean static master / runtime base", STATIC),
("dynamic-region mask / audit", MASK),
]
tile_w, tile_h = 740, 390
positions = [(36, 112), (820, 112), (36, 530)]
for (label, path), (x, y) in zip(tiles, positions):
draw.rectangle((x - 8, y - 8, x + tile_w + 8, y + tile_h + 40), fill="#233842", outline="#b78e4c", width=2)
if path.is_file():
image = Image.open(path).convert("RGB")
sheet.paste(fit(image, tile_w, tile_h), (x, y))
draw.text((x + 12, y + tile_h + 9), label, fill="#f8e7b0", font=font(20))
actor_paths = [ACTORS / "pf_b01-512.png", ACTORS / "pf_b06-512.png", ACTORS / "pf_b09-512.png", ACTORS / "pf_b12-512.png"]
draw.text((820, 530), "REUSED ACCEPTED RECRUIT FAMILY", fill="#f8e7b0", font=font(21, True))
for index, path in enumerate(actor_paths):
x = 820 + (index % 4) * 190
y = 575
draw.rectangle((x, y, x + 160, y + 220), fill="#233842", outline="#b78e4c", width=2)
if path.is_file():
actor = Image.open(path).convert("RGBA")
actor.thumbnail((140, 170), Image.Resampling.LANCZOS)
panel = Image.new("RGBA", (160, 180), (0, 0, 0, 0))
panel.alpha_composite(actor, ((160 - actor.width) // 2, 4))
sheet.paste(panel.convert("RGB"), (x, y + 8), panel)
draw.text((x + 10, y + 188), path.stem, fill="#e8eef0", font=font(12))
draw.text((820, 840), "PROCESSING / OWNERSHIP", fill="#f8e7b0", font=font(21, True))
notes = [
"Approved master: composition only; hash recorded in manifest.",
"Clean master: one constrained GPT-Image-2 cleanup edit removed dynamic actors/facts/commands.",
"Party actors: reuse pf_b01..pf_b12 accepted family; bind current four IDs at Runtime.",
"Command/fact icons: Engine-drawn semantic symbols; no generated icon call.",
"Text, values, selection, confirmation and disabled reason: Engine-owned.",
]
y = 880
for note in notes:
draw.text((820, y), "- " + note, fill="#d5e2e4", font=font(14))
y += 30
OUTPUT.parent.mkdir(parents=True, exist_ok=True)
sheet.save(OUTPUT, optimize=True)
print(f"RSK002_ASSET_CONTACT_SHEET_OK output={OUTPUT}")
if __name__ == "__main__":
build()
+137
View File
@@ -0,0 +1,137 @@
#!/usr/bin/env python3
"""Remove dynamic actors, fact glyphs and command-state art from RSK-002."""
from __future__ import annotations
import argparse
from pathlib import Path
import cv2
import numpy as np
ROOT = Path(__file__).resolve().parents[1]
DEFAULT_SOURCE = ROOT / "docs/design-authority/pages/RSK-002-risk-commitment/approved/v001/master.png"
DEFAULT_OUTPUT = ROOT / "runtime/assets/entry/rsk_002_risk_commitment/risk-commitment-static-master.png"
def rect(mask: np.ndarray, x0: float, y0: float, x1: float, y1: float) -> None:
height, width = mask.shape
cv2.rectangle(
mask,
(round(x0 * width), round(y0 * height)),
(round(x1 * width), round(y1 * height)),
255,
thickness=-1,
)
def grabcut_foreground(image: np.ndarray, mask: np.ndarray, bounds: tuple[float, float, float, float]) -> None:
"""Add a segmented actor silhouette without erasing the surrounding world."""
height, width = mask.shape
x0, y0, x1, y1 = [round(value * width) for value in (bounds[0], bounds[1], bounds[2], bounds[3])]
top, bottom = round(bounds[1] * height), round(bounds[3] * height)
left, right = round(bounds[0] * width), round(bounds[2] * width)
crop = image[top:bottom, left:right]
if crop.size == 0:
return
gc = np.full(crop.shape[:2], cv2.GC_PR_BGD, dtype=np.uint8)
margin_x = max(2, round(crop.shape[1] * 0.12))
margin_y = max(2, round(crop.shape[0] * 0.08))
gc[:margin_y, :] = cv2.GC_BGD
gc[-margin_y:, :] = cv2.GC_BGD
gc[:, :margin_x] = cv2.GC_BGD
gc[:, -margin_x:] = cv2.GC_BGD
# The central body/face corridor is a conservative foreground seed; the
# surrounding margin lets GrabCut preserve sky and stone between units.
seed_x0, seed_x1 = round(crop.shape[1] * 0.28), round(crop.shape[1] * 0.72)
seed_y0, seed_y1 = round(crop.shape[0] * 0.14), round(crop.shape[0] * 0.88)
gc[seed_y0:seed_y1, seed_x0:seed_x1] = cv2.GC_PR_FGD
bgd = np.zeros((1, 65), dtype=np.float64)
fgd = np.zeros((1, 65), dtype=np.float64)
cv2.grabCut(crop, gc, None, bgd, fgd, 6, cv2.GC_INIT_WITH_MASK)
foreground = (gc == cv2.GC_FGD) | (gc == cv2.GC_PR_FGD)
target = mask[top:bottom, left:right]
target[foreground] = 255
def build(source: Path, output: Path) -> None:
image = cv2.imread(str(source), cv2.IMREAD_COLOR)
if image is None:
raise SystemExit(f"could not read {source}")
if image.shape[1] != 2048 or image.shape[0] != 1152:
raise SystemExit(f"expected 2048x1152, got {image.shape[1]}x{image.shape[0]}")
mask = np.zeros(image.shape[:2], dtype=np.uint8)
# Actors, attached fact markers and identity bars are dynamic PTY-002
# entities. Segment each silhouette independently so the painted overlook
# and Party arc remain intact between units.
for bounds in [
(0.490, 0.255, 0.590, 0.675),
(0.585, 0.255, 0.705, 0.675),
(0.690, 0.225, 0.815, 0.685),
(0.795, 0.225, 0.940, 0.705),
]:
grabcut_foreground(image, mask, bounds)
# Small attached shield/coverage markers and identity bars sit outside
# the GrabCut silhouettes. Keep these masks narrow so the stone/sky between
# actors is not erased.
for center in [0.535, 0.635, 0.735, 0.845]:
rect(mask, center - 0.026, 0.350, center + 0.026, 0.405)
rect(mask, center - 0.026, 0.430, center + 0.028, 0.535)
rect(mask, center - 0.030, 0.575, center + 0.030, 0.625)
# The six consequence glyphs and value wells are runtime fact slots. Keep
# the outer parchment/ledger shell and separators, but remove source marks
# from each inner cell.
for left in [0.095, 0.235, 0.375, 0.515, 0.655, 0.795]:
rect(mask, left, 0.685, left + 0.055, 0.775)
# Command symbols are stateful (Cancel, acknowledgement, Begin Battle).
# Preserve the rail shell and neutralize the generated symbols; Engine
# draws the accepted semantic icons and disabled styling later.
for bounds in [
(0.070, 0.855, 0.145, 0.955),
(0.465, 0.845, 0.545, 0.955),
(0.820, 0.850, 0.915, 0.955),
]:
rect(mask, *bounds)
# Settings is a utility action, not a static state marker.
rect(mask, 0.925, 0.015, 0.990, 0.105)
# A moderate radius reconstructs stone/sky/paper texture without preserving
# glyph edges. The mask is intentionally retained for audit and later
# dynamic-layer checks.
cleaned = cv2.inpaint(image, mask, 3, cv2.INPAINT_NS)
output.parent.mkdir(parents=True, exist_ok=True)
if not cv2.imwrite(str(output), cleaned):
raise SystemExit(f"could not write {output}")
mask_path = output.with_name("dynamic-regions.png")
if not cv2.imwrite(str(mask_path), mask):
raise SystemExit(f"could not write {mask_path}")
report = output.with_name("static-master-report.md")
report.write_text(
"# RSK-002 Clean Static Master\n\n"
f"- Source: `{source}`\n"
f"- Output: `{output}`\n"
f"- Dynamic-region mask: `{mask_path}`\n"
"- Removed: four generated actors, attached fact/identity markers, six consequence glyph/value wells, command symbols and Settings symbol.\n"
"- Preserved: painted overlook, flags, selected-risk relic shell, Party arc, consequence-band shell, command-rail shell and parchment separators.\n"
"- Runtime policy: Recruit identity, labels, values, semantic icons, selection, confirmation and hit areas are engine-owned.\n",
encoding="utf-8",
)
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("--source", type=Path, default=DEFAULT_SOURCE)
parser.add_argument("--output", type=Path, default=DEFAULT_OUTPUT)
args = parser.parse_args()
build(args.source, args.output)
if __name__ == "__main__":
main()