reporefit 0.4.1 → 0.4.3

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
@@ -55,4 +55,4 @@ Setup for other clients: https://reporefit.com/en/mcp/
55
55
 
56
56
  Every rule ID (for example `SEC-001`) is explained at https://reporefit.com/en/rules/
57
57
 
58
- RepoRefit 0.4.1 · MIT License · Third-party notices in THIRD_PARTY_NOTICES.md
58
+ RepoRefit 0.4.3 · MIT License · Third-party notices in THIRD_PARTY_NOTICES.md
@@ -11,8 +11,8 @@ import { dirname as dirname2, join as join4, resolve as resolve3 } from "node:pa
11
11
 
12
12
  // ../core/src/types.ts
13
13
  var SCHEMA_VERSION = "0.3.0";
14
- var ENGINE_VERSION = "0.4.1";
15
- var RULESET_VERSION = "2026.12.8";
14
+ var ENGINE_VERSION = "0.4.3";
15
+ var RULESET_VERSION = "2026.12.9";
16
16
 
17
17
  // ../core/src/input/limits.ts
18
18
  var MiB = 1024 * 1024;
@@ -278,7 +278,7 @@ async function sha256Hex(text3) {
278
278
  var utf8 = new TextDecoder("utf-8");
279
279
 
280
280
  // ../core/src/input/folder.ts
281
- function createFolderAdapter(entries, limits) {
281
+ function createFolderAdapter(entries, limits, ignoredDirectories = []) {
282
282
  const listingReasons = [];
283
283
  let listComplete = true;
284
284
  let usable = entries;
@@ -305,6 +305,7 @@ function createFolderAdapter(entries, limits) {
305
305
  const key = path.toLowerCase();
306
306
  if (seen.has(key)) excluded = "name-collision";
307
307
  else seen.add(key);
308
+ if (excluded === null && e.ignored) excluded = "ignored";
308
309
  if (excluded === null) excluded = classifyPath(path);
309
310
  for (const d of ancestorDirectories(path)) directories.add(d);
310
311
  files.push({ path, size: e.size, excluded });
@@ -339,6 +340,12 @@ function createFolderAdapter(entries, limits) {
339
340
  github: null,
340
341
  files,
341
342
  directories,
343
+ ignoredDirectories: ignoredDirectories.flatMap((d) => {
344
+ const n = normalizeEntryPath(d);
345
+ const p = n.ok ? stripWrapper(n.path, wrapperRoot) : null;
346
+ if (p) directories.add(p);
347
+ return p ? [p] : [];
348
+ }),
342
349
  listComplete,
343
350
  listingReasons,
344
351
  bytesRead: () => readSoFar,
@@ -7991,10 +7998,11 @@ var PROFILES = {
7991
7998
  },
7992
7999
  cursor: {
7993
8000
  platform: "cursor",
7994
- profileVersion: "cursor-agents-window-rules@2026-12-01",
7995
- reviewedAt: "2026-12-01",
7996
- // cursor.com/docs moved permanently to docs.grok.com/build on the review date.
7997
- sourceUrls: ["https://docs.grok.com/build/agents-window/rules"],
8001
+ profileVersion: "cursor-agents-window-rules@2026-12-02",
8002
+ reviewedAt: "2026-12-02",
8003
+ // Cursor's own rules page. On 2026-12-02 it answers 308 Permanent Redirect to
8004
+ // docs.grok.com/build/agents-window/rules ("Rules"), the page the rules below were read from.
8005
+ sourceUrls: ["https://cursor.com/docs/context/rules"],
7998
8006
  // "@file" in a rule only points at the file; it does not insert its content.
7999
8007
  maxImportDepth: null,
8000
8008
  maxCombinedBytes: null,
@@ -8427,6 +8435,11 @@ function checkDocConsistency(input) {
8427
8435
  var CODE_EXT = /* @__PURE__ */ new Set(["js", "mjs", "cjs", "jsx", "ts", "mts", "cts", "tsx", "vue", "svelte", "py", "rb", "go", "rs", "java", "kt", "cs", "php", "swift"]);
8428
8436
  var DUP_WINDOW = 6;
8429
8437
  var MAX_FINDINGS = 50;
8438
+ var GENERATED_NAME = /\.bundle\.[cm]?js$/i;
8439
+ var GENERATED_HEADER = /\b(?:generated by|auto-?generated|do not edit|@generated|this file (?:is|was) (?:auto-?)?generated|code generated by)\b/i;
8440
+ function isGeneratedFile(path, text3) {
8441
+ return GENERATED_NAME.test(path) || GENERATED_HEADER.test(text3.slice(0, 600));
8442
+ }
8430
8443
  function isCodePath(path) {
8431
8444
  return CODE_EXT.has(extensionOf(path)) && !/\.min\.(js|css)$/.test(path) && !/(^|\/)(vendor|dist|build)\//.test(path);
8432
8445
  }
@@ -8526,7 +8539,8 @@ function meaningful(text3, path) {
8526
8539
  return out;
8527
8540
  }
8528
8541
  function checkDuplicateCode(docs) {
8529
- const files = docs.filter((d) => isCodePath(d.path) && !d.text.split("\n").some((l) => l.length > 500)).sort((a, b) => a.path < b.path ? -1 : 1).map((d) => ({ path: d.path, text: d.text, lines: meaningful(d.text, d.path) }));
8542
+ const generated = docs.filter((d) => isCodePath(d.path) && isGeneratedFile(d.path, d.text)).sort((a, b) => a.path < b.path ? -1 : 1);
8543
+ const files = docs.filter((d) => isCodePath(d.path) && !isGeneratedFile(d.path, d.text) && !d.text.split("\n").some((l) => l.length > 500)).sort((a, b) => a.path < b.path ? -1 : 1).map((d) => ({ path: d.path, text: d.text, lines: meaningful(d.text, d.path) }));
8530
8544
  const codeLines = files.reduce((n, f) => n + f.lines.length, 0);
8531
8545
  const keyAt = (f, i) => i + DUP_WINDOW <= f.lines.length ? f.lines.slice(i, i + DUP_WINDOW).map((l) => l.norm).join("\n") : null;
8532
8546
  const windows = /* @__PURE__ */ new Map();
@@ -8600,11 +8614,26 @@ function checkDuplicateCode(docs) {
8600
8614
  related: locs.slice(1).map(({ path, line, column }) => ({ path, line, column }))
8601
8615
  });
8602
8616
  }
8617
+ if (generated.length) {
8618
+ const first = generated[0];
8619
+ findings.push({
8620
+ id: `DUP-001-${fnv1a(`generated:${generated.map((g) => g.path).join("|")}`)}`,
8621
+ ruleId: "DUP-001",
8622
+ severity: "info",
8623
+ confidence: "high",
8624
+ messageKey: "dup001.generated",
8625
+ params: { count: generated.length, examples: generated.slice(0, 3).map((g) => g.path).join(", ") + (generated.length > 3 ? ", \u2026" : "") },
8626
+ location: { path: first.path, line: 1, column: 1 },
8627
+ evidence: truncate(maskSecrets((first.text.split(/\r?\n/).find((l) => l.trim()) ?? "").trim())),
8628
+ recommendation: { messageKey: "dup001.generated.fix", params: {} },
8629
+ verification: { messageKey: "dup.verify", params: { path: first.path, line: 1 } }
8630
+ });
8631
+ }
8603
8632
  return {
8604
8633
  metrics: { codeLines, duplicatedLines: dupLines.size },
8605
8634
  rule: {
8606
8635
  ruleId: "DUP-001",
8607
- status: files.length === 0 ? "skipped" : findings.length ? "fail" : "pass",
8636
+ status: files.length === 0 && !findings.length ? "skipped" : findings.length ? "fail" : "pass",
8608
8637
  eligible: files.length,
8609
8638
  inspected: files.length,
8610
8639
  findings,
@@ -8784,6 +8813,11 @@ function checkArchitecture(docs, index2) {
8784
8813
  const target = resolveImport(doc.path, ref.spec, index2.files);
8785
8814
  const location = { path: doc.path, line: ref.line, column: ref.column };
8786
8815
  if (!target) {
8816
+ const wanted = normalize(doc.path.includes("/") ? doc.path.slice(0, doc.path.lastIndexOf("/")) : "", ref.spec.split("?")[0]);
8817
+ if (wanted && (index2.ignoredDirectories ?? []).some((d) => wanted === d || wanted.startsWith(`${d}/`))) {
8818
+ unverified.push({ location, target: ref.spec, resolved: wanted, reasonKey: "arc002.unverified.ignored" });
8819
+ continue;
8820
+ }
8787
8821
  if (!index2.listComplete) {
8788
8822
  unverified.push({ location, target: ref.spec, resolved: ref.spec, reasonKey: "arc002.unverified.partialListing" });
8789
8823
  continue;
@@ -9805,6 +9839,7 @@ function measurableContext(report, platform, folder2) {
9805
9839
  }
9806
9840
 
9807
9841
  // ../core/src/scan.ts
9842
+ var OTHER_DOCS_BUDGET = 8 * 1024 * 1024;
9808
9843
  var ScanCancelledError = class extends Error {
9809
9844
  constructor() {
9810
9845
  super("cancelled");
@@ -9825,6 +9860,13 @@ async function scanOnce(adapter, ctx) {
9825
9860
  excludedByReason[r] = (excludedByReason[r] ?? 0) + 1;
9826
9861
  excluded++;
9827
9862
  };
9863
+ const ignoreFile = adapter.files.find((f) => f.path === ".reporefitignore" && !f.excluded);
9864
+ if (ignoreFile) {
9865
+ const r = await adapter.readText(".reporefitignore", 256 * 1024);
9866
+ const ignored = gitignoreMatcher(r.ok ? r.text : null);
9867
+ const under = (p) => p.split("/").slice(0, -1).some((_, i, parts) => ignored(`${parts.slice(0, i + 1).join("/")}/`));
9868
+ for (const f of adapter.files) if (!f.excluded && f.path !== ".reporefitignore" && (ignored(f.path) || under(f.path))) f.excluded = "ignored";
9869
+ }
9828
9870
  for (const f of adapter.files) if (f.excluded) bump(f.excluded);
9829
9871
  const progress = (stage, filesRead) => ctx.onProgress?.({ stage, discovered: adapter.files.length, filesRead, excluded });
9830
9872
  progress("listing", 0);
@@ -9894,11 +9936,15 @@ async function scanOnce(adapter, ctx) {
9894
9936
  instruction: contextPaths,
9895
9937
  ignored: gitignoreMatcher(docs.find((d) => d.path === ".gitignore")?.text ?? null)
9896
9938
  });
9897
- ctx.onInstructionTexts?.(agentDocs.filter((d) => contextPaths.has(d.path)).map((d) => ({ path: d.path, text: d.text })));
9939
+ if (ctx.onInstructionTexts) {
9940
+ let budget = OTHER_DOCS_BUDGET;
9941
+ const others = mdDocs.filter((d) => !contextPaths.has(d.path) && (budget -= d.text.length) >= 0);
9942
+ ctx.onInstructionTexts([...agentDocs.filter((d) => contextPaths.has(d.path)), ...others].map((d) => ({ path: d.path, text: d.text })));
9943
+ }
9898
9944
  const md002 = checkDuplicates(mdDocs, eligibleMd, mdPartial, MD002_MIN_CHARS, contextPaths);
9899
9945
  const deps = extractDependencies(docs);
9900
9946
  const dup = checkDuplicateCode(docs);
9901
- const arc = checkArchitecture(docs, { files: listed, listComplete: adapter.listComplete });
9947
+ const arc = checkArchitecture(docs, { files: listed, listComplete: adapter.listComplete, ignoredDirectories: adapter.ignoredDirectories ?? [] });
9902
9948
  const ops = checkDeploy(docs, { files: listed, listComplete: adapter.listComplete });
9903
9949
  const sec001 = checkSecrets(docs, candidates.length, mdPartial);
9904
9950
  const sec002 = checkSensitiveFiles([...listed], docs.find((d) => d.path === ".gitignore")?.text ?? null, adapter.kind === "github", new Map(docs.map((d) => [d.path, d.text])));
@@ -10447,6 +10493,9 @@ var enT = {
10447
10493
  "arc002.missing": 'Import "{spec}" does not match any file in the project.',
10448
10494
  "arc002.fix": 'Fix the path in "{spec}" or add the missing file. If the file is generated at build time, you can ignore this.',
10449
10495
  "arc002.unverified.partialListing": "The file list is incomplete, so this import could not be confirmed.",
10496
+ "arc002.unverified.ignored": "The module is in an ignored folder that was not listed, so this import could not be confirmed.",
10497
+ "dup001.generated": '{count} generated file(s) (build output such as bundles, or files marked "generated" or "do not edit") were not compared for duplicates: {examples}.',
10498
+ "dup001.generated.fix": "Generated files are copied on purpose by a build. Look for repeated code in the sources they are built from.",
10450
10499
  "arc.verify": "Run the same check again and confirm {path}:{line} no longer appears.",
10451
10500
  "arc.reason.noCode": "No JavaScript or TypeScript files were found.",
10452
10501
  "arc.reason.capped": "Only the first 50 results are listed.",
@@ -10610,6 +10659,9 @@ var koT = {
10610
10659
  "arc002.missing": 'import "{spec}"\uC5D0 \uB9DE\uB294 \uD30C\uC77C\uC774 \uD504\uB85C\uC81D\uD2B8\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4.',
10611
10660
  "arc002.fix": '"{spec}" \uACBD\uB85C\uB97C \uACE0\uCE58\uAC70\uB098 \uBE60\uC9C4 \uD30C\uC77C\uC744 \uCD94\uAC00\uD558\uC138\uC694. \uBE4C\uB4DC\uD560 \uB54C \uC0DD\uC131\uB418\uB294 \uD30C\uC77C\uC774\uB77C\uBA74 \uBB34\uC2DC\uD574\uB3C4 \uB429\uB2C8\uB2E4.',
10612
10661
  "arc002.unverified.partialListing": "\uD30C\uC77C \uBAA9\uB85D\uC774 \uC644\uC804\uD558\uC9C0 \uC54A\uC544 \uC774 import\uB294 \uD655\uC778\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
10662
+ "arc002.unverified.ignored": "\uBAA8\uB4C8\uC774 \uBAA9\uB85D\uC5D0\uC11C \uC81C\uC678\uB41C \uBB34\uC2DC \uD3F4\uB354\uC5D0 \uC788\uC5B4 \uC774 import\uB294 \uD655\uC778\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
10663
+ "dup001.generated": '\uC790\uB3D9 \uC0DD\uC131 \uD30C\uC77C {count}\uAC1C(\uBC88\uB4E4 \uAC19\uC740 \uBE4C\uB4DC \uC0B0\uCD9C\uBB3C, "generated"\xB7"do not edit" \uD45C\uC2DC \uD30C\uC77C)\uB294 \uC911\uBCF5 \uBE44\uAD50\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4: {examples}.',
10664
+ "dup001.generated.fix": "\uC0DD\uC131 \uD30C\uC77C\uC740 \uBE4C\uB4DC\uAC00 \uC77C\uBD80\uB7EC \uBCF5\uC0AC\uD55C \uAC83\uC785\uB2C8\uB2E4. \uC911\uBCF5\uC740 \uADF8 \uD30C\uC77C\uC744 \uB9CC\uB4DC\uB294 \uC6D0\uBCF8 \uC18C\uC2A4\uC5D0\uC11C \uCC3E\uC73C\uC138\uC694.",
10613
10665
  "arc.verify": "\uAC19\uC740 \uAC80\uC0AC\uB97C \uB2E4\uC2DC \uC2E4\uD589\uD574 {path}:{line}\uC774(\uAC00) \uB354 \uC774\uC0C1 \uB098\uC624\uC9C0 \uC54A\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694.",
10614
10666
  "arc.reason.noCode": "JavaScript\uB098 TypeScript \uD30C\uC77C\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
10615
10667
  "arc.reason.capped": "\uACB0\uACFC\uB294 \uCC98\uC74C 50\uAC1C\uAE4C\uC9C0\uB9CC \uBCF4\uC5EC \uC90D\uB2C8\uB2E4.",
@@ -10773,6 +10825,9 @@ var jaT = {
10773
10825
  "arc002.missing": 'import "{spec}" \u306B\u4E00\u81F4\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u304C\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B\u3042\u308A\u307E\u305B\u3093\u3002',
10774
10826
  "arc002.fix": '"{spec}" \u306E\u30D1\u30B9\u3092\u76F4\u3059\u304B\u3001\u8DB3\u308A\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30D3\u30EB\u30C9\u6642\u306B\u751F\u6210\u3055\u308C\u308B\u30D5\u30A1\u30A4\u30EB\u306A\u3089\u7121\u8996\u3057\u3066\u304B\u307E\u3044\u307E\u305B\u3093\u3002',
10775
10827
  "arc002.unverified.partialListing": "\u30D5\u30A1\u30A4\u30EB\u4E00\u89A7\u304C\u4E0D\u5B8C\u5168\u306A\u305F\u3081\u3001\u3053\u306E import \u306F\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
10828
+ "arc002.unverified.ignored": "\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u4E00\u89A7\u306B\u542B\u3081\u306A\u3044\u7121\u8996\u30D5\u30A9\u30EB\u30C0\u30FC\u306B\u3042\u308B\u305F\u3081\u3001\u3053\u306E import \u306F\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
10829
+ "dup001.generated": "\u81EA\u52D5\u751F\u6210\u30D5\u30A1\u30A4\u30EB {count} \u4EF6(\u30D0\u30F3\u30C9\u30EB\u306A\u3069\u306E\u30D3\u30EB\u30C9\u6210\u679C\u7269\u3001\u300Cgenerated\u300D\u300Cdo not edit\u300D\u3068\u8A18\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB)\u306F\u91CD\u8907\u306E\u6BD4\u8F03\u304B\u3089\u9664\u304D\u307E\u3057\u305F: {examples}\u3002",
10830
+ "dup001.generated.fix": "\u751F\u6210\u30D5\u30A1\u30A4\u30EB\u306F\u30D3\u30EB\u30C9\u304C\u610F\u56F3\u7684\u306B\u30B3\u30D4\u30FC\u3057\u305F\u3082\u306E\u3067\u3059\u3002\u91CD\u8907\u306F\u751F\u6210\u5143\u306E\u30BD\u30FC\u30B9\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
10776
10831
  "arc.verify": "\u540C\u3058\u691C\u67FB\u3092\u518D\u5B9F\u884C\u3057\u3001{path}:{line} \u304C\u8868\u793A\u3055\u308C\u306A\u304F\u306A\u3063\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
10777
10832
  "arc.reason.noCode": "JavaScript \u3084 TypeScript \u306E\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
10778
10833
  "arc.reason.capped": "\u7D50\u679C\u306F\u6700\u521D\u306E 50 \u4EF6\u3060\u3051\u3092\u8868\u793A\u3057\u307E\u3059\u3002",
@@ -10936,6 +10991,9 @@ var zhT = {
10936
10991
  "arc002.missing": '\u5BFC\u5165 "{spec}" \u5728\u9879\u76EE\u4E2D\u627E\u4E0D\u5230\u5BF9\u5E94\u6587\u4EF6\u3002',
10937
10992
  "arc002.fix": '\u4FEE\u6B63 "{spec}" \u7684\u8DEF\u5F84\u6216\u8865\u4E0A\u7F3A\u5931\u7684\u6587\u4EF6\u3002\u5982\u679C\u8BE5\u6587\u4EF6\u5728\u6784\u5EFA\u65F6\u751F\u6210\uFF0C\u53EF\u4EE5\u5FFD\u7565\u3002',
10938
10993
  "arc002.unverified.partialListing": "\u6587\u4EF6\u5217\u8868\u4E0D\u5B8C\u6574\uFF0C\u65E0\u6CD5\u786E\u8BA4\u6B64\u5BFC\u5165\u3002",
10994
+ "arc002.unverified.ignored": "\u6A21\u5757\u4F4D\u4E8E\u672A\u5217\u51FA\u7684\u5FFD\u7565\u6587\u4EF6\u5939\u4E2D\uFF0C\u65E0\u6CD5\u786E\u8BA4\u6B64\u5BFC\u5165\u3002",
10995
+ "dup001.generated": "{count} \u4E2A\u81EA\u52A8\u751F\u6210\u7684\u6587\u4EF6\uFF08\u6253\u5305\u4EA7\u7269\u7B49\u6784\u5EFA\u8F93\u51FA\uFF0C\u6216\u6807\u6709\u201Cgenerated\u201D\u201Cdo not edit\u201D\u7684\u6587\u4EF6\uFF09\u672A\u53C2\u4E0E\u91CD\u590D\u6BD4\u8F83\uFF1A{examples}\u3002",
10996
+ "dup001.generated.fix": "\u751F\u6210\u6587\u4EF6\u662F\u6784\u5EFA\u8FC7\u7A0B\u6709\u610F\u590D\u5236\u7684\u3002\u8BF7\u5728\u751F\u6210\u5B83\u4EEC\u7684\u6E90\u4EE3\u7801\u4E2D\u67E5\u627E\u91CD\u590D\u3002",
10939
10997
  "arc.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\uFF0C\u786E\u8BA4 {path}:{line} \u4E0D\u518D\u51FA\u73B0\u3002",
10940
10998
  "arc.reason.noCode": "\u672A\u627E\u5230 JavaScript \u6216 TypeScript \u6587\u4EF6\u3002",
10941
10999
  "arc.reason.capped": "\u53EA\u5217\u51FA\u524D 50 \u4E2A\u7ED3\u679C\u3002",
@@ -11045,7 +11103,7 @@ var zhT = {
11045
11103
  // ../core/src/i18n/messages-cli.ts
11046
11104
  var enC = {
11047
11105
  "cli.header": "RepoRefit \xB7 {tool} \xB7 {read} files read of {listed} listed \xB7 {seconds}s",
11048
- "cli.summary": "{findings} findings (high {high}, medium {medium}, low {low}) \xB7 {passed}/{evaluated} checks passed",
11106
+ "cli.summary": "{findings} findings (high {high}, medium {medium}, low {low}, info {info}) \xB7 {passed}/{evaluated} checks passed",
11049
11107
  "cli.partial": "Partial scan: {reasons}",
11050
11108
  "cli.partialUnknown": "some files were not read.",
11051
11109
  "cli.symlinks": "Skipped {count} symbolic links (never followed).",
@@ -11099,11 +11157,25 @@ var enC = {
11099
11157
  "cli.keep.unknown.partial": "partial scan",
11100
11158
  "cli.keep.unknown.unread": "unread files",
11101
11159
  "cli.keep.mandatory": "mandatory",
11102
- "cli.keep.more": "\u2026 {count} more"
11160
+ "cli.keep.more": "\u2026 {count} more",
11161
+ "cli.keep.scope": "Checks the rules in the instruction files each agent loads at /. Other documents are checked below; code blocks, HTML and images are not compared.",
11162
+ "cli.keep.notVerified": "Not compared in these files: {code} code blocks, {html} HTML blocks, {images} images.",
11163
+ "cli.docs.title": "Requirements in other documents (README, docs/ and other Markdown no agent loads):",
11164
+ "cli.docs.none": "None of the {documents} other documents was removed or changed.",
11165
+ "cli.docs.line": "{removed} removed and {changed} changed of {documents} documents: {units} requirement units (numbers, obligations, pass/fail criteria, conditions, security, environment), kept {kept}, probably the same {estimated}, review {review} (fixed tokens changed {fixed}), possible losses {missing} -> {verdict}",
11166
+ "cli.docs.verdict.clean": "no loss found in the compared text (this does not prove the meaning is kept)",
11167
+ "cli.docs.verdict.estimated": "no loss found; reworded units look the same (estimate), read them once",
11168
+ "cli.docs.verdict.review": "review these units in the revised copy",
11169
+ "cli.docs.notVerified": "Not verified: {code} code blocks, {html} HTML blocks, {images} images and {documents} documents over the size limit; meaning spread over several sentences is not checked.",
11170
+ "cli.docs.scopeNote": "Requirement-like units of removed or changed Markdown documents that no agent loads, matched against every Markdown file of the revised copy. Code blocks, images and meaning across sentences are not verified.",
11171
+ "cli.links.title": "Links the edit broke (they resolved in the original):",
11172
+ "cli.docs.removed": "{path} (removed): {units} units, kept {kept}, probably the same {estimated}, review {review}, possible losses {missing}",
11173
+ "cli.docs.changed": "{path} (changed): {units} units, kept {kept}, probably the same {estimated}, review {review}, possible losses {missing}",
11174
+ "cli.notInspected": "Not inspected: {excluded} files ({reasons}); references not confirmed: {unverified}. Findings cover only what was read."
11103
11175
  };
11104
11176
  var koC = {
11105
11177
  "cli.header": "RepoRefit \xB7 {tool} \xB7 \uD30C\uC77C {listed}\uAC1C \uC911 {read}\uAC1C \uC77D\uC74C \xB7 {seconds}\uCD08",
11106
- "cli.summary": "\uBC1C\uACAC {findings}\uAC74(\uB192\uC74C {high}, \uC911\uAC04 {medium}, \uB0AE\uC74C {low}) \xB7 \uAC80\uC0AC {evaluated}\uAC1C \uC911 {passed}\uAC1C \uD1B5\uACFC",
11178
+ "cli.summary": "\uBC1C\uACAC {findings}\uAC74(\uB192\uC74C {high}, \uC911\uAC04 {medium}, \uB0AE\uC74C {low}, \uC815\uBCF4 {info}) \xB7 \uAC80\uC0AC {evaluated}\uAC1C \uC911 {passed}\uAC1C \uD1B5\uACFC",
11107
11179
  "cli.partial": "\uBD80\uBD84 \uAC80\uC0AC: {reasons}",
11108
11180
  "cli.partialUnknown": "\uC77C\uBD80 \uD30C\uC77C\uC744 \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
11109
11181
  "cli.symlinks": "\uC2EC\uBCFC\uB9AD \uB9C1\uD06C {count}\uAC1C\uB294 \uB530\uB77C\uAC00\uC9C0 \uC54A\uACE0 \uAC74\uB108\uB6F0\uC5C8\uC2B5\uB2C8\uB2E4.",
@@ -11157,11 +11229,25 @@ var koC = {
11157
11229
  "cli.keep.unknown.partial": "\uBD80\uBD84 \uAC80\uC0AC",
11158
11230
  "cli.keep.unknown.unread": "\uC77D\uC9C0 \uBABB\uD55C \uD30C\uC77C",
11159
11231
  "cli.keep.mandatory": "\uD544\uC218",
11160
- "cli.keep.more": "\u2026 {count}\uAC1C \uB354"
11232
+ "cli.keep.more": "\u2026 {count}\uAC1C \uB354",
11233
+ "cli.keep.scope": "\uC5D0\uC774\uC804\uD2B8\uB9C8\uB2E4 /\uC5D0\uC11C \uC77D\uB294 \uC9C0\uC2DC \uD30C\uC77C\uC758 \uADDC\uCE59\uC744 \uBD05\uB2C8\uB2E4. \uB2E4\uB978 \uBB38\uC11C\uB294 \uC544\uB798\uC5D0\uC11C \uB530\uB85C \uBCF4\uACE0, \uCF54\uB4DC \uBE14\uB85D\xB7HTML\xB7\uC774\uBBF8\uC9C0\uB294 \uBE44\uAD50\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
11234
+ "cli.keep.notVerified": "\uC774 \uD30C\uC77C\uC5D0\uC11C \uBE44\uAD50\uD558\uC9C0 \uC54A\uC740 \uAC83: \uCF54\uB4DC \uBE14\uB85D {code}\uAC1C, HTML \uBE14\uB85D {html}\uAC1C, \uC774\uBBF8\uC9C0 {images}\uAC1C.",
11235
+ "cli.docs.title": "\uB2E4\uB978 \uBB38\uC11C\uC758 \uC694\uAD6C\uC0AC\uD56D(README, docs/ \uB4F1 \uC5D0\uC774\uC804\uD2B8\uAC00 \uC77D\uC9C0 \uC54A\uB294 Markdown):",
11236
+ "cli.docs.none": "\uB2E4\uB978 \uBB38\uC11C {documents}\uAC1C \uC911 \uC9C0\uC6B0\uAC70\uB098 \uBC14\uAFBC \uBB38\uC11C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
11237
+ "cli.docs.line": "\uBB38\uC11C {documents}\uAC1C \uC911 {removed}\uAC1C \uC0AD\uC81C, {changed}\uAC1C \uBCC0\uACBD: \uC694\uAD6C\uC0AC\uD56D \uB2E8\uC704 {units}\uAC1C(\uC218\uCE58, \uC758\uBB34, \uD569\uACA9\xB7\uC2E4\uD328 \uAE30\uC900, \uC870\uAC74, \uBCF4\uC548, \uD658\uACBD), \uBCF4\uC874 {kept}, \uAC19\uC544 \uBCF4\uC784 {estimated}, \uAC80\uD1A0 {review}(\uACE0\uC815 \uD1A0\uD070 \uBCC0\uACBD {fixed}), \uC0AC\uB77C\uC84C\uC744 \uC218 \uC788\uC74C {missing} -> {verdict}",
11238
+ "cli.docs.verdict.clean": "\uBE44\uAD50\uD55C \uBB38\uC7A5\uC5D0\uC11C \uC783\uC740 \uAC83 \uC5C6\uC74C(\uC758\uBBF8 \uBCF4\uC874\uC744 \uC99D\uBA85\uD558\uC9C0\uB294 \uC54A\uC74C)",
11239
+ "cli.docs.verdict.estimated": "\uC783\uC740 \uAC83 \uC5C6\uC74C. \uBC14\uAFD4 \uC4F4 \uB2E8\uC704\uB294 \uAC19\uC544 \uBCF4\uC774\uB2C8(\uCD94\uC815) \uD55C \uBC88 \uC77D\uC5B4 \uBCF4\uC138\uC694",
11240
+ "cli.docs.verdict.review": "\uC218\uC815\uBCF8\uC5D0\uC11C \uC774 \uB2E8\uC704\uB4E4\uC744 \uAC80\uD1A0\uD558\uC138\uC694",
11241
+ "cli.docs.notVerified": "\uAC80\uC99D\uD558\uC9C0 \uC54A\uC74C: \uCF54\uB4DC \uBE14\uB85D {code}\uAC1C, HTML \uBE14\uB85D {html}\uAC1C, \uC774\uBBF8\uC9C0 {images}\uAC1C, \uD06C\uAE30 \uD55C\uB3C4\uB97C \uB118\uC740 \uBB38\uC11C {documents}\uAC1C. \uC5EC\uB7EC \uBB38\uC7A5\uC5D0 \uAC78\uCE5C \uC758\uBBF8\uB294 \uD655\uC778\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
11242
+ "cli.docs.scopeNote": "\uC5D0\uC774\uC804\uD2B8\uAC00 \uC77D\uC9C0 \uC54A\uB294 Markdown \uBB38\uC11C \uC911 \uC9C0\uC6B0\uAC70\uB098 \uBC14\uAFBC \uBB38\uC11C\uC758 \uC694\uAD6C\uC0AC\uD56D \uB2E8\uC704\uB97C \uC218\uC815\uBCF8\uC758 \uBAA8\uB4E0 Markdown \uD30C\uC77C\uACFC \uB9DE\uCDB0 \uBD05\uB2C8\uB2E4. \uCF54\uB4DC \uBE14\uB85D, \uC774\uBBF8\uC9C0, \uC5EC\uB7EC \uBB38\uC7A5\uC5D0 \uAC78\uCE5C \uC758\uBBF8\uB294 \uAC80\uC99D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
11243
+ "cli.links.title": "\uC218\uC815\uC73C\uB85C \uAE68\uC9C4 \uB9C1\uD06C(\uC6D0\uBCF8\uC5D0\uC11C\uB294 \uC5F4\uB838\uB358 \uB9C1\uD06C):",
11244
+ "cli.docs.removed": "{path}(\uC0AD\uC81C): \uB2E8\uC704 {units}\uAC1C, \uBCF4\uC874 {kept}, \uAC19\uC544 \uBCF4\uC784 {estimated}, \uAC80\uD1A0 {review}, \uC0AC\uB77C\uC84C\uC744 \uC218 \uC788\uC74C {missing}",
11245
+ "cli.docs.changed": "{path}(\uBCC0\uACBD): \uB2E8\uC704 {units}\uAC1C, \uBCF4\uC874 {kept}, \uAC19\uC544 \uBCF4\uC784 {estimated}, \uAC80\uD1A0 {review}, \uC0AC\uB77C\uC84C\uC744 \uC218 \uC788\uC74C {missing}",
11246
+ "cli.notInspected": "\uAC80\uC0AC\uD558\uC9C0 \uC54A\uC74C: \uD30C\uC77C {excluded}\uAC1C({reasons}), \uD655\uC778\uD558\uC9C0 \uBABB\uD55C \uCC38\uC870 {unverified}\uAC1C. \uBC1C\uACAC \uC218\uB294 \uC77D\uC740 \uBC94\uC704\uC5D0\uB9CC \uD574\uB2F9\uD569\uB2C8\uB2E4."
11161
11247
  };
11162
11248
  var jaC = {
11163
11249
  "cli.header": "RepoRefit \xB7 {tool} \xB7 {listed} \u4EF6\u4E2D {read} \u4EF6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u307F \xB7 {seconds} \u79D2",
11164
- "cli.summary": "\u691C\u51FA {findings} \u4EF6(\u9AD8 {high}\u3001\u4E2D {medium}\u3001\u4F4E {low}) \xB7 \u691C\u67FB {evaluated} \u4EF6\u4E2D {passed} \u4EF6\u5408\u683C",
11250
+ "cli.summary": "\u691C\u51FA {findings} \u4EF6(\u9AD8 {high}\u3001\u4E2D {medium}\u3001\u4F4E {low}\u3001\u60C5\u5831 {info}) \xB7 \u691C\u67FB {evaluated} \u4EF6\u4E2D {passed} \u4EF6\u5408\u683C",
11165
11251
  "cli.partial": "\u90E8\u5206\u7684\u306A\u691C\u67FB: {reasons}",
11166
11252
  "cli.partialUnknown": "\u4E00\u90E8\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
11167
11253
  "cli.symlinks": "\u30B7\u30F3\u30DC\u30EA\u30C3\u30AF\u30EA\u30F3\u30AF {count} \u4EF6\u306F\u305F\u3069\u3089\u305A\u306B\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3057\u305F\u3002",
@@ -11215,11 +11301,25 @@ var jaC = {
11215
11301
  "cli.keep.unknown.partial": "\u90E8\u5206\u7684\u306A\u691C\u67FB",
11216
11302
  "cli.keep.unknown.unread": "\u8AAD\u3081\u306A\u3044\u30D5\u30A1\u30A4\u30EB",
11217
11303
  "cli.keep.mandatory": "\u5FC5\u9808",
11218
- "cli.keep.more": "\u2026 \u307B\u304B {count} \u4EF6"
11304
+ "cli.keep.more": "\u2026 \u307B\u304B {count} \u4EF6",
11305
+ "cli.keep.scope": "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3054\u3068\u306B / \u3067\u8AAD\u3080\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u306E\u30EB\u30FC\u30EB\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002\u307B\u304B\u306E\u6587\u66F8\u306F\u4E0B\u3067\u78BA\u8A8D\u3057\u3001\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF\u30FBHTML\u30FB\u753B\u50CF\u306F\u6BD4\u8F03\u3057\u307E\u305B\u3093\u3002",
11306
+ "cli.keep.notVerified": "\u3053\u308C\u3089\u306E\u30D5\u30A1\u30A4\u30EB\u3067\u6BD4\u8F03\u3057\u3066\u3044\u306A\u3044\u3082\u306E: \u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF {code} \u4EF6\u3001HTML \u30D6\u30ED\u30C3\u30AF {html} \u4EF6\u3001\u753B\u50CF {images} \u4EF6\u3002",
11307
+ "cli.docs.title": "\u307B\u304B\u306E\u6587\u66F8\u306E\u8981\u4EF6(README\u3001docs/ \u306A\u3069\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u304C\u8AAD\u307E\u306A\u3044 Markdown):",
11308
+ "cli.docs.none": "\u307B\u304B\u306E\u6587\u66F8 {documents} \u4EF6\u306E\u3046\u3061\u3001\u524A\u9664\u30FB\u5909\u66F4\u3055\u308C\u305F\u6587\u66F8\u306F\u3042\u308A\u307E\u305B\u3093\u3002",
11309
+ "cli.docs.line": "\u6587\u66F8 {documents} \u4EF6\u4E2D {removed} \u4EF6\u524A\u9664\u3001{changed} \u4EF6\u5909\u66F4: \u8981\u4EF6\u306E\u5358\u4F4D {units} \u4EF6(\u6570\u5024\u3001\u7FA9\u52D9\u3001\u5408\u5426\u57FA\u6E96\u3001\u6761\u4EF6\u3001\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u3001\u74B0\u5883)\u3001\u4FDD\u6301 {kept}\u3001\u540C\u3058\u306B\u898B\u3048\u308B {estimated}\u3001\u78BA\u8A8D {review}(\u56FA\u5B9A\u30C8\u30FC\u30AF\u30F3\u5909\u66F4 {fixed})\u3001\u5931\u308F\u308C\u305F\u53EF\u80FD\u6027 {missing} -> {verdict}",
11310
+ "cli.docs.verdict.clean": "\u6BD4\u8F03\u3057\u305F\u6587\u3067\u306F\u5931\u308F\u308C\u305F\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093(\u610F\u5473\u306E\u4FDD\u6301\u3092\u8A3C\u660E\u3059\u308B\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093)",
11311
+ "cli.docs.verdict.estimated": "\u5931\u308F\u308C\u305F\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u8A00\u3044\u63DB\u3048\u305F\u5358\u4F4D\u306F\u540C\u3058\u306B\u898B\u3048\u307E\u3059(\u63A8\u5B9A)\u3002\u4E00\u5EA6\u8AAD\u3093\u3067\u304F\u3060\u3055\u3044",
11312
+ "cli.docs.verdict.review": "\u4FEE\u6B63\u7248\u3067\u3053\u308C\u3089\u306E\u5358\u4F4D\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
11313
+ "cli.docs.notVerified": "\u672A\u691C\u8A3C: \u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF {code} \u4EF6\u3001HTML \u30D6\u30ED\u30C3\u30AF {html} \u4EF6\u3001\u753B\u50CF {images} \u4EF6\u3001\u30B5\u30A4\u30BA\u4E0A\u9650\u3092\u8D85\u3048\u305F\u6587\u66F8 {documents} \u4EF6\u3002\u8907\u6570\u306E\u6587\u306B\u307E\u305F\u304C\u308B\u610F\u5473\u306F\u78BA\u8A8D\u3057\u307E\u305B\u3093\u3002",
11314
+ "cli.docs.scopeNote": "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u304C\u8AAD\u307E\u306A\u3044 Markdown \u6587\u66F8\u306E\u3046\u3061\u3001\u524A\u9664\u30FB\u5909\u66F4\u3055\u308C\u305F\u6587\u66F8\u306E\u8981\u4EF6\u306E\u5358\u4F4D\u3092\u3001\u4FEE\u6B63\u7248\u306E\u3059\u3079\u3066\u306E Markdown \u30D5\u30A1\u30A4\u30EB\u3068\u7167\u5408\u3057\u307E\u3059\u3002\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF\u3001\u753B\u50CF\u3001\u8907\u6570\u306E\u6587\u306B\u307E\u305F\u304C\u308B\u610F\u5473\u306F\u691C\u8A3C\u3057\u307E\u305B\u3093\u3002",
11315
+ "cli.links.title": "\u4FEE\u6B63\u3067\u58CA\u308C\u305F\u30EA\u30F3\u30AF(\u5143\u306E\u7248\u3067\u306F\u958B\u3051\u305F\u3082\u306E):",
11316
+ "cli.docs.removed": "{path}(\u524A\u9664): \u5358\u4F4D {units} \u4EF6\u3001\u4FDD\u6301 {kept}\u3001\u540C\u3058\u306B\u898B\u3048\u308B {estimated}\u3001\u78BA\u8A8D {review}\u3001\u5931\u308F\u308C\u305F\u53EF\u80FD\u6027 {missing}",
11317
+ "cli.docs.changed": "{path}(\u5909\u66F4): \u5358\u4F4D {units} \u4EF6\u3001\u4FDD\u6301 {kept}\u3001\u540C\u3058\u306B\u898B\u3048\u308B {estimated}\u3001\u78BA\u8A8D {review}\u3001\u5931\u308F\u308C\u305F\u53EF\u80FD\u6027 {missing}",
11318
+ "cli.notInspected": "\u691C\u67FB\u3057\u3066\u3044\u306A\u3044: \u30D5\u30A1\u30A4\u30EB {excluded} \u4EF6({reasons})\u3001\u78BA\u8A8D\u3067\u304D\u306A\u304B\u3063\u305F\u53C2\u7167 {unverified} \u4EF6\u3002\u691C\u51FA\u6570\u306F\u8AAD\u307F\u8FBC\u3093\u3060\u7BC4\u56F2\u3060\u3051\u306E\u3082\u306E\u3067\u3059\u3002"
11219
11319
  };
11220
11320
  var zhC = {
11221
11321
  "cli.header": "RepoRefit \xB7 {tool} \xB7 \u5DF2\u8BFB\u53D6 {listed} \u4E2A\u6587\u4EF6\u4E2D\u7684 {read} \u4E2A \xB7 {seconds} \u79D2",
11222
- "cli.summary": "\u53D1\u73B0 {findings} \u9879\uFF08\u9AD8 {high}\u3001\u4E2D {medium}\u3001\u4F4E {low}\uFF09\xB7 {evaluated} \u9879\u68C0\u67E5\u4E2D {passed} \u9879\u901A\u8FC7",
11322
+ "cli.summary": "\u53D1\u73B0 {findings} \u9879\uFF08\u9AD8 {high}\u3001\u4E2D {medium}\u3001\u4F4E {low}\u3001\u4FE1\u606F {info}\uFF09\xB7 {evaluated} \u9879\u68C0\u67E5\u4E2D {passed} \u9879\u901A\u8FC7",
11223
11323
  "cli.partial": "\u90E8\u5206\u68C0\u67E5\uFF1A{reasons}",
11224
11324
  "cli.partialUnknown": "\u6709\u4E9B\u6587\u4EF6\u672A\u80FD\u8BFB\u53D6\u3002",
11225
11325
  "cli.symlinks": "\u5DF2\u8DF3\u8FC7 {count} \u4E2A\u7B26\u53F7\u94FE\u63A5\uFF08\u4ECE\u4E0D\u8DDF\u968F\uFF09\u3002",
@@ -11273,7 +11373,21 @@ var zhC = {
11273
11373
  "cli.keep.unknown.partial": "\u90E8\u5206\u68C0\u67E5",
11274
11374
  "cli.keep.unknown.unread": "\u672A\u8BFB\u53D6\u7684\u6587\u4EF6",
11275
11375
  "cli.keep.mandatory": "\u5FC5\u987B",
11276
- "cli.keep.more": "\u2026 \u8FD8\u6709 {count} \u9879"
11376
+ "cli.keep.more": "\u2026 \u8FD8\u6709 {count} \u9879",
11377
+ "cli.keep.scope": "\u68C0\u67E5\u6BCF\u4E2A\u4EE3\u7406\u5728 / \u8BFB\u53D6\u7684\u6307\u4EE4\u6587\u4EF6\u4E2D\u7684\u89C4\u5219\u3002\u5176\u4ED6\u6587\u6863\u5728\u4E0B\u9762\u5355\u72EC\u68C0\u67E5\uFF1B\u4E0D\u6BD4\u8F83\u4EE3\u7801\u5757\u3001HTML \u548C\u56FE\u7247\u3002",
11378
+ "cli.keep.notVerified": "\u8FD9\u4E9B\u6587\u4EF6\u4E2D\u672A\u6BD4\u8F83\u7684\u5185\u5BB9\uFF1A\u4EE3\u7801\u5757 {code} \u4E2A\u3001HTML \u5757 {html} \u4E2A\u3001\u56FE\u7247 {images} \u4E2A\u3002",
11379
+ "cli.docs.title": "\u5176\u4ED6\u6587\u6863\u4E2D\u7684\u8981\u6C42\uFF08README\u3001docs/ \u7B49\u4EE3\u7406\u4E0D\u8BFB\u53D6\u7684 Markdown\uFF09\uFF1A",
11380
+ "cli.docs.none": "{documents} \u4E2A\u5176\u4ED6\u6587\u6863\u4E2D\u6CA1\u6709\u88AB\u5220\u9664\u6216\u4FEE\u6539\u7684\u6587\u6863\u3002",
11381
+ "cli.docs.line": "{documents} \u4E2A\u6587\u6863\u4E2D\u5220\u9664 {removed} \u4E2A\u3001\u4FEE\u6539 {changed} \u4E2A\uFF1A\u8981\u6C42\u5355\u5143 {units} \u4E2A\uFF08\u6570\u503C\u3001\u4E49\u52A1\u3001\u901A\u8FC7/\u5931\u8D25\u6807\u51C6\u3001\u6761\u4EF6\u3001\u5B89\u5168\u3001\u73AF\u5883\uFF09\uFF0C\u4FDD\u7559 {kept}\uFF0C\u770B\u4F3C\u76F8\u540C {estimated}\uFF0C\u590D\u6838 {review}\uFF08\u56FA\u5B9A\u8BCD\u53D8\u5316 {fixed}\uFF09\uFF0C\u53EF\u80FD\u4E22\u5931 {missing} -> {verdict}",
11382
+ "cli.docs.verdict.clean": "\u6BD4\u8F83\u7684\u6587\u5B57\u4E2D\u6CA1\u6709\u53D1\u73B0\u4E22\u5931\uFF08\u8FD9\u4E0D\u80FD\u8BC1\u660E\u542B\u4E49\u88AB\u4FDD\u7559\uFF09",
11383
+ "cli.docs.verdict.estimated": "\u6CA1\u6709\u53D1\u73B0\u4E22\u5931\uFF1B\u6539\u5199\u7684\u5355\u5143\u770B\u4F3C\u76F8\u540C\uFF08\u4F30\u8BA1\uFF09\uFF0C\u8BF7\u8BFB\u4E00\u904D",
11384
+ "cli.docs.verdict.review": "\u8BF7\u5728\u4FEE\u6539\u7248\u4E2D\u590D\u6838\u8FD9\u4E9B\u5355\u5143",
11385
+ "cli.docs.notVerified": "\u672A\u9A8C\u8BC1\uFF1A\u4EE3\u7801\u5757 {code} \u4E2A\u3001HTML \u5757 {html} \u4E2A\u3001\u56FE\u7247 {images} \u4E2A\u3001\u8D85\u8FC7\u5927\u5C0F\u4E0A\u9650\u7684\u6587\u6863 {documents} \u4E2A\uFF1B\u4E0D\u68C0\u67E5\u8DE8\u591A\u4E2A\u53E5\u5B50\u7684\u542B\u4E49\u3002",
11386
+ "cli.docs.scopeNote": "\u628A\u4EE3\u7406\u4E0D\u8BFB\u53D6\u7684 Markdown \u6587\u6863\u4E2D\u88AB\u5220\u9664\u6216\u4FEE\u6539\u7684\u6587\u6863\u7684\u8981\u6C42\u5355\u5143\uFF0C\u4E0E\u4FEE\u6539\u7248\u7684\u6240\u6709 Markdown \u6587\u4EF6\u8FDB\u884C\u6BD4\u5BF9\u3002\u4E0D\u9A8C\u8BC1\u4EE3\u7801\u5757\u3001\u56FE\u7247\u548C\u8DE8\u53E5\u5B50\u7684\u542B\u4E49\u3002",
11387
+ "cli.links.title": "\u8FD9\u6B21\u4FEE\u6539\u5F04\u574F\u7684\u94FE\u63A5\uFF08\u5728\u539F\u7248\u4E2D\u53EF\u4EE5\u6253\u5F00\uFF09\uFF1A",
11388
+ "cli.docs.removed": "{path}\uFF08\u5220\u9664\uFF09\uFF1A\u5355\u5143 {units} \u4E2A\uFF0C\u4FDD\u7559 {kept}\uFF0C\u770B\u4F3C\u76F8\u540C {estimated}\uFF0C\u590D\u6838 {review}\uFF0C\u53EF\u80FD\u4E22\u5931 {missing}",
11389
+ "cli.docs.changed": "{path}\uFF08\u4FEE\u6539\uFF09\uFF1A\u5355\u5143 {units} \u4E2A\uFF0C\u4FDD\u7559 {kept}\uFF0C\u770B\u4F3C\u76F8\u540C {estimated}\uFF0C\u590D\u6838 {review}\uFF0C\u53EF\u80FD\u4E22\u5931 {missing}",
11390
+ "cli.notInspected": "\u672A\u68C0\u67E5\uFF1A\u6587\u4EF6 {excluded} \u4E2A\uFF08{reasons}\uFF09\uFF0C\u65E0\u6CD5\u786E\u8BA4\u7684\u5F15\u7528 {unverified} \u4E2A\u3002\u53D1\u73B0\u6570\u53EA\u9488\u5BF9\u5DF2\u8BFB\u53D6\u7684\u8303\u56F4\u3002"
11277
11391
  };
11278
11392
 
11279
11393
  // ../core/src/i18n/messages.ts
@@ -11357,6 +11471,7 @@ var en = {
11357
11471
  "coverage.github-request-budget": "Stopped after the per-scan budget of {limit} GitHub requests.",
11358
11472
  "coverage.read-failures": "{count} file(s) could not be read.",
11359
11473
  "exclusion.excluded-directory": "Dependency/build/VCS folder",
11474
+ "exclusion.ignored": "Ignored by .reporefitignore, .gitignore or --ignore (listed, not read)",
11360
11475
  "exclusion.binary": "Binary file",
11361
11476
  "exclusion.nested-archive": "Nested archive (not opened)",
11362
11477
  "exclusion.symlink": "Symbolic link",
@@ -11447,6 +11562,7 @@ var ko = {
11447
11562
  "coverage.github-request-budget": "\uAC80\uC0AC\uB2F9 GitHub \uC694\uCCAD \uC608\uC0B0 {limit}\uD68C\uC5D0\uC11C \uBA48\uCDC4\uC2B5\uB2C8\uB2E4.",
11448
11563
  "coverage.read-failures": "\uD30C\uC77C {count}\uAC1C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
11449
11564
  "exclusion.excluded-directory": "\uC758\uC874\uC131\xB7\uBE4C\uB4DC\xB7VCS \uD3F4\uB354",
11565
+ "exclusion.ignored": ".reporefitignore\xB7.gitignore\xB7--ignore\uB85C \uC81C\uC678(\uBAA9\uB85D\uC5D0\uB294 \uC788\uC74C, \uC77D\uC9C0 \uC54A\uC74C)",
11450
11566
  "exclusion.binary": "\uBC14\uC774\uB108\uB9AC \uD30C\uC77C",
11451
11567
  "exclusion.nested-archive": "\uC911\uCCA9 \uC555\uCD95 \uD30C\uC77C(\uC5F4\uC9C0 \uC54A\uC74C)",
11452
11568
  "exclusion.symlink": "\uC2EC\uBCFC\uB9AD \uB9C1\uD06C",
@@ -11537,6 +11653,7 @@ var ja = {
11537
11653
  "coverage.github-request-budget": "\u691C\u67FB\u3042\u305F\u308A\u306E GitHub \u30EA\u30AF\u30A8\u30B9\u30C8\u4E88\u7B97 {limit} \u56DE\u3067\u505C\u6B62\u3057\u307E\u3057\u305F\u3002",
11538
11654
  "coverage.read-failures": "{count} \u4EF6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
11539
11655
  "exclusion.excluded-directory": "\u4F9D\u5B58\u95A2\u4FC2\u30FB\u30D3\u30EB\u30C9\u30FBVCS \u30D5\u30A9\u30EB\u30C0\u30FC",
11656
+ "exclusion.ignored": ".reporefitignore\u30FB.gitignore\u30FB--ignore \u3067\u9664\u5916(\u4E00\u89A7\u306B\u306F\u3042\u308A\u3001\u8AAD\u307F\u8FBC\u307E\u306A\u3044)",
11540
11657
  "exclusion.binary": "\u30D0\u30A4\u30CA\u30EA\u30D5\u30A1\u30A4\u30EB",
11541
11658
  "exclusion.nested-archive": "\u5165\u308C\u5B50\u306E\u5727\u7E2E\u30D5\u30A1\u30A4\u30EB(\u958B\u304B\u306A\u3044)",
11542
11659
  "exclusion.symlink": "\u30B7\u30F3\u30DC\u30EA\u30C3\u30AF\u30EA\u30F3\u30AF",
@@ -11627,6 +11744,7 @@ var zhHans = {
11627
11744
  "coverage.github-request-budget": "\u8FBE\u5230\u6BCF\u6B21\u68C0\u67E5 {limit} \u4E2A GitHub \u8BF7\u6C42\u7684\u9884\u7B97\u540E\u505C\u6B62\u3002",
11628
11745
  "coverage.read-failures": "\u6709 {count} \u4E2A\u6587\u4EF6\u65E0\u6CD5\u8BFB\u53D6\u3002",
11629
11746
  "exclusion.excluded-directory": "\u4F9D\u8D56\u3001\u6784\u5EFA\u6216\u7248\u672C\u63A7\u5236\u6587\u4EF6\u5939",
11747
+ "exclusion.ignored": "\u88AB .reporefitignore\u3001.gitignore \u6216 --ignore \u6392\u9664\uFF08\u5DF2\u5217\u51FA\uFF0C\u672A\u8BFB\u53D6\uFF09",
11630
11748
  "exclusion.binary": "\u4E8C\u8FDB\u5236\u6587\u4EF6",
11631
11749
  "exclusion.nested-archive": "\u5D4C\u5957\u538B\u7F29\u6587\u4EF6(\u4E0D\u6253\u5F00)",
11632
11750
  "exclusion.symlink": "\u7B26\u53F7\u94FE\u63A5",
@@ -11657,6 +11775,41 @@ function toLocale(code2) {
11657
11775
  return null;
11658
11776
  }
11659
11777
 
11778
+ // ../core/src/results.ts
11779
+ function changePercent(before, after) {
11780
+ if (!Number.isFinite(before) || !Number.isFinite(after) || before === 0) return null;
11781
+ return Math.round((after - before) / before * 100);
11782
+ }
11783
+ function allToolsSummary(report, tools) {
11784
+ const verdict = report.rules.filter((r) => r.ruleId !== "INV-001" && r.status !== "skipped" && r.status !== "error");
11785
+ const rulesPassed = verdict.filter((r) => r.status === "pass").length;
11786
+ return {
11787
+ rulesEvaluated: verdict.length,
11788
+ rulesPassed,
11789
+ passPercent: verdict.length ? Math.round(rulesPassed / verdict.length * 100) : null,
11790
+ tools: tools.map((t2) => {
11791
+ const rs = report.rules.filter((r) => t2.rules.includes(r.ruleId));
11792
+ const findings = rs.reduce((n, r) => n + r.findings.length, 0);
11793
+ const high = rs.reduce((n, r) => n + r.findings.filter((f) => f.severity === "high").length, 0);
11794
+ const ran = rs.filter((r) => r.status !== "skipped" && r.status !== "error");
11795
+ const status = ran.length === 0 ? report.coverage?.partial ? "unread" : "not-checked" : findings ? "issues" : ran.some((r) => r.status === "partial") ? "partial" : "clean";
11796
+ return { tool: t2.id, status, findings, high };
11797
+ })
11798
+ };
11799
+ }
11800
+ function severityCounts(findings) {
11801
+ const c = { total: findings.length, high: 0, medium: 0, low: 0, info: 0, unknown: 0 };
11802
+ for (const f of findings) {
11803
+ if (f.severity === "high" || f.severity === "medium" || f.severity === "low" || f.severity === "info") c[f.severity]++;
11804
+ else c.unknown++;
11805
+ }
11806
+ return c;
11807
+ }
11808
+ function severityParts(c) {
11809
+ const parts = [["high", c.high], ["medium", c.medium], ["low", c.low], ["info", c.info]];
11810
+ return c.unknown ? [...parts, ["unknown", c.unknown]] : parts;
11811
+ }
11812
+
11660
11813
  // ../core/src/report/rule-docs.ts
11661
11814
  var PUBLIC_SITE = "https://reporefit.com";
11662
11815
  function ruleDocUrl(locale, ruleId) {
@@ -11779,6 +11932,7 @@ function renderMarkdownReport(report, locale) {
11779
11932
  out.push(`| ${t(locale, "report.partial")} | ${yn(c.partial)} |`, "");
11780
11933
  const findings = report.rules.flatMap((r) => r.findings);
11781
11934
  out.push(`## ${t(locale, "report.findings")} (${findings.length})`, "");
11935
+ if (findings.length) out.push(severityParts(severityCounts(findings)).map(([s, n]) => `${t(locale, `severity.${s}`)} ${n}`).join(" \xB7 "), "");
11782
11936
  if (findings.length === 0) out.push(t(locale, "report.noFindings"), "");
11783
11937
  findings.forEach((f, i) => out.push(findingBlock(locale, f, i + 1)));
11784
11938
  const unverified = report.rules.flatMap((r) => r.unverified);
@@ -11822,19 +11976,6 @@ function renderJsonReport(report) {
11822
11976
  // ../core/src/report/fix-plan.ts
11823
11977
  var ORDER = { high: 0, medium: 1, low: 2, info: 3, unknown: 4 };
11824
11978
  var CONFIDENCE = { high: 0, medium: 1, low: 2 };
11825
- function fenced2(text3) {
11826
- const runs = text3.match(/`{3,}/g) ?? [];
11827
- const longest = runs.reduce((m, r) => Math.max(m, r.length), 2);
11828
- const fence = "`".repeat(longest + 1);
11829
- return `${fence}text
11830
- ${text3}
11831
- ${fence}`;
11832
- }
11833
- function msg2(locale, key, params) {
11834
- const safe = {};
11835
- for (const [k, v] of Object.entries(params)) safe[k] = typeof v === "string" ? code(v) : v;
11836
- return t(locale, key, safe).replace(/"(`[^`]*`+)"/g, "$1");
11837
- }
11838
11979
  var where = (locale, f) => f.line ? code(`${f.path}:${f.line}`) : f.path === "." ? t(locale, "report.project") : code(f.path);
11839
11980
  function fixPlanTasks(report) {
11840
11981
  return report.rules.flatMap((r) => r.findings).slice().sort(
@@ -11854,13 +11995,13 @@ function renderFixPlan(report, locale) {
11854
11995
  if (tasks.length === 0) out.push(t(locale, "fixplan.none"), "");
11855
11996
  tasks.forEach((f, i) => {
11856
11997
  out.push(`### ${i + 1}. ${f.ruleId} \xB7 ${t(locale, `severity.${f.severity}`)} \xB7 ${t(locale, `rule.${f.ruleId}`)}`, "");
11857
- out.push(`- ${t(locale, "fixplan.problem")}: ${msg2(locale, f.messageKey, f.params)}`);
11998
+ out.push(`- ${t(locale, "fixplan.problem")}: ${msg(locale, f.messageKey, f.params)}`);
11858
11999
  out.push(`- ${t(locale, "fixplan.target")}: ${where(locale, f.location)}${f.related?.length ? ` (${t(locale, "report.related")}: ${f.related.map((r) => where(locale, r)).join(", ")})` : ""}`);
11859
- out.push(`- ${t(locale, "fixplan.change")}: ${msg2(locale, f.recommendation.messageKey, f.recommendation.params)}`);
12000
+ out.push(`- ${t(locale, "fixplan.change")}: ${msg(locale, f.recommendation.messageKey, f.recommendation.params)}`);
11860
12001
  out.push(`- ${t(locale, "fixplan.keep")}`);
11861
- out.push(`- ${t(locale, "fixplan.verify")}: ${msg2(locale, f.verification.messageKey, f.verification.params)}`);
12002
+ out.push(`- ${t(locale, "fixplan.verify")}: ${msg(locale, f.verification.messageKey, f.verification.params)}`);
11862
12003
  out.push(`- ${t(locale, "report.ruleDoc")}: ${ruleDocUrl(locale, f.ruleId)}`);
11863
- if (f.evidence) out.push("", `${t(locale, "report.evidence")}:`, "", fenced2(f.evidence));
12004
+ if (f.evidence) out.push("", `${t(locale, "report.evidence")}:`, "", fenced(f.evidence));
11864
12005
  out.push("");
11865
12006
  });
11866
12007
  const unverified = report.rules.flatMap((r) => r.unverified);
@@ -12018,6 +12159,44 @@ function extractRuleUnits(doc) {
12018
12159
  visit(tree);
12019
12160
  return units;
12020
12161
  }
12162
+ function matchUnit(u, pool, originals) {
12163
+ const exact = pool.find((a) => a.exact === u.exact);
12164
+ if (exact) return { grade: "exact", at: exact, reason: null };
12165
+ const norm = pool.find((a) => a.normalized === u.normalized);
12166
+ if (norm) return { grade: "normalized", at: norm, reason: null };
12167
+ const inside = pool.find((a) => a.normalized.includes(u.normalized));
12168
+ const substantial = u.normalized.length >= 8 || (u.normalized.match(/[\p{Script=Hangul}\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/gu) ?? []).length >= 4;
12169
+ if (inside && substantial) return { grade: "structural", at: inside, reason: null };
12170
+ const sentences = u.normalized.split(/(?<=[.!?。!?])\s*/).map((x) => normalizeRule(x)).filter((x) => x.length >= 4);
12171
+ if (sentences.length > 1) {
12172
+ const homes = sentences.map((x) => pool.find((a) => a.normalized.includes(x)));
12173
+ if (homes.every(Boolean)) return { grade: "structural", at: homes[0], reason: null };
12174
+ }
12175
+ let best = null;
12176
+ let score = 0;
12177
+ for (const a of pool) {
12178
+ if (originals.has(a.normalized) && a.normalized !== u.normalized && !sameFixed(u.fixed, a.fixed)) continue;
12179
+ const o = ruleSimilarity(u.normalized, a.normalized);
12180
+ if (o > score) [best, score] = [a, o];
12181
+ }
12182
+ if (best && score >= REVIEW_MIN) {
12183
+ const same = sameFixed(u.fixed, best.fixed);
12184
+ if (same && score >= ESTIMATE_MIN) return { grade: "estimated", at: best, reason: "reworded" };
12185
+ return { grade: "review", at: best, reason: same ? "reworded" : "fixedChanged" };
12186
+ }
12187
+ return { grade: "missing", at: null, reason: null };
12188
+ }
12189
+ function countNotVerified(texts) {
12190
+ const out = { codeBlocks: 0, html: 0, images: 0, documents: 0 };
12191
+ const visit = (n) => {
12192
+ if (n.type === "code") out.codeBlocks++;
12193
+ else if (n.type === "html") out.html++;
12194
+ else if (n.type === "image" || n.type === "imageReference") out.images++;
12195
+ for (const c of n.children ?? []) visit(c);
12196
+ };
12197
+ for (const t2 of texts) visit(parseTree(t2.text));
12198
+ return out;
12199
+ }
12021
12200
  var severity = (i) => (i.grade === "estimated" ? -10 : 0) + (i.mandatory ? 2 : 0) + (i.tags.length > 0 ? 1 : 0);
12022
12201
  function comparePreservation(platform, workdir, before, after) {
12023
12202
  const scopeOf2 = (docs) => activeContext(platform, workdir, docs);
@@ -12041,43 +12220,16 @@ function comparePreservation(platform, workdir, before, after) {
12041
12220
  let fixedChanged = 0;
12042
12221
  let missing = 0;
12043
12222
  let scopeReduced = 0;
12044
- const match = (u, pool) => {
12045
- const exact = pool.find((a) => a.exact === u.exact);
12046
- if (exact) return { grade: "exact", at: exact, reason: null };
12047
- const norm = pool.find((a) => a.normalized === u.normalized);
12048
- if (norm) return { grade: "normalized", at: norm, reason: null };
12049
- const inside = pool.find((a) => a.normalized.includes(u.normalized));
12050
- const substantial = u.normalized.length >= 8 || (u.normalized.match(/[\p{Script=Hangul}\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/gu) ?? []).length >= 4;
12051
- if (inside && substantial) return { grade: "structural", at: inside, reason: null };
12052
- const sentences = u.normalized.split(/(?<=[.!?。!?])\s*/).map((s) => normalizeRule(s)).filter((s) => s.length >= 4);
12053
- if (sentences.length > 1) {
12054
- const homes = sentences.map((s) => pool.find((a) => a.normalized.includes(s)));
12055
- if (homes.every(Boolean)) return { grade: "structural", at: homes[0], reason: null };
12056
- }
12057
- let best = null;
12058
- let score = 0;
12059
- for (const a of pool) {
12060
- if (beforeNorms.has(a.normalized) && a.normalized !== u.normalized && !sameFixed(u.fixed, a.fixed)) continue;
12061
- const o = ruleSimilarity(u.normalized, a.normalized);
12062
- if (o > score) [best, score] = [a, o];
12063
- }
12064
- if (best && score >= REVIEW_MIN) {
12065
- const same = sameFixed(u.fixed, best.fixed);
12066
- if (same && score >= ESTIMATE_MIN) return { grade: "estimated", at: best, reason: "reworded" };
12067
- return { grade: "review", at: best, reason: same ? "reworded" : "fixedChanged" };
12068
- }
12069
- return { grade: "missing", at: null, reason: null };
12070
- };
12071
12223
  const claimed = /* @__PURE__ */ new Set();
12072
12224
  for (const u of beforeUnits) {
12073
- const inScope = match(u, afterIn);
12225
+ const inScope = matchUnit(u, afterIn, beforeNorms);
12074
12226
  if (inScope.at) claimed.add(inScope.at);
12075
12227
  const keptGrade = inScope.grade === "exact" || inScope.grade === "normalized" || inScope.grade === "structural";
12076
12228
  if (keptGrade) {
12077
12229
  kept++;
12078
12230
  continue;
12079
12231
  }
12080
- const anywhere = match(u, afterAll);
12232
+ const anywhere = matchUnit(u, afterAll, beforeNorms);
12081
12233
  const base2 = { before: loc2(u), mandatory: u.mandatory, tags: u.tags };
12082
12234
  if (anywhere.grade === "exact" || anywhere.grade === "normalized" || anywhere.grade === "structural") {
12083
12235
  scopeReduced++;
@@ -12120,31 +12272,56 @@ function comparePreservation(platform, workdir, before, after) {
12120
12272
  added,
12121
12273
  verdict,
12122
12274
  unknownReasons,
12123
- items
12275
+ items,
12276
+ notVerified: countNotVerified(before.texts.filter((t2) => beforeScope.has(t2.path)))
12124
12277
  };
12125
12278
  }
12126
-
12127
- // ../core/src/results.ts
12128
- function changePercent(before, after) {
12129
- if (!Number.isFinite(before) || !Number.isFinite(after) || before === 0) return null;
12130
- return Math.round((after - before) / before * 100);
12131
- }
12132
- function allToolsSummary(report, tools) {
12133
- const verdict = report.rules.filter((r) => r.ruleId !== "INV-001" && r.status !== "skipped" && r.status !== "error");
12134
- const rulesPassed = verdict.filter((r) => r.status === "pass").length;
12135
- return {
12136
- rulesEvaluated: verdict.length,
12137
- rulesPassed,
12138
- passPercent: verdict.length ? Math.round(rulesPassed / verdict.length * 100) : null,
12139
- tools: tools.map((t2) => {
12140
- const rs = report.rules.filter((r) => t2.rules.includes(r.ruleId));
12141
- const findings = rs.reduce((n, r) => n + r.findings.length, 0);
12142
- const high = rs.reduce((n, r) => n + r.findings.filter((f) => f.severity === "high").length, 0);
12143
- const ran = rs.filter((r) => r.status !== "skipped" && r.status !== "error");
12144
- const status = ran.length === 0 ? report.coverage?.partial ? "unread" : "not-checked" : findings ? "issues" : ran.some((r) => r.status === "partial") ? "partial" : "clean";
12145
- return { tool: t2.id, status, findings, high };
12146
- })
12147
- };
12279
+ var REQUIREMENT_RE = /\d|\b(must|never|always|should|shall|required?|requires|mandatory|only|do not|don't|pass(?:es|ed)?|fail(?:s|ed|ure)?|criteri(?:a|on)|accept\w*|threshold|target|limit|at least|at most|if|when|unless|except\w*|prerequisite\w*|environment|windows|linux|macos|ubuntu|version|secur\w*|secret\w*|password\w*|credential\w*|privacy|permission\w*)\b|반드시|필수|금지|절대|해야|하지 ?마|않|통과|실패|합격|불합격|기준|목표|이상|이하|초과|미만|경우|예외|전제|사전 ?조건|환경|버전|보안|개인정보|비밀|권한|必ず|禁止|しない|ないこと|合格|不合格|基準|目標|以上|以下|未満|場合|例外|前提|環境|バージョン|セキュリティ|権限|必须|不得|不要|通过|失败|标准|目标|如果|除非|前提|环境|版本|安全|隐私|权限/i;
12280
+ var NOT_PROJECT_DOCS2 = /(^|\/)(fixtures?|__fixtures__|testdata|test-data|examples?|samples?|vendor|third[_-]party|node_modules)\//i;
12281
+ function compareDocuments(before, after) {
12282
+ const isMd = (path) => /\.(md|mdx|markdown)$/i.test(path);
12283
+ const docsBefore = before.texts.filter((t2) => isMd(t2.path) && !before.instruction.has(t2.path) && !NOT_PROJECT_DOCS2.test(t2.path));
12284
+ const afterByPath = new Map(after.texts.map((t2) => [t2.path, t2.text]));
12285
+ const touched = docsBefore.filter((t2) => afterByPath.get(t2.path) !== t2.text);
12286
+ const removed = touched.filter((t2) => !afterByPath.has(t2.path)).length;
12287
+ const units = touched.flatMap((t2) => extractRuleUnits(t2)).filter((u) => REQUIREMENT_RE.test(u.exact));
12288
+ const originals = new Set(units.map((u) => u.normalized));
12289
+ const pool = after.texts.filter((t2) => isMd(t2.path) || /\.mdc$/i.test(t2.path)).flatMap((t2) => extractRuleUnits(t2));
12290
+ const loc2 = (u) => ({ path: u.path, line: u.line, preview: u.preview });
12291
+ const items = [];
12292
+ const n = { kept: 0, estimated: 0, review: 0, fixedChanged: 0, missing: 0 };
12293
+ const gone = new Set(touched.filter((t2) => !afterByPath.has(t2.path)).map((t2) => t2.path));
12294
+ const perDocument = new Map(touched.map((t2) => [t2.path, { path: t2.path, status: gone.has(t2.path) ? "removed" : "changed", units: 0, kept: 0, estimated: 0, review: 0, missing: 0 }]));
12295
+ for (const u of units) {
12296
+ const m = matchUnit(u, pool, originals);
12297
+ const doc = perDocument.get(u.path);
12298
+ doc.units++;
12299
+ if (m.grade === "exact" || m.grade === "normalized" || m.grade === "structural") {
12300
+ n.kept++;
12301
+ doc.kept++;
12302
+ continue;
12303
+ }
12304
+ if (m.grade === "estimated") {
12305
+ n.estimated++;
12306
+ doc.estimated++;
12307
+ } else if (m.grade === "review") {
12308
+ n.review++;
12309
+ doc.review++;
12310
+ if (m.reason === "fixedChanged") n.fixedChanged++;
12311
+ } else {
12312
+ n.missing++;
12313
+ doc.missing++;
12314
+ }
12315
+ items.push({ grade: m.grade, reason: m.reason, before: loc2(u), after: m.at ? loc2(m.at) : null, mandatory: u.mandatory, tags: u.tags });
12316
+ }
12317
+ const weight = (i) => (gone.has(i.before.path) ? 8 : 0) + (i.grade === "missing" ? 4 : i.reason === "fixedChanged" ? 2 : 0) + severity(i);
12318
+ items.sort((a, b) => weight(b) - weight(a) || (a.before.path < b.before.path ? -1 : a.before.path > b.before.path ? 1 : a.before.line - b.before.line));
12319
+ const docs = [...perDocument.values()].filter((d) => d.units > 0 || d.status === "removed");
12320
+ docs.sort((a, b) => a.status === b.status ? a.path < b.path ? -1 : 1 : a.status === "removed" ? -1 : 1);
12321
+ const provided = before.texts.filter((t2) => isMd(t2.path)).length;
12322
+ const notVerified = { ...countNotVerified(touched), documents: Math.max(0, before.markdownRead - provided) };
12323
+ const verdict = touched.length === 0 ? "none" : n.missing + n.review > 0 ? "review" : n.estimated > 0 ? "estimated" : "clean";
12324
+ return { documents: docsBefore.length, removed, changed: touched.length - removed, units: units.length, ...n, verdict, perDocument: docs, items, notVerified };
12148
12325
  }
12149
12326
 
12150
12327
  // ../core/src/compare.ts
@@ -12166,9 +12343,22 @@ function compareRuns(a, b, folder2 = "") {
12166
12343
  rules: ids.map((ruleId) => ({ ruleId, before: count(a.report, ruleId), after: count(b.report, ruleId) })),
12167
12344
  findings: { before: total(a.report), after: total(b.report) },
12168
12345
  tokens,
12169
- preservation
12346
+ preservation,
12347
+ documents: documentsOf(a, b),
12348
+ brokenLinks: brokenLinks(a.report, b.report)
12170
12349
  };
12171
12350
  }
12351
+ function documentsOf(a, b) {
12352
+ const instruction = new Set((a.report.metrics.tokens?.docs ?? []).map((d) => d.path));
12353
+ const markdownRead = a.report.rules.find((r) => r.ruleId === "MD-001")?.inspected ?? 0;
12354
+ return compareDocuments({ texts: a.texts, instruction, markdownRead }, { texts: b.texts });
12355
+ }
12356
+ function brokenLinks(a, b) {
12357
+ const md003 = (r) => r.rules.find((x) => x.ruleId === "MD-003")?.findings ?? [];
12358
+ const key = (path, target) => `${path}\0${String(target ?? "")}`;
12359
+ const before = new Set(md003(a).map((f) => key(f.location.path, f.params.target)));
12360
+ return md003(b).filter((f) => !before.has(key(f.location.path, f.params.target))).map((f) => ({ path: f.location.path, line: f.location.line, target: String(f.params.target ?? "") }));
12361
+ }
12172
12362
 
12173
12363
  // ../core/src/tools.ts
12174
12364
  var TOOLS = [
@@ -12247,7 +12437,7 @@ function listFolder(root, opts) {
12247
12437
  };
12248
12438
  const patterns = [opts.useIgnoreFiles ? read(".gitignore") : "", opts.useIgnoreFiles ? read(".reporefitignore") : "", opts.ignore.join("\n")].join("\n");
12249
12439
  const ignored = gitignoreMatcher(patterns.trim() ? patterns : null);
12250
- const out = { entries: [], skippedSymlinks: 0, ignored: 0, truncated: false };
12440
+ const out = { entries: [], skippedSymlinks: 0, ignored: 0, ignoredDirs: [], truncated: false };
12251
12441
  const walk2 = (dir, rel) => {
12252
12442
  let names;
12253
12443
  try {
@@ -12276,15 +12466,14 @@ function listFolder(root, opts) {
12276
12466
  if (SKIP_DIRS.has(name)) continue;
12277
12467
  if (ignored(`${path}/`) || ignored(path)) {
12278
12468
  out.ignored++;
12469
+ out.ignoredDirs.push(`${top}/${path}`);
12279
12470
  continue;
12280
12471
  }
12281
12472
  walk2(full, path);
12282
12473
  } else if (st.isFile()) {
12283
- if (ignored(path)) {
12284
- out.ignored++;
12285
- continue;
12286
- }
12287
- out.entries.push({ path: `${top}/${path}`, size: st.size, read: async () => new Uint8Array(readFileSync(full)) });
12474
+ const skip = ignored(path);
12475
+ if (skip) out.ignored++;
12476
+ out.entries.push({ path: `${top}/${path}`, size: st.size, read: async () => new Uint8Array(readFileSync(full)), ...skip ? { ignored: true } : {} });
12288
12477
  }
12289
12478
  }
12290
12479
  };
@@ -12314,7 +12503,7 @@ async function runFolder(root, o) {
12314
12503
  const limits = cliLimits(o.maxFiles, o.maxReadMb);
12315
12504
  const tool2 = resolveTool(o.tool);
12316
12505
  const listing = listFolder(root, { maxFiles: limits.maxDiscoveredFiles, useIgnoreFiles: o.useIgnoreFiles ?? true, ignore: o.ignore ?? [] });
12317
- const adapter = createFolderAdapter(listing.entries, limits);
12506
+ const adapter = createFolderAdapter(listing.entries, limits, listing.ignoredDirs);
12318
12507
  if (listing.truncated) {
12319
12508
  adapter.listComplete = false;
12320
12509
  adapter.listingReasons.push({ code: "file-count-limit", params: { limit: limits.maxDiscoveredFiles } });
@@ -12345,7 +12534,7 @@ function shouldFail(r, failOn) {
12345
12534
  }
12346
12535
 
12347
12536
  // src/version.ts
12348
- var VERSION = "0.4.1";
12537
+ var VERSION = "0.4.3";
12349
12538
 
12350
12539
  // src/mcp.ts
12351
12540
  import { createInterface } from "node:readline";
@@ -12354,6 +12543,7 @@ import { resolve as resolve2 } from "node:path";
12354
12543
 
12355
12544
  // src/compare.ts
12356
12545
  import * as nodePath from "node:path";
12546
+ var COMPARE_SCHEMA_VERSION = "1.0.0";
12357
12547
  function tokenChangeText(c, locale) {
12358
12548
  if (c.before === null || c.after === null || c.delta === null) return null;
12359
12549
  const delta = c.delta > 0 ? `+${c.delta}` : String(c.delta);
@@ -12368,8 +12558,14 @@ function renderCompare(c, tool2, locale) {
12368
12558
  lines.push(L("compare.tokens"));
12369
12559
  if (c.tokens.length === 0) lines.push(` ${L("compare.noAgents")}`);
12370
12560
  for (const x of c.tokens) lines.push(` ${tokenChangeText(x, locale) ?? L("compare.notComparable", { agent: t(locale, `platform.${x.platform}`) })}`);
12371
- lines.push(` ${L("compare.limits")}`, "", L("keep.title"));
12561
+ lines.push(` ${L("compare.limits")}`, "", L("keep.title"), ` ${L("keep.scope")}`);
12372
12562
  if (c.preservation.length === 0) lines.push(` ${L("keep.none")}`);
12563
+ const item = (i) => {
12564
+ const where3 = i.after ? ` -> ${i.after.path}:${i.after.line}` : "";
12565
+ const reason = i.reason ? ` (${L(`keep.reason.${i.reason}`)})` : "";
12566
+ return ` ${i.before.path}:${i.before.line}${where3} ${L(`keep.grade.${i.grade}`)}${reason}${i.mandatory ? ` [${L("keep.mandatory")}]` : ""} ${i.before.preview}`;
12567
+ };
12568
+ const unchecked = (n) => n.codeBlocks + n.html + n.images + n.documents > 0;
12373
12569
  for (const r of c.preservation) {
12374
12570
  const verdict = r.verdict === "unknown" ? L("keep.verdict.unknown", { reasons: r.unknownReasons.map((x) => L(`keep.unknown.${x}`)).join(", ") }) : L(`keep.verdict.${r.verdict}`);
12375
12571
  lines.push(
@@ -12388,15 +12584,98 @@ function renderCompare(c, tool2, locale) {
12388
12584
  verdict
12389
12585
  })}`
12390
12586
  );
12391
- for (const i of r.items.slice(0, 10)) {
12392
- const where3 = i.after ? ` -> ${i.after.path}:${i.after.line}` : "";
12393
- const reason = i.reason ? ` (${L(`keep.reason.${i.reason}`)})` : "";
12394
- lines.push(` ${i.before.path}:${i.before.line}${where3} ${L(`keep.grade.${i.grade}`)}${reason}${i.mandatory ? ` [${L("keep.mandatory")}]` : ""} ${i.before.preview}`);
12395
- }
12587
+ for (const i of r.items.slice(0, 10)) lines.push(item(i));
12396
12588
  if (r.items.length > 10) lines.push(` ${L("keep.more", { count: r.items.length - 10 })}`);
12589
+ if (unchecked(r.notVerified)) lines.push(` ${L("keep.notVerified", { code: r.notVerified.codeBlocks, html: r.notVerified.html, images: r.notVerified.images })}`);
12590
+ }
12591
+ const d = c.documents;
12592
+ lines.push("", L("docs.title"));
12593
+ if (d.verdict === "none") lines.push(` ${L("docs.none", { documents: d.documents })}`);
12594
+ else {
12595
+ lines.push(
12596
+ ` ${L("docs.line", { removed: d.removed, changed: d.changed, documents: d.documents, units: d.units, kept: d.kept, estimated: d.estimated, review: d.review, fixed: d.fixedChanged, missing: d.missing, verdict: L(`docs.verdict.${d.verdict}`) })}`
12597
+ );
12598
+ for (const x of d.perDocument.slice(0, 20)) lines.push(` ${L(`docs.${x.status}`, { path: x.path, units: x.units, kept: x.kept, estimated: x.estimated, review: x.review, missing: x.missing })}`);
12599
+ for (const i of d.items.slice(0, 10)) lines.push(item(i));
12600
+ if (d.items.length > 10) lines.push(` ${L("keep.more", { count: d.items.length - 10 })}`);
12601
+ }
12602
+ if (unchecked(d.notVerified) || d.verdict !== "none") {
12603
+ lines.push(` ${L("docs.notVerified", { code: d.notVerified.codeBlocks, html: d.notVerified.html, images: d.notVerified.images, documents: d.notVerified.documents })}`);
12604
+ }
12605
+ if (c.brokenLinks.length) {
12606
+ lines.push("", L("links.title"));
12607
+ for (const l of c.brokenLinks.slice(0, 20)) lines.push(` ${l.path}:${l.line} -> ${l.target}`);
12608
+ if (c.brokenLinks.length > 20) lines.push(` ${L("keep.more", { count: c.brokenLinks.length - 20 })}`);
12397
12609
  }
12398
12610
  return lines.join("\n") + "\n";
12399
12611
  }
12612
+ function compareJson(c, tool2, locale) {
12613
+ const agent = (p) => t(locale, `platform.${p}`);
12614
+ const item = (i) => ({
12615
+ before: `${i.before.path}:${i.before.line}`,
12616
+ after: i.after ? `${i.after.path}:${i.after.line}` : null,
12617
+ grade: i.grade,
12618
+ reason: i.reason,
12619
+ mandatory: i.mandatory,
12620
+ text: i.before.preview
12621
+ });
12622
+ const nv = (n) => ({ code_blocks: n.codeBlocks, html: n.html, images: n.images, documents: n.documents });
12623
+ const d = c.documents;
12624
+ return {
12625
+ kind: "reporefit-compare",
12626
+ schema_version: COMPARE_SCHEMA_VERSION,
12627
+ engine: ENGINE_VERSION,
12628
+ ruleset: RULESET_VERSION,
12629
+ tool: tool2,
12630
+ findings: c.findings,
12631
+ rules: c.rules.filter((r) => r.before || r.after).map((r) => ({ rule: r.ruleId, before: r.before, after: r.after })),
12632
+ // percent: signed change rounded to an integer (negative = fewer tokens), null when the original had 0 tokens.
12633
+ tokens: c.tokens.map((x) => ({
12634
+ agent: x.platform,
12635
+ name: agent(x.platform),
12636
+ before: x.before,
12637
+ after: x.after,
12638
+ change: x.delta,
12639
+ percent: x.percent,
12640
+ summary: tokenChangeText(x, locale) ?? t(locale, "cli.compare.notComparable", { agent: agent(x.platform) })
12641
+ })),
12642
+ token_note: t(locale, "cli.compare.limits"),
12643
+ preservation: c.preservation.map((r) => ({
12644
+ agent: r.platform,
12645
+ name: agent(r.platform),
12646
+ rules: r.units,
12647
+ mandatory: r.mandatory,
12648
+ kept: r.kept,
12649
+ probably_same: r.estimated,
12650
+ review: r.review,
12651
+ fixed_tokens_changed: r.fixedChanged,
12652
+ possible_losses: r.missing,
12653
+ out_of_scope: r.scopeReduced,
12654
+ duplicates_removed: r.removedDuplicates,
12655
+ new: r.added,
12656
+ verdict: r.verdict,
12657
+ items: r.items.slice(0, 20).map(item),
12658
+ not_verified: nv(r.notVerified)
12659
+ })),
12660
+ documents: {
12661
+ documents: d.documents,
12662
+ removed: d.removed,
12663
+ changed: d.changed,
12664
+ units: d.units,
12665
+ kept: d.kept,
12666
+ probably_same: d.estimated,
12667
+ review: d.review,
12668
+ fixed_tokens_changed: d.fixedChanged,
12669
+ possible_losses: d.missing,
12670
+ verdict: d.verdict,
12671
+ per_document: d.perDocument.map((x) => ({ path: x.path, status: x.status, units: x.units, kept: x.kept, probably_same: x.estimated, review: x.review, possible_losses: x.missing })),
12672
+ items: d.items.slice(0, 50).map(item),
12673
+ not_verified: nv(d.notVerified),
12674
+ note: t(locale, "cli.docs.scopeNote")
12675
+ },
12676
+ broken_links: c.brokenLinks
12677
+ };
12678
+ }
12400
12679
  function badgeLink(folder2, file, path = nodePath) {
12401
12680
  const rel = path.relative(path.resolve(folder2), path.resolve(file));
12402
12681
  if (!rel || rel === ".." || rel.startsWith(`..${path.sep}`) || path.isAbsolute(rel)) return null;
@@ -12597,8 +12876,18 @@ function summarize(r, locale, max) {
12597
12876
  status: r.findings.length ? "findings" : c.partial ? "partial-clean" : "clean",
12598
12877
  checks: { evaluated: r.evaluated, passed: r.passed },
12599
12878
  findings_total: r.findings.length,
12600
- by_severity: { high: r.bySeverity.high, medium: r.bySeverity.medium, low: r.bySeverity.low },
12601
- coverage: { files_listed: c.discovered, files_read: c.inspected, partial: c.partial, reasons: c.reasons.map((x) => t(locale, `coverage.${x.code}`, x.params)) },
12879
+ // Every finding is in exactly one severity: the parts add up to findings_total (info included).
12880
+ by_severity: { high: r.bySeverity.high, medium: r.bySeverity.medium, low: r.bySeverity.low, info: r.bySeverity.info },
12881
+ coverage: {
12882
+ files_listed: c.discovered,
12883
+ files_read: c.inspected,
12884
+ // Not inspected: a clean result covers only what was read.
12885
+ files_excluded: c.excluded,
12886
+ excluded_by_reason: c.excludedByReason,
12887
+ unverified_references: r.report.rules.reduce((n, x) => n + x.unverified.length, 0),
12888
+ partial: c.partial,
12889
+ reasons: c.reasons.map((x) => t(locale, `coverage.${x.code}`, x.params))
12890
+ },
12602
12891
  findings: r.findings.slice(0, max).map((f) => ({
12603
12892
  rule: f.ruleId,
12604
12893
  severity: f.severity,
@@ -12639,62 +12928,17 @@ async function callTool(name, args) {
12639
12928
  const a = await runFolder(folder(args.before), opts);
12640
12929
  const b = await runFolder(folder(args.after), opts);
12641
12930
  const c = compareRuns({ report: a.report, texts: a.instructionTexts }, { report: b.report, texts: b.instructionTexts });
12642
- const agent = (p) => t(locale, `platform.${p}`);
12643
- return JSON.stringify(
12644
- {
12645
- engine: ENGINE_VERSION,
12646
- ruleset: RULESET_VERSION,
12647
- tool: a.tool,
12648
- findings: c.findings,
12649
- rules: c.rules.filter((r) => r.before || r.after).map((r) => ({ rule: r.ruleId, before: r.before, after: r.after })),
12650
- // percent: signed change rounded to an integer (negative = fewer tokens), null when the original had 0 tokens.
12651
- tokens: c.tokens.map((x) => ({
12652
- agent: x.platform,
12653
- name: agent(x.platform),
12654
- before: x.before,
12655
- after: x.after,
12656
- change: x.delta,
12657
- percent: x.percent,
12658
- summary: tokenChangeText(x, locale) ?? t(locale, "cli.compare.notComparable", { agent: agent(x.platform) })
12659
- })),
12660
- token_note: t(locale, "cli.compare.limits"),
12661
- preservation: c.preservation.map((r) => ({
12662
- agent: r.platform,
12663
- name: agent(r.platform),
12664
- rules: r.units,
12665
- mandatory: r.mandatory,
12666
- kept: r.kept,
12667
- probably_same: r.estimated,
12668
- review: r.review,
12669
- fixed_tokens_changed: r.fixedChanged,
12670
- possible_losses: r.missing,
12671
- out_of_scope: r.scopeReduced,
12672
- duplicates_removed: r.removedDuplicates,
12673
- new: r.added,
12674
- verdict: r.verdict,
12675
- items: r.items.slice(0, 20).map((i) => ({
12676
- before: `${i.before.path}:${i.before.line}`,
12677
- after: i.after ? `${i.after.path}:${i.after.line}` : null,
12678
- grade: i.grade,
12679
- reason: i.reason,
12680
- mandatory: i.mandatory,
12681
- text: i.before.preview
12682
- }))
12683
- }))
12684
- },
12685
- null,
12686
- 2
12687
- );
12931
+ return JSON.stringify(compareJson(c, a.tool, locale), null, 2);
12688
12932
  }
12689
12933
  throw new ToolError(`Unknown tool: ${name}`);
12690
12934
  }
12691
- async function handle(msg3) {
12692
- const reply = (result) => ({ jsonrpc: "2.0", id: msg3.id, result });
12693
- const fail = (code2, message) => ({ jsonrpc: "2.0", id: msg3.id ?? null, error: { code: code2, message } });
12694
- if (msg3.id === void 0) return null;
12695
- switch (msg3.method) {
12935
+ async function handle(msg2) {
12936
+ const reply = (result) => ({ jsonrpc: "2.0", id: msg2.id, result });
12937
+ const fail = (code2, message) => ({ jsonrpc: "2.0", id: msg2.id ?? null, error: { code: code2, message } });
12938
+ if (msg2.id === void 0) return null;
12939
+ switch (msg2.method) {
12696
12940
  case "initialize": {
12697
- const asked = String(msg3.params?.protocolVersion ?? "");
12941
+ const asked = String(msg2.params?.protocolVersion ?? "");
12698
12942
  return reply({
12699
12943
  protocolVersion: PROTOCOLS.includes(asked) ? asked : PROTOCOLS[0],
12700
12944
  capabilities: { tools: { listChanged: false } },
@@ -12707,8 +12951,8 @@ async function handle(msg3) {
12707
12951
  case "tools/list":
12708
12952
  return reply({ tools: toolsList });
12709
12953
  case "tools/call": {
12710
- const name = String(msg3.params?.name ?? "");
12711
- const args = msg3.params?.arguments ?? {};
12954
+ const name = String(msg2.params?.name ?? "");
12955
+ const args = msg2.params?.arguments ?? {};
12712
12956
  try {
12713
12957
  return reply({ content: [{ type: "text", text: await callTool(name, args) }], isError: false });
12714
12958
  } catch (e) {
@@ -12717,21 +12961,21 @@ async function handle(msg3) {
12717
12961
  }
12718
12962
  }
12719
12963
  default:
12720
- return fail(-32601, `Method not found: ${msg3.method}`);
12964
+ return fail(-32601, `Method not found: ${msg2.method}`);
12721
12965
  }
12722
12966
  }
12723
12967
  function serveStdio() {
12724
12968
  const rl = createInterface({ input: process.stdin });
12725
12969
  rl.on("line", async (line) => {
12726
12970
  if (!line.trim()) return;
12727
- let msg3;
12971
+ let msg2;
12728
12972
  try {
12729
- msg3 = JSON.parse(line);
12973
+ msg2 = JSON.parse(line);
12730
12974
  } catch {
12731
12975
  process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id: null, error: { code: -32700, message: "Parse error" } }) + "\n");
12732
12976
  return;
12733
12977
  }
12734
- const out = await handle(msg3);
12978
+ const out = await handle(msg2);
12735
12979
  if (out) process.stdout.write(JSON.stringify(out) + "\n");
12736
12980
  });
12737
12981
  process.stderr.write(`RepoRefit MCP server ${VERSION} ready (stdio, read-only, no network)
@@ -12739,6 +12983,17 @@ function serveStdio() {
12739
12983
  }
12740
12984
 
12741
12985
  // src/cli.ts
12986
+ var SCAN_OPTIONS = ["tool", "lang", "fail-on", "ignore", "max-files", "max-read-mb", "no-gitignore", "quiet"];
12987
+ var OPTIONS = {
12988
+ scan: [...SCAN_OPTIONS, "format", "out"],
12989
+ fix: [...SCAN_OPTIONS, "out"],
12990
+ report: [...SCAN_OPTIONS, "out"],
12991
+ badge: [...SCAN_OPTIONS, "out"],
12992
+ compare: [...SCAN_OPTIONS, "format", "out"],
12993
+ rules: ["tool", "lang"],
12994
+ mcp: []
12995
+ };
12996
+ var FORMATS = { scan: ["text", "json", "md", "fix"], compare: ["text", "json"] };
12742
12997
  var DOCS = "https://reporefit.com/en/cli/";
12743
12998
  var RULES_URL = (locale, id) => `https://reporefit.com/${locale === "zh-Hans" ? "zh-cn" : locale}/rules/#${id.toLowerCase()}`;
12744
12999
  var HELP = `RepoRefit ${VERSION} (engine ${ENGINE_VERSION}, rules ${RULESET_VERSION})
@@ -12752,15 +13007,15 @@ Commands:
12752
13007
  fix [folder] write an AI fix plan (Markdown) for Claude Code, Codex and others
12753
13008
  report [folder] write reporefit-report.md and reporefit-report.json
12754
13009
  badge [folder] write a README badge SVG (counts only)
12755
- compare <before> <after> compare two copies of a project: findings and estimated tokens
13010
+ compare <before> <after> compare two copies: findings, tokens per agent, rule and document preservation
12756
13011
  rules list rule IDs with their documentation links
12757
13012
  mcp run as an MCP server over stdio (for Claude Code, Cursor and other agents)
12758
13013
  help | version
12759
13014
 
12760
13015
  Options:
12761
13016
  --tool <id> all (default), ${TOOLS.map((x) => x.id).join(", ")}
12762
- --format <f> scan output: text (default), json, md
12763
- --out <path> output file (fix, badge, scan) or folder (report); missing folders are created
13017
+ --format <f> scan: text (default), json, md, fix; compare: text (default), json
13018
+ --out <path> output file (scan, fix, badge, compare) or folder (report); missing folders are created
12764
13019
  --lang <l> en (default), ko, ja, zh-Hans
12765
13020
  --fail-on <s> exit 1 when a finding is at least: high, medium, low, none (default)
12766
13021
  --ignore <glob> extra ignore pattern, gitignore syntax (repeatable)
@@ -12786,7 +13041,7 @@ function parse2(argv) {
12786
13041
  else if (a.startsWith("--")) {
12787
13042
  const eq = a.indexOf("=");
12788
13043
  const k = eq > 0 ? a.slice(2, eq) : a.slice(2);
12789
- if (!VALUED.has(k)) return `Unknown option: ${a}`;
13044
+ if (!VALUED.has(k)) return `Unknown option: ${a}${k === "json" ? " (use --format json)" : ""}`;
12790
13045
  const v = eq > 0 ? a.slice(eq + 1) : argv[++i];
12791
13046
  if (v === void 0) return `Missing value for --${k}`;
12792
13047
  if (k === "ignore") ignore.push(v);
@@ -12809,9 +13064,14 @@ function renderText(r, locale) {
12809
13064
  }
12810
13065
  if (!r.findings.length) lines.push(t(locale, "report.noFindings"));
12811
13066
  const b = r.bySeverity;
12812
- lines.push("", t(locale, "cli.summary", { findings: r.findings.length, high: b.high, medium: b.medium, low: b.low, passed: r.passed, evaluated: r.evaluated }));
13067
+ lines.push("", t(locale, "cli.summary", { findings: r.findings.length, high: b.high, medium: b.medium, low: b.low, info: b.info, passed: r.passed, evaluated: r.evaluated }));
12813
13068
  if (c.partial) lines.push(t(locale, "cli.partial", { reasons: c.reasons.map((x) => t(locale, `coverage.${x.code}`, x.params)).join(" ") || t(locale, "cli.partialUnknown") }));
12814
13069
  if (r.listing.skippedSymlinks) lines.push(t(locale, "cli.symlinks", { count: r.listing.skippedSymlinks }));
13070
+ const unverified = r.report.rules.reduce((n, x) => n + x.unverified.length, 0);
13071
+ if (c.excluded || unverified) {
13072
+ const reasons = Object.entries(c.excludedByReason).map(([k, n]) => `${t(locale, `exclusion.${k}`)} ${n}`).join(", ");
13073
+ lines.push(t(locale, "cli.notInspected", { excluded: c.excluded, reasons: reasons || "-", unverified }));
13074
+ }
12815
13075
  if (r.findings.length) lines.push(t(locale, "cli.ruleDetails", { url: RULES_URL(locale, r.findings[0].ruleId).replace(/#.*$/, "") }));
12816
13076
  return lines.join("\n") + "\n";
12817
13077
  }
@@ -12884,6 +13144,11 @@ Run "reporefit help" for usage.
12884
13144
  if (command === "version") return io.out(`${VERSION} (engine ${ENGINE_VERSION}, rules ${RULESET_VERSION})
12885
13145
  `), 0;
12886
13146
  const locale = toLocale(opts.lang ?? "en") ?? "en";
13147
+ const given = [...Object.keys(opts), ...p.flags, ...p.ignore.length ? ["ignore"] : []].filter((k) => k !== "help" && k !== "version");
13148
+ const unused = OPTIONS[command] ? given.find((k) => !OPTIONS[command].includes(k)) : void 0;
13149
+ if (unused) return io.err(`Option --${unused} is not used by ${command}.
13150
+ Run "reporefit help" for usage.
13151
+ `), 2;
12887
13152
  if (command === "mcp") {
12888
13153
  serveStdio();
12889
13154
  return new Promise(() => {
@@ -12896,7 +13161,8 @@ Run "reporefit help" for usage.
12896
13161
  return 0;
12897
13162
  }
12898
13163
  const format = opts.format ?? "text";
12899
- if (!["text", "md", "json", "fix"].includes(format)) return io.err(`Unknown --format: ${format}
13164
+ const formats = FORMATS[command] ?? ["text"];
13165
+ if (!formats.includes(format)) return io.err(`Unknown --format for ${command}: ${format} (use ${formats.join(", ")})
12900
13166
  `), 2;
12901
13167
  const failOn = opts["fail-on"] ?? "none";
12902
13168
  if (!["high", "medium", "low", "none"].includes(failOn)) return io.err(`Unknown --fail-on: ${failOn}
@@ -12931,7 +13197,10 @@ Run "reporefit help" for usage.
12931
13197
  const b = await scan(args[1]);
12932
13198
  if (typeof b === "number") return b;
12933
13199
  const c = compareRuns({ report: a.report, texts: a.instructionTexts }, { report: b.report, texts: b.instructionTexts });
12934
- io.out(renderCompare(c, a.tool, locale));
13200
+ const text3 = format === "json" ? JSON.stringify(compareJson(c, a.tool, locale), null, 2) + "\n" : renderCompare(c, a.tool, locale);
13201
+ if (opts.out) {
13202
+ if (!writeOutput(io, locale, opts.out, text3)) return 2;
13203
+ } else io.out(text3);
12935
13204
  return shouldFail(b, failOn) ? 1 : 0;
12936
13205
  }
12937
13206
  const r = await scan(args[0] ?? ".");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reporefit",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Check AI coding projects (instructions, tokens, secrets, MCP, dependencies, structure, deploy setup) on your own machine. Nothing is uploaded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/reporefit/action/issues"
26
26
  },
27
27
  "reporefit": {
28
- "engine": "0.4.1",
29
- "rules": "2026.12.8",
28
+ "engine": "0.4.3",
29
+ "rules": "2026.12.9",
30
30
  "schema": "0.3.0"
31
31
  },
32
32
  "keywords": [