From 1c0e728b0684566a791febb1369873969d1ff5a5 Mon Sep 17 00:00:00 2001 From: Adam Wildavsky Date: Fri, 17 Jul 2026 17:52:15 -0500 Subject: [PATCH 1/4] Add agent naming guidance Document snake_case conventions for C and C++ so coding agents follow the modernized style. Co-authored-by: Cursor --- AGENTS.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..bc83bfbf --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,17 @@ +# Naming + +For C and C++ code, use snake_case for functions, methods, variables, and parameters. + +Prefer: +- `deal_fanout` +- `fanout_suit` +- `num_voids` + +Avoid: +- `dealFanout` +- `fanoutSuit` +- `numVoids` + +Exceptions: +- Match existing external or legacy APIs (for example, public C API names and types that already use a different style). +- Do not rename unrelated legacy identifiers in the same change unless the task requires it. From 26824eed90600f668f670d85fbf3c4a5e6f6141c Mon Sep 17 00:00:00 2001 From: Adam Wildavsky Date: Fri, 17 Jul 2026 17:53:51 -0500 Subject: [PATCH 2/4] Document TDD workflow for agents Capture the red-green-refactor requirements so coding agents apply the same test-first discipline used in this repository. Co-authored-by: Cursor --- AGENTS.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index bc83bfbf..e60c0064 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,3 +15,17 @@ Avoid: Exceptions: - Match existing external or legacy APIs (for example, public C API names and types that already use a different style). - Do not rename unrelated legacy identifiers in the same change unless the task requires it. + +# Test-driven development + +For every code change, follow strict TDD: + +1. Write or update automated tests that initially fail and describe the desired behavior and edge cases. +2. Write the minimal production code needed to make the new tests pass. Do not add untested functionality. +3. After tests are green, refactor tests and implementation for clarity and to remove duplication. +4. Run the relevant tests after each refactor and keep them green. +5. Repeat this red-green-refactor cycle in small steps. + +Structure tests with Arrange-Act-Assert and use descriptive names that capture intent, including negative and boundary cases. + +Never write production code first and wrap tests around it afterward. Tests must be written first and must fail before implementation. From d5412bea2ca6f6b69e7b26f92ce74f827558760c Mon Sep 17 00:00:00 2001 From: Adam Wildavsky Date: Sat, 18 Jul 2026 00:01:00 +0100 Subject: [PATCH 3/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index e60c0064..6db077ba 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Naming -For C and C++ code, use snake_case for functions, methods, variables, and parameters. +For C and C++ code, use snake_case for functions, methods, variables, and parameters. For C++ types use PascalCase, and for member variables use snake_case with a trailing underscore. Prefer: - `deal_fanout` From 1a676f715b8d5391925fb7eba838581ec29c4111 Mon Sep 17 00:00:00 2001 From: Adam Wildavsky Date: Fri, 17 Jul 2026 21:18:56 -0500 Subject: [PATCH 4/4] Point AGENTS.md at shared C++ instructions Defer general and naming guidance to .github/instructions/cpp.instructions.md so agent and Copilot docs stay aligned. Co-authored-by: Cursor --- AGENTS.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e60c0064..ca13f631 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,16 +1,10 @@ -# Naming +# General -For C and C++ code, use snake_case for functions, methods, variables, and parameters. +Follow .github/instructions/cpp.instructions.md -Prefer: -- `deal_fanout` -- `fanout_suit` -- `num_voids` +# Naming -Avoid: -- `dealFanout` -- `fanoutSuit` -- `numVoids` +Follow .github/instructions/cpp.instructions.md Exceptions: - Match existing external or legacy APIs (for example, public C API names and types that already use a different style).