问HN:你使用什么样的代理目录结构?
我越多地使用Claude Code生成大量系统,就越觉得我们缺少许多实践和工具。
首先让我感到烦恼的是缺乏对提示的跟踪。系统应该执行的操作有很多小输入,但这些输入似乎非常短暂。因此,我开始在代码库中跟踪这些提示。
另一个观察是,如果想要获得良好的代理输出,就需要在上下文窗口中提供大量信号。对上下文窗口中输入内容的严格把控似乎是关键。使用人工智能生成输入文件可能是危险的,因为这会为人类信号增加熵/噪声。
我开始采取的一种做法是以特定方式组织我的项目:
- /specs - 纯人类信号,例如产品愿景、需求、设计等。
- /prompts - 代理配方,例如技能、职位、AI模式。
- /references - 可以在上下文窗口中使用的参考资料(品牌资产、文档、Figma导出、数据集等)。
- /plans - 项目的代理计划。通常这些计划会有多个迭代。
- /build - 从计划和提示交互中构建的代码库和传统单一代码库。
(我在GitHub上有一个公共的AGENTS.md,地址是rekallai/craft)
我对这个结构还不完全满意。随着使用的增加,我觉得/plans这个名称有些不准确(例如,我经常有想要在代码库或其他数据集上生成的报告)。
我非常好奇其他开发者(那些接受代理编码的人)是如何组织他们的项目的。我的目标是将这在我的团队中标准化。
查看原文
The more I use Claude Code to generate large swaths of systems, the more I feel like we are missing a lot of practices and tools.<p>The first bit that really annoyed me was the lack of tracking prompts. There are lot's of little inputs that inform the what the system should do and it seems to be very ephemeral. I've since started tracking the prompts in the codebase.<p>Another observation is that if you want to have good agentic output, you need to provide lot's of signal into the context window. It seems that being disciplined about what goes into the context window is key. Using AI to generate input files can be dangerous because it adds entropy/noise to the human signal.<p>One practice I have started to do is organize my projects in a certain way:<p>- /specs - Pure human signal such as product vision, requirements, designs, etc.
- /prompts - Agentic recipes such as skills, jobs, AI patterns.
- /references - References that can be used in the context window (brand assets, documents, figma exports, data sets, etc.)
- /plans - The agentic plans for a project. Ususually there are iterations on these plans.
- /build - The codebases and traditional mono repos that are built from plans and prompt interactions.<p>(I have the above with an AGENTS.md as a public GH repo at rekallai/craft)<p>I'm not fully satisfied yet with this structure. I think /plans is a bit of a misnomer the more I use it (e.g. I often have reports that I want to generate on top of the codebase or other data sets).<p>I am really curious how other developers (that embrace agentic coding) here organize their projects. My goal is to standardize this in my teams.