bunqueue AGENTS.md

Repository instructions for bunqueue, a TypeScript job queue for the Bun runtime, with application, domain, infrastructure, client, test, documentation, and SDK code.

In plain words
What is it for?
Working on job queues, workers, SQLite persistence, network clients, language SDKs, tests, and documentation in the bunqueue project.
Why use it?
They provide the project's structure and require review and validation checks, making it easier to find the right code and avoid unsafe changes.

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

Made for: Codex, OpenCode.

Per session 2,936 This file is loaded in full into every session.
When invoked 2,936 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.02936 $0.02936
Opus 5 $0.01468 $0.01468
Sonnet 5 $0.00587 $0.00587
Haiku 4.5 $0.00294 $0.00294

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

Security

Grade A, and why

bunqueue 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 · 257 lines

How it starts

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

AGENTS.md

This file applies to the entire repository unless a more specific AGENTS.md exists in a subdirectory.

Project overview

bunqueue is a high-performance job queue written in TypeScript for Bun. The server and embedded runtime are Bun-only. Persistence uses bun:sqlite; public clients may run in other runtimes through the network protocol.

Repository map

  • src/application/: queue orchestration and use-case logic.
  • src/domain/: jobs, shards, priority queues, counters, and limiters.
  • src/infrastructure/: SQLite persistence and transport adapters.
  • src/client/: public Queue/Worker APIs.
  • test/: Bun unit, integration, regression, and reproduction tests.
  • docs/: documentation site.
  • sdk/: language SDKs and conformance fixtures.

Working rules

  • Before every git commit and every git push, invoke the skeptic custom subagent and wait for its verdict. It must inspect the complete staged diff, identify at least three potential failure points per changed file, verify error handling, races, idempotency, type safety and test evidence, and run applicable checks. FAIL blocks the operation; CONDITIONAL requires the user's explicit confirmation. The project profiles live at .codex/agents/skeptic.toml and .claude/agents/skeptic.md.
  • When a bug is reported, first add a regression test that reproduces it. Only after the test fails for the expected reason, use subagents to investigate fixes and prove the chosen fix with the passing regression test.
  • Preserve user changes. Never run git reset, git checkout, git clean, or discard unrelated edits unless the user explicitly requests it.
  • Keep all repository content in English, including source comments, tests, internal documentation, user-facing documentation and agent configuration.
  • Keep changes narrowly scoped to the requested behavior. Do not refactor unrelated code while fixing a bug.
  • Use rg/rg --files for repository searches and apply_patch for manual source edits.
  • Runtime source is TypeScript ESM. Follow the existing 2-space, single-quote, semicolon style; Oxlint and Oxfmt are authoritative.
  • Keep hot queue paths synchronous while a shard lock is held. Do not introduce an await inside a synchronous critical section.
  • Maintain queue invariants together: heap membership, jobIndex, processing maps, counters, temporal indexes, group ownership, and concurrency slots must transition exactly once.
  • SQLite filtering, ordering, and pagination must happen in a consistent order. Use deterministic tie-breakers for paginated queries and add migrations for schema or index changes.
  • Do not silently change externally visible scheduling semantics. Add explicit regression coverage when priority, delay, FIFO-group, retry, or recovery behavior changes.
  • Keep source files at or below 300 lines. Give each file one responsibility and export only what is needed; split a file instead of growing it beyond that boundary.
  • Respect the lock hierarchy: jobIndex -> completedJobs -> shards[N] -> processingShards[N]. Read prerequisite state before acquiring the next lock and always release locks in finally.

Read the full file on GitHub · 257 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 · 257 lines · 2,936 tokens per session scan A fc5921d57b9e

Subscribe to this mod's changes

bunqueue AGENTS.md is an instructions file published in the GitHub repository egeominotti/bunqueue (544 stars, last pushed 2d ago), licensed MIT. It adds 2,936 tokens to every session, about $0.0147 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.