eng-data-boundaries

Audit data boundaries across route loaders, TanStack Query caches, paginated catalogs, and live streams.

2.7k|171|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/compozy/compozy --skill eng-data-boundaries
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: eng-data-boundaries
Source: https://github.com/compozy/compozy/tree/main/.agents/skills/eng/eng-data-boundaries
Command: npx skills add https://github.com/compozy/compozy --skill eng-data-boundaries

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Frontend and backend changes to lists, metrics, filters, and live streams often silently lose scope, ordering, totals, or stream continuity at some layer, producing bugs like wrong counts, duplicated pages, or cross-workspace leaks. This Skill provides a structured audit procedure that traces every read model from store to view and proves each invariant with targeted tests.

Core Features & Use Cases

  • Boundary Mapping: Declare the authoritative owner, scope, population, ordering, and lifecycle for every changed list, metric, detail read, or stream before implementation.
  • Contract Enforcement: Apply catalog and live-cache contracts covering cursor identity, exact totals, cache key factories, merge semantics, fences, and reconnect behavior.
  • Test Matrix Selection: Pick only the falsifying test cases matching the changed contract and place them at the lowest owning layer.
  • Use Case: When adding a paginated, filterable session catalog with SSE updates to the Compozy web app, use this Skill to verify that filters apply before the page cut, totals come from the full population, and reconnects resume from a cache-owned cursor.

Quick Start

Audit the new sessions list endpoint and its TanStack Query cache for scope, ordering, totals, and live-stream continuity using the data-boundaries procedure.

Frequently Asked Questions about eng-data-boundaries

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a paginated list for data-boundary bugs?

Complete a boundary map naming the owner, scope, population, order, and completeness of the read model, then trace it from route loader through query key, adapter, transport, service, and store. Repair the first boundary that drops or guesses truth before changing downstream code.

How should TanStack Query handle paginated data with SSE updates?

Keep one canonical cache entry per server read model using a shared option and key factory, storing pages as InfiniteData of the full envelope. Merge live deltas by stable domain identity, preserve historical pages, and reconnect from a cache-owned applied cursor rather than a component-local one.

When should I not use this data-boundary audit?

Skip it for presentational-only UI changes or backend work with no public read-model impact. The audit targets changes to lists, metrics, detail reads, filters, ordering, totals, and streams where scope or completeness can be lost.

Why does my cursor pagination break after filtering or mutation?

Cursors must be bound to normalized scope, stable filters, and ordering, with filters in the base query key and cursor only in the page parameter. Reusing a cursor across different filters or workspaces, or after mutations without stability guarantees, causes gaps, duplicates, or cross-scope leaks.

How do I test workspace isolation for cached queries and streams?

Seed overlapping IDs in two workspaces and require distinct store reads, transport results, cache keys, and SSE updates. The test matrix places scope isolation cases at the store, transport, and cache layers rather than only in browser tests.