data-sanity

Solid

Layer C of spectra pre-handoff quality gates. Static audit for the data-shape failure class where a client query param literal violates the server zod schema bound (e.g. perPage: 200 vs max(100)) → silent 4xx → lookup map empties → admin list column collapses to a uniform fallback. Use during /spectra-apply Design Review and before /spectra-archive, or ad-hoc on any change that touches paginated queries + lookup-resolved columns.

Data & Documents 45 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
55
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

<!-- 🔒 LOCKED — managed by clade · auto-generated by sync-to-agents; edit source in .claude/ then re-run sync --> `/data-sanity` — Layer C static data-shape audit. Born from perno `app-status-badge-extraction`(2026-05-24): `attendance/amendments.vue` 用 `useEmployeeListQuery({ perPage: 200 })`,但 server schema 是 `perPage: z....max(100)` → API 400 → `employeeNameMap` empty → 員工 column 整列「-」。typecheck / lint / design review / verify:ui 全沒抓到,因為它是**資料形狀**問題,不是型別或視覺問題。 這是 clade 自有 skill(**不是** `/impeccable` 的 sub-command — impeccable 是第三方 npx-managed skill,clade 不擁有)。 ## 何時跑 - **`/spectra-apply` Section 7 Design Review 期間**:對本 change 觸及的 paginated query + lookup-resolved column 跑一次。 - **`/spectra-archive` Step 0 之前**:archive gate 的 data-shape 防線。 - **Ad-hoc**:任何改到 `useXxxQuery({ <param>: <literal> })` 或 lookup map 的工作。 ## 怎麼跑 從 clade central 呼叫(`<clade-vendor>` = `~/offline/clade/vendor`,與其他 vendor script 同慣例): ```bash node <clade-vendor>/scripts/audit-data-sanity.mjs \ --consumer-path . \ [--files <comma-separated-touched-files>] \ --json ``` - 不給 `--files` → walk 整個 consumer(skip node_modules/.nuxt/dist)。 - 給 `--files` → 只掃指定檔(spectra-apply 時傳本 phase touched files 較快)。 ## 偵測項 1. **PARAM_BOUNDARY(Critical — blocks archive)**:client 端 pagination-ish param literal(`perPage` / `per_page` / `pageSize` / `limit` / `take` / `first` / `count` / `top` / `size`)超過(max)或低於(min)同名 server zod bound(`.max(N)` / `.min(N)` / `.length(N)`)。對應 UI-INV-2(lookup-resolved column 解析率 1...

Details

Author
YuDefine
Repository
YuDefine/nuxt-supabase-starter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

spectra-audit

Audit changed code for security sharp edges — dangerous defaults, type confusion, and silent failures

29 Updated today
PsychQuant
API & Backend Listed

rls-performance

Postgres + Supabase RLS 效能診斷與優化手冊。Use when 寫/改 RLS policy、 跑 EXPLAIN ANALYZE、排查 PGRST003 pool timeout、設計 index、 優化 pagination、使用者抱怨 API 變慢、或需要診斷 connection pool 問題時。涵蓋 pg_stat_activity 診斷、角色對照、self-hosted LXC 責任模型、效能基準與事故恢復 SOP。

45 Updated today
YuDefine
Web & Frontend Solid

review-readiness-scan

掃描 openspec/changes/ 各 change 的 manual-review 區塊,判斷哪些已 ready for 人工檢查、哪些被 Pre-Review Data Readiness pattern 命中(alert)尚未 ready,並把結果登記到 HANDOFF.md。Use when 使用者說「掃 review readiness」「review:ui 哪些 ready」「scan manual review alerts」「批次人工檢查前先看哪些 ready」「找出 review:ui 的 alert」。不適用於單一 change 內逐項 review(那走 `pnpm review` GUI,從 clade home 跑)。

45 Updated today
YuDefine
Web & Frontend Listed

design-retro

分析 docs/design-review-findings.md 歷史,識別跨 spec 的重複 UI 問題模式,提出流程改善建議。spectra-archive 完成或 findings 累積 5 倍數時主動觸發。

45 Updated today
YuDefine
AI & Automation Listed

audit

检修。运行时探索 + 代码深审 + 漂移扫描,用户说"审查/检修/audit/review/扫描"时调用。

22 Updated today
averatec0773