# Cross-Layer Thinking Guide Use for changes crossing data, authority or state boundaries. Trace the affected path from input through transformation/storage to display or export. Identify consumers and the format, ownership, errors and invariants at each boundary. Do not require a diagram or new document when a short task note suffices. ## Validation And Round Trips Client validation helps the user; the server still enforces authentication, authorization and untrusted input. Mutable business facts may need rechecking under the transaction/lock that protects the write. Reuse pure validation rules where semantics agree, but never remove a trust-boundary check merely because another layer validated earlier. Check null/omitted/empty distinctions, dates/time zones, precision, serialization and error handling on affected consumers. Verify meaningful round trips and negative cases; test depth follows the changed contract, not a fixed layer count. The owning domain spec defines exact business behavior. ## Generated Runtime Inputs For generated files that are also parsed at runtime, identify readers as well as writers. Workflow tag/platform markers outside a managed block may affect phase routing even when the block itself updates correctly. In this installed project, use the pinned target CLI, preserve overlays and exercise the actual context/hook parsers; see [upgrade compatibility](../hyb-oa/project-governance.md#scenario-trellis-project-upgrade-compatibility). Only an authorized upstream-template task should modify other platform copies or test upstream init/update generation with older pristine fixtures. Do not assume this repository contains `src/templates` or enable other platforms. ## Probe-Dependent Modes When a mode depends on an external probe, check normal, non-interactive and shortcut paths. Distinguish missing resources from transient failures; fail clearly or retry within the authorized budget, never silently switch modes after a timeout or transport error. Preserve that error quality in downstream helpers and reset cached state when the source changes. Parse complete metadata or use a real streaming parser; a fixed-length prefix is not a complete JSON document. For reconstructed identifiers, preserve all fields and their ordering (such as path before fragment). Exercise a large metadata response and failure/shortcut cases only when those mechanisms are part of the change. Do not contact real external systems merely to read this guide.