Add agent instructions for Jamulus#3785
Conversation
|
|
I agree. I'm happy for AI to show me how to do something, but then I re-implement the technique myself. I wouldn't want to include code that I don't understand how or why it works! |
|
Yes sure. But I still think that if the code is understood and well written it's fine. But yes, we need to update CONTRIBUTING.md |
|
My experience has been that an agent should author this kind of guidance, and the agent should be asked to evolve the guidance when an agent makes an error and then recovers from the error with or without human intervention ("a teachable moment"). I say something like, "You made an error while fixing/making this, and then we recovered from the error. Let's add guidance to AGENTS.md that would help prevent this kind of error next time." I asked Fable to review this PR against my own CLAUDE.md (basically same function as AGENTS.md). This is primarily because a model like Fable can produce great guidance that a lesser model like Sonnet can follow. Its overall view is: good foundation, accurate throughout, worth merging after additions. Here are 5 observations it provided:
My view on this: This is some pretty technical, fundamental stuff, and I think I know why it mentions this. I had added a mechanism to my servers to keep out known attack vectors (ASNs and a few IP ranges), but my lookup was synchronous, and every 20 seconds, the whole server would freeze for 100ms, for everyone. People wouldn't stay. :) If it was easy-breezy for me to introduce that problem, perhaps it's basic guidance for any agent to avoid making such a blunder.
My view: Maybe this guidance gets too far into the weeds in some ways, or maybe not. When your project has non-negotiable architectural laws, it's good to include them in tose terms. I started with a "CONSTITUTION" in the earliest comments of a script file, with numbered LAWS. The location (first comments, or AGENTS.md) assures these always get read, and fundamentally unwise changes just don't happen (because they'd break the LAW).
My view: I agree. Spell out what it should do.
My view: Perhaps so. And notice that AGENTS.md can and probably should link through to CONTRIBUTING.md and any other pre-existing guidance. Agents will investigate these hyperlinked guidance Markdown files, but AGENTS.md (or CLAUDE.md) are considered the start points. So we'd link from AGENTS.md to COMPILING.md, CONTRIBUTING.md, SECURITY.md, and I guess README.md. this is exactly the kind of upgrade an agent can perform for us, and if we add AGENTS.md, I can ask Fable for an agent-ready makeover of these files, with AGENTS.md as the root file.
Maybe pick out the fixes or ideas you find most compelling for this PR and merge it, and we'll start evolving all of our guidance Markdown content over time, especially when we see a real-world error that could have been avoided by a little tip in AGENTS.md. Regarding the larger discussion, I am also concerned that it's now easy to produce PRs, but it's ultimately a blessing, even if it means we need vigilant gatekeeping by humans. My fork of Jamulus has a CLAUDE.md that might interest you. One thing I notice is all those architecture pitfalls. I've found different library requirements for deployment to Ubuntu 22 vs. 24 vs. 26, on ARM vs. x86, as well as gotchas when on very small (half-gb) RAM scenarios. |
This was done with open code and corrected by hand. I instructed it to be brief also as I wanted to make sure that small (local) models can also benefit from it. |
|
This YouTube video explains why small models running locally aren't suited to agentic programming tasks, but AGENTS.md is typically loaded into context before every interaction with an agent while using any model, so concision is always in style. |
|
Qwen3 27b works for easy tasks. Maybe that counts as medium sized. Will check the video soon. |
| `clangFormatVersion` for version). | ||
| - Rules: tabs→4 spaces, braces on their own line, space inside `()` and around | ||
| `if/for/while` conditions, column limit 150, left pointer alignment (`int* p`). | ||
| - New files must carry an AGPL 3.0 (or later) license header. Existing pre-3.12.1 |
There was a problem hiding this comment.
Not quite right.
| - New files must carry an AGPL 3.0 (or later) license header. Existing pre-3.12.1 | |
| - New files must carry an AGPL 3.0 (or later) license header. | |
| - Existing pre-3.12.1 code being amended should already carry combined AGPL 3.0 and GPL 2.0 (or later) license blocks. |
Let me put it this way, none of my local machines is capable of running a local LLM (well, maybe above 2b). Anything in the Jamulus source directory that is going to mislead Cursor or VSCode running against cloud instances is going to have negative impacts - and reducing the scope of what the LLM considers as potential context is as good as misleading it. |
|
Agree. Also I believe context must be as concise and information dense as possible. |
Let's be as concise and dense as possible, but go as deep as we must to prevent common errors and pitfalls.
LLMs will "bridge the gap" and "fill in the blanks" which is fascinating, but the goal of AGENTS.md is to prevent speculations that just lead to failures and problems. I'd like to see a culture here where people submit Markdown PRs for agent use that (concisely and densely) would have prevented the pitfalls they experienced when agentically programming this repo. |
Short description of changes
Adds agent instructions for opencode/claude code/... since we have an increasing amount of agent/AI PRs.
CHANGELOG: SKIP
Context: Fixes an issue?
No
Does this change need documentation? What needs to be documented and how?
This is documentation
Status of this Pull Request
Ready for review.
What is missing until this pull request can be merged?
Review for conciseness. @mcfnord had AI contributions - I assume that he knows if this prompt is good enough.
Checklist