| name | layout-content-view |
| description | Audit web layout-content-view stability: landmark/sitemap graph, named viewports, overflow/clip/ellipsis on must-show data, z-index and scroll quirks. Survives redesigns because it measures boxes and roles, not pixels. Use when /layout-content-view, visual coherence, overflow, clip, ellipse cut, sitemap graph, agent-crawlable layout, or viewport distortion. |
layout-content-view
Load rule: This file owns when + steps. Ontology: references/ontology.md. Predicates: references/predicates.md (executable SoT: scripts/lcv.mjs). Index graph: references/sitemap-graph.md. Interact: references/interact.md. Drive: references/harness.md. Pilot: references/pilot-devprofile.md. Do not paste pstack visual-parity. Do not add a second route catalog when a verify feature map exists.
// Signature
LCV : this skill — strategy only
Tree : Routes → Viewports → Orientation → Layouts → Containers → Elements → Interactives
View : named viewport × orientation × ui-state × one route
Graph : landmarks + flow + interact edges (not XML sitemap.xml)
Role ∈ { must-show, preview, live, interact }
Fail : must-show clipped | document overflow-x | missing landmarks | occlusion | scroll-trap | interact-unlinked
OK-info : preview inner overflow
Adapter : fills samples. Text min-content: Canvas measureText + wrap arithmetic (Pretext technique). Chrome/slot: one box read. Host: Playwright/Brave/CDP.
Not LCV : PNG pixel-diff (compose with verify-* if the repo has it)
// Axioms
A1 Stability ≔ graph reachable ∧ must-show unclipped — not paint match
A2 Document overflow-x is a fail; long-page overflow-y is not
A3 Clip ≔ overflow hidden/clip, ellipsis, or ancestor clip with no scrollport. overflow:auto is reachable
A4 Ellipse/line-clamp on must-show fails; on preview is allowed
A5 Named viewports only (phone-short 375×667, phone, tablet, desktop) — no unbounded matrix
A6 Reuse the project's verify feature map paths; never a second SURFACES[]
A7 Strategy does not name a browser. Adapters pick DOM, Playwright, cloud browsers, or native SDKs
A8 Interactive controls declare from / success / fail / interrupted in HTML so the machine is static
A9 Verify the seven-layer tree (ontology.md). Adapters fill nodes. Strategy does not dump the live DOM
When to use
Overflow, clip, z-index, scroll traps, “looks messy at this width”, agent-crawlable IA, or a redesign that should not invalidate the stability contract.
Skip: pixel-exact migration (pstack visual-parity + existing snapshots). Phrase-level copy tests. Native adapters are not shipped yet. The strategy still applies. Implementer marks: skill lcv-implement (/lcv-implement). This skill does not write data-lcv.
Steps
- Graph. Load verify
features/*.md path: if present; else list app routes. Walk landmarks (main, one h1, navigation or skip link). Marks: data-lcv, data-lcv-event / data-lcv-to-* (references/interact.md).
- Layout-mode. Named viewports plus orientation from size. Walk named
data-lcv-states (profile slide:*) at those viewports. Not every CSS breakpoint.
- Measure. Adapter fills the tree. Text: prepare glyph widths with the font engine (
Canvas.measureText), then layout(width, lineHeight) as arithmetic — same split as Pretext (prepare / layout). Do not getBoundingClientRect per word. Slot remaining still uses one box read. Run indexTree / verifyTree / classify / report.
- Stress (must-show only). Inject a long string into one must-show node. Fail if the view stays put and the text is clipped (hidden/clip, ellipsis, ancestor clip with no scrollport). Wrap, grow, or
overflow:auto passes.
- One-shot fix. Apply one recipe from the finding
kind (predicates.md). Re-measure that path × viewport. Do not auto-delete every line-clamp in the repo.
- Compose. UX/pixel skills stay owners of visitor drive and PNG baselines. This skill never claims visual parity.
Done when
Do not
- Treat PNG snapshots as this algorithm
- Generate
sitemap.xml as layout SoT
- Unbounded viewport × content fuzz
- Vendor pstack; inline control-graph / EVA
- Reuse print-CV clamp policy (
cv-layout-policy) for live web
- Kill document overflow by
overflow:hidden on html/body