KR Solidarity: Asset Placement Strategy (v6.4.0)
Deterministic, wireframe-driven asset placement validation for KR Solidarity.
Purpose
This skill converts TODO[asset] slot hints in wireframe XML into concrete asset:<id> assignments from the manifest. It enforces token format rules, z-layer compatibility, full manifest accounting, and Zero-Flora checks. It outputs resolved XML plus machine-readable compliance reports.
When to Use
- Resolve
TODO[asset]placeholders fromwireframe-annotatoroutput. - Validate slot-to-asset mapping before component generation.
- Audit current placement against KR Solidarity hard rules.
- Produce deterministic placement scoring and diagnostics for PR review.
Capabilities
- Parse
<assets><slot ...>blocks from multiple wireframes. - Resolve slot hints against
kerala-rage-kr-solidarity-manifest.json. - Prioritize unused assets first to maximize manifest coverage.
- Produce proposed additional placements for still-unused compatible assets.
- Enforce token format (
--sys-*only) in placement refs. - Validate all placed
asset_ids exist in the manifest. - Detect flora-related terms on placed assets (Zero-Flora gate).
- Emit per-screen 100-point rubric scoring and aggregate pass/fail.
Inputs
Required
{
"wireframe_xml_dir": ".claude/wireframes",
"manifest": "frontend/public/assets/kerala-rage-kr-solidarity-manifest.json"
}
Optional
{
"hero_registry": "frontend/public/assets/kr-solidarity-hero-registry.json",
"asset_root": "frontend/public/assets/kr-solidarity"
}
Notes:
hero_registryis used for diagnostics/context metadata.asset_rootenables file existence checks for placed asset paths.
TODO Hint Contract
Format:
TODO[asset] key1=value1;key2=value2;...
Supported keys:
id/asset_idcategorylayerscaleaspectprioritysemantic_weightfunctional_rolelayering_role
Also supported:
- explicit ID ranges like
KR-SOLID-010 to KR-SOLID-020 - direct IDs inside slot text
Hard Rules
- Semantic token format only in
token_refs: must start with--sys-. - No hex/RGB values in token refs.
- Layer compatibility must match slot
z_layerintent. - All placed asset IDs must exist in manifest.
- Full manifest accounting required: every manifest asset is either used or unused with reason.
- Zero-Flora lockdown: placed assets must not match blocked flora terms.
Process
- Parse each wireframe XML and collect slot contexts.
- Resolve TODO slots with compatibility scoring and unused-first ranking.
- Write resolved XML files to
.claude/wireframes/resolved/. - Compute per-screen rubric score (0-100).
- Compute aggregate compliance and diagnostics.
- Write aggregate report to
.claude/wireframes/placement_report.json.
Scoring Rubric (100)
- Wireframe alignment + z-order correctness: 35
- Token compliance: 25
- Manifest-valid mapping: 20
- Hero depth and lighting intent: 20
Detailed scoring math and diagnostics mapping:
Pass gate:
- aggregate score
>= 90 - no unresolved slots
- all assets accounted for
- zero invalid token refs
- zero invalid asset refs
- zero flora violations
CLI
python3 .claude/skills/asset-placement-strategy/scripts/run_asset_placement.py \
--wireframes-dir .claude/wireframes \
--manifest frontend/public/assets/kerala-rage-kr-solidarity-manifest.json \
--hero-registry frontend/public/assets/kr-solidarity-hero-registry.json \
--asset-root frontend/public/assets/kr-solidarity
Output Contract
1) Resolved XML
All successfully resolved TODO slots are rewritten to:
<slot ... status="resolved">
asset:KR-SOLID-022
</slot>
2) Per-screen report
Each screens[] entry includes:
screen,wireframeplacements[]unresolved_slots[]scorescore_breakdowndiagnostics
3) Aggregate report (placement_report.json)
Top-level fields:
metadatatotal_assetsmanifest_coverageused_assetsunused_assetsproposed_additional_placementsscreensaggregate_scorecompliancediagnostics
Compliance Fields
compliance includes:
all_assets_accounted_forno_unresolved_slotsall_placed_assets_validzero_flora_lockdowntoken_compliance_pcttoken_compliancepass
Troubleshooting
Score below 90
- Check
screens[].score_breakdownfor weak category. - Review
diagnostics.invalid_tokensfor non--sys-*refs. - Review
diagnostics.invalid_asset_refsfor missing IDs. - Review
screens[].unresolved_slotsfor unresolvable TODO constraints.
Unused assets remain high
- Inspect
proposed_additional_placements. - Add compatible slots in wireframes where reuse proposals exist.
- Relax over-constrained TODO hints (
aspect,layer,semantic_weight) when justified.
Flora gate failure
- Inspect
diagnostics.flora_violationsfor matched terms. - Replace violating asset with compliant candidate.
Best Practices
- Keep TODO hints explicit (
category,layer,aspect,scale). - Reserve explicit
asset_idhints for intentional locks. - Run this skill before
component-builderto avoid late-stage drift. - Keep wireframe
z_layerintent stable to preserve deterministic scoring.
Integration
Workflow chain:
wireframe-annotator -> asset-placement-strategy -> ui-design-evaluator -> component-builder
Related Skills
Last Updated: 2026-03-08 | Version: 6.4.0