Live data from Hacker News

AGENTS.md – Open format for guiding coding agents

agents.md

341–350 of 398 posts

Re: AGENTS.md – Open format for guiding coding agents

#342

I haven't really done anything serious with Claude Code, but today I tested starting claude in ~/claude/test, and told it to list my home dir, which it then did. Is there a way to tell tools like Claude Code that it must never leave ~/claude/test, and don't event think about using absolute paths, or relative paths which contain `..`?

it's already read only outside of project directories (except for Bash tool); your only further option is to wrap it in a sandbox, `bwrap` is perfect for this "don't even think" is in the default system prompt, but it's inherently indeterministic and can be overridden with a direct instruction as you have seen

Wow! Thank you for bringing bubblewrap to my attention. What an amazing tool! This opens so many doors.

Re: AGENTS.md – Open format for guiding coding agents

#343
post #258
post #169

Earlier quoted context omitted.

we're -> we are I've -> I have & -> and co. -> company won't -> will not it's -> it is

/usr -> Program Files (hello spaces my old friends, you've come to break my apps again) /var -> ProgramData (but no spaces here) /home -> Documents and Settings /etc -> Control Panel

    /home -> Users (it's not 1998 anymore)

Re: AGENTS.md – Open format for guiding coding agents

#344

Earlier quoted context omitted.

Compile, test, architecture would be very welcome in the readme too Id wager

Where contributors are the audience, yes. For things like libraries, I care about those things only if I run into a bug, and have enough resources to attempt a fix.

It can help even when using the library and not contributing. It helps you to use the api better imo, because usually the abstraction is not perfect and having even a general sense of how the sausage is made will prevent you from falling victim to gotchas. But then on the downside it lowers the mystique of the library. Some coders prefer to be magicians.

Re: AGENTS.md – Open format for guiding coding agents

#345

Earlier quoted context omitted.

Have you considered that there are other metrics people are optimizing for nowadays? Perhaps typeability, screen real estate, familiarity/convention, etc.? Do you really want /User Files/Bob's Files/Coding Projects/Python Projects/Bob's Cool Python Library/Source Code/Model Files/SomeObject.py?

Path length is still a thing in MS Windows, so be careful ;)

Depends on the WinAPI used... I still use C:/src instead of C:/Users/MyUser/src for that reason when working in windows all the same though. Too many unixy utils don't leverage the apis with the longer path, not to mention not supporting the internal certificate store and proxy config.

Re: AGENTS.md – Open format for guiding coding agents

#346

This should've been an .agents¹ with an index.md. For tiny, throwaway projects, a monolithic .md file is fine. A folder allows more complex projects to use "just enough hierarchy" to provide structure, with index.md as the entry point. Along with top-level universal guidance, it can include an organization guide (easily maintained with the help of LLMs). index.md ├── auth.md ├── performance.md ├── code_quality ├── da…

This is one of the reasons I'm sticking with .github/... copilot instructions for now. We'll see if this proposal evolves over time as more voices enter the conversation

Re: AGENTS.md – Open format for guiding coding agents

#347

Earlier quoted context omitted.

Another reason to use a src/ directory for the actual source code.

These files also generally work in a nested fashion, like .gitignore and the like. So you want something that can be injected into the namespace of any directory in your project with relatively low likelihood of conflicts.

Not exactly (or unclear), .gitignore files combine, much like copilot files with glob or other matching. All the instructions are put into the context

> Agents automatically read the nearest file in the directory tree, so the closest one takes precedence

Re: AGENTS.md – Open format for guiding coding agents

#348
post #258

Earlier quoted context omitted.

/usr -> Program Files (hello spaces my old friends, you've come to break my apps again) /var -> ProgramData (but no spaces here) /home -> Documents and Settings /etc -> Control Panel

Spaces break things only in Lnux; Mac and Windows support them since beginning. Why should we write without spaces as if we were in 5th century?

Spaces are avoided on base Linux systems because they're clunky for terminals more than fear of outright breaking things. To the extent spaces there do break things, that also happens on Mac and Windows for the same reasons (hence ProgramData being conspicuously space-less).

Re: AGENTS.md – Open format for guiding coding agents

#349

Currently I am building a new JS web toolkit on the side with AI assistance for faster progress, and I came to have some prompts folder in the project root that I just drop into the agents (like cursor CMD+I) and point it to a direction (file/folder). https://github.com/Anonyfox/raven-js/tree/main/prompts I think we should not split README and AGENT into different documents - the way its heading is that the coding ag…

Kind of my first thought... seems to me this could be part of README.md, or as another suggested CONTRIBUTING.md

I tend to put a lot of this type of info into the readme anyway... for more complex projects, I'll include a docs/ directory with more markdown, images as needed, etc.

For that matter, I think context hints from the likes of Dockerfile(s), compose, and .github/workflows also can serve a dual-purpose here.

Re: AGENTS.md – Open format for guiding coding agents

#350
post #320

Earlier quoted context omitted.

Anything with a capital letter requires hitting two keys: Shift and then the desired letter. Thus /Programs requires 10 keystrokes rather than 9. Even worse, since the capital letter is at the beginning of the directory name, I have to type it and am unable to rely on tab-completion. /Programs with its ten keystrokes is over twice the keystrokes of /bin and its four. Short names are quicker to type and require less e…

That's really more the fault of the tab completion. There's no reason why it couldn't complete `prog` to `Programs`. It's just Unix tradition that they don't. I would prefer if they did.

In ~/.inputrc, add

    set completion-ignore-case on
to enable case insensitive tab completion in bash.
Post reply on HN