jaz AGENTS.md

jaz AGENTS.md is an instructions file for Codex, OpenCode from gluonfield/jaz. It costs 2,035 tokens per session, scanned A, original, Apache-2.0.

A set of engineering and architecture instructions for the Gluonfield Jaz project, including its Go version, coding style, input handling, and approach to simplifying fixes.

In plain words
What is it for?
Use it when changing the project's Go code, backend architecture, integrations, validation boundaries, or bug fixes.
Why use it?
It gives a coding agent clear project rules and helps keep changes small, consistent, and aligned with the existing design.

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

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 jaz AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gluonfield/jaz/agents-md.svg)](https://agentmods.dev/instructions/gluonfield/jaz/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/gluonfield/jaz/agents-md"><img src="https://agentmods.dev/badge/instructions/gluonfield/jaz/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,035 This file is loaded in full into every session.
When invoked 2,035 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.02035 $0.02035
Opus 5 $0.01018 $0.01018
Sonnet 5 $0.00407 $0.00407
Haiku 4.5 $0.00203 $0.00203

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

Security

Grade A, and why

jaz 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 4d 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 · 58 lines

How it starts

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

Engineering Rules

  • Use Go 1.26.
  • Keep code and JSON minimal. Each line of code should fight for its existence; every field and line must earn its place.
  • Prefer implementations that reduce total code over ones that add more. Adding lines is a cost to justify; a good fix often deletes code, collapses branches, or moves an invariant to the layer that already owns it.
  • Trim strings at real input boundaries only: user input, config files, env vars, HTTP payloads, CLI args, and persisted loose text. Do not sprinkle strings.TrimSpace over internal constants, typed IDs, enum values, or values that have already crossed a validation boundary.
  • When there's an opportunity for dramatic simplification or restructuring, bring it up. Favor "code judo" moves that delete layers, unify shapes, collapse special cases, or make the design inevitable over incremental patches.
  • Bug fixes should first look for deletion or correction of the underlying contract. A solution that only adds branches, flags, helpers, or UI glue is suspicious; prefer removing stale paths, collapsing duplicated state, or moving behavior to the owning layer before adding code.
  • Do not add code comments until they are genuinely needed to explain specific behavior the code itself cannot describe.
  • Keep concrete implementations focused and interfaces small.
  • Put behavior in the layer that owns the concept. Shared transcript/message shapes belong in storage or a dedicated shared package, not copied through server, ACP, and UI paths.
  • Keep provider-facing data separate from display/transcript data. Do not mutate prompts and then repair snapshots by string matching; carry explicit typed boundaries instead.
  • Native coding-agent parity is a hard invariant. Providers own model metadata, prompt construction, compaction, context limits, tools, and auth semantics; Jaz adapters may translate protocol shapes but must not override, duplicate, guess, or silently degrade them. Any intentional divergence must be explicit, bounded, measurable, and opt-in.
  • Before releasing changes to ACP/native agent boundaries, compare Jaz against the corresponding native CLI for model identity and context window, first-turn prompt count/size, reload behavior, compaction, tool capabilities, and authentication. Missing provider metadata must remain unknown rather than falling back to a guessed value.
  • Architect the native Jaz agent behind protocol-shaped interfaces, modeled after MCP-style request/response/event contracts. Typed content blocks, tool calls/results, permissions, streaming updates, and capabilities should cross explicit interfaces instead of direct server/provider coupling.
  • Keep native runtime behavior transport-neutral. Native, ACP, and future protocol adapters should share internal turn/session/tool contracts; protocol-specific code translates only at the boundary.
  • Preserve migration paths to ACP or MCP-style protocols when adding agent features. Prefer capabilities and feature detection over hardcoded runtime branches, and do not hide native-only semantics inside prompts.
  • Split files when a feature starts mixing transport, persistence, formatting, and UI concerns. Avoid pushing files toward 1k lines without a strong structural reason.
  • Frontend shared hooks and lib code must not import component-owned types. Put cross-layer contracts in lib.
  • Keep feature diffs scoped. Do not mix unrelated UI polish, settings work, dependency churn, or generated output into behavioral changes.
  • Prefer Viper's default field mapping. Add mapstructure tags only for real mismatches.
  • Keep main.go files as command dispatch and process entrypoints only. Arbitrary domain types, helper functions, clients, transports, URL builders, and request/response shapes belong in the package that owns that concept; the only allowed exception is global Viper bootstrap/config wiring.
  • Use Fx constructors directly in fx.Provide; avoid pass-through wrappers.
  • Do not add defensive nil checks for required constructor-injected dependencies. If a required Fx service is missing, fail fast instead of silently degrading; model truly optional dependencies explicitly.
  • Codex ACP defaults to the user's Codex OAuth credentials. Never silently pass coordinator provider keys to Codex subprocesses; a provider API key reaches Codex only when the user explicitly selects a non-OpenAI model provider (e.g. OpenRouter) for it.
  • Target deployments run the Jaz server on a VM and clients on user computers; never assume client-local file paths are visible to the server or agents.
  • Before handing off a completed feature or fix, run a code-review pass; use thermo-nuclear-code-quality-review when available.
  • Every test you add must be useful: it must run in the relevant verification path and either protect real behavior or clarify a tricky contract. A test that is skipped, does not run, or provides no useful signal must not exist just to raise coverage.
  • Reference repos (openclaw, hermes) are learning material, not authority.

Read the full file on GitHub · 58 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. 4d ago First seen · 58 lines · 2,035 tokens per session scan A 62041c2a7393

Subscribe to this mod's changes

jaz AGENTS.md is an instructions file published in the GitHub repository gluonfield/jaz (59 stars, last pushed 2d ago), licensed Apache-2.0. It adds 2,035 tokens to every session, about $0.0102 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.