Skip to content

Agent instructions - #238

Merged
tameware merged 8 commits into
dds-bridge:developfrom
tameware:agent-instructions
Aug 9, 2026
Merged

Agent instructions#238
tameware merged 8 commits into
dds-bridge:developfrom
tameware:agent-instructions

Conversation

@tameware

Copy link
Copy Markdown
Collaborator
  1. Use snake_case for C and C++ code.
  2. Follow TTD.

tameware and others added 2 commits July 17, 2026 17:52
Document snake_case conventions for C and C++ so coding agents follow the modernized style.

Co-authored-by: Cursor <cursoragent@cursor.com>
Capture the red-green-refactor requirements so coding agents apply the same test-first discipline used in this repository.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an AGENTS.md document to guide contributors/agents on naming and test-driven development expectations for DDS changes.

Changes:

  • Introduces naming guidance for C/C++ identifiers (favoring snake_case, with exceptions for legacy/public APIs).
  • Documents a strict red-green-refactor TDD workflow and test structuring expectations (AAA, edge cases).

Comment thread AGENTS.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

AGENTS.md:3

  • The naming guidance here is incomplete compared to the repo’s established C++ naming rules (e.g., constants use PascalCase and macros use ALL_CAPS). Since this file is meant to guide agents/contributors, it should either include those rules or explicitly defer to .github/instructions/cpp.instructions.md to avoid inconsistent naming for new code.
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.

tameware and others added 2 commits July 17, 2026 21:18
Defer general and naming guidance to .github/instructions/cpp.instructions.md so agent and Copilot docs stay aligned.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve AGENTS.md by keeping the pointer to shared C++ instructions, which already cover the naming details from the remote fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@zzcgumn

zzcgumn commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

I have started work to create a set of specifications to help coding agents. I suggest we add a project AGENTS.md file either as part of this upcoming pull request or in a later one. Our .github/copilot-instructions.md file does also need to be updated.

@tameware
tameware marked this pull request as ready for review July 18, 2026 14:06
@tameware

Copy link
Copy Markdown
Collaborator Author

I forgot that this was still a draft. I've promoted it. I'll merge it now with your approval, @zzcgumn - we can add your stuff to it when you're ready. I needed this because I found that Cursor was ignoring .github/copilot-instructions.md.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comment thread AGENTS.md
Comment thread AGENTS.md
- Do not rename unrelated legacy identifiers in the same change unless the task requires it.

# Test-driven development

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like using test driven development with coding agents but it is not a silver bullet. Maybe add something like this?

Apply these instructions when test driven development has been requested. Always ask if it is unclear whether TDD should be used.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zzcgumn > Maybe add something like this?

I've had good results using TDD always. I learned about it in 2000. My code after that was more robust and easier to follow, but only when I remembered to use it! In college in the early '80s we'd been taught that our code should have strong cohesion and weak coupling, but not how to achieve that. It seemed an art. TDD is a tool that almost forces it.

That said, I did have to add the line that says it should not apply to documentation!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kent Beck noted that TDD helps maximize the amount of code not written. This should be useful when we deal with AIs, since they love writing voluminous code.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy for TDD to be the default mode we ask agents to work with. Beck's point is very interesting as they tend to write lot of code, repeat themselves and write comments that explain what is obvious.

@zzcgumn zzcgumn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of things to discuss about this. I had failed to appreciate that you cannot point Cursor to the .github directory for instructions in any other way.

@zzcgumn zzcgumn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can return to the TDD discussion later. I suppose one advantage is that we try to force all contributors to write well-tested code.

@tameware
tameware merged commit 2ffccef into dds-bridge:develop Aug 9, 2026
9 checks passed
@tameware
tameware deleted the agent-instructions branch August 9, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants