@getcodesentinel/codesentinel 1.17.3 → 1.17.5
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/README.md +23 -11
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -419,12 +419,12 @@ Score direction:
|
|
|
419
419
|
- Report views also include derived tiers: `riskTier` and `healthTier`.
|
|
420
420
|
- `health.trace`: per-dimension factor traces with normalized metrics and evidence.
|
|
421
421
|
|
|
422
|
-
Health
|
|
422
|
+
Health dimensions:
|
|
423
423
|
|
|
424
|
-
- `modularity
|
|
425
|
-
- `changeHygiene
|
|
426
|
-
- `testHealth
|
|
427
|
-
- `ownershipDistribution
|
|
424
|
+
- `modularity`: cycle density + fan/centrality concentration + structural-hotspot overlap.
|
|
425
|
+
- `changeHygiene`: churn/volatility concentration + dense co-change clusters.
|
|
426
|
+
- `testHealth`: test presence + test-to-source ratio + testing directory presence.
|
|
427
|
+
- `ownershipDistribution`: top-author share + author entropy + single-author dominance signals.
|
|
428
428
|
|
|
429
429
|
Signal ingestion (deterministic, local):
|
|
430
430
|
|
|
@@ -438,18 +438,30 @@ Interpretation notes:
|
|
|
438
438
|
- Scores are meant for within-repo prioritization and trend tracking.
|
|
439
439
|
- Full model details and limits are in `packages/risk-engine/README.md`.
|
|
440
440
|
|
|
441
|
-
### Score Guide
|
|
441
|
+
### Risk Score Guide
|
|
442
442
|
|
|
443
443
|
Use these ranges as operational guidance:
|
|
444
444
|
|
|
445
|
-
- `0-20`: low fragility.
|
|
446
|
-
- `20-40`: moderate fragility.
|
|
447
|
-
- `40-60`: elevated fragility (prioritize top hotspots).
|
|
448
|
-
- `60-80`: high fragility (expect higher change
|
|
449
|
-
- `80-100`: very high fragility (
|
|
445
|
+
- `0-20`: low fragility (architectural and change pressure signals are generally contained).
|
|
446
|
+
- `20-40`: moderate fragility (localized hotspots exist; monitor trend direction and concentration).
|
|
447
|
+
- `40-60`: elevated fragility (prioritize top hotspots before introducing major concurrent change).
|
|
448
|
+
- `60-80`: high fragility (expect higher coordination cost, regressions, and change coupling across areas).
|
|
449
|
+
- `80-100`: very high fragility (treat as immediate triage; focus on stabilization before further expansion).
|
|
450
450
|
|
|
451
451
|
These ranges are heuristics for triage, not incident probability.
|
|
452
452
|
|
|
453
|
+
### Health Score Guide
|
|
454
|
+
|
|
455
|
+
Use these ranges as operational guidance:
|
|
456
|
+
|
|
457
|
+
- `0-20`: critical health posture (maintainability pressure is highly concentrated and debt is likely compounding).
|
|
458
|
+
- `20-40`: weak health posture (key maintainability bottlenecks are visible; prioritize stabilization work).
|
|
459
|
+
- `40-60`: fair health posture (baseline is workable, but concentrated architecture/change pressure can still slow delivery).
|
|
460
|
+
- `60-80`: good health posture (most maintainability signals are stable, with targeted improvements still valuable).
|
|
461
|
+
- `80-100`: excellent health posture (maintainability pressure is broadly distributed and sustainably controlled over time).
|
|
462
|
+
|
|
463
|
+
These ranges are heuristics for prioritization, not absolute quality guarantees.
|
|
464
|
+
|
|
453
465
|
### What Moves Scores
|
|
454
466
|
|
|
455
467
|
`risk.riskScore` and `risk.fileScores[*].score` increase when:
|
package/dist/index.js
CHANGED
|
@@ -3448,6 +3448,9 @@ var parseNpmViewVersionOutput = (output) => {
|
|
|
3448
3448
|
}
|
|
3449
3449
|
return null;
|
|
3450
3450
|
};
|
|
3451
|
+
var renderUpdateInProgressMessage = (packageName) => `Updating CodeSentinel via \`npm install -g ${packageName}\`...
|
|
3452
|
+
`;
|
|
3453
|
+
var renderUpdateSuccessMessage = () => "\u{1F389} Update ran successfully! Please restart CodeSentinel.\n";
|
|
3451
3454
|
var readCache = async () => {
|
|
3452
3455
|
try {
|
|
3453
3456
|
const raw = await readFile2(UPDATE_CACHE_PATH, "utf8");
|
|
@@ -3566,8 +3569,7 @@ var promptInstall = async (packageName, latestVersion, currentVersion) => {
|
|
|
3566
3569
|
}
|
|
3567
3570
|
clearPromptArea();
|
|
3568
3571
|
if (choice === "install") {
|
|
3569
|
-
stderr.write(`${ANSI.yellow}
|
|
3570
|
-
`);
|
|
3572
|
+
stderr.write(`${ANSI.yellow}${renderUpdateInProgressMessage(packageName)}${ANSI.reset}`);
|
|
3571
3573
|
} else {
|
|
3572
3574
|
stderr.write("\n");
|
|
3573
3575
|
}
|
|
@@ -3636,9 +3638,7 @@ var checkForCliUpdates = async (input) => {
|
|
|
3636
3638
|
}
|
|
3637
3639
|
const installed = await installLatestVersion(input.packageName);
|
|
3638
3640
|
if (installed) {
|
|
3639
|
-
stderr.write(
|
|
3640
|
-
"CodeSentinel updated to latest version. Rerun your command to use the new version.\n"
|
|
3641
|
-
);
|
|
3641
|
+
stderr.write(renderUpdateSuccessMessage());
|
|
3642
3642
|
process.exit(0);
|
|
3643
3643
|
} else {
|
|
3644
3644
|
stderr.write(
|