Update card production workflow and workspaces
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Shared card production tools
|
||||
|
||||
`finish_masks.py` implements the approved `raw-ridges-v1` finish recipe for future stained-glass cards. It analyzes fitted opaque 2000×2800 artwork directly, without depending on spike diagnostics. Existing cards, proof builders and runtime fixtures are not migrated.
|
||||
`finish_masks.py` defaults new stained-glass cards to `raw-ridges-v1` again. It analyzes fitted opaque 2000×2800 artwork directly. Existing cards, proof builders and runtime fixtures are not migrated.
|
||||
|
||||
The immutable [recipe](recipes/raw-ridges-v1.json) pins all parameters and is hash-checked by the module. [Approval](recipes/raw-ridges-v1-approval.json) records the user's approval and the two reference Normal mask hashes. Changes to the recipe require a new revision; overrides are a separate reviewed recipe.
|
||||
The immutable [raw-ridges recipe](recipes/raw-ridges-v1.json) and its [historical approval](recipes/raw-ridges-v1-approval.json) and reference hashes remain intact. The [gated-contrast recipe](recipes/gated-contrast-v1.json) remains available by explicit selection for cards that need it. Changes to either recipe require a new revision.
|
||||
|
||||
For reusable frame/backing inputs, load a pinned version from the [shared tier layer library](../../artifacts/layers/README.md). The [four-tier comparison](../../spikes/tier-layer-library-proof/README.md) demonstrates shared layers and this finish module together without migrating historical fixtures.
|
||||
|
||||
@@ -22,7 +22,7 @@ python3 tools/card-production/finish_masks.py \
|
||||
--output path/output/masks
|
||||
```
|
||||
|
||||
The output contains `card-id-normal-{2000,1000,500}-mask.png`, raw-ridge and pane-weight diagnostics, and a validation/provenance JSON with source hashes, recipe/module hashes and library versions. All finish exports are opaque grayscale RGBA. Diagnostics are authoring data, not extra runtime textures. The command does not compose card faces, create glyph-protection maps, install fixtures or modify shaders.
|
||||
The output contains `card-id-normal-{2000,1000,500}-mask.png`, raw-ridge and pane-weight diagnostics, and a validation/provenance JSON with source hashes and recipe/module hashes. Add `--recipe gated-contrast-v1` to use the alternative contrast extractor. All finish exports are opaque grayscale RGBA. Diagnostics are authoring data, not extra runtime textures. The command does not compose card faces, create glyph-protection maps, install fixtures or modify shaders.
|
||||
|
||||
| Printing | `--overlay` | `--text` |
|
||||
|---|---|---|
|
||||
@@ -56,7 +56,7 @@ for printing, overlay_path, text_path in [
|
||||
exports = export_finish(master, output_dir, card_id, printing)
|
||||
```
|
||||
|
||||
Record `raw-ridges-v1`, the recipe hash, source revision/fit transform and actual component hashes in the assembler's validation. The module owns numeric extraction; the pipeline owns printing composition and review requirements. New stained-glass assembly uses this helper rather than copying finish code from an older proof.
|
||||
Record the selected recipe ID/hash, source revision/fit transform and actual component hashes in the assembler's validation. The module owns numeric extraction; the pipeline owns printing composition and review requirements. New assembly defaults to `raw-ridges-v1`; a revision's existing selection remains pinned on rebuild.
|
||||
|
||||
## Verification
|
||||
|
||||
@@ -67,19 +67,23 @@ python3 -m unittest discover -s tools/card-production/tests -p 'test_*.py'
|
||||
python3 tools/card-production/tests/check_approved_refs.py
|
||||
```
|
||||
|
||||
Tests cover source-edge handling, dark colored lines, broad shadow steps, canvas validation, actual alpha union, removed-component recovery, retained leading, invalid printing inputs and opaque exports for all four printings. The reference check regenerates raw confidence and Normal masks for The Fall and Burning Bush in a temporary directory, comparing every approved mask SHA-256 at 2000, 1000 and 500px widths. It writes only its check report beside the tests; it does not rebuild existing card assets.
|
||||
Tests cover source-edge handling, dark colored lines, broad shadow steps, canvas validation, actual alpha union, removed-component recovery, retained leading, invalid printing inputs and opaque exports for all four printings. The reference check regenerates historical raw confidence and Normal masks for The Fall and Burning Bush in a temporary directory, comparing every approved mask SHA-256 at 2000, 1000 and 500px widths. It writes only its check report beside the tests; it does not rebuild existing card assets.
|
||||
|
||||
[Reference check report](tests/approved-reference-check.json) records reproduction. The approved references are retained in `spikes/finish-mask-line-continuity-proof/raw-ridges/`. Approval of those Normal fixtures establishes the recipe; new art and other printings still need their own static and moving-light review. Raw ridges can include etched flecks and painted strokes, so inspect coating mottling without adding unreviewed cleanup to v1.
|
||||
The historical reference check requires `spikes/finish-mask-line-continuity-proof/`, which is absent from this checkout. It currently stops before comparison with a missing-source error. The versioned raw-ridge recipe hash and unit tests remain verifiable; do not treat the unavailable reference check as a pass.
|
||||
|
||||
[Historical reference check report](tests/approved-reference-check.json) records an earlier successful reproduction. Approval of those Normal fixtures established the recipe; new art and other printings still need their own static and moving-light review. Raw ridges can include etched flecks and painted strokes, so inspect coating mottling without adding unreviewed cleanup to v1.
|
||||
|
||||
|
||||
## Reviewed central-flourish card assembly
|
||||
|
||||
[assemble_card.py](assemble_card.py) assembles the refreshed BE-042, BE-010 and BE-002 working revisions with explicitly pinned `v3` shared layers. Each revision's `build.py` supplies its directory; builders do not depend on spike outputs. Artwork approval, font hashes/resolution, wording, glyph coverage, minimum sizes and unclipped bounds are required. The assembler derives the fixed reference line box from the font tables, centers combined verse ink in the remaining band, validates title/ornament clearance and checks reference stress cases at all three resolutions.
|
||||
|
||||
It analyzes fitted artwork once through `raw-ridges-v1`, composes all four printings, derives matching finish/text masks, writes low/med/high exports and editable high SVGs, then refreshes the working manifests at assembly-review. Approved card packages are frozen; the tool does not approve cards or install harness fixtures. It requires a layout with the declared central-flourish spacing policy and does not provide a Common or bespoke Legendary layout.
|
||||
It analyzes fitted artwork once through `raw-ridges-v1` for a new revision, composes all four printings, derives matching finish/text masks, writes low/med/high exports and editable high SVGs, then refreshes the working manifests at assembly-review. A prior build's recipe or explicit card-local selection remains pinned. Approved card packages are frozen; the tool does not approve cards or install harness fixtures. It requires a layout with the declared central-flourish spacing policy and does not provide a Common or bespoke Legendary layout.
|
||||
|
||||
```sh
|
||||
python3 tools/card-production/assemble_card.py --root in-progress/cards/ID-title/revisions/v02
|
||||
```
|
||||
|
||||
Read each revision's `review/build-validation.json` and `review/printings-comparison.png` for measured results and visual-review scope.
|
||||
|
||||
An explicitly user-authorized card-local `verseLayout` can select up to three lines, `fontSize` within the pinned minimum/default range, and `lineHeight` at least the font size. It requires `approval.by: user` and the authorization wording in `approval.note`. This overrides only text metrics in memory; it does not change shared assets, text regions or reference/flourish spacing. All actual glyph, collision and minimum-size checks still apply. The build report records the exception. Cards without this field retain their existing metrics and line limit.
|
||||
|
||||
Reference in New Issue
Block a user