Praxis Table Analytics Stats Runtime
Use this skill when table behavior is driven by governed analytics projections or stats endpoints.
Analytics tables are materializations of canonical x-ui.analytics projections. @praxisui/core resolves and builds analytics stats requests; @praxisui/table adapts the projection into TableConfig plus local rows. Do not invent dashboard-specific metric payloads in table consumers.
Source Audit
Inspect before editing:
projects/praxis-table/AGENTS.md
projects/praxis-table/src/lib/analytics/analytics-table.model.ts
projects/praxis-table/src/lib/analytics/analytics-table-contract.service.ts
projects/praxis-table/src/lib/analytics/analytics-table-stats-api.service.ts
projects/praxis-table/src/lib/analytics/analytics-table-config-adapter.service.ts
projects/praxis-core/src/lib/services/analytics-presentation-resolver.service.ts
projects/praxis-core/src/lib/services/analytics-schema-contract.service.ts
projects/praxis-core/src/lib/services/analytics-stats-request-builder.service.ts
- focused analytics table and core analytics specs.
Inspect praxis-metadata-starter when the projection or stats endpoint contract changes.
Canonical Flow
- Load analytics schema from core
AnalyticsSchemaContractService.
- Find the projection by
projectionId.
- Resolve presentation with
AnalyticsPresentationResolver, preferring analytic-table.
- Build the stats execution plan with core
AnalyticsStatsRequestBuilderService.
- Apply normalized table
queryContext.filters to the stats request.
- Execute stats API and project buckets/points into
AnalyticsTableRow[].
- Adapt projection into a local-mode
TableConfig with pagination/sorting client strategies.
- Fall back to declared fallback projection/rows with an explicit source/error when remote analytics fails.
Analytics Rules
- The projection must publish a primary dimension and at least one metric.
- Ambiguous projections should fall back to
analytic-table only when the resolver says so; do not force charts or tables from label matching.
- Time-series, group-by, and distribution responses must map through the stats API adapter; do not create per-dashboard response parsers.
- Query filters must come from
PraxisDataQueryContext, not bespoke dashboard filter objects.
- Fallback rows are operational fallback evidence; they are not the canonical source of analytics semantics.
- Keep analytics table config local-mode, with client pagination/sorting, disabled row/bulk actions unless a governed action is explicitly modeled.
Aderence Inventory
Classify before adding analytics fields or services:
ja-suportado-so-ux: projection/stats data exists but the table/dashboard does not present source, error, or fallback clearly.
ja-suportado-mal-nomeado-ou-mal-materializado: dashboard payload should map to PraxisAnalyticsProjection, stats request, or AnalyticsTableViewModel.
suportado-parcialmente: projection can be resolved but request building, query context, row projection, fallback, docs, or consumer proof is incomplete.
lacuna-real-de-contrato: no analytics projection, stats operation, query context, or table view model can express the analytic decision.
Only real gaps justify backend/core analytics contract changes.
Validation
Use focused proof:
analytics-table-contract.service.spec.ts
analytics-table-stats-api.service.spec.ts
analytics-table-config-adapter.service.spec.ts
- core analytics resolver/schema/request builder specs when projection semantics change.
- dashboard or host smoke when the analytics table is user-visible.
For first-step issue resolution, audit: projection id, resolved family/reason, stats path/request, queryContext filters, row mapping, fallback source/error, generated TableConfig, and empty/loading/error presentation.
Companion Skills
- Use
praxis-table-runtime-data for table rendering and local data behavior.
- Use
praxis-dashboard-analytics when a dashboard consumes the table view model.
- Use
praxis-core-resource-runtime for core analytics projection and request contracts.
- Use
praxis-angular-public-api-governance if analytics exports change.
1---2name: praxis-table-analytics-stats-runtime3description: "Use when Codex must implement, audit, or debug @praxisui/table analytics table runtime: analytics projections, analytic-table family resolution, AnalyticsTableContractService, AnalyticsTableStatsApiService, AnalyticsTableConfigAdapterService, stats request builders, queryContext filters, fallback rows, dashboard table views, or analytics diagnostics."4metadata:5 source: https://skillmd.com/skills/codexrodrigues/praxis-table-analytics-stats-runtime6---78# Praxis Table Analytics Stats Runtime910Use this skill when table behavior is driven by governed analytics projections or stats endpoints.1112Analytics tables are materializations of canonical `x-ui.analytics` projections. `@praxisui/core` resolves and builds analytics stats requests; `@praxisui/table` adapts the projection into `TableConfig` plus local rows. Do not invent dashboard-specific metric payloads in table consumers.1314## Source Audit1516Inspect before editing:1718- `projects/praxis-table/AGENTS.md`19- `projects/praxis-table/src/lib/analytics/analytics-table.model.ts`20- `projects/praxis-table/src/lib/analytics/analytics-table-contract.service.ts`21- `projects/praxis-table/src/lib/analytics/analytics-table-stats-api.service.ts`22- `projects/praxis-table/src/lib/analytics/analytics-table-config-adapter.service.ts`23- `projects/praxis-core/src/lib/services/analytics-presentation-resolver.service.ts`24- `projects/praxis-core/src/lib/services/analytics-schema-contract.service.ts`25- `projects/praxis-core/src/lib/services/analytics-stats-request-builder.service.ts`26- focused analytics table and core analytics specs.2728Inspect `praxis-metadata-starter` when the projection or stats endpoint contract changes.2930## Canonical Flow31321. Load analytics schema from core `AnalyticsSchemaContractService`.332. Find the projection by `projectionId`.343. Resolve presentation with `AnalyticsPresentationResolver`, preferring `analytic-table`.354. Build the stats execution plan with core `AnalyticsStatsRequestBuilderService`.365. Apply normalized table `queryContext.filters` to the stats request.376. Execute stats API and project buckets/points into `AnalyticsTableRow[]`.387. Adapt projection into a local-mode `TableConfig` with pagination/sorting client strategies.398. Fall back to declared fallback projection/rows with an explicit source/error when remote analytics fails.4041## Analytics Rules4243- The projection must publish a primary dimension and at least one metric.44- Ambiguous projections should fall back to `analytic-table` only when the resolver says so; do not force charts or tables from label matching.45- Time-series, group-by, and distribution responses must map through the stats API adapter; do not create per-dashboard response parsers.46- Query filters must come from `PraxisDataQueryContext`, not bespoke dashboard filter objects.47- Fallback rows are operational fallback evidence; they are not the canonical source of analytics semantics.48- Keep analytics table config local-mode, with client pagination/sorting, disabled row/bulk actions unless a governed action is explicitly modeled.4950## Aderence Inventory5152Classify before adding analytics fields or services:5354- `ja-suportado-so-ux`: projection/stats data exists but the table/dashboard does not present source, error, or fallback clearly.55- `ja-suportado-mal-nomeado-ou-mal-materializado`: dashboard payload should map to `PraxisAnalyticsProjection`, stats request, or `AnalyticsTableViewModel`.56- `suportado-parcialmente`: projection can be resolved but request building, query context, row projection, fallback, docs, or consumer proof is incomplete.57- `lacuna-real-de-contrato`: no analytics projection, stats operation, query context, or table view model can express the analytic decision.5859Only real gaps justify backend/core analytics contract changes.6061## Validation6263Use focused proof:6465- `analytics-table-contract.service.spec.ts`66- `analytics-table-stats-api.service.spec.ts`67- `analytics-table-config-adapter.service.spec.ts`68- core analytics resolver/schema/request builder specs when projection semantics change.69- dashboard or host smoke when the analytics table is user-visible.7071For first-step issue resolution, audit: projection id, resolved family/reason, stats path/request, queryContext filters, row mapping, fallback source/error, generated `TableConfig`, and empty/loading/error presentation.7273## Companion Skills7475- Use `praxis-table-runtime-data` for table rendering and local data behavior.76- Use `praxis-dashboard-analytics` when a dashboard consumes the table view model.77- Use `praxis-core-resource-runtime` for core analytics projection and request contracts.78- Use `praxis-angular-public-api-governance` if analytics exports change.