Open ghodss opened 3 weeks ago
This is a great suggestion! Something along the lines of a .claude-prompt
at the root of your project, where at the beginning of each task this file is always appended to the system prompt?
I definitely agree with this suggestion. I've been testing out custom instructions and I've seen improvements in design consistency and overall output quality.
Custom instructions from a file in the project is could be good for team collaboration, and focused assistance prompting, particular when you specific to focus on one aspect or a page, ClaudeDev does well at this
Yes exactly. The exact file path could even be specified in the settings UI through a dropdown that allows the user to choose between the existing text box or a project file path. The default though should probably be .claude-dev-prompt to properly namespace the file to this specific extension.
It seems like system_prompt.txt in the project root is becoming an informal standard so maybe the extension can read that file?
as a workaround we've been adding "Begin by reviewing instructions.md" in the custom instructions, so far so good
edit: spoke too soon, this is no longer behaving reliably
I've been keeping all my instructions in a markdown for the time being and copying it in each time, I was looking for something just like this! I like the .claude-prompt
syntax since its consistent with many other configs out there.
Good idea, i would suggest to make the name of the file configurable, defaulting to .claude-prompt
I was thinking of submitting this feature request, in my mind - there could be a file per folder and not just in the root. To be able to explain some big and complex sub-feature verbosely, but not include it in the context for unrelated tasks.
there could be a file per folder and not just in the root
At that point, a RAG over the codebase would be the best solution. I'm not sure it would fit in the scope of this project, however. I've been thinking about this recently and the solution I've come up with is a small LLM that would read and improve your prompts using RAG before sending them to the large (expensive) agentic LLM.
So your initial prompt might looks like:
Take a look at
/components/ListA.tsx
. Please ensure that the the list generated by this component follows accessibility best practices.
Then a basic version of the prompt improver might output a prompt like this:
Take a look at
/components/products/ProductList.tsx
. Please ensure that the the list generated by this component follows accessibility best practices. TheProductList
component uses/components/lists/ItemList.tsx
and/components/lists/ItemDetail.tsx
.ItemList
andItemDetail
are also used in/components/cart/ShoppingCard.tsx
and/components/orders/RecentOrder.tsx
. Please ensure that all files continue to work following any changes that you make.
Claude Dev is especially powerful when augmented with extensive custom instructions that inform the AI about the design of the project, API's of significant libraries or services in use, the architecture of the application, and so on. But currently custom instructions can only be modified manually inside the GUI. By implementing an option to have Claude Dev source custom instructions from a file inside my project, I can both: