name: moss-page-contract-tieout description: Use when implementing, reviewing, or closing a MOSS page contract, page-visible metric, endpoint DTO, loading/empty/stale/fallback state, or browser-visible business workflow.
MOSS Page Contract Tie-Out
Use this skill when a MOSS page must prove that what users see matches the governed page contract. It adapts statement/NAV tie-out patterns: the page is the thing under test; the contract and evidence are the source of truth.
Workflow
- Identify the page ID, route, primary business question, and required sections from
docs/page_contracts.mdormoss-metric-contracts. - List the endpoint DTOs, metric IDs, golden samples, and state requirements the page depends on.
- Verify each displayed metric:
- exists in the metric dictionary when it is formal
- preserves unit, precision, and date semantics
- exposes
result_metameaning where required - shows fallback, stale data, no data, and loading failure visibly
- Trace the page path:
route -> query/client -> adapter -> selector/view model -> component -> table/chart/card. - Fix only the current page or workflow unless evidence shows a shared layer is the root cause.
- Add focused tests for changed adapters, selectors, formatters, components, or API contracts.
- For visible UI changes, verify in the browser against the local app when the target route is known.
Do Not
- Do not hide fallback, stale, or fail-closed status in debug-only surfaces.
- Do not create new formal metrics from narrative text, labels, UI structure, or preview/vendor fields.
- Do not add frontend calculations that duplicate formal backend logic.
Completion Evidence
Final reporting should include the page/workflow fixed, root cause, changed files, checks run, and any residual contract gaps.