tech-debt-visualizer 0.2.17 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -195,7 +195,7 @@ function printCliReport(run, ci) {
195
195
  process.stdout.write(chalk.bold.dim(" Technical Debt Cleanliness Score\n"));
196
196
  process.stdout.write(" " + "—".repeat(52) + "\n");
197
197
  const tierColor = cleanlinessTierColor(cleanliness.tier);
198
- process.stdout.write(tierColor(` ${cleanliness.label} (${cleanliness.tier}/5)\n`));
198
+ process.stdout.write(tierColor(` ${cleanliness.label} (${Math.round(score)}/100)\n`));
199
199
  process.stdout.write(tierColor(` ${cleanliness.description}\n`));
200
200
  process.stdout.write(" " + "—".repeat(52) + "\n\n");
201
201
  process.stdout.write(chalk.bold(" Summary\n"));
package/dist/llm.js CHANGED
@@ -318,14 +318,17 @@ export async function assessOverallCleanliness(run, config = {}) {
318
318
  const debtCount = run.debtItems.length;
319
319
  const criticalHigh = run.debtItems.filter((d) => d.severity === "critical" || d.severity === "high").length;
320
320
  const hotspots = run.fileMetrics.filter((m) => (m.hotspotScore ?? 0) > 0.3).length;
321
+ const allFiles = run.fileMetrics.map((m) => m.file);
321
322
  const topFiles = run.fileMetrics
322
323
  .sort((a, b) => (b.hotspotScore ?? 0) - (a.hotspotScore ?? 0))
323
324
  .slice(0, 12)
324
325
  .map((m) => m.file);
325
- const prompt = `Codebase summary: ${fileCount} files, ${debtCount} debt items (${criticalHigh} critical/high), ${hotspots} hotspots. Top risk files: ${topFiles.join(", ")}
326
+ const prompt = `Codebase summary: ${fileCount} files, ${debtCount} debt items (${criticalHigh} critical/high), ${hotspots} hotspots.
327
+ All files in this codebase: ${allFiles.join(", ")}
328
+ Top risk files (by hotspot): ${topFiles.join(", ")}
326
329
 
327
330
  Output only:
328
- 1. A two- to four-sentence summary of the main issues (strengths, concerns, single most important improvement). No code block unless absolutely necessary to demonstrate.
331
+ 1. A single paragraph of 7–10 sentences that gives full context for the whole codebase. Cover ALL files: briefly note which files or areas are in good shape, which have issues, and how they fit together. Include strengths, main concerns, and the single most important improvement. Write for someone who needs to understand the entire codebase, not just the problematic parts. No code block unless absolutely necessary.
329
332
  2. On the next line write only one word: critical, high, medium, low, or none (overall codebase technical debt severity).
330
333
  3. On the line after that write only a number 0-100 (100 = most debt).
331
334
  No preamble.`;
@@ -506,7 +506,7 @@ body.dashboard-page {
506
506
  display: flex;
507
507
  align-items: baseline;
508
508
  justify-content: center;
509
- gap: 0.4rem; /* space between number and "of 5" */
509
+ gap: 0.4rem; /* space between number and "of 100" */
510
510
  margin-bottom: 0.5rem;
511
511
  }
512
512
 
@@ -584,18 +584,18 @@ body.dashboard-page {
584
584
 
585
585
  .panel-score-pop .score-num {
586
586
  font-family: "Inter", sans-serif;
587
- font-size: 2.5rem;
587
+ font-size: 3.25rem;
588
588
  font-weight: 800;
589
589
  line-height: 1;
590
590
  background: linear-gradient(180deg, var(--accent-orange) 0%, var(--accent-red) 100%);
591
591
  -webkit-background-clip: text;
592
592
  -webkit-text-fill-color: transparent;
593
593
  background-clip: text;
594
- filter: drop-shadow(0 0 16px rgba(255, 107, 53, 0.3));
594
+ filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.35));
595
595
  }
596
596
 
597
597
  .panel-score-pop .score-of {
598
- font-size: 1rem;
598
+ font-size: 1.35rem;
599
599
  font-weight: 700;
600
600
  color: var(--text-muted);
601
601
  }
@@ -603,24 +603,24 @@ body.dashboard-page {
603
603
  .panel-score-pop .score-label {
604
604
  display: inline-block;
605
605
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
606
- padding: 0.25rem 0.65rem;
606
+ padding: 0.45rem 1.1rem;
607
607
  border-radius: 50px;
608
608
  font-family: "Inter", sans-serif;
609
- font-size: 0.7rem;
609
+ font-size: 1rem;
610
610
  font-weight: 700;
611
611
  letter-spacing: 0.5px;
612
612
  text-transform: uppercase;
613
- box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
614
- margin-bottom: 0.2rem;
613
+ box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
614
+ margin-bottom: 0.35rem;
615
615
  -webkit-text-fill-color: initial;
616
616
  color: #fff;
617
617
  }
618
618
 
619
619
  .panel-score-pop .score-desc {
620
- font-size: 0.75rem;
620
+ font-size: 0.9rem;
621
621
  color: var(--text-muted);
622
622
  font-style: italic;
623
- margin-bottom: 0.25rem;
623
+ margin-bottom: 0.35rem;
624
624
  }
625
625
 
626
626
  .panel-score-pop .score-stats {
@@ -47,6 +47,7 @@ function adjustHexBrightness(hex, factor) {
47
47
  function buildHtml(run, title, darkMode, css, script) {
48
48
  const theme = darkMode ? "dark" : "light";
49
49
  const debtScore = getDebtScore(run);
50
+ const scoreNum = Math.round(Math.max(0, Math.min(100, debtScore)));
50
51
  const cleanliness = getCleanlinessTier(debtScore);
51
52
  const hasLlm = !!(run.llmOverallAssessment || run.llmOverallRaw);
52
53
  const dataJson = JSON.stringify({
@@ -60,6 +61,7 @@ function buildHtml(run, title, darkMode, css, script) {
60
61
  filesAnalyzed: run.fileMetrics.length,
61
62
  debtCount: run.debtItems.length,
62
63
  debtScore,
64
+ cleanlinessScore: scoreNum,
63
65
  cleanlinessTier: cleanliness.tier,
64
66
  cleanlinessLabel: cleanliness.label,
65
67
  cleanlinessDescription: cleanliness.description,
@@ -76,11 +78,11 @@ function buildHtml(run, title, darkMode, css, script) {
76
78
  <meta charset="UTF-8" />
77
79
  <meta name="viewport" content="width=device-width, initial-scale=1" />
78
80
  <title>${escapeHtml(title)}</title>
79
- <meta property="og:title" content="${escapeHtml(title)} — ${cleanliness.tier}/5 ${escapeHtml(cleanliness.label)}" />
81
+ <meta property="og:title" content="${escapeHtml(title)} — ${scoreNum}/100 ${escapeHtml(cleanliness.label)}" />
80
82
  <meta property="og:description" content="${escapeHtml(cleanliness.description)}" />
81
83
  <meta property="og:type" content="website" />
82
84
  <meta name="twitter:card" content="summary" />
83
- <meta name="twitter:title" content="${escapeHtml(title)} — ${cleanliness.tier}/5" />
85
+ <meta name="twitter:title" content="${escapeHtml(title)} — ${scoreNum}/100" />
84
86
  <meta name="twitter:description" content="${escapeHtml(cleanliness.label)}: ${escapeHtml(cleanliness.description)}" />
85
87
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
86
88
  <style>${css}</style>
@@ -93,9 +95,9 @@ function buildHtml(run, title, darkMode, css, script) {
93
95
  <span class="dashboard-meta">${escapeHtml(run.repoPath)}</span>
94
96
  </div>
95
97
  <div class="dashboard-header-right">
96
- <div class="dashboard-score tier-${cleanliness.tier}" aria-label="Score ${cleanliness.tier} of 5">
97
- <span class="dashboard-score-value">${cleanliness.tier}</span>
98
- <span class="dashboard-score-of">/ 5</span>
98
+ <div class="dashboard-score tier-${cleanliness.tier}" aria-label="Score ${scoreNum} of 100">
99
+ <span class="dashboard-score-value">${scoreNum}</span>
100
+ <span class="dashboard-score-of">/ 100</span>
99
101
  <span class="dashboard-score-label">${escapeHtml(cleanliness.label)}</span>
100
102
  </div>
101
103
  <button type="button" class="btn-ai-prompts btn-ai-prompts-header" id="btnAiPrompts">AI cleanup prompts</button>
@@ -112,8 +114,8 @@ function buildHtml(run, title, darkMode, css, script) {
112
114
  </div>
113
115
  <div class="panel-body panel-body-score">
114
116
  <div class="score-numeric">
115
- <span class="score-num">${cleanliness.tier}</span>
116
- <span class="score-of">of 5</span>
117
+ <span class="score-num">${scoreNum}</span>
118
+ <span class="score-of">of 100</span>
117
119
  </div>
118
120
  <p class="score-label">${escapeHtml(cleanliness.label)}</p>
119
121
  <p class="score-desc">${escapeHtml(cleanliness.description)}</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tech-debt-visualizer",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "Language-agnostic CLI that analyzes repos and generates interactive technical debt visualizations with AI-powered insights",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",