Layer 2 Matching
Build a heavy-lane storyboard that reuses repository assets and templates whenever possible.
Core Pipeline: Verify heavy-lane eligibility -> Match reusable parts -> Write storyboard -> Generate preview -> Wait for approval
Mandatory Rules
Serial Execution & Gate Discipline
- This skill is heavy-lane only. If the request is a short asset, stop and route to
short-script-laneinstead of inflating it into scenes. - Do not write storyboard scenes before the heavy-lane brief and style constraints both exist.
- Every scene must declare its reuse mode:
asset-match,template-match, orfresh-design. - Preview happens after storyboard completion, not before.
- No downstream copy or implementation work may begin until
approval.mdis explicitly markedAPPROVED.
Artifact-First Output Rules
${PROJECT_DIR}/output/<case-slug>/03-storyboard/storyboard.jsonis the heavy-lane implementation contract.${PROJECT_DIR}/output/<case-slug>/03-storyboard/match-manifest.jsonrecords reuse decisions and fallback plans.${PROJECT_DIR}/output/<case-slug>/04-preview/approval.mdis the gate file for all downstream heavy-lane work.
Resource Manifest
References
| Resource | Path | Purpose |
|---|---|---|
| storyboard contract | ${PROJECT_DIR}/skills/shared/storyboard-contract.md |
Required scene fields |
| output contract | ${PROJECT_DIR}/skills/shared/output-contract.md |
Heavy-lane path contract |
| asset registry | ${PROJECT_DIR}/assets/registry.json |
Reusable asset lookup |
| template registry | ${PROJECT_DIR}/templates/registry.json |
Reusable template lookup |
| material library index | ${PROJECT_DIR}/docs/material-library/index.md |
Human-readable curated catalog |
Workflows
| Workflow | Path | Purpose |
|---|---|---|
| heavy-lane gates | ${PROJECT_DIR}/rules/workflow/pipeline-gates.md |
Approval and downstream gate rules |
Workflow
Step 1: Verify Heavy-Lane Eligibility
GATE: ${PROJECT_DIR}/output/<case-slug>/01-translation/core-brief.json and ${PROJECT_DIR}/output/<case-slug>/02-constraints/style-constraints.json exist.
EXECUTION:
- Confirm the work really belongs to the heavy lane.
- If the request is a
6-10sasset with a single takeaway and a script-first approval flow, route to${PROJECT_DIR}/skills/short-script-lane/SKILL.mdand stop this skill. - Load the heavy-lane brief, style constraints, asset registry, template registry, and storyboard contract.
CHECKPOINT:
## Step 1 Complete
- [x] Heavy-lane eligibility confirmed
- [x] Required inputs loaded
- [x] Scene storyboard remains the correct contract type
- [ ] Next: auto-proceed to Step 2
Step 2: Match Reusable Assets And Templates
GATE: Step 1 complete; heavy-lane inputs and registries are loaded.
EXECUTION:
- Resolve the case-wide proof arc from
core-brief.json. - For each scene, search
assets/registry.jsonandtemplates/registry.jsonfirst. - Filter to curated
material-libraryentries first; raw fallback entries remain manual backup only and must not be auto-recommended. - Score curated candidates in this order:
- initial filter by
narrativeRole,scriptTriggersEn,scriptTriggersZh, andhostSurfaces - fit ranking by
toneTags,visualWeight,informationDensity, anddominance - reuse feasibility by
reuseMode,mutationCost,safeToChange, andkeepFixed
- initial filter by
- Prioritize
stability = stableoverbetaon ties. If the top candidate still scores weakly, choosefresh-designinstead of forcing reuse. - Decide one reuse mode per scene:
asset-matchtemplate-matchfresh-design
- Record modifications and fallback implementation details while matching, not afterwards.
CHECKPOINT:
## Step 2 Complete
- [x] Scene-level reuse decisions made
- [x] Fallback plans defined where no direct match exists
- [ ] Next: auto-proceed to Step 3
Step 3: Write Storyboard And Match Manifest
GATE: Step 2 complete; reuse decisions exist for every scene.
EXECUTION:
- Write
${PROJECT_DIR}/output/<case-slug>/03-storyboard/storyboard.md. - Write
${PROJECT_DIR}/output/<case-slug>/03-storyboard/storyboard.json. - Write
${PROJECT_DIR}/output/<case-slug>/03-storyboard/match-manifest.json. - Ensure every storyboard scene describes static states before motion and is detailed enough for implementation.
CHECKPOINT:
## Step 3 Complete
- [x] `storyboard.md` written
- [x] `storyboard.json` written
- [x] `match-manifest.json` written
- [ ] Next: auto-proceed to Step 4
Step 4: Generate Preview And Wait For Approval
GATE: Step 3 complete; storyboard and match manifest exist.
EXECUTION:
- Generate heavy-lane preview artifacts under
${PROJECT_DIR}/output/<case-slug>/04-preview/. - Ensure
${PROJECT_DIR}/output/<case-slug>/04-preview/approval.mdexists. - Present the preview for review.
BLOCKING: Wait until ${PROJECT_DIR}/output/<case-slug>/04-preview/approval.md explicitly contains - Status: APPROVED.
CHECKPOINT:
## Step 4 Complete
- [x] Preview artifacts generated
- [x] `approval.md` present
- [x] Heavy-lane preview approved
- [ ] Next: BLOCKING - wait for user / reviewer approval
Step 5: Matching Ready For Handoff
GATE: Step 4 complete; approval.md is explicitly approved.
EXECUTION:
- Reconfirm that the approved storyboard, preview, and match manifest all describe the same scene plan.
- Hand off to heavy-lane copy or implementation without changing scene semantics.
CHECKPOINT:
## Step 5 Complete - Matching ready
- [x] Approved storyboard contract locked
- [x] Approved preview gate satisfied
- [x] Downstream heavy-lane work may begin