Teach a common sense to use predeveloped solution rather recreating same

Please teach AI coding models to inspect the entire existing project before designing or building anything new.

Before creating code, a package, a database layer, UI, API, or architecture, the model should first understand:

  1. Existing directories, modules, documentation, dependencies, and conventions.
  2. What solutions are already implemented or partially implemented.
  3. Which maintained tools, libraries, or platform features already solve the problem.
  4. Whether the best path is to extend, configure, or integrate an existing solution instead of recreating it.

AI should actively recommend proven solutions made by people and teams who have already invested time, money, research, maintenance, security work, and real-world testing. The point of using AI should be to save effort by building on that work—not to spend the same effort recreating it from scratch.

A model should create a new custom solution only after it has clearly shown that existing code, installed libraries, or established tools cannot meet the requirement. It should explain that finding and get confirmation before implementation.

Are AI coding models trained or incentivized to consume more tokens and generate higher bills, even when an existing solution in the codebase or ecosystem could solve the problem with less work?

A few suggestions:

  • Use the filename consistently. Both AGENT.md and AGENTS.md are mentioned; use whichever your tooling recognizes, commonly AGENTS.md.
  • Instead of saying “read and understand all documentation before beginning any work,” make the requirement more actionable: “Read AGENTS.md first, then consult the linked documentation relevant to the task.” Requiring all documentation may waste time on unrelated material.
  • Include the essentials: repository structure, build/test/lint commands, coding conventions, files that should not be modified, and the definition of done.
  • Keep detailed guidance in separate documents and link to it from AGENTS.md. Concision should be based on relevance rather than an arbitrary line limit.
  • Make sure instructions remain current and testable. Stale commands or inaccurate architecture notes can be worse than missing guidance.
  • If an agent ignores an instruction, point it to the specific rule and ask it to revise its plan or work. Repeated failures may mean the instruction is ambiguous, conflicting, or too deeply buried.

A stronger opening could be:

“Before making changes, read this file and any linked documentation relevant to the task. Follow the repository structure, commands, constraints, and validation steps below.”

Hi @developerpaddy!

Thanks for sharing your thoughts! I see your point about prioritizing existing solutions before building from scratch. As @illpromusic, suggested, using an AGENTS.md file can help guide coding agents.

I appreciate your feedback and will pass it along internally. While I can't provide implementation timelines or ongoing updates, your input helps improve the experience.

-Basil