brometal AGENTS.md

A project guide for coding agents working on BroMetal, a software library for writing GPU shader programs, plus its website.

In plain words
What is it for?
Use it when changing BroMetal's compiler, runtime, shader functions, geometry tools, tests, or website examples.
Why use it?
It gives agents the repository layout, important package boundaries, and the commands used to test, type-check, build, and run the website.

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/ericdrowell/brometal/agents-md
Clone the repo
git clone --depth 1 https://github.com/ericdrowell/brometal

Made for: Codex, OpenCode.

Per session 953 This file is loaded in full into every session.
When invoked 953 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.00953 $0.00953
Opus 5 $0.00477 $0.00477
Sonnet 5 $0.00191 $0.00191
Haiku 4.5 $0.00095 $0.00095

Measured 2d ago against content hash d89d2918413b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

brometal 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 2d ago.

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 · 85 lines

How it starts

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

BroMetal — notes for coding agents working on this repo

If you are writing an app that uses BroMetal, read packages/brometal/AGENTS.md instead — it covers the DSL rules and the failure modes. This file is about the codebase itself.

Layout

packages/brometal/     the library: compiler, runtimes, shader-function library
  src/compiler/        parse → analyze → ir → optimize → emit-glsl / emit-wgsl
  src/runtime/         context, program, uniforms, texture, render-target, loop
  src/dsl/             the types and builtin stubs the DSL is written against
  src/shader-functions/  library-source.ts (GPU source) + index.ts (typed decls)
  src/geometries/      parametric mesh generators
  tests/               vitest, no browser
packages/website/      Next.js site (brometal.dev): home, examples, SEO routes
  src/shaders/         *.shader.ts + generated *.shader.gen.ts
  src/demos/           one client component per example

Commands

npm test                       # vitest, from the repo root
npm run typecheck              # both packages
npm run build                  # build the library (writes packages/brometal/dist)
npm run dev:website            # site on :3005

# inside packages/website
npm run shaders                # compile *.shader.ts with the LOCAL compiler

Use npm run shaders, not npx brometal. The website has a brometal-published dependency (the released package, used to verify prod builds), and npx brometal resolves to that — so your local compiler changes appear to do nothing. npm run shaders points at ../brometal/dist.

Rebuild the library before recompiling website shaders. The CLI runs from dist, so a change to src/compiler needs npm run build first.

Adding a shader function

Two files, kept in step:

  1. src/shader-functions/library-source.ts — the GPU source, as a string, with a deps array naming any other library functions it calls. Dependencies are pulled in automatically and tree-shaken if unused.
  2. src/shader-functions/index.ts — the typed declaration plus a gpuOnly(...) body, so calling it on the CPU throws with a useful message.

Read the full file on GitHub · 85 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. 2d ago First seen · 85 lines · 953 tokens per session scan A d89d2918413b

Subscribe to this mod's changes

brometal AGENTS.md is an instructions file published in the GitHub repository ericdrowell/brometal (104 stars, last pushed 16d ago), licensed MIT. It adds 953 tokens to every session, about $0.0048 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.

Related

Other instructions, from other repositories