<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ganesh Sharma</title>
    <description>The latest articles on DEV Community by Ganesh Sharma (@ganesh_sharmaz).</description>
    <link>https://dev.to/ganesh_sharmaz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2211677%2Fd8d2b7d1-ad79-4ac7-aa9a-3a445aa91ffa.jpg</url>
      <title>DEV Community: Ganesh Sharma</title>
      <link>https://dev.to/ganesh_sharmaz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ganesh_sharmaz"/>
    <language>en</language>
    <item>
      <title>Improving the Codebase with new AI Era</title>
      <dc:creator>Ganesh Sharma</dc:creator>
      <pubDate>Mon, 13 Jul 2026 12:48:02 +0000</pubDate>
      <link>https://dev.to/ganesh_sharmaz/-4iid</link>
      <guid>https://dev.to/ganesh_sharmaz/-4iid</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/ganesh_sharmaz/ai-first-codebases-why-every-developer-should-start-writing-comments-for-ai-agents-3a2j" class="crayons-story__hidden-navigation-link"&gt;Why I Started Writing Code for AI, Not Just Humans&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/ganesh_sharmaz" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2211677%2Fd8d2b7d1-ad79-4ac7-aa9a-3a445aa91ffa.jpg" alt="ganesh_sharmaz profile" class="crayons-avatar__image" width="450" height="450"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/ganesh_sharmaz" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Ganesh Sharma
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Ganesh Sharma
                
              
              &lt;div id="story-author-preview-content-4133286" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/ganesh_sharmaz" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2211677%2Fd8d2b7d1-ad79-4ac7-aa9a-3a445aa91ffa.jpg" class="crayons-avatar__image" alt="" width="450" height="450"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Ganesh Sharma&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/ganesh_sharmaz/ai-first-codebases-why-every-developer-should-start-writing-comments-for-ai-agents-3a2j" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 13&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/ganesh_sharmaz/ai-first-codebases-why-every-developer-should-start-writing-comments-for-ai-agents-3a2j" id="article-link-4133286"&gt;
          Why I Started Writing Code for AI, Not Just Humans
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/productivity"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;productivity&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/coding"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;coding&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/agentskills"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;agentskills&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/ganesh_sharmaz/ai-first-codebases-why-every-developer-should-start-writing-comments-for-ai-agents-3a2j" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt;&amp;nbsp;reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/ganesh_sharmaz/ai-first-codebases-why-every-developer-should-start-writing-comments-for-ai-agents-3a2j#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Why I Started Writing Code for AI, Not Just Humans</title>
      <dc:creator>Ganesh Sharma</dc:creator>
      <pubDate>Mon, 13 Jul 2026 12:18:41 +0000</pubDate>
      <link>https://dev.to/ganesh_sharmaz/ai-first-codebases-why-every-developer-should-start-writing-comments-for-ai-agents-3a2j</link>
      <guid>https://dev.to/ganesh_sharmaz/ai-first-codebases-why-every-developer-should-start-writing-comments-for-ai-agents-3a2j</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What if the biggest problem with AI coding assistants isn't the&lt;br&gt;
AI... but the way we write our code?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you've ever asked Claude Code, Codex, Cursor, or ChatGPT to modify a&lt;br&gt;
feature, you've probably seen this happen.&lt;/p&gt;

&lt;p&gt;The AI confidently changes a component.&lt;/p&gt;

&lt;p&gt;Everything looks perfect.&lt;/p&gt;

&lt;p&gt;Then another page breaks because the component was used somewhere the AI&lt;br&gt;
never checked.&lt;/p&gt;

&lt;p&gt;You blame the AI.&lt;/p&gt;

&lt;p&gt;I used to do the same.&lt;/p&gt;

&lt;p&gt;Then I realized something.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The AI wasn't missing programming knowledge. It was missing context.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That changed how I write code.&lt;/p&gt;

&lt;p&gt;Today, I don't just write code for the next developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I write code for the next AI agent that opens my repository.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  AI Doesn't Read Your Project the Way You Do
&lt;/h2&gt;

&lt;p&gt;When you open your project, you already know things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  where files belong&lt;/li&gt;
&lt;li&gt;  which components are shared&lt;/li&gt;
&lt;li&gt;  what architectural rules exist&lt;/li&gt;
&lt;li&gt;  which hooks have side effects&lt;/li&gt;
&lt;li&gt;  why a strange workaround exists&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An AI doesn't.&lt;/p&gt;

&lt;p&gt;Every task starts with exploration.&lt;/p&gt;

&lt;p&gt;It searches.&lt;/p&gt;

&lt;p&gt;It opens files.&lt;/p&gt;

&lt;p&gt;It follows imports.&lt;/p&gt;

&lt;p&gt;It tries to reconstruct your architecture from scratch.&lt;/p&gt;

&lt;p&gt;Because every model has a limited context window and reasoning budget,&lt;br&gt;
every unnecessary search increases the chance that something important&lt;br&gt;
gets missed.&lt;/p&gt;

&lt;p&gt;The goal isn't to make AI smarter.&lt;/p&gt;

&lt;p&gt;The goal is to make your project easier to understand.&lt;/p&gt;


&lt;h1&gt;
  
  
  1. Tell the AI Where It Is
&lt;/h1&gt;

&lt;p&gt;Start every important file with its project path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// File: /src/components/common/Button.tsx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside VS Code, this isn't always necessary because agents already know&lt;br&gt;
your workspace.&lt;/p&gt;

&lt;p&gt;But when you paste a file into ChatGPT or Claude on the web, this tiny&lt;br&gt;
comment immediately tells the model where the file belongs, what&lt;br&gt;
conventions you're following, and how imports are likely organized.&lt;/p&gt;

&lt;p&gt;One line.&lt;/p&gt;

&lt;p&gt;A surprising amount of context.&lt;/p&gt;


&lt;h1&gt;
  
  
  2. Tell the AI Who Depends on This File
&lt;/h1&gt;

&lt;p&gt;One thing AI agents regularly miss is downstream impact.&lt;/p&gt;

&lt;p&gt;The parent imports the child.&lt;/p&gt;

&lt;p&gt;The child doesn't know who imports it.&lt;/p&gt;

&lt;p&gt;So add that information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Used in:&lt;/span&gt;
&lt;span class="c1"&gt;// - /src/pages/Login.tsx&lt;/span&gt;
&lt;span class="c1"&gt;// - /src/pages/Register.tsx&lt;/span&gt;
&lt;span class="c1"&gt;// - /src/pages/Profile.tsx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the AI knows exactly where changes should be verified before&lt;br&gt;
declaring the task complete.&lt;/p&gt;

&lt;p&gt;That isn't just useful for AI.&lt;/p&gt;

&lt;p&gt;Future-you will thank you too.&lt;/p&gt;


&lt;h1&gt;
  
  
  3. Explain the Purpose Before the Implementation
&lt;/h1&gt;

&lt;p&gt;Don't make an AI read 500 lines just to answer:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"What does this file do?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * Handles login, registration,
 * validation and API submission.
 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the model can quickly decide whether this file matters before&lt;br&gt;
spending valuable context reading the implementation.&lt;/p&gt;


&lt;h1&gt;
  
  
  4. Give Every Major Feature Its Own README
&lt;/h1&gt;

&lt;p&gt;This has become one of my favorite habits.&lt;/p&gt;

&lt;p&gt;Instead of making an AI inspect twenty files just to understand&lt;br&gt;
Authentication, give it an entry point.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/features/auth/README.md
/features/dashboard/README.md
/features/payroll/README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;A good feature README should answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  What is this module responsible for?&lt;/li&gt;
&lt;li&gt;  Which files are the entry points?&lt;/li&gt;
&lt;li&gt;  Which services does it use?&lt;/li&gt;
&lt;li&gt;  What architectural rules should never be broken?&lt;/li&gt;
&lt;li&gt;  Which modules depend on it?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it as onboarding documentation---not only for developers, but&lt;br&gt;
for AI agents too.&lt;/p&gt;


&lt;h1&gt;
  
  
  5. Document Constraints
&lt;/h1&gt;

&lt;p&gt;Tell the AI what &lt;strong&gt;not&lt;/strong&gt; to do.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * Never call authentication APIs directly.
 * Always use authService.
 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fewer assumptions an AI has to make, the fewer mistakes it will&lt;br&gt;
make.&lt;/p&gt;


&lt;h1&gt;
  
  
  6. Document Side Effects
&lt;/h1&gt;

&lt;p&gt;If changing one hook affects five screens, don't hide that knowledge.&lt;/p&gt;

&lt;p&gt;Write it down.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * Affects:
 * - Dashboard
 * - Notifications
 * - Analytics
 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now impact analysis becomes dramatically easier.&lt;/p&gt;




&lt;h1&gt;
  
  
  Comments Aren't the Point
&lt;/h1&gt;

&lt;p&gt;This isn't really about comments.&lt;/p&gt;

&lt;p&gt;It's about &lt;strong&gt;metadata&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Good metadata answers questions before they're asked.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  What is this?&lt;/li&gt;
&lt;li&gt;  Why does it exist?&lt;/li&gt;
&lt;li&gt;  Who uses it?&lt;/li&gt;
&lt;li&gt;  What should never change?&lt;/li&gt;
&lt;li&gt;  Where should related changes happen?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether the reader is human or AI, that information has value.&lt;/p&gt;




&lt;h1&gt;
  
  
  Will This Actually Improve AI Output?
&lt;/h1&gt;

&lt;p&gt;In my experience, yes.&lt;/p&gt;

&lt;p&gt;Not because the AI suddenly becomes more intelligent.&lt;/p&gt;

&lt;p&gt;Because it spends less time guessing.&lt;/p&gt;

&lt;p&gt;Modern AI coding assistants already know how to write code.&lt;/p&gt;

&lt;p&gt;What they often lack is project-specific knowledge.&lt;/p&gt;

&lt;p&gt;The more structured context you provide, the better their decisions&lt;br&gt;
become.&lt;/p&gt;

&lt;p&gt;You're not optimizing the model.&lt;/p&gt;

&lt;p&gt;You're optimizing the environment the model works in.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Small Shift With Big Consequences
&lt;/h2&gt;

&lt;p&gt;For years we've optimized code for humans.&lt;/p&gt;

&lt;p&gt;Readable names.&lt;/p&gt;

&lt;p&gt;Clean architecture.&lt;/p&gt;

&lt;p&gt;Good documentation.&lt;/p&gt;

&lt;p&gt;Now there's another reader sitting beside us.&lt;/p&gt;

&lt;p&gt;It writes code.&lt;/p&gt;

&lt;p&gt;Reviews pull requests.&lt;/p&gt;

&lt;p&gt;Refactors components.&lt;/p&gt;

&lt;p&gt;Finds bugs.&lt;/p&gt;

&lt;p&gt;That reader is AI.&lt;/p&gt;

&lt;p&gt;Maybe it's time we started designing our codebases with both audiences&lt;br&gt;
in mind.&lt;/p&gt;

&lt;p&gt;The future isn't just clean code.&lt;/p&gt;

&lt;p&gt;It's &lt;strong&gt;AI-readable code&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>coding</category>
      <category>agentskills</category>
    </item>
  </channel>
</rss>
