agentleFS
cfreglycfregly/gpu-perf-tune/AGENTS.md

gpu-perf-tune

AGENTS.md3 starsChanged 4 months agoMITView on GitHub

Canonical guidance for coding agents working in gpu-perf-tune. Client-specific files may point here, but shared policy belongs in this file. The repository layout, client setup, and methodology live in README.md and docs/METHODOLOGY.md. - gpu-perf-tune is the project and repository. - profile-and-optimize is the Agent Skills package. Claude Code consumes it as a plugin. Codex installs the same skills from a clone. - profile_and_optimize is the MCP server key. - Claude Code has first-class Skills, MCP, and opt-in provenance enforcement. -…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

22 rules. About 0 are common, 16 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep a Claude-specific instruction in a Claude adapter when the instruction is truly client-specific.

    line 30
  2. Distinctive:

    Do not hide assumptions or uncertainty.

    line 40
  3. Distinctive:

    Stop and ask when missing context would change the outcome.

    line 47
  4. Distinctive:

    Write the minimum code that solves the requested problem.

    line 51
  5. Distinctive:

    Do not add speculative features.

    line 53
  6. Distinctive:

    Do not build an abstraction for one use.

    line 54
  7. Distinctive:

    Do not add configurability that no caller needs.

    line 55
  8. Distinctive:

    Ask whether a senior engineer would call the change overcomplicated.

    line 58
  9. Distinctive:

    Do not reformat or refactor unrelated code.

    line 65
  10. Distinctive:

    Remove only the imports, variables, and functions made obsolete by your change.

    line 68
  11. Distinctive:

    Every changed line should trace to the request.

    line 72
  12. Distinctive:

    Every benchmark, report, skill change, and README claim must be adversarially-confirmed to add value before promotion.

    line 88
  13. Distinctive:

    Write a rough work times unit-cost ledger and state overlap assumptions.

    line 99
  14. Distinctive:

    Prefer less work, bulk operations, compact representations, fewer copies, reuse, and less synchronization before instruction-level tuning.

    line 101
  15. Very specific:

    Use the run ID as the experiment ID and the join key across evidence, cluster objects, and published results.

    line 116
  16. Very specific:

    Run make all before committing.

    line 123
  17. Very specific:

    Use make -j4 all to run independent targets in parallel.

    line 125
  18. Distinctive:

    Never hardcode a replacement count without updating and running the count lints.

    line 128
  19. Very specific:

    Start a new skill from plugins/profile-and-optimize/templates/skill/SKILL.md.

    line 130
  20. Very specific:

    Keep adapter and package versions plus the changelog aligned.

    line 137
  21. Very specific:

    Use make release only to recover a missing release from the current, already-green main version bump.

    line 140
  22. Distinctive:

    Write human-facing text in plain language.

    line 142

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

Canonical guidance for coding agents working in gpu-perf-tune. Client-specific files may point here, but shared policy belongs in this file.

Run it

make demo     # print the tool and skill surface, no GPU needed
make help     # list operator targets
make quality  # run Ruff, Pyright, and ShellCheck
make all      # run quality checks, docs, skill lint, MCP smoke, and pytest

The repository layout, client setup, and methodology live in README.md and docs/METHODOLOGY.md.

Project names and client boundaries

  • gpu-perf-tune is the project and repository.
  • profile-and-optimize is the Agent Skills package. Claude Code consumes it as a plugin. Codex installs the same skills from a clone.
  • profile_and_optimize is the MCP server key.
  • Claude Code has first-class Skills, MCP, and opt-in provenance enforcement.
  • Codex has first-class Skills and MCP setup. It uses this AGENTS.md for project guidance and has no packaged client hook.
  • Cursor, Gemini CLI, and Google Antigravity helpers are best effort. Do not treat those clients as release gates or claim full adapter support.

Keep a Claude-specific instruction in a Claude adapter when the instruction is truly client-specific. Put project policy here.

Behavioral guidelines

These rules reduce common agent mistakes. They favor caution over speed. Use judgment for trivial work.

1. Think before coding

Do not hide assumptions or uncertainty.

Before implementing:

  • State assumptions that affect the result.
  • Present materially different interpretations before choosing one.
  • Name a simpler approach when it exists.
  • Stop and ask when missing context would change the outcome.

2. Keep the solution small

Write the minimum code that solves the requested problem.

  • Do not add speculative features.
  • Do not build an abstraction for one use.
  • Do not add configurability that no caller needs.
  • Rewrite a large change when a much smaller one would be clearer.

Ask whether a senior engineer would call the change overcomplicated. If so, simplify it.

3. Make surgical changes

Touch only what the task needs.

  • Do not reformat or refactor unrelated code.
  • Match the local style.
  • Preserve user changes and unrelated worktree state.
  • Remove only the imports, variables, and functions made obsolete by your change.
  • Report unrelated dead code instead of deleting it.

Every changed line should trace to the request.

4. Work toward a verifiable result

Translate the task into checks that can pass or fail.

  • "Add validation" means test invalid input, then make the test pass.
  • "Fix the bug" means reproduce it, then prove the fix.
  • "Refactor" means keep the same behavior before and after the change.

For a multi-step task, state a short plan with a verification step.

5. Apply the value bar

Measured is not automatically valuable.

Every benchmark, report, skill change, and README claim must be adversarially-confirmed to add value before promotion. Name the workload, baseline, skeptical check, receipt, and user-facing value. If that chain is missing, label the result DRAFT or candidate.

6. Estimate, then measure

For performance work, apply the performance hints adaptation:

  • Classify the path as setup, per request, per token, or shared library work.
  • Write a rough work times unit-cost ledger and state overlap assumptions.
  • Rank changes by measured contributor share and maximum possible impact.
  • Prefer less work, bulk operations, compact representations, fewer copies, reuse, and less synchronization before instruction-level tuning.
  • Re-run the production-shaped baseline after each change. Estimates stay DRAFT.

Reproducibility-Grade Evidence

Significant performance work produces an evidence bundle, not loose output. Record the source revision, operator, environment, exact commands, stdout, stderr, exit codes, raw measurements, and summary in the bundle. A future reviewer must be able to identify what ran and decide whether the claim follows from the captured data.

Experiment Isolation and Traceability

Use the run ID as the experiment ID and the join key across evidence, cluster objects, and published results. Give experiment resources unique names and the matching experiment=<run-id> label. Do not reuse evidence across workloads, source revisions, or delivery methods.

Working in this repository

  • Run make all before committing. It includes Python lint and formatting, production type checks, shell lint, repository gates, MCP smoke, and pytest. Use make -j4 all to run independent targets in parallel.
  • Skill, tool, and library counts are canonical in plugins/profile-and-optimize/server/mcp_surface.py. Never hardcode a replacement count without updating and running the count lints.
  • Start a new skill from plugins/profile-and-optimize/templates/skill/SKILL.md.
  • Measurement rules live in docs/METHODOLOGY.md.
  • MCP request, response, and acknowledgement rules live in plugins/profile-and-optimize/server/docs/mcp-tool-io-contract.md.
  • The root VERSION file is the release version source of truth. Keep adapter and package versions plus the changelog aligned. Every release uses an annotated vX.Y.Z tag. A successful main push CI run triggers the release workflow. The version bump must be in the final squash-merged commit. Use make release only to recover a missing release from the current, already-green main version bump.
  • Write human-facing text in plain language. Do not use em dashes, en dashes, prose semicolons, inflated claims, or filler.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.