gpuix AGENTS.md

Repository instructions for GPUIX, a user-interface layer built on GPUI, the Rust interface toolkit used by Zed. They explain the project architecture and require checking the underlying GPUI API before adding workarounds.

In plain words
What is it for?
Use them when changing GPUIX elements, events, styles, mutation handling, mouse capture, native behavior, or the test renderer.
Why use it?
They help prevent fixes that conflict with the underlying toolkit or break when its source is updated.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/remorses/gpuix/agents-md
Clone the repo
git clone --depth 1 https://github.com/remorses/gpuix

Made for: Codex, OpenCode.

Per session 16,062 This file is loaded in full into every session.
When invoked 16,062 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.16062 $0.16062
Opus 5 $0.08031 $0.08031
Sonnet 5 $0.03212 $0.03212
Haiku 4.5 $0.01606 $0.01606

Measured yesterday against content hash 40c371c72924, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gpuix AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 1,370 lines

How it starts

The opening of the file, as written. The whole thing — 1,370 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md - GPUIX Codebase Guide

Read README.md first to understand what GPUIX is, the architecture, mutation API, event flow, supported elements/events/styles, and the test renderer.

Not remorses? Do not open a pull request. Open an issue. See External contributors.

GPUIX is a thin layer on GPUI

Read the GPUI docs and the GPUI source before you write native code. zed/crates/gpui is checked out in this repository. gpui::ListState, gpui::div, gpui::Window and the rest are the real API; GPUIX only translates a React tree into calls on them.

Do not invent behaviour on top of GPUI. If a GPUIX element needs something GPUI does not do, the order is:

  1. Find the GPUI API that already does it. Search zed/crates/gpui for the symbol
  2. Search zed-industries/zed issues and PRs. Someone may have shipped it already
  3. Fix it in the remorses/zed fork as a normal GPUI change, and bump the submodule
  4. Only then, add GPUIX code

Never paper over GPUI in packages/native. A workaround that re-applies state after GPUI computed it, patches a value GPUI owns, or reaches around a GPUI invariant will break on the next submodule bump and is very hard to debug. When such a change is unavoidable, it must state in a comment what GPUI does, why that is not what GPUIX needs, and which GPUI call makes it safe.

Prefer the smallest translation. Fewer moving parts is more important than matching any other framework's behaviour.

Project Goal

GPUIX enables building native GPU-accelerated desktop applications using React and TypeScript, powered by GPUI (Zed's rendering framework).

Instead of Electron/web rendering, your React components render directly to the GPU via Metal/Vulkan.

Mouse capture is armed by the press

A div with onMouseDown, onMouseMove, and onMouseUp keeps move and up after the pointer leaves the hitbox. GPUIX arms that automatically when the same node listens for down and move, using GPUI's window-level mouse listeners.

Read the full file on GitHub · 1,370 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 1,370 lines · 16,062 tokens per session scan A 40c371c72924

Subscribe to this mod's changes

gpuix AGENTS.md is an instructions file published in the GitHub repository remorses/gpuix (1,344 stars, last pushed 2d ago), licensed Apache-2.0. It adds 16,062 tokens to every session, about $0.0803 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.