tech-debt-visualizer 0.2.16 → 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 +1 -1
- package/dist/llm.js +5 -2
- package/dist/reports/assets/report.css +17 -17
- package/dist/reports/html.js +10 -8
- package/package.json +1 -1
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} (${
|
|
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.
|
|
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
|
|
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.`;
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
body {
|
|
53
53
|
margin: 0;
|
|
54
|
-
font-family: "
|
|
54
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
55
55
|
background: var(--bg);
|
|
56
56
|
color: var(--text);
|
|
57
57
|
min-height: 100vh;
|
|
@@ -457,7 +457,7 @@ body.dashboard-page {
|
|
|
457
457
|
|
|
458
458
|
.panel-title {
|
|
459
459
|
color: var(--text-muted);
|
|
460
|
-
font-family: "
|
|
460
|
+
font-family: "Inter", sans-serif;
|
|
461
461
|
font-size: 0.8rem;
|
|
462
462
|
font-weight: 700;
|
|
463
463
|
letter-spacing: 2px;
|
|
@@ -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
|
|
509
|
+
gap: 0.4rem; /* space between number and "of 100" */
|
|
510
510
|
margin-bottom: 0.5rem;
|
|
511
511
|
}
|
|
512
512
|
|
|
@@ -583,19 +583,19 @@ body.dashboard-page {
|
|
|
583
583
|
}
|
|
584
584
|
|
|
585
585
|
.panel-score-pop .score-num {
|
|
586
|
-
font-family: "
|
|
587
|
-
font-size:
|
|
586
|
+
font-family: "Inter", sans-serif;
|
|
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
|
|
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:
|
|
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.
|
|
606
|
+
padding: 0.45rem 1.1rem;
|
|
607
607
|
border-radius: 50px;
|
|
608
|
-
font-family: "
|
|
609
|
-
font-size:
|
|
608
|
+
font-family: "Inter", sans-serif;
|
|
609
|
+
font-size: 1rem;
|
|
610
610
|
font-weight: 700;
|
|
611
611
|
letter-spacing: 0.5px;
|
|
612
612
|
text-transform: uppercase;
|
|
613
|
-
box-shadow: 0
|
|
614
|
-
margin-bottom: 0.
|
|
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.
|
|
620
|
+
font-size: 0.9rem;
|
|
621
621
|
color: var(--text-muted);
|
|
622
622
|
font-style: italic;
|
|
623
|
-
margin-bottom: 0.
|
|
623
|
+
margin-bottom: 0.35rem;
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
.panel-score-pop .score-stats {
|
|
@@ -691,7 +691,7 @@ body.dashboard-page {
|
|
|
691
691
|
|
|
692
692
|
.priority-inline h4 {
|
|
693
693
|
margin: 0 0 0.25rem;
|
|
694
|
-
font-family: "
|
|
694
|
+
font-family: "Inter", sans-serif;
|
|
695
695
|
font-size: 0.65rem;
|
|
696
696
|
font-weight: 700;
|
|
697
697
|
text-transform: uppercase;
|
|
@@ -902,13 +902,13 @@ body.dashboard-page {
|
|
|
902
902
|
}
|
|
903
903
|
|
|
904
904
|
.debt-list .title {
|
|
905
|
-
font-family: "
|
|
905
|
+
font-family: "Inter", sans-serif;
|
|
906
906
|
font-size: 0.8rem;
|
|
907
907
|
font-weight: 700;
|
|
908
908
|
color: var(--text);
|
|
909
909
|
margin-bottom: 0.15rem;
|
|
910
910
|
}
|
|
911
|
-
.debt-list .meta { font-size: 0.65rem; color: var(--text-dim); display: block; margin-top: 0.1rem; font-family: "
|
|
911
|
+
.debt-list .meta { font-size: 0.65rem; color: var(--text-dim); display: block; margin-top: 0.1rem; font-family: ui-monospace, "SF Mono", Consolas, monospace; }
|
|
912
912
|
.debt-list-explanation {
|
|
913
913
|
font-size: 0.7rem;
|
|
914
914
|
color: var(--text-muted);
|
package/dist/reports/html.js
CHANGED
|
@@ -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,13 +78,13 @@ 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)} — ${
|
|
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)} — ${
|
|
85
|
+
<meta name="twitter:title" content="${escapeHtml(title)} — ${scoreNum}/100" />
|
|
84
86
|
<meta name="twitter:description" content="${escapeHtml(cleanliness.label)}: ${escapeHtml(cleanliness.description)}" />
|
|
85
|
-
<link href="https://fonts.googleapis.com/css2?family=
|
|
87
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
|
86
88
|
<style>${css}</style>
|
|
87
89
|
</head>
|
|
88
90
|
<body class="dashboard-page">
|
|
@@ -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 ${
|
|
97
|
-
<span class="dashboard-score-value">${
|
|
98
|
-
<span class="dashboard-score-of">/
|
|
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">${
|
|
116
|
-
<span class="score-of">of
|
|
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.
|
|
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",
|