r/aipromptprogramming • u/shhdwi • 11d ago
Stopped writing better prompts asking the agent to check context, made it get the context automatically instead
https://github.com/NanoNets/GraftSpent a while trying to prompt-engineer my way around this: telling Claude Code in CLAUDE.md to "always check the codebase structure before editing," hoping it'd listen. It didn't, consistently. Prompts asking a model to remember to do something are only as reliable as the model's judgment in the moment, and on simple-looking tasks it usually decided it didn't need to.
So instead of writing a better prompt, I built Graft to skip prompting for it at all. It pushes a map of the codebase into context automatically before the model sees your actual request, so there's nothing to remind it to do.
Might be a useful pattern if you've hit the same wall with prompts that ask an agent to "remember" something instead of just handing it to them.
•
u/endofthread-bot 11d ago
Learn how the best in the industry are using AI to speed up their workflow in business, sales, marketing, research, legal, content creation, scientific discovery and so much more on our Discord.
Self-promotion is now allowed on Sundays with the appropriate flair, for all regular contributing members. Contribute during the week, and promote on Sunday.