getprismo 0.1.19 → 0.1.20

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 CHANGED
@@ -565,6 +565,7 @@ npx getprismo firewall auth-bug # generate scoped context firewall
565
565
  npx getprismo doctor --dry-run # preview without writing files
566
566
  npx getprismo doctor --apply-ignores-only # only create ignore files
567
567
  npx getprismo doctor --apply-suggestions # append missing ignore suggestions with backups
568
+ npx getprismo doctor --apply-suggestions --dry-run # preview the exact ignore-rule diff
568
569
  npx getprismo doctor --no-context-packs # skip .prismo/ generation
569
570
  npx getprismo doctor frontend # scope to frontend
570
571
  npx getprismo doctor --json # machine-readable output
@@ -375,18 +375,42 @@ function renderDoctorTerminal(result) {
375
375
  if (result.dryRun) lines.push("Mode: dry run (no files changed)");
376
376
  lines.push("");
377
377
  lines.push(`Before: ${result.before.score}/100 - ${result.before.risk} risk - ${result.before.issues.length} token leak${result.before.issues.length === 1 ? "" : "s"}`);
378
- if (result.dryRun) lines.push("After: run without --dry-run to apply safe fixes and re-scan");
378
+ if (result.dryRun && result.applySuggestions) lines.push("After: run without --dry-run to append missing ignore suggestions");
379
+ else if (result.dryRun) lines.push("After: run without --dry-run to apply safe fixes and re-scan");
379
380
  else lines.push(`After: ${result.after.score}/100 - ${result.after.risk} risk - ${result.after.issues.length} token leak${result.after.issues.length === 1 ? "" : "s"} (${scoreDeltaLabel})`);
380
381
  if (result.before.realUsage && result.before.realUsage.sessions.length) {
381
382
  lines.push(`Local usage: ${formatTokenCount(result.before.realUsage.totals.displayTokens)} tokens across ${result.before.realUsage.sessions.length} recent session(s)`);
382
383
  }
383
- lines.push(`Estimated exposed context reduction: ${result.exposedTokenReductionPercent}%`);
384
+ if (!(result.dryRun && result.applySuggestions)) lines.push(`Estimated exposed context reduction: ${result.exposedTokenReductionPercent}%`);
384
385
  if (!result.dryRun) {
385
386
  lines.push(`Payoff: ${scoreDelta > 0 ? `repo is ${scoreDelta} points cleaner for AI coding sessions` : "safe fixes applied; remaining risk needs manual cleanup"}`);
386
387
  }
387
388
  lines.push("");
388
- lines.push(result.applySuggestions ? (result.dryRun ? "Would Apply Suggestions:" : "Applied Suggestions:") : (result.dryRun ? "Would Fix:" : "Fixed:"));
389
- if (result.fixActions.length) result.fixActions.forEach((action) => lines.push(`- ${action}`));
389
+ lines.push(result.applySuggestions ? (result.dryRun ? "Prismo Apply Suggestions Preview:" : "Applied Suggestions:") : (result.dryRun ? "Would Fix:" : "Fixed:"));
390
+ if (result.applySuggestions && result.dryRun && result.fixActions.length) {
391
+ const previews = [];
392
+ const skipped = [];
393
+ result.fixActions.forEach((action) => {
394
+ const match = action.match(/^Would update ([^:]+): \+(.+)$/);
395
+ if (!match) {
396
+ skipped.push(action);
397
+ return;
398
+ }
399
+ previews.push({
400
+ file: match[1],
401
+ rules: match[2].split(", +").filter(Boolean),
402
+ });
403
+ });
404
+ previews.forEach((preview) => {
405
+ lines.push("");
406
+ lines.push(preview.file);
407
+ preview.rules.forEach((rule) => lines.push(`+ ${rule}`));
408
+ });
409
+ skipped.forEach((action) => lines.push(`- ${action}`));
410
+ lines.push("");
411
+ lines.push("Run to apply:");
412
+ lines.push(`${NPX_COMMAND} doctor --apply-suggestions`);
413
+ } else if (result.fixActions.length) result.fixActions.forEach((action) => lines.push(`- ${action}`));
390
414
  else lines.push("- No safe fix files needed");
391
415
  if (result.noContextPacks) {
392
416
  lines.push("- Context pack generation skipped");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "getprismo",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Local AI coding workflow scanner for Codex, Claude Code, Cursor, and token-waste diagnostics.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/shanirsh/prismodev#readme",