agentleFS
OpenAIKnown publisheropenai/openai-cookbook/examples/agents_sdk/sandboxed-code-migration/migration_agent/AGENTS.md

openai-cookbook / migration_agent

AGENTS.md76k starsChanged 5 months agoMITView on GitHub

You are migrating the mounted repo under repo/. - Migrate the repo according to repo/MIGRATION.md. - Preserve the public function signatures and behavior. - Run the baseline test command before editing. - Edit the app code and its tests. - Run the check command named in repo/MIGRATION.md after editing. - Run the final test command named in repo/MIGRATION.md after editing. - Return structured output that includes the exact commands, pass/fail summaries, changed files, a Markdown migration report, and the patch…

Trending

Quiet since July.about the whole repository

Dec 2025: 3 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 4 mentionsApr 2026: 0 mentionsMay 2026: 2 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the openai/openai-cookbook repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about openai/openai-cookbook

The biggest 5 of 61 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 61

Talked about on GitHub, Hacker News and Bluesky (61 times).

On GitHub · 27

22 more on GitHub

On Hacker News · 21

16 more on Hacker News

On Bluesky · 13

8 more on Bluesky
  • 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 repository4 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

14 rules. About 1 is common, 7 are distinctive, and 6 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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:

    Run the baseline test command before editing.

    line 9
  2. Very specific:

    Run the check command named in repo/MIGRATION.md after editing.

    line 11
  3. Very specific:

    Run the final test command named in repo/MIGRATION.md after editing.

    line 12
  4. Distinctive:

    Use the exact baseline, check, and final test commands from that brief.

    line 19
  5. Very specific:

    Run all three commands from repo/.

    line 21
  6. Distinctive:

    Keep the migration narrow.

    line 25
  7. Very specific:

    Prefer apply_patch for edits.

    line 26
  8. Very specific:

    When using apply_patch, use workspace-relative paths such as repo/customer_support_bot/replies.py.

    line 27
  9. Very specific:

    Do not edit files outside repo/.

    line 28
  10. Distinctive:

    Do not install packages.

    line 29
  11. Common:

    Do not place API keys, environment variables, or real OpenAI calls in tests.

    line 30
  12. Distinctive:

    Run the baseline test command from the migration brief.

    line 39
  13. Distinctive:

    Run the check command from the migration brief.

    line 42
  14. Distinctive:

    Run the final test command from the migration brief.

    line 43

≈ “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

Code migration agent

You are migrating the mounted repo under repo/.

Mission

  • Migrate the repo according to repo/MIGRATION.md.
  • Preserve the public function signatures and behavior.
  • Run the baseline test command before editing.
  • Edit the app code and its tests.
  • Run the check command named in repo/MIGRATION.md after editing.
  • Run the final test command named in repo/MIGRATION.md after editing.
  • Return structured output that includes the exact commands, pass/fail summaries, changed files, a Markdown migration report, and the patch you applied.

Required command pattern

Each migration brief in repo/MIGRATION.md includes a validation pipeline. Use the exact baseline, check, and final test commands from that brief.

Run all three commands from repo/.

Editing rules

  • Keep the migration narrow. Do not rewrite the sample app.
  • Prefer apply_patch for edits.
  • When using apply_patch, use workspace-relative paths such as repo/customer_support_bot/replies.py.
  • Do not edit files outside repo/.
  • Do not install packages.
  • Do not place API keys, environment variables, or real OpenAI calls in tests.
  • The final tests must use a fake client; they should not call the network.
  • Include a patch in migration_patch. If you use apply_patch, you may return the same patch text.
  • The sandbox image may not have git. Do not require git diff; keep enough patch text from your apply_patch calls to return the migration diff.

Suggested loop

  1. Inspect repo/MIGRATION.md, the app files it names, and the tests it names.
  2. Run the baseline test command from the migration brief.
  3. Patch the client wrapper and reply call site.
  4. Patch tests.
  5. Run the check command from the migration brief.
  6. Run the final test command from the migration brief.
  7. Inspect the changed files and assemble the migration patch from the patch text you applied.
  8. Return the structured result.

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.