slate-ar-perf

Runs measured optimization loops for Slate v2 performance targets with benchmark registries and correctness gates.

16.5k|997|Updated Dec 2, 2019
One-click install
npx skills add https://github.com/udecode/plate --skill slate-ar-perf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slate-ar-perf
Source: https://github.com/udecode/plate/tree/main/.agents/skills/slate-ar-perf
Command: npx skills add https://github.com/udecode/plate --skill slate-ar-perf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimizing a rich-text editor's performance often devolves into guesswork and unverified claims. This Skill turns Slate v2 performance work into a measured loop: it manages a target registry of benchmarks, enforces correctness gates so speed wins never break editor behavior, and defines stop rules so optimization continues until parity, plateau, or a real blocker.

Core Features & Use Cases

  • Target Registry Management: Lists, checks, reports on, and dry-runs benchmark targets defined in benchmarks/targets/slate-v2.json, and bootstraps new first-class targets when a specific target id is missing.
  • Fastest-Safe Optimization Loop: Delegates packet execution to the Slate Autoresearch state machine while applying perf policy, stopping only at target parity, a three-packet plateau under 5% gain, or a correctness/architecture blocker.
  • Exactness Gates and Default Contracts: Ships ready-made contracts for pagination/virtualization and huge-document select-all, including cohorts, primary metrics like typing p95 latency, and correctness checks for selection, IME, copy/paste, and undo.
  • Use Case: A developer asks to make virtualized pagination fastest for an 800-row document. The Skill dry-runs the pagination target, runs benchmark packets printing METRIC lines, discards any packet that breaks selection or typing order, and reports baseline, best, and next recommended packet.

Quick Start

Ask the agent to make the Slate v2 pagination route fastest using the virtualized strategy with 800 rows and report the benchmark results.

Frequently Asked Questions about slate-ar-perf

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

FAQPage Schema
How do I optimize Slate editor performance with benchmarks?

Define or pick a target in benchmarks/targets/slate-v2.json, dry-run it with pnpm bench:targets:dry-run, then run optimization packets through the Autoresearch loop. Each packet must print METRIC lines and pass correctness checks before being kept.

How do I benchmark pagination and virtualization in a rich-text editor?

Use the pagination default contract: test small, table-large, and stress cohorts on the virtualized route, measuring typing p95 latency, initial interactive time, strategy switch latency, and scroll recovery. Verify no dropped characters and preserved selection behavior.

What happens if a performance optimization breaks editor correctness?

Any packet that improves speed but breaks selection, input ordering, IME, copy, paste, undo, focus, or follow-up typing is logged as checks_failed or discarded, never kept. Performance wins do not count when the editor is less correct.

When should I not use this performance optimization skill?

Avoid it for pure correctness bugs, which belong in a direct fix workflow, and for vague targets without an inferable benchmark, which need target discovery or architecture planning first. It also does not apply to Plate product code, only raw Slate v2.

When does the fastest-safe optimization loop stop?

The loop stops at target parity, a plateau of three consecutive correctness-green packets with under 5% improvement and no safe profiler hypothesis left, a correctness or architecture blocker, an unsafe dirty-tree boundary, or user interruption.