dotfiles AGENTS.md

A concise repository guide for coding agents that requires test-driven development, meaning writing a failing test before the fix, along with careful changes and explicit verification.

In plain words
What is it for?
Use it before coding in the dotfiles project to state assumptions, make narrowly scoped edits, write reproducing tests, and verify changes before and after refactoring.
Why use it?
It reduces accidental behavior changes and sets clear rules for handling ambiguity, repetitive edits, reviews, and testing.

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

Made for: Codex, OpenCode.

Per session 575 This file is loaded in full into every session.
When invoked 575 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.00575 $0.00575
Opus 5 $0.00287 $0.00287
Sonnet 5 $0.00115 $0.00115
Haiku 4.5 $0.00057 $0.00057

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

Security

Grade A, and why

dotfiles 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 · 65 lines

How it starts

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

AGENTS.md

  • Extreme concision in all interactions and commits. Sacrifice grammar for brevity.
  • Always TDD: failing test first, even for vague asks ("fix bug" → reproducing test)
  • Refactor: suite green before AND after, no behavior change
  • Prefer CLI over MCP; MCP only when the CLI can't do it
  • Repetitive edits → write a script, don't hand-edit N files
  • 3 failed attempts → stop, report what you learned, ask

Before Coding

  • State assumptions explicitly. Multiple interpretations → present all, don't pick silently
  • Ambiguity that changes the work → stop, name it, ask. Routine ambiguity → state assumption, proceed
  • If simpler approach exists, say so. Push back when warranted — no sycophancy or superficial agreement

Surgical Changes

  • Don't improve adjacent code, comments, or formatting
  • Match existing style, even if you'd do it differently
  • Only remove orphans YOUR changes created
  • Unrelated dead code → mention, don't delete
  • Every changed line must trace to the request

Verification

  • Multi-step tasks: state plan as step → verify: check before coding
  • For UI changes: take before/after screenshots, compare
  • 8+ files → break into phases first

Code Principles

Goal: predictable, maintainable, testable code

Simplicity

  • Minimum code that solves the problem. Nothing speculative
  • No abstractions for single-use code
  • No flexibility/config that wasn't requested
  • No error handling for impossible scenarios
  • 200 lines that could be 50 → rewrite. "Would a senior call this overcomplicated?" → simplify

Immutability (JS/TS, new code only — overrides "match existing style")

  • No in-place mutation of shared data: push, splice, shift, unshift, sort, reverse, delete
  • Use: spread, slice, map, toSorted, toReversed, with
  • OK: local accumulators, constructors, refs

Suppressions (JS/TS)

  • Don't silence errors to pass: eslint-disable, @ts-ignore, @ts-expect-error
  • If unavoidable, comment the reason
  • No as any — when there's no option, as unknown and narrow

Read the full file on GitHub · 65 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 · 65 lines · 575 tokens per session scan A afd475e6767c

Subscribe to this mod's changes

dotfiles AGENTS.md is an instructions file published in the GitHub repository helderberto/dotfiles (115 stars, last pushed 19d ago), licensed MIT. It adds 575 tokens to every session, about $0.0029 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.