web-worker-patterns AGENTS.md

A guide for AI coding assistants working on the web-worker-patterns project. It points them to the main architecture, workflow, and review documents, and records that the project currently has one theme and one language.

In plain words
What is it for?
Use it when an AI assistant starts or changes work in this repository. It explains where domain logic, Workers, application state, and translations belong, and which project documents to read first.
Why use it?
It keeps different coding assistants aligned with the same rules. In particular, it prevents shared domain code from depending on visual themes and lists the checks required before completing a change.

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/damiansire/web-worker-patterns/agents-md
Clone the repo
git clone --depth 1 https://github.com/damiansire/web-worker-patterns

Made for: Codex, OpenCode.

Per session 643 This file is loaded in full into every session.
When invoked 643 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.00643 $0.00643
Opus 5 $0.00321 $0.00321
Sonnet 5 $0.00129 $0.00129
Haiku 4.5 $0.00064 $0.00064

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

Security

Grade A, and why

web-worker-patterns 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 · 51 lines

How it starts

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

AGENTS.md

Guía para cualquier asistente de IA o editor (Claude Code, Cursor, GitHub Copilot, Codex, Zed, Gemini, Jules…). Este archivo es un puntero, no la fuente de verdad: las reglas se escriben una sola vez y acá solo se resumen para que ninguna herramienta las ignore.

Leé, en este orden:

  1. ARQUITECTURA-multi-theme.md — el diseño (fuente de verdad).
  2. CLAUDE.md — cómo trabajar (fases, convenciones de código).
  3. docs/AI-PROCESS.md — gates, loop de design-review, hooks.

Estado actual (uno y uno)

Hoy el repo corre con un solo theme (default, neutro) y un solo idioma (es). El motor de theming e i18n queda genérico: sumar themes/idiomas es agregar entradas al registry / a availableLangs, sin tocar el dominio. La identidad visual del theme default está por diseñarse. (Antes convivían 5 themes y 3 idiomas; se consolidó a uno de cada uno.)

La regla de oro (no negociable)

El dominio se escribe una vez. La presentación es un layer de theme intercambiable.

  • Todo lo neutral (workers reales, registry de ejemplos, estado de hilos, i18n) vive en core/ y no conoce los themes.
  • core/ NUNCA importa nada de themes/. La dependencia va en un solo sentido.
  • La lógica de Web Workers vive en core/domain/workers/, nunca dentro de un theme.

Gates antes de cerrar cualquier cambio

npm run format:check       # Prettier; `npm run format` arregla
npm run build              # 0 errores, 0 warnings nuevos
npm test                   # Vitest
npm run lint:boundaries    # hace cumplir la regla de oro; se auto-verifica

Estos gates se aplican igual sin importar tu IDE/IA: hay un git pre-commit (.githooks/, se activa con npm run setup) y CI (.github/workflows/ci.yml) que los corren. No dependen de que tu editor tenga hooks. Si trabajás en otro harness, esa es la red que te cubre.

Atajos opcionales por herramienta (feedback temprano, no reemplazan los gates)

  • Claude Code: hooks en scripts/hooks/; registro en .claude/settings.hooks.sample.json.
  • Cursor: .cursor/rules/.
  • GitHub Copilot: .github/copilot-instructions.md.
  • Google Antigravity: lee este AGENTS.md; además hay regla nativa en .agents/rules/.

Read the full file on GitHub · 51 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 · 51 lines · 643 tokens per session scan A dfd54ad6ba17

Subscribe to this mod's changes

web-worker-patterns AGENTS.md is an instructions file published in the GitHub repository damiansire/web-worker-patterns (175 stars, last pushed 16d ago), licensed MIT. It adds 643 tokens to every session, about $0.0032 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.