<?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: Vivek Verma</title>
    <description>The latest articles on DEV Community by Vivek Verma (@iamvvekverma).</description>
    <link>https://dev.to/iamvvekverma</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%2F3994123%2Fe3d73910-5258-4cd7-8539-5c0c96acd5b4.png</url>
      <title>DEV Community: Vivek Verma</title>
      <link>https://dev.to/iamvvekverma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iamvvekverma"/>
    <language>en</language>
    <item>
      <title>Check it out</title>
      <dc:creator>Vivek Verma</dc:creator>
      <pubDate>Sat, 20 Jun 2026 13:11:43 +0000</pubDate>
      <link>https://dev.to/iamvvekverma/check-it-out-1ed9</link>
      <guid>https://dev.to/iamvvekverma/check-it-out-1ed9</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/iamvvekverma/i-built-a-dead-code-forensics-cli-because-this-file-is-unused-is-never-enough-4klo" class="crayons-story__hidden-navigation-link"&gt;I built a dead code forensics CLI because "this file is unused" is never enough&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="/iamvvekverma" 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%2F3994123%2Fe3d73910-5258-4cd7-8539-5c0c96acd5b4.png" alt="iamvvekverma profile" class="crayons-avatar__image" width="96" height="96"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/iamvvekverma" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Vivek Verma
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Vivek Verma
                
              
              &lt;div id="story-author-preview-content-3949159" 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="/iamvvekverma" 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%2F3994123%2Fe3d73910-5258-4cd7-8539-5c0c96acd5b4.png" class="crayons-avatar__image" alt="" width="96" height="96"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Vivek Verma&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/iamvvekverma/i-built-a-dead-code-forensics-cli-because-this-file-is-unused-is-never-enough-4klo" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jun 20&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/iamvvekverma/i-built-a-dead-code-forensics-cli-because-this-file-is-unused-is-never-enough-4klo" id="article-link-3949159"&gt;
          I built a dead code forensics CLI because "this file is unused" is never enough
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag crayons-tag--filled  " href="/t/showdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;showdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cli"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cli&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/sideprojects"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;sideprojects&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/tooling"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;tooling&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/iamvvekverma/i-built-a-dead-code-forensics-cli-because-this-file-is-unused-is-never-enough-4klo" 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/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.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/iamvvekverma/i-built-a-dead-code-forensics-cli-because-this-file-is-unused-is-never-enough-4klo#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;
            2 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>
    </item>
    <item>
      <title>I built a dead code forensics CLI because "this file is unused" is never enough</title>
      <dc:creator>Vivek Verma</dc:creator>
      <pubDate>Sat, 20 Jun 2026 13:06:10 +0000</pubDate>
      <link>https://dev.to/iamvvekverma/i-built-a-dead-code-forensics-cli-because-this-file-is-unused-is-never-enough-4klo</link>
      <guid>https://dev.to/iamvvekverma/i-built-a-dead-code-forensics-cli-because-this-file-is-unused-is-never-enough-4klo</guid>
      <description>&lt;p&gt;Every senior developer has stared at a file and thought: &lt;em&gt;should I delete this?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You run &lt;code&gt;vulture&lt;/code&gt;. You run &lt;code&gt;deadcode&lt;/code&gt;. They both tell you the file has zero import&lt;br&gt;
sites. You hover over the delete key.&lt;/p&gt;

&lt;p&gt;And then you don't delete it. Because you don't actually know &lt;strong&gt;why&lt;/strong&gt; it's there.&lt;/p&gt;

&lt;h2&gt;
  
  
  The real question isn't "is it dead?" — it's "why is it dead?"
&lt;/h2&gt;

&lt;p&gt;Dead code falls into very different categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Category A&lt;/strong&gt; — Accidentally orphaned. A file that got left behind when the&lt;br&gt;
calling code was removed. Safe to delete immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Category B&lt;/strong&gt; — Intentionally parked. "keeping this around until Q2 rollout&lt;br&gt;
completes." The holdback condition may or may not still apply.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Category C&lt;/strong&gt; — Dynamically loaded. Appears dead to static analysis but gets&lt;br&gt;
&lt;code&gt;importlib.import_module()&lt;/code&gt;'d at runtime. Deleting it breaks production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Category D&lt;/strong&gt; — Replaced but not removed. The function was superseded by a better&lt;br&gt;
implementation, the PR was merged, and nobody cleaned up. Safe to delete, but you&lt;br&gt;
need to know &lt;em&gt;what replaced it&lt;/em&gt; to be confident.&lt;/p&gt;

&lt;p&gt;Existing tools treat all four identically: "unused." That's the gap fossil fills.&lt;/p&gt;

&lt;h2&gt;
  
  
  How fossil works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;fossil-code
fossil explain src/billing/legacy_processor.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;fossil runs five stages in under 3 seconds:&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 1: Static Analysis
&lt;/h3&gt;

&lt;p&gt;Python's &lt;code&gt;ast&lt;/code&gt; module builds a symbol table of everything the file exports. Then it&lt;br&gt;
scans every other file in the repo for references — imports, calls, attribute access,&lt;br&gt;
dynamic patterns (&lt;code&gt;importlib&lt;/code&gt;, &lt;code&gt;getattr&lt;/code&gt;, &lt;code&gt;__import__&lt;/code&gt;). This is not grep; it's an&lt;br&gt;
actual AST traversal that understands Python's import semantics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 2: Git History Mining
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;GitPython&lt;/code&gt; traverses &lt;code&gt;git log --follow&lt;/code&gt; for the target file. It walks commits&lt;br&gt;
newest-to-oldest, checking at each step whether any other file in the repo was still&lt;br&gt;
referencing the target. The first commit where all references drop to zero is the&lt;br&gt;
&lt;strong&gt;death commit&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 3: Commit and PR Parsing
&lt;/h3&gt;

&lt;p&gt;The death commit message is parsed for PR references (&lt;code&gt;#441&lt;/code&gt;, &lt;code&gt;PR 441&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;pull request 441&lt;/code&gt;). If found, the PR title and merge context are extracted from the&lt;br&gt;
commit body or (if a GitHub token is configured) via the GitHub API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 4: Pattern Detection
&lt;/h3&gt;

&lt;p&gt;The file's current content is scanned for deferred-deletion patterns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;TODO: remove after X&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;keep for now&lt;/code&gt; / &lt;code&gt;keep around until X&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DEPRECATED&lt;/code&gt; / &lt;code&gt;@deprecated&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;will be removed in version X&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;temporary&lt;/code&gt; / &lt;code&gt;temp fix&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For each pattern, fossil attempts to verify the condition: does a PR with that&lt;br&gt;
description exist and is it merged? Has a git tag for that version been created?&lt;br&gt;
Has the referenced date passed?&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 5: Confidence Scoring
&lt;/h3&gt;

&lt;p&gt;14 weighted signals are aggregated into a 0–100% score:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;Weight&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Zero call sites&lt;/td&gt;
&lt;td&gt;+30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No dynamic references&lt;/td&gt;
&lt;td&gt;+20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Death commit identified&lt;/td&gt;
&lt;td&gt;+15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Temporary hold resolved&lt;/td&gt;
&lt;td&gt;+10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No reflection patterns&lt;/td&gt;
&lt;td&gt;+10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File age &amp;gt; 90 days dead&lt;/td&gt;
&lt;td&gt;+8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PR/migration context found&lt;/td&gt;
&lt;td&gt;+7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dynamic import detected&lt;/td&gt;
&lt;td&gt;−30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reflection detected&lt;/td&gt;
&lt;td&gt;−20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modified &amp;lt; 30 days ago&lt;/td&gt;
&lt;td&gt;−20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unresolved "keep for now"&lt;/td&gt;
&lt;td&gt;−15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language unknown (fallback)&lt;/td&gt;
&lt;td&gt;−15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test file references&lt;/td&gt;
&lt;td&gt;−10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ambiguous death commit&lt;/td&gt;
&lt;td&gt;−10&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The output is a Rich panel with every signal explained, a risk label, and a&lt;br&gt;
suggested action.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scan an entire codebase
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fossil scan ./src &lt;span class="nt"&gt;--threshold&lt;/span&gt; 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Returns a ranked table of all dead files above 80% confidence, with their&lt;br&gt;
dead-since date and risk level. Exit code 4 means nothing above the threshold —&lt;br&gt;
useful for CI gates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current state and roadmap
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Live now (v0.2.0):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;fossil explain&lt;/code&gt; — full forensic report&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fossil scan&lt;/code&gt; — directory scan with confidence threshold&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fossil clean&lt;/code&gt; — prioritized deletion backlog&lt;/li&gt;
&lt;li&gt;Python deep analysis (AST), text fallback for JS/TS/Java/Go&lt;/li&gt;
&lt;li&gt;Pattern detection with condition verification&lt;/li&gt;
&lt;li&gt;Local SQLite caching (cache hits &amp;lt; 100ms)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Coming next:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub/GitLab API integration (PR title/body fetch, &lt;code&gt;--yolo&lt;/code&gt; deletion PR creation)&lt;/li&gt;
&lt;li&gt;LLM narration for human-readable explanations&lt;/li&gt;
&lt;li&gt;tree-sitter for deep multi-language analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;fossil-code  &lt;span class="c"&gt;# Python 3.11+, requires git&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GitHub: &lt;a href="https://github.com/iamvvekverma/fossil" rel="noopener noreferrer"&gt;https://github.com/iamvvekverma/fossil&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The confidence scoring weights are a first attempt — I'd genuinely like feedback on&lt;br&gt;
whether the calibration holds for your codebase. What signal should weigh more? What&lt;br&gt;
am I missing?&lt;/p&gt;

</description>
      <category>cli</category>
      <category>showdev</category>
      <category>sideprojects</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
