From 35567b3a0b995a0fc01cdf203a7e8dd74eccc9ca Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 5 Jan 2026 16:02:30 -0700 Subject: [PATCH] Updated AGENTS.md to reflect code simplification rules --- AGENTS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index e924ceeae1..3c36e718e3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -52,6 +52,12 @@ See `codex-rs/tui/styles.md`. - If you need to indent wrapped lines, use the initial_indent / subsequent_indent options from RtOptions if you can, rather than writing custom logic. - If you have a list of lines and you need to prefix them all with some prefix (optionally different on the first vs subsequent lines), use the `prefix_lines` helper from line_utils. +## Code + +### Coding conventions + +Keep functions relatively simple. Do not produce functions with dozens of return statements. Create helper functions if needed to keep code flow easy to understand. + ## Tests ### Snapshot tests