reporefit 0.4.0 → 0.4.2
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 +1 -1
- package/dist/reporefit.mjs +1249 -338
- package/package.json +6 -1
package/dist/reporefit.mjs
CHANGED
|
@@ -6,13 +6,13 @@ var __export = (target, all2) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
9
|
-
import { writeFileSync } from "node:fs";
|
|
10
|
-
import { join as join4 } from "node:path";
|
|
9
|
+
import { mkdirSync, statSync as statSync3, writeFileSync } from "node:fs";
|
|
10
|
+
import { dirname as dirname2, join as join4, resolve as resolve3 } from "node:path";
|
|
11
11
|
|
|
12
12
|
// ../core/src/types.ts
|
|
13
13
|
var SCHEMA_VERSION = "0.3.0";
|
|
14
|
-
var ENGINE_VERSION = "0.4.
|
|
15
|
-
var RULESET_VERSION = "2026.12.
|
|
14
|
+
var ENGINE_VERSION = "0.4.2";
|
|
15
|
+
var RULESET_VERSION = "2026.12.8";
|
|
16
16
|
|
|
17
17
|
// ../core/src/input/limits.ts
|
|
18
18
|
var MiB = 1024 * 1024;
|
|
@@ -75,9 +75,9 @@ function detectWrapperRoot(paths) {
|
|
|
75
75
|
if (p !== root) return null;
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
78
|
-
const
|
|
79
|
-
if (root === null) root =
|
|
80
|
-
else if (
|
|
78
|
+
const first = p.slice(0, slash);
|
|
79
|
+
if (root === null) root = first;
|
|
80
|
+
else if (first !== root) return null;
|
|
81
81
|
sawNested = true;
|
|
82
82
|
}
|
|
83
83
|
return sawNested ? root : null;
|
|
@@ -3052,10 +3052,10 @@ function resolveAll(constructs2, events, context) {
|
|
|
3052
3052
|
const called = [];
|
|
3053
3053
|
let index2 = -1;
|
|
3054
3054
|
while (++index2 < constructs2.length) {
|
|
3055
|
-
const
|
|
3056
|
-
if (
|
|
3057
|
-
events =
|
|
3058
|
-
called.push(
|
|
3055
|
+
const resolve4 = constructs2[index2].resolveAll;
|
|
3056
|
+
if (resolve4 && !called.includes(resolve4)) {
|
|
3057
|
+
events = resolve4(events, context);
|
|
3058
|
+
called.push(resolve4);
|
|
3059
3059
|
}
|
|
3060
3060
|
}
|
|
3061
3061
|
return events;
|
|
@@ -7928,6 +7928,8 @@ function checkMcp(docs) {
|
|
|
7928
7928
|
const pkg = args.find((a) => !a.startsWith("-"));
|
|
7929
7929
|
if (pkg && !/@\d|@[\^~]?\d|==\d/.test(pkg.replace(/^@[^/]+\//, ""))) push2(f2, "MCP-002", doc, keyLine("args"), "mcp002.unpinned", { server: s.name, package: pkg }, "low", `${s.name}:pin`);
|
|
7930
7930
|
}
|
|
7931
|
+
const broad = args.find((a) => /^(\/|~\/?|\$HOME|\$\{HOME\}|%USERPROFILE%|%HOMEPATH%|[A-Za-z]:[\\/]?|\/home\/?|\/Users\/?|\/root\/?)$/.test(a.trim()));
|
|
7932
|
+
if (broad) push2(f2, "MCP-002", doc, keyLine("args"), "mcp002.broadAccess", { server: s.name, path: broad.trim() }, "medium", `${s.name}:broad`);
|
|
7931
7933
|
if (hasUrl && /^http:\/\//i.test(String(s.url)) && !/^http:\/\/(localhost|127\.0\.0\.1|\[::1\])/i.test(String(s.url))) {
|
|
7932
7934
|
push2(f2, "MCP-002", doc, keyLine("url"), "mcp002.insecureUrl", { server: s.name }, "medium", `${s.name}:http`);
|
|
7933
7935
|
}
|
|
@@ -7989,10 +7991,11 @@ var PROFILES = {
|
|
|
7989
7991
|
},
|
|
7990
7992
|
cursor: {
|
|
7991
7993
|
platform: "cursor",
|
|
7992
|
-
profileVersion: "cursor-agents-window-rules@2026-12-
|
|
7993
|
-
reviewedAt: "2026-12-
|
|
7994
|
-
//
|
|
7995
|
-
|
|
7994
|
+
profileVersion: "cursor-agents-window-rules@2026-12-02",
|
|
7995
|
+
reviewedAt: "2026-12-02",
|
|
7996
|
+
// Cursor's own rules page. On 2026-12-02 it answers 308 Permanent Redirect to
|
|
7997
|
+
// docs.grok.com/build/agents-window/rules ("Rules"), the page the rules below were read from.
|
|
7998
|
+
sourceUrls: ["https://cursor.com/docs/context/rules"],
|
|
7996
7999
|
// "@file" in a rule only points at the file; it does not insert its content.
|
|
7997
8000
|
maxImportDepth: null,
|
|
7998
8001
|
maxCombinedBytes: null,
|
|
@@ -8057,6 +8060,7 @@ function frontMatterFields(text3) {
|
|
|
8057
8060
|
}
|
|
8058
8061
|
return out;
|
|
8059
8062
|
}
|
|
8063
|
+
var SIDE_EFFECT_RE = /\b(deploy\w*|publish\w*|push\w*|merge|delete\w*|drop\w*|migrate\w*|send\w*|commit(?![\s_-]*messages?)\w*)\b|배포|게시|푸시|머지|병합|삭제|마이그레이션|전송|커밋(?!\s*메시지)|デプロイ|公開|プッシュ|マージ|削除|マイグレーション|送信|コミット(?!\s*メッセージ)|部署|发布|推送|合并|删除|迁移|发送|提交(?!信息|说明)/i;
|
|
8060
8064
|
function checkSkills(docs) {
|
|
8061
8065
|
const skills = docs.filter((d) => isSkillPath(d.path)).sort((a, b) => a.path < b.path ? -1 : 1);
|
|
8062
8066
|
const findings = [];
|
|
@@ -8087,6 +8091,9 @@ function checkSkills(docs) {
|
|
|
8087
8091
|
if (!fm.description) add(doc, "agt001.noDescription", {}, "medium");
|
|
8088
8092
|
else if (fm.description.length > 1024) add(doc, "agt001.longDescription", { length: fm.description.length }, "low");
|
|
8089
8093
|
if (blankFrontMatter(doc.text).body.trim() === "") add(doc, "agt001.emptyBody", {}, "low");
|
|
8094
|
+
const manualOnly = /^(true|yes|on|1)$/i.test(fm["disable-model-invocation"] ?? "");
|
|
8095
|
+
const effect = SIDE_EFFECT_RE.exec((fm.name || folder2).replace(/[-_]/g, " "));
|
|
8096
|
+
if (effect && !manualOnly && /(^|\/)\.claude\/skills\//.test(doc.path)) add(doc, "agt001.autoSideEffect", { name: fm.name || folder2, word: effect[0] }, "low");
|
|
8090
8097
|
}
|
|
8091
8098
|
return {
|
|
8092
8099
|
ruleId: "AGT-001",
|
|
@@ -8100,10 +8107,10 @@ function checkSkills(docs) {
|
|
|
8100
8107
|
};
|
|
8101
8108
|
}
|
|
8102
8109
|
var PM = [
|
|
8103
|
-
/\b(?:use|using|run|with|prefer|always use)\s+(npm|pnpm|yarn|bun)\b/
|
|
8104
|
-
/\b(npm|pnpm|yarn|bun)\s*(?:을|를|만)?\s*(?:사용|쓴다|쓰세요|씁니다|써 ?주세요|이용)/
|
|
8105
|
-
/\b(npm|pnpm|yarn|bun)\s*(?:を|だけを)?\s*(?:使用|使う|使って|使います|使いましょう)/
|
|
8106
|
-
/(?:使用|采用|统一用|只用)\s*(npm|pnpm|yarn|bun)\b/
|
|
8110
|
+
/\b(?:use|using|run|with|prefer|always use)\s+(npm|pnpm|yarn|bun)\b/gi,
|
|
8111
|
+
/\b(npm|pnpm|yarn|bun)\s*(?:을|를|만)?\s*(?:사용|쓴다|쓰세요|씁니다|써 ?주세요|이용)/gi,
|
|
8112
|
+
/\b(npm|pnpm|yarn|bun)\s*(?:を|だけを)?\s*(?:使用|使う|使って|使います|使いましょう)/gi,
|
|
8113
|
+
/(?:使用|采用|统一用|只用)\s*(npm|pnpm|yarn|bun)\b/gi
|
|
8107
8114
|
];
|
|
8108
8115
|
var INDENT_SPACES = [
|
|
8109
8116
|
/\b(?:indent(?:ation)?|use)\b[^.\n]{0,30}?\b(\d)\s*-?\s*spaces?\b/i,
|
|
@@ -8117,15 +8124,89 @@ var INDENT_TABS = [
|
|
|
8117
8124
|
/インデント[^。\n]{0,15}タブ|タブでインデント/,
|
|
8118
8125
|
/缩进[^。\n]{0,15}(?:制表符|tab)|(?:制表符|tab)\s*缩进/i
|
|
8119
8126
|
];
|
|
8120
|
-
var
|
|
8121
|
-
var NODE_CONTEXT = /\b(use|using|require[sd]?|need[s]?|run on|target|supported?)\b
|
|
8122
|
-
var
|
|
8127
|
+
var NODE = /\bnode(?:\.js)?\s*(>=|=>|>|<=|=<|<|\^|~)?\s*v?(\d{2})(?!\d)(?:\.(?:\d+|x))*(\+)?/gi;
|
|
8128
|
+
var NODE_CONTEXT = /\b(use|using|require[sd]?|need[s]?|run on|target|supported?)\b|사용|필요|필수|이상|使用|使う|使っ|使い|必要|以上|以降|需要|要求|及以上/i;
|
|
8129
|
+
var NODE_MIN_AFTER = /^\s*(?:or (?:later|newer|above|higher)|and (?:later|newer|above|up)|이상|이후 버전|以上|以降|及以上|或更高|或以上)/i;
|
|
8130
|
+
var NODE_MAX_AFTER = /^\s*(?:or (?:earlier|older|below|lower)|이하|以下|及以下|或更低)/i;
|
|
8131
|
+
var NODE_MIN_BEFORE = /(?:at least|minimum(?: of)?|최소|至少|最低|少なくとも)\s*$/i;
|
|
8132
|
+
var NEG_BEFORE = /(?:\b(?:do not|don't|never|avoid|not|instead of|rather than|no longer)\s+(?:\w+\s+){0,2}|(?:不要|别|禁止|切勿|请勿|不得|不能|不再|避免)\s*)$/i;
|
|
8133
|
+
var NEG_AFTER = /^[^.。;;!?!?]{0,12}?(?:하지\s*(?:마|않|말)|지\s*(?:마|않|말)|하면\s*안|금지|しない|しません|ないで|はいけ|は禁止|禁止)/;
|
|
8134
|
+
var SCOPES = [
|
|
8135
|
+
/\b(?:in|for|on|inside|under|within|during)\s+(?:the\s+)?(production|prod|staging|test|tests|testing|development|dev|local|ci|e2e)\b/i,
|
|
8136
|
+
/\b(?:in|for|inside|under|within)\s+(?:the\s+)?([\w.-]+(?:\/[\w.-]*)*)\s+(?:folder|directory|package|workspace|app|module|subproject)\b/i,
|
|
8137
|
+
/\b(?:in|for|inside|under|within)\s+([\w.-]*\/[\w./-]*)/i,
|
|
8138
|
+
/(운영|프로덕션|스테이징|테스트|개발|로컬|CI)\s*(?:환경)?\s*에서/i,
|
|
8139
|
+
/([\w.-]+(?:\/[\w.-]*)*)\s*(?:폴더|디렉터리|패키지|워크스페이스|앱)\s*에서/,
|
|
8140
|
+
/([\w.-]*\/[\w./-]*)\s*에서/,
|
|
8141
|
+
/(本番|ステージング|テスト|開発|ローカル|CI)\s*(?:環境)?\s*では/i,
|
|
8142
|
+
/([\w.-]+(?:\/[\w.-]*)*)\s*(?:フォルダー?|ディレクトリ|パッケージ|ワークスペース)\s*では/,
|
|
8143
|
+
/在\s*(生产|预发布?|测试|开发|本地|CI)\s*(?:环境)?/i,
|
|
8144
|
+
/在\s*([\w.-]+(?:\/[\w.-]*)*)\s*(?:目录|文件夹|包|工作区)/
|
|
8145
|
+
];
|
|
8146
|
+
var SCOPE_NAME = {
|
|
8147
|
+
prod: "production",
|
|
8148
|
+
"\uC6B4\uC601": "production",
|
|
8149
|
+
"\uD504\uB85C\uB355\uC158": "production",
|
|
8150
|
+
"\u672C\u756A": "production",
|
|
8151
|
+
"\u751F\u4EA7": "production",
|
|
8152
|
+
"\uC2A4\uD14C\uC774\uC9D5": "staging",
|
|
8153
|
+
"\u30B9\u30C6\u30FC\u30B8\u30F3\u30B0": "staging",
|
|
8154
|
+
"\u9884\u53D1": "staging",
|
|
8155
|
+
"\u9884\u53D1\u5E03": "staging",
|
|
8156
|
+
tests: "test",
|
|
8157
|
+
testing: "test",
|
|
8158
|
+
e2e: "test",
|
|
8159
|
+
"\uD14C\uC2A4\uD2B8": "test",
|
|
8160
|
+
"\u30C6\u30B9\u30C8": "test",
|
|
8161
|
+
"\u6D4B\u8BD5": "test",
|
|
8162
|
+
dev: "development",
|
|
8163
|
+
"\uAC1C\uBC1C": "development",
|
|
8164
|
+
"\u958B\u767A": "development",
|
|
8165
|
+
"\u5F00\u53D1": "development",
|
|
8166
|
+
"\uB85C\uCEEC": "local",
|
|
8167
|
+
"\u30ED\u30FC\u30AB\u30EB": "local",
|
|
8168
|
+
"\u672C\u5730": "local"
|
|
8169
|
+
};
|
|
8170
|
+
var CONDITIONAL = /\b(if|when|unless|except|whenever)\b|경우|때는|때만|만약|예외|場合|とき|時は|例外|如果|若是|除非|例外/i;
|
|
8171
|
+
function scopeOf(text3) {
|
|
8172
|
+
for (const re of SCOPES) {
|
|
8173
|
+
const m = re.exec(text3);
|
|
8174
|
+
if (m) {
|
|
8175
|
+
const s = m[1].toLowerCase().replace(/^\.\//, "").replace(/\/+$/, "");
|
|
8176
|
+
return SCOPE_NAME[s] ?? s;
|
|
8177
|
+
}
|
|
8178
|
+
}
|
|
8179
|
+
return "";
|
|
8180
|
+
}
|
|
8181
|
+
function negated(text3, start, end) {
|
|
8182
|
+
const before = text3.slice(0, start);
|
|
8183
|
+
const from = Math.max(before.search(/[^.。;;!?!?]*$/), 0);
|
|
8184
|
+
return NEG_BEFORE.test(before.slice(Math.max(from, start - 30))) || NEG_AFTER.test(text3.slice(end));
|
|
8185
|
+
}
|
|
8186
|
+
var firstOf = (res, text3) => {
|
|
8123
8187
|
for (const re of res) {
|
|
8124
8188
|
const m = re.exec(text3);
|
|
8125
8189
|
if (m) return m.slice(1).find((g) => g !== void 0) ?? "";
|
|
8126
8190
|
}
|
|
8127
8191
|
return null;
|
|
8128
8192
|
};
|
|
8193
|
+
function nodeClaims(text3) {
|
|
8194
|
+
const out = [];
|
|
8195
|
+
for (const m of text3.matchAll(NODE)) {
|
|
8196
|
+
const start = m.index;
|
|
8197
|
+
const end = start + m[0].length;
|
|
8198
|
+
const clauseStart = Math.max(text3.slice(0, start).search(/[^.。;;!?!?]*$/), 0);
|
|
8199
|
+
const clauseEnd = text3.slice(end).search(/[.。;;!?!?]/);
|
|
8200
|
+
const clause = text3.slice(clauseStart, clauseEnd < 0 ? text3.length : end + clauseEnd);
|
|
8201
|
+
if (!NODE_CONTEXT.test(clause) || negated(text3, start, end)) continue;
|
|
8202
|
+
const op = m[1];
|
|
8203
|
+
const after = text3.slice(end);
|
|
8204
|
+
const kind = op === ">=" || op === "=>" || op === ">" || m[3] || NODE_MIN_AFTER.test(after) || NODE_MIN_BEFORE.test(text3.slice(0, start)) ? "min" : op === "<=" || op === "=<" || op === "<" || NODE_MAX_AFTER.test(after) ? "max" : "exact";
|
|
8205
|
+
out.push({ major: Number(m[2]), kind });
|
|
8206
|
+
}
|
|
8207
|
+
return out;
|
|
8208
|
+
}
|
|
8209
|
+
var nodeLabel = (r) => `Node ${r.major}${r.kind === "min" ? "+" : r.kind === "max" ? " or lower" : ""}`;
|
|
8129
8210
|
function claims(doc) {
|
|
8130
8211
|
const out = [];
|
|
8131
8212
|
const lines = doc.text.split(/\r\n|\r|\n/);
|
|
@@ -8135,42 +8216,59 @@ function claims(doc) {
|
|
|
8135
8216
|
if (!node2.position) return;
|
|
8136
8217
|
for (let ln = node2.position.start.line; ln <= node2.position.end.line; ln++) {
|
|
8137
8218
|
const text3 = (lines[ln - 1] ?? "").replace(/`[^`]*`/g, "");
|
|
8138
|
-
const
|
|
8139
|
-
const
|
|
8140
|
-
const
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
const
|
|
8146
|
-
|
|
8219
|
+
const base2 = { at: { path: doc.path, line: ln, column: 1 }, line: lines[ln - 1] ?? "", scope: scopeOf(text3), conditional: CONDITIONAL.test(text3) };
|
|
8220
|
+
const managers = /* @__PURE__ */ new Set();
|
|
8221
|
+
for (const re of PM) {
|
|
8222
|
+
for (const m of text3.matchAll(re)) {
|
|
8223
|
+
if (!negated(text3, m.index, m.index + m[0].length)) managers.add(m[1].toLowerCase());
|
|
8224
|
+
}
|
|
8225
|
+
}
|
|
8226
|
+
for (const pm of managers) out.push({ ...base2, topic: "package-manager", value: pm });
|
|
8227
|
+
const sp = firstOf(INDENT_SPACES, text3);
|
|
8228
|
+
if (sp) out.push({ ...base2, topic: "indentation", value: `${sp} spaces` });
|
|
8229
|
+
else if (firstOf(INDENT_TABS, text3) !== null) out.push({ ...base2, topic: "indentation", value: "tabs" });
|
|
8230
|
+
for (const r of nodeClaims(text3)) out.push({ ...base2, topic: "node-version", value: nodeLabel(r), node: r });
|
|
8147
8231
|
}
|
|
8148
8232
|
});
|
|
8149
8233
|
return out;
|
|
8150
8234
|
}
|
|
8235
|
+
function nodeConflict(reqs) {
|
|
8236
|
+
const exact = new Set(reqs.filter((r) => r.kind === "exact").map((r) => r.major));
|
|
8237
|
+
const mins = new Set(reqs.filter((r) => r.kind === "min").map((r) => r.major));
|
|
8238
|
+
const maxs = new Set(reqs.filter((r) => r.kind === "max").map((r) => r.major));
|
|
8239
|
+
const lo = Math.max(-Infinity, ...mins);
|
|
8240
|
+
const hi = Math.min(Infinity, ...maxs);
|
|
8241
|
+
return exact.size > 1 || mins.size > 1 || maxs.size > 1 || lo > hi || [...exact].some((e) => e < lo || e > hi);
|
|
8242
|
+
}
|
|
8151
8243
|
function checkConflicts(docs) {
|
|
8152
8244
|
const instruction = docs.filter((d) => instructionPlatforms(d.path).length > 0).sort((a, b) => a.path < b.path ? -1 : 1);
|
|
8153
8245
|
const all2 = instruction.flatMap(claims);
|
|
8154
8246
|
const findings = [];
|
|
8155
8247
|
for (const topic of ["package-manager", "indentation", "node-version"]) {
|
|
8156
|
-
const
|
|
8157
|
-
for (const
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8248
|
+
const scopes = [...new Set(all2.filter((x) => x.topic === topic).map((x) => x.scope))].sort();
|
|
8249
|
+
for (const scope of scopes) {
|
|
8250
|
+
const group = all2.filter((x) => x.topic === topic && x.scope === scope);
|
|
8251
|
+
const byValue = /* @__PURE__ */ new Map();
|
|
8252
|
+
for (const c of group) byValue.set(c.value, [...byValue.get(c.value) ?? [], c]);
|
|
8253
|
+
if (byValue.size < 2) continue;
|
|
8254
|
+
if (topic === "node-version" && !nodeConflict(group.map((c) => c.node))) continue;
|
|
8255
|
+
const groups = [...byValue.entries()];
|
|
8256
|
+
const [first, ...rest] = groups.flatMap(([, cs]) => cs);
|
|
8257
|
+
findings.push({
|
|
8258
|
+
id: `AGT-002-${fnv1a(`${topic}:${scope ? `${scope}:` : ""}${groups.map(([v]) => v).sort().join("|")}`)}`,
|
|
8259
|
+
ruleId: "AGT-002",
|
|
8260
|
+
severity: "medium",
|
|
8261
|
+
// A rule with a condition ("if", "경우", "場合", "如果") may be an exception: still shown, with less certainty.
|
|
8262
|
+
confidence: group.some((c) => c.conditional) ? "low" : "medium",
|
|
8263
|
+
messageKey: `agt002.${topic}`,
|
|
8264
|
+
params: { values: groups.map(([v, cs]) => `${v} (${cs.map((c) => `${c.at.path}:${c.at.line}`).join(", ")})`).join(" / ") },
|
|
8265
|
+
location: first.at,
|
|
8266
|
+
evidence: truncate(maskSecrets(first.line.trim())),
|
|
8267
|
+
recommendation: { messageKey: "agt002.fix", params: { topic } },
|
|
8268
|
+
verification: { messageKey: "agt.verify", params: { path: first.at.path, line: first.at.line } },
|
|
8269
|
+
related: rest.map((c) => c.at)
|
|
8270
|
+
});
|
|
8271
|
+
}
|
|
8174
8272
|
}
|
|
8175
8273
|
return {
|
|
8176
8274
|
ruleId: "AGT-002",
|
|
@@ -8192,7 +8290,7 @@ var LOCKFILES = {
|
|
|
8192
8290
|
bun: /(^|\/)bun\.lockb?$/
|
|
8193
8291
|
};
|
|
8194
8292
|
var PM_COMMAND = /^(npm|pnpm|yarn|bun)\s+(install|i|ci|add|run|test|exec|remove|uninstall)\b(.*)$/;
|
|
8195
|
-
var
|
|
8293
|
+
var CONDITIONAL2 = /\b(if|or|either|alternatively|e\.g\.|for example)\b|또는|이나|라면|경우|예:|예를 들|または|場合|例:|例えば|或者|如果|例如/i;
|
|
8196
8294
|
var EXAMPLE_LEAD = /\b(e\.g\.|example|for instance)\b|예:|예시|例:|例えば|示例|例如/i;
|
|
8197
8295
|
var GENERATED = /^(node_modules|dist|build|out|coverage|target|\.next|\.nuxt|\.venv|venv|__pycache__|\.cache|\.turbo|tmp)(\/|$)/;
|
|
8198
8296
|
var NOT_THIS_PROJECT = /(^|\/)(tests?|__tests__|spec|fixtures?|__fixtures__|examples?|samples?|testdata|e2e)\//i;
|
|
@@ -8272,7 +8370,7 @@ function checkDocConsistency(input) {
|
|
|
8272
8370
|
if (NOT_THIS_PROJECT.test(doc.path)) continue;
|
|
8273
8371
|
for (const l of commandsAndSpans(doc)) {
|
|
8274
8372
|
const managers = new Set(l.context.match(/\b(npm|pnpm|yarn|bun)\b/g) ?? []);
|
|
8275
|
-
if (
|
|
8373
|
+
if (CONDITIONAL2.test(l.context) || managers.size > 1) continue;
|
|
8276
8374
|
const cmd = PM_COMMAND.exec(l.text);
|
|
8277
8375
|
const base2 = nearestManifest(dirOf(doc.path), manifests);
|
|
8278
8376
|
if (cmd) {
|
|
@@ -8333,9 +8431,53 @@ var MAX_FINDINGS = 50;
|
|
|
8333
8431
|
function isCodePath(path) {
|
|
8334
8432
|
return CODE_EXT.has(extensionOf(path)) && !/\.min\.(js|css)$/.test(path) && !/(^|\/)(vendor|dist|build)\//.test(path);
|
|
8335
8433
|
}
|
|
8336
|
-
|
|
8434
|
+
var LANG = {
|
|
8435
|
+
cs: "cs",
|
|
8436
|
+
java: "jvm",
|
|
8437
|
+
kt: "jvm",
|
|
8438
|
+
js: "js",
|
|
8439
|
+
mjs: "js",
|
|
8440
|
+
cjs: "js",
|
|
8441
|
+
jsx: "js",
|
|
8442
|
+
ts: "js",
|
|
8443
|
+
mts: "js",
|
|
8444
|
+
cts: "js",
|
|
8445
|
+
tsx: "js",
|
|
8446
|
+
vue: "js",
|
|
8447
|
+
svelte: "js",
|
|
8448
|
+
py: "py",
|
|
8449
|
+
go: "go",
|
|
8450
|
+
rs: "rs",
|
|
8451
|
+
php: "php",
|
|
8452
|
+
rb: "rb",
|
|
8453
|
+
swift: "swift"
|
|
8454
|
+
};
|
|
8455
|
+
var IMPORT_LINE = {
|
|
8456
|
+
cs: /^(?:global\s+)?using\s+(?:static\s+)?[\w.]+(?:\s*=\s*[\w.<>, ]+)?\s*;$|^namespace\s+[\w.]+\s*;?$|^extern\s+alias\s+\w+\s*;$/,
|
|
8457
|
+
jvm: /^(?:import|package)\s+(?:static\s+)?[\w.*`]+(?:\s+as\s+\w+)?\s*;?$/,
|
|
8458
|
+
js: /^import\s+(?:type\s+)?(?:[\w*{}\s,$]+\s+from\s+)?['"][^'"]+['"]\s*(?:(?:with|assert)\s*\{[^}]*\})?\s*;?$|^export\s+(?:type\s+)?(?:\*(?:\s+as\s+\w+)?|\{[^}]*\})\s+from\s+['"][^'"]+['"]\s*;?$|^(?:const|let|var)\s+[\w${}\s,:]+=\s*require\(\s*['"][^'"]+['"]\s*\)\s*;?$/,
|
|
8459
|
+
py: /^(?:from\s+[\w.]+\s+)?import\s+[\w.*, ]+(?:\s+as\s+\w+)?$|^from\s+[\w.]+\s+import\s+\($/,
|
|
8460
|
+
go: /^package\s+\w+$|^import\s+(?:[\w.]+\s+)?"[^"]+"$/,
|
|
8461
|
+
rs: /^(?:pub(?:\([^)]*\))?\s+)?use\s+[^;]+;$|^(?:pub(?:\([^)]*\))?\s+)?mod\s+\w+\s*;$|^extern\s+crate\s+\w+(?:\s+as\s+\w+)?\s*;$/,
|
|
8462
|
+
php: /^(?:namespace|use)\s+[\w\\]+(?:\s+as\s+\w+)?\s*;$|^(?:require|include)(?:_once)?\b.*;$/,
|
|
8463
|
+
rb: /^require(?:_relative)?\s*\(?\s*['"][^'"]+['"]\s*\)?$/,
|
|
8464
|
+
swift: /^(?:@testable\s+)?import\s+(?:\w+\s+)?[\w.]+$/
|
|
8465
|
+
};
|
|
8466
|
+
var IMPORT_BLOCK = {
|
|
8467
|
+
js: [/^(?:import|export)\s+(?:type\s+)?\{[^}]*$/, /\}/],
|
|
8468
|
+
py: [/^from\s+[\w.]+\s+import\s+\($/, /\)\s*$/],
|
|
8469
|
+
go: [/^import\s+\($/, /^\)$/],
|
|
8470
|
+
rs: [/^(?:pub(?:\([^)]*\))?\s+)?use\s+[^;]*\{[^}]*$/, /\}\s*;\s*$/]
|
|
8471
|
+
};
|
|
8472
|
+
var ENUM_DECL = /^(?:(?:public|private|protected|internal|export|declare|const|pub(?:\([^)]*\))?|sealed|abstract|static|final|open|indirect|fileprivate)\s+)*enum\s+(?:class\s+)?[A-Za-z_]\w*/;
|
|
8473
|
+
var PY_ENUM = /^class\s+\w+\s*\([^)]*\b(?:Enum|IntEnum|StrEnum|Flag|IntFlag)\b[^)]*\)\s*:/;
|
|
8474
|
+
function meaningful(text3, path) {
|
|
8475
|
+
const lang = LANG[extensionOf(path)];
|
|
8337
8476
|
const out = [];
|
|
8338
8477
|
let inBlock = false;
|
|
8478
|
+
let importEnd = null;
|
|
8479
|
+
let enumDepth = -1;
|
|
8480
|
+
let pyEnumIndent = -1;
|
|
8339
8481
|
text3.split(/\r\n|\r|\n/).forEach((raw, i) => {
|
|
8340
8482
|
let t2 = raw.trim();
|
|
8341
8483
|
if (inBlock) {
|
|
@@ -8346,7 +8488,38 @@ function meaningful(text3) {
|
|
|
8346
8488
|
if (!t2.includes("*/")) inBlock = true;
|
|
8347
8489
|
return;
|
|
8348
8490
|
}
|
|
8491
|
+
if (pyEnumIndent >= 0) {
|
|
8492
|
+
if (!t2 || raw.search(/\S/) > pyEnumIndent) return;
|
|
8493
|
+
pyEnumIndent = -1;
|
|
8494
|
+
}
|
|
8495
|
+
if (importEnd) {
|
|
8496
|
+
if (importEnd.test(t2)) importEnd = null;
|
|
8497
|
+
return;
|
|
8498
|
+
}
|
|
8499
|
+
if (enumDepth >= 0) {
|
|
8500
|
+
const opened = enumDepth > 0 || t2.includes("{");
|
|
8501
|
+
enumDepth += (t2.match(/\{/g) ?? []).length - (t2.match(/\}/g) ?? []).length;
|
|
8502
|
+
if (opened && enumDepth <= 0) enumDepth = -1;
|
|
8503
|
+
return;
|
|
8504
|
+
}
|
|
8349
8505
|
if (!t2 || t2.startsWith("//") || t2.startsWith("#") || t2.startsWith("*")) return;
|
|
8506
|
+
if (lang) {
|
|
8507
|
+
if (IMPORT_LINE[lang].test(t2)) return;
|
|
8508
|
+
const block = IMPORT_BLOCK[lang];
|
|
8509
|
+
if (block && block[0].test(t2)) {
|
|
8510
|
+
importEnd = block[1];
|
|
8511
|
+
return;
|
|
8512
|
+
}
|
|
8513
|
+
if (lang === "py" && PY_ENUM.test(t2)) {
|
|
8514
|
+
pyEnumIndent = raw.search(/\S/);
|
|
8515
|
+
return;
|
|
8516
|
+
}
|
|
8517
|
+
if (lang !== "py" && lang !== "rb" && lang !== "go" && ENUM_DECL.test(t2)) {
|
|
8518
|
+
const depth = (t2.match(/\{/g) ?? []).length - (t2.match(/\}/g) ?? []).length;
|
|
8519
|
+
enumDepth = t2.includes("{") && depth <= 0 ? -1 : depth;
|
|
8520
|
+
return;
|
|
8521
|
+
}
|
|
8522
|
+
}
|
|
8350
8523
|
t2 = t2.replace(/\s+/g, " ");
|
|
8351
8524
|
if (t2.replace(/[\s{}()[\];,]/g, "").length <= 2) return;
|
|
8352
8525
|
out.push({ norm: t2, line: i + 1 });
|
|
@@ -8354,7 +8527,7 @@ function meaningful(text3) {
|
|
|
8354
8527
|
return out;
|
|
8355
8528
|
}
|
|
8356
8529
|
function checkDuplicateCode(docs) {
|
|
8357
|
-
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) }));
|
|
8530
|
+
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) }));
|
|
8358
8531
|
const codeLines = files.reduce((n, f) => n + f.lines.length, 0);
|
|
8359
8532
|
const keyAt = (f, i) => i + DUP_WINDOW <= f.lines.length ? f.lines.slice(i, i + DUP_WINDOW).map((l) => l.norm).join("\n") : null;
|
|
8360
8533
|
const windows = /* @__PURE__ */ new Map();
|
|
@@ -8368,7 +8541,7 @@ function checkDuplicateCode(docs) {
|
|
|
8368
8541
|
});
|
|
8369
8542
|
const covered = /* @__PURE__ */ new Set();
|
|
8370
8543
|
const dupLines = /* @__PURE__ */ new Set();
|
|
8371
|
-
const
|
|
8544
|
+
const groups = [];
|
|
8372
8545
|
const starts = [...windows.entries()].filter(([, occ]) => occ.length > 1).sort(([, a], [, b]) => a[0].f - b[0].f || a[0].i - b[0].i);
|
|
8373
8546
|
for (const [, occ] of starts) {
|
|
8374
8547
|
if (covered.has(`${occ[0].f}:${occ[0].i}`)) continue;
|
|
@@ -8380,27 +8553,53 @@ function checkDuplicateCode(docs) {
|
|
|
8380
8553
|
len++;
|
|
8381
8554
|
}
|
|
8382
8555
|
for (const o of occ) for (let k = 0; k <= len - DUP_WINDOW; k++) covered.add(`${o.f}:${o.i + k}`);
|
|
8383
|
-
const
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8556
|
+
for (const o of occ) for (let k = 0; k < len; k++) dupLines.add(`${o.f}:${o.i + k}`);
|
|
8557
|
+
groups.push(occ.map((o) => ({ f: o.f, from: o.i, to: o.i + len - 1 })));
|
|
8558
|
+
}
|
|
8559
|
+
const overlaps = (a, b) => a.f === b.f && a.from <= b.to && b.from <= a.to;
|
|
8560
|
+
const clusters = [];
|
|
8561
|
+
for (const g of groups) {
|
|
8562
|
+
const hits = clusters.filter((c) => c.blocks.some((b) => g.some((x) => overlaps(b, x))));
|
|
8563
|
+
const target = hits[0] ?? { blocks: [], merged: false };
|
|
8564
|
+
if (!hits.length) clusters.push(target);
|
|
8565
|
+
for (const other of hits.slice(1)) {
|
|
8566
|
+
target.blocks.push(...other.blocks);
|
|
8567
|
+
clusters.splice(clusters.indexOf(other), 1);
|
|
8568
|
+
}
|
|
8569
|
+
if (hits.length) target.merged = true;
|
|
8570
|
+
target.blocks.push(...g);
|
|
8571
|
+
const merged = [];
|
|
8572
|
+
for (const b of [...target.blocks].sort((x, y) => x.f - y.f || x.from - y.from)) {
|
|
8573
|
+
const last = merged[merged.length - 1];
|
|
8574
|
+
if (last && last.f === b.f && b.from <= last.to) last.to = Math.max(last.to, b.to);
|
|
8575
|
+
else merged.push({ ...b });
|
|
8576
|
+
}
|
|
8577
|
+
target.blocks = merged;
|
|
8578
|
+
}
|
|
8579
|
+
const findings = [];
|
|
8580
|
+
for (const c of clusters) {
|
|
8581
|
+
if (findings.length >= MAX_FINDINGS) break;
|
|
8582
|
+
const locs = c.blocks.map((b) => {
|
|
8583
|
+
const f = files[b.f];
|
|
8584
|
+
return { path: f.path, line: f.lines[b.from].line, column: 1, end: f.lines[b.to].line };
|
|
8585
|
+
});
|
|
8586
|
+
const first = c.blocks[0];
|
|
8587
|
+
const len = first.to - first.from + 1;
|
|
8588
|
+
const head = locs[0];
|
|
8589
|
+
const uneven = c.merged && c.blocks.some((b) => b.to - b.from !== first.to - first.from);
|
|
8590
|
+
findings.push({
|
|
8591
|
+
id: `DUP-001-${fnv1a(locs.map((l) => `${l.path}:${l.line}`).join("|") + `:${len}`)}`,
|
|
8592
|
+
ruleId: "DUP-001",
|
|
8593
|
+
severity: "low",
|
|
8594
|
+
confidence: "high",
|
|
8595
|
+
messageKey: uneven ? "dup001.blockOverlap" : "dup001.block",
|
|
8596
|
+
params: { lines: len, copies: locs.length, range: `${head.line}-${head.end}` },
|
|
8597
|
+
location: { path: head.path, line: head.line, column: 1 },
|
|
8598
|
+
evidence: truncate(maskSecrets(files[first.f].lines[first.from].norm)),
|
|
8599
|
+
recommendation: { messageKey: "dup001.fix", params: { copies: locs.length } },
|
|
8600
|
+
verification: { messageKey: "dup.verify", params: { path: head.path, line: head.line } },
|
|
8601
|
+
related: locs.slice(1).map(({ path, line, column }) => ({ path, line, column }))
|
|
8387
8602
|
});
|
|
8388
|
-
const first2 = locs[0];
|
|
8389
|
-
if (findings.length < MAX_FINDINGS) {
|
|
8390
|
-
findings.push({
|
|
8391
|
-
id: `DUP-001-${fnv1a(locs.map((l) => `${l.path}:${l.line}`).join("|") + `:${len}`)}`,
|
|
8392
|
-
ruleId: "DUP-001",
|
|
8393
|
-
severity: "low",
|
|
8394
|
-
confidence: "high",
|
|
8395
|
-
messageKey: "dup001.block",
|
|
8396
|
-
params: { lines: len, copies: locs.length, range: `${first2.line}-${first2.end}` },
|
|
8397
|
-
location: { path: first2.path, line: first2.line, column: 1 },
|
|
8398
|
-
evidence: truncate(maskSecrets(files[occ[0].f].lines[occ[0].i].norm)),
|
|
8399
|
-
recommendation: { messageKey: "dup001.fix", params: { copies: locs.length } },
|
|
8400
|
-
verification: { messageKey: "dup.verify", params: { path: first2.path, line: first2.line } },
|
|
8401
|
-
related: locs.slice(1).map(({ path, line, column }) => ({ path, line, column }))
|
|
8402
|
-
});
|
|
8403
|
-
}
|
|
8404
8603
|
}
|
|
8405
8604
|
return {
|
|
8406
8605
|
metrics: { codeLines, duplicatedLines: dupLines.size },
|
|
@@ -8411,7 +8610,7 @@ function checkDuplicateCode(docs) {
|
|
|
8411
8610
|
inspected: files.length,
|
|
8412
8611
|
findings,
|
|
8413
8612
|
unverified: [],
|
|
8414
|
-
reason: files.length ?
|
|
8613
|
+
reason: files.length ? clusters.length > MAX_FINDINGS ? "dup.reason.capped" : null : "dup.reason.noCode",
|
|
8415
8614
|
scopeKey: "dup001.scope"
|
|
8416
8615
|
}
|
|
8417
8616
|
};
|
|
@@ -8618,7 +8817,7 @@ function checkArchitecture(docs, index2) {
|
|
|
8618
8817
|
cycleTotal++;
|
|
8619
8818
|
if (cycles.length >= MAX_FINDINGS2) continue;
|
|
8620
8819
|
const loop = shortestLoop(comp[0], new Set(comp), graph);
|
|
8621
|
-
const
|
|
8820
|
+
const first = loop[0];
|
|
8622
8821
|
const chain = [comp[0], ...loop.map((e) => e.to)].join(" \u2192 ");
|
|
8623
8822
|
cycles.push({
|
|
8624
8823
|
id: `ARC-001-${fnv1a(comp.join("|"))}`,
|
|
@@ -8627,15 +8826,15 @@ function checkArchitecture(docs, index2) {
|
|
|
8627
8826
|
confidence: "high",
|
|
8628
8827
|
messageKey: "arc001.cycle",
|
|
8629
8828
|
params: { count: comp.length, cycle: chain },
|
|
8630
|
-
location: { path: comp[0], line:
|
|
8631
|
-
evidence: truncate(maskSecrets(
|
|
8829
|
+
location: { path: comp[0], line: first.ref.line, column: first.ref.column },
|
|
8830
|
+
evidence: truncate(maskSecrets(first.ref.text.trim())),
|
|
8632
8831
|
recommendation: { messageKey: "arc001.fix", params: { count: comp.length } },
|
|
8633
|
-
verification: { messageKey: "arc.verify", params: { path: comp[0], line:
|
|
8832
|
+
verification: { messageKey: "arc.verify", params: { path: comp[0], line: first.ref.line } },
|
|
8634
8833
|
related: loop.slice(1).map((e, i) => ({ path: loop[i].to, line: e.ref.line, column: e.ref.column }))
|
|
8635
8834
|
});
|
|
8636
8835
|
}
|
|
8637
8836
|
const none = mods.length === 0;
|
|
8638
|
-
const result = (ruleId, findings, total,
|
|
8837
|
+
const result = (ruleId, findings, total, scopeKey, extra) => ({
|
|
8639
8838
|
ruleId,
|
|
8640
8839
|
status: none ? "skipped" : findings.length ? "fail" : ruleId === "ARC-002" && unverified.length ? "partial" : "pass",
|
|
8641
8840
|
eligible: mods.length,
|
|
@@ -8643,7 +8842,7 @@ function checkArchitecture(docs, index2) {
|
|
|
8643
8842
|
findings,
|
|
8644
8843
|
unverified: ruleId === "ARC-002" ? unverified : [],
|
|
8645
8844
|
reason: none ? "arc.reason.noCode" : total > MAX_FINDINGS2 ? "arc.reason.capped" : extra ?? null,
|
|
8646
|
-
scopeKey
|
|
8845
|
+
scopeKey
|
|
8647
8846
|
});
|
|
8648
8847
|
return {
|
|
8649
8848
|
metrics: { modules: mods.length, imports, inCycles },
|
|
@@ -8762,7 +8961,7 @@ function checkDeploy(docs, index2) {
|
|
|
8762
8961
|
if (index2.listComplete || index2.files.has(`${dirOf2(d.path)}.dockerignore`))
|
|
8763
8962
|
check("OPS-003", index2.files.has(`${dirOf2(d.path)}.dockerignore`) || index2.files.has(".dockerignore"), "ops003.noIgnore", { path: d.path, line: 1, column: 1 }, { path: d.path }, "", "low");
|
|
8764
8963
|
}
|
|
8765
|
-
const result = (ruleId,
|
|
8964
|
+
const result = (ruleId, scopeKey, noneReason) => {
|
|
8766
8965
|
const n = applied[ruleId];
|
|
8767
8966
|
const findings = found[ruleId];
|
|
8768
8967
|
return {
|
|
@@ -8773,7 +8972,7 @@ function checkDeploy(docs, index2) {
|
|
|
8773
8972
|
findings,
|
|
8774
8973
|
unverified: [],
|
|
8775
8974
|
reason: n === 0 ? noneReason : index2.listComplete ? null : "ops.reason.listIncomplete",
|
|
8776
|
-
scopeKey
|
|
8975
|
+
scopeKey
|
|
8777
8976
|
};
|
|
8778
8977
|
};
|
|
8779
8978
|
return {
|
|
@@ -8983,13 +9182,19 @@ function checkHeadings(docs, eligible, extraPartial) {
|
|
|
8983
9182
|
// ../core/src/rules/md002.ts
|
|
8984
9183
|
var MD002 = "MD-002";
|
|
8985
9184
|
var MD002_MIN_CHARS = 40;
|
|
8986
|
-
var PROTECTED_RE = /\b(approv\w*|deploy\w*|release|delet\w*|remov\w*|test\w*|confirm\w
|
|
9185
|
+
var PROTECTED_RE = /\b(approv\w*|deploy\w*|release|delet\w*|remov\w*|test\w*|confirm\w*|secur\w*|privacy|secrets?|credentials?|passwords?|api[ -]?keys?|never|must not|do not|don't|shall not|forbidden|prohibited)\b|승인|배포|삭제|테스트|확인|보안|개인정보|비밀|자격 ?증명|금지|절대|지 않|지 마|承認|デプロイ|削除|テスト|確認|セキュリティ|個人情報|秘密|認証情報|パスワード|禁止|しない|しません|ないでください|批准|审批|部署|删除|测试|确认|安全|隐私|密钥|凭据|密码|不得|不要|切勿|不能|不可/i;
|
|
8987
9186
|
function isProtectedInstruction(text3) {
|
|
8988
9187
|
return PROTECTED_RE.test(text3);
|
|
8989
9188
|
}
|
|
8990
|
-
|
|
9189
|
+
var NOT_PROJECT_DOCS = /(^|\/)(fixtures?|__fixtures__|testdata|test-data|examples?|samples?|vendor|third[_-]party)\//i;
|
|
9190
|
+
var dirOf3 = (p) => p.includes("/") ? p.slice(0, p.lastIndexOf("/")) : "";
|
|
9191
|
+
var nameOf = (p) => p.slice(p.lastIndexOf("/") + 1);
|
|
9192
|
+
var nested = (a, b) => nameOf(a) === nameOf(b) && dirOf3(a) !== dirOf3(b) && (dirOf3(a) === "" || `${dirOf3(b)}/`.startsWith(`${dirOf3(a)}/`));
|
|
9193
|
+
function checkDuplicates(docs, eligible, extraPartial, minChars = MD002_MIN_CHARS, context) {
|
|
9194
|
+
const inContext = (path) => !context || context.has(path);
|
|
8991
9195
|
const groups = /* @__PURE__ */ new Map();
|
|
8992
9196
|
for (const doc of [...docs].sort(byPath)) {
|
|
9197
|
+
if (!inContext(doc.path) && NOT_PROJECT_DOCS.test(doc.path)) continue;
|
|
8993
9198
|
walk(parseTree(doc.text), (node2) => {
|
|
8994
9199
|
if (node2.type !== "paragraph" || !node2.position) return;
|
|
8995
9200
|
const start = node2.position.start.offset;
|
|
@@ -9004,24 +9209,28 @@ function checkDuplicates(docs, eligible, extraPartial, minChars = MD002_MIN_CHAR
|
|
|
9004
9209
|
});
|
|
9005
9210
|
}
|
|
9006
9211
|
const findings = [];
|
|
9007
|
-
for (const [key,
|
|
9008
|
-
if (
|
|
9009
|
-
const [
|
|
9010
|
-
const
|
|
9011
|
-
const
|
|
9212
|
+
for (const [key, all2] of groups) {
|
|
9213
|
+
if (all2.length < 2) continue;
|
|
9214
|
+
const list2 = [...all2.filter((l) => inContext(l.location.path)), ...all2.filter((l) => !inContext(l.location.path))];
|
|
9215
|
+
const [first, ...rest] = list2;
|
|
9216
|
+
const instruction = list2.filter((l) => inContext(l.location.path)).map((l) => l.location.path);
|
|
9217
|
+
if (instruction.length === 0) continue;
|
|
9218
|
+
const crossFile = rest.some((r) => r.location.path !== first.location.path);
|
|
9219
|
+
const messageKey = instruction.length >= 2 ? crossFile ? "md002.duplicateAcrossFiles" : "md002.duplicateInFile" : "md002.duplicateWithDocs";
|
|
9220
|
+
const fix = isProtectedInstruction(key) ? "md002.fix.protected" : instruction.length < 2 ? "md002.fix.docs" : instruction.some((a) => instruction.some((b) => nested(a, b))) ? "md002.fix.nested" : "md002.fix.review";
|
|
9012
9221
|
findings.push({
|
|
9013
9222
|
id: `${MD002}-${fnv1a(list2.map((l) => `${l.location.path}:${l.location.line}`).join("|") + key.length)}`,
|
|
9014
9223
|
ruleId: MD002,
|
|
9015
9224
|
severity: "info",
|
|
9016
9225
|
confidence: "high",
|
|
9017
|
-
messageKey
|
|
9226
|
+
messageKey,
|
|
9018
9227
|
params: {
|
|
9019
9228
|
count: list2.length,
|
|
9020
9229
|
others: rest.map((r) => `${r.location.path}:${r.location.line}`).join(", ")
|
|
9021
9230
|
},
|
|
9022
|
-
location:
|
|
9231
|
+
location: first.location,
|
|
9023
9232
|
evidence: truncate(maskSecrets(key)),
|
|
9024
|
-
recommendation: { messageKey:
|
|
9233
|
+
recommendation: { messageKey: fix, params: {} },
|
|
9025
9234
|
verification: { messageKey: "md002.verify", params: {} },
|
|
9026
9235
|
related: rest.map((r) => r.location)
|
|
9027
9236
|
});
|
|
@@ -9038,7 +9247,7 @@ function checkDuplicates(docs, eligible, extraPartial, minChars = MD002_MIN_CHAR
|
|
|
9038
9247
|
findings,
|
|
9039
9248
|
unverified: [],
|
|
9040
9249
|
reason: eligible === 0 ? "md003.reason.noMarkdown" : incomplete ? "md003.reason.partial" : null,
|
|
9041
|
-
scopeKey: "md002.scope.m2"
|
|
9250
|
+
scopeKey: context ? "md002.scope.all" : "md002.scope.m2"
|
|
9042
9251
|
};
|
|
9043
9252
|
}
|
|
9044
9253
|
|
|
@@ -9209,12 +9418,12 @@ function activeContext(platform, workdir, docs) {
|
|
|
9209
9418
|
const note = (key) => {
|
|
9210
9419
|
if (!notes.includes(key)) notes.push(key);
|
|
9211
9420
|
};
|
|
9212
|
-
const under = (dir, rel, ext,
|
|
9421
|
+
const under = (dir, rel, ext, nested2 = false) => {
|
|
9213
9422
|
const prefix = join2(dir, rel);
|
|
9214
9423
|
return docs.filter((d) => {
|
|
9215
9424
|
if (!d.path.startsWith(prefix) || !d.platforms.includes(platform)) return false;
|
|
9216
9425
|
const rest = d.path.slice(prefix.length);
|
|
9217
|
-
return ext.test(rest) && (
|
|
9426
|
+
return ext.test(rest) && (nested2 || !rest.includes("/"));
|
|
9218
9427
|
});
|
|
9219
9428
|
};
|
|
9220
9429
|
const hier = (path) => {
|
|
@@ -9565,19 +9774,19 @@ function duplicatePreviews(docs, findings, instructionPaths) {
|
|
|
9565
9774
|
for (const finding of findings) {
|
|
9566
9775
|
if (finding.recommendation.messageKey !== "md002.fix.review") continue;
|
|
9567
9776
|
const locations = [finding.location, ...finding.related ?? []].filter((loc2) => byPath2.has(loc2.path));
|
|
9568
|
-
const
|
|
9569
|
-
if (!
|
|
9570
|
-
const keepLines = linesAt(
|
|
9571
|
-
const sentence = keepLines[
|
|
9777
|
+
const first = locations[0];
|
|
9778
|
+
if (!first || first.column !== 1) continue;
|
|
9779
|
+
const keepLines = linesAt(first.path);
|
|
9780
|
+
const sentence = keepLines[first.line - 1];
|
|
9572
9781
|
if (!sentence || !new RegExp("^\\p{L}", "u").test(sentence) || /[@`[\]<>*_\\]/u.test(sentence)) continue;
|
|
9573
|
-
if (keepLines[
|
|
9782
|
+
if (keepLines[first.line - 2]?.trim() || keepLines[first.line]?.trim()) continue;
|
|
9574
9783
|
for (const omit of locations.slice(1)) {
|
|
9575
9784
|
const lines = linesAt(omit.path);
|
|
9576
9785
|
const at = omit.line - 1;
|
|
9577
9786
|
if (omit.column !== 1 || lines[at] !== sentence || lines[at - 1]?.trim() || lines[at + 1]?.trim()) continue;
|
|
9578
9787
|
const edited = [...lines.slice(0, at), ...lines.slice(at + 1)].join("\n");
|
|
9579
9788
|
if (!edited.trim()) continue;
|
|
9580
|
-
previews.push({ findingId: finding.id, keep:
|
|
9789
|
+
previews.push({ findingId: finding.id, keep: first, omit, editedDocTokens: estimateTokens(edited) });
|
|
9581
9790
|
if (previews.length === 8) return previews;
|
|
9582
9791
|
}
|
|
9583
9792
|
}
|
|
@@ -9597,6 +9806,7 @@ function measurableContext(report, platform, folder2) {
|
|
|
9597
9806
|
}
|
|
9598
9807
|
|
|
9599
9808
|
// ../core/src/scan.ts
|
|
9809
|
+
var OTHER_DOCS_BUDGET = 8 * 1024 * 1024;
|
|
9600
9810
|
var ScanCancelledError = class extends Error {
|
|
9601
9811
|
constructor() {
|
|
9602
9812
|
super("cancelled");
|
|
@@ -9686,9 +9896,12 @@ async function scanOnce(adapter, ctx) {
|
|
|
9686
9896
|
instruction: contextPaths,
|
|
9687
9897
|
ignored: gitignoreMatcher(docs.find((d) => d.path === ".gitignore")?.text ?? null)
|
|
9688
9898
|
});
|
|
9689
|
-
ctx.onInstructionTexts
|
|
9690
|
-
|
|
9691
|
-
|
|
9899
|
+
if (ctx.onInstructionTexts) {
|
|
9900
|
+
let budget = OTHER_DOCS_BUDGET;
|
|
9901
|
+
const others = mdDocs.filter((d) => !contextPaths.has(d.path) && (budget -= d.text.length) >= 0);
|
|
9902
|
+
ctx.onInstructionTexts([...agentDocs.filter((d) => contextPaths.has(d.path)), ...others].map((d) => ({ path: d.path, text: d.text })));
|
|
9903
|
+
}
|
|
9904
|
+
const md002 = checkDuplicates(mdDocs, eligibleMd, mdPartial, MD002_MIN_CHARS, contextPaths);
|
|
9692
9905
|
const deps = extractDependencies(docs);
|
|
9693
9906
|
const dup = checkDuplicateCode(docs);
|
|
9694
9907
|
const arc = checkArchitecture(docs, { files: listed, listComplete: adapter.listComplete });
|
|
@@ -9753,8 +9966,12 @@ var en2 = {
|
|
|
9753
9966
|
"md002.duplicateAcrossFiles": "The same paragraph appears {count} times. Other copies: {others}.",
|
|
9754
9967
|
"md002.duplicateInFile": "The same paragraph appears {count} times in this file. Other copies: {others}.",
|
|
9755
9968
|
"md002.fix.review": "Review every copy. If the files serve different agents, both may need the text; otherwise keep one copy and reference it.",
|
|
9756
|
-
"md002.fix.protected": "This text contains approval, deployment, deletion or
|
|
9969
|
+
"md002.fix.protected": "This text contains approval, deployment, deletion, test, security or privacy instructions, or a prohibition. Do not remove a copy unless every agent that reads it still gets the instruction.",
|
|
9757
9970
|
"md002.verify": "Run the same check again and compare the remaining copies.",
|
|
9971
|
+
"md002.scope.all": "Finds paragraphs (and list-item paragraphs) of 40+ characters that are identical after collapsing whitespace, in instruction files and the files they import, and copies of them in other Markdown documents (README, docs). Case, numbers, negations and paths stay significant. Code blocks, test fixtures and examples are not compared.",
|
|
9972
|
+
"md002.duplicateWithDocs": "This instruction paragraph also appears in documents AI tools do not load by default: {others}.",
|
|
9973
|
+
"md002.fix.docs": "Documents read on their own (README, design notes, ADRs, guides) may repeat a rule on purpose. Keep every copy identical when one changes, or keep one source and link to it. Never delete the rule from the instruction file because a document repeats it.",
|
|
9974
|
+
"md002.fix.nested": "The upper file covers its folder and every folder below it; the lower file covers only its own folder, and some tools read only the nearest file. Check each tool's context before removing either copy.",
|
|
9758
9975
|
"ai001.scope.m2": "Finds the instruction and rule files of Codex (AGENTS.md, AGENTS.override.md), Claude Code (CLAUDE.md, CLAUDE.local.md, .claude/rules, AGENTS.md as fallback), Gemini CLI (GEMINI.md), GitHub Copilot (.github/copilot-instructions.md, .github/instructions), Cursor desktop app (.cursor/rules/*.mdc), Grok Build terminal (.grok/rules) and Antigravity (.agents/rules) in the project.",
|
|
9759
9976
|
"ai001.empty": "{path} is empty. Codex and other tools skip empty instruction files.",
|
|
9760
9977
|
"ai001.fix.empty": "Add the intended instructions to {path} or delete the file.",
|
|
@@ -9860,8 +10077,12 @@ var ko2 = {
|
|
|
9860
10077
|
"md002.duplicateAcrossFiles": "\uAC19\uC740 \uBB38\uB2E8\uC774 {count}\uBC88 \uB098\uC635\uB2C8\uB2E4. \uB2E4\uB978 \uC704\uCE58: {others}.",
|
|
9861
10078
|
"md002.duplicateInFile": "\uC774 \uD30C\uC77C \uC548\uC5D0\uC11C \uAC19\uC740 \uBB38\uB2E8\uC774 {count}\uBC88 \uB098\uC635\uB2C8\uB2E4. \uB2E4\uB978 \uC704\uCE58: {others}.",
|
|
9862
10079
|
"md002.fix.review": "\uBAA8\uB4E0 \uC704\uCE58\uB97C \uAC80\uD1A0\uD558\uC138\uC694. \uC11C\uB85C \uB2E4\uB978 \uC5D0\uC774\uC804\uD2B8\uAC00 \uC77D\uB294 \uD30C\uC77C\uC774\uBA74 \uC591\uCABD \uBAA8\uB450 \uD544\uC694\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC544\uB2C8\uB77C\uBA74 \uD55C \uACF3\uB9CC \uB0A8\uAE30\uACE0 \uCC38\uC870\uD558\uC138\uC694.",
|
|
9863
|
-
"md002.fix.protected": "\uC2B9\uC778\xB7\uBC30\uD3EC\xB7\uC0AD\uC81C\xB7\uD14C\uC2A4\uD2B8 \uC9C0\uC2DC\
|
|
10080
|
+
"md002.fix.protected": "\uC2B9\uC778\xB7\uBC30\uD3EC\xB7\uC0AD\uC81C\xB7\uD14C\uC2A4\uD2B8\xB7\uBCF4\uC548\xB7\uAC1C\uC778\uC815\uBCF4 \uC9C0\uC2DC\uB098 \uAE08\uC9C0 \uADDC\uCE59\uC774 \uB4E4\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. \uC774 \uBB38\uB2E8\uC744 \uC77D\uB294 \uBAA8\uB4E0 \uC5D0\uC774\uC804\uD2B8\uAC00 \uACC4\uC18D \uC9C0\uC2DC\uB97C \uBC1B\uB294\uB2E4\uB294 \uAC83\uC744 \uD655\uC778\uD558\uAE30 \uC804\uC5D0\uB294 \uC9C0\uC6B0\uC9C0 \uB9C8\uC138\uC694.",
|
|
9864
10081
|
"md002.verify": "\uAC19\uC740 \uAC80\uC0AC\uB97C \uB2E4\uC2DC \uC2E4\uD589\uD574 \uB0A8\uC740 \uC704\uCE58\uB97C \uBE44\uAD50\uD558\uC138\uC694.",
|
|
10082
|
+
"md002.scope.all": "\uACF5\uBC31\uB9CC \uC815\uB9AC\uD588\uC744 \uB54C \uC644\uC804\uD788 \uAC19\uC740 40\uC790 \uC774\uC0C1\uC758 \uBB38\uB2E8(\uBAA9\uB85D \uD56D\uBAA9 \uD3EC\uD568)\uC744 \uC9C0\uC2DC \uD30C\uC77C\uACFC \uADF8 \uD30C\uC77C\uC774 \uBD88\uB7EC\uC624\uB294 \uBB38\uC11C, \uADF8\uB9AC\uACE0 \uADF8 \uBB38\uB2E8\uC744 \uB418\uD480\uC774\uD55C \uB2E4\uB978 Markdown \uBB38\uC11C(README, docs)\uC5D0\uC11C \uCC3E\uC2B5\uB2C8\uB2E4. \uB300\uC18C\uBB38\uC790\xB7\uC22B\uC790\xB7\uBD80\uC815\uC5B4\xB7\uACBD\uB85C \uCC28\uC774\uB294 \uADF8\uB300\uB85C \uAD6C\uBD84\uD569\uB2C8\uB2E4. \uCF54\uB4DC \uBE14\uB85D, \uD14C\uC2A4\uD2B8 fixture, \uC608\uC81C\uB294 \uBE44\uAD50\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
10083
|
+
"md002.duplicateWithDocs": "\uC774 \uC9C0\uC2DC \uBB38\uB2E8\uC774 AI \uB3C4\uAD6C\uAC00 \uAE30\uBCF8\uC73C\uB85C \uC77D\uC9C0 \uC54A\uB294 \uBB38\uC11C\uC5D0\uB3C4 \uC788\uC2B5\uB2C8\uB2E4: {others}.",
|
|
10084
|
+
"md002.fix.docs": "\uB530\uB85C \uC77D\uD788\uB294 \uBB38\uC11C(README, \uC124\uACC4\uC11C, ADR, \uAC00\uC774\uB4DC)\uB294 \uC77C\uBD80\uB7EC \uADDC\uCE59\uC744 \uB418\uD480\uC774\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD55C\uCABD\uC744 \uACE0\uCE58\uBA74 \uBAA8\uB4E0 \uC0AC\uBCF8\uC744 \uAC19\uC774 \uACE0\uCE58\uAC70\uB098, \uD55C \uACF3\uC5D0\uB9CC \uB450\uACE0 \uB9C1\uD06C\uD558\uC138\uC694. \uBB38\uC11C\uC5D0 \uAC19\uC740 \uBB38\uC7A5\uC774 \uC788\uB2E4\uB294 \uC774\uC720\uB85C \uC9C0\uC2DC \uD30C\uC77C\uC5D0\uC11C \uADDC\uCE59\uC744 \uC9C0\uC6B0\uC9C0 \uB9C8\uC138\uC694.",
|
|
10085
|
+
"md002.fix.nested": "\uC0C1\uC704 \uD30C\uC77C\uC740 \uADF8 \uD3F4\uB354\uC640 \uBAA8\uB4E0 \uD558\uC704 \uD3F4\uB354\uC5D0, \uD558\uC704 \uD30C\uC77C\uC740 \uC790\uAE30 \uD3F4\uB354\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4. \uAC00\uC7A5 \uAC00\uAE4C\uC6B4 \uD30C\uC77C\uB9CC \uC77D\uB294 \uB3C4\uAD6C\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB290 \uC0AC\uBCF8\uC774\uB4E0 \uC9C0\uC6B0\uAE30 \uC804\uC5D0 \uB3C4\uAD6C\uBCC4 \uCEE8\uD14D\uC2A4\uD2B8\uB97C \uD655\uC778\uD558\uC138\uC694.",
|
|
9865
10086
|
"ai001.scope.m2": "\uD504\uB85C\uC81D\uD2B8\uC5D0\uC11C Codex(AGENTS.md\xB7AGENTS.override.md), Claude Code(CLAUDE.md\xB7CLAUDE.local.md\xB7.claude/rules, \uB300\uCCB4\uB85C AGENTS.md), Gemini CLI(GEMINI.md), GitHub Copilot(.github/copilot-instructions.md\xB7.github/instructions), Cursor \uB370\uC2A4\uD06C\uD1B1 \uC571(.cursor/rules/*.mdc), Grok Build \uD130\uBBF8\uB110(.grok/rules), Antigravity(.agents/rules)\uC758 \uC9C0\uC2DC\xB7\uADDC\uCE59 \uD30C\uC77C\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.",
|
|
9866
10087
|
"ai001.empty": "{path}\uC774(\uAC00) \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. Codex \uB4F1\uC740 \uBE48 \uC9C0\uC2DC \uD30C\uC77C\uC744 \uAC74\uB108\uB701\uB2C8\uB2E4.",
|
|
9867
10088
|
"ai001.fix.empty": "{path}\uC5D0 \uC758\uB3C4\uD55C \uC9C0\uC2DC\uB97C \uB123\uAC70\uB098 \uD30C\uC77C\uC744 \uC9C0\uC6B0\uC138\uC694.",
|
|
@@ -9967,8 +10188,12 @@ var ja2 = {
|
|
|
9967
10188
|
"md002.duplicateAcrossFiles": "\u540C\u3058\u6BB5\u843D\u304C {count} \u56DE\u3042\u308A\u307E\u3059\u3002\u307B\u304B\u306E\u4F4D\u7F6E: {others}\u3002",
|
|
9968
10189
|
"md002.duplicateInFile": "\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u5185\u306B\u540C\u3058\u6BB5\u843D\u304C {count} \u56DE\u3042\u308A\u307E\u3059\u3002\u307B\u304B\u306E\u4F4D\u7F6E: {others}\u3002",
|
|
9969
10190
|
"md002.fix.review": "\u3059\u3079\u3066\u306E\u4F4D\u7F6E\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u5225\u3005\u306E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u304C\u8AAD\u3080\u30D5\u30A1\u30A4\u30EB\u306A\u3089\u4E21\u65B9\u5FC5\u8981\u306A\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\u305D\u3046\u3067\u306A\u3051\u308C\u3070 1 \u304B\u6240\u306B\u6B8B\u3057\u3066\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
9970
|
-
"md002.fix.protected": "\u627F\u8A8D\u30FB\u30C7\u30D7\u30ED\u30A4\u30FB\u524A\u9664\u30FB\u30C6\u30B9\u30C8\u306E\u6307\u793A\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u6BB5\u843D\u3092\u8AAD\u3080\u3059\u3079\u3066\u306E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u304C\u5F15\u304D\u7D9A\u304D\u6307\u793A\u3092\u53D7\u3051\u53D6\u308B\u3068\u78BA\u8A8D\u3067\u304D\u308B\u307E\u3067\u306F\u524A\u9664\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002",
|
|
10191
|
+
"md002.fix.protected": "\u627F\u8A8D\u30FB\u30C7\u30D7\u30ED\u30A4\u30FB\u524A\u9664\u30FB\u30C6\u30B9\u30C8\u30FB\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u500B\u4EBA\u60C5\u5831\u306E\u6307\u793A\u3001\u307E\u305F\u306F\u7981\u6B62\u4E8B\u9805\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u6BB5\u843D\u3092\u8AAD\u3080\u3059\u3079\u3066\u306E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u304C\u5F15\u304D\u7D9A\u304D\u6307\u793A\u3092\u53D7\u3051\u53D6\u308B\u3068\u78BA\u8A8D\u3067\u304D\u308B\u307E\u3067\u306F\u524A\u9664\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002",
|
|
9971
10192
|
"md002.verify": "\u540C\u3058\u691C\u67FB\u3092\u518D\u5B9F\u884C\u3057\u3001\u6B8B\u3063\u305F\u4F4D\u7F6E\u3092\u6BD4\u8F03\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
10193
|
+
"md002.scope.all": "\u7A7A\u767D\u3092\u6574\u3048\u308B\u3068\u5B8C\u5168\u306B\u4E00\u81F4\u3059\u308B 40 \u6587\u5B57\u4EE5\u4E0A\u306E\u6BB5\u843D(\u30EA\u30B9\u30C8\u9805\u76EE\u3092\u542B\u3080)\u3092\u3001\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u3068\u305D\u308C\u304C\u8AAD\u307F\u8FBC\u3080\u6587\u66F8\u3001\u304A\u3088\u3073\u305D\u306E\u6BB5\u843D\u3092\u7E70\u308A\u8FD4\u3057\u3066\u3044\u308B\u4ED6\u306E Markdown \u6587\u66F8(README\u3001docs)\u304B\u3089\u63A2\u3057\u307E\u3059\u3002\u5927\u6587\u5B57\u5C0F\u6587\u5B57\u30FB\u6570\u5B57\u30FB\u5426\u5B9A\u8A9E\u30FB\u30D1\u30B9\u306E\u9055\u3044\u306F\u533A\u5225\u3057\u307E\u3059\u3002\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF\u3001\u30C6\u30B9\u30C8\u7528 fixture\u3001\u30B5\u30F3\u30D7\u30EB\u306F\u6BD4\u8F03\u3057\u307E\u305B\u3093\u3002",
|
|
10194
|
+
"md002.duplicateWithDocs": "\u3053\u306E\u6307\u793A\u306E\u6BB5\u843D\u306F\u3001AI \u30C4\u30FC\u30EB\u304C\u65E2\u5B9A\u3067\u306F\u8AAD\u307E\u306A\u3044\u6587\u66F8\u306B\u3082\u3042\u308A\u307E\u3059: {others}\u3002",
|
|
10195
|
+
"md002.fix.docs": "\u5358\u72EC\u3067\u8AAD\u307E\u308C\u308B\u6587\u66F8(README\u3001\u8A2D\u8A08\u66F8\u3001ADR\u3001\u30AC\u30A4\u30C9)\u306F\u3001\u610F\u56F3\u3057\u3066\u30EB\u30FC\u30EB\u3092\u7E70\u308A\u8FD4\u3059\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\u4E00\u65B9\u3092\u5909\u3048\u305F\u3089\u3059\u3079\u3066\u306E\u5199\u3057\u3092\u540C\u3058\u306B\u3059\u308B\u304B\u30011 \u304B\u6240\u306B\u307E\u3068\u3081\u3066\u30EA\u30F3\u30AF\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u6587\u66F8\u306B\u540C\u3058\u6587\u304C\u3042\u308B\u3068\u3044\u3046\u7406\u7531\u3067\u3001\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30EB\u30FC\u30EB\u3092\u524A\u9664\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002",
|
|
10196
|
+
"md002.fix.nested": "\u4E0A\u4F4D\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u305D\u306E\u30D5\u30A9\u30EB\u30C0\u30FC\u3068\u914D\u4E0B\u3059\u3079\u3066\u306B\u3001\u4E0B\u4F4D\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u81EA\u5206\u306E\u30D5\u30A9\u30EB\u30C0\u30FC\u3060\u3051\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002\u6700\u3082\u8FD1\u3044\u30D5\u30A1\u30A4\u30EB\u3060\u3051\u3092\u8AAD\u3080\u30C4\u30FC\u30EB\u3082\u3042\u308A\u307E\u3059\u3002\u3069\u3061\u3089\u306E\u5199\u3057\u3092\u6D88\u3059\u524D\u306B\u3082\u3001\u30C4\u30FC\u30EB\u3054\u3068\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
9972
10197
|
"ai001.scope.m2": "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E Codex(AGENTS.md\u30FBAGENTS.override.md)\u3001Claude Code(CLAUDE.md\u30FBCLAUDE.local.md\u30FB.claude/rules\u3001\u4EE3\u66FF\u3068\u3057\u3066 AGENTS.md)\u3001Gemini CLI(GEMINI.md)\u3001GitHub Copilot(.github/copilot-instructions.md\u30FB.github/instructions)\u3001Cursor \u30C7\u30B9\u30AF\u30C8\u30C3\u30D7\u30A2\u30D7\u30EA(.cursor/rules/*.mdc)\u3001Grok Build \u30BF\u30FC\u30DF\u30CA\u30EB(.grok/rules)\u3001Antigravity(.agents/rules)\u306E\u6307\u793A\u30FB\u30EB\u30FC\u30EB\u30D5\u30A1\u30A4\u30EB\u3092\u63A2\u3057\u307E\u3059\u3002",
|
|
9973
10198
|
"ai001.empty": "{path} \u306F\u7A7A\u3067\u3059\u3002Codex \u306A\u3069\u306F\u7A7A\u306E\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3059\u3002",
|
|
9974
10199
|
"ai001.fix.empty": "{path} \u306B\u610F\u56F3\u3057\u305F\u6307\u793A\u3092\u66F8\u304F\u304B\u3001\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
@@ -10074,8 +10299,12 @@ var zh2 = {
|
|
|
10074
10299
|
"md002.duplicateAcrossFiles": "\u540C\u4E00\u6BB5\u843D\u51FA\u73B0\u4E86 {count} \u6B21\u3002\u5176\u4ED6\u4F4D\u7F6E:{others}\u3002",
|
|
10075
10300
|
"md002.duplicateInFile": "\u540C\u4E00\u6BB5\u843D\u5728\u6B64\u6587\u4EF6\u4E2D\u51FA\u73B0\u4E86 {count} \u6B21\u3002\u5176\u4ED6\u4F4D\u7F6E:{others}\u3002",
|
|
10076
10301
|
"md002.fix.review": "\u8BF7\u68C0\u67E5\u6240\u6709\u4F4D\u7F6E\u3002\u5982\u679C\u8FD9\u4E9B\u6587\u4EF6\u4F9B\u4E0D\u540C\u7684\u4EE3\u7406\u8BFB\u53D6,\u53EF\u80FD\u90FD\u9700\u8981\u4FDD\u7559;\u5426\u5219\u53EA\u4FDD\u7559\u4E00\u5904\u5E76\u5F15\u7528\u5B83\u3002",
|
|
10077
|
-
"md002.fix.protected": "\u6B64\u6BB5\u843D\u5305\u542B\u5BA1\u6279\u3001\u90E8\u7F72\u3001\u5220\u9664\
|
|
10302
|
+
"md002.fix.protected": "\u6B64\u6BB5\u843D\u5305\u542B\u5BA1\u6279\u3001\u90E8\u7F72\u3001\u5220\u9664\u3001\u6D4B\u8BD5\u3001\u5B89\u5168\u6216\u9690\u79C1\u76F8\u5173\u6307\u4EE4,\u6216\u7981\u6B62\u4E8B\u9879\u3002\u5728\u786E\u8BA4\u6240\u6709\u8BFB\u53D6\u5B83\u7684\u4EE3\u7406\u4ECD\u80FD\u6536\u5230\u8BE5\u6307\u4EE4\u4E4B\u524D,\u4E0D\u8981\u5220\u9664\u4EFB\u4F55\u526F\u672C\u3002",
|
|
10078
10303
|
"md002.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\u5E76\u6BD4\u8F83\u5269\u4F59\u7684\u4F4D\u7F6E\u3002",
|
|
10304
|
+
"md002.scope.all": "\u5728\u6307\u4EE4\u6587\u4EF6\u53CA\u5176\u5BFC\u5165\u7684\u6587\u6863\u4E2D,\u4EE5\u53CA\u91CD\u590D\u8FD9\u4E9B\u6BB5\u843D\u7684\u5176\u4ED6 Markdown \u6587\u6863(README\u3001docs)\u4E2D,\u67E5\u627E\u53EA\u6574\u7406\u7A7A\u767D\u540E\u5B8C\u5168\u76F8\u540C\u3001\u957F\u5EA6\u4E0D\u5C11\u4E8E 40 \u4E2A\u5B57\u7B26\u7684\u6BB5\u843D(\u5305\u62EC\u5217\u8868\u9879)\u3002\u5927\u5C0F\u5199\u3001\u6570\u5B57\u3001\u5426\u5B9A\u8BCD\u548C\u8DEF\u5F84\u7684\u5DEE\u5F02\u4F1A\u88AB\u533A\u5206\u3002\u4E0D\u6BD4\u8F83\u4EE3\u7801\u5757\u3001\u6D4B\u8BD5 fixture \u548C\u793A\u4F8B\u3002",
|
|
10305
|
+
"md002.duplicateWithDocs": "\u8FD9\u6761\u6307\u4EE4\u6BB5\u843D\u4E5F\u51FA\u73B0\u5728 AI \u5DE5\u5177\u9ED8\u8BA4\u4E0D\u8BFB\u53D6\u7684\u6587\u6863\u4E2D:{others}\u3002",
|
|
10306
|
+
"md002.fix.docs": "\u5355\u72EC\u9605\u8BFB\u7684\u6587\u6863(README\u3001\u8BBE\u8BA1\u6587\u6863\u3001ADR\u3001\u6307\u5357)\u53EF\u80FD\u6709\u610F\u91CD\u590D\u89C4\u5219\u3002\u4FEE\u6539\u4E00\u5904\u65F6\u8BF7\u540C\u6B65\u6240\u6709\u526F\u672C,\u6216\u53EA\u4FDD\u7559\u4E00\u5904\u5E76\u6DFB\u52A0\u94FE\u63A5\u3002\u4E0D\u8981\u56E0\u4E3A\u6587\u6863\u4E2D\u6709\u76F8\u540C\u5185\u5BB9\u5C31\u4ECE\u6307\u4EE4\u6587\u4EF6\u4E2D\u5220\u9664\u89C4\u5219\u3002",
|
|
10307
|
+
"md002.fix.nested": "\u4E0A\u7EA7\u6587\u4EF6\u9002\u7528\u4E8E\u5176\u6587\u4EF6\u5939\u53CA\u6240\u6709\u5B50\u6587\u4EF6\u5939,\u4E0B\u7EA7\u6587\u4EF6\u53EA\u9002\u7528\u4E8E\u81EA\u5DF1\u7684\u6587\u4EF6\u5939,\u800C\u4E14\u6709\u4E9B\u5DE5\u5177\u53EA\u8BFB\u53D6\u6700\u8FD1\u7684\u6587\u4EF6\u3002\u5220\u9664\u4EFB\u4F55\u4E00\u4E2A\u526F\u672C\u4E4B\u524D,\u8BF7\u5148\u68C0\u67E5\u5404\u5DE5\u5177\u7684\u4E0A\u4E0B\u6587\u3002",
|
|
10079
10308
|
"ai001.scope.m2": "\u5728\u9879\u76EE\u4E2D\u67E5\u627E Codex(AGENTS.md\u3001AGENTS.override.md)\u3001Claude Code(CLAUDE.md\u3001CLAUDE.local.md\u3001.claude/rules,\u4EE5\u53CA\u4F5C\u4E3A\u66FF\u4EE3\u7684 AGENTS.md)\u3001Gemini CLI(GEMINI.md)\u3001GitHub Copilot(.github/copilot-instructions.md\u3001.github/instructions)\u3001Cursor \u684C\u9762\u5E94\u7528(.cursor/rules/*.mdc)\u3001Grok Build \u7EC8\u7AEF(.grok/rules)\u548C Antigravity(.agents/rules)\u7684\u6307\u4EE4\u4E0E\u89C4\u5219\u6587\u4EF6\u3002",
|
|
10080
10309
|
"ai001.empty": "{path} \u662F\u7A7A\u6587\u4EF6\u3002Codex \u7B49\u5DE5\u5177\u4F1A\u8DF3\u8FC7\u7A7A\u7684\u6307\u4EE4\u6587\u4EF6\u3002",
|
|
10081
10310
|
"ai001.fix.empty": "\u5728 {path} \u4E2D\u5199\u5165\u9884\u671F\u7684\u6307\u4EE4,\u6216\u5220\u9664\u8BE5\u6587\u4EF6\u3002",
|
|
@@ -10229,16 +10458,17 @@ var enT = {
|
|
|
10229
10458
|
"arc.reason.capped": "Only the first 50 results are listed.",
|
|
10230
10459
|
"arc.reason.listIncomplete": "The file list is incomplete, so some missing imports could not be confirmed.",
|
|
10231
10460
|
"rule.DUP-001": "Duplicated code blocks",
|
|
10232
|
-
"dup001.scope": "Compares source files (JS/TS, Python, Go, Rust, Java, Kotlin, C#, PHP, Ruby, Swift) line by line after trimming; blank lines, comments and bracket-only lines are skipped. A block is 6 or more meaningful lines.",
|
|
10461
|
+
"dup001.scope": "Compares source files (JS/TS, Python, Go, Rust, Java, Kotlin, C#, PHP, Ruby, Swift) line by line after trimming; blank lines, comments and bracket-only lines are skipped. A block is 6 or more meaningful lines. Imports, using directives, package and namespace lines and enum member lists are not compared; overlapping repeats are shown once.",
|
|
10233
10462
|
"dup001.block": "{lines} meaningful lines (lines {range}) appear in {copies} places.",
|
|
10463
|
+
"dup001.blockOverlap": "{lines} meaningful lines (lines {range}) repeat in full or in part in {copies} places; overlapping repeats are shown once.",
|
|
10234
10464
|
"dup001.fix": "Move the shared code into one function or module and call it from the {copies} places.",
|
|
10235
10465
|
"dup.verify": "Run the same check again and confirm {path}:{line} no longer appears.",
|
|
10236
10466
|
"dup.reason.noCode": "No supported source files were found.",
|
|
10237
10467
|
"dup.reason.capped": "Only the first 50 duplicated blocks are listed.",
|
|
10238
10468
|
"rule.AGT-001": "Skill files (SKILL.md)",
|
|
10239
10469
|
"rule.AGT-002": "Conflicting conventions",
|
|
10240
|
-
"agt001.scope": "Checks SKILL.md front matter: name and description present, name in lowercase-hyphen form (max 64) matching its folder, description up to 1024 characters, non-empty body.",
|
|
10241
|
-
"agt002.scope":
|
|
10470
|
+
"agt001.scope": "Checks SKILL.md front matter: name and description present, name in lowercase-hyphen form (max 64) matching its folder, description up to 1024 characters, non-empty body, and skills with side effects that Claude may start on its own.",
|
|
10471
|
+
"agt002.scope": 'Compares instruction files for clearly worded package-manager (npm, pnpm, yarn, bun), indentation (spaces, tabs) and Node.js version rules, in English, Korean, Japanese and Chinese sentences. Negated mentions ("do not use npm") are not rules; a rule for one environment or folder is compared only with rules for the same one; a version inside a stated range agrees. Results are candidates for review.',
|
|
10242
10472
|
"agt.verify": "Run the same check again and confirm {path}:{line} no longer appears.",
|
|
10243
10473
|
"rule.DOC-001": "Docs vs project",
|
|
10244
10474
|
"doc001.scope": "Compares commands and paths in instruction files and README with the project: package manager vs lockfile, npm/pnpm/yarn scripts vs package.json, file paths in code spans vs the file list, Docker commands vs Dockerfile and compose files. Only clear-cut cases are reported; examples and conditional sentences are skipped.",
|
|
@@ -10266,9 +10496,11 @@ var enT = {
|
|
|
10266
10496
|
"agt001.longDescription.fix": "Shorten the description in {path} and move details into the body.",
|
|
10267
10497
|
"agt001.emptyBody": "{path} has no instructions after the front matter.",
|
|
10268
10498
|
"agt001.emptyBody.fix": "Write the skill's instructions in the body of {path}.",
|
|
10499
|
+
"agt001.autoSideEffect": 'Skill "{name}" looks like it has side effects ({word}), but Claude may start it on its own.',
|
|
10500
|
+
"agt001.autoSideEffect.fix": 'Add "disable-model-invocation: true" to the front matter of {path} so that only a person starts it.',
|
|
10269
10501
|
"agt002.package-manager": "Instruction files name different package managers: {values}.",
|
|
10270
10502
|
"agt002.indentation": "Instruction files ask for different indentation: {values}.",
|
|
10271
|
-
"agt002.node-version": "Instruction files ask for
|
|
10503
|
+
"agt002.node-version": "Instruction files ask for Node.js versions that do not agree: {values}.",
|
|
10272
10504
|
"agt002.fix": "Pick one {topic} rule, keep it in one shared file and remove the others.",
|
|
10273
10505
|
"rule.DEP-001": "Pinned dependency versions",
|
|
10274
10506
|
"rule.DEP-002": "Known vulnerabilities (OSV)",
|
|
@@ -10285,7 +10517,7 @@ var enT = {
|
|
|
10285
10517
|
"rule.MCP-001": "MCP config structure",
|
|
10286
10518
|
"rule.MCP-002": "Risky MCP settings",
|
|
10287
10519
|
"mcp001.scope": "Parses MCP client configs as data (Claude Code .mcp.json, Cursor, VS Code, Gemini CLI, Claude Desktop, Codex config.toml) and checks required fields and types. No server is started.",
|
|
10288
|
-
"mcp002.scope": "Flags inline secrets, shell pipelines, privileged commands, unpinned auto-installed packages
|
|
10520
|
+
"mcp002.scope": "Flags inline secrets, shell pipelines, privileged commands, unpinned auto-installed packages, plain-HTTP remote URLs and servers given the whole disk or a home folder.",
|
|
10289
10521
|
"mcp.reason.none": "No MCP config files were found.",
|
|
10290
10522
|
"mcp.verify": "Run the same check again and confirm {path}:{line} no longer appears.",
|
|
10291
10523
|
"mcp001.parse": "{path} could not be parsed as JSON.",
|
|
@@ -10308,6 +10540,8 @@ var enT = {
|
|
|
10308
10540
|
"mcp002.unpinned.fix": 'Pin "{package}" to a reviewed version (for example package@1.2.3).',
|
|
10309
10541
|
"mcp002.insecureUrl": 'Server "{server}" connects to a remote URL over plain HTTP.',
|
|
10310
10542
|
"mcp002.insecureUrl.fix": 'Use an https:// URL for "{server}".',
|
|
10543
|
+
"mcp002.broadAccess": 'Server "{server}" is given {path}, which opens the whole disk or a home folder.',
|
|
10544
|
+
"mcp002.broadAccess.fix": 'Give "{server}" only the folders it needs, for example the project folder.',
|
|
10311
10545
|
"rule.SEC-001": "Credential patterns",
|
|
10312
10546
|
"rule.SEC-002": "Sensitive files",
|
|
10313
10547
|
"sec001.scope": "Looks for well-known key and token formats in readable text files. Values are masked and never checked online.",
|
|
@@ -10387,16 +10621,17 @@ var koT = {
|
|
|
10387
10621
|
"arc.reason.capped": "\uACB0\uACFC\uB294 \uCC98\uC74C 50\uAC1C\uAE4C\uC9C0\uB9CC \uBCF4\uC5EC \uC90D\uB2C8\uB2E4.",
|
|
10388
10622
|
"arc.reason.listIncomplete": "\uD30C\uC77C \uBAA9\uB85D\uC774 \uC644\uC804\uD558\uC9C0 \uC54A\uC544 \uC77C\uBD80 import\uB294 \uD655\uC778\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
|
|
10389
10623
|
"rule.DUP-001": "\uC911\uBCF5 \uCF54\uB4DC \uBE14\uB85D",
|
|
10390
|
-
"dup001.scope": "\uC18C\uC2A4 \uD30C\uC77C(JS/TS, Python, Go, Rust, Java, Kotlin, C#, PHP, Ruby, Swift)\uC744 \uC55E\uB4A4 \uACF5\uBC31\uC744 \uC815\uB9AC\uD55C \uB4A4 \uC904 \uB2E8\uC704\uB85C \uBE44\uAD50\uD569\uB2C8\uB2E4. \uBE48 \uC904, \uC8FC\uC11D, \uAD04\uD638\uB9CC \uC788\uB294 \uC904\uC740 \uAC74\uB108\uB701\uB2C8\uB2E4. \uC758\uBBF8 \uC788\uB294 \uC904 6\uC904 \uC774\uC0C1\uC744 \uD55C \uBE14\uB85D\uC73C\uB85C \uBD05\uB2C8\uB2E4.",
|
|
10624
|
+
"dup001.scope": "\uC18C\uC2A4 \uD30C\uC77C(JS/TS, Python, Go, Rust, Java, Kotlin, C#, PHP, Ruby, Swift)\uC744 \uC55E\uB4A4 \uACF5\uBC31\uC744 \uC815\uB9AC\uD55C \uB4A4 \uC904 \uB2E8\uC704\uB85C \uBE44\uAD50\uD569\uB2C8\uB2E4. \uBE48 \uC904, \uC8FC\uC11D, \uAD04\uD638\uB9CC \uC788\uB294 \uC904\uC740 \uAC74\uB108\uB701\uB2C8\uB2E4. \uC758\uBBF8 \uC788\uB294 \uC904 6\uC904 \uC774\uC0C1\uC744 \uD55C \uBE14\uB85D\uC73C\uB85C \uBD05\uB2C8\uB2E4. import\xB7using\xB7package\xB7namespace \uC904\uACFC enum \uBA64\uBC84 \uBAA9\uB85D\uC740 \uBE44\uAD50\uD558\uC9C0 \uC54A\uACE0, \uACB9\uCE58\uB294 \uBC18\uBCF5\uC740 \uD55C \uBC88\uB9CC \uBCF4\uC5EC \uC90D\uB2C8\uB2E4.",
|
|
10391
10625
|
"dup001.block": "\uC758\uBBF8 \uC788\uB294 {lines}\uC904({range}\uD589)\uC774 {copies}\uACF3\uC5D0 \uBC18\uBCF5\uB429\uB2C8\uB2E4.",
|
|
10626
|
+
"dup001.blockOverlap": "\uC758\uBBF8 \uC788\uB294 {lines}\uC904({range}\uD589)\uC774 {copies}\uACF3\uC5D0 \uC804\uBD80 \uB610\uB294 \uC77C\uBD80 \uBC18\uBCF5\uB429\uB2C8\uB2E4. \uACB9\uCE58\uB294 \uBC18\uBCF5\uC740 \uD55C \uBC88\uB9CC \uBCF4\uC5EC \uC90D\uB2C8\uB2E4.",
|
|
10392
10627
|
"dup001.fix": "\uACF5\uD1B5 \uCF54\uB4DC\uB97C \uD568\uC218\uB098 \uBAA8\uB4C8 \uD558\uB098\uB85C \uC62E\uAE30\uACE0 {copies}\uACF3\uC5D0\uC11C \uBD88\uB7EC \uC4F0\uC138\uC694.",
|
|
10393
10628
|
"dup.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.",
|
|
10394
10629
|
"dup.reason.noCode": "\uC9C0\uC6D0\uD558\uB294 \uC18C\uC2A4 \uD30C\uC77C\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
|
|
10395
10630
|
"dup.reason.capped": "\uC911\uBCF5 \uBE14\uB85D\uC740 \uCC98\uC74C 50\uAC1C\uAE4C\uC9C0\uB9CC \uBCF4\uC5EC \uC90D\uB2C8\uB2E4.",
|
|
10396
10631
|
"rule.AGT-001": "\uC2A4\uD0AC \uD30C\uC77C(SKILL.md)",
|
|
10397
10632
|
"rule.AGT-002": "\uC11C\uB85C \uB2E4\uB978 \uADDC\uCE59",
|
|
10398
|
-
"agt001.scope": "SKILL.md\uC758 front matter\uB97C \uD655\uC778\uD569\uB2C8\uB2E4. name\xB7description\uC774 \uC788\uB294\uC9C0, name\uC774 \uC18C\uBB38\uC790\xB7\uD558\uC774\uD508 \uD615\uC2DD(\uCD5C\uB300 64\uC790)\uC774\uACE0 \uD3F4\uB354 \uC774\uB984\uACFC \uAC19\uC740\uC9C0, description\uC774 1024\uC790 \uC774\uD558\uC778\uC9C0, \uBCF8\uBB38\uC774 \uC788\uB294\uC9C0 \uBD05\uB2C8\uB2E4.",
|
|
10399
|
-
"agt002.scope":
|
|
10633
|
+
"agt001.scope": "SKILL.md\uC758 front matter\uB97C \uD655\uC778\uD569\uB2C8\uB2E4. name\xB7description\uC774 \uC788\uB294\uC9C0, name\uC774 \uC18C\uBB38\uC790\xB7\uD558\uC774\uD508 \uD615\uC2DD(\uCD5C\uB300 64\uC790)\uC774\uACE0 \uD3F4\uB354 \uC774\uB984\uACFC \uAC19\uC740\uC9C0, description\uC774 1024\uC790 \uC774\uD558\uC778\uC9C0, \uBCF8\uBB38\uC774 \uC788\uB294\uC9C0, \uBD80\uC791\uC6A9\uC774 \uC788\uC5B4 \uBCF4\uC774\uB294 \uC2A4\uD0AC\uC744 Claude\uAC00 \uC2A4\uC2A4\uB85C \uC2E4\uD589\uD560 \uC218 \uC788\uB294\uC9C0 \uBD05\uB2C8\uB2E4.",
|
|
10634
|
+
"agt002.scope": '\uC9C0\uC2DC \uD30C\uC77C\uB4E4\uC5D0 \uBD84\uBA85\uD558\uAC8C \uC801\uD78C \uD328\uD0A4\uC9C0 \uAD00\uB9AC\uC790(npm, pnpm, yarn, bun), \uB4E4\uC5EC\uC4F0\uAE30(\uACF5\uBC31, \uD0ED), Node.js \uBC84\uC804 \uADDC\uCE59\uC744 \uC601\uC5B4\xB7\uD55C\uAD6D\uC5B4\xB7\uC77C\uBCF8\uC5B4\xB7\uC911\uAD6D\uC5B4 \uBB38\uC7A5\uC5D0\uC11C \uBE44\uAD50\uD569\uB2C8\uB2E4. \uBD80\uC815\uBB38("npm\uC744 \uC0AC\uC6A9\uD558\uC9C0 \uB9C8\uC138\uC694")\uC740 \uADDC\uCE59\uC73C\uB85C \uBCF4\uC9C0 \uC54A\uACE0, \uD2B9\uC815 \uD658\uACBD\uC774\uB098 \uD3F4\uB354\uC5D0\uB9CC \uC801\uC6A9\uB418\uB294 \uADDC\uCE59\uC740 \uAC19\uC740 \uD658\uACBD\xB7\uD3F4\uB354\uC758 \uADDC\uCE59\uACFC\uB9CC \uBE44\uAD50\uD558\uBA70, \uC801\uD78C \uBC94\uC704 \uC548\uC758 \uBC84\uC804\uC740 \uC77C\uCE58\uB85C \uBD05\uB2C8\uB2E4. \uACB0\uACFC\uB294 \uAC80\uD1A0\uD560 \uD6C4\uBCF4\uC785\uB2C8\uB2E4.',
|
|
10400
10635
|
"agt.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.",
|
|
10401
10636
|
"rule.DOC-001": "\uBB38\uC11C\uC640 \uD504\uB85C\uC81D\uD2B8 \uBD88\uC77C\uCE58",
|
|
10402
10637
|
"doc001.scope": "\uC9C0\uC2DC \uD30C\uC77C\uACFC README\uC758 \uBA85\uB839\xB7\uACBD\uB85C\uB97C \uD504\uB85C\uC81D\uD2B8\uC640 \uBE44\uAD50\uD569\uB2C8\uB2E4. \uD328\uD0A4\uC9C0 \uAD00\uB9AC\uC790\uC640 \uC7A0\uAE08 \uD30C\uC77C, npm/pnpm/yarn \uC2A4\uD06C\uB9BD\uD2B8\uC640 package.json, \uCF54\uB4DC \uD45C\uAE30 \uC18D \uD30C\uC77C \uACBD\uB85C\uC640 \uD30C\uC77C \uBAA9\uB85D, Docker \uBA85\uB839\uACFC Dockerfile\xB7compose \uD30C\uC77C. \uD655\uC2E4\uD55C \uACBD\uC6B0\uB9CC \uC54C\uB9AC\uACE0, \uC608\uC2DC\uC640 \uC870\uAC74\uBB38\uC740 \uAC74\uB108\uB701\uB2C8\uB2E4.",
|
|
@@ -10424,9 +10659,11 @@ var koT = {
|
|
|
10424
10659
|
"agt001.longDescription.fix": "{path}\uC758 description\uC744 \uC904\uC774\uACE0 \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uBCF8\uBB38\uC73C\uB85C \uC62E\uAE30\uC138\uC694.",
|
|
10425
10660
|
"agt001.emptyBody": "{path}\uC758 front matter \uB4A4\uC5D0 \uC9C0\uC2DC \uB0B4\uC6A9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
10426
10661
|
"agt001.emptyBody.fix": "{path} \uBCF8\uBB38\uC5D0 \uC2A4\uD0AC\uC758 \uC9C0\uC2DC \uB0B4\uC6A9\uC744 \uC801\uC73C\uC138\uC694.",
|
|
10427
|
-
"
|
|
10428
|
-
"
|
|
10429
|
-
"agt002.
|
|
10662
|
+
"agt001.autoSideEffect": '\uC2A4\uD0AC "{name}"\uC740(\uB294) \uBD80\uC791\uC6A9\uC774 \uC788\uC5B4 \uBCF4\uC774\uB294\uB370({word}) Claude\uAC00 \uC2A4\uC2A4\uB85C \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.',
|
|
10663
|
+
"agt001.autoSideEffect.fix": '{path}\uC758 front matter\uC5D0 "disable-model-invocation: true"\uB97C \uB123\uC5B4 \uC0AC\uB78C\uB9CC \uC2E4\uD589\uD558\uAC8C \uD558\uC138\uC694.',
|
|
10664
|
+
"agt002.package-manager": "\uC9C0\uC2DC \uBB38\uC11C\uC5D0 \uC11C\uB85C \uB2E4\uB978 \uD328\uD0A4\uC9C0 \uAD00\uB9AC\uC790\uAC00 \uC801\uD600 \uC788\uC2B5\uB2C8\uB2E4: {values}.",
|
|
10665
|
+
"agt002.indentation": "\uC9C0\uC2DC \uBB38\uC11C\uAC00 \uC11C\uB85C \uB2E4\uB978 \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC694\uAD6C\uD569\uB2C8\uB2E4: {values}.",
|
|
10666
|
+
"agt002.node-version": "\uC9C0\uC2DC \uBB38\uC11C\uAC00 \uC694\uAD6C\uD558\uB294 Node.js \uBC84\uC804\uC774 \uC11C\uB85C \uB9DE\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4: {values}.",
|
|
10430
10667
|
"agt002.fix": "{topic} \uADDC\uCE59\uC744 \uD558\uB098\uB85C \uC815\uD574 \uACF5\uD1B5 \uD30C\uC77C \uD55C \uACF3\uC5D0\uB9CC \uB0A8\uAE30\uACE0 \uB098\uBA38\uC9C0\uB294 \uC9C0\uC6B0\uC138\uC694.",
|
|
10431
10668
|
"rule.DEP-001": "\uC758\uC874\uC131 \uBC84\uC804 \uACE0\uC815",
|
|
10432
10669
|
"rule.DEP-002": "\uC54C\uB824\uC9C4 \uCDE8\uC57D\uC810(OSV)",
|
|
@@ -10443,7 +10680,7 @@ var koT = {
|
|
|
10443
10680
|
"rule.MCP-001": "MCP \uC124\uC815 \uAD6C\uC870",
|
|
10444
10681
|
"rule.MCP-002": "\uC704\uD5D8\uD55C MCP \uC124\uC815",
|
|
10445
10682
|
"mcp001.scope": "MCP \uD074\uB77C\uC774\uC5B8\uD2B8 \uC124\uC815(Claude Code .mcp.json, Cursor, VS Code, Gemini CLI, Claude Desktop, Codex config.toml)\uC744 \uB370\uC774\uD130\uB85C\uB9CC \uC77D\uC5B4 \uD544\uC218 \uD56D\uBAA9\uACFC \uD615\uC2DD\uC744 \uD655\uC778\uD569\uB2C8\uB2E4. \uC11C\uBC84\uB97C \uC2E4\uD589\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
10446
|
-
"mcp002.scope": "\uC124\uC815\uC5D0 \uC9C1\uC811 \uC801\uC740 \uBE44\uBC00 \uD0A4, \uC178 \uD30C\uC774\uD504 \uC2E4\uD589, \uAD00\uB9AC\uC790 \uAD8C\uD55C \uBA85\uB839, \uBC84\uC804\uC744 \uACE0\uC815\uD558\uC9C0 \uC54A\uC740 \uC790\uB3D9 \uC124\uCE58, \uC6D0\uACA9 HTTP \uC8FC\uC18C\uB97C \uCC3E\uC2B5\uB2C8\uB2E4.",
|
|
10683
|
+
"mcp002.scope": "\uC124\uC815\uC5D0 \uC9C1\uC811 \uC801\uC740 \uBE44\uBC00 \uD0A4, \uC178 \uD30C\uC774\uD504 \uC2E4\uD589, \uAD00\uB9AC\uC790 \uAD8C\uD55C \uBA85\uB839, \uBC84\uC804\uC744 \uACE0\uC815\uD558\uC9C0 \uC54A\uC740 \uC790\uB3D9 \uC124\uCE58, \uC6D0\uACA9 HTTP \uC8FC\uC18C, \uB514\uC2A4\uD06C \uC804\uCCB4\uB098 \uD648 \uD3F4\uB354\uB97C \uC5EC\uB294 \uC11C\uBC84\uB97C \uCC3E\uC2B5\uB2C8\uB2E4.",
|
|
10447
10684
|
"mcp.reason.none": "MCP \uC124\uC815 \uD30C\uC77C\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
|
|
10448
10685
|
"mcp.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.",
|
|
10449
10686
|
"mcp001.parse": "{path}\uC744(\uB97C) JSON\uC73C\uB85C \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
@@ -10466,6 +10703,8 @@ var koT = {
|
|
|
10466
10703
|
"mcp002.unpinned.fix": '"{package}"\uB97C \uAC80\uD1A0\uD55C \uBC84\uC804\uC73C\uB85C \uACE0\uC815\uD558\uC138\uC694(\uC608: package@1.2.3).',
|
|
10467
10704
|
"mcp002.insecureUrl": '"{server}" \uC11C\uBC84\uAC00 \uC6D0\uACA9 \uC8FC\uC18C\uC5D0 \uC554\uD638\uD654\uB418\uC9C0 \uC54A\uC740 HTTP\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4.',
|
|
10468
10705
|
"mcp002.insecureUrl.fix": '"{server}"\uC5D0\uB294 https:// \uC8FC\uC18C\uB97C \uC4F0\uC138\uC694.',
|
|
10706
|
+
"mcp002.broadAccess": '\uC11C\uBC84 "{server}"\uC5D0 {path}\uC744(\uB97C) \uB118\uACA8 \uB514\uC2A4\uD06C \uC804\uCCB4\uB098 \uD648 \uD3F4\uB354\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.',
|
|
10707
|
+
"mcp002.broadAccess.fix": '"{server}"\uC5D0\uB294 \uD544\uC694\uD55C \uD3F4\uB354\uB9CC, \uC608\uB97C \uB4E4\uC5B4 \uD504\uB85C\uC81D\uD2B8 \uD3F4\uB354\uB9CC \uB118\uAE30\uC138\uC694.',
|
|
10469
10708
|
"rule.SEC-001": "\uBE44\uBC00 \uD0A4 \uD328\uD134",
|
|
10470
10709
|
"rule.SEC-002": "\uBBFC\uAC10\uD55C \uD30C\uC77C",
|
|
10471
10710
|
"sec001.scope": "\uC77D\uC744 \uC218 \uC788\uB294 \uD14D\uC2A4\uD2B8 \uD30C\uC77C\uC5D0\uC11C \uC798 \uC54C\uB824\uC9C4 \uD0A4\xB7\uD1A0\uD070 \uD615\uC2DD\uC744 \uCC3E\uC2B5\uB2C8\uB2E4. \uAC12\uC740 \uAC00\uB824\uC11C \uBCF4\uC5EC \uC8FC\uACE0, \uC678\uBD80\uC5D0 \uBCF4\uB0B4 \uD655\uC778\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
@@ -10545,16 +10784,17 @@ var jaT = {
|
|
|
10545
10784
|
"arc.reason.capped": "\u7D50\u679C\u306F\u6700\u521D\u306E 50 \u4EF6\u3060\u3051\u3092\u8868\u793A\u3057\u307E\u3059\u3002",
|
|
10546
10785
|
"arc.reason.listIncomplete": "\u30D5\u30A1\u30A4\u30EB\u4E00\u89A7\u304C\u4E0D\u5B8C\u5168\u306A\u305F\u3081\u3001\u4E00\u90E8\u306E import \u306F\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
10547
10786
|
"rule.DUP-001": "\u91CD\u8907\u3057\u305F\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF",
|
|
10548
|
-
"dup001.scope": "\u30BD\u30FC\u30B9\u30D5\u30A1\u30A4\u30EB(JS/TS\u3001Python\u3001Go\u3001Rust\u3001Java\u3001Kotlin\u3001C#\u3001PHP\u3001Ruby\u3001Swift)\u3092\u524D\u5F8C\u306E\u7A7A\u767D\u3092\u6574\u3048\u3066\u884C\u5358\u4F4D\u3067\u6BD4\u8F03\u3057\u307E\u3059\u3002\u7A7A\u884C\u3001\u30B3\u30E1\u30F3\u30C8\u3001\u62EC\u5F27\u3060\u3051\u306E\u884C\u306F\u9664\u304D\u307E\u3059\u3002\u610F\u5473\u306E\u3042\u308B 6 \u884C\u4EE5\u4E0A\u3092 1 \u30D6\u30ED\u30C3\u30AF\u3068\u3057\u307E\u3059\u3002",
|
|
10787
|
+
"dup001.scope": "\u30BD\u30FC\u30B9\u30D5\u30A1\u30A4\u30EB(JS/TS\u3001Python\u3001Go\u3001Rust\u3001Java\u3001Kotlin\u3001C#\u3001PHP\u3001Ruby\u3001Swift)\u3092\u524D\u5F8C\u306E\u7A7A\u767D\u3092\u6574\u3048\u3066\u884C\u5358\u4F4D\u3067\u6BD4\u8F03\u3057\u307E\u3059\u3002\u7A7A\u884C\u3001\u30B3\u30E1\u30F3\u30C8\u3001\u62EC\u5F27\u3060\u3051\u306E\u884C\u306F\u9664\u304D\u307E\u3059\u3002\u610F\u5473\u306E\u3042\u308B 6 \u884C\u4EE5\u4E0A\u3092 1 \u30D6\u30ED\u30C3\u30AF\u3068\u3057\u307E\u3059\u3002import\u30FBusing\u30FBpackage\u30FBnamespace \u306E\u884C\u3068 enum \u306E\u30E1\u30F3\u30D0\u30FC\u4E00\u89A7\u306F\u6BD4\u8F03\u305B\u305A\u3001\u91CD\u306A\u308B\u7E70\u308A\u8FD4\u3057\u306F 1 \u4EF6\u306B\u307E\u3068\u3081\u307E\u3059\u3002",
|
|
10549
10788
|
"dup001.block": "\u610F\u5473\u306E\u3042\u308B {lines} \u884C({range} \u884C\u76EE)\u304C {copies} \u304B\u6240\u3067\u7E70\u308A\u8FD4\u3055\u308C\u3066\u3044\u307E\u3059\u3002",
|
|
10789
|
+
"dup001.blockOverlap": "\u610F\u5473\u306E\u3042\u308B {lines} \u884C({range} \u884C\u76EE)\u304C {copies} \u304B\u6240\u3067\u5168\u4F53\u307E\u305F\u306F\u4E00\u90E8\u7E70\u308A\u8FD4\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u91CD\u306A\u308B\u7E70\u308A\u8FD4\u3057\u306F 1 \u4EF6\u306B\u307E\u3068\u3081\u3066\u3044\u307E\u3059\u3002",
|
|
10550
10790
|
"dup001.fix": "\u5171\u901A\u306E\u30B3\u30FC\u30C9\u3092 1 \u3064\u306E\u95A2\u6570\u304B\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u307E\u3068\u3081\u3001{copies} \u304B\u6240\u304B\u3089\u547C\u3073\u51FA\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
10551
10791
|
"dup.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",
|
|
10552
10792
|
"dup.reason.noCode": "\u5BFE\u5FDC\u3059\u308B\u30BD\u30FC\u30B9\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
10553
10793
|
"dup.reason.capped": "\u91CD\u8907\u30D6\u30ED\u30C3\u30AF\u306F\u6700\u521D\u306E 50 \u4EF6\u3060\u3051\u3092\u8868\u793A\u3057\u307E\u3059\u3002",
|
|
10554
10794
|
"rule.AGT-001": "\u30B9\u30AD\u30EB\u30D5\u30A1\u30A4\u30EB(SKILL.md)",
|
|
10555
10795
|
"rule.AGT-002": "\u98DF\u3044\u9055\u3046\u898F\u7D04",
|
|
10556
|
-
"agt001.scope": "SKILL.md \u306E front matter \u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002name \u3068 description \u304C\u3042\u308B\u304B\u3001name \u304C\u5C0F\u6587\u5B57\u3068\u30CF\u30A4\u30D5\u30F3(\u6700\u5927 64 \u6587\u5B57)\u3067\u30D5\u30A9\u30EB\u30C0\u30FC\u540D\u3068\
|
|
10557
|
-
"agt002.scope": "\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u306B\u660E\u78BA\u306B\u66F8\u304B\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC(npm\u3001pnpm\u3001yarn\u3001bun)\u3001\u30A4\u30F3\u30C7\u30F3\u30C8(\u30B9\u30DA\u30FC\u30B9\u3001\u30BF\u30D6)\u3001Node.js \u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30EB\u30FC\u30EB\u3092\u3001\u82F1\u8A9E\u30FB\u97D3\u56FD\u8A9E\u30FB\u65E5\u672C\u8A9E\u30FB\u4E2D\u56FD\u8A9E\u306E\u6587\u304B\u3089\u6BD4\u3079\u307E\u3059\u3002\u7D50\u679C\u306F\u78BA\u8A8D\u5019\u88DC\u3067\u3059\u3002",
|
|
10796
|
+
"agt001.scope": "SKILL.md \u306E front matter \u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002name \u3068 description \u304C\u3042\u308B\u304B\u3001name \u304C\u5C0F\u6587\u5B57\u3068\u30CF\u30A4\u30D5\u30F3\u306E\u5F62\u5F0F(\u6700\u5927 64 \u6587\u5B57)\u3067\u30D5\u30A9\u30EB\u30C0\u30FC\u540D\u3068\u540C\u3058\u304B\u3001description \u304C 1024 \u6587\u5B57\u4EE5\u5185\u304B\u3001\u672C\u6587\u304C\u3042\u308B\u304B\u3001\u526F\u4F5C\u7528\u304C\u3042\u308A\u305D\u3046\u306A\u30B9\u30AD\u30EB\u3092 Claude \u304C\u81EA\u5206\u3067\u5B9F\u884C\u3067\u304D\u308B\u304B\u3092\u898B\u307E\u3059\u3002",
|
|
10797
|
+
"agt002.scope": "\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u306B\u660E\u78BA\u306B\u66F8\u304B\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC(npm\u3001pnpm\u3001yarn\u3001bun)\u3001\u30A4\u30F3\u30C7\u30F3\u30C8(\u30B9\u30DA\u30FC\u30B9\u3001\u30BF\u30D6)\u3001Node.js \u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30EB\u30FC\u30EB\u3092\u3001\u82F1\u8A9E\u30FB\u97D3\u56FD\u8A9E\u30FB\u65E5\u672C\u8A9E\u30FB\u4E2D\u56FD\u8A9E\u306E\u6587\u304B\u3089\u6BD4\u3079\u307E\u3059\u3002\u5426\u5B9A\u6587(\u300Cnpm \u3092\u4F7F\u308F\u306A\u3044\u3067\u300D)\u306F\u30EB\u30FC\u30EB\u3068\u307F\u306A\u3055\u305A\u3001\u7279\u5B9A\u306E\u74B0\u5883\u3084\u30D5\u30A9\u30EB\u30C0\u30FC\u3060\u3051\u306E\u30EB\u30FC\u30EB\u306F\u540C\u3058\u74B0\u5883\u30FB\u30D5\u30A9\u30EB\u30C0\u30FC\u306E\u30EB\u30FC\u30EB\u3068\u3060\u3051\u6BD4\u3079\u3001\u66F8\u304B\u308C\u305F\u7BC4\u56F2\u5185\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u4E00\u81F4\u3068\u307F\u306A\u3057\u307E\u3059\u3002\u7D50\u679C\u306F\u78BA\u8A8D\u304C\u5FC5\u8981\u306A\u5019\u88DC\u3067\u3059\u3002",
|
|
10558
10798
|
"agt.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",
|
|
10559
10799
|
"rule.DOC-001": "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3068\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u4E0D\u4E00\u81F4",
|
|
10560
10800
|
"doc001.scope": "\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u3068 README \u306E\u30B3\u30DE\u30F3\u30C9\u30FB\u30D1\u30B9\u3092\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3068\u6BD4\u3079\u307E\u3059\u3002\u30D1\u30C3\u30B1\u30FC\u30B8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC\u3068\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\u3001npm/pnpm/yarn \u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u3068 package.json\u3001\u30B3\u30FC\u30C9\u8868\u8A18\u5185\u306E\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9\u3068\u30D5\u30A1\u30A4\u30EB\u4E00\u89A7\u3001Docker \u30B3\u30DE\u30F3\u30C9\u3068 Dockerfile\u30FBcompose \u30D5\u30A1\u30A4\u30EB\u3002\u78BA\u5B9F\u306A\u5834\u5408\u3060\u3051\u5831\u544A\u3057\u3001\u4F8B\u3068\u6761\u4EF6\u6587\u306F\u98DB\u3070\u3057\u307E\u3059\u3002",
|
|
@@ -10582,9 +10822,11 @@ var jaT = {
|
|
|
10582
10822
|
"agt001.longDescription.fix": "{path} \u306E description \u3092\u77ED\u304F\u3057\u3001\u8A73\u7D30\u306F\u672C\u6587\u306B\u79FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
10583
10823
|
"agt001.emptyBody": "{path} \u306E front matter \u306E\u5F8C\u306B\u6307\u793A\u304C\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
10584
10824
|
"agt001.emptyBody.fix": "{path} \u306E\u672C\u6587\u306B\u30B9\u30AD\u30EB\u306E\u6307\u793A\u3092\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
10585
|
-
"
|
|
10586
|
-
"
|
|
10587
|
-
"agt002.
|
|
10825
|
+
"agt001.autoSideEffect": '\u30B9\u30AD\u30EB "{name}" \u306F\u526F\u4F5C\u7528\u304C\u3042\u308A\u305D\u3046\u3067\u3059({word})\u304C\u3001Claude \u304C\u81EA\u5206\u3067\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002',
|
|
10826
|
+
"agt001.autoSideEffect.fix": '{path} \u306E front matter \u306B "disable-model-invocation: true" \u3092\u52A0\u3048\u3001\u4EBA\u3060\u3051\u304C\u5B9F\u884C\u3059\u308B\u3088\u3046\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002',
|
|
10827
|
+
"agt002.package-manager": "\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u306B\u7570\u306A\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC\u304C\u66F8\u304B\u308C\u3066\u3044\u307E\u3059: {values}\u3002",
|
|
10828
|
+
"agt002.indentation": "\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u304C\u7570\u306A\u308B\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u6C42\u3081\u3066\u3044\u307E\u3059: {values}\u3002",
|
|
10829
|
+
"agt002.node-version": "\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u304C\u6C42\u3081\u308B Node.js \u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u4E00\u81F4\u3057\u307E\u305B\u3093: {values}\u3002",
|
|
10588
10830
|
"agt002.fix": "{topic} \u306E\u30EB\u30FC\u30EB\u3092 1 \u3064\u306B\u6C7A\u3081\u3001\u5171\u901A\u30D5\u30A1\u30A4\u30EB 1 \u304B\u6240\u3060\u3051\u306B\u6B8B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
10589
10831
|
"rule.DEP-001": "\u4F9D\u5B58\u95A2\u4FC2\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u56FA\u5B9A",
|
|
10590
10832
|
"rule.DEP-002": "\u65E2\u77E5\u306E\u8106\u5F31\u6027(OSV)",
|
|
@@ -10601,7 +10843,7 @@ var jaT = {
|
|
|
10601
10843
|
"rule.MCP-001": "MCP \u8A2D\u5B9A\u306E\u69CB\u9020",
|
|
10602
10844
|
"rule.MCP-002": "\u5371\u967A\u306A MCP \u8A2D\u5B9A",
|
|
10603
10845
|
"mcp001.scope": "MCP \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306E\u8A2D\u5B9A(Claude Code .mcp.json\u3001Cursor\u3001VS Code\u3001Gemini CLI\u3001Claude Desktop\u3001Codex config.toml)\u3092\u30C7\u30FC\u30BF\u3068\u3057\u3066\u8AAD\u307F\u3001\u5FC5\u9808\u9805\u76EE\u3068\u578B\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002\u30B5\u30FC\u30D0\u30FC\u306F\u8D77\u52D5\u3057\u307E\u305B\u3093\u3002",
|
|
10604
|
-
"mcp002.scope": "\u8A2D\u5B9A\u306B\u76F4\u63A5\u66F8\u304B\u308C\u305F\
|
|
10846
|
+
"mcp002.scope": "\u8A2D\u5B9A\u306B\u76F4\u63A5\u66F8\u304B\u308C\u305F\u79D8\u5BC6\u60C5\u5831\u3001\u30B7\u30A7\u30EB\u306E\u30D1\u30A4\u30D7\u5B9F\u884C\u3001\u7279\u6A29\u30B3\u30DE\u30F3\u30C9\u3001\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u56FA\u5B9A\u3057\u306A\u3044\u81EA\u52D5\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3001\u5E73\u6587 HTTP \u306E\u30EA\u30E2\u30FC\u30C8 URL\u3001\u30C7\u30A3\u30B9\u30AF\u5168\u4F53\u3084\u30DB\u30FC\u30E0\u30D5\u30A9\u30EB\u30C0\u30FC\u3092\u958B\u304F\u30B5\u30FC\u30D0\u30FC\u3092\u63A2\u3057\u307E\u3059\u3002",
|
|
10605
10847
|
"mcp.reason.none": "MCP \u306E\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
10606
10848
|
"mcp.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",
|
|
10607
10849
|
"mcp001.parse": "{path} \u3092 JSON \u3068\u3057\u3066\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3002",
|
|
@@ -10624,6 +10866,8 @@ var jaT = {
|
|
|
10624
10866
|
"mcp002.unpinned.fix": '"{package}" \u3092\u78BA\u8A8D\u6E08\u307F\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306B\u56FA\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044(\u4F8B: package@1.2.3)\u3002',
|
|
10625
10867
|
"mcp002.insecureUrl": '\u30B5\u30FC\u30D0\u30FC "{server}" \u304C\u5E73\u6587\u306E HTTP \u3067\u30EA\u30E2\u30FC\u30C8 URL \u306B\u63A5\u7D9A\u3057\u307E\u3059\u3002',
|
|
10626
10868
|
"mcp002.insecureUrl.fix": '"{server}" \u306B\u306F https:// \u306E URL \u3092\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044\u3002',
|
|
10869
|
+
"mcp002.broadAccess": '\u30B5\u30FC\u30D0\u30FC "{server}" \u306B {path} \u304C\u6E21\u3055\u308C\u3001\u30C7\u30A3\u30B9\u30AF\u5168\u4F53\u304B\u30DB\u30FC\u30E0\u30D5\u30A9\u30EB\u30C0\u30FC\u304C\u958B\u304B\u308C\u307E\u3059\u3002',
|
|
10870
|
+
"mcp002.broadAccess.fix": '"{server}" \u306B\u306F\u5FC5\u8981\u306A\u30D5\u30A9\u30EB\u30C0\u30FC\u3060\u3051\u3001\u305F\u3068\u3048\u3070\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30D5\u30A9\u30EB\u30C0\u30FC\u3060\u3051\u3092\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002',
|
|
10627
10871
|
"rule.SEC-001": "\u8A8D\u8A3C\u60C5\u5831\u306E\u30D1\u30BF\u30FC\u30F3",
|
|
10628
10872
|
"rule.SEC-002": "\u6A5F\u5BC6\u30D5\u30A1\u30A4\u30EB",
|
|
10629
10873
|
"sec001.scope": "\u8AAD\u307F\u53D6\u308C\u308B\u30C6\u30AD\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u3001\u3088\u304F\u77E5\u3089\u308C\u305F\u30AD\u30FC\u3084\u30C8\u30FC\u30AF\u30F3\u306E\u5F62\u5F0F\u3092\u63A2\u3057\u307E\u3059\u3002\u5024\u306F\u4F0F\u305B\u3066\u8868\u793A\u3057\u3001\u5916\u90E8\u3067\u78BA\u8A8D\u3059\u308B\u3053\u3068\u306F\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
@@ -10703,16 +10947,17 @@ var zhT = {
|
|
|
10703
10947
|
"arc.reason.capped": "\u53EA\u5217\u51FA\u524D 50 \u4E2A\u7ED3\u679C\u3002",
|
|
10704
10948
|
"arc.reason.listIncomplete": "\u6587\u4EF6\u5217\u8868\u4E0D\u5B8C\u6574\uFF0C\u90E8\u5206\u5BFC\u5165\u65E0\u6CD5\u786E\u8BA4\u3002",
|
|
10705
10949
|
"rule.DUP-001": "\u91CD\u590D\u4EE3\u7801\u5757",
|
|
10706
|
-
"dup001.scope": "\u53BB\u6389\u9996\u5C3E\u7A7A\u767D\u540E\u9010\u884C\u6BD4\u8F83\u6E90\u6587\u4EF6\uFF08JS/TS\u3001Python\u3001Go\u3001Rust\u3001Java\u3001Kotlin\u3001C#\u3001PHP\u3001Ruby\u3001Swift\uFF09\uFF0C\u8DF3\u8FC7\u7A7A\u884C\u3001\u6CE8\u91CA\u548C\u53EA\u6709\u62EC\u53F7\u7684\u884C\u3002\u8FDE\u7EED 6 \u884C\u4EE5\u4E0A\u7684\u6709\u6548\u4EE3\u7801\u89C6\u4E3A\u4E00\u4E2A\u5757\u3002",
|
|
10950
|
+
"dup001.scope": "\u53BB\u6389\u9996\u5C3E\u7A7A\u767D\u540E\u9010\u884C\u6BD4\u8F83\u6E90\u6587\u4EF6\uFF08JS/TS\u3001Python\u3001Go\u3001Rust\u3001Java\u3001Kotlin\u3001C#\u3001PHP\u3001Ruby\u3001Swift\uFF09\uFF0C\u8DF3\u8FC7\u7A7A\u884C\u3001\u6CE8\u91CA\u548C\u53EA\u6709\u62EC\u53F7\u7684\u884C\u3002\u8FDE\u7EED 6 \u884C\u4EE5\u4E0A\u7684\u6709\u6548\u4EE3\u7801\u89C6\u4E3A\u4E00\u4E2A\u5757\u3002\u4E0D\u6BD4\u8F83 import\u3001using\u3001package\u3001namespace \u884C\u548C enum \u6210\u5458\u5217\u8868\uFF0C\u91CD\u53E0\u7684\u91CD\u590D\u53EA\u663E\u793A\u4E00\u6B21\u3002",
|
|
10707
10951
|
"dup001.block": "{lines} \u884C\u6709\u6548\u4EE3\u7801\uFF08\u7B2C {range} \u884C\uFF09\u5728 {copies} \u5904\u91CD\u590D\u3002",
|
|
10952
|
+
"dup001.blockOverlap": "{lines} \u884C\u6709\u6548\u4EE3\u7801\uFF08\u7B2C {range} \u884C\uFF09\u5728 {copies} \u5904\u5168\u90E8\u6216\u90E8\u5206\u91CD\u590D\u3002\u91CD\u53E0\u7684\u91CD\u590D\u53EA\u663E\u793A\u4E00\u6B21\u3002",
|
|
10708
10953
|
"dup001.fix": "\u628A\u516C\u5171\u4EE3\u7801\u63D0\u53D6\u5230\u4E00\u4E2A\u51FD\u6570\u6216\u6A21\u5757\u4E2D\uFF0C\u5728\u8FD9 {copies} \u5904\u8C03\u7528\u3002",
|
|
10709
10954
|
"dup.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\uFF0C\u786E\u8BA4 {path}:{line} \u4E0D\u518D\u51FA\u73B0\u3002",
|
|
10710
10955
|
"dup.reason.noCode": "\u672A\u627E\u5230\u652F\u6301\u7684\u6E90\u6587\u4EF6\u3002",
|
|
10711
10956
|
"dup.reason.capped": "\u53EA\u5217\u51FA\u524D 50 \u4E2A\u91CD\u590D\u4EE3\u7801\u5757\u3002",
|
|
10712
10957
|
"rule.AGT-001": "\u6280\u80FD\u6587\u4EF6\uFF08SKILL.md\uFF09",
|
|
10713
10958
|
"rule.AGT-002": "\u4E92\u76F8\u77DB\u76FE\u7684\u7EA6\u5B9A",
|
|
10714
|
-
"agt001.scope": "\u68C0\u67E5 SKILL.md \u7684 front matter\uFF1A\u662F\u5426\u6709 name \u548C description\uFF0Cname \u662F\u5426\u4E3A\u5C0F\u5199\u52A0\u8FDE\u5B57\u7B26\uFF08\u6700\u591A 64 \u4E2A\u5B57\u7B26\uFF09\
|
|
10715
|
-
"agt002.scope": "\u6BD4\u8F83\u6307\u4EE4\u6587\u4EF6\u4E2D\u4EE5\u82F1\u8BED\u3001\u97E9\u8BED\u3001\u65E5\u8BED\u6216\u4E2D\u6587\u660E\u786E\u5199\u51FA\u7684\u5305\u7BA1\u7406\u5668\uFF08npm\u3001pnpm\u3001yarn\u3001bun\uFF09\u3001\u7F29\u8FDB\uFF08\u7A7A\u683C\u3001\u5236\u8868\u7B26\uFF09\u548C Node.js \u7248\u672C\u89C4\u5219\u3002\u7ED3\u679C\u662F\u5F85\u590D\u6838\u7684\u5019\u9009\u3002",
|
|
10959
|
+
"agt001.scope": "\u68C0\u67E5 SKILL.md \u7684 front matter\uFF1A\u662F\u5426\u6709 name \u548C description\uFF0Cname \u662F\u5426\u4E3A\u5C0F\u5199\u52A0\u8FDE\u5B57\u7B26\u5F62\u5F0F\uFF08\u6700\u591A 64 \u4E2A\u5B57\u7B26\uFF09\u4E14\u4E0E\u6587\u4EF6\u5939\u540C\u540D\uFF0Cdescription \u662F\u5426\u4E0D\u8D85\u8FC7 1024 \u4E2A\u5B57\u7B26\uFF0C\u6B63\u6587\u662F\u5426\u5B58\u5728\uFF0C\u4EE5\u53CA\u770B\u8D77\u6765\u6709\u526F\u4F5C\u7528\u7684\u6280\u80FD\u662F\u5426\u53EF\u80FD\u88AB Claude \u81EA\u884C\u8FD0\u884C\u3002",
|
|
10960
|
+
"agt002.scope": "\u6BD4\u8F83\u6307\u4EE4\u6587\u4EF6\u4E2D\u4EE5\u82F1\u8BED\u3001\u97E9\u8BED\u3001\u65E5\u8BED\u6216\u4E2D\u6587\u660E\u786E\u5199\u51FA\u7684\u5305\u7BA1\u7406\u5668\uFF08npm\u3001pnpm\u3001yarn\u3001bun\uFF09\u3001\u7F29\u8FDB\uFF08\u7A7A\u683C\u3001\u5236\u8868\u7B26\uFF09\u548C Node.js \u7248\u672C\u89C4\u5219\u3002\u5426\u5B9A\u53E5\uFF08\u201C\u4E0D\u8981\u4F7F\u7528 npm\u201D\uFF09\u4E0D\u7B97\u89C4\u5219\uFF1B\u53EA\u9002\u7528\u4E8E\u67D0\u4E2A\u73AF\u5883\u6216\u76EE\u5F55\u7684\u89C4\u5219\u53EA\u4E0E\u540C\u4E00\u73AF\u5883\u6216\u76EE\u5F55\u7684\u89C4\u5219\u6BD4\u8F83\uFF1B\u5728\u6240\u5199\u8303\u56F4\u5185\u7684\u7248\u672C\u89C6\u4E3A\u4E00\u81F4\u3002\u7ED3\u679C\u662F\u5F85\u590D\u6838\u7684\u5019\u9009\u3002",
|
|
10716
10961
|
"agt.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\uFF0C\u786E\u8BA4 {path}:{line} \u4E0D\u518D\u51FA\u73B0\u3002",
|
|
10717
10962
|
"rule.DOC-001": "\u6587\u6863\u4E0E\u9879\u76EE\u4E0D\u4E00\u81F4",
|
|
10718
10963
|
"doc001.scope": "\u628A\u6307\u4EE4\u6587\u4EF6\u548C README \u4E2D\u7684\u547D\u4EE4\u4E0E\u8DEF\u5F84\u540C\u9879\u76EE\u6BD4\u5BF9\uFF1A\u5305\u7BA1\u7406\u5668\u4E0E\u9501\u6587\u4EF6\u3001npm/pnpm/yarn \u811A\u672C\u4E0E package.json\u3001\u4EE3\u7801\u6807\u8BB0\u4E2D\u7684\u6587\u4EF6\u8DEF\u5F84\u4E0E\u6587\u4EF6\u5217\u8868\u3001Docker \u547D\u4EE4\u4E0E Dockerfile \u548C compose \u6587\u4EF6\u3002\u53EA\u62A5\u544A\u786E\u5B9A\u7684\u60C5\u51B5\uFF0C\u8DF3\u8FC7\u793A\u4F8B\u548C\u6761\u4EF6\u53E5\u3002",
|
|
@@ -10740,9 +10985,11 @@ var zhT = {
|
|
|
10740
10985
|
"agt001.longDescription.fix": "\u7F29\u77ED {path} \u7684 description\uFF0C\u628A\u7EC6\u8282\u79FB\u5230\u6B63\u6587\u3002",
|
|
10741
10986
|
"agt001.emptyBody": "{path} \u7684 front matter \u4E4B\u540E\u6CA1\u6709\u6307\u4EE4\u5185\u5BB9\u3002",
|
|
10742
10987
|
"agt001.emptyBody.fix": "\u5728 {path} \u7684\u6B63\u6587\u4E2D\u5199\u51FA\u6280\u80FD\u7684\u6307\u4EE4\u3002",
|
|
10743
|
-
"
|
|
10744
|
-
"
|
|
10745
|
-
"agt002.
|
|
10988
|
+
"agt001.autoSideEffect": "\u6280\u80FD\u201C{name}\u201D\u770B\u8D77\u6765\u6709\u526F\u4F5C\u7528\uFF08{word}\uFF09\uFF0C\u4F46 Claude \u53EF\u80FD\u4F1A\u81EA\u884C\u8FD0\u884C\u5B83\u3002",
|
|
10989
|
+
"agt001.autoSideEffect.fix": '\u5728 {path} \u7684 front matter \u4E2D\u52A0\u5165 "disable-model-invocation: true"\uFF0C\u8BA9\u53EA\u6709\u4EBA\u80FD\u542F\u52A8\u5B83\u3002',
|
|
10990
|
+
"agt002.package-manager": "\u6307\u4EE4\u6587\u4EF6\u4E2D\u5199\u4E86\u4E0D\u540C\u7684\u5305\u7BA1\u7406\u5668\uFF1A{values}\u3002",
|
|
10991
|
+
"agt002.indentation": "\u6307\u4EE4\u6587\u4EF6\u8981\u6C42\u7684\u7F29\u8FDB\u4E0D\u540C\uFF1A{values}\u3002",
|
|
10992
|
+
"agt002.node-version": "\u6307\u4EE4\u6587\u4EF6\u8981\u6C42\u7684 Node.js \u7248\u672C\u4E0D\u4E00\u81F4\uFF1A{values}\u3002",
|
|
10746
10993
|
"agt002.fix": "\u786E\u5B9A\u4E00\u6761 {topic} \u89C4\u5219\uFF0C\u53EA\u5728\u4E00\u4E2A\u5171\u4EAB\u6587\u4EF6\u4E2D\u4FDD\u7559\uFF0C\u5220\u9664\u5176\u4ED6\u5199\u6CD5\u3002",
|
|
10747
10994
|
"rule.DEP-001": "\u4F9D\u8D56\u7248\u672C\u56FA\u5B9A",
|
|
10748
10995
|
"rule.DEP-002": "\u5DF2\u77E5\u6F0F\u6D1E\uFF08OSV\uFF09",
|
|
@@ -10759,7 +11006,7 @@ var zhT = {
|
|
|
10759
11006
|
"rule.MCP-001": "MCP \u914D\u7F6E\u7ED3\u6784",
|
|
10760
11007
|
"rule.MCP-002": "\u6709\u98CE\u9669\u7684 MCP \u8BBE\u7F6E",
|
|
10761
11008
|
"mcp001.scope": "\u4EC5\u4EE5\u6570\u636E\u65B9\u5F0F\u8BFB\u53D6 MCP \u5BA2\u6237\u7AEF\u914D\u7F6E\uFF08Claude Code .mcp.json\u3001Cursor\u3001VS Code\u3001Gemini CLI\u3001Claude Desktop\u3001Codex config.toml\uFF09\uFF0C\u68C0\u67E5\u5FC5\u586B\u9879\u548C\u7C7B\u578B\u3002\u4E0D\u4F1A\u542F\u52A8\u4EFB\u4F55\u670D\u52A1\u5668\u3002",
|
|
10762
|
-
"mcp002.scope": "\u67E5\u627E\
|
|
11009
|
+
"mcp002.scope": "\u67E5\u627E\u5199\u5728\u914D\u7F6E\u91CC\u7684\u5BC6\u94A5\u3001Shell \u7BA1\u9053\u6267\u884C\u3001\u7279\u6743\u547D\u4EE4\u3001\u672A\u56FA\u5B9A\u7248\u672C\u7684\u81EA\u52A8\u5B89\u88C5\u3001\u660E\u6587 HTTP \u8FDC\u7A0B\u5730\u5740\uFF0C\u4EE5\u53CA\u5F00\u653E\u6574\u4E2A\u78C1\u76D8\u6216\u4E3B\u76EE\u5F55\u7684\u670D\u52A1\u5668\u3002",
|
|
10763
11010
|
"mcp.reason.none": "\u672A\u627E\u5230 MCP \u914D\u7F6E\u6587\u4EF6\u3002",
|
|
10764
11011
|
"mcp.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\uFF0C\u786E\u8BA4 {path}:{line} \u4E0D\u518D\u51FA\u73B0\u3002",
|
|
10765
11012
|
"mcp001.parse": "\u65E0\u6CD5\u5C06 {path} \u89E3\u6790\u4E3A JSON\u3002",
|
|
@@ -10782,6 +11029,8 @@ var zhT = {
|
|
|
10782
11029
|
"mcp002.unpinned.fix": '\u5C06 "{package}" \u56FA\u5B9A\u5230\u5DF2\u5BA1\u67E5\u7684\u7248\u672C\uFF08\u4F8B\u5982 package@1.2.3\uFF09\u3002',
|
|
10783
11030
|
"mcp002.insecureUrl": '\u670D\u52A1\u5668 "{server}" \u901A\u8FC7\u660E\u6587 HTTP \u8FDE\u63A5\u8FDC\u7A0B\u5730\u5740\u3002',
|
|
10784
11031
|
"mcp002.insecureUrl.fix": '"{server}" \u8BF7\u4F7F\u7528 https:// \u5730\u5740\u3002',
|
|
11032
|
+
"mcp002.broadAccess": "\u670D\u52A1\u5668\u201C{server}\u201D\u6536\u5230\u4E86 {path}\uFF0C\u4F1A\u5F00\u653E\u6574\u4E2A\u78C1\u76D8\u6216\u4E3B\u76EE\u5F55\u3002",
|
|
11033
|
+
"mcp002.broadAccess.fix": "\u53EA\u628A\u201C{server}\u201D\u9700\u8981\u7684\u6587\u4EF6\u5939\u4EA4\u7ED9\u5B83\uFF0C\u4F8B\u5982\u9879\u76EE\u6587\u4EF6\u5939\u3002",
|
|
10785
11034
|
"rule.SEC-001": "\u51ED\u636E\u6A21\u5F0F",
|
|
10786
11035
|
"rule.SEC-002": "\u654F\u611F\u6587\u4EF6",
|
|
10787
11036
|
"sec001.scope": "\u5728\u53EF\u8BFB\u53D6\u7684\u6587\u672C\u6587\u4EF6\u4E2D\u67E5\u627E\u5E38\u89C1\u7684\u5BC6\u94A5\u548C\u4EE4\u724C\u683C\u5F0F\u3002\u503C\u4F1A\u88AB\u906E\u76D6\uFF0C\u4E5F\u4E0D\u4F1A\u53D1\u9001\u5230\u5916\u90E8\u9A8C\u8BC1\u3002",
|
|
@@ -10799,14 +11048,300 @@ var zhT = {
|
|
|
10799
11048
|
"sec002.fix.share": "\u5206\u4EAB ZIP \u65F6\u6392\u9664 {path}\uFF0C\u6216\u786E\u8BA4\u5176\u4E2D\u6CA1\u6709\u771F\u5B9E\u7684\u673A\u5BC6\u4FE1\u606F\u3002"
|
|
10800
11049
|
};
|
|
10801
11050
|
|
|
11051
|
+
// ../core/src/i18n/messages-cli.ts
|
|
11052
|
+
var enC = {
|
|
11053
|
+
"cli.header": "RepoRefit \xB7 {tool} \xB7 {read} files read of {listed} listed \xB7 {seconds}s",
|
|
11054
|
+
"cli.summary": "{findings} findings (high {high}, medium {medium}, low {low}, info {info}) \xB7 {passed}/{evaluated} checks passed",
|
|
11055
|
+
"cli.partial": "Partial scan: {reasons}",
|
|
11056
|
+
"cli.partialUnknown": "some files were not read.",
|
|
11057
|
+
"cli.symlinks": "Skipped {count} symbolic links (never followed).",
|
|
11058
|
+
"cli.ruleDetails": "Rule details: {url}",
|
|
11059
|
+
"cli.wroteReport": "Wrote {md} and {json}",
|
|
11060
|
+
"cli.wroteBadge": "Wrote {file}.",
|
|
11061
|
+
"cli.badgeReadme": "README (at the top of the checked folder): {snippet}",
|
|
11062
|
+
"cli.badgeOutside": "The badge is outside the checked folder ({folder}). Copy it into the repository, then link it from the README with a relative path.",
|
|
11063
|
+
"cli.cannotRead": "Cannot read {path}: {reason}",
|
|
11064
|
+
"cli.cannotWrite": "Cannot write {path}: {reason}",
|
|
11065
|
+
"cli.cannotCreate": "Cannot create the folder {path}: {reason}",
|
|
11066
|
+
"cli.reportIsFile": "Cannot write the report to {path}: it is a file. --out for report names a folder.",
|
|
11067
|
+
"cli.reason.notFound": "folder not found",
|
|
11068
|
+
"cli.reason.notFolder": "not a folder",
|
|
11069
|
+
"cli.reason.permission": "permission denied",
|
|
11070
|
+
"cli.reason.fileInPath": "part of the path is a file, not a folder",
|
|
11071
|
+
"cli.reason.isFolder": "it is a folder",
|
|
11072
|
+
"cli.reason.missingPath": "the path does not exist (check the drive or the folder name)",
|
|
11073
|
+
"cli.reason.diskFull": "no space left on the disk",
|
|
11074
|
+
"cli.reason.readOnly": "read-only file system",
|
|
11075
|
+
"cli.reason.tooLong": "the path is too long",
|
|
11076
|
+
"cli.compare.title": "RepoRefit compare \xB7 {tool}",
|
|
11077
|
+
"cli.compare.rule": "rule",
|
|
11078
|
+
"cli.compare.before": "before",
|
|
11079
|
+
"cli.compare.after": "after",
|
|
11080
|
+
"cli.compare.total": "total",
|
|
11081
|
+
"cli.compare.tokens": "Estimated tokens of the instruction files each agent reads at the project root (/):",
|
|
11082
|
+
"cli.compare.tokenLine": "{agent}: {before} -> {after} ({delta} tokens, {change})",
|
|
11083
|
+
"cli.compare.fewer": "{percent}% fewer",
|
|
11084
|
+
"cli.compare.more": "{percent}% more",
|
|
11085
|
+
"cli.compare.underOne": "under 1%",
|
|
11086
|
+
"cli.compare.same": "no change",
|
|
11087
|
+
"cli.compare.noRate": "no rate: the original had 0 tokens",
|
|
11088
|
+
"cli.compare.notComparable": "{agent}: not comparable (instruction files missing, conditional or partly read)",
|
|
11089
|
+
"cli.compare.noAgents": "No agent reads instruction files at / in either copy.",
|
|
11090
|
+
"cli.compare.limits": "Instruction files only: conversation, output, caching and actual charges are not included.",
|
|
11091
|
+
"cli.keep.title": "Rule preservation (string and structure checks only; a reworded rule goes to review, never counted as kept):",
|
|
11092
|
+
"cli.keep.none": "No instruction files in the original.",
|
|
11093
|
+
"cli.keep.line": "{agent} at /: {units} rules ({mandatory} mandatory), kept {kept}, probably the same {estimated}, review {review} (fixed tokens changed {fixed}), possible losses {missing}, out of scope {scope}, duplicates removed {duplicates}, new {added} -> {verdict}",
|
|
11094
|
+
"cli.keep.verdict.clean": "no loss found in the checked scope",
|
|
11095
|
+
"cli.keep.verdict.estimated": "no loss found; reworded rules look the same (estimate), read them once",
|
|
11096
|
+
"cli.keep.verdict.unknown": "cannot judge ({reasons})",
|
|
11097
|
+
"cli.keep.verdict.review": "review the revised copy",
|
|
11098
|
+
"cli.keep.grade.estimated": "probably the same",
|
|
11099
|
+
"cli.keep.grade.review": "review",
|
|
11100
|
+
"cli.keep.grade.missing": "possible loss",
|
|
11101
|
+
"cli.keep.grade.scope": "out of scope",
|
|
11102
|
+
"cli.keep.reason.reworded": "reworded",
|
|
11103
|
+
"cli.keep.reason.fixedChanged": "fixed tokens changed",
|
|
11104
|
+
"cli.keep.reason.outOfScope": "no longer read here",
|
|
11105
|
+
"cli.keep.unknown.partial": "partial scan",
|
|
11106
|
+
"cli.keep.unknown.unread": "unread files",
|
|
11107
|
+
"cli.keep.mandatory": "mandatory",
|
|
11108
|
+
"cli.keep.more": "\u2026 {count} more",
|
|
11109
|
+
"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.",
|
|
11110
|
+
"cli.keep.notVerified": "Not compared in these files: {code} code blocks, {html} HTML blocks, {images} images.",
|
|
11111
|
+
"cli.docs.title": "Requirements in other documents (README, docs/ and other Markdown no agent loads):",
|
|
11112
|
+
"cli.docs.none": "None of the {documents} other documents was removed or changed.",
|
|
11113
|
+
"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}",
|
|
11114
|
+
"cli.docs.verdict.clean": "no loss found in the compared text (this does not prove the meaning is kept)",
|
|
11115
|
+
"cli.docs.verdict.estimated": "no loss found; reworded units look the same (estimate), read them once",
|
|
11116
|
+
"cli.docs.verdict.review": "review these units in the revised copy",
|
|
11117
|
+
"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.",
|
|
11118
|
+
"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.",
|
|
11119
|
+
"cli.links.title": "Links the edit broke (they resolved in the original):",
|
|
11120
|
+
"cli.docs.removed": "{path} (removed): {units} units, kept {kept}, probably the same {estimated}, review {review}, possible losses {missing}",
|
|
11121
|
+
"cli.docs.changed": "{path} (changed): {units} units, kept {kept}, probably the same {estimated}, review {review}, possible losses {missing}"
|
|
11122
|
+
};
|
|
11123
|
+
var koC = {
|
|
11124
|
+
"cli.header": "RepoRefit \xB7 {tool} \xB7 \uD30C\uC77C {listed}\uAC1C \uC911 {read}\uAC1C \uC77D\uC74C \xB7 {seconds}\uCD08",
|
|
11125
|
+
"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",
|
|
11126
|
+
"cli.partial": "\uBD80\uBD84 \uAC80\uC0AC: {reasons}",
|
|
11127
|
+
"cli.partialUnknown": "\uC77C\uBD80 \uD30C\uC77C\uC744 \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
|
|
11128
|
+
"cli.symlinks": "\uC2EC\uBCFC\uB9AD \uB9C1\uD06C {count}\uAC1C\uB294 \uB530\uB77C\uAC00\uC9C0 \uC54A\uACE0 \uAC74\uB108\uB6F0\uC5C8\uC2B5\uB2C8\uB2E4.",
|
|
11129
|
+
"cli.ruleDetails": "\uADDC\uCE59 \uC124\uBA85: {url}",
|
|
11130
|
+
"cli.wroteReport": "{md}, {json} \uD30C\uC77C\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",
|
|
11131
|
+
"cli.wroteBadge": "{file} \uD30C\uC77C\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",
|
|
11132
|
+
"cli.badgeReadme": "README(\uAC80\uC0AC\uD55C \uD3F4\uB354 \uB9E8 \uC704)\uC5D0 \uB123\uC744 \uB0B4\uC6A9: {snippet}",
|
|
11133
|
+
"cli.badgeOutside": "\uBC30\uC9C0\uAC00 \uAC80\uC0AC\uD55C \uD3F4\uB354({folder}) \uBC16\uC5D0 \uC788\uC2B5\uB2C8\uB2E4. \uC800\uC7A5\uC18C \uC548\uC73C\uB85C \uBCF5\uC0AC\uD55C \uB4A4 README\uC5D0\uC11C \uC0C1\uB300 \uACBD\uB85C\uB85C \uC5F0\uACB0\uD558\uC138\uC694.",
|
|
11134
|
+
"cli.cannotRead": "{path}\uC744(\uB97C) \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: {reason}",
|
|
11135
|
+
"cli.cannotWrite": "{path}\uC5D0 \uC800\uC7A5\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: {reason}",
|
|
11136
|
+
"cli.cannotCreate": "{path} \uD3F4\uB354\uB97C \uB9CC\uB4E4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: {reason}",
|
|
11137
|
+
"cli.reportIsFile": "{path}\uC5D0 \uBCF4\uACE0\uC11C\uB97C \uC800\uC7A5\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: \uD30C\uC77C\uC785\uB2C8\uB2E4. report\uC758 --out\uC5D0\uB294 \uD3F4\uB354\uB97C \uC9C0\uC815\uD558\uC138\uC694.",
|
|
11138
|
+
"cli.reason.notFound": "\uD3F4\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
11139
|
+
"cli.reason.notFolder": "\uD3F4\uB354\uAC00 \uC544\uB2D9\uB2C8\uB2E4",
|
|
11140
|
+
"cli.reason.permission": "\uAD8C\uD55C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
11141
|
+
"cli.reason.fileInPath": "\uACBD\uB85C \uC911\uAC04\uC5D0 \uD3F4\uB354\uAC00 \uC544\uB2CC \uD30C\uC77C\uC774 \uC788\uC2B5\uB2C8\uB2E4",
|
|
11142
|
+
"cli.reason.isFolder": "\uD3F4\uB354\uC785\uB2C8\uB2E4",
|
|
11143
|
+
"cli.reason.missingPath": "\uACBD\uB85C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4(\uB4DC\uB77C\uC774\uBE0C\uB098 \uD3F4\uB354 \uC774\uB984\uC744 \uD655\uC778\uD558\uC138\uC694)",
|
|
11144
|
+
"cli.reason.diskFull": "\uB514\uC2A4\uD06C \uACF5\uAC04\uC774 \uBD80\uC871\uD569\uB2C8\uB2E4",
|
|
11145
|
+
"cli.reason.readOnly": "\uC77D\uAE30 \uC804\uC6A9 \uD30C\uC77C \uC2DC\uC2A4\uD15C\uC785\uB2C8\uB2E4",
|
|
11146
|
+
"cli.reason.tooLong": "\uACBD\uB85C\uAC00 \uB108\uBB34 \uAE41\uB2C8\uB2E4",
|
|
11147
|
+
"cli.compare.title": "RepoRefit \uBE44\uAD50 \xB7 {tool}",
|
|
11148
|
+
"cli.compare.rule": "\uADDC\uCE59",
|
|
11149
|
+
"cli.compare.before": "\uC6D0\uBCF8",
|
|
11150
|
+
"cli.compare.after": "\uC218\uC815\uBCF8",
|
|
11151
|
+
"cli.compare.total": "\uD569\uACC4",
|
|
11152
|
+
"cli.compare.tokens": "\uC5D0\uC774\uC804\uD2B8\uBCC4\uB85C \uD504\uB85C\uC81D\uD2B8 \uB9E8 \uC704(/)\uC5D0\uC11C \uC77D\uB294 \uC9C0\uC2DC \uD30C\uC77C\uC758 \uC608\uC0C1 \uD1A0\uD070:",
|
|
11153
|
+
"cli.compare.tokenLine": "{agent}: {before} -> {after} ({delta}\uD1A0\uD070, {change})",
|
|
11154
|
+
"cli.compare.fewer": "{percent}% \uAC10\uC18C",
|
|
11155
|
+
"cli.compare.more": "{percent}% \uC99D\uAC00",
|
|
11156
|
+
"cli.compare.underOne": "1% \uBBF8\uB9CC",
|
|
11157
|
+
"cli.compare.same": "\uBCC0\uD654 \uC5C6\uC74C",
|
|
11158
|
+
"cli.compare.noRate": "\uC6D0\uBCF8\uC774 0\uD1A0\uD070\uC774\uB77C \uBE44\uC728 \uC5C6\uC74C",
|
|
11159
|
+
"cli.compare.notComparable": "{agent}: \uBE44\uAD50\uD560 \uC218 \uC5C6\uC74C(\uC9C0\uC2DC \uD30C\uC77C\uC774 \uC5C6\uAC70\uB098, \uC870\uAC74\uBD80\uC774\uAC70\uB098, \uC77C\uBD80\uB9CC \uC77D\uC74C)",
|
|
11160
|
+
"cli.compare.noAgents": "\uB450 \uBC84\uC804 \uBAA8\uB450 /\uC5D0\uC11C \uC9C0\uC2DC \uD30C\uC77C\uC744 \uC77D\uB294 \uC5D0\uC774\uC804\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
11161
|
+
"cli.compare.limits": "\uC9C0\uC2DC \uD30C\uC77C\uB9CC \uC149\uB2C8\uB2E4. \uB300\uD654 \uB0B4\uC6A9, AI\uC758 \uB2F5\uBCC0, \uCE90\uC2DC\uC640 \uC2E4\uC81C \uC694\uAE08\uC740 \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
11162
|
+
"cli.keep.title": "\uADDC\uCE59 \uBCF4\uC874(\uBB38\uC790\uC5F4\xB7\uAD6C\uC870 \uBE44\uAD50\uB9CC, \uBC14\uAFD4 \uC4F4 \uADDC\uCE59\uC740 \uBCF4\uC874\uC73C\uB85C \uC138\uC9C0 \uC54A\uACE0 \uAC80\uD1A0\uB85C \uBCF4\uB0C4):",
|
|
11163
|
+
"cli.keep.none": "\uC6D0\uBCF8\uC5D0 \uC9C0\uC2DC \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
11164
|
+
"cli.keep.line": "{agent}, /: \uADDC\uCE59 {units}\uAC1C(\uD544\uC218 {mandatory}\uAC1C), \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}, \uBC94\uC704 \uBC16 {scope}, \uC911\uBCF5 \uC81C\uAC70 {duplicates}, \uC0C8 \uADDC\uCE59 {added} -> {verdict}",
|
|
11165
|
+
"cli.keep.verdict.clean": "\uD655\uC778\uD55C \uBC94\uC704\uC5D0\uC11C \uC783\uC740 \uADDC\uCE59 \uC5C6\uC74C",
|
|
11166
|
+
"cli.keep.verdict.estimated": "\uC783\uC740 \uADDC\uCE59 \uC5C6\uC74C. \uBC14\uAFD4 \uC4F4 \uADDC\uCE59\uC740 \uAC19\uC544 \uBCF4\uC774\uB2C8(\uCD94\uC815) \uD55C \uBC88 \uC77D\uC5B4 \uBCF4\uC138\uC694",
|
|
11167
|
+
"cli.keep.verdict.unknown": "\uD310\uB2E8\uD560 \uC218 \uC5C6\uC74C({reasons})",
|
|
11168
|
+
"cli.keep.verdict.review": "\uC218\uC815\uBCF8\uC744 \uAC80\uD1A0\uD558\uC138\uC694",
|
|
11169
|
+
"cli.keep.grade.estimated": "\uAC19\uC544 \uBCF4\uC784",
|
|
11170
|
+
"cli.keep.grade.review": "\uAC80\uD1A0",
|
|
11171
|
+
"cli.keep.grade.missing": "\uC0AC\uB77C\uC84C\uC744 \uC218 \uC788\uC74C",
|
|
11172
|
+
"cli.keep.grade.scope": "\uBC94\uC704 \uBC16",
|
|
11173
|
+
"cli.keep.reason.reworded": "\uBC14\uAFD4 \uC500",
|
|
11174
|
+
"cli.keep.reason.fixedChanged": "\uACE0\uC815 \uD1A0\uD070 \uBCC0\uACBD",
|
|
11175
|
+
"cli.keep.reason.outOfScope": "\uC5EC\uAE30\uC11C\uB294 \uB354 \uC774\uC0C1 \uC77D\uC9C0 \uC54A\uC74C",
|
|
11176
|
+
"cli.keep.unknown.partial": "\uBD80\uBD84 \uAC80\uC0AC",
|
|
11177
|
+
"cli.keep.unknown.unread": "\uC77D\uC9C0 \uBABB\uD55C \uD30C\uC77C",
|
|
11178
|
+
"cli.keep.mandatory": "\uD544\uC218",
|
|
11179
|
+
"cli.keep.more": "\u2026 {count}\uAC1C \uB354",
|
|
11180
|
+
"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.",
|
|
11181
|
+
"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.",
|
|
11182
|
+
"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):",
|
|
11183
|
+
"cli.docs.none": "\uB2E4\uB978 \uBB38\uC11C {documents}\uAC1C \uC911 \uC9C0\uC6B0\uAC70\uB098 \uBC14\uAFBC \uBB38\uC11C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
11184
|
+
"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}",
|
|
11185
|
+
"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)",
|
|
11186
|
+
"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",
|
|
11187
|
+
"cli.docs.verdict.review": "\uC218\uC815\uBCF8\uC5D0\uC11C \uC774 \uB2E8\uC704\uB4E4\uC744 \uAC80\uD1A0\uD558\uC138\uC694",
|
|
11188
|
+
"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.",
|
|
11189
|
+
"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.",
|
|
11190
|
+
"cli.links.title": "\uC218\uC815\uC73C\uB85C \uAE68\uC9C4 \uB9C1\uD06C(\uC6D0\uBCF8\uC5D0\uC11C\uB294 \uC5F4\uB838\uB358 \uB9C1\uD06C):",
|
|
11191
|
+
"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}",
|
|
11192
|
+
"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}"
|
|
11193
|
+
};
|
|
11194
|
+
var jaC = {
|
|
11195
|
+
"cli.header": "RepoRefit \xB7 {tool} \xB7 {listed} \u4EF6\u4E2D {read} \u4EF6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u307F \xB7 {seconds} \u79D2",
|
|
11196
|
+
"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",
|
|
11197
|
+
"cli.partial": "\u90E8\u5206\u7684\u306A\u691C\u67FB: {reasons}",
|
|
11198
|
+
"cli.partialUnknown": "\u4E00\u90E8\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
11199
|
+
"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",
|
|
11200
|
+
"cli.ruleDetails": "\u30EB\u30FC\u30EB\u306E\u8AAC\u660E: {url}",
|
|
11201
|
+
"cli.wroteReport": "{md} \u3068 {json} \u3092\u66F8\u304D\u51FA\u3057\u307E\u3057\u305F\u3002",
|
|
11202
|
+
"cli.wroteBadge": "{file} \u3092\u66F8\u304D\u51FA\u3057\u307E\u3057\u305F\u3002",
|
|
11203
|
+
"cli.badgeReadme": "README(\u691C\u67FB\u3057\u305F\u30D5\u30A9\u30EB\u30C0\u30FC\u306E\u6700\u4E0A\u4F4D)\u306B\u5165\u308C\u308B\u5185\u5BB9: {snippet}",
|
|
11204
|
+
"cli.badgeOutside": "\u30D0\u30C3\u30B8\u306F\u691C\u67FB\u3057\u305F\u30D5\u30A9\u30EB\u30C0\u30FC({folder})\u306E\u5916\u306B\u3042\u308A\u307E\u3059\u3002\u30EA\u30DD\u30B8\u30C8\u30EA\u5185\u306B\u30B3\u30D4\u30FC\u3057\u3066\u304B\u3089\u3001README \u304B\u3089\u76F8\u5BFE\u30D1\u30B9\u3067\u30EA\u30F3\u30AF\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
11205
|
+
"cli.cannotRead": "{path} \u3092\u8AAD\u3081\u307E\u305B\u3093: {reason}",
|
|
11206
|
+
"cli.cannotWrite": "{path} \u306B\u66F8\u304D\u8FBC\u3081\u307E\u305B\u3093: {reason}",
|
|
11207
|
+
"cli.cannotCreate": "\u30D5\u30A9\u30EB\u30C0\u30FC {path} \u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: {reason}",
|
|
11208
|
+
"cli.reportIsFile": "{path} \u306B\u30EC\u30DD\u30FC\u30C8\u3092\u66F8\u304D\u8FBC\u3081\u307E\u305B\u3093: \u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002report \u306E --out \u306B\u306F\u30D5\u30A9\u30EB\u30C0\u30FC\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
11209
|
+
"cli.reason.notFound": "\u30D5\u30A9\u30EB\u30C0\u30FC\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
11210
|
+
"cli.reason.notFolder": "\u30D5\u30A9\u30EB\u30C0\u30FC\u3067\u306F\u3042\u308A\u307E\u305B\u3093",
|
|
11211
|
+
"cli.reason.permission": "\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
11212
|
+
"cli.reason.fileInPath": "\u30D1\u30B9\u306E\u9014\u4E2D\u306B\u30D5\u30A9\u30EB\u30C0\u30FC\u3067\u306F\u306A\u304F\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u3059",
|
|
11213
|
+
"cli.reason.isFolder": "\u30D5\u30A9\u30EB\u30C0\u30FC\u3067\u3059",
|
|
11214
|
+
"cli.reason.missingPath": "\u30D1\u30B9\u304C\u3042\u308A\u307E\u305B\u3093(\u30C9\u30E9\u30A4\u30D6\u3084\u30D5\u30A9\u30EB\u30C0\u30FC\u540D\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044)",
|
|
11215
|
+
"cli.reason.diskFull": "\u30C7\u30A3\u30B9\u30AF\u306E\u7A7A\u304D\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
11216
|
+
"cli.reason.readOnly": "\u8AAD\u307F\u53D6\u308A\u5C02\u7528\u306E\u30D5\u30A1\u30A4\u30EB\u30B7\u30B9\u30C6\u30E0\u3067\u3059",
|
|
11217
|
+
"cli.reason.tooLong": "\u30D1\u30B9\u304C\u9577\u3059\u304E\u307E\u3059",
|
|
11218
|
+
"cli.compare.title": "RepoRefit \u6BD4\u8F03 \xB7 {tool}",
|
|
11219
|
+
"cli.compare.rule": "\u30EB\u30FC\u30EB",
|
|
11220
|
+
"cli.compare.before": "\u5143",
|
|
11221
|
+
"cli.compare.after": "\u4FEE\u6B63\u7248",
|
|
11222
|
+
"cli.compare.total": "\u5408\u8A08",
|
|
11223
|
+
"cli.compare.tokens": "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3054\u3068\u306B\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u6700\u4E0A\u4F4D(/)\u3067\u8AAD\u3080\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u306E\u63A8\u5B9A\u30C8\u30FC\u30AF\u30F3:",
|
|
11224
|
+
"cli.compare.tokenLine": "{agent}: {before} -> {after}({delta} \u30C8\u30FC\u30AF\u30F3\u3001{change})",
|
|
11225
|
+
"cli.compare.fewer": "{percent}% \u6E1B\u5C11",
|
|
11226
|
+
"cli.compare.more": "{percent}% \u5897\u52A0",
|
|
11227
|
+
"cli.compare.underOne": "1% \u672A\u6E80",
|
|
11228
|
+
"cli.compare.same": "\u5909\u5316\u306A\u3057",
|
|
11229
|
+
"cli.compare.noRate": "\u5143\u304C 0 \u30C8\u30FC\u30AF\u30F3\u306E\u305F\u3081\u5272\u5408\u306A\u3057",
|
|
11230
|
+
"cli.compare.notComparable": "{agent}: \u6BD4\u8F03\u3067\u304D\u307E\u305B\u3093(\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u304C\u306A\u3044\u3001\u6761\u4EF6\u4ED8\u304D\u3001\u307E\u305F\u306F\u4E00\u90E8\u3060\u3051\u8AAD\u307F\u8FBC\u307F)",
|
|
11231
|
+
"cli.compare.noAgents": "\u3069\u3061\u3089\u306E\u7248\u3067\u3082\u3001/ \u3067\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3080\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306F\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
11232
|
+
"cli.compare.limits": "\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u3060\u3051\u3092\u6570\u3048\u307E\u3059\u3002\u4F1A\u8A71\u3001AI \u306E\u51FA\u529B\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u3001\u5B9F\u969B\u306E\u6599\u91D1\u306F\u542B\u307F\u307E\u305B\u3093\u3002",
|
|
11233
|
+
"cli.keep.title": "\u30EB\u30FC\u30EB\u306E\u4FDD\u6301(\u6587\u5B57\u5217\u3068\u69CB\u9020\u306E\u6BD4\u8F03\u306E\u307F\u3002\u8A00\u3044\u63DB\u3048\u305F\u30EB\u30FC\u30EB\u306F\u4FDD\u6301\u306B\u6570\u3048\u305A\u78BA\u8A8D\u306B\u56DE\u3057\u307E\u3059):",
|
|
11234
|
+
"cli.keep.none": "\u5143\u306E\u7248\u306B\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
11235
|
+
"cli.keep.line": "{agent}\u3001/: \u30EB\u30FC\u30EB {units} \u4EF6(\u5FC5\u9808 {mandatory} \u4EF6)\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}\u3001\u7BC4\u56F2\u5916 {scope}\u3001\u91CD\u8907\u524A\u9664 {duplicates}\u3001\u65B0\u898F {added} -> {verdict}",
|
|
11236
|
+
"cli.keep.verdict.clean": "\u78BA\u8A8D\u3057\u305F\u7BC4\u56F2\u3067\u5931\u308F\u308C\u305F\u30EB\u30FC\u30EB\u306F\u3042\u308A\u307E\u305B\u3093",
|
|
11237
|
+
"cli.keep.verdict.estimated": "\u5931\u308F\u308C\u305F\u30EB\u30FC\u30EB\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u8A00\u3044\u63DB\u3048\u305F\u30EB\u30FC\u30EB\u306F\u540C\u3058\u306B\u898B\u3048\u307E\u3059(\u63A8\u5B9A)\u3002\u4E00\u5EA6\u8AAD\u3093\u3067\u304F\u3060\u3055\u3044",
|
|
11238
|
+
"cli.keep.verdict.unknown": "\u5224\u65AD\u3067\u304D\u307E\u305B\u3093({reasons})",
|
|
11239
|
+
"cli.keep.verdict.review": "\u4FEE\u6B63\u7248\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
11240
|
+
"cli.keep.grade.estimated": "\u540C\u3058\u306B\u898B\u3048\u308B",
|
|
11241
|
+
"cli.keep.grade.review": "\u78BA\u8A8D",
|
|
11242
|
+
"cli.keep.grade.missing": "\u5931\u308F\u308C\u305F\u53EF\u80FD\u6027",
|
|
11243
|
+
"cli.keep.grade.scope": "\u7BC4\u56F2\u5916",
|
|
11244
|
+
"cli.keep.reason.reworded": "\u8A00\u3044\u63DB\u3048",
|
|
11245
|
+
"cli.keep.reason.fixedChanged": "\u56FA\u5B9A\u30C8\u30FC\u30AF\u30F3\u5909\u66F4",
|
|
11246
|
+
"cli.keep.reason.outOfScope": "\u3053\u3053\u3067\u306F\u8AAD\u307E\u308C\u306A\u304F\u306A\u3063\u305F",
|
|
11247
|
+
"cli.keep.unknown.partial": "\u90E8\u5206\u7684\u306A\u691C\u67FB",
|
|
11248
|
+
"cli.keep.unknown.unread": "\u8AAD\u3081\u306A\u3044\u30D5\u30A1\u30A4\u30EB",
|
|
11249
|
+
"cli.keep.mandatory": "\u5FC5\u9808",
|
|
11250
|
+
"cli.keep.more": "\u2026 \u307B\u304B {count} \u4EF6",
|
|
11251
|
+
"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",
|
|
11252
|
+
"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",
|
|
11253
|
+
"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):",
|
|
11254
|
+
"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",
|
|
11255
|
+
"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}",
|
|
11256
|
+
"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)",
|
|
11257
|
+
"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",
|
|
11258
|
+
"cli.docs.verdict.review": "\u4FEE\u6B63\u7248\u3067\u3053\u308C\u3089\u306E\u5358\u4F4D\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
11259
|
+
"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",
|
|
11260
|
+
"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",
|
|
11261
|
+
"cli.links.title": "\u4FEE\u6B63\u3067\u58CA\u308C\u305F\u30EA\u30F3\u30AF(\u5143\u306E\u7248\u3067\u306F\u958B\u3051\u305F\u3082\u306E):",
|
|
11262
|
+
"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}",
|
|
11263
|
+
"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}"
|
|
11264
|
+
};
|
|
11265
|
+
var zhC = {
|
|
11266
|
+
"cli.header": "RepoRefit \xB7 {tool} \xB7 \u5DF2\u8BFB\u53D6 {listed} \u4E2A\u6587\u4EF6\u4E2D\u7684 {read} \u4E2A \xB7 {seconds} \u79D2",
|
|
11267
|
+
"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",
|
|
11268
|
+
"cli.partial": "\u90E8\u5206\u68C0\u67E5\uFF1A{reasons}",
|
|
11269
|
+
"cli.partialUnknown": "\u6709\u4E9B\u6587\u4EF6\u672A\u80FD\u8BFB\u53D6\u3002",
|
|
11270
|
+
"cli.symlinks": "\u5DF2\u8DF3\u8FC7 {count} \u4E2A\u7B26\u53F7\u94FE\u63A5\uFF08\u4ECE\u4E0D\u8DDF\u968F\uFF09\u3002",
|
|
11271
|
+
"cli.ruleDetails": "\u89C4\u5219\u8BF4\u660E\uFF1A{url}",
|
|
11272
|
+
"cli.wroteReport": "\u5DF2\u5199\u5165 {md} \u548C {json}",
|
|
11273
|
+
"cli.wroteBadge": "\u5DF2\u5199\u5165 {file}\u3002",
|
|
11274
|
+
"cli.badgeReadme": "README\uFF08\u4F4D\u4E8E\u6240\u68C0\u67E5\u6587\u4EF6\u5939\u7684\u9876\u5C42\uFF09\u4E2D\u52A0\u5165\uFF1A{snippet}",
|
|
11275
|
+
"cli.badgeOutside": "\u5FBD\u7AE0\u4F4D\u4E8E\u6240\u68C0\u67E5\u7684\u6587\u4EF6\u5939\uFF08{folder}\uFF09\u4E4B\u5916\u3002\u8BF7\u5148\u590D\u5236\u5230\u4ED3\u5E93\u5185\uFF0C\u518D\u5728 README \u4E2D\u7528\u76F8\u5BF9\u8DEF\u5F84\u94FE\u63A5\u3002",
|
|
11276
|
+
"cli.cannotRead": "\u65E0\u6CD5\u8BFB\u53D6 {path}\uFF1A{reason}",
|
|
11277
|
+
"cli.cannotWrite": "\u65E0\u6CD5\u5199\u5165 {path}\uFF1A{reason}",
|
|
11278
|
+
"cli.cannotCreate": "\u65E0\u6CD5\u521B\u5EFA\u6587\u4EF6\u5939 {path}\uFF1A{reason}",
|
|
11279
|
+
"cli.reportIsFile": "\u65E0\u6CD5\u628A\u62A5\u544A\u5199\u5165 {path}\uFF1A\u5B83\u662F\u6587\u4EF6\u3002report \u7684 --out \u5E94\u6307\u5B9A\u6587\u4EF6\u5939\u3002",
|
|
11280
|
+
"cli.reason.notFound": "\u6587\u4EF6\u5939\u4E0D\u5B58\u5728",
|
|
11281
|
+
"cli.reason.notFolder": "\u4E0D\u662F\u6587\u4EF6\u5939",
|
|
11282
|
+
"cli.reason.permission": "\u6CA1\u6709\u6743\u9650",
|
|
11283
|
+
"cli.reason.fileInPath": "\u8DEF\u5F84\u4E2D\u6709\u4E00\u90E8\u5206\u662F\u6587\u4EF6\u800C\u4E0D\u662F\u6587\u4EF6\u5939",
|
|
11284
|
+
"cli.reason.isFolder": "\u5B83\u662F\u6587\u4EF6\u5939",
|
|
11285
|
+
"cli.reason.missingPath": "\u8DEF\u5F84\u4E0D\u5B58\u5728\uFF08\u8BF7\u68C0\u67E5\u9A71\u52A8\u5668\u6216\u6587\u4EF6\u5939\u540D\u79F0\uFF09",
|
|
11286
|
+
"cli.reason.diskFull": "\u78C1\u76D8\u7A7A\u95F4\u4E0D\u8DB3",
|
|
11287
|
+
"cli.reason.readOnly": "\u53EA\u8BFB\u6587\u4EF6\u7CFB\u7EDF",
|
|
11288
|
+
"cli.reason.tooLong": "\u8DEF\u5F84\u592A\u957F",
|
|
11289
|
+
"cli.compare.title": "RepoRefit \u6BD4\u8F83 \xB7 {tool}",
|
|
11290
|
+
"cli.compare.rule": "\u89C4\u5219",
|
|
11291
|
+
"cli.compare.before": "\u539F\u7248",
|
|
11292
|
+
"cli.compare.after": "\u4FEE\u6539\u7248",
|
|
11293
|
+
"cli.compare.total": "\u5408\u8BA1",
|
|
11294
|
+
"cli.compare.tokens": "\u5404\u4EE3\u7406\u5728\u9879\u76EE\u9876\u5C42\uFF08/\uFF09\u8BFB\u53D6\u7684\u6307\u4EE4\u6587\u4EF6\u7684\u4F30\u8BA1 token\uFF1A",
|
|
11295
|
+
"cli.compare.tokenLine": "{agent}\uFF1A{before} -> {after}\uFF08{delta} token\uFF0C{change}\uFF09",
|
|
11296
|
+
"cli.compare.fewer": "\u51CF\u5C11 {percent}%",
|
|
11297
|
+
"cli.compare.more": "\u589E\u52A0 {percent}%",
|
|
11298
|
+
"cli.compare.underOne": "\u4E0D\u5230 1%",
|
|
11299
|
+
"cli.compare.same": "\u6CA1\u6709\u53D8\u5316",
|
|
11300
|
+
"cli.compare.noRate": "\u539F\u7248\u4E3A 0 token\uFF0C\u65E0\u6CD5\u8BA1\u7B97\u6BD4\u4F8B",
|
|
11301
|
+
"cli.compare.notComparable": "{agent}\uFF1A\u65E0\u6CD5\u6BD4\u8F83\uFF08\u6307\u4EE4\u6587\u4EF6\u7F3A\u5931\u3001\u6309\u6761\u4EF6\u52A0\u8F7D\u6216\u53EA\u8BFB\u53D6\u4E86\u4E00\u90E8\u5206\uFF09",
|
|
11302
|
+
"cli.compare.noAgents": "\u4E24\u4E2A\u7248\u672C\u4E2D\u90FD\u6CA1\u6709\u4EE3\u7406\u5728 / \u8BFB\u53D6\u6307\u4EE4\u6587\u4EF6\u3002",
|
|
11303
|
+
"cli.compare.limits": "\u53EA\u7EDF\u8BA1\u6307\u4EE4\u6587\u4EF6\uFF0C\u4E0D\u5305\u62EC\u5BF9\u8BDD\u3001AI \u8F93\u51FA\u3001\u7F13\u5B58\u548C\u5B9E\u9645\u8D39\u7528\u3002",
|
|
11304
|
+
"cli.keep.title": "\u89C4\u5219\u4FDD\u7559\uFF08\u53EA\u6BD4\u8F83\u5B57\u7B26\u4E32\u548C\u7ED3\u6784\uFF1B\u6539\u5199\u7684\u89C4\u5219\u4E0D\u7B97\u4FDD\u7559\uFF0C\u800C\u662F\u4EA4\u7ED9\u590D\u6838\uFF09\uFF1A",
|
|
11305
|
+
"cli.keep.none": "\u539F\u7248\u4E2D\u6CA1\u6709\u6307\u4EE4\u6587\u4EF6\u3002",
|
|
11306
|
+
"cli.keep.line": "{agent}\uFF0C/\uFF1A\u89C4\u5219 {units} \u6761\uFF08\u5FC5\u987B {mandatory} \u6761\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}\uFF0C\u8303\u56F4\u5916 {scope}\uFF0C\u5220\u9664\u91CD\u590D {duplicates}\uFF0C\u65B0\u589E {added} -> {verdict}",
|
|
11307
|
+
"cli.keep.verdict.clean": "\u68C0\u67E5\u8303\u56F4\u5185\u6CA1\u6709\u53D1\u73B0\u4E22\u5931",
|
|
11308
|
+
"cli.keep.verdict.estimated": "\u6CA1\u6709\u53D1\u73B0\u4E22\u5931\uFF1B\u6539\u5199\u7684\u89C4\u5219\u770B\u4F3C\u76F8\u540C\uFF08\u4F30\u8BA1\uFF09\uFF0C\u8BF7\u8BFB\u4E00\u904D",
|
|
11309
|
+
"cli.keep.verdict.unknown": "\u65E0\u6CD5\u5224\u65AD\uFF08{reasons}\uFF09",
|
|
11310
|
+
"cli.keep.verdict.review": "\u8BF7\u590D\u6838\u4FEE\u6539\u7248",
|
|
11311
|
+
"cli.keep.grade.estimated": "\u770B\u4F3C\u76F8\u540C",
|
|
11312
|
+
"cli.keep.grade.review": "\u590D\u6838",
|
|
11313
|
+
"cli.keep.grade.missing": "\u53EF\u80FD\u4E22\u5931",
|
|
11314
|
+
"cli.keep.grade.scope": "\u8303\u56F4\u5916",
|
|
11315
|
+
"cli.keep.reason.reworded": "\u6539\u5199",
|
|
11316
|
+
"cli.keep.reason.fixedChanged": "\u56FA\u5B9A\u8BCD\u53D8\u5316",
|
|
11317
|
+
"cli.keep.reason.outOfScope": "\u8FD9\u91CC\u4E0D\u518D\u8BFB\u53D6",
|
|
11318
|
+
"cli.keep.unknown.partial": "\u90E8\u5206\u68C0\u67E5",
|
|
11319
|
+
"cli.keep.unknown.unread": "\u672A\u8BFB\u53D6\u7684\u6587\u4EF6",
|
|
11320
|
+
"cli.keep.mandatory": "\u5FC5\u987B",
|
|
11321
|
+
"cli.keep.more": "\u2026 \u8FD8\u6709 {count} \u9879",
|
|
11322
|
+
"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",
|
|
11323
|
+
"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",
|
|
11324
|
+
"cli.docs.title": "\u5176\u4ED6\u6587\u6863\u4E2D\u7684\u8981\u6C42\uFF08README\u3001docs/ \u7B49\u4EE3\u7406\u4E0D\u8BFB\u53D6\u7684 Markdown\uFF09\uFF1A",
|
|
11325
|
+
"cli.docs.none": "{documents} \u4E2A\u5176\u4ED6\u6587\u6863\u4E2D\u6CA1\u6709\u88AB\u5220\u9664\u6216\u4FEE\u6539\u7684\u6587\u6863\u3002",
|
|
11326
|
+
"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}",
|
|
11327
|
+
"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",
|
|
11328
|
+
"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",
|
|
11329
|
+
"cli.docs.verdict.review": "\u8BF7\u5728\u4FEE\u6539\u7248\u4E2D\u590D\u6838\u8FD9\u4E9B\u5355\u5143",
|
|
11330
|
+
"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",
|
|
11331
|
+
"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",
|
|
11332
|
+
"cli.links.title": "\u8FD9\u6B21\u4FEE\u6539\u5F04\u574F\u7684\u94FE\u63A5\uFF08\u5728\u539F\u7248\u4E2D\u53EF\u4EE5\u6253\u5F00\uFF09\uFF1A",
|
|
11333
|
+
"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}",
|
|
11334
|
+
"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}"
|
|
11335
|
+
};
|
|
11336
|
+
|
|
10802
11337
|
// ../core/src/i18n/messages.ts
|
|
10803
11338
|
var en = {
|
|
10804
11339
|
"report.title": "RepoRefit report",
|
|
10805
11340
|
"report.generated": "Generated (UTC)",
|
|
10806
11341
|
"report.scanId": "Scan ID",
|
|
10807
11342
|
"report.input": "Input",
|
|
10808
|
-
"report.input.zip": "Local ZIP file (
|
|
10809
|
-
"report.input.folder": "Local folder (
|
|
11343
|
+
"report.input.zip": "Local ZIP file (read on this device, not uploaded)",
|
|
11344
|
+
"report.input.folder": "Local folder (read on this device, not uploaded)",
|
|
10810
11345
|
"report.input.github": "Public GitHub repository",
|
|
10811
11346
|
"report.wrapper": "Detected root folder (stripped)",
|
|
10812
11347
|
"report.commit": "Commit SHA",
|
|
@@ -10895,8 +11430,8 @@ var ko = {
|
|
|
10895
11430
|
"report.generated": "\uC0DD\uC131 \uC2DC\uAC01(UTC)",
|
|
10896
11431
|
"report.scanId": "\uAC80\uC0AC ID",
|
|
10897
11432
|
"report.input": "\uC785\uB825",
|
|
10898
|
-
"report.input.zip": "\uB85C\uCEEC ZIP \uD30C\uC77C(\
|
|
10899
|
-
"report.input.folder": "\uB85C\uCEEC \uD3F4\uB354(\
|
|
11433
|
+
"report.input.zip": "\uB85C\uCEEC ZIP \uD30C\uC77C(\uC774 \uAE30\uAE30\uC5D0\uC11C \uC77D\uC74C, \uC5C5\uB85C\uB4DC \uC5C6\uC74C)",
|
|
11434
|
+
"report.input.folder": "\uB85C\uCEEC \uD3F4\uB354(\uC774 \uAE30\uAE30\uC5D0\uC11C \uC77D\uC74C, \uC5C5\uB85C\uB4DC \uC5C6\uC74C)",
|
|
10900
11435
|
"report.input.github": "\uACF5\uAC1C GitHub \uC800\uC7A5\uC18C",
|
|
10901
11436
|
"report.wrapper": "\uC778\uC2DD\uD55C \uCD5C\uC0C1\uC704 \uD3F4\uB354(\uC81C\uAC70\uB428)",
|
|
10902
11437
|
"report.commit": "\uCEE4\uBC0B SHA",
|
|
@@ -10985,8 +11520,8 @@ var ja = {
|
|
|
10985
11520
|
"report.generated": "\u751F\u6210\u65E5\u6642(UTC)",
|
|
10986
11521
|
"report.scanId": "\u691C\u67FB ID",
|
|
10987
11522
|
"report.input": "\u5165\u529B",
|
|
10988
|
-
"report.input.zip": "\u30ED\u30FC\u30AB\u30EB ZIP \u30D5\u30A1\u30A4\u30EB(\
|
|
10989
|
-
"report.input.folder": "\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC(\
|
|
11523
|
+
"report.input.zip": "\u30ED\u30FC\u30AB\u30EB ZIP \u30D5\u30A1\u30A4\u30EB(\u3053\u306E\u7AEF\u672B\u3067\u8AAD\u307F\u8FBC\u307F\u3001\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306A\u3057)",
|
|
11524
|
+
"report.input.folder": "\u30ED\u30FC\u30AB\u30EB\u30D5\u30A9\u30EB\u30C0\u30FC(\u3053\u306E\u7AEF\u672B\u3067\u8AAD\u307F\u8FBC\u307F\u3001\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306A\u3057)",
|
|
10990
11525
|
"report.input.github": "\u516C\u958B GitHub \u30EA\u30DD\u30B8\u30C8\u30EA",
|
|
10991
11526
|
"report.wrapper": "\u691C\u51FA\u3057\u305F\u6700\u4E0A\u4F4D\u30D5\u30A9\u30EB\u30C0\u30FC(\u9664\u53BB\u6E08\u307F)",
|
|
10992
11527
|
"report.commit": "\u30B3\u30DF\u30C3\u30C8 SHA",
|
|
@@ -11075,8 +11610,8 @@ var zhHans = {
|
|
|
11075
11610
|
"report.generated": "\u751F\u6210\u65F6\u95F4(UTC)",
|
|
11076
11611
|
"report.scanId": "\u68C0\u67E5 ID",
|
|
11077
11612
|
"report.input": "\u8F93\u5165",
|
|
11078
|
-
"report.input.zip": "\u672C\u5730 ZIP \u6587\u4EF6(\u5728\
|
|
11079
|
-
"report.input.folder": "\u672C\u5730\u6587\u4EF6\u5939(\u5728\
|
|
11613
|
+
"report.input.zip": "\u672C\u5730 ZIP \u6587\u4EF6(\u5728\u672C\u8BBE\u5907\u4E0A\u8BFB\u53D6,\u4E0D\u4E0A\u4F20)",
|
|
11614
|
+
"report.input.folder": "\u672C\u5730\u6587\u4EF6\u5939(\u5728\u672C\u8BBE\u5907\u4E0A\u8BFB\u53D6,\u4E0D\u4E0A\u4F20)",
|
|
11080
11615
|
"report.input.github": "\u516C\u5F00 GitHub \u4ED3\u5E93",
|
|
11081
11616
|
"report.wrapper": "\u8BC6\u522B\u51FA\u7684\u9876\u5C42\u6587\u4EF6\u5939(\u5DF2\u53BB\u9664)",
|
|
11082
11617
|
"report.commit": "\u63D0\u4EA4 SHA",
|
|
@@ -11161,10 +11696,10 @@ var zhHans = {
|
|
|
11161
11696
|
"exclusion.not-supported-yet": "\u6682\u4E0D\u652F\u6301"
|
|
11162
11697
|
};
|
|
11163
11698
|
var CATALOGS = {
|
|
11164
|
-
en: { ...en, ...en2, ...enT },
|
|
11165
|
-
ko: { ...ko, ...ko2, ...koT },
|
|
11166
|
-
ja: { ...ja, ...ja2, ...jaT },
|
|
11167
|
-
"zh-Hans": { ...zhHans, ...zh2, ...zhT }
|
|
11699
|
+
en: { ...en, ...en2, ...enT, ...enC },
|
|
11700
|
+
ko: { ...ko, ...ko2, ...koT, ...koC },
|
|
11701
|
+
ja: { ...ja, ...ja2, ...jaT, ...jaC },
|
|
11702
|
+
"zh-Hans": { ...zhHans, ...zh2, ...zhT, ...zhC }
|
|
11168
11703
|
};
|
|
11169
11704
|
function t(locale, key, params = {}) {
|
|
11170
11705
|
const template = CATALOGS[locale][key] ?? CATALOGS.en[key] ?? key;
|
|
@@ -11180,6 +11715,41 @@ function toLocale(code2) {
|
|
|
11180
11715
|
return null;
|
|
11181
11716
|
}
|
|
11182
11717
|
|
|
11718
|
+
// ../core/src/results.ts
|
|
11719
|
+
function changePercent(before, after) {
|
|
11720
|
+
if (!Number.isFinite(before) || !Number.isFinite(after) || before === 0) return null;
|
|
11721
|
+
return Math.round((after - before) / before * 100);
|
|
11722
|
+
}
|
|
11723
|
+
function allToolsSummary(report, tools) {
|
|
11724
|
+
const verdict = report.rules.filter((r) => r.ruleId !== "INV-001" && r.status !== "skipped" && r.status !== "error");
|
|
11725
|
+
const rulesPassed = verdict.filter((r) => r.status === "pass").length;
|
|
11726
|
+
return {
|
|
11727
|
+
rulesEvaluated: verdict.length,
|
|
11728
|
+
rulesPassed,
|
|
11729
|
+
passPercent: verdict.length ? Math.round(rulesPassed / verdict.length * 100) : null,
|
|
11730
|
+
tools: tools.map((t2) => {
|
|
11731
|
+
const rs = report.rules.filter((r) => t2.rules.includes(r.ruleId));
|
|
11732
|
+
const findings = rs.reduce((n, r) => n + r.findings.length, 0);
|
|
11733
|
+
const high = rs.reduce((n, r) => n + r.findings.filter((f) => f.severity === "high").length, 0);
|
|
11734
|
+
const ran = rs.filter((r) => r.status !== "skipped" && r.status !== "error");
|
|
11735
|
+
const status = ran.length === 0 ? report.coverage?.partial ? "unread" : "not-checked" : findings ? "issues" : ran.some((r) => r.status === "partial") ? "partial" : "clean";
|
|
11736
|
+
return { tool: t2.id, status, findings, high };
|
|
11737
|
+
})
|
|
11738
|
+
};
|
|
11739
|
+
}
|
|
11740
|
+
function severityCounts(findings) {
|
|
11741
|
+
const c = { total: findings.length, high: 0, medium: 0, low: 0, info: 0, unknown: 0 };
|
|
11742
|
+
for (const f of findings) {
|
|
11743
|
+
if (f.severity === "high" || f.severity === "medium" || f.severity === "low" || f.severity === "info") c[f.severity]++;
|
|
11744
|
+
else c.unknown++;
|
|
11745
|
+
}
|
|
11746
|
+
return c;
|
|
11747
|
+
}
|
|
11748
|
+
function severityParts(c) {
|
|
11749
|
+
const parts = [["high", c.high], ["medium", c.medium], ["low", c.low], ["info", c.info]];
|
|
11750
|
+
return c.unknown ? [...parts, ["unknown", c.unknown]] : parts;
|
|
11751
|
+
}
|
|
11752
|
+
|
|
11183
11753
|
// ../core/src/report/rule-docs.ts
|
|
11184
11754
|
var PUBLIC_SITE = "https://reporefit.com";
|
|
11185
11755
|
function ruleDocUrl(locale, ruleId) {
|
|
@@ -11215,9 +11785,9 @@ function findingBlock(locale, f, n) {
|
|
|
11215
11785
|
`### ${n}. ${code(where3)} \xB7 ${f.ruleId} \xB7 ${t(locale, `severity.${f.severity}`)}`,
|
|
11216
11786
|
"",
|
|
11217
11787
|
msg(locale, f.messageKey, f.params),
|
|
11218
|
-
""
|
|
11219
|
-
`- ${t(locale, "report.target")}: ${code(String(f.params.target ?? ""))}`
|
|
11788
|
+
""
|
|
11220
11789
|
];
|
|
11790
|
+
if (f.params.target !== void 0 && f.params.target !== "") lines.push(`- ${t(locale, "report.target")}: ${code(String(f.params.target))}`);
|
|
11221
11791
|
if (f.params.resolved !== void 0) lines.push(`- ${t(locale, "report.resolved")}: ${code(String(f.params.resolved))}`);
|
|
11222
11792
|
lines.push(
|
|
11223
11793
|
`- ${t(locale, "report.fix")}: ${msg(locale, f.recommendation.messageKey, f.recommendation.params)}`,
|
|
@@ -11302,6 +11872,7 @@ function renderMarkdownReport(report, locale) {
|
|
|
11302
11872
|
out.push(`| ${t(locale, "report.partial")} | ${yn(c.partial)} |`, "");
|
|
11303
11873
|
const findings = report.rules.flatMap((r) => r.findings);
|
|
11304
11874
|
out.push(`## ${t(locale, "report.findings")} (${findings.length})`, "");
|
|
11875
|
+
if (findings.length) out.push(severityParts(severityCounts(findings)).map(([s, n]) => `${t(locale, `severity.${s}`)} ${n}`).join(" \xB7 "), "");
|
|
11305
11876
|
if (findings.length === 0) out.push(t(locale, "report.noFindings"), "");
|
|
11306
11877
|
findings.forEach((f, i) => out.push(findingBlock(locale, f, i + 1)));
|
|
11307
11878
|
const unverified = report.rules.flatMap((r) => r.unverified);
|
|
@@ -11345,19 +11916,6 @@ function renderJsonReport(report) {
|
|
|
11345
11916
|
// ../core/src/report/fix-plan.ts
|
|
11346
11917
|
var ORDER = { high: 0, medium: 1, low: 2, info: 3, unknown: 4 };
|
|
11347
11918
|
var CONFIDENCE = { high: 0, medium: 1, low: 2 };
|
|
11348
|
-
function fenced2(text3) {
|
|
11349
|
-
const runs = text3.match(/`{3,}/g) ?? [];
|
|
11350
|
-
const longest = runs.reduce((m, r) => Math.max(m, r.length), 2);
|
|
11351
|
-
const fence = "`".repeat(longest + 1);
|
|
11352
|
-
return `${fence}text
|
|
11353
|
-
${text3}
|
|
11354
|
-
${fence}`;
|
|
11355
|
-
}
|
|
11356
|
-
function msg2(locale, key, params) {
|
|
11357
|
-
const safe = {};
|
|
11358
|
-
for (const [k, v] of Object.entries(params)) safe[k] = typeof v === "string" ? code(v) : v;
|
|
11359
|
-
return t(locale, key, safe).replace(/"(`[^`]*`+)"/g, "$1");
|
|
11360
|
-
}
|
|
11361
11919
|
var where = (locale, f) => f.line ? code(`${f.path}:${f.line}`) : f.path === "." ? t(locale, "report.project") : code(f.path);
|
|
11362
11920
|
function fixPlanTasks(report) {
|
|
11363
11921
|
return report.rules.flatMap((r) => r.findings).slice().sort(
|
|
@@ -11377,13 +11935,13 @@ function renderFixPlan(report, locale) {
|
|
|
11377
11935
|
if (tasks.length === 0) out.push(t(locale, "fixplan.none"), "");
|
|
11378
11936
|
tasks.forEach((f, i) => {
|
|
11379
11937
|
out.push(`### ${i + 1}. ${f.ruleId} \xB7 ${t(locale, `severity.${f.severity}`)} \xB7 ${t(locale, `rule.${f.ruleId}`)}`, "");
|
|
11380
|
-
out.push(`- ${t(locale, "fixplan.problem")}: ${
|
|
11938
|
+
out.push(`- ${t(locale, "fixplan.problem")}: ${msg(locale, f.messageKey, f.params)}`);
|
|
11381
11939
|
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(", ")})` : ""}`);
|
|
11382
|
-
out.push(`- ${t(locale, "fixplan.change")}: ${
|
|
11940
|
+
out.push(`- ${t(locale, "fixplan.change")}: ${msg(locale, f.recommendation.messageKey, f.recommendation.params)}`);
|
|
11383
11941
|
out.push(`- ${t(locale, "fixplan.keep")}`);
|
|
11384
|
-
out.push(`- ${t(locale, "fixplan.verify")}: ${
|
|
11942
|
+
out.push(`- ${t(locale, "fixplan.verify")}: ${msg(locale, f.verification.messageKey, f.verification.params)}`);
|
|
11385
11943
|
out.push(`- ${t(locale, "report.ruleDoc")}: ${ruleDocUrl(locale, f.ruleId)}`);
|
|
11386
|
-
if (f.evidence) out.push("", `${t(locale, "report.evidence")}:`, "",
|
|
11944
|
+
if (f.evidence) out.push("", `${t(locale, "report.evidence")}:`, "", fenced(f.evidence));
|
|
11387
11945
|
out.push("");
|
|
11388
11946
|
});
|
|
11389
11947
|
const unverified = report.rules.flatMap((r) => r.unverified);
|
|
@@ -11396,65 +11954,6 @@ function renderFixPlan(report, locale) {
|
|
|
11396
11954
|
return out.join("\n");
|
|
11397
11955
|
}
|
|
11398
11956
|
|
|
11399
|
-
// ../core/src/tools.ts
|
|
11400
|
-
var TOOLS = [
|
|
11401
|
-
{ id: "tokens", status: "live", rules: ["MD-002", "AI-001", "AI-002", "AI-003", "AI-004"], milestone: "M2", category: "ai-context" },
|
|
11402
|
-
{ id: "markdown", status: "live", rules: ["MD-001", "MD-003"], milestone: "M1\u2013M2", category: "documentation" },
|
|
11403
|
-
{ id: "secrets", status: "live", rules: ["SEC-001", "SEC-002"], milestone: "M3", category: "security" },
|
|
11404
|
-
{ id: "dependencies", status: "live", rules: ["DEP-001", "DEP-002"], milestone: "M3 (OSV with consent)", category: "security" },
|
|
11405
|
-
{ id: "mcp", status: "live", rules: ["MCP-001", "MCP-002"], milestone: "M3", category: "ai-context" },
|
|
11406
|
-
{ id: "agent-rules", status: "live", rules: ["AI-001", "AI-004", "AGT-001", "AGT-002", "DOC-001"], milestone: "P1", category: "ai-context" },
|
|
11407
|
-
{ id: "duplicates", status: "live", rules: ["DUP-001"], milestone: "P1", category: "code-quality" },
|
|
11408
|
-
{ id: "architecture", status: "live", rules: ["ARC-001", "ARC-002"], milestone: "P1", category: "architecture" },
|
|
11409
|
-
{ id: "deploy", status: "live", rules: ["OPS-001", "OPS-002", "OPS-003"], milestone: "P1", category: "deploy" }
|
|
11410
|
-
];
|
|
11411
|
-
var ALL_TOOLS = "all";
|
|
11412
|
-
function toolById(id) {
|
|
11413
|
-
return TOOLS.find((t2) => t2.id === id);
|
|
11414
|
-
}
|
|
11415
|
-
function resolveTool(id) {
|
|
11416
|
-
const tool2 = toolById(id);
|
|
11417
|
-
return tool2 && tool2.status === "live" ? tool2.id : ALL_TOOLS;
|
|
11418
|
-
}
|
|
11419
|
-
function rulesFor(selection) {
|
|
11420
|
-
const tools = selection === ALL_TOOLS ? TOOLS.filter((t2) => t2.status === "live") : TOOLS.filter((t2) => t2.id === selection);
|
|
11421
|
-
return ["INV-001", ...new Set(tools.flatMap((t2) => t2.rules))];
|
|
11422
|
-
}
|
|
11423
|
-
function filterReport(report, selection) {
|
|
11424
|
-
const ids = new Set(rulesFor(selection));
|
|
11425
|
-
return {
|
|
11426
|
-
...report,
|
|
11427
|
-
rules: report.rules.filter((r) => ids.has(r.ruleId)),
|
|
11428
|
-
metrics: {
|
|
11429
|
-
...report.metrics,
|
|
11430
|
-
tokens: ids.has("AI-002") ? report.metrics.tokens : null,
|
|
11431
|
-
dependencies: ids.has("DEP-001") ? report.metrics.dependencies ?? null : null,
|
|
11432
|
-
duplicates: ids.has("DUP-001") ? report.metrics.duplicates : void 0,
|
|
11433
|
-
architecture: ids.has("ARC-001") ? report.metrics.architecture : void 0,
|
|
11434
|
-
deploy: ids.has("OPS-001") ? report.metrics.deploy : void 0
|
|
11435
|
-
}
|
|
11436
|
-
};
|
|
11437
|
-
}
|
|
11438
|
-
|
|
11439
|
-
// ../core/src/results.ts
|
|
11440
|
-
function allToolsSummary(report, tools) {
|
|
11441
|
-
const verdict = report.rules.filter((r) => r.ruleId !== "INV-001" && r.status !== "skipped" && r.status !== "error");
|
|
11442
|
-
const rulesPassed = verdict.filter((r) => r.status === "pass").length;
|
|
11443
|
-
return {
|
|
11444
|
-
rulesEvaluated: verdict.length,
|
|
11445
|
-
rulesPassed,
|
|
11446
|
-
passPercent: verdict.length ? Math.round(rulesPassed / verdict.length * 100) : null,
|
|
11447
|
-
tools: tools.map((t2) => {
|
|
11448
|
-
const rs = report.rules.filter((r) => t2.rules.includes(r.ruleId));
|
|
11449
|
-
const findings = rs.reduce((n, r) => n + r.findings.length, 0);
|
|
11450
|
-
const high = rs.reduce((n, r) => n + r.findings.filter((f) => f.severity === "high").length, 0);
|
|
11451
|
-
const ran = rs.filter((r) => r.status !== "skipped" && r.status !== "error");
|
|
11452
|
-
const status = ran.length === 0 ? report.coverage?.partial ? "unread" : "not-checked" : findings ? "issues" : ran.some((r) => r.status === "partial") ? "partial" : "clean";
|
|
11453
|
-
return { tool: t2.id, status, findings, high };
|
|
11454
|
-
})
|
|
11455
|
-
};
|
|
11456
|
-
}
|
|
11457
|
-
|
|
11458
11957
|
// ../core/src/ai/preservation.ts
|
|
11459
11958
|
var MANDATORY_RE = /\b(must|never|always|required|do not|don't|shall not)\b|반드시|절대|금지|필수|하지 ?마|必ず|禁止|してはいけない|しないで|必须|不要|不得|务必/i;
|
|
11460
11959
|
var TAG_RE = {
|
|
@@ -11464,18 +11963,61 @@ var TAG_RE = {
|
|
|
11464
11963
|
database: /\b(database|migration|schema|sql|db)\b|데이터베이스|마이그레이션|データベース|マイグレーション|数据库|迁移/i,
|
|
11465
11964
|
delete: /\b(delet|remov|drop|rm -rf|truncat)\w*|삭제|削除|删除/i
|
|
11466
11965
|
};
|
|
11467
|
-
var NEGATION_RE = /\b(not|never|no|without|don't|doesn't|won't|cannot|can't)\b|않|말고|말
|
|
11966
|
+
var NEGATION_RE = /\b(not|never|no|none|neither|nor|without|avoid|don't|doesn't|won't|cannot|can't|shouldn't|mustn't)\b|않|말고|말 것|마세요|마십시오|말아|못|금지|없이|ない|ません|禁止|ず[、。]|不|别|勿|没有/gi;
|
|
11967
|
+
var MODALS = [
|
|
11968
|
+
["always", /\b(always|every time|must|required|mandatory)\b|반드시|항상|꼭|필수|必ず|常に|いつも|必須|必须|总是|始终|务必|一定/gi],
|
|
11969
|
+
["sometimes", /\b(sometimes|occasionally|optionally)\b|가끔|때때로|ときどき|時々|たまに|偶尔|有时/gi],
|
|
11970
|
+
["may", /\b(may|can|could|allowed)\b|수 있|해도 된|できる|できます|てもよい|てもいい|可以|允许/gi],
|
|
11971
|
+
["should", /\b(should|recommended|prefer)\b|권장|하는 것이 좋|推奨|べき|望ましい|应该|应当|最好|建议/gi],
|
|
11972
|
+
["only", /\b(only|solely)\b|(?<=[가-힣])만(?=\s|$|[.,])|だけ|のみ|只|仅/gi],
|
|
11973
|
+
// Order words: "before you commit" and "after you commit" are different rules (answer set en-16, ko-16, ja-16, zh-16).
|
|
11974
|
+
["before", /\b(before|prior to|first|until|beforehand)\b|전에|전까지|먼저|前に|前の|事前に|までに|先に|之前|先/gi],
|
|
11975
|
+
["after", /\b(after|afterwards|then)\b|후에|뒤에|다음에|後に|後で|てから|之后|后|再/gi],
|
|
11976
|
+
// Who acts or decides: "ask" and "check with the team" are different rules (operator review 12-02, en-08).
|
|
11977
|
+
["actor:team", /\b(team|teammates?|colleagues?|peers?)\b|팀(?!장)|동료|チーム|同僚|团队|同事/gi],
|
|
11978
|
+
["actor:lead", /\b(leads?|managers?|owners?|maintainers?|admins?|administrators?)\b|팀장|리더|담당자|관리자|책임자|메인테이너|リーダー|担当者|管理者|責任者|メンテナ|负责人|管理员|主管|维护者/gi],
|
|
11979
|
+
["actor:anyone", /\b(anyone|any contributor|contributors?)\b|누구나|아무나|誰でも|任何人|贡献者/gi],
|
|
11980
|
+
// What must happen: asking, getting approval, checking and telling are different duties (ko-08, ja-08, zh-08).
|
|
11981
|
+
["act:ask", /\b(ask|consult|discuss|check with|talk to)\b|물어|문의|상의|상담|여쭤|聞い|尋ね|相談|問い合わせ|询问|咨询|商量|请教/gi],
|
|
11982
|
+
["act:approve", /\b(approv\w*|sign[- ]off|permission)\b|승인|허락|허가|확인을? ?받|承認|許可|了承|批准|审批|许可/gi],
|
|
11983
|
+
["act:verify", /\b(verify|confirm|check(?! with))\b|확인(?!을? ?받)|검증|점검|確認|確かめ|确认|检查|核对/gi],
|
|
11984
|
+
["act:notify", /\b(tell|inform|notify|report to)\b|알리|알려|통보|知らせ|通知|連絡|告知/gi],
|
|
11985
|
+
// Where it applies: existing versus new code, all versus some, an area versus related parts (ko-08, ko-09 note).
|
|
11986
|
+
["scope:existing", /\b(existing|current|old|legacy)\b|기존|이전|既存|現在の|现有|已有|旧/gi],
|
|
11987
|
+
["scope:new", /\b(new|newly)\b|(?:^|\s)새(?=\s|로)|신규|新規|新しい|新/gi],
|
|
11988
|
+
["scope:all", /\b(all|every|each|any)\b|모든|전체|전부|すべて|全て|全部|所有|每个/gi],
|
|
11989
|
+
["scope:some", /\b(some|certain|part of)\b|일부|一部|部分|某些/gi],
|
|
11990
|
+
["scope:related", /\b(related|relevant)\b|관련|関連|相关|有关/gi],
|
|
11991
|
+
// Which environment: a rule for production and the same rule for tests are different rules (external QA 12-02).
|
|
11992
|
+
["env:production", /\b(production|prod)\b|운영 ?환경|프로덕션|本番|生产环境|线上/gi],
|
|
11993
|
+
["env:test", /\b(?:test|testing|staging) (?:environment|env)\b|테스트 ?환경|스테이징|テスト環境|ステージング|测试环境|预发/gi],
|
|
11994
|
+
["env:development", /\b(?:development|dev|local) (?:environment|env|machine)\b|개발 ?환경|로컬|開発環境|ローカル|开发环境|本地/gi],
|
|
11995
|
+
// Numeric conditions: "Node 20 or later" and "Node 20" are different requirements.
|
|
11996
|
+
["cmp:min", /\b(or later|or newer|or above|or higher|or more|at least|and up)\b|이상|최소|以上|以降|少なくとも|及以上|至少|不少于/gi],
|
|
11997
|
+
["cmp:max", /\b(or earlier|or older|or below|or lower|or less|at most)\b|이하|최대|以下|及以下|至多|不超过/gi],
|
|
11998
|
+
["cmp:over", /\b(more than|greater than|exceeds?)\b|초과|を超え|超过|大于/gi],
|
|
11999
|
+
["cmp:under", /\b(less than|fewer than)\b|미만|未満|小于|少于/gi]
|
|
12000
|
+
];
|
|
12001
|
+
var TOOL_RE = /\b(npm|pnpm|yarn|bun|npx|deno|dotnet|nuget|pip|pipx|poetry|uv|conda|cargo|rustup|gradle|maven|mvn|composer|bundler|docker|podman|kubectl|helm|terraform)\b/gi;
|
|
12002
|
+
var REVIEW_MIN = 0.5;
|
|
12003
|
+
var ESTIMATE_MIN = 0.6;
|
|
11468
12004
|
var unify = (s) => s.replace(/\r\n?/g, "\n").trim();
|
|
11469
12005
|
function normalizeRule(s) {
|
|
11470
|
-
return unify(s).replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "").replace(/(\*\*|__|\*)(?=\S)([^*_]*?\S)\1/g, "$2").replace(/[“”„]/g, '"').replace(/[‘’]/g, "'").replace(/\s+/g, " ").replace(/[.。!!;;]+$/, "").trim();
|
|
12006
|
+
return unify(s).replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "").replace(/(\*\*|__|\*)(?=\S)([^*_]*?\S)\1/g, "$2").replace(/[“”„]/g, '"').replace(/[‘’]/g, "'").replace(/`([^`\s/.\d-]+)`/g, "$1").replace(/\s+/g, " ").replace(/[.。!!;;]+$/, "").trim();
|
|
11471
12007
|
}
|
|
11472
12008
|
function fixedTokens(s) {
|
|
11473
12009
|
const out = [];
|
|
11474
|
-
for (const m of s.matchAll(/`([^`]+)`/g)) out.push(`code:${m[1]}`);
|
|
11475
|
-
const plain = s.replace(/`[^`]
|
|
12010
|
+
for (const m of s.matchAll(/`([^`]+)`/g)) if (/[\s/.\d-]/.test(m[1])) out.push(`code:${m[1]}`);
|
|
12011
|
+
const plain = s.replace(/`([^`]+)`/g, (m, w) => /[\s/.\d-]/.test(w) ? " " : w);
|
|
11476
12012
|
for (const m of plain.matchAll(/\d+(?:[.,]\d+)?%?/g)) out.push(`num:${m[0]}`);
|
|
11477
12013
|
for (const m of plain.matchAll(/(?:\.{0,2}\/)?[\w.-]+\/[\w./-]+|\b[\w-]+\.(?:md|json|ya?ml|toml|ts|js|py|sh|env|lock)\b/g)) out.push(`path:${m[0]}`);
|
|
11478
|
-
|
|
12014
|
+
if (NEGATION_RE.test(plain)) out.push("neg");
|
|
12015
|
+
NEGATION_RE.lastIndex = 0;
|
|
12016
|
+
for (const [name, re] of MODALS) {
|
|
12017
|
+
if (re.test(plain)) out.push(`modal:${name}`);
|
|
12018
|
+
re.lastIndex = 0;
|
|
12019
|
+
}
|
|
12020
|
+
for (const tool2 of new Set([...plain.matchAll(TOOL_RE)].map((m) => m[1].toLowerCase()))) out.push(`tool:${tool2}`);
|
|
11479
12021
|
return out.sort();
|
|
11480
12022
|
}
|
|
11481
12023
|
var sameFixed = (a, b) => a.length === b.length && a.every((x, i) => x === b[i]);
|
|
@@ -11487,12 +12029,30 @@ function words(s) {
|
|
|
11487
12029
|
for (const part of cjk.split(" ")) for (let i = 0; i + 1 < part.length; i++) out.add(part.slice(i, i + 2));
|
|
11488
12030
|
return out;
|
|
11489
12031
|
}
|
|
12032
|
+
var ZH_FUNCTION = /[的了要请先再在中得于把被让使将着过呢吗吧啊也都就还又很时并而或与和及对向到从用以为是有会能可应当必须需要]/g;
|
|
12033
|
+
function contentWords(s) {
|
|
12034
|
+
const out = /* @__PURE__ */ new Set();
|
|
12035
|
+
const lower = s.toLowerCase();
|
|
12036
|
+
for (const m of lower.matchAll(/[a-z0-9_]+/g)) out.add(m[0]);
|
|
12037
|
+
for (const m of lower.matchAll(new RegExp("\\p{Script=Hangul}+", "gu"))) out.add(m[0].slice(0, 2));
|
|
12038
|
+
const runs = /[\p{Script=Hiragana}]/u.test(lower) ? lower.match(/[\p{Script=Han}\p{Script=Katakana}ー]+/gu) : lower.replace(ZH_FUNCTION, " ").match(new RegExp("\\p{Script=Han}+", "gu"));
|
|
12039
|
+
for (const run of runs ?? []) {
|
|
12040
|
+
if (run.length === 1) out.add(run);
|
|
12041
|
+
for (let i = 0; i + 1 < run.length; i++) out.add(run.slice(i, i + 2));
|
|
12042
|
+
}
|
|
12043
|
+
return out;
|
|
12044
|
+
}
|
|
11490
12045
|
function overlap(a, b) {
|
|
11491
12046
|
if (a.size === 0 || b.size === 0) return 0;
|
|
11492
12047
|
let both = 0;
|
|
11493
12048
|
for (const w of a) if (b.has(w)) both++;
|
|
11494
12049
|
return both / Math.min(a.size, b.size);
|
|
11495
12050
|
}
|
|
12051
|
+
function ruleSimilarity(a, b) {
|
|
12052
|
+
const na = normalizeRule(a);
|
|
12053
|
+
const nb = normalizeRule(b);
|
|
12054
|
+
return Math.max(overlap(words(na), words(nb)), overlap(contentWords(na), contentWords(nb)));
|
|
12055
|
+
}
|
|
11496
12056
|
function extractRuleUnits(doc) {
|
|
11497
12057
|
const units = [];
|
|
11498
12058
|
const tree = parseTree(doc.text);
|
|
@@ -11539,15 +12099,54 @@ function extractRuleUnits(doc) {
|
|
|
11539
12099
|
visit(tree);
|
|
11540
12100
|
return units;
|
|
11541
12101
|
}
|
|
11542
|
-
|
|
12102
|
+
function matchUnit(u, pool, originals) {
|
|
12103
|
+
const exact = pool.find((a) => a.exact === u.exact);
|
|
12104
|
+
if (exact) return { grade: "exact", at: exact, reason: null };
|
|
12105
|
+
const norm = pool.find((a) => a.normalized === u.normalized);
|
|
12106
|
+
if (norm) return { grade: "normalized", at: norm, reason: null };
|
|
12107
|
+
const inside = pool.find((a) => a.normalized.includes(u.normalized));
|
|
12108
|
+
const substantial = u.normalized.length >= 8 || (u.normalized.match(/[\p{Script=Hangul}\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/gu) ?? []).length >= 4;
|
|
12109
|
+
if (inside && substantial) return { grade: "structural", at: inside, reason: null };
|
|
12110
|
+
const sentences = u.normalized.split(/(?<=[.!?。!?])\s*/).map((x) => normalizeRule(x)).filter((x) => x.length >= 4);
|
|
12111
|
+
if (sentences.length > 1) {
|
|
12112
|
+
const homes = sentences.map((x) => pool.find((a) => a.normalized.includes(x)));
|
|
12113
|
+
if (homes.every(Boolean)) return { grade: "structural", at: homes[0], reason: null };
|
|
12114
|
+
}
|
|
12115
|
+
let best = null;
|
|
12116
|
+
let score = 0;
|
|
12117
|
+
for (const a of pool) {
|
|
12118
|
+
if (originals.has(a.normalized) && a.normalized !== u.normalized && !sameFixed(u.fixed, a.fixed)) continue;
|
|
12119
|
+
const o = ruleSimilarity(u.normalized, a.normalized);
|
|
12120
|
+
if (o > score) [best, score] = [a, o];
|
|
12121
|
+
}
|
|
12122
|
+
if (best && score >= REVIEW_MIN) {
|
|
12123
|
+
const same = sameFixed(u.fixed, best.fixed);
|
|
12124
|
+
if (same && score >= ESTIMATE_MIN) return { grade: "estimated", at: best, reason: "reworded" };
|
|
12125
|
+
return { grade: "review", at: best, reason: same ? "reworded" : "fixedChanged" };
|
|
12126
|
+
}
|
|
12127
|
+
return { grade: "missing", at: null, reason: null };
|
|
12128
|
+
}
|
|
12129
|
+
function countNotVerified(texts) {
|
|
12130
|
+
const out = { codeBlocks: 0, html: 0, images: 0, documents: 0 };
|
|
12131
|
+
const visit = (n) => {
|
|
12132
|
+
if (n.type === "code") out.codeBlocks++;
|
|
12133
|
+
else if (n.type === "html") out.html++;
|
|
12134
|
+
else if (n.type === "image" || n.type === "imageReference") out.images++;
|
|
12135
|
+
for (const c of n.children ?? []) visit(c);
|
|
12136
|
+
};
|
|
12137
|
+
for (const t2 of texts) visit(parseTree(t2.text));
|
|
12138
|
+
return out;
|
|
12139
|
+
}
|
|
12140
|
+
var severity = (i) => (i.grade === "estimated" ? -10 : 0) + (i.mandatory ? 2 : 0) + (i.tags.length > 0 ? 1 : 0);
|
|
11543
12141
|
function comparePreservation(platform, workdir, before, after) {
|
|
11544
|
-
const
|
|
11545
|
-
const beforeCtx =
|
|
11546
|
-
const afterCtx =
|
|
12142
|
+
const scopeOf2 = (docs) => activeContext(platform, workdir, docs);
|
|
12143
|
+
const beforeCtx = scopeOf2(before.docs);
|
|
12144
|
+
const afterCtx = scopeOf2(after.docs);
|
|
11547
12145
|
const beforeScope = new Set(beforeCtx.files.map((f) => f.path));
|
|
11548
12146
|
const afterScope = new Set(afterCtx.files.map((f) => f.path));
|
|
11549
12147
|
const unitsOf = (texts) => texts.flatMap((t2) => extractRuleUnits(t2));
|
|
11550
12148
|
const beforeUnits = unitsOf(before.texts.filter((t2) => beforeScope.has(t2.path)));
|
|
12149
|
+
const beforeNorms = new Set(beforeUnits.map((u) => u.normalized));
|
|
11551
12150
|
const afterAll = unitsOf(after.texts);
|
|
11552
12151
|
const afterIn = afterAll.filter((u) => afterScope.has(u.path));
|
|
11553
12152
|
const unknownReasons = [];
|
|
@@ -11556,47 +12155,28 @@ function comparePreservation(platform, workdir, before, after) {
|
|
|
11556
12155
|
const loc2 = (u) => ({ path: u.path, line: u.line, preview: u.preview });
|
|
11557
12156
|
const items = [];
|
|
11558
12157
|
let kept = 0;
|
|
12158
|
+
let estimated = 0;
|
|
11559
12159
|
let review = 0;
|
|
11560
12160
|
let fixedChanged = 0;
|
|
11561
12161
|
let missing = 0;
|
|
11562
12162
|
let scopeReduced = 0;
|
|
11563
|
-
const wordCache = /* @__PURE__ */ new Map();
|
|
11564
|
-
const wordsOf = (u) => wordCache.get(u) ?? (wordCache.set(u, words(u.normalized)), wordCache.get(u));
|
|
11565
|
-
const match = (u, pool) => {
|
|
11566
|
-
const exact = pool.find((a) => a.exact === u.exact);
|
|
11567
|
-
if (exact) return { grade: "exact", at: exact, reason: null };
|
|
11568
|
-
const norm = pool.find((a) => a.normalized === u.normalized);
|
|
11569
|
-
if (norm) return { grade: "normalized", at: norm, reason: null };
|
|
11570
|
-
const inside = pool.find((a) => a.normalized.includes(u.normalized));
|
|
11571
|
-
if (inside && u.normalized.length >= 8) return { grade: "structural", at: inside, reason: null };
|
|
11572
|
-
const sentences = u.normalized.split(/(?<=[.!?。!?])\s*/).map((s) => normalizeRule(s)).filter((s) => s.length >= 4);
|
|
11573
|
-
if (sentences.length > 1) {
|
|
11574
|
-
const homes = sentences.map((s) => pool.find((a) => a.normalized.includes(s)));
|
|
11575
|
-
if (homes.every(Boolean)) return { grade: "structural", at: homes[0], reason: null };
|
|
11576
|
-
}
|
|
11577
|
-
let best = null;
|
|
11578
|
-
let score = 0;
|
|
11579
|
-
for (const a of pool) {
|
|
11580
|
-
const o = overlap(wordsOf(u), wordsOf(a));
|
|
11581
|
-
if (o > score) [best, score] = [a, o];
|
|
11582
|
-
}
|
|
11583
|
-
if (best && score >= 0.5) return { grade: "review", at: best, reason: sameFixed(u.fixed, best.fixed) ? "reworded" : "fixedChanged" };
|
|
11584
|
-
return { grade: "missing", at: null, reason: null };
|
|
11585
|
-
};
|
|
11586
12163
|
const claimed = /* @__PURE__ */ new Set();
|
|
11587
12164
|
for (const u of beforeUnits) {
|
|
11588
|
-
const inScope =
|
|
12165
|
+
const inScope = matchUnit(u, afterIn, beforeNorms);
|
|
11589
12166
|
if (inScope.at) claimed.add(inScope.at);
|
|
11590
12167
|
const keptGrade = inScope.grade === "exact" || inScope.grade === "normalized" || inScope.grade === "structural";
|
|
11591
12168
|
if (keptGrade) {
|
|
11592
12169
|
kept++;
|
|
11593
12170
|
continue;
|
|
11594
12171
|
}
|
|
11595
|
-
const anywhere =
|
|
12172
|
+
const anywhere = matchUnit(u, afterAll, beforeNorms);
|
|
11596
12173
|
const base2 = { before: loc2(u), mandatory: u.mandatory, tags: u.tags };
|
|
11597
12174
|
if (anywhere.grade === "exact" || anywhere.grade === "normalized" || anywhere.grade === "structural") {
|
|
11598
12175
|
scopeReduced++;
|
|
11599
12176
|
items.push({ ...base2, grade: "scope", reason: "outOfScope", after: anywhere.at ? loc2(anywhere.at) : null });
|
|
12177
|
+
} else if (inScope.grade === "estimated") {
|
|
12178
|
+
estimated++;
|
|
12179
|
+
items.push({ ...base2, grade: "estimated", reason: "reworded", after: inScope.at ? loc2(inScope.at) : null });
|
|
11600
12180
|
} else if (inScope.grade === "review") {
|
|
11601
12181
|
review++;
|
|
11602
12182
|
if (inScope.reason === "fixedChanged") fixedChanged++;
|
|
@@ -11614,16 +12194,16 @@ function comparePreservation(platform, workdir, before, after) {
|
|
|
11614
12194
|
const a = na.get(n) ?? 0;
|
|
11615
12195
|
if (c > 1 && a >= 1 && a < c) removedDuplicates += c - a;
|
|
11616
12196
|
}
|
|
11617
|
-
const beforeNorms = new Set(beforeUnits.map((u) => u.normalized));
|
|
11618
12197
|
const added = afterIn.filter((a) => !claimed.has(a) && !beforeNorms.has(a.normalized) && !beforeUnits.some((u) => a.normalized.includes(u.normalized) || u.normalized.includes(a.normalized))).length;
|
|
11619
12198
|
items.sort((a, b) => severity(b) - severity(a) || (a.before.path < b.before.path ? -1 : a.before.path > b.before.path ? 1 : a.before.line - b.before.line));
|
|
11620
|
-
const verdict = unknownReasons.length > 0 ? "unknown" : missing + scopeReduced +
|
|
12199
|
+
const verdict = unknownReasons.length > 0 ? "unknown" : missing + scopeReduced + review > 0 ? "review" : estimated > 0 ? "estimated" : "clean";
|
|
11621
12200
|
return {
|
|
11622
12201
|
platform,
|
|
11623
12202
|
workdir,
|
|
11624
12203
|
units: beforeUnits.length,
|
|
11625
12204
|
mandatory: beforeUnits.filter((u) => u.mandatory).length,
|
|
11626
12205
|
kept,
|
|
12206
|
+
estimated,
|
|
11627
12207
|
review,
|
|
11628
12208
|
fixedChanged,
|
|
11629
12209
|
missing,
|
|
@@ -11632,7 +12212,131 @@ function comparePreservation(platform, workdir, before, after) {
|
|
|
11632
12212
|
added,
|
|
11633
12213
|
verdict,
|
|
11634
12214
|
unknownReasons,
|
|
11635
|
-
items
|
|
12215
|
+
items,
|
|
12216
|
+
notVerified: countNotVerified(before.texts.filter((t2) => beforeScope.has(t2.path)))
|
|
12217
|
+
};
|
|
12218
|
+
}
|
|
12219
|
+
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;
|
|
12220
|
+
var NOT_PROJECT_DOCS2 = /(^|\/)(fixtures?|__fixtures__|testdata|test-data|examples?|samples?|vendor|third[_-]party|node_modules)\//i;
|
|
12221
|
+
function compareDocuments(before, after) {
|
|
12222
|
+
const isMd = (path) => /\.(md|mdx|markdown)$/i.test(path);
|
|
12223
|
+
const docsBefore = before.texts.filter((t2) => isMd(t2.path) && !before.instruction.has(t2.path) && !NOT_PROJECT_DOCS2.test(t2.path));
|
|
12224
|
+
const afterByPath = new Map(after.texts.map((t2) => [t2.path, t2.text]));
|
|
12225
|
+
const touched = docsBefore.filter((t2) => afterByPath.get(t2.path) !== t2.text);
|
|
12226
|
+
const removed = touched.filter((t2) => !afterByPath.has(t2.path)).length;
|
|
12227
|
+
const units = touched.flatMap((t2) => extractRuleUnits(t2)).filter((u) => REQUIREMENT_RE.test(u.exact));
|
|
12228
|
+
const originals = new Set(units.map((u) => u.normalized));
|
|
12229
|
+
const pool = after.texts.filter((t2) => isMd(t2.path) || /\.mdc$/i.test(t2.path)).flatMap((t2) => extractRuleUnits(t2));
|
|
12230
|
+
const loc2 = (u) => ({ path: u.path, line: u.line, preview: u.preview });
|
|
12231
|
+
const items = [];
|
|
12232
|
+
const n = { kept: 0, estimated: 0, review: 0, fixedChanged: 0, missing: 0 };
|
|
12233
|
+
const gone = new Set(touched.filter((t2) => !afterByPath.has(t2.path)).map((t2) => t2.path));
|
|
12234
|
+
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 }]));
|
|
12235
|
+
for (const u of units) {
|
|
12236
|
+
const m = matchUnit(u, pool, originals);
|
|
12237
|
+
const doc = perDocument.get(u.path);
|
|
12238
|
+
doc.units++;
|
|
12239
|
+
if (m.grade === "exact" || m.grade === "normalized" || m.grade === "structural") {
|
|
12240
|
+
n.kept++;
|
|
12241
|
+
doc.kept++;
|
|
12242
|
+
continue;
|
|
12243
|
+
}
|
|
12244
|
+
if (m.grade === "estimated") {
|
|
12245
|
+
n.estimated++;
|
|
12246
|
+
doc.estimated++;
|
|
12247
|
+
} else if (m.grade === "review") {
|
|
12248
|
+
n.review++;
|
|
12249
|
+
doc.review++;
|
|
12250
|
+
if (m.reason === "fixedChanged") n.fixedChanged++;
|
|
12251
|
+
} else {
|
|
12252
|
+
n.missing++;
|
|
12253
|
+
doc.missing++;
|
|
12254
|
+
}
|
|
12255
|
+
items.push({ grade: m.grade, reason: m.reason, before: loc2(u), after: m.at ? loc2(m.at) : null, mandatory: u.mandatory, tags: u.tags });
|
|
12256
|
+
}
|
|
12257
|
+
const weight = (i) => (gone.has(i.before.path) ? 8 : 0) + (i.grade === "missing" ? 4 : i.reason === "fixedChanged" ? 2 : 0) + severity(i);
|
|
12258
|
+
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));
|
|
12259
|
+
const docs = [...perDocument.values()].filter((d) => d.units > 0 || d.status === "removed");
|
|
12260
|
+
docs.sort((a, b) => a.status === b.status ? a.path < b.path ? -1 : 1 : a.status === "removed" ? -1 : 1);
|
|
12261
|
+
const provided = before.texts.filter((t2) => isMd(t2.path)).length;
|
|
12262
|
+
const notVerified = { ...countNotVerified(touched), documents: Math.max(0, before.markdownRead - provided) };
|
|
12263
|
+
const verdict = touched.length === 0 ? "none" : n.missing + n.review > 0 ? "review" : n.estimated > 0 ? "estimated" : "clean";
|
|
12264
|
+
return { documents: docsBefore.length, removed, changed: touched.length - removed, units: units.length, ...n, verdict, perDocument: docs, items, notVerified };
|
|
12265
|
+
}
|
|
12266
|
+
|
|
12267
|
+
// ../core/src/compare.ts
|
|
12268
|
+
function compareRuns(a, b, folder2 = "") {
|
|
12269
|
+
const ids = [...new Set([...a.report.rules, ...b.report.rules].map((r) => r.ruleId))].filter((id) => id !== "INV-001");
|
|
12270
|
+
const count = (r, id) => r.rules.find((x) => x.ruleId === id)?.findings.length ?? 0;
|
|
12271
|
+
const total = (r) => r.rules.reduce((n, x) => n + x.findings.length, 0);
|
|
12272
|
+
const agents = (r) => (r.metrics.tokens?.active ?? []).filter((c) => c.files.length > 0).map((c) => c.platform);
|
|
12273
|
+
const seen = /* @__PURE__ */ new Set([...agents(a.report), ...agents(b.report)]);
|
|
12274
|
+
const tokens = PLATFORMS.filter((p) => seen.has(p)).map((platform) => {
|
|
12275
|
+
const before = measurableContext(a.report, platform, folder2)?.tokens ?? null;
|
|
12276
|
+
const after = measurableContext(b.report, platform, folder2)?.tokens ?? null;
|
|
12277
|
+
const both = before !== null && after !== null;
|
|
12278
|
+
return { platform, before, after, delta: both ? after - before : null, percent: both ? changePercent(before, after) : null };
|
|
12279
|
+
});
|
|
12280
|
+
const side = (s) => ({ docs: s.report.metrics.tokens?.docs ?? [], texts: s.texts, partial: s.report.coverage.partial });
|
|
12281
|
+
const preservation = PLATFORMS.filter((p) => agents(a.report).includes(p)).map((p) => comparePreservation(p, folder2, side(a), side(b))).filter((r) => r.units > 0);
|
|
12282
|
+
return {
|
|
12283
|
+
rules: ids.map((ruleId) => ({ ruleId, before: count(a.report, ruleId), after: count(b.report, ruleId) })),
|
|
12284
|
+
findings: { before: total(a.report), after: total(b.report) },
|
|
12285
|
+
tokens,
|
|
12286
|
+
preservation,
|
|
12287
|
+
documents: documentsOf(a, b),
|
|
12288
|
+
brokenLinks: brokenLinks(a.report, b.report)
|
|
12289
|
+
};
|
|
12290
|
+
}
|
|
12291
|
+
function documentsOf(a, b) {
|
|
12292
|
+
const instruction = new Set((a.report.metrics.tokens?.docs ?? []).map((d) => d.path));
|
|
12293
|
+
const markdownRead = a.report.rules.find((r) => r.ruleId === "MD-001")?.inspected ?? 0;
|
|
12294
|
+
return compareDocuments({ texts: a.texts, instruction, markdownRead }, { texts: b.texts });
|
|
12295
|
+
}
|
|
12296
|
+
function brokenLinks(a, b) {
|
|
12297
|
+
const md003 = (r) => r.rules.find((x) => x.ruleId === "MD-003")?.findings ?? [];
|
|
12298
|
+
const key = (path, target) => `${path}\0${String(target ?? "")}`;
|
|
12299
|
+
const before = new Set(md003(a).map((f) => key(f.location.path, f.params.target)));
|
|
12300
|
+
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 ?? "") }));
|
|
12301
|
+
}
|
|
12302
|
+
|
|
12303
|
+
// ../core/src/tools.ts
|
|
12304
|
+
var TOOLS = [
|
|
12305
|
+
{ id: "tokens", status: "live", rules: ["MD-002", "AI-001", "AI-002", "AI-003", "AI-004"], milestone: "M2", category: "ai-context" },
|
|
12306
|
+
{ id: "markdown", status: "live", rules: ["MD-001", "MD-003"], milestone: "M1\u2013M2", category: "documentation" },
|
|
12307
|
+
{ id: "secrets", status: "live", rules: ["SEC-001", "SEC-002"], milestone: "M3", category: "security" },
|
|
12308
|
+
{ id: "dependencies", status: "live", rules: ["DEP-001", "DEP-002"], milestone: "M3 (OSV with consent)", category: "security" },
|
|
12309
|
+
{ id: "mcp", status: "live", rules: ["MCP-001", "MCP-002"], milestone: "M3", category: "ai-context" },
|
|
12310
|
+
{ id: "agent-rules", status: "live", rules: ["AI-001", "AI-004", "AGT-001", "AGT-002", "DOC-001"], milestone: "P1", category: "ai-context" },
|
|
12311
|
+
{ id: "duplicates", status: "live", rules: ["DUP-001"], milestone: "P1", category: "code-quality" },
|
|
12312
|
+
{ id: "architecture", status: "live", rules: ["ARC-001", "ARC-002"], milestone: "P1", category: "architecture" },
|
|
12313
|
+
{ id: "deploy", status: "live", rules: ["OPS-001", "OPS-002", "OPS-003"], milestone: "P1", category: "deploy" }
|
|
12314
|
+
];
|
|
12315
|
+
var ALL_TOOLS = "all";
|
|
12316
|
+
function toolById(id) {
|
|
12317
|
+
return TOOLS.find((t2) => t2.id === id);
|
|
12318
|
+
}
|
|
12319
|
+
function resolveTool(id) {
|
|
12320
|
+
const tool2 = toolById(id);
|
|
12321
|
+
return tool2 && tool2.status === "live" ? tool2.id : ALL_TOOLS;
|
|
12322
|
+
}
|
|
12323
|
+
function rulesFor(selection) {
|
|
12324
|
+
const tools = selection === ALL_TOOLS ? TOOLS.filter((t2) => t2.status === "live") : TOOLS.filter((t2) => t2.id === selection);
|
|
12325
|
+
return ["INV-001", ...new Set(tools.flatMap((t2) => t2.rules))];
|
|
12326
|
+
}
|
|
12327
|
+
function filterReport(report, selection) {
|
|
12328
|
+
const ids = new Set(rulesFor(selection));
|
|
12329
|
+
return {
|
|
12330
|
+
...report,
|
|
12331
|
+
rules: report.rules.filter((r) => ids.has(r.ruleId)),
|
|
12332
|
+
metrics: {
|
|
12333
|
+
...report.metrics,
|
|
12334
|
+
tokens: ids.has("AI-002") ? report.metrics.tokens : null,
|
|
12335
|
+
dependencies: ids.has("DEP-001") ? report.metrics.dependencies ?? null : null,
|
|
12336
|
+
duplicates: ids.has("DUP-001") ? report.metrics.duplicates : void 0,
|
|
12337
|
+
architecture: ids.has("ARC-001") ? report.metrics.architecture : void 0,
|
|
12338
|
+
deploy: ids.has("OPS-001") ? report.metrics.deploy : void 0
|
|
12339
|
+
}
|
|
11636
12340
|
};
|
|
11637
12341
|
}
|
|
11638
12342
|
|
|
@@ -11658,7 +12362,7 @@ function badgeSvg(label, message, color) {
|
|
|
11658
12362
|
}
|
|
11659
12363
|
|
|
11660
12364
|
// src/run.ts
|
|
11661
|
-
import { lstatSync, readdirSync, readFileSync } from "node:fs";
|
|
12365
|
+
import { lstatSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
11662
12366
|
import { basename, join as join3, resolve } from "node:path";
|
|
11663
12367
|
var SKIP_DIRS = /* @__PURE__ */ new Set([".git", ".hg", ".svn", "node_modules", ".pnpm-store", ".yarn", ".next", ".nuxt", ".turbo", ".cache", ".venv", "venv", "__pycache__", "target", ".gradle"]);
|
|
11664
12368
|
function listFolder(root, opts) {
|
|
@@ -11729,6 +12433,14 @@ function cliLimits(maxFiles = 5e4, maxReadMb = 512) {
|
|
|
11729
12433
|
}
|
|
11730
12434
|
async function runFolder(root, o) {
|
|
11731
12435
|
const started = Date.now();
|
|
12436
|
+
let st;
|
|
12437
|
+
try {
|
|
12438
|
+
st = statSync(root);
|
|
12439
|
+
} catch (e) {
|
|
12440
|
+
if (e.code === "ENOENT") throw Object.assign(new Error("folder not found"), { code: "RR_FOLDER_NOT_FOUND" });
|
|
12441
|
+
throw e;
|
|
12442
|
+
}
|
|
12443
|
+
if (!st.isDirectory()) throw Object.assign(new Error("not a folder"), { code: "RR_NOT_A_FOLDER" });
|
|
11732
12444
|
const limits = cliLimits(o.maxFiles, o.maxReadMb);
|
|
11733
12445
|
const tool2 = resolveTool(o.tool);
|
|
11734
12446
|
const listing = listFolder(root, { maxFiles: limits.maxDiscoveredFiles, useIgnoreFiles: o.useIgnoreFiles ?? true, ignore: o.ignore ?? [] });
|
|
@@ -11763,15 +12475,159 @@ function shouldFail(r, failOn) {
|
|
|
11763
12475
|
}
|
|
11764
12476
|
|
|
11765
12477
|
// src/version.ts
|
|
11766
|
-
var VERSION = "0.4.
|
|
12478
|
+
var VERSION = "0.4.2";
|
|
11767
12479
|
|
|
11768
12480
|
// src/mcp.ts
|
|
11769
12481
|
import { createInterface } from "node:readline";
|
|
11770
|
-
import { statSync } from "node:fs";
|
|
12482
|
+
import { statSync as statSync2 } from "node:fs";
|
|
11771
12483
|
import { resolve as resolve2 } from "node:path";
|
|
11772
12484
|
|
|
12485
|
+
// src/compare.ts
|
|
12486
|
+
import * as nodePath from "node:path";
|
|
12487
|
+
var COMPARE_SCHEMA_VERSION = "1.0.0";
|
|
12488
|
+
function tokenChangeText(c, locale) {
|
|
12489
|
+
if (c.before === null || c.after === null || c.delta === null) return null;
|
|
12490
|
+
const delta = c.delta > 0 ? `+${c.delta}` : String(c.delta);
|
|
12491
|
+
const change = c.delta === 0 ? t(locale, "cli.compare.same") : c.percent === null ? t(locale, "cli.compare.noRate") : t(locale, c.delta < 0 ? "cli.compare.fewer" : "cli.compare.more", { percent: Math.abs(c.percent) === 0 ? "<1" : String(Math.abs(c.percent)) });
|
|
12492
|
+
return t(locale, "cli.compare.tokenLine", { agent: t(locale, `platform.${c.platform}`), before: c.before, after: c.after, delta, change });
|
|
12493
|
+
}
|
|
12494
|
+
function renderCompare(c, tool2, locale) {
|
|
12495
|
+
const L = (key, params = {}) => t(locale, `cli.${key}`, params);
|
|
12496
|
+
const lines = [L("compare.title", { tool: tool2 }), "", `${L("compare.rule").padEnd(9)} ${L("compare.before").padStart(6)} ${L("compare.after").padStart(5)}`];
|
|
12497
|
+
for (const r of c.rules) lines.push(`${r.ruleId.padEnd(9)} ${String(r.before).padStart(6)} ${String(r.after).padStart(5)}`);
|
|
12498
|
+
lines.push(`${L("compare.total").padEnd(9)} ${String(c.findings.before).padStart(6)} ${String(c.findings.after).padStart(5)}`, "");
|
|
12499
|
+
lines.push(L("compare.tokens"));
|
|
12500
|
+
if (c.tokens.length === 0) lines.push(` ${L("compare.noAgents")}`);
|
|
12501
|
+
for (const x of c.tokens) lines.push(` ${tokenChangeText(x, locale) ?? L("compare.notComparable", { agent: t(locale, `platform.${x.platform}`) })}`);
|
|
12502
|
+
lines.push(` ${L("compare.limits")}`, "", L("keep.title"), ` ${L("keep.scope")}`);
|
|
12503
|
+
if (c.preservation.length === 0) lines.push(` ${L("keep.none")}`);
|
|
12504
|
+
const item = (i) => {
|
|
12505
|
+
const where3 = i.after ? ` -> ${i.after.path}:${i.after.line}` : "";
|
|
12506
|
+
const reason = i.reason ? ` (${L(`keep.reason.${i.reason}`)})` : "";
|
|
12507
|
+
return ` ${i.before.path}:${i.before.line}${where3} ${L(`keep.grade.${i.grade}`)}${reason}${i.mandatory ? ` [${L("keep.mandatory")}]` : ""} ${i.before.preview}`;
|
|
12508
|
+
};
|
|
12509
|
+
const unchecked = (n) => n.codeBlocks + n.html + n.images + n.documents > 0;
|
|
12510
|
+
for (const r of c.preservation) {
|
|
12511
|
+
const verdict = r.verdict === "unknown" ? L("keep.verdict.unknown", { reasons: r.unknownReasons.map((x) => L(`keep.unknown.${x}`)).join(", ") }) : L(`keep.verdict.${r.verdict}`);
|
|
12512
|
+
lines.push(
|
|
12513
|
+
` ${L("keep.line", {
|
|
12514
|
+
agent: t(locale, `platform.${r.platform}`),
|
|
12515
|
+
units: r.units,
|
|
12516
|
+
mandatory: r.mandatory,
|
|
12517
|
+
kept: r.kept,
|
|
12518
|
+
estimated: r.estimated,
|
|
12519
|
+
review: r.review,
|
|
12520
|
+
fixed: r.fixedChanged,
|
|
12521
|
+
missing: r.missing,
|
|
12522
|
+
scope: r.scopeReduced,
|
|
12523
|
+
duplicates: r.removedDuplicates,
|
|
12524
|
+
added: r.added,
|
|
12525
|
+
verdict
|
|
12526
|
+
})}`
|
|
12527
|
+
);
|
|
12528
|
+
for (const i of r.items.slice(0, 10)) lines.push(item(i));
|
|
12529
|
+
if (r.items.length > 10) lines.push(` ${L("keep.more", { count: r.items.length - 10 })}`);
|
|
12530
|
+
if (unchecked(r.notVerified)) lines.push(` ${L("keep.notVerified", { code: r.notVerified.codeBlocks, html: r.notVerified.html, images: r.notVerified.images })}`);
|
|
12531
|
+
}
|
|
12532
|
+
const d = c.documents;
|
|
12533
|
+
lines.push("", L("docs.title"));
|
|
12534
|
+
if (d.verdict === "none") lines.push(` ${L("docs.none", { documents: d.documents })}`);
|
|
12535
|
+
else {
|
|
12536
|
+
lines.push(
|
|
12537
|
+
` ${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}`) })}`
|
|
12538
|
+
);
|
|
12539
|
+
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 })}`);
|
|
12540
|
+
for (const i of d.items.slice(0, 10)) lines.push(item(i));
|
|
12541
|
+
if (d.items.length > 10) lines.push(` ${L("keep.more", { count: d.items.length - 10 })}`);
|
|
12542
|
+
}
|
|
12543
|
+
if (unchecked(d.notVerified) || d.verdict !== "none") {
|
|
12544
|
+
lines.push(` ${L("docs.notVerified", { code: d.notVerified.codeBlocks, html: d.notVerified.html, images: d.notVerified.images, documents: d.notVerified.documents })}`);
|
|
12545
|
+
}
|
|
12546
|
+
if (c.brokenLinks.length) {
|
|
12547
|
+
lines.push("", L("links.title"));
|
|
12548
|
+
for (const l of c.brokenLinks.slice(0, 20)) lines.push(` ${l.path}:${l.line} -> ${l.target}`);
|
|
12549
|
+
if (c.brokenLinks.length > 20) lines.push(` ${L("keep.more", { count: c.brokenLinks.length - 20 })}`);
|
|
12550
|
+
}
|
|
12551
|
+
return lines.join("\n") + "\n";
|
|
12552
|
+
}
|
|
12553
|
+
function compareJson(c, tool2, locale) {
|
|
12554
|
+
const agent = (p) => t(locale, `platform.${p}`);
|
|
12555
|
+
const item = (i) => ({
|
|
12556
|
+
before: `${i.before.path}:${i.before.line}`,
|
|
12557
|
+
after: i.after ? `${i.after.path}:${i.after.line}` : null,
|
|
12558
|
+
grade: i.grade,
|
|
12559
|
+
reason: i.reason,
|
|
12560
|
+
mandatory: i.mandatory,
|
|
12561
|
+
text: i.before.preview
|
|
12562
|
+
});
|
|
12563
|
+
const nv = (n) => ({ code_blocks: n.codeBlocks, html: n.html, images: n.images, documents: n.documents });
|
|
12564
|
+
const d = c.documents;
|
|
12565
|
+
return {
|
|
12566
|
+
kind: "reporefit-compare",
|
|
12567
|
+
schema_version: COMPARE_SCHEMA_VERSION,
|
|
12568
|
+
engine: ENGINE_VERSION,
|
|
12569
|
+
ruleset: RULESET_VERSION,
|
|
12570
|
+
tool: tool2,
|
|
12571
|
+
findings: c.findings,
|
|
12572
|
+
rules: c.rules.filter((r) => r.before || r.after).map((r) => ({ rule: r.ruleId, before: r.before, after: r.after })),
|
|
12573
|
+
// percent: signed change rounded to an integer (negative = fewer tokens), null when the original had 0 tokens.
|
|
12574
|
+
tokens: c.tokens.map((x) => ({
|
|
12575
|
+
agent: x.platform,
|
|
12576
|
+
name: agent(x.platform),
|
|
12577
|
+
before: x.before,
|
|
12578
|
+
after: x.after,
|
|
12579
|
+
change: x.delta,
|
|
12580
|
+
percent: x.percent,
|
|
12581
|
+
summary: tokenChangeText(x, locale) ?? t(locale, "cli.compare.notComparable", { agent: agent(x.platform) })
|
|
12582
|
+
})),
|
|
12583
|
+
token_note: t(locale, "cli.compare.limits"),
|
|
12584
|
+
preservation: c.preservation.map((r) => ({
|
|
12585
|
+
agent: r.platform,
|
|
12586
|
+
name: agent(r.platform),
|
|
12587
|
+
rules: r.units,
|
|
12588
|
+
mandatory: r.mandatory,
|
|
12589
|
+
kept: r.kept,
|
|
12590
|
+
probably_same: r.estimated,
|
|
12591
|
+
review: r.review,
|
|
12592
|
+
fixed_tokens_changed: r.fixedChanged,
|
|
12593
|
+
possible_losses: r.missing,
|
|
12594
|
+
out_of_scope: r.scopeReduced,
|
|
12595
|
+
duplicates_removed: r.removedDuplicates,
|
|
12596
|
+
new: r.added,
|
|
12597
|
+
verdict: r.verdict,
|
|
12598
|
+
items: r.items.slice(0, 20).map(item),
|
|
12599
|
+
not_verified: nv(r.notVerified)
|
|
12600
|
+
})),
|
|
12601
|
+
documents: {
|
|
12602
|
+
documents: d.documents,
|
|
12603
|
+
removed: d.removed,
|
|
12604
|
+
changed: d.changed,
|
|
12605
|
+
units: d.units,
|
|
12606
|
+
kept: d.kept,
|
|
12607
|
+
probably_same: d.estimated,
|
|
12608
|
+
review: d.review,
|
|
12609
|
+
fixed_tokens_changed: d.fixedChanged,
|
|
12610
|
+
possible_losses: d.missing,
|
|
12611
|
+
verdict: d.verdict,
|
|
12612
|
+
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 })),
|
|
12613
|
+
items: d.items.slice(0, 50).map(item),
|
|
12614
|
+
not_verified: nv(d.notVerified),
|
|
12615
|
+
note: t(locale, "cli.docs.scopeNote")
|
|
12616
|
+
},
|
|
12617
|
+
broken_links: c.brokenLinks
|
|
12618
|
+
};
|
|
12619
|
+
}
|
|
12620
|
+
function badgeLink(folder2, file, path = nodePath) {
|
|
12621
|
+
const rel = path.relative(path.resolve(folder2), path.resolve(file));
|
|
12622
|
+
if (!rel || rel === ".." || rel.startsWith(`..${path.sep}`) || path.isAbsolute(rel)) return null;
|
|
12623
|
+
const url = rel.split(path.sep).join("/").replace(/ /g, "%20").replace(/\(/g, "%28").replace(/\)/g, "%29");
|
|
12624
|
+
return `[](https://reporefit.com/)`;
|
|
12625
|
+
}
|
|
12626
|
+
|
|
11773
12627
|
// ../ui/rule-docs.ts
|
|
11774
12628
|
var RULE_ORDER = ["MD-001", "MD-003", "MD-002", "AI-001", "AI-002", "AI-003", "AI-004", "SEC-001", "SEC-002", "DEP-001", "DEP-002", "MCP-001", "MCP-002", "AGT-001", "AGT-002", "DOC-001", "DUP-001", "ARC-001", "ARC-002", "OPS-001", "OPS-002", "OPS-003"];
|
|
12629
|
+
var SCOPE_SUFFIX = { "SEC-002": ".local", "MD-001": ".m2", "MD-002": ".all", "MD-003": ".m1", "AI-001": ".m2", "AI-002": ".m2", "AI-003": ".m2", "AI-004": ".m2" };
|
|
12630
|
+
var ruleScopeKey = (id) => `${id.toLowerCase().replace("-", "")}.scope${SCOPE_SUFFIX[id] ?? ""}`;
|
|
11775
12631
|
var ruleDocs = {
|
|
11776
12632
|
en: {
|
|
11777
12633
|
"MD-001": { why: "Skipped heading levels (an h1 followed by an h3) break the outline that readers, screen readers and AI tools use to navigate a document.", fix: "Lower the heading by one level at a time, or add the missing parent heading." },
|
|
@@ -11915,10 +12771,23 @@ var toolsList = [
|
|
|
11915
12771
|
description: "Explain one rule: what it checks, why it matters and how to fix it.",
|
|
11916
12772
|
inputSchema: { type: "object", properties: { rule_id: { type: "string", enum: [...RULE_ORDER] }, lang: { type: "string", enum: ["en", "ko", "ja", "zh-Hans"] } }, required: ["rule_id"] },
|
|
11917
12773
|
annotations: { readOnlyHint: true, openWorldHint: false }
|
|
12774
|
+
},
|
|
12775
|
+
{
|
|
12776
|
+
name: "compare",
|
|
12777
|
+
description: "Compare two copies of a local project, for example before and after editing AGENTS.md or CLAUDE.md: findings per rule, estimated instruction tokens for each agent that reads instruction files (Codex, Claude Code, Gemini CLI, GitHub Copilot, Cursor, Grok, Antigravity) with the change and the rate, and which rules were kept, need review or may be lost. Read-only; the same comparison as the reporefit compare command.",
|
|
12778
|
+
inputSchema: {
|
|
12779
|
+
type: "object",
|
|
12780
|
+
properties: {
|
|
12781
|
+
before: { type: "string", description: "Original project folder." },
|
|
12782
|
+
after: { type: "string", description: "Edited copy of the project." },
|
|
12783
|
+
tool: { type: "string", enum: TOOL_IDS, description: "Which checks to run. Default all." },
|
|
12784
|
+
lang: { type: "string", enum: ["en", "ko", "ja", "zh-Hans"], description: "Language of the summaries. Default en." }
|
|
12785
|
+
},
|
|
12786
|
+
required: ["before", "after"]
|
|
12787
|
+
},
|
|
12788
|
+
annotations: { readOnlyHint: true, openWorldHint: false }
|
|
11918
12789
|
}
|
|
11919
12790
|
];
|
|
11920
|
-
var SUFFIX = { "SEC-002": ".local", "MD-001": ".m2", "MD-002": ".m2", "MD-003": ".m1", "AI-001": ".m2", "AI-002": ".m2", "AI-003": ".m2", "AI-004": ".m2" };
|
|
11921
|
-
var scopeKey = (id) => `${id.toLowerCase().replace("-", "")}.scope${SUFFIX[id] ?? ""}`;
|
|
11922
12791
|
var ToolError = class extends Error {
|
|
11923
12792
|
};
|
|
11924
12793
|
function folder(p) {
|
|
@@ -11926,7 +12795,7 @@ function folder(p) {
|
|
|
11926
12795
|
const abs = resolve2(p);
|
|
11927
12796
|
let st;
|
|
11928
12797
|
try {
|
|
11929
|
-
st =
|
|
12798
|
+
st = statSync2(abs);
|
|
11930
12799
|
} catch {
|
|
11931
12800
|
throw new ToolError(`Folder not found: ${abs}`);
|
|
11932
12801
|
}
|
|
@@ -11948,7 +12817,8 @@ function summarize(r, locale, max) {
|
|
|
11948
12817
|
status: r.findings.length ? "findings" : c.partial ? "partial-clean" : "clean",
|
|
11949
12818
|
checks: { evaluated: r.evaluated, passed: r.passed },
|
|
11950
12819
|
findings_total: r.findings.length,
|
|
11951
|
-
|
|
12820
|
+
// Every finding is in exactly one severity: the parts add up to findings_total (info included).
|
|
12821
|
+
by_severity: { high: r.bySeverity.high, medium: r.bySeverity.medium, low: r.bySeverity.low, info: r.bySeverity.info },
|
|
11952
12822
|
coverage: { files_listed: c.discovered, files_read: c.inspected, partial: c.partial, reasons: c.reasons.map((x) => t(locale, `coverage.${x.code}`, x.params)) },
|
|
11953
12823
|
findings: r.findings.slice(0, max).map((f) => ({
|
|
11954
12824
|
rule: f.ruleId,
|
|
@@ -11983,17 +12853,24 @@ async function callTool(name, args) {
|
|
|
11983
12853
|
const id = args.rule_id;
|
|
11984
12854
|
if (typeof id !== "string" || !RULE_ORDER.includes(id)) throw new ToolError(`Unknown rule: ${String(id)}`);
|
|
11985
12855
|
const d = ruleDocs[locale][id];
|
|
11986
|
-
return JSON.stringify({ id, name: t(locale, `rule.${id}`), checks: t(locale,
|
|
12856
|
+
return JSON.stringify({ id, name: t(locale, `rule.${id}`), checks: t(locale, ruleScopeKey(id)), why: d.why, fix: d.fix, docs: ruleDocUrl(locale, id) }, null, 2);
|
|
12857
|
+
}
|
|
12858
|
+
if (name === "compare") {
|
|
12859
|
+
const opts = { tool: tool(args.tool) };
|
|
12860
|
+
const a = await runFolder(folder(args.before), opts);
|
|
12861
|
+
const b = await runFolder(folder(args.after), opts);
|
|
12862
|
+
const c = compareRuns({ report: a.report, texts: a.instructionTexts }, { report: b.report, texts: b.instructionTexts });
|
|
12863
|
+
return JSON.stringify(compareJson(c, a.tool, locale), null, 2);
|
|
11987
12864
|
}
|
|
11988
12865
|
throw new ToolError(`Unknown tool: ${name}`);
|
|
11989
12866
|
}
|
|
11990
|
-
async function handle(
|
|
11991
|
-
const reply = (result) => ({ jsonrpc: "2.0", id:
|
|
11992
|
-
const fail = (code2, message) => ({ jsonrpc: "2.0", id:
|
|
11993
|
-
if (
|
|
11994
|
-
switch (
|
|
12867
|
+
async function handle(msg2) {
|
|
12868
|
+
const reply = (result) => ({ jsonrpc: "2.0", id: msg2.id, result });
|
|
12869
|
+
const fail = (code2, message) => ({ jsonrpc: "2.0", id: msg2.id ?? null, error: { code: code2, message } });
|
|
12870
|
+
if (msg2.id === void 0) return null;
|
|
12871
|
+
switch (msg2.method) {
|
|
11995
12872
|
case "initialize": {
|
|
11996
|
-
const asked = String(
|
|
12873
|
+
const asked = String(msg2.params?.protocolVersion ?? "");
|
|
11997
12874
|
return reply({
|
|
11998
12875
|
protocolVersion: PROTOCOLS.includes(asked) ? asked : PROTOCOLS[0],
|
|
11999
12876
|
capabilities: { tools: { listChanged: false } },
|
|
@@ -12006,8 +12883,8 @@ async function handle(msg3) {
|
|
|
12006
12883
|
case "tools/list":
|
|
12007
12884
|
return reply({ tools: toolsList });
|
|
12008
12885
|
case "tools/call": {
|
|
12009
|
-
const name = String(
|
|
12010
|
-
const args =
|
|
12886
|
+
const name = String(msg2.params?.name ?? "");
|
|
12887
|
+
const args = msg2.params?.arguments ?? {};
|
|
12011
12888
|
try {
|
|
12012
12889
|
return reply({ content: [{ type: "text", text: await callTool(name, args) }], isError: false });
|
|
12013
12890
|
} catch (e) {
|
|
@@ -12016,21 +12893,21 @@ async function handle(msg3) {
|
|
|
12016
12893
|
}
|
|
12017
12894
|
}
|
|
12018
12895
|
default:
|
|
12019
|
-
return fail(-32601, `Method not found: ${
|
|
12896
|
+
return fail(-32601, `Method not found: ${msg2.method}`);
|
|
12020
12897
|
}
|
|
12021
12898
|
}
|
|
12022
12899
|
function serveStdio() {
|
|
12023
12900
|
const rl = createInterface({ input: process.stdin });
|
|
12024
12901
|
rl.on("line", async (line) => {
|
|
12025
12902
|
if (!line.trim()) return;
|
|
12026
|
-
let
|
|
12903
|
+
let msg2;
|
|
12027
12904
|
try {
|
|
12028
|
-
|
|
12905
|
+
msg2 = JSON.parse(line);
|
|
12029
12906
|
} catch {
|
|
12030
12907
|
process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id: null, error: { code: -32700, message: "Parse error" } }) + "\n");
|
|
12031
12908
|
return;
|
|
12032
12909
|
}
|
|
12033
|
-
const out = await handle(
|
|
12910
|
+
const out = await handle(msg2);
|
|
12034
12911
|
if (out) process.stdout.write(JSON.stringify(out) + "\n");
|
|
12035
12912
|
});
|
|
12036
12913
|
process.stderr.write(`RepoRefit MCP server ${VERSION} ready (stdio, read-only, no network)
|
|
@@ -12038,6 +12915,17 @@ function serveStdio() {
|
|
|
12038
12915
|
}
|
|
12039
12916
|
|
|
12040
12917
|
// src/cli.ts
|
|
12918
|
+
var SCAN_OPTIONS = ["tool", "lang", "fail-on", "ignore", "max-files", "max-read-mb", "no-gitignore", "quiet"];
|
|
12919
|
+
var OPTIONS = {
|
|
12920
|
+
scan: [...SCAN_OPTIONS, "format", "out"],
|
|
12921
|
+
fix: [...SCAN_OPTIONS, "out"],
|
|
12922
|
+
report: [...SCAN_OPTIONS, "out"],
|
|
12923
|
+
badge: [...SCAN_OPTIONS, "out"],
|
|
12924
|
+
compare: [...SCAN_OPTIONS, "format", "out"],
|
|
12925
|
+
rules: ["tool", "lang"],
|
|
12926
|
+
mcp: []
|
|
12927
|
+
};
|
|
12928
|
+
var FORMATS = { scan: ["text", "json", "md", "fix"], compare: ["text", "json"] };
|
|
12041
12929
|
var DOCS = "https://reporefit.com/en/cli/";
|
|
12042
12930
|
var RULES_URL = (locale, id) => `https://reporefit.com/${locale === "zh-Hans" ? "zh-cn" : locale}/rules/#${id.toLowerCase()}`;
|
|
12043
12931
|
var HELP = `RepoRefit ${VERSION} (engine ${ENGINE_VERSION}, rules ${RULESET_VERSION})
|
|
@@ -12051,15 +12939,15 @@ Commands:
|
|
|
12051
12939
|
fix [folder] write an AI fix plan (Markdown) for Claude Code, Codex and others
|
|
12052
12940
|
report [folder] write reporefit-report.md and reporefit-report.json
|
|
12053
12941
|
badge [folder] write a README badge SVG (counts only)
|
|
12054
|
-
compare <before> <after> compare two copies
|
|
12942
|
+
compare <before> <after> compare two copies: findings, tokens per agent, rule and document preservation
|
|
12055
12943
|
rules list rule IDs with their documentation links
|
|
12056
12944
|
mcp run as an MCP server over stdio (for Claude Code, Cursor and other agents)
|
|
12057
12945
|
help | version
|
|
12058
12946
|
|
|
12059
12947
|
Options:
|
|
12060
12948
|
--tool <id> all (default), ${TOOLS.map((x) => x.id).join(", ")}
|
|
12061
|
-
--format <f> scan
|
|
12062
|
-
--out <path> output file (fix, badge,
|
|
12949
|
+
--format <f> scan: text (default), json, md, fix; compare: text (default), json
|
|
12950
|
+
--out <path> output file (scan, fix, badge, compare) or folder (report); missing folders are created
|
|
12063
12951
|
--lang <l> en (default), ko, ja, zh-Hans
|
|
12064
12952
|
--fail-on <s> exit 1 when a finding is at least: high, medium, low, none (default)
|
|
12065
12953
|
--ignore <glob> extra ignore pattern, gitignore syntax (repeatable)
|
|
@@ -12068,7 +12956,7 @@ Options:
|
|
|
12068
12956
|
--max-read-mb <n> stop reading after n MiB of text (default 512; reported as partial)
|
|
12069
12957
|
--quiet no progress on stderr
|
|
12070
12958
|
|
|
12071
|
-
Exit codes: 0 ok, 1 findings at or above --fail-on, 2 usage or
|
|
12959
|
+
Exit codes: 0 ok, 1 findings at or above --fail-on, 2 usage, read or write error, 130 cancelled.
|
|
12072
12960
|
Docs: ${DOCS}`;
|
|
12073
12961
|
var COMMANDS = /* @__PURE__ */ new Set(["scan", "fix", "report", "badge", "compare", "rules", "mcp", "help", "version"]);
|
|
12074
12962
|
var VALUED = /* @__PURE__ */ new Set(["tool", "format", "out", "lang", "fail-on", "ignore", "max-files", "max-read-mb"]);
|
|
@@ -12085,7 +12973,7 @@ function parse2(argv) {
|
|
|
12085
12973
|
else if (a.startsWith("--")) {
|
|
12086
12974
|
const eq = a.indexOf("=");
|
|
12087
12975
|
const k = eq > 0 ? a.slice(2, eq) : a.slice(2);
|
|
12088
|
-
if (!VALUED.has(k)) return `Unknown option: ${a}`;
|
|
12976
|
+
if (!VALUED.has(k)) return `Unknown option: ${a}${k === "json" ? " (use --format json)" : ""}`;
|
|
12089
12977
|
const v = eq > 0 ? a.slice(eq + 1) : argv[++i];
|
|
12090
12978
|
if (v === void 0) return `Missing value for --${k}`;
|
|
12091
12979
|
if (k === "ignore") ignore.push(v);
|
|
@@ -12102,19 +12990,58 @@ var where2 = (locale, f) => f.line ? `${f.path}:${f.line}` : t(locale, "report.p
|
|
|
12102
12990
|
function renderText(r, locale) {
|
|
12103
12991
|
const rank = { high: 0, medium: 1, low: 2, info: 3, unknown: 4 };
|
|
12104
12992
|
const c = r.report.coverage;
|
|
12105
|
-
const lines = [
|
|
12106
|
-
for (const f of [...r.findings].sort((a,
|
|
12993
|
+
const lines = [t(locale, "cli.header", { tool: r.tool, read: c.inspected, listed: c.discovered, seconds: (r.elapsedMs / 1e3).toFixed(1) }), ""];
|
|
12994
|
+
for (const f of [...r.findings].sort((a, b2) => rank[a.severity] - rank[b2.severity])) {
|
|
12107
12995
|
lines.push(`${f.severity.padEnd(6)} ${f.ruleId.padEnd(8)} ${where2(locale, f.location)} ${t(locale, f.messageKey, f.params)}`);
|
|
12108
12996
|
}
|
|
12109
12997
|
if (!r.findings.length) lines.push(t(locale, "report.noFindings"));
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
}
|
|
12114
|
-
if (r.
|
|
12115
|
-
if (r.findings.length) lines.push(`Rule details: ${RULES_URL(locale, r.findings[0].ruleId).replace(/#.*$/, "")}`);
|
|
12998
|
+
const b = r.bySeverity;
|
|
12999
|
+
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 }));
|
|
13000
|
+
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") }));
|
|
13001
|
+
if (r.listing.skippedSymlinks) lines.push(t(locale, "cli.symlinks", { count: r.listing.skippedSymlinks }));
|
|
13002
|
+
if (r.findings.length) lines.push(t(locale, "cli.ruleDetails", { url: RULES_URL(locale, r.findings[0].ruleId).replace(/#.*$/, "") }));
|
|
12116
13003
|
return lines.join("\n") + "\n";
|
|
12117
13004
|
}
|
|
13005
|
+
function fsReason(e, locale = "en") {
|
|
13006
|
+
const code2 = e.code;
|
|
13007
|
+
const key = {
|
|
13008
|
+
EACCES: "permission",
|
|
13009
|
+
EPERM: "permission",
|
|
13010
|
+
ENOTDIR: "fileInPath",
|
|
13011
|
+
EEXIST: "fileInPath",
|
|
13012
|
+
EISDIR: "isFolder",
|
|
13013
|
+
ENOENT: "missingPath",
|
|
13014
|
+
ENOSPC: "diskFull",
|
|
13015
|
+
EROFS: "readOnly",
|
|
13016
|
+
ENAMETOOLONG: "tooLong",
|
|
13017
|
+
RR_FOLDER_NOT_FOUND: "notFound",
|
|
13018
|
+
RR_NOT_A_FOLDER: "notFolder"
|
|
13019
|
+
};
|
|
13020
|
+
return code2 && key[code2] ? t(locale, `cli.reason.${key[code2]}`) : e.message;
|
|
13021
|
+
}
|
|
13022
|
+
function writeOutput(io, locale, file, text3) {
|
|
13023
|
+
try {
|
|
13024
|
+
mkdirSync(dirname2(resolve3(file)), { recursive: true });
|
|
13025
|
+
writeFileSync(file, text3);
|
|
13026
|
+
return true;
|
|
13027
|
+
} catch (e) {
|
|
13028
|
+
io.err(t(locale, "cli.cannotWrite", { path: file, reason: fsReason(e, locale) }) + "\n");
|
|
13029
|
+
return false;
|
|
13030
|
+
}
|
|
13031
|
+
}
|
|
13032
|
+
function prepareFolder(io, locale, dir) {
|
|
13033
|
+
try {
|
|
13034
|
+
if (statSync3(dir, { throwIfNoEntry: false })?.isFile()) {
|
|
13035
|
+
io.err(t(locale, "cli.reportIsFile", { path: dir }) + "\n");
|
|
13036
|
+
return false;
|
|
13037
|
+
}
|
|
13038
|
+
mkdirSync(dir, { recursive: true });
|
|
13039
|
+
return true;
|
|
13040
|
+
} catch (e) {
|
|
13041
|
+
io.err(t(locale, "cli.cannotCreate", { path: dir, reason: fsReason(e, locale) }) + "\n");
|
|
13042
|
+
return false;
|
|
13043
|
+
}
|
|
13044
|
+
}
|
|
12118
13045
|
function badgeFor(r) {
|
|
12119
13046
|
const d = { tool: r.tool, evaluated: r.evaluated, passed: r.passed, findings: r.findings.length, high: r.bySeverity.high };
|
|
12120
13047
|
return badgeSvg("RepoRefit", badgeMessage(d) + (r.report.coverage.partial ? " (partial)" : ""), badgeColor(d));
|
|
@@ -12144,6 +13071,11 @@ Run "reporefit help" for usage.
|
|
|
12144
13071
|
if (command === "version") return io.out(`${VERSION} (engine ${ENGINE_VERSION}, rules ${RULESET_VERSION})
|
|
12145
13072
|
`), 0;
|
|
12146
13073
|
const locale = toLocale(opts.lang ?? "en") ?? "en";
|
|
13074
|
+
const given = [...Object.keys(opts), ...p.flags, ...p.ignore.length ? ["ignore"] : []].filter((k) => k !== "help" && k !== "version");
|
|
13075
|
+
const unused = OPTIONS[command] ? given.find((k) => !OPTIONS[command].includes(k)) : void 0;
|
|
13076
|
+
if (unused) return io.err(`Option --${unused} is not used by ${command}.
|
|
13077
|
+
Run "reporefit help" for usage.
|
|
13078
|
+
`), 2;
|
|
12147
13079
|
if (command === "mcp") {
|
|
12148
13080
|
serveStdio();
|
|
12149
13081
|
return new Promise(() => {
|
|
@@ -12156,7 +13088,8 @@ Run "reporefit help" for usage.
|
|
|
12156
13088
|
return 0;
|
|
12157
13089
|
}
|
|
12158
13090
|
const format = opts.format ?? "text";
|
|
12159
|
-
|
|
13091
|
+
const formats = FORMATS[command] ?? ["text"];
|
|
13092
|
+
if (!formats.includes(format)) return io.err(`Unknown --format for ${command}: ${format} (use ${formats.join(", ")})
|
|
12160
13093
|
`), 2;
|
|
12161
13094
|
const failOn = opts["fail-on"] ?? "none";
|
|
12162
13095
|
if (!["high", "medium", "low", "none"].includes(failOn)) return io.err(`Unknown --fail-on: ${failOn}
|
|
@@ -12180,8 +13113,7 @@ Run "reporefit help" for usage.
|
|
|
12180
13113
|
return await runFolder(folder2, runOpts);
|
|
12181
13114
|
} catch (e) {
|
|
12182
13115
|
if (e instanceof ScanCancelledError) return io.err("\nCancelled.\n"), 130;
|
|
12183
|
-
io.err(
|
|
12184
|
-
`);
|
|
13116
|
+
io.err(t(locale, "cli.cannotRead", { path: folder2, reason: fsReason(e, locale) }) + "\n");
|
|
12185
13117
|
return 2;
|
|
12186
13118
|
}
|
|
12187
13119
|
};
|
|
@@ -12191,62 +13123,41 @@ Run "reporefit help" for usage.
|
|
|
12191
13123
|
if (typeof a === "number") return a;
|
|
12192
13124
|
const b = await scan(args[1]);
|
|
12193
13125
|
if (typeof b === "number") return b;
|
|
12194
|
-
const
|
|
12195
|
-
const
|
|
12196
|
-
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
const ta = measurableContext(a.report, "claude", "");
|
|
12200
|
-
const tb = measurableContext(b.report, "claude", "");
|
|
12201
|
-
lines.push("", ta && tb ? `Estimated tokens (Claude Code at /): ${ta.tokens} -> ${tb.tokens} (${tb.tokens - ta.tokens >= 0 ? "+" : ""}${tb.tokens - ta.tokens})` : "Estimated tokens: not comparable (instruction files missing, conditional or partly read).");
|
|
12202
|
-
lines.push("", ...preservationLines(a, b, locale));
|
|
12203
|
-
io.out(lines.join("\n") + "\n");
|
|
13126
|
+
const c = compareRuns({ report: a.report, texts: a.instructionTexts }, { report: b.report, texts: b.instructionTexts });
|
|
13127
|
+
const text3 = format === "json" ? JSON.stringify(compareJson(c, a.tool, locale), null, 2) + "\n" : renderCompare(c, a.tool, locale);
|
|
13128
|
+
if (opts.out) {
|
|
13129
|
+
if (!writeOutput(io, locale, opts.out, text3)) return 2;
|
|
13130
|
+
} else io.out(text3);
|
|
12204
13131
|
return shouldFail(b, failOn) ? 1 : 0;
|
|
12205
13132
|
}
|
|
12206
13133
|
const r = await scan(args[0] ?? ".");
|
|
12207
13134
|
if (typeof r === "number") return r;
|
|
12208
13135
|
if (command === "fix") {
|
|
12209
13136
|
const md = renderFixPlan(r.report, locale);
|
|
12210
|
-
if (opts.out)
|
|
12211
|
-
|
|
13137
|
+
if (opts.out) {
|
|
13138
|
+
if (!writeOutput(io, locale, opts.out, md)) return 2;
|
|
13139
|
+
} else io.out(md);
|
|
12212
13140
|
} else if (command === "report") {
|
|
12213
13141
|
const dir = opts.out ?? ".";
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
13142
|
+
if (!prepareFolder(io, locale, dir)) return 2;
|
|
13143
|
+
if (!writeOutput(io, locale, join4(dir, "reporefit-report.md"), renderMarkdownReport(r.report, locale))) return 2;
|
|
13144
|
+
if (!writeOutput(io, locale, join4(dir, "reporefit-report.json"), renderJsonReport(r.report))) return 2;
|
|
13145
|
+
io.out(t(locale, "cli.wroteReport", { md: join4(dir, "reporefit-report.md"), json: join4(dir, "reporefit-report.json") }) + "\n");
|
|
12218
13146
|
} else if (command === "badge") {
|
|
12219
13147
|
const file = opts.out ?? "reporefit-badge.svg";
|
|
12220
|
-
|
|
12221
|
-
|
|
13148
|
+
if (!writeOutput(io, locale, file, badgeFor(r))) return 2;
|
|
13149
|
+
const folder2 = args[0] ?? ".";
|
|
13150
|
+
const link = badgeLink(folder2, file);
|
|
13151
|
+
io.out(`${t(locale, "cli.wroteBadge", { file })} ${link ? t(locale, "cli.badgeReadme", { snippet: link }) : t(locale, "cli.badgeOutside", { folder: resolve3(folder2) })}
|
|
12222
13152
|
`);
|
|
12223
13153
|
} else {
|
|
12224
13154
|
const output = format === "json" ? renderJsonReport(r.report) : format === "md" ? renderMarkdownReport(r.report, locale) : format === "fix" ? renderFixPlan(r.report, locale) : renderText(r, locale);
|
|
12225
|
-
if (opts.out)
|
|
12226
|
-
|
|
13155
|
+
if (opts.out) {
|
|
13156
|
+
if (!writeOutput(io, locale, opts.out, output)) return 2;
|
|
13157
|
+
} else io.out(output);
|
|
12227
13158
|
}
|
|
12228
13159
|
return shouldFail(r, failOn) ? 1 : 0;
|
|
12229
13160
|
}
|
|
12230
|
-
function preservationLines(a, b, locale) {
|
|
12231
|
-
const side = (r) => ({ docs: r.report.metrics.tokens?.docs ?? [], texts: r.instructionTexts, partial: r.report.coverage.partial });
|
|
12232
|
-
const out = ["Rule preservation (string and structure checks only; a reworded rule goes to review, never counted as kept):"];
|
|
12233
|
-
const active = a.report.metrics.tokens?.active ?? [];
|
|
12234
|
-
if (active.length === 0) return [...out, " No instruction files in the original."];
|
|
12235
|
-
for (const ctx of active) {
|
|
12236
|
-
const r = comparePreservation(ctx.platform, "", side(a), side(b));
|
|
12237
|
-
if (r.units === 0) continue;
|
|
12238
|
-
const verdict = r.verdict === "clean" ? "no loss found in the checked scope" : r.verdict === "unknown" ? `cannot judge (${r.unknownReasons.join(", ")})` : "review the revised copy";
|
|
12239
|
-
out.push(
|
|
12240
|
-
` ${t(locale, `platform.${ctx.platform}`)} at /: ${r.units} rules (${r.mandatory} mandatory), kept ${r.kept}, review ${r.review} (fixed tokens changed ${r.fixedChanged}), possible losses ${r.missing}, out of scope ${r.scopeReduced}, duplicates removed ${r.removedDuplicates}, new ${r.added} -> ${verdict}`
|
|
12241
|
-
);
|
|
12242
|
-
for (const i of r.items.slice(0, 10)) {
|
|
12243
|
-
const where3 = i.after ? ` -> ${i.after.path}:${i.after.line}` : "";
|
|
12244
|
-
out.push(` ${i.before.path}:${i.before.line}${where3} ${i.grade}${i.reason ? ` (${i.reason})` : ""}${i.mandatory ? " [mandatory]" : ""} ${i.before.preview}`);
|
|
12245
|
-
}
|
|
12246
|
-
if (r.items.length > 10) out.push(` \u2026 ${r.items.length - 10} more`);
|
|
12247
|
-
}
|
|
12248
|
-
return out;
|
|
12249
|
-
}
|
|
12250
13161
|
|
|
12251
13162
|
// src/bin.ts
|
|
12252
13163
|
var controller = new AbortController();
|