gopherstack: Instructions file for Codex

AGENTS.md

gopherstack AGENTS.md is an instructions file for Codex, OpenCode from BlackbirdWorks/gopherstack. It costs 2,152 tokens per session, scanned A, original, MIT.

A project instruction file for Gopherstack, a Go and TypeScript codebase that imitates AWS services. It sets coding rules and lists checks to run before pushing changes.

In plain words
What is it for?
Use it as guidance when editing the project, especially its Go services, TypeScript code, logging, tests, and pre-push checks.
Why use it?
Shared project rules help coding agents make consistent changes and catch formatting, test, vet, and lint problems before a commit or push.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; names the TodoWrite tool; mentions Codex.

This is BlackbirdWorks/gopherstack's own configuration. It tells Codex and OpenCode how to work on gopherstack itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gopherstack configures →

Reuse

Borrowing it

Nothing to install: this file belongs to BlackbirdWorks/gopherstack. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/BlackbirdWorks/gopherstack/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/BlackbirdWorks/gopherstack

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gopherstack AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/blackbirdworks/gopherstack/agents-md/github.svg)](https://agentmods.dev/instructions/blackbirdworks/gopherstack/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/blackbirdworks/gopherstack/agents-md"><img src="https://agentmods.dev/badge/instructions/blackbirdworks/gopherstack/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gopherstack AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/blackbirdworks/gopherstack/agents-md"><img src="https://agentmods.dev/badge/instructions/blackbirdworks/gopherstack/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,152 This file is loaded in full into every session.
When invoked 2,152 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02152 $0.02152
Opus 5.5 $0.00861 $0.00861
Sonnet 5.5 $0.00430 $0.00430
Haiku 4.5 $0.00215 $0.00215

Measured yesterday against content hash 7877ee3183e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gopherstack 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 · 169 lines

How it starts

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

Agent Instructions

You are an expert Go and TypeScript engineer. You write idiomatic Go: small focused functions (under 100 lines), cyclomatic complexity below 15 (extract helpers — never use //nolint), named constants instead of magic strings, explicit error handling, no goroutine or resource leaks. You know the AWS SDK v2 deeply and build accurate AWS service simulations.

Pre-push checklist — ALL must pass before every commit:

goimports -w -local github.com/blackbirdworks/gopherstack ./services/<pkg>/...
golines -w --max-len=120 ./services/<pkg>/...
go test ./services/<pkg>/... -short -count=1
go vet ./services/<pkg>/...
golangci-lint run ./services/<pkg>/...

task lint also runs mulint (mutex misuse detection) via go vet -vettool. mulint cannot follow mutex wrappers across package boundaries, so it does not see lockmetrics.RWMutex (used almost everywhere in this repo) — it only guards direct sync.Mutex/sync.RWMutex use.

Logging — context-aware only (no exceptions):

  • NEVER call slog.Default() or construct an ad-hoc slog.New(...) in service/production code, and NEVER embed or store a *slog.Logger on a struct/global. The single allowed slog.Default() is the fallback inside pkgs/logger.Load; the single allowed slog.New is pkgs/logger.NewLogger.
  • Always fetch the logger from context: logger.Load(ctx), and prefer the *Context methods (InfoContext/WarnContext/...) so the request/worker fields propagate.
  • The root logger is created once at startup and injected into ctx. Enrich it, never replace it: logger.WithService(ctx, name) at a service boundary (done centrally per request), logger.AddAttrs(ctx, ...) for extra fields, and logger.WithWorker(ctx, service, job) at the entry of every background routine (records log as worker=<service>-<job>).
  • Background routines (janitors, debounced saves, accept loops) MUST derive their logger from the lifecycle/root context (e.g. the janitor context), NEVER from a per-request echo context — otherwise they leak request_id and pin a finished request alive.
  • The logger is a pointer carried in ctx; enrichment is copy-on-write (slog.Logger.With returns a new logger). Do NOT mutate it, do NOT call slog.SetDefault at runtime, and do NOT call WithService/WithWorker/AddAttrs inside a loop (each call layers attributes — derive once at entry; for per-item fields use a local l := logger.Load(ctx).With(...)).
  • Do NOT introduce context.Background()/context.TODO() in service code or tests to satisfy a signature — thread the real request/root context (in tests use t.Context()).

Checkpoint commits for long tasks: For tasks taking >1 hour, commit and push every ~30 minutes:

git add -A && git commit -m "WIP: checkpoint" && git push origin HEAD

Subagent Isolation: When dispatching subagents for concurrent tasks, always isolate working trees (Workspace: 'branch' or git worktree) to avoid cross-contamination of uncommitted edits, task docs regeneration, or intermediate build artifacts.

This project uses bd (beads) for issue tracking. Run bd prime for full workflow context.

Read the full file on GitHub · 169 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 · 169 lines · 2,152 tokens per session scan A 7877ee3183e4

Subscribe to this mod's changes

gopherstack AGENTS.md is an instructions file published in the GitHub repository BlackbirdWorks/gopherstack (17 stars, last pushed yesterday), licensed MIT. It adds 2,152 tokens to every session, about $0.0086 per session on Opus 5.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-11-07.

Related

gopherstack AGENTS.md compared with instructions from other repositories

gopherstack AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gopherstack AGENTS.mdBlackbirdWorks/gopherstackInstructions file17yesterdayMITA2,152Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot