headless-userflow-slice-test
Universal headless end-to-end user-flow and slice-by-slice persistence verification standard. Mandates programmatic, headless multi-actor script execution…
от hemanth17r★ 33 звезды на GitHub
Установить headless-userflow-slice-test в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Universal Headless User-Flow & Slice Verification Standard
1. The Core Law: Slice-by-Slice Live Verification Over Mock Illusions
- Build compilation and TypeScript checks only prove syntax and type contracts—they NEVER prove that database triggers, generated columns, foreign keys, or Row Level Security (RLS) policies work at runtime.
- In-memory mock tests pass 100% on broken PostgreSQL triggers, missing schema search paths, GoTrue auth scanner scan crashes, and cross-tenant RLS leaks because mocks bypass the real database engine.
- Manual browser UI clicking is 20x slower, non-deterministic, and cannot easily verify low-level database constraints or multi-tenant boundaries.
- The Ground-Truth Mandate: Whenever user flows or state-bearing transactional pipelines are added or modified, they MUST be verified slice-by-slice via headless programmatic test scripts executing against the real database and real server actions/RPCs.
2. Mandatory Trigger Threshold (Signal-to-Noise Filter)
To prevent developer drag and avoid running heavy verification on trivial changes, this protocol enforces a strict binary trigger threshold:
EXEMPT (Zero Live Slice Test Required)
- Visual & UI Polish: Pure styling, CSS, Tailwind utility classes, typography, optical centering, padding/margins, animations.
- Microcopy & Presentation: Static text, spelling, marketing copy, label adjustments, button icons.
- Isolated Pure Utilities: Formatting functions (dates, currencies, string truncation, pure math) covered by fast
<50msunit tests. - Internal Component Refactors: Code reorganizations that do not change what data is transmitted across the network or persisted to the database.
MANDATORY TRIGGER (Must Execute Headless Slice-by-Slice Verification)
- User Flow Additions, Modifications, or Deletions: Adding, altering, or removing steps in an end-to-end workflow (e.g., onboarding, catalog stocking, cart checkout, multi-store splitting, fulfillment pipeline, counter collection, admin governance).
- Database Triggers, Stored Functions & Auth Hooks: Writing or updating PostgreSQL triggers (e.g.,
handle_new_user), database RPCs, or authentication lifecycle handlers. - Multi-Actor & Cross-Tenant State Pipelines: Workflows where two or more distinct personas interact with shared data (e.g., Customer $\rightarrow$ Merchant 1 $\rightarrow$ Merchant 2 $\rightarrow$ Counter Staff $\rightarrow$ Admin).
- Row Level Security (RLS) & Authorization Changes: Altering database access policies, tenant isolation rules, or role-based permission checks.
3. The 4-Step Slice-by-Slice Protocol
Never test the entire platform in one monolithic script. Decompose the user flow into sequential, single-responsibility slices:
Slice 1: Merchant Stocking ──► Slice 2: Customer Discovery ──► Slice 3: Split Checkout ──► Slice 4: Fulfillment ──► Slice 5: Till Handover
[PASS & FREEZE] [PASS & FREEZE] [PASS & FREEZE] [PASS & FREEZE] [PASS & FREEZE]
Step 1: Slice Inventory & Sequencing
Identify every distinct actor and state transition in the user journey. Number them sequentially from entrypoint to settlement (e.g., Slice 1: Merchant Onboarding, Slice 2: Shelf Stocking, Slice 3: Discovery, Slice 4: Split Checkout, Slice 5: Store Fulfillment, Slice 6: Till Handover, Slice 7: Admin Governance).
Step 2: Write Headless Test Script (scratch/test_sliceX.mjs)
Create a deterministic Node.js test script using the project's actual database client (e.g. @supabase/supabase-js) executing against real credentials:
- Seed realistic pilot data (never random meaningless strings).
- Authenticate as the specific actor (Customer, Merchant A, Merchant B, Admin).
- Execute the exact Server Action, API endpoint, or database RPC.
Step 3: Assert the 3 Non-Negotiable Live Invariants
- Source-to-Sink Column Preservation: Query the persisted database row directly. Assert every single column sent from the user action exists, has the expected data type, and has zero dropped fields or
NULLcorruptions. - Cross-Tenant RLS & Security Isolation: Execute a malicious or out-of-tenant query (e.g., Merchant A attempts to mutate or read Merchant B's order). Assert the database returns zero rows affected or permission denied.
- Mathematical & State Orthogonality Invariant: Assert child subtotals strictly equal parent grand totals, and state changes (e.g. Out of Stock toggle) do NOT purge or corrupt the underlying shelf inventory.
Step 4: Strict Zero Speculative Edits & Slice Freezing
- If a slice fails (e.g., Postgres trigger error, scanner crash, RLS denial):
- Halt immediately. Never proceed to the next slice.
- Diagnose the exact runtime database error log.
- Apply the minimal surgical fix.
- Re-run
test_sliceX.mjsuntil 100% pass rate is achieved. - Only once a slice passes 100% is it frozen and the agent a
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл headless-userflow-slice-test?
Universal headless end-to-end user-flow and slice-by-slice persistence verification standard. Mandates programmatic, headless multi-actor script execution against real database endpoints whenever user flows, transaction boundaries, or cross-actor state pipelines are added, modified, or removed. Enforces a strict trigger threshold to exempt small fixes, styling, or isolated utilities while catching database RLS breaches, trigger failures, auth scanner bugs, and multi-tenant isolation leaks. Trigger when adding, altering, or removing user flows, multi-store transactions, fulfillment pipelines, counter verifications, or when asked to "test user flows", "slice test", "verify user journey", "headless e2e", "e2e slice verification", or "test flows sequentially".
Как установить скилл headless-userflow-slice-test?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл headless-userflow-slice-test запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…