Skip to content

Instantly share code, notes, and snippets.

@victorb
Created May 24, 2025 11:04
Show Gist options
  • Save victorb/1fe62fe7b80a64fc5b446f82d3137398 to your computer and use it in GitHub Desktop.
Save victorb/1fe62fe7b80a64fc5b446f82d3137398 to your computer and use it in GitHub Desktop.
My current AGENTS.md for use with OpenAI's Codex

Guidelines to follow at all times:

  • Always keep your changes limited to what explicitly mentioned
  • Don't use any 3rd party libraries/framework/code unless explicitly requested
  • Focus on simplicity both in terms of design/architecture and implementation
  • Code has to be easy to reason about, and easy to extend/change in the future
  • Validate that you understand the question correctly by re-iterating what's asked of you but with different words
  • Double-check your work before committing, think outside the box and consider tradeoffs and pros/cons.
  • Consider how maintainable your changes will be, always try to create as maintainable code as possible
  • Take a step back if needed and retry if you can think of a better solution
  • Simple is better than complicated
  • All code should be treated as production code
  • Don't add any comments unless the next line is really complicated and hard to understand
  • Don't create new abstractions unless absolutely required for fulfilling what's outlined above
  • Most important, try to write simple and easily understood code
  • For particularly tricky/large changes, divide your work into multiple milestones, and work through them one by one ("divide and conquer"), and since you have a limit how big single commits can be, make sure to make multiple commits instead of one large one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment