agentleFS
warper-orgwarper-org/warper/copilot-instructions.md

warper

Copilot instructions310 starsChanged 10 months agoMITView on GitHub

You are building Warper, a next-generation open-source React virtualization library designed to outperform every existing solution like react-window, react-virtualized, react-virtuoso, etc., by 1 million times in responsiveness and rendering power.

  • Installs packages

We split this copilot-instructions.md into the rules it gives an agent

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use ResizeObserver for dynamic measurement

    line 26
  2. Very specific:

    Use transform: translate3d() with will-change hints

    line 32
  3. Distinctive:

    Avoid layout thrashing and ensure consistent 60–120fps

    line 33
  4. Very specific:

    Use Rust with wasm-bindgen and compile core layout/scroll calculations

    line 38
  5. Distinctive:

    No manual overscan, batch size, height estimates

    line 60
  6. Distinctive:

    All layouts share core engine with only config differences

    line 102
  7. Distinctive:

    Use comparative insights from these sources:

    line 194
  8. Very specific:

    Create useVirtualizer and <WarperComponent />

    line 212
  9. Distinctive:

    Create examples and benchmarks

    line 214
  10. Distinctive:

    Follow ultra-performance best practices

    line 217

≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

🔮 MASTER PROMPT: Build Warper – The Fastest React Virtualization Library Ever Created

You are building Warper, a next-generation open-source React virtualization library designed to outperform every existing solution like react-window, react-virtualized, react-virtuoso, etc., by 1 million times in responsiveness and rendering power.


💥 Goals

  • World’s fastest React virtualization engine
  • WebAssembly-backed performance (Rust preferred)
  • GPU-accelerated, smooth FPS (60–120fps)
  • Handles 1M+ rows with sub-10ms render
  • Cross-platform, cross-browser compatibility
  • Built-in SSR + SEO support
  • 100% TypeScript, highly developer-friendly
  • Works out of the box with zero config
  • Core library size ~6KB gzipped (19.1kB minified, tree-shakable)

🧠 Core Performance Architecture

  1. Hybrid Windowing Engine

    • Support both fixed and variable item sizes
    • Use ResizeObserver for dynamic measurement
    • Pre-compute ranges in WebAssembly for speed
    • Binary search logic and virtualization offset logic handled in WASM
  2. GPU-Accelerated Scrolling

    • Use transform: translate3d() with will-change hints
    • Avoid layout thrashing and ensure consistent 60–120fps
    • Polyfill fallback for non-GPU-supported contexts
  3. WebAssembly Integration (Rust Preferred)

    • Use Rust with wasm-bindgen and compile core layout/scroll calculations
    • WASM runs layout, binary search, scroll math
    • React fetches pre-computed result and renders
  4. Intelligent Memoization

    • Smart React.memo / useMemo with invalidation based on deep equality checks
    • Cache row measurements, visible ranges, scroll positions
    • Skip re-renders for unmodified rows on scroll/data mutation
  5. Scroll Performance Target

    • Render range adapts in real time to scroll speed
    • Overscan dynamically increases on fast scrolls
    • Drop animation frames only when absolutely necessary

🛠️ Developer Experience

  1. Zero Config Autotuning

    • No manual overscan, batch size, height estimates
    • Autodetect system resources, scroll velocity, and set optimal defaults
  2. Modern Declarative API with TypeScript

    • Hook-based core:

      const { items } = useVirtualizer({
        data: bigList,
        estimateSize: () => 44,
        overscan: 2
      });
    • Also provide <WarperComponent /> alternative:

      <WarperComponent
        data={bigList}
        estimateSize={() => 44}
        overscan={2}
        renderItem={(item) => <Row item={item} />}
      />
  3. Visual Debug Tools

    • Dev-only overlay with:

      • Real-time render window
      • Scroll velocity
      • Dropped frames
      • Memory footprint
      • Virtual vs physical node count

⚙️ Advanced Features

  1. Seamless Layout Modes

    • List, Grid, Masonry, Horizontal, Infinite Scroll, and Combo Layouts
    • All layouts share core engine with only config differences
  2. Built-in Async Support

    • Infinite scroll with onEndReached
    • Scroll position restoration with restoreScrollPosition
    • Async placeholder rows and skeletons
  3. Multi-Select and Navigation

    • Built-in multi-select handling (Shift+Click, Ctrl+Click)
    • Keyboard navigation (arrow keys, home/end)
  4. Accessibility First

    • ARIA roles out-of-the-box (list, listitem, gridcell, etc.)
    • Full keyboard support
    • Screen reader optimizations for only visible nodes

🌐 Ecosystem + Extensibility

  1. Framework-Agnostic Core

    • Pure WASM + TS virtualization logic, wrapped with React hooks/component
    • Future bindings for Vue/Svelte/Vanilla
  2. Plugin System

    • Allow registering:

      • Scroll containers
      • Radial/canvas layouts
      • Animation interpolators
  3. SSR/SEO Ready

    • First N items rendered at server
    • Hydrate and replace at client
    • Placeholder fallback until hydration

📦 File Structure (Organized but Simple)

warper/
├── core/                  # Core WASM-backed virtualization logic
│   └── virtualization.ts  # Pure logic in TS or Rust/WASM bind
├── react/
│   ├── hooks/             # useVirtualizer.ts
│   ├── components/        # WarperComponent.tsx
│   └── devtools/          # Debug overlay
├── wasm/
│   └── rust/              # Rust source for wasm-pack
├── examples/              # Demo: list, grid, 1M rows, masonry
├── types/                 # Shared TS types
├── benchmarks/            # Comparisons to react-window, virtualized
└── index.ts               # Entry point

🎯 Optimization Benchmarks

MetricTarget
Scroll FPS60–120 fps
Initial Render (10k rows)< 10ms
Bundle Size~6KB gzipped (19.1kB minified)
Memory Usage40% less than react-virtualized
Items Rendered1M+ handled with no lag or crash
Comparative Benchmarks2× faster than react-window under load

📚 Include in README.md

  • What is Warper?
  • Performance Benchmarks (GIFs + stats)
  • Installation: npm install warper
  • useVirtualizer API + WarperComponent
  • Layout Modes (list, grid, masonry)
  • SSR/SEO, accessibility, debug tools
  • VS react-window, react-virtualized, virtuoso tables
  • Plugin & Extensibility Guide

📎 References

Use comparative insights from these sources:


✅ Output Expectation

The AI should:

  • Generate the core engine in TS + WASM (Rust)
  • Create useVirtualizer and <WarperComponent />
  • Provide full TypeScript support
  • Create examples and benchmarks
  • Organize code per the structure
  • Include debug overlay and SSR strategy
  • Follow ultra-performance best practices

🤖 AI Assistance with Context7

For up-to-date documentation and code examples, use Context7 MCP in your AI coding assistant. Context7 provides real-time access to Warper's latest API reference, usage patterns, and best practices directly in your development workflow.

Download now (ZIP)

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.