@neuralaxis/vibedoctor 0.1.0
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/LICENSE +232 -0
- package/README.md +280 -0
- package/dist/adapters/biome.d.ts +2 -0
- package/dist/adapters/biome.js +66 -0
- package/dist/adapters/coveragePy.d.ts +2 -0
- package/dist/adapters/coveragePy.js +56 -0
- package/dist/adapters/customDeadChain.d.ts +20 -0
- package/dist/adapters/customDeadChain.js +243 -0
- package/dist/adapters/customLeftovers.d.ts +2 -0
- package/dist/adapters/customLeftovers.js +244 -0
- package/dist/adapters/customRefactor.d.ts +2 -0
- package/dist/adapters/customRefactor.js +176 -0
- package/dist/adapters/deptry.d.ts +2 -0
- package/dist/adapters/deptry.js +59 -0
- package/dist/adapters/gitleaks.d.ts +2 -0
- package/dist/adapters/gitleaks.js +47 -0
- package/dist/adapters/index.d.ts +16 -0
- package/dist/adapters/index.js +35 -0
- package/dist/adapters/jest.d.ts +2 -0
- package/dist/adapters/jest.js +62 -0
- package/dist/adapters/jscpd.d.ts +2 -0
- package/dist/adapters/jscpd.js +59 -0
- package/dist/adapters/knip.d.ts +2 -0
- package/dist/adapters/knip.js +75 -0
- package/dist/adapters/lizard.d.ts +2 -0
- package/dist/adapters/lizard.js +45 -0
- package/dist/adapters/osvScanner.d.ts +2 -0
- package/dist/adapters/osvScanner.js +68 -0
- package/dist/adapters/pyright.d.ts +2 -0
- package/dist/adapters/pyright.js +52 -0
- package/dist/adapters/radon.d.ts +2 -0
- package/dist/adapters/radon.js +45 -0
- package/dist/adapters/ruff.d.ts +2 -0
- package/dist/adapters/ruff.js +71 -0
- package/dist/adapters/semgrep.d.ts +2 -0
- package/dist/adapters/semgrep.js +64 -0
- package/dist/adapters/shared.d.ts +23 -0
- package/dist/adapters/shared.js +2 -0
- package/dist/adapters/tsc.d.ts +2 -0
- package/dist/adapters/tsc.js +57 -0
- package/dist/adapters/vitest.d.ts +2 -0
- package/dist/adapters/vitest.js +62 -0
- package/dist/adapters/vulture.d.ts +2 -0
- package/dist/adapters/vulture.js +59 -0
- package/dist/agentPack/generateAgentPack.d.ts +48 -0
- package/dist/agentPack/generateAgentPack.js +219 -0
- package/dist/agentPack/policy.d.ts +19 -0
- package/dist/agentPack/policy.js +117 -0
- package/dist/agentPack/templates/index.d.ts +7 -0
- package/dist/agentPack/templates/index.js +134 -0
- package/dist/agentPack/templates/skills.d.ts +7 -0
- package/dist/agentPack/templates/skills.js +337 -0
- package/dist/cli/commands/agent.d.ts +22 -0
- package/dist/cli/commands/agent.js +57 -0
- package/dist/cli/commands/agentPlan.d.ts +1 -0
- package/dist/cli/commands/agentPlan.js +12 -0
- package/dist/cli/commands/baseline.d.ts +1 -0
- package/dist/cli/commands/baseline.js +8 -0
- package/dist/cli/commands/explain.d.ts +1 -0
- package/dist/cli/commands/explain.js +35 -0
- package/dist/cli/commands/fix.d.ts +1 -0
- package/dist/cli/commands/fix.js +19 -0
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.js +101 -0
- package/dist/cli/commands/report.d.ts +1 -0
- package/dist/cli/commands/report.js +25 -0
- package/dist/cli/commands/scan.d.ts +14 -0
- package/dist/cli/commands/scan.js +61 -0
- package/dist/cli/commands/setup.d.ts +35 -0
- package/dist/cli/commands/setup.js +326 -0
- package/dist/cli/commands/shared.d.ts +8 -0
- package/dist/cli/commands/shared.js +29 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +148 -0
- package/dist/core/baseline.d.ts +7 -0
- package/dist/core/baseline.js +33 -0
- package/dist/core/config.d.ts +72 -0
- package/dist/core/config.js +236 -0
- package/dist/core/engine.d.ts +87 -0
- package/dist/core/engine.js +437 -0
- package/dist/core/finding.d.ts +40 -0
- package/dist/core/finding.js +141 -0
- package/dist/core/git.d.ts +3 -0
- package/dist/core/git.js +67 -0
- package/dist/core/paths.d.ts +7 -0
- package/dist/core/paths.js +104 -0
- package/dist/core/projectDetector.d.ts +17 -0
- package/dist/core/projectDetector.js +160 -0
- package/dist/core/scanPlanner.d.ts +11 -0
- package/dist/core/scanPlanner.js +47 -0
- package/dist/core/scoring.d.ts +8 -0
- package/dist/core/scoring.js +57 -0
- package/dist/core/toolRunner.d.ts +24 -0
- package/dist/core/toolRunner.js +130 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +23 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +141 -0
- package/dist/mcp/tools/explainFinding.d.ts +2 -0
- package/dist/mcp/tools/explainFinding.js +23 -0
- package/dist/mcp/tools/fixSafe.d.ts +2 -0
- package/dist/mcp/tools/fixSafe.js +15 -0
- package/dist/mcp/tools/getAgentPlan.d.ts +2 -0
- package/dist/mcp/tools/getAgentPlan.js +31 -0
- package/dist/mcp/tools/getReport.d.ts +2 -0
- package/dist/mcp/tools/getReport.js +26 -0
- package/dist/mcp/tools/index.d.ts +1 -0
- package/dist/mcp/tools/index.js +19 -0
- package/dist/mcp/tools/scanChanged.d.ts +2 -0
- package/dist/mcp/tools/scanChanged.js +23 -0
- package/dist/mcp/tools/scanFull.d.ts +2 -0
- package/dist/mcp/tools/scanFull.js +23 -0
- package/dist/mcp/tools/shared.d.ts +51 -0
- package/dist/mcp/tools/shared.js +126 -0
- package/dist/mcp/tools/verify.d.ts +2 -0
- package/dist/mcp/tools/verify.js +21 -0
- package/dist/reporters/agent.d.ts +3 -0
- package/dist/reporters/agent.js +48 -0
- package/dist/reporters/html.d.ts +2 -0
- package/dist/reporters/html.js +81 -0
- package/dist/reporters/json.d.ts +2 -0
- package/dist/reporters/json.js +18 -0
- package/dist/reporters/markdown.d.ts +2 -0
- package/dist/reporters/markdown.js +33 -0
- package/dist/reporters/sarif.d.ts +2 -0
- package/dist/reporters/sarif.js +38 -0
- package/dist/reporters/terminal.d.ts +2 -0
- package/dist/reporters/terminal.js +11 -0
- package/dist/rules/leftoverPatterns.d.ts +7 -0
- package/dist/rules/leftoverPatterns.js +10 -0
- package/dist/rules/refactorRules.d.ts +13 -0
- package/dist/rules/refactorRules.js +16 -0
- package/dist/rules/severityMap.d.ts +15 -0
- package/dist/rules/severityMap.js +33 -0
- package/package.json +72 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderHtmlReport = renderHtmlReport;
|
|
4
|
+
function renderHtmlReport(scan) {
|
|
5
|
+
const severityColor = (sev) => {
|
|
6
|
+
if (sev === "critical")
|
|
7
|
+
return "#b91c1c";
|
|
8
|
+
if (sev === "high")
|
|
9
|
+
return "#dc2626";
|
|
10
|
+
if (sev === "medium")
|
|
11
|
+
return "#d97706";
|
|
12
|
+
return "#4b5563";
|
|
13
|
+
};
|
|
14
|
+
const renderFindingList = (items, title) => {
|
|
15
|
+
if (!items.length)
|
|
16
|
+
return "";
|
|
17
|
+
const lis = items
|
|
18
|
+
.map((f) => `<li style="margin-bottom:8px"><strong style="color:${severityColor(f.severity)}">${escapeHtml(f.title)}</strong> <span style="color:#6b7280">(${f.severity}, ${f.confidence})</span>${f.file ? ` <code>${escapeHtml(f.file)}${f.startLine ? ":" + f.startLine : ""}</code>` : ""}<br><span>${escapeHtml(f.message)}</span></li>`)
|
|
19
|
+
.join("");
|
|
20
|
+
return `<h3>${title} (${items.length})</h3><ul style="padding-left:20px">${lis}</ul>`;
|
|
21
|
+
};
|
|
22
|
+
const toolList = (tools, label) => {
|
|
23
|
+
if (!tools.length)
|
|
24
|
+
return "";
|
|
25
|
+
const lis = tools
|
|
26
|
+
.map((t) => `<li><strong>${escapeHtml(t.id)}</strong> — ${escapeHtml(t.status || "skipped")}${t.installHint ? ` <em>(${escapeHtml(t.installHint)})</em>` : ""}</li>`)
|
|
27
|
+
.join("");
|
|
28
|
+
return `<h3>${label}</h3><ul>${lis}</ul>`;
|
|
29
|
+
};
|
|
30
|
+
const errored = scan.toolStatuses.filter((t) => t.status === "error" || t.status === "timeout");
|
|
31
|
+
return `<!doctype html>
|
|
32
|
+
<html>
|
|
33
|
+
<head>
|
|
34
|
+
<meta charset="utf-8" />
|
|
35
|
+
<title>VibeDoctor Report — ${escapeHtml(scan.root)}</title>
|
|
36
|
+
<style>
|
|
37
|
+
body { font-family: system-ui, Arial, sans-serif; margin: 32px; color: #111; line-height: 1.5; max-width: 960px; }
|
|
38
|
+
h1 { margin-bottom: 4px; }
|
|
39
|
+
.score { font-size: 1.8em; font-weight: 700; }
|
|
40
|
+
.summary { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0 20px; }
|
|
41
|
+
.pill { background: #f3f4f6; padding: 4px 10px; border-radius: 9999px; font-size: 0.9em; }
|
|
42
|
+
code { background: #f4f4f4; padding: 1px 4px; border-radius: 3px; font-family: ui-monospace, monospace; }
|
|
43
|
+
ul { margin: 8px 0; }
|
|
44
|
+
.section { margin-top: 24px; }
|
|
45
|
+
.meta { color: #6b7280; font-size: 0.85em; }
|
|
46
|
+
</style>
|
|
47
|
+
</head>
|
|
48
|
+
<body>
|
|
49
|
+
<h1>VibeDoctor Health Report</h1>
|
|
50
|
+
<div class="meta">Root: <code>${escapeHtml(scan.root)}</code> · Mode: ${scan.mode} · Generated for agents & humans</div>
|
|
51
|
+
|
|
52
|
+
<div class="score">Health: ${scan.score.overall}/100 ${scan.score.overall >= 85 ? "✅" : "⚠️"}</div>
|
|
53
|
+
|
|
54
|
+
<div class="summary">
|
|
55
|
+
<span class="pill">Blockers: ${scan.blockers.length}</span>
|
|
56
|
+
<span class="pill">Fix next: ${scan.fixNext.length}</span>
|
|
57
|
+
<span class="pill">Leftovers: ${scan.leftovers.length}</span>
|
|
58
|
+
<span class="pill">Dead chains: ${scan.deadCodeCandidates.length}</span>
|
|
59
|
+
<span class="pill">Refactor: ${scan.refactorCandidates.length}</span>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div class="section">
|
|
63
|
+
${renderFindingList(scan.blockers, "BLOCKERS")}
|
|
64
|
+
${renderFindingList(scan.fixNext, "FIX NEXT")}
|
|
65
|
+
${renderFindingList(scan.leftovers, "LEFTOVERS")}
|
|
66
|
+
${renderFindingList(scan.deadCodeCandidates, "DEAD CHAINS")}
|
|
67
|
+
${renderFindingList(scan.refactorCandidates, "REFACTOR CANDIDATES")}
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
${toolList(scan.toolStatuses.filter(t => t.status !== "ok"), "Tool Statuses (non-ok)")}
|
|
71
|
+
${toolList(scan.skippedTools, "Skipped Tools")}
|
|
72
|
+
${errored.length ? toolList(errored, "Errored / Timed Out Tools") : ""}
|
|
73
|
+
|
|
74
|
+
<p class="meta" style="margin-top:32px">Run <code>vibedoctor agent-plan</code> for guided repair. Full JSON/HTML/Markdown/SARIF available via --report.</p>
|
|
75
|
+
</body>
|
|
76
|
+
</html>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
function escapeHtml(value) {
|
|
80
|
+
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
81
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.renderJsonReport = renderJsonReport;
|
|
7
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
8
|
+
function renderJsonReport(scan) {
|
|
9
|
+
return JSON.stringify({
|
|
10
|
+
score: scan.score.overall,
|
|
11
|
+
categoryScores: scan.score.categories,
|
|
12
|
+
findings: scan.findings,
|
|
13
|
+
topFindings: scan.topFindings,
|
|
14
|
+
toolStatuses: scan.toolStatuses,
|
|
15
|
+
skippedTools: scan.skippedTools,
|
|
16
|
+
agentPlan: scan.agentPlan
|
|
17
|
+
}, null, 2).replace(/\n/g, node_os_1.default.EOL) + node_os_1.default.EOL;
|
|
18
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderMarkdownReport = renderMarkdownReport;
|
|
4
|
+
function renderMarkdownReport(scan) {
|
|
5
|
+
const plan = scan.agentPlan;
|
|
6
|
+
const lines = [`# VibeDoctor Report`, "", `Health: **${scan.score.overall}/100**`, ""];
|
|
7
|
+
lines.push("## Summary");
|
|
8
|
+
lines.push(`- Blockers: ${scan.blockers.length}`);
|
|
9
|
+
lines.push(`- Fix next: ${scan.fixNext.length}`);
|
|
10
|
+
lines.push(`- Leftovers: ${scan.leftovers.length}`);
|
|
11
|
+
lines.push(`- Dead code candidates: ${scan.deadCodeCandidates.length}`);
|
|
12
|
+
lines.push(`- Refactor candidates: ${scan.refactorCandidates.length}`);
|
|
13
|
+
lines.push("", "## Blockers");
|
|
14
|
+
if (scan.blockers.length === 0) {
|
|
15
|
+
lines.push("- None");
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
scan.blockers.forEach((finding) => lines.push(`- ${finding.title}${finding.file ? ` — \`${finding.file}\`` : ""}: ${finding.message}`));
|
|
19
|
+
}
|
|
20
|
+
lines.push("", "## Fix next");
|
|
21
|
+
scan.fixNext.forEach((finding) => lines.push(`- ${finding.title}${finding.file ? ` — \`${finding.file}\`` : ""}`));
|
|
22
|
+
if (scan.deadCodeCandidates.length > 0) {
|
|
23
|
+
lines.push("", "## Dead chains and dead code");
|
|
24
|
+
scan.deadCodeCandidates.slice(0, 5).forEach((finding) => lines.push(`- ${finding.title}${finding.file ? ` — \`${finding.file}\`` : ""}: ${finding.message}`));
|
|
25
|
+
}
|
|
26
|
+
if (scan.skippedTools.length > 0) {
|
|
27
|
+
lines.push("", "## Skipped tools");
|
|
28
|
+
scan.skippedTools.forEach((tool) => lines.push(`- ${tool.id}${tool.installHint ? ` — ${tool.installHint}` : ""}`));
|
|
29
|
+
}
|
|
30
|
+
lines.push("", "## Agent tasks");
|
|
31
|
+
plan.tasks.forEach((task) => lines.push(`- ${task.title}`));
|
|
32
|
+
return `${lines.join("\n")}\n`;
|
|
33
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderSarif = renderSarif;
|
|
4
|
+
function renderSarif(scan) {
|
|
5
|
+
return JSON.stringify({
|
|
6
|
+
version: "2.1.0",
|
|
7
|
+
runs: [
|
|
8
|
+
{
|
|
9
|
+
tool: {
|
|
10
|
+
driver: {
|
|
11
|
+
name: "VibeDoctor"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
results: scan.findings.map((finding) => ({
|
|
15
|
+
ruleId: finding.id,
|
|
16
|
+
level: finding.severity === "critical" || finding.severity === "high" ? "error" : "warning",
|
|
17
|
+
message: {
|
|
18
|
+
text: finding.message
|
|
19
|
+
},
|
|
20
|
+
locations: finding.file
|
|
21
|
+
? [
|
|
22
|
+
{
|
|
23
|
+
physicalLocation: {
|
|
24
|
+
artifactLocation: {
|
|
25
|
+
uri: finding.file
|
|
26
|
+
},
|
|
27
|
+
region: {
|
|
28
|
+
startLine: finding.startLine
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
: undefined
|
|
34
|
+
}))
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}, null, 2);
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.renderTerminalReport = renderTerminalReport;
|
|
7
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
8
|
+
const engine_1 = require("../core/engine");
|
|
9
|
+
function renderTerminalReport(scan) {
|
|
10
|
+
return `${(0, engine_1.buildSummaryLines)(scan).join(node_os_1.default.EOL)}${node_os_1.default.EOL}\n`;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const LEFTOVER_PATTERNS: {
|
|
2
|
+
readonly legacy: readonly ["legacy", "backward compatibility", "backwards compatibility", "compat", "shim"];
|
|
3
|
+
readonly temporary: readonly ["todo", "fixme", "temporary", "temp", "for now", "remove later"];
|
|
4
|
+
readonly fallback: readonly ["fallback", "just in case", "old implementation", "previous implementation"];
|
|
5
|
+
readonly deprecated: readonly ["deprecated", "old", "unused", "dead code"];
|
|
6
|
+
};
|
|
7
|
+
export declare const LEFTOVER_NAME_PATTERNS: string[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LEFTOVER_NAME_PATTERNS = exports.LEFTOVER_PATTERNS = void 0;
|
|
4
|
+
exports.LEFTOVER_PATTERNS = {
|
|
5
|
+
legacy: ["legacy", "backward compatibility", "backwards compatibility", "compat", "shim"],
|
|
6
|
+
temporary: ["todo", "fixme", "temporary", "temp", "for now", "remove later"],
|
|
7
|
+
fallback: ["fallback", "just in case", "old implementation", "previous implementation"],
|
|
8
|
+
deprecated: ["deprecated", "old", "unused", "dead code"]
|
|
9
|
+
};
|
|
10
|
+
exports.LEFTOVER_NAME_PATTERNS = ["old", "legacy", "deprecated", "compat", "fallback", "v1", "previous"];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const refactorWeights: {
|
|
2
|
+
readonly fileLines: 0.25;
|
|
3
|
+
readonly complexity: 0.25;
|
|
4
|
+
readonly duplication: 0.15;
|
|
5
|
+
readonly leftovers: 0.1;
|
|
6
|
+
readonly deadCode: 0.1;
|
|
7
|
+
readonly imports: 0.075;
|
|
8
|
+
readonly exports: 0.075;
|
|
9
|
+
};
|
|
10
|
+
export declare const safetyThresholds: {
|
|
11
|
+
readonly ready: 65;
|
|
12
|
+
readonly pain: 60;
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.safetyThresholds = exports.refactorWeights = void 0;
|
|
4
|
+
exports.refactorWeights = {
|
|
5
|
+
fileLines: 0.25,
|
|
6
|
+
complexity: 0.25,
|
|
7
|
+
duplication: 0.15,
|
|
8
|
+
leftovers: 0.1,
|
|
9
|
+
deadCode: 0.1,
|
|
10
|
+
imports: 0.075,
|
|
11
|
+
exports: 0.075
|
|
12
|
+
};
|
|
13
|
+
exports.safetyThresholds = {
|
|
14
|
+
ready: 65,
|
|
15
|
+
pain: 60
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Confidence, Severity } from "../core/finding";
|
|
2
|
+
export declare const severityPenalty: Record<Severity, number>;
|
|
3
|
+
export declare const confidenceMultiplier: Record<Confidence, number>;
|
|
4
|
+
export declare const severityRank: Record<Severity, number>;
|
|
5
|
+
export declare const categoryWeights: {
|
|
6
|
+
readonly security: 0.22;
|
|
7
|
+
readonly correctness: 0.18;
|
|
8
|
+
readonly tests: 0.15;
|
|
9
|
+
readonly dependencies: 0.13;
|
|
10
|
+
readonly maintainability: 0.12;
|
|
11
|
+
readonly dead_code: 0.08;
|
|
12
|
+
readonly leftovers: 0.06;
|
|
13
|
+
readonly refactor_readiness: 0.04;
|
|
14
|
+
readonly efficiency: 0.02;
|
|
15
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.categoryWeights = exports.severityRank = exports.confidenceMultiplier = exports.severityPenalty = void 0;
|
|
4
|
+
exports.severityPenalty = {
|
|
5
|
+
critical: 42,
|
|
6
|
+
high: 15,
|
|
7
|
+
medium: 6,
|
|
8
|
+
low: 2,
|
|
9
|
+
info: 0.5
|
|
10
|
+
};
|
|
11
|
+
exports.confidenceMultiplier = {
|
|
12
|
+
low: 0.25,
|
|
13
|
+
medium: 0.6,
|
|
14
|
+
high: 1
|
|
15
|
+
};
|
|
16
|
+
exports.severityRank = {
|
|
17
|
+
info: 0,
|
|
18
|
+
low: 1,
|
|
19
|
+
medium: 2,
|
|
20
|
+
high: 3,
|
|
21
|
+
critical: 4
|
|
22
|
+
};
|
|
23
|
+
exports.categoryWeights = {
|
|
24
|
+
security: 0.22,
|
|
25
|
+
correctness: 0.18,
|
|
26
|
+
tests: 0.15,
|
|
27
|
+
dependencies: 0.13,
|
|
28
|
+
maintainability: 0.12,
|
|
29
|
+
dead_code: 0.08,
|
|
30
|
+
leftovers: 0.06,
|
|
31
|
+
refactor_readiness: 0.04,
|
|
32
|
+
efficiency: 0.02
|
|
33
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neuralaxis/vibedoctor",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Health diagnosis and fix planning for JS, TS, Python, and mixed repositories.",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"vibedoctor": "dist/cli/index.js"
|
|
11
|
+
},
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"require": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
},
|
|
28
|
+
"packageManager": "npm@10.8.2",
|
|
29
|
+
"keywords": [
|
|
30
|
+
"code-health",
|
|
31
|
+
"cli",
|
|
32
|
+
"static-analysis",
|
|
33
|
+
"technical-debt",
|
|
34
|
+
"agent-tools"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
38
|
+
"build": "npm run clean && tsc -p tsconfig.build.json",
|
|
39
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
40
|
+
"check": "npm run typecheck && npm test && npm run build && (npm run health || echo 'Health scan completed (non-fatal in this gate)')",
|
|
41
|
+
"prepack": "npm run build",
|
|
42
|
+
"test": "vitest run",
|
|
43
|
+
"prepublishOnly": "npm run build && npm test",
|
|
44
|
+
"dev": "tsx src/cli/index.ts",
|
|
45
|
+
"health": "tsx src/cli/index.ts scan --quick --report terminal"
|
|
46
|
+
},
|
|
47
|
+
"license": "GPL-3.0-or-later",
|
|
48
|
+
"author": "neuralaxis",
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/neural-axis/VibeDoctor.git"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://github.com/neural-axis/VibeDoctor#readme",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/neural-axis/VibeDoctor/issues"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"commander": "^14.0.0",
|
|
59
|
+
"minimatch": "^10.0.1",
|
|
60
|
+
"yaml": "^2.8.1"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@biomejs/biome": "^2.5.0",
|
|
64
|
+
"@types/node": "^24.0.1",
|
|
65
|
+
"@vitest/coverage-v8": "^3.2.6",
|
|
66
|
+
"jscpd": "^5.0.9",
|
|
67
|
+
"knip": "^6.16.1",
|
|
68
|
+
"tsx": "^4.20.3",
|
|
69
|
+
"typescript": "^5.8.3",
|
|
70
|
+
"vitest": "^3.2.4"
|
|
71
|
+
}
|
|
72
|
+
}
|