<?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: motiram shinde</title>
    <description>The latest articles on DEV Community by motiram shinde (@motiramshinde).</description>
    <link>https://dev.to/motiramshinde</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3777419%2F8cc0b8e8-54ea-44be-94d3-d0790f88a471.jpg</url>
      <title>DEV Community: motiram shinde</title>
      <link>https://dev.to/motiramshinde</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/motiramshinde"/>
    <language>en</language>
    <item>
      <title>cognitive-debt: Measure Code Readability Before It Becomes a Problem</title>
      <dc:creator>motiram shinde</dc:creator>
      <pubDate>Tue, 17 Feb 2026 11:06:12 +0000</pubDate>
      <link>https://dev.to/motiramshinde/cognitive-debt-measure-code-readability-before-it-becomes-a-problem-1nbi</link>
      <guid>https://dev.to/motiramshinde/cognitive-debt-measure-code-readability-before-it-becomes-a-problem-1nbi</guid>
      <description>&lt;p&gt;We've all been there. You find a file that "works perfectly" but nobody dares touch it. The tests pass. There are no bugs. Yet the moment you try to refactor it, you realize why everyone avoids it—it's impossible to understand.&lt;/p&gt;

&lt;p&gt;That's &lt;strong&gt;cognitive debt&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Unlike technical debt (which measures bugs and violations), cognitive debt measures the mental effort required to read, understand, and safely modify code.&lt;/p&gt;

&lt;p&gt;Today, we're announcing three powerful new features that make cognitive-debt even more useful for teams.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Cognitive Debt?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Cognitive Debt is the accumulated mental effort required to understand, predict, and safely modify a system, independent of its functional correctness."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A file can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Syntactically correct&lt;/li&gt;
&lt;li&gt;✅ Fully tested&lt;/li&gt;
&lt;li&gt;✅ Following all linting rules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And still be mentally exhausting to work with.&lt;/p&gt;

&lt;p&gt;Most code quality tools (ESLint, Prettier, SonarQube) focus on &lt;strong&gt;correctness&lt;/strong&gt; or &lt;strong&gt;style&lt;/strong&gt;. cognitive-debt focuses on &lt;strong&gt;comprehension&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem Most Tools Miss
&lt;/h2&gt;

&lt;p&gt;Traditional tools measure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Syntax errors ❌&lt;/li&gt;
&lt;li&gt;Code style violations ❌&lt;/li&gt;
&lt;li&gt;Test coverage ❌&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But they DON'T measure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can a human actually understand this?&lt;/li&gt;
&lt;li&gt;How long will it take to comprehend?&lt;/li&gt;
&lt;li&gt;Will changing this file break other files?&lt;/li&gt;
&lt;li&gt;Is this code getting more or less complex over time?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's the gap cognitive-debt fills.&lt;/p&gt;




&lt;h2&gt;
  
  
  What We're Announcing: 3 New Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. 🎯 Change Impact Forecaster
&lt;/h3&gt;

&lt;p&gt;Before you refactor a file, predict the risk.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cognitive-debt impact src/utils/auth.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Risk Level: HIGH
Ripple Effects: 12 files depend on this
Cognitive Load: 42/100 (Poor)

Actionable Advice:
→ This file is complex AND has high coupling
→ Write regression tests BEFORE making changes
→ Consider breaking it into 3 smaller modules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why this matters:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can see upfront if a refactoring will be risky&lt;/li&gt;
&lt;li&gt;Understand which files are "fragile" despite passing tests&lt;/li&gt;
&lt;li&gt;Make data-driven decisions about refactoring strategy&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. 📉 Cognitive Debt Diff
&lt;/h3&gt;

&lt;p&gt;Track whether your code is improving or degrading over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compare Git branches:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cognitive-debt diff main..feature-branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⚠️ DEBT INCREASED
- Total Lines: +150
- Dependencies: +3
- Avg Function Length: +12 lines

Files Improved:
✅ src/handlers/auth.js (50→65, score improved)
✅ src/utils/validation.js (60→55, cleaner)

Files Degraded:
🚨 src/api/request.js (nesting depth 3→5)
🚨 src/middleware/logger.js (param count 4→7)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why this matters:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prevents cognitive debt from sneaking in&lt;/li&gt;
&lt;li&gt;Developers can see their impact on code quality&lt;/li&gt;
&lt;li&gt;Perfect for code review metrics&lt;/li&gt;
&lt;li&gt;Track progress over sprints and quarters&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. 📊 HTML Reports &amp;amp; JSON Export
&lt;/h3&gt;

&lt;p&gt;Beautiful dashboards for teams + machine-readable data for automation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generate an HTML dashboard:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cognitive-debt src/ &lt;span class="nt"&gt;--output&lt;/span&gt; report.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sample output format example :-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimqpj16utzoodurazifm.png" class="article-body-image-wrapper"&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.amazonaws.com%2Fuploads%2Farticles%2Fimqpj16utzoodurazifm.png" alt=" " width="800" height="890"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Opens in your browser with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Score distribution across all files&lt;/li&gt;
&lt;li&gt;Interactive charts and visualizations&lt;/li&gt;
&lt;li&gt;Time-to-understand estimates&lt;/li&gt;
&lt;li&gt;Detailed breakdowns per file&lt;/li&gt;
&lt;li&gt;Recommended refactoring priorities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Generate JSON for automation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cognitive-debt src/ &lt;span class="nt"&gt;--output&lt;/span&gt; report.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CI/CD pipelines (fail builds if cognitive debt &amp;gt; threshold)&lt;/li&gt;
&lt;li&gt;Custom dashboards (track trends over time)&lt;/li&gt;
&lt;li&gt;Slack bots (notify team of high-debt files)&lt;/li&gt;
&lt;li&gt;Executive reports (quantify technical burden)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How It Works: The Math Behind It
&lt;/h2&gt;

&lt;p&gt;cognitive-debt measures 5 dimensions:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Naming Clarity&lt;/strong&gt; (30% impact)
&lt;/h3&gt;

&lt;p&gt;Variables like &lt;code&gt;data&lt;/code&gt;, &lt;code&gt;tmp&lt;/code&gt;, &lt;code&gt;obj&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt; force your brain to hold mental mappings. Bad names are the #1 cause of confusion.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Nesting Depth&lt;/strong&gt; (10% per level)
&lt;/h3&gt;

&lt;p&gt;Miller's Law: Your brain holds 7±2 items. Deep nesting (5+ levels) exceeds that limit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Hard to understand (5 levels)&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;active&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;admin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isValid&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="c1"&gt;// Finally, we do something&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Easy to understand (flat)&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;isAuthorizedAdmin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Do something&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. &lt;strong&gt;Parameter Count&lt;/strong&gt; (5% per param)
&lt;/h3&gt;

&lt;p&gt;More parameters = exponentially harder to use correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Easy&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Hard&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;processUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;phone&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;role&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. &lt;strong&gt;Function Length&lt;/strong&gt; (0.5% per line)
&lt;/h3&gt;

&lt;p&gt;Long functions require constant context switching. You scroll to understand one part, lose track of another.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;Dependencies&lt;/strong&gt; (2% per import)
&lt;/h3&gt;

&lt;p&gt;A file importing 15 other modules requires understanding 15 files simultaneously.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Transparency Principle
&lt;/h2&gt;

&lt;p&gt;Unlike other tools (especially AI-powered ones), cognitive-debt uses &lt;strong&gt;simple, auditable math&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can verify the score yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No black boxes&lt;/li&gt;
&lt;li&gt;No ML magic&lt;/li&gt;
&lt;li&gt;No mysterious algorithms&lt;/li&gt;
&lt;li&gt;Just transparent formulas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can even customize thresholds in &lt;code&gt;.cognitivedebtrc.json&lt;/code&gt; for your team's standards.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-World Use Cases
&lt;/h2&gt;

&lt;h3&gt;
  
  
  For Code Reviews
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Reviewer: "Why is this file hard to review?"
cognitive-debt: "50/100 (Fair). Main issues:
- 5 functions over 50 lines
- 7 levels of nesting in auth.js
- 40% of variable names unclear (data, tmp, val)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For Onboarding
&lt;/h3&gt;

&lt;p&gt;New developers can see which files are hardest to understand before diving in.&lt;/p&gt;

&lt;h3&gt;
  
  
  For CI/CD Pipelines
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Fail the build if any file drops below 40/100&lt;/span&gt;
cognitive-debt src/ &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For Refactoring Decisions
&lt;/h3&gt;

&lt;p&gt;Track whether your refactoring actually improved readability:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cognitive-debt diff v1 v2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For Team Metrics
&lt;/h3&gt;

&lt;p&gt;Monthly dashboard showing code quality trends:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is average cognitive debt improving?&lt;/li&gt;
&lt;li&gt;Which files are becoming harder to maintain?&lt;/li&gt;
&lt;li&gt;What's our onboarding burden?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why We Built This
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Reality:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developers spend 70% of their time &lt;strong&gt;reading&lt;/strong&gt; code, not writing it&lt;/li&gt;
&lt;li&gt;Cognitive load is the #1 barrier to onboarding new developers&lt;/li&gt;
&lt;li&gt;"Technical debt" is often really "cognitive debt"&lt;/li&gt;
&lt;li&gt;Most tools ignore this completely&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Our Philosophy:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Transparency&lt;/strong&gt;: You should understand the math&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy&lt;/strong&gt;: Your code never leaves your machine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Education&lt;/strong&gt;: Explain WHY, not just what&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Empathy&lt;/strong&gt;: Code is communication between humans&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Install globally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; cognitive-debt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Analyze your code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cognitive-debt src/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generate reports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cognitive-debt src/ &lt;span class="nt"&gt;--output&lt;/span&gt; report.html
cognitive-debt src/ &lt;span class="nt"&gt;--output&lt;/span&gt; report.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Predict refactoring risk:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cognitive-debt impact src/utils/auth.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Track improvements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cognitive-debt diff main..feature-branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What Makes This Different
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;ESLint/Prettier&lt;/th&gt;
&lt;th&gt;Cyclomatic Complexity&lt;/th&gt;
&lt;th&gt;SonarQube&lt;/th&gt;
&lt;th&gt;cognitive-debt&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Measures&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Syntax &amp;amp; Style&lt;/td&gt;
&lt;td&gt;Logic paths&lt;/td&gt;
&lt;td&gt;Everything&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Readability&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Goal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Consistency&lt;/td&gt;
&lt;td&gt;Testability&lt;/td&gt;
&lt;td&gt;Compliance&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Comprehension&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Errors&lt;/td&gt;
&lt;td&gt;Single number&lt;/td&gt;
&lt;td&gt;Dashboard&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Actionable insights&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Philosophy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;"Is it wrong?"&lt;/td&gt;
&lt;td&gt;"Hard to test?"&lt;/td&gt;
&lt;td&gt;"Compliant?"&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;"Hard to read?"&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Open Source &amp;amp; Community
&lt;/h2&gt;

&lt;p&gt;cognitive-debt is open source on GitHub. We welcome:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feature requests&lt;/li&gt;
&lt;li&gt;Bug reports&lt;/li&gt;
&lt;li&gt;Contributions&lt;/li&gt;
&lt;li&gt;Custom analyzers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📦 &lt;strong&gt;npm&lt;/strong&gt;: &lt;a href="https://www.npmjs.com/package/cognitive-debt" rel="noopener noreferrer"&gt;cognitive-debt&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/motiram944/cognitive-debt" rel="noopener noreferrer"&gt;motiram944/cognitive-debt&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🐛 &lt;strong&gt;Issues&lt;/strong&gt;: &lt;a href="https://github.com/motiram944/cognitive-debt/issues" rel="noopener noreferrer"&gt;Report bugs or request features&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  A Word of Caution
&lt;/h2&gt;

&lt;p&gt;This tool is powerful, but use it wisely:&lt;/p&gt;

&lt;p&gt;❌ &lt;strong&gt;Don't use this to punish developers.&lt;/strong&gt; Cognitive debt is often systemic, not personal.&lt;/p&gt;

&lt;p&gt;❌ &lt;strong&gt;Don't use as a hard gate without discussion.&lt;/strong&gt; Sometimes complex problems require complex solutions.&lt;/p&gt;

&lt;p&gt;❌ &lt;strong&gt;Don't optimize for score alone.&lt;/strong&gt; A score of 100 with wrong logic is useless.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;DO use this to foster empathy&lt;/strong&gt; for future maintainers.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;DO use this to identify risk&lt;/strong&gt; before refactoring.&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;DO use this to improve onboarding&lt;/strong&gt; and developer experience.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Quote
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;"The best code is code that doesn't need to be read. The second-best code is code that's easy to read."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's make our codebases easier to understand. Try cognitive-debt today.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Have questions? Want to contribute? Join us on GitHub!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>codequality</category>
      <category>devtool</category>
    </item>
  </channel>
</rss>
