reporefit 0.4.0 → 0.4.1
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 +993 -278
- 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.1";
|
|
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
|
}
|
|
@@ -8057,6 +8059,7 @@ function frontMatterFields(text3) {
|
|
|
8057
8059
|
}
|
|
8058
8060
|
return out;
|
|
8059
8061
|
}
|
|
8062
|
+
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
8063
|
function checkSkills(docs) {
|
|
8061
8064
|
const skills = docs.filter((d) => isSkillPath(d.path)).sort((a, b) => a.path < b.path ? -1 : 1);
|
|
8062
8065
|
const findings = [];
|
|
@@ -8087,6 +8090,9 @@ function checkSkills(docs) {
|
|
|
8087
8090
|
if (!fm.description) add(doc, "agt001.noDescription", {}, "medium");
|
|
8088
8091
|
else if (fm.description.length > 1024) add(doc, "agt001.longDescription", { length: fm.description.length }, "low");
|
|
8089
8092
|
if (blankFrontMatter(doc.text).body.trim() === "") add(doc, "agt001.emptyBody", {}, "low");
|
|
8093
|
+
const manualOnly = /^(true|yes|on|1)$/i.test(fm["disable-model-invocation"] ?? "");
|
|
8094
|
+
const effect = SIDE_EFFECT_RE.exec((fm.name || folder2).replace(/[-_]/g, " "));
|
|
8095
|
+
if (effect && !manualOnly && /(^|\/)\.claude\/skills\//.test(doc.path)) add(doc, "agt001.autoSideEffect", { name: fm.name || folder2, word: effect[0] }, "low");
|
|
8090
8096
|
}
|
|
8091
8097
|
return {
|
|
8092
8098
|
ruleId: "AGT-001",
|
|
@@ -8100,10 +8106,10 @@ function checkSkills(docs) {
|
|
|
8100
8106
|
};
|
|
8101
8107
|
}
|
|
8102
8108
|
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/
|
|
8109
|
+
/\b(?:use|using|run|with|prefer|always use)\s+(npm|pnpm|yarn|bun)\b/gi,
|
|
8110
|
+
/\b(npm|pnpm|yarn|bun)\s*(?:을|를|만)?\s*(?:사용|쓴다|쓰세요|씁니다|써 ?주세요|이용)/gi,
|
|
8111
|
+
/\b(npm|pnpm|yarn|bun)\s*(?:を|だけを)?\s*(?:使用|使う|使って|使います|使いましょう)/gi,
|
|
8112
|
+
/(?:使用|采用|统一用|只用)\s*(npm|pnpm|yarn|bun)\b/gi
|
|
8107
8113
|
];
|
|
8108
8114
|
var INDENT_SPACES = [
|
|
8109
8115
|
/\b(?:indent(?:ation)?|use)\b[^.\n]{0,30}?\b(\d)\s*-?\s*spaces?\b/i,
|
|
@@ -8117,15 +8123,89 @@ var INDENT_TABS = [
|
|
|
8117
8123
|
/インデント[^。\n]{0,15}タブ|タブでインデント/,
|
|
8118
8124
|
/缩进[^。\n]{0,15}(?:制表符|tab)|(?:制表符|tab)\s*缩进/i
|
|
8119
8125
|
];
|
|
8120
|
-
var
|
|
8121
|
-
var NODE_CONTEXT = /\b(use|using|require[sd]?|need[s]?|run on|target|supported?)\b
|
|
8122
|
-
var
|
|
8126
|
+
var NODE = /\bnode(?:\.js)?\s*(>=|=>|>|<=|=<|<|\^|~)?\s*v?(\d{2})(?!\d)(?:\.(?:\d+|x))*(\+)?/gi;
|
|
8127
|
+
var NODE_CONTEXT = /\b(use|using|require[sd]?|need[s]?|run on|target|supported?)\b|사용|필요|필수|이상|使用|使う|使っ|使い|必要|以上|以降|需要|要求|及以上/i;
|
|
8128
|
+
var NODE_MIN_AFTER = /^\s*(?:or (?:later|newer|above|higher)|and (?:later|newer|above|up)|이상|이후 버전|以上|以降|及以上|或更高|或以上)/i;
|
|
8129
|
+
var NODE_MAX_AFTER = /^\s*(?:or (?:earlier|older|below|lower)|이하|以下|及以下|或更低)/i;
|
|
8130
|
+
var NODE_MIN_BEFORE = /(?:at least|minimum(?: of)?|최소|至少|最低|少なくとも)\s*$/i;
|
|
8131
|
+
var NEG_BEFORE = /(?:\b(?:do not|don't|never|avoid|not|instead of|rather than|no longer)\s+(?:\w+\s+){0,2}|(?:不要|别|禁止|切勿|请勿|不得|不能|不再|避免)\s*)$/i;
|
|
8132
|
+
var NEG_AFTER = /^[^.。;;!?!?]{0,12}?(?:하지\s*(?:마|않|말)|지\s*(?:마|않|말)|하면\s*안|금지|しない|しません|ないで|はいけ|は禁止|禁止)/;
|
|
8133
|
+
var SCOPES = [
|
|
8134
|
+
/\b(?:in|for|on|inside|under|within|during)\s+(?:the\s+)?(production|prod|staging|test|tests|testing|development|dev|local|ci|e2e)\b/i,
|
|
8135
|
+
/\b(?:in|for|inside|under|within)\s+(?:the\s+)?([\w.-]+(?:\/[\w.-]*)*)\s+(?:folder|directory|package|workspace|app|module|subproject)\b/i,
|
|
8136
|
+
/\b(?:in|for|inside|under|within)\s+([\w.-]*\/[\w./-]*)/i,
|
|
8137
|
+
/(운영|프로덕션|스테이징|테스트|개발|로컬|CI)\s*(?:환경)?\s*에서/i,
|
|
8138
|
+
/([\w.-]+(?:\/[\w.-]*)*)\s*(?:폴더|디렉터리|패키지|워크스페이스|앱)\s*에서/,
|
|
8139
|
+
/([\w.-]*\/[\w./-]*)\s*에서/,
|
|
8140
|
+
/(本番|ステージング|テスト|開発|ローカル|CI)\s*(?:環境)?\s*では/i,
|
|
8141
|
+
/([\w.-]+(?:\/[\w.-]*)*)\s*(?:フォルダー?|ディレクトリ|パッケージ|ワークスペース)\s*では/,
|
|
8142
|
+
/在\s*(生产|预发布?|测试|开发|本地|CI)\s*(?:环境)?/i,
|
|
8143
|
+
/在\s*([\w.-]+(?:\/[\w.-]*)*)\s*(?:目录|文件夹|包|工作区)/
|
|
8144
|
+
];
|
|
8145
|
+
var SCOPE_NAME = {
|
|
8146
|
+
prod: "production",
|
|
8147
|
+
"\uC6B4\uC601": "production",
|
|
8148
|
+
"\uD504\uB85C\uB355\uC158": "production",
|
|
8149
|
+
"\u672C\u756A": "production",
|
|
8150
|
+
"\u751F\u4EA7": "production",
|
|
8151
|
+
"\uC2A4\uD14C\uC774\uC9D5": "staging",
|
|
8152
|
+
"\u30B9\u30C6\u30FC\u30B8\u30F3\u30B0": "staging",
|
|
8153
|
+
"\u9884\u53D1": "staging",
|
|
8154
|
+
"\u9884\u53D1\u5E03": "staging",
|
|
8155
|
+
tests: "test",
|
|
8156
|
+
testing: "test",
|
|
8157
|
+
e2e: "test",
|
|
8158
|
+
"\uD14C\uC2A4\uD2B8": "test",
|
|
8159
|
+
"\u30C6\u30B9\u30C8": "test",
|
|
8160
|
+
"\u6D4B\u8BD5": "test",
|
|
8161
|
+
dev: "development",
|
|
8162
|
+
"\uAC1C\uBC1C": "development",
|
|
8163
|
+
"\u958B\u767A": "development",
|
|
8164
|
+
"\u5F00\u53D1": "development",
|
|
8165
|
+
"\uB85C\uCEEC": "local",
|
|
8166
|
+
"\u30ED\u30FC\u30AB\u30EB": "local",
|
|
8167
|
+
"\u672C\u5730": "local"
|
|
8168
|
+
};
|
|
8169
|
+
var CONDITIONAL = /\b(if|when|unless|except|whenever)\b|경우|때는|때만|만약|예외|場合|とき|時は|例外|如果|若是|除非|例外/i;
|
|
8170
|
+
function scopeOf(text3) {
|
|
8171
|
+
for (const re of SCOPES) {
|
|
8172
|
+
const m = re.exec(text3);
|
|
8173
|
+
if (m) {
|
|
8174
|
+
const s = m[1].toLowerCase().replace(/^\.\//, "").replace(/\/+$/, "");
|
|
8175
|
+
return SCOPE_NAME[s] ?? s;
|
|
8176
|
+
}
|
|
8177
|
+
}
|
|
8178
|
+
return "";
|
|
8179
|
+
}
|
|
8180
|
+
function negated(text3, start, end) {
|
|
8181
|
+
const before = text3.slice(0, start);
|
|
8182
|
+
const from = Math.max(before.search(/[^.。;;!?!?]*$/), 0);
|
|
8183
|
+
return NEG_BEFORE.test(before.slice(Math.max(from, start - 30))) || NEG_AFTER.test(text3.slice(end));
|
|
8184
|
+
}
|
|
8185
|
+
var firstOf = (res, text3) => {
|
|
8123
8186
|
for (const re of res) {
|
|
8124
8187
|
const m = re.exec(text3);
|
|
8125
8188
|
if (m) return m.slice(1).find((g) => g !== void 0) ?? "";
|
|
8126
8189
|
}
|
|
8127
8190
|
return null;
|
|
8128
8191
|
};
|
|
8192
|
+
function nodeClaims(text3) {
|
|
8193
|
+
const out = [];
|
|
8194
|
+
for (const m of text3.matchAll(NODE)) {
|
|
8195
|
+
const start = m.index;
|
|
8196
|
+
const end = start + m[0].length;
|
|
8197
|
+
const clauseStart = Math.max(text3.slice(0, start).search(/[^.。;;!?!?]*$/), 0);
|
|
8198
|
+
const clauseEnd = text3.slice(end).search(/[.。;;!?!?]/);
|
|
8199
|
+
const clause = text3.slice(clauseStart, clauseEnd < 0 ? text3.length : end + clauseEnd);
|
|
8200
|
+
if (!NODE_CONTEXT.test(clause) || negated(text3, start, end)) continue;
|
|
8201
|
+
const op = m[1];
|
|
8202
|
+
const after = text3.slice(end);
|
|
8203
|
+
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";
|
|
8204
|
+
out.push({ major: Number(m[2]), kind });
|
|
8205
|
+
}
|
|
8206
|
+
return out;
|
|
8207
|
+
}
|
|
8208
|
+
var nodeLabel = (r) => `Node ${r.major}${r.kind === "min" ? "+" : r.kind === "max" ? " or lower" : ""}`;
|
|
8129
8209
|
function claims(doc) {
|
|
8130
8210
|
const out = [];
|
|
8131
8211
|
const lines = doc.text.split(/\r\n|\r|\n/);
|
|
@@ -8135,42 +8215,59 @@ function claims(doc) {
|
|
|
8135
8215
|
if (!node2.position) return;
|
|
8136
8216
|
for (let ln = node2.position.start.line; ln <= node2.position.end.line; ln++) {
|
|
8137
8217
|
const text3 = (lines[ln - 1] ?? "").replace(/`[^`]*`/g, "");
|
|
8138
|
-
const
|
|
8139
|
-
const
|
|
8140
|
-
const
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
const
|
|
8146
|
-
|
|
8218
|
+
const base2 = { at: { path: doc.path, line: ln, column: 1 }, line: lines[ln - 1] ?? "", scope: scopeOf(text3), conditional: CONDITIONAL.test(text3) };
|
|
8219
|
+
const managers = /* @__PURE__ */ new Set();
|
|
8220
|
+
for (const re of PM) {
|
|
8221
|
+
for (const m of text3.matchAll(re)) {
|
|
8222
|
+
if (!negated(text3, m.index, m.index + m[0].length)) managers.add(m[1].toLowerCase());
|
|
8223
|
+
}
|
|
8224
|
+
}
|
|
8225
|
+
for (const pm of managers) out.push({ ...base2, topic: "package-manager", value: pm });
|
|
8226
|
+
const sp = firstOf(INDENT_SPACES, text3);
|
|
8227
|
+
if (sp) out.push({ ...base2, topic: "indentation", value: `${sp} spaces` });
|
|
8228
|
+
else if (firstOf(INDENT_TABS, text3) !== null) out.push({ ...base2, topic: "indentation", value: "tabs" });
|
|
8229
|
+
for (const r of nodeClaims(text3)) out.push({ ...base2, topic: "node-version", value: nodeLabel(r), node: r });
|
|
8147
8230
|
}
|
|
8148
8231
|
});
|
|
8149
8232
|
return out;
|
|
8150
8233
|
}
|
|
8234
|
+
function nodeConflict(reqs) {
|
|
8235
|
+
const exact = new Set(reqs.filter((r) => r.kind === "exact").map((r) => r.major));
|
|
8236
|
+
const mins = new Set(reqs.filter((r) => r.kind === "min").map((r) => r.major));
|
|
8237
|
+
const maxs = new Set(reqs.filter((r) => r.kind === "max").map((r) => r.major));
|
|
8238
|
+
const lo = Math.max(-Infinity, ...mins);
|
|
8239
|
+
const hi = Math.min(Infinity, ...maxs);
|
|
8240
|
+
return exact.size > 1 || mins.size > 1 || maxs.size > 1 || lo > hi || [...exact].some((e) => e < lo || e > hi);
|
|
8241
|
+
}
|
|
8151
8242
|
function checkConflicts(docs) {
|
|
8152
8243
|
const instruction = docs.filter((d) => instructionPlatforms(d.path).length > 0).sort((a, b) => a.path < b.path ? -1 : 1);
|
|
8153
8244
|
const all2 = instruction.flatMap(claims);
|
|
8154
8245
|
const findings = [];
|
|
8155
8246
|
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
|
-
|
|
8247
|
+
const scopes = [...new Set(all2.filter((x) => x.topic === topic).map((x) => x.scope))].sort();
|
|
8248
|
+
for (const scope of scopes) {
|
|
8249
|
+
const group = all2.filter((x) => x.topic === topic && x.scope === scope);
|
|
8250
|
+
const byValue = /* @__PURE__ */ new Map();
|
|
8251
|
+
for (const c of group) byValue.set(c.value, [...byValue.get(c.value) ?? [], c]);
|
|
8252
|
+
if (byValue.size < 2) continue;
|
|
8253
|
+
if (topic === "node-version" && !nodeConflict(group.map((c) => c.node))) continue;
|
|
8254
|
+
const groups = [...byValue.entries()];
|
|
8255
|
+
const [first, ...rest] = groups.flatMap(([, cs]) => cs);
|
|
8256
|
+
findings.push({
|
|
8257
|
+
id: `AGT-002-${fnv1a(`${topic}:${scope ? `${scope}:` : ""}${groups.map(([v]) => v).sort().join("|")}`)}`,
|
|
8258
|
+
ruleId: "AGT-002",
|
|
8259
|
+
severity: "medium",
|
|
8260
|
+
// A rule with a condition ("if", "경우", "場合", "如果") may be an exception: still shown, with less certainty.
|
|
8261
|
+
confidence: group.some((c) => c.conditional) ? "low" : "medium",
|
|
8262
|
+
messageKey: `agt002.${topic}`,
|
|
8263
|
+
params: { values: groups.map(([v, cs]) => `${v} (${cs.map((c) => `${c.at.path}:${c.at.line}`).join(", ")})`).join(" / ") },
|
|
8264
|
+
location: first.at,
|
|
8265
|
+
evidence: truncate(maskSecrets(first.line.trim())),
|
|
8266
|
+
recommendation: { messageKey: "agt002.fix", params: { topic } },
|
|
8267
|
+
verification: { messageKey: "agt.verify", params: { path: first.at.path, line: first.at.line } },
|
|
8268
|
+
related: rest.map((c) => c.at)
|
|
8269
|
+
});
|
|
8270
|
+
}
|
|
8174
8271
|
}
|
|
8175
8272
|
return {
|
|
8176
8273
|
ruleId: "AGT-002",
|
|
@@ -8192,7 +8289,7 @@ var LOCKFILES = {
|
|
|
8192
8289
|
bun: /(^|\/)bun\.lockb?$/
|
|
8193
8290
|
};
|
|
8194
8291
|
var PM_COMMAND = /^(npm|pnpm|yarn|bun)\s+(install|i|ci|add|run|test|exec|remove|uninstall)\b(.*)$/;
|
|
8195
|
-
var
|
|
8292
|
+
var CONDITIONAL2 = /\b(if|or|either|alternatively|e\.g\.|for example)\b|또는|이나|라면|경우|예:|예를 들|または|場合|例:|例えば|或者|如果|例如/i;
|
|
8196
8293
|
var EXAMPLE_LEAD = /\b(e\.g\.|example|for instance)\b|예:|예시|例:|例えば|示例|例如/i;
|
|
8197
8294
|
var GENERATED = /^(node_modules|dist|build|out|coverage|target|\.next|\.nuxt|\.venv|venv|__pycache__|\.cache|\.turbo|tmp)(\/|$)/;
|
|
8198
8295
|
var NOT_THIS_PROJECT = /(^|\/)(tests?|__tests__|spec|fixtures?|__fixtures__|examples?|samples?|testdata|e2e)\//i;
|
|
@@ -8272,7 +8369,7 @@ function checkDocConsistency(input) {
|
|
|
8272
8369
|
if (NOT_THIS_PROJECT.test(doc.path)) continue;
|
|
8273
8370
|
for (const l of commandsAndSpans(doc)) {
|
|
8274
8371
|
const managers = new Set(l.context.match(/\b(npm|pnpm|yarn|bun)\b/g) ?? []);
|
|
8275
|
-
if (
|
|
8372
|
+
if (CONDITIONAL2.test(l.context) || managers.size > 1) continue;
|
|
8276
8373
|
const cmd = PM_COMMAND.exec(l.text);
|
|
8277
8374
|
const base2 = nearestManifest(dirOf(doc.path), manifests);
|
|
8278
8375
|
if (cmd) {
|
|
@@ -8333,9 +8430,53 @@ var MAX_FINDINGS = 50;
|
|
|
8333
8430
|
function isCodePath(path) {
|
|
8334
8431
|
return CODE_EXT.has(extensionOf(path)) && !/\.min\.(js|css)$/.test(path) && !/(^|\/)(vendor|dist|build)\//.test(path);
|
|
8335
8432
|
}
|
|
8336
|
-
|
|
8433
|
+
var LANG = {
|
|
8434
|
+
cs: "cs",
|
|
8435
|
+
java: "jvm",
|
|
8436
|
+
kt: "jvm",
|
|
8437
|
+
js: "js",
|
|
8438
|
+
mjs: "js",
|
|
8439
|
+
cjs: "js",
|
|
8440
|
+
jsx: "js",
|
|
8441
|
+
ts: "js",
|
|
8442
|
+
mts: "js",
|
|
8443
|
+
cts: "js",
|
|
8444
|
+
tsx: "js",
|
|
8445
|
+
vue: "js",
|
|
8446
|
+
svelte: "js",
|
|
8447
|
+
py: "py",
|
|
8448
|
+
go: "go",
|
|
8449
|
+
rs: "rs",
|
|
8450
|
+
php: "php",
|
|
8451
|
+
rb: "rb",
|
|
8452
|
+
swift: "swift"
|
|
8453
|
+
};
|
|
8454
|
+
var IMPORT_LINE = {
|
|
8455
|
+
cs: /^(?:global\s+)?using\s+(?:static\s+)?[\w.]+(?:\s*=\s*[\w.<>, ]+)?\s*;$|^namespace\s+[\w.]+\s*;?$|^extern\s+alias\s+\w+\s*;$/,
|
|
8456
|
+
jvm: /^(?:import|package)\s+(?:static\s+)?[\w.*`]+(?:\s+as\s+\w+)?\s*;?$/,
|
|
8457
|
+
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*;?$/,
|
|
8458
|
+
py: /^(?:from\s+[\w.]+\s+)?import\s+[\w.*, ]+(?:\s+as\s+\w+)?$|^from\s+[\w.]+\s+import\s+\($/,
|
|
8459
|
+
go: /^package\s+\w+$|^import\s+(?:[\w.]+\s+)?"[^"]+"$/,
|
|
8460
|
+
rs: /^(?:pub(?:\([^)]*\))?\s+)?use\s+[^;]+;$|^(?:pub(?:\([^)]*\))?\s+)?mod\s+\w+\s*;$|^extern\s+crate\s+\w+(?:\s+as\s+\w+)?\s*;$/,
|
|
8461
|
+
php: /^(?:namespace|use)\s+[\w\\]+(?:\s+as\s+\w+)?\s*;$|^(?:require|include)(?:_once)?\b.*;$/,
|
|
8462
|
+
rb: /^require(?:_relative)?\s*\(?\s*['"][^'"]+['"]\s*\)?$/,
|
|
8463
|
+
swift: /^(?:@testable\s+)?import\s+(?:\w+\s+)?[\w.]+$/
|
|
8464
|
+
};
|
|
8465
|
+
var IMPORT_BLOCK = {
|
|
8466
|
+
js: [/^(?:import|export)\s+(?:type\s+)?\{[^}]*$/, /\}/],
|
|
8467
|
+
py: [/^from\s+[\w.]+\s+import\s+\($/, /\)\s*$/],
|
|
8468
|
+
go: [/^import\s+\($/, /^\)$/],
|
|
8469
|
+
rs: [/^(?:pub(?:\([^)]*\))?\s+)?use\s+[^;]*\{[^}]*$/, /\}\s*;\s*$/]
|
|
8470
|
+
};
|
|
8471
|
+
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*/;
|
|
8472
|
+
var PY_ENUM = /^class\s+\w+\s*\([^)]*\b(?:Enum|IntEnum|StrEnum|Flag|IntFlag)\b[^)]*\)\s*:/;
|
|
8473
|
+
function meaningful(text3, path) {
|
|
8474
|
+
const lang = LANG[extensionOf(path)];
|
|
8337
8475
|
const out = [];
|
|
8338
8476
|
let inBlock = false;
|
|
8477
|
+
let importEnd = null;
|
|
8478
|
+
let enumDepth = -1;
|
|
8479
|
+
let pyEnumIndent = -1;
|
|
8339
8480
|
text3.split(/\r\n|\r|\n/).forEach((raw, i) => {
|
|
8340
8481
|
let t2 = raw.trim();
|
|
8341
8482
|
if (inBlock) {
|
|
@@ -8346,7 +8487,38 @@ function meaningful(text3) {
|
|
|
8346
8487
|
if (!t2.includes("*/")) inBlock = true;
|
|
8347
8488
|
return;
|
|
8348
8489
|
}
|
|
8490
|
+
if (pyEnumIndent >= 0) {
|
|
8491
|
+
if (!t2 || raw.search(/\S/) > pyEnumIndent) return;
|
|
8492
|
+
pyEnumIndent = -1;
|
|
8493
|
+
}
|
|
8494
|
+
if (importEnd) {
|
|
8495
|
+
if (importEnd.test(t2)) importEnd = null;
|
|
8496
|
+
return;
|
|
8497
|
+
}
|
|
8498
|
+
if (enumDepth >= 0) {
|
|
8499
|
+
const opened = enumDepth > 0 || t2.includes("{");
|
|
8500
|
+
enumDepth += (t2.match(/\{/g) ?? []).length - (t2.match(/\}/g) ?? []).length;
|
|
8501
|
+
if (opened && enumDepth <= 0) enumDepth = -1;
|
|
8502
|
+
return;
|
|
8503
|
+
}
|
|
8349
8504
|
if (!t2 || t2.startsWith("//") || t2.startsWith("#") || t2.startsWith("*")) return;
|
|
8505
|
+
if (lang) {
|
|
8506
|
+
if (IMPORT_LINE[lang].test(t2)) return;
|
|
8507
|
+
const block = IMPORT_BLOCK[lang];
|
|
8508
|
+
if (block && block[0].test(t2)) {
|
|
8509
|
+
importEnd = block[1];
|
|
8510
|
+
return;
|
|
8511
|
+
}
|
|
8512
|
+
if (lang === "py" && PY_ENUM.test(t2)) {
|
|
8513
|
+
pyEnumIndent = raw.search(/\S/);
|
|
8514
|
+
return;
|
|
8515
|
+
}
|
|
8516
|
+
if (lang !== "py" && lang !== "rb" && lang !== "go" && ENUM_DECL.test(t2)) {
|
|
8517
|
+
const depth = (t2.match(/\{/g) ?? []).length - (t2.match(/\}/g) ?? []).length;
|
|
8518
|
+
enumDepth = t2.includes("{") && depth <= 0 ? -1 : depth;
|
|
8519
|
+
return;
|
|
8520
|
+
}
|
|
8521
|
+
}
|
|
8350
8522
|
t2 = t2.replace(/\s+/g, " ");
|
|
8351
8523
|
if (t2.replace(/[\s{}()[\];,]/g, "").length <= 2) return;
|
|
8352
8524
|
out.push({ norm: t2, line: i + 1 });
|
|
@@ -8354,7 +8526,7 @@ function meaningful(text3) {
|
|
|
8354
8526
|
return out;
|
|
8355
8527
|
}
|
|
8356
8528
|
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) }));
|
|
8529
|
+
const files = docs.filter((d) => isCodePath(d.path) && !d.text.split("\n").some((l) => l.length > 500)).sort((a, b) => a.path < b.path ? -1 : 1).map((d) => ({ path: d.path, text: d.text, lines: meaningful(d.text, d.path) }));
|
|
8358
8530
|
const codeLines = files.reduce((n, f) => n + f.lines.length, 0);
|
|
8359
8531
|
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
8532
|
const windows = /* @__PURE__ */ new Map();
|
|
@@ -8368,7 +8540,7 @@ function checkDuplicateCode(docs) {
|
|
|
8368
8540
|
});
|
|
8369
8541
|
const covered = /* @__PURE__ */ new Set();
|
|
8370
8542
|
const dupLines = /* @__PURE__ */ new Set();
|
|
8371
|
-
const
|
|
8543
|
+
const groups = [];
|
|
8372
8544
|
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
8545
|
for (const [, occ] of starts) {
|
|
8374
8546
|
if (covered.has(`${occ[0].f}:${occ[0].i}`)) continue;
|
|
@@ -8380,27 +8552,53 @@ function checkDuplicateCode(docs) {
|
|
|
8380
8552
|
len++;
|
|
8381
8553
|
}
|
|
8382
8554
|
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
|
-
|
|
8555
|
+
for (const o of occ) for (let k = 0; k < len; k++) dupLines.add(`${o.f}:${o.i + k}`);
|
|
8556
|
+
groups.push(occ.map((o) => ({ f: o.f, from: o.i, to: o.i + len - 1 })));
|
|
8557
|
+
}
|
|
8558
|
+
const overlaps = (a, b) => a.f === b.f && a.from <= b.to && b.from <= a.to;
|
|
8559
|
+
const clusters = [];
|
|
8560
|
+
for (const g of groups) {
|
|
8561
|
+
const hits = clusters.filter((c) => c.blocks.some((b) => g.some((x) => overlaps(b, x))));
|
|
8562
|
+
const target = hits[0] ?? { blocks: [], merged: false };
|
|
8563
|
+
if (!hits.length) clusters.push(target);
|
|
8564
|
+
for (const other of hits.slice(1)) {
|
|
8565
|
+
target.blocks.push(...other.blocks);
|
|
8566
|
+
clusters.splice(clusters.indexOf(other), 1);
|
|
8567
|
+
}
|
|
8568
|
+
if (hits.length) target.merged = true;
|
|
8569
|
+
target.blocks.push(...g);
|
|
8570
|
+
const merged = [];
|
|
8571
|
+
for (const b of [...target.blocks].sort((x, y) => x.f - y.f || x.from - y.from)) {
|
|
8572
|
+
const last = merged[merged.length - 1];
|
|
8573
|
+
if (last && last.f === b.f && b.from <= last.to) last.to = Math.max(last.to, b.to);
|
|
8574
|
+
else merged.push({ ...b });
|
|
8575
|
+
}
|
|
8576
|
+
target.blocks = merged;
|
|
8577
|
+
}
|
|
8578
|
+
const findings = [];
|
|
8579
|
+
for (const c of clusters) {
|
|
8580
|
+
if (findings.length >= MAX_FINDINGS) break;
|
|
8581
|
+
const locs = c.blocks.map((b) => {
|
|
8582
|
+
const f = files[b.f];
|
|
8583
|
+
return { path: f.path, line: f.lines[b.from].line, column: 1, end: f.lines[b.to].line };
|
|
8584
|
+
});
|
|
8585
|
+
const first = c.blocks[0];
|
|
8586
|
+
const len = first.to - first.from + 1;
|
|
8587
|
+
const head = locs[0];
|
|
8588
|
+
const uneven = c.merged && c.blocks.some((b) => b.to - b.from !== first.to - first.from);
|
|
8589
|
+
findings.push({
|
|
8590
|
+
id: `DUP-001-${fnv1a(locs.map((l) => `${l.path}:${l.line}`).join("|") + `:${len}`)}`,
|
|
8591
|
+
ruleId: "DUP-001",
|
|
8592
|
+
severity: "low",
|
|
8593
|
+
confidence: "high",
|
|
8594
|
+
messageKey: uneven ? "dup001.blockOverlap" : "dup001.block",
|
|
8595
|
+
params: { lines: len, copies: locs.length, range: `${head.line}-${head.end}` },
|
|
8596
|
+
location: { path: head.path, line: head.line, column: 1 },
|
|
8597
|
+
evidence: truncate(maskSecrets(files[first.f].lines[first.from].norm)),
|
|
8598
|
+
recommendation: { messageKey: "dup001.fix", params: { copies: locs.length } },
|
|
8599
|
+
verification: { messageKey: "dup.verify", params: { path: head.path, line: head.line } },
|
|
8600
|
+
related: locs.slice(1).map(({ path, line, column }) => ({ path, line, column }))
|
|
8387
8601
|
});
|
|
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
8602
|
}
|
|
8405
8603
|
return {
|
|
8406
8604
|
metrics: { codeLines, duplicatedLines: dupLines.size },
|
|
@@ -8411,7 +8609,7 @@ function checkDuplicateCode(docs) {
|
|
|
8411
8609
|
inspected: files.length,
|
|
8412
8610
|
findings,
|
|
8413
8611
|
unverified: [],
|
|
8414
|
-
reason: files.length ?
|
|
8612
|
+
reason: files.length ? clusters.length > MAX_FINDINGS ? "dup.reason.capped" : null : "dup.reason.noCode",
|
|
8415
8613
|
scopeKey: "dup001.scope"
|
|
8416
8614
|
}
|
|
8417
8615
|
};
|
|
@@ -8618,7 +8816,7 @@ function checkArchitecture(docs, index2) {
|
|
|
8618
8816
|
cycleTotal++;
|
|
8619
8817
|
if (cycles.length >= MAX_FINDINGS2) continue;
|
|
8620
8818
|
const loop = shortestLoop(comp[0], new Set(comp), graph);
|
|
8621
|
-
const
|
|
8819
|
+
const first = loop[0];
|
|
8622
8820
|
const chain = [comp[0], ...loop.map((e) => e.to)].join(" \u2192 ");
|
|
8623
8821
|
cycles.push({
|
|
8624
8822
|
id: `ARC-001-${fnv1a(comp.join("|"))}`,
|
|
@@ -8627,15 +8825,15 @@ function checkArchitecture(docs, index2) {
|
|
|
8627
8825
|
confidence: "high",
|
|
8628
8826
|
messageKey: "arc001.cycle",
|
|
8629
8827
|
params: { count: comp.length, cycle: chain },
|
|
8630
|
-
location: { path: comp[0], line:
|
|
8631
|
-
evidence: truncate(maskSecrets(
|
|
8828
|
+
location: { path: comp[0], line: first.ref.line, column: first.ref.column },
|
|
8829
|
+
evidence: truncate(maskSecrets(first.ref.text.trim())),
|
|
8632
8830
|
recommendation: { messageKey: "arc001.fix", params: { count: comp.length } },
|
|
8633
|
-
verification: { messageKey: "arc.verify", params: { path: comp[0], line:
|
|
8831
|
+
verification: { messageKey: "arc.verify", params: { path: comp[0], line: first.ref.line } },
|
|
8634
8832
|
related: loop.slice(1).map((e, i) => ({ path: loop[i].to, line: e.ref.line, column: e.ref.column }))
|
|
8635
8833
|
});
|
|
8636
8834
|
}
|
|
8637
8835
|
const none = mods.length === 0;
|
|
8638
|
-
const result = (ruleId, findings, total,
|
|
8836
|
+
const result = (ruleId, findings, total, scopeKey, extra) => ({
|
|
8639
8837
|
ruleId,
|
|
8640
8838
|
status: none ? "skipped" : findings.length ? "fail" : ruleId === "ARC-002" && unverified.length ? "partial" : "pass",
|
|
8641
8839
|
eligible: mods.length,
|
|
@@ -8643,7 +8841,7 @@ function checkArchitecture(docs, index2) {
|
|
|
8643
8841
|
findings,
|
|
8644
8842
|
unverified: ruleId === "ARC-002" ? unverified : [],
|
|
8645
8843
|
reason: none ? "arc.reason.noCode" : total > MAX_FINDINGS2 ? "arc.reason.capped" : extra ?? null,
|
|
8646
|
-
scopeKey
|
|
8844
|
+
scopeKey
|
|
8647
8845
|
});
|
|
8648
8846
|
return {
|
|
8649
8847
|
metrics: { modules: mods.length, imports, inCycles },
|
|
@@ -8762,7 +8960,7 @@ function checkDeploy(docs, index2) {
|
|
|
8762
8960
|
if (index2.listComplete || index2.files.has(`${dirOf2(d.path)}.dockerignore`))
|
|
8763
8961
|
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
8962
|
}
|
|
8765
|
-
const result = (ruleId,
|
|
8963
|
+
const result = (ruleId, scopeKey, noneReason) => {
|
|
8766
8964
|
const n = applied[ruleId];
|
|
8767
8965
|
const findings = found[ruleId];
|
|
8768
8966
|
return {
|
|
@@ -8773,7 +8971,7 @@ function checkDeploy(docs, index2) {
|
|
|
8773
8971
|
findings,
|
|
8774
8972
|
unverified: [],
|
|
8775
8973
|
reason: n === 0 ? noneReason : index2.listComplete ? null : "ops.reason.listIncomplete",
|
|
8776
|
-
scopeKey
|
|
8974
|
+
scopeKey
|
|
8777
8975
|
};
|
|
8778
8976
|
};
|
|
8779
8977
|
return {
|
|
@@ -8983,13 +9181,19 @@ function checkHeadings(docs, eligible, extraPartial) {
|
|
|
8983
9181
|
// ../core/src/rules/md002.ts
|
|
8984
9182
|
var MD002 = "MD-002";
|
|
8985
9183
|
var MD002_MIN_CHARS = 40;
|
|
8986
|
-
var PROTECTED_RE = /\b(approv\w*|deploy\w*|release|delet\w*|remov\w*|test\w*|confirm\w
|
|
9184
|
+
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
9185
|
function isProtectedInstruction(text3) {
|
|
8988
9186
|
return PROTECTED_RE.test(text3);
|
|
8989
9187
|
}
|
|
8990
|
-
|
|
9188
|
+
var NOT_PROJECT_DOCS = /(^|\/)(fixtures?|__fixtures__|testdata|test-data|examples?|samples?|vendor|third[_-]party)\//i;
|
|
9189
|
+
var dirOf3 = (p) => p.includes("/") ? p.slice(0, p.lastIndexOf("/")) : "";
|
|
9190
|
+
var nameOf = (p) => p.slice(p.lastIndexOf("/") + 1);
|
|
9191
|
+
var nested = (a, b) => nameOf(a) === nameOf(b) && dirOf3(a) !== dirOf3(b) && (dirOf3(a) === "" || `${dirOf3(b)}/`.startsWith(`${dirOf3(a)}/`));
|
|
9192
|
+
function checkDuplicates(docs, eligible, extraPartial, minChars = MD002_MIN_CHARS, context) {
|
|
9193
|
+
const inContext = (path) => !context || context.has(path);
|
|
8991
9194
|
const groups = /* @__PURE__ */ new Map();
|
|
8992
9195
|
for (const doc of [...docs].sort(byPath)) {
|
|
9196
|
+
if (!inContext(doc.path) && NOT_PROJECT_DOCS.test(doc.path)) continue;
|
|
8993
9197
|
walk(parseTree(doc.text), (node2) => {
|
|
8994
9198
|
if (node2.type !== "paragraph" || !node2.position) return;
|
|
8995
9199
|
const start = node2.position.start.offset;
|
|
@@ -9004,24 +9208,28 @@ function checkDuplicates(docs, eligible, extraPartial, minChars = MD002_MIN_CHAR
|
|
|
9004
9208
|
});
|
|
9005
9209
|
}
|
|
9006
9210
|
const findings = [];
|
|
9007
|
-
for (const [key,
|
|
9008
|
-
if (
|
|
9009
|
-
const [
|
|
9010
|
-
const
|
|
9011
|
-
const
|
|
9211
|
+
for (const [key, all2] of groups) {
|
|
9212
|
+
if (all2.length < 2) continue;
|
|
9213
|
+
const list2 = [...all2.filter((l) => inContext(l.location.path)), ...all2.filter((l) => !inContext(l.location.path))];
|
|
9214
|
+
const [first, ...rest] = list2;
|
|
9215
|
+
const instruction = list2.filter((l) => inContext(l.location.path)).map((l) => l.location.path);
|
|
9216
|
+
if (instruction.length === 0) continue;
|
|
9217
|
+
const crossFile = rest.some((r) => r.location.path !== first.location.path);
|
|
9218
|
+
const messageKey = instruction.length >= 2 ? crossFile ? "md002.duplicateAcrossFiles" : "md002.duplicateInFile" : "md002.duplicateWithDocs";
|
|
9219
|
+
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
9220
|
findings.push({
|
|
9013
9221
|
id: `${MD002}-${fnv1a(list2.map((l) => `${l.location.path}:${l.location.line}`).join("|") + key.length)}`,
|
|
9014
9222
|
ruleId: MD002,
|
|
9015
9223
|
severity: "info",
|
|
9016
9224
|
confidence: "high",
|
|
9017
|
-
messageKey
|
|
9225
|
+
messageKey,
|
|
9018
9226
|
params: {
|
|
9019
9227
|
count: list2.length,
|
|
9020
9228
|
others: rest.map((r) => `${r.location.path}:${r.location.line}`).join(", ")
|
|
9021
9229
|
},
|
|
9022
|
-
location:
|
|
9230
|
+
location: first.location,
|
|
9023
9231
|
evidence: truncate(maskSecrets(key)),
|
|
9024
|
-
recommendation: { messageKey:
|
|
9232
|
+
recommendation: { messageKey: fix, params: {} },
|
|
9025
9233
|
verification: { messageKey: "md002.verify", params: {} },
|
|
9026
9234
|
related: rest.map((r) => r.location)
|
|
9027
9235
|
});
|
|
@@ -9038,7 +9246,7 @@ function checkDuplicates(docs, eligible, extraPartial, minChars = MD002_MIN_CHAR
|
|
|
9038
9246
|
findings,
|
|
9039
9247
|
unverified: [],
|
|
9040
9248
|
reason: eligible === 0 ? "md003.reason.noMarkdown" : incomplete ? "md003.reason.partial" : null,
|
|
9041
|
-
scopeKey: "md002.scope.m2"
|
|
9249
|
+
scopeKey: context ? "md002.scope.all" : "md002.scope.m2"
|
|
9042
9250
|
};
|
|
9043
9251
|
}
|
|
9044
9252
|
|
|
@@ -9209,12 +9417,12 @@ function activeContext(platform, workdir, docs) {
|
|
|
9209
9417
|
const note = (key) => {
|
|
9210
9418
|
if (!notes.includes(key)) notes.push(key);
|
|
9211
9419
|
};
|
|
9212
|
-
const under = (dir, rel, ext,
|
|
9420
|
+
const under = (dir, rel, ext, nested2 = false) => {
|
|
9213
9421
|
const prefix = join2(dir, rel);
|
|
9214
9422
|
return docs.filter((d) => {
|
|
9215
9423
|
if (!d.path.startsWith(prefix) || !d.platforms.includes(platform)) return false;
|
|
9216
9424
|
const rest = d.path.slice(prefix.length);
|
|
9217
|
-
return ext.test(rest) && (
|
|
9425
|
+
return ext.test(rest) && (nested2 || !rest.includes("/"));
|
|
9218
9426
|
});
|
|
9219
9427
|
};
|
|
9220
9428
|
const hier = (path) => {
|
|
@@ -9565,19 +9773,19 @@ function duplicatePreviews(docs, findings, instructionPaths) {
|
|
|
9565
9773
|
for (const finding of findings) {
|
|
9566
9774
|
if (finding.recommendation.messageKey !== "md002.fix.review") continue;
|
|
9567
9775
|
const locations = [finding.location, ...finding.related ?? []].filter((loc2) => byPath2.has(loc2.path));
|
|
9568
|
-
const
|
|
9569
|
-
if (!
|
|
9570
|
-
const keepLines = linesAt(
|
|
9571
|
-
const sentence = keepLines[
|
|
9776
|
+
const first = locations[0];
|
|
9777
|
+
if (!first || first.column !== 1) continue;
|
|
9778
|
+
const keepLines = linesAt(first.path);
|
|
9779
|
+
const sentence = keepLines[first.line - 1];
|
|
9572
9780
|
if (!sentence || !new RegExp("^\\p{L}", "u").test(sentence) || /[@`[\]<>*_\\]/u.test(sentence)) continue;
|
|
9573
|
-
if (keepLines[
|
|
9781
|
+
if (keepLines[first.line - 2]?.trim() || keepLines[first.line]?.trim()) continue;
|
|
9574
9782
|
for (const omit of locations.slice(1)) {
|
|
9575
9783
|
const lines = linesAt(omit.path);
|
|
9576
9784
|
const at = omit.line - 1;
|
|
9577
9785
|
if (omit.column !== 1 || lines[at] !== sentence || lines[at - 1]?.trim() || lines[at + 1]?.trim()) continue;
|
|
9578
9786
|
const edited = [...lines.slice(0, at), ...lines.slice(at + 1)].join("\n");
|
|
9579
9787
|
if (!edited.trim()) continue;
|
|
9580
|
-
previews.push({ findingId: finding.id, keep:
|
|
9788
|
+
previews.push({ findingId: finding.id, keep: first, omit, editedDocTokens: estimateTokens(edited) });
|
|
9581
9789
|
if (previews.length === 8) return previews;
|
|
9582
9790
|
}
|
|
9583
9791
|
}
|
|
@@ -9687,8 +9895,7 @@ async function scanOnce(adapter, ctx) {
|
|
|
9687
9895
|
ignored: gitignoreMatcher(docs.find((d) => d.path === ".gitignore")?.text ?? null)
|
|
9688
9896
|
});
|
|
9689
9897
|
ctx.onInstructionTexts?.(agentDocs.filter((d) => contextPaths.has(d.path)).map((d) => ({ path: d.path, text: d.text })));
|
|
9690
|
-
const
|
|
9691
|
-
const md002 = checkDuplicates(contextDocs, contextDocs.length, mdPartial);
|
|
9898
|
+
const md002 = checkDuplicates(mdDocs, eligibleMd, mdPartial, MD002_MIN_CHARS, contextPaths);
|
|
9692
9899
|
const deps = extractDependencies(docs);
|
|
9693
9900
|
const dup = checkDuplicateCode(docs);
|
|
9694
9901
|
const arc = checkArchitecture(docs, { files: listed, listComplete: adapter.listComplete });
|
|
@@ -9753,8 +9960,12 @@ var en2 = {
|
|
|
9753
9960
|
"md002.duplicateAcrossFiles": "The same paragraph appears {count} times. Other copies: {others}.",
|
|
9754
9961
|
"md002.duplicateInFile": "The same paragraph appears {count} times in this file. Other copies: {others}.",
|
|
9755
9962
|
"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
|
|
9963
|
+
"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
9964
|
"md002.verify": "Run the same check again and compare the remaining copies.",
|
|
9965
|
+
"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.",
|
|
9966
|
+
"md002.duplicateWithDocs": "This instruction paragraph also appears in documents AI tools do not load by default: {others}.",
|
|
9967
|
+
"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.",
|
|
9968
|
+
"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
9969
|
"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
9970
|
"ai001.empty": "{path} is empty. Codex and other tools skip empty instruction files.",
|
|
9760
9971
|
"ai001.fix.empty": "Add the intended instructions to {path} or delete the file.",
|
|
@@ -9860,8 +10071,12 @@ var ko2 = {
|
|
|
9860
10071
|
"md002.duplicateAcrossFiles": "\uAC19\uC740 \uBB38\uB2E8\uC774 {count}\uBC88 \uB098\uC635\uB2C8\uB2E4. \uB2E4\uB978 \uC704\uCE58: {others}.",
|
|
9861
10072
|
"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
10073
|
"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\
|
|
10074
|
+
"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
10075
|
"md002.verify": "\uAC19\uC740 \uAC80\uC0AC\uB97C \uB2E4\uC2DC \uC2E4\uD589\uD574 \uB0A8\uC740 \uC704\uCE58\uB97C \uBE44\uAD50\uD558\uC138\uC694.",
|
|
10076
|
+
"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.",
|
|
10077
|
+
"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}.",
|
|
10078
|
+
"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.",
|
|
10079
|
+
"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
10080
|
"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
10081
|
"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
10082
|
"ai001.fix.empty": "{path}\uC5D0 \uC758\uB3C4\uD55C \uC9C0\uC2DC\uB97C \uB123\uAC70\uB098 \uD30C\uC77C\uC744 \uC9C0\uC6B0\uC138\uC694.",
|
|
@@ -9967,8 +10182,12 @@ var ja2 = {
|
|
|
9967
10182
|
"md002.duplicateAcrossFiles": "\u540C\u3058\u6BB5\u843D\u304C {count} \u56DE\u3042\u308A\u307E\u3059\u3002\u307B\u304B\u306E\u4F4D\u7F6E: {others}\u3002",
|
|
9968
10183
|
"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
10184
|
"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",
|
|
10185
|
+
"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
10186
|
"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",
|
|
10187
|
+
"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",
|
|
10188
|
+
"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",
|
|
10189
|
+
"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",
|
|
10190
|
+
"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
10191
|
"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
10192
|
"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
10193
|
"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 +10293,12 @@ var zh2 = {
|
|
|
10074
10293
|
"md002.duplicateAcrossFiles": "\u540C\u4E00\u6BB5\u843D\u51FA\u73B0\u4E86 {count} \u6B21\u3002\u5176\u4ED6\u4F4D\u7F6E:{others}\u3002",
|
|
10075
10294
|
"md002.duplicateInFile": "\u540C\u4E00\u6BB5\u843D\u5728\u6B64\u6587\u4EF6\u4E2D\u51FA\u73B0\u4E86 {count} \u6B21\u3002\u5176\u4ED6\u4F4D\u7F6E:{others}\u3002",
|
|
10076
10295
|
"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\
|
|
10296
|
+
"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
10297
|
"md002.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\u5E76\u6BD4\u8F83\u5269\u4F59\u7684\u4F4D\u7F6E\u3002",
|
|
10298
|
+
"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",
|
|
10299
|
+
"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",
|
|
10300
|
+
"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",
|
|
10301
|
+
"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
10302
|
"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
10303
|
"ai001.empty": "{path} \u662F\u7A7A\u6587\u4EF6\u3002Codex \u7B49\u5DE5\u5177\u4F1A\u8DF3\u8FC7\u7A7A\u7684\u6307\u4EE4\u6587\u4EF6\u3002",
|
|
10081
10304
|
"ai001.fix.empty": "\u5728 {path} \u4E2D\u5199\u5165\u9884\u671F\u7684\u6307\u4EE4,\u6216\u5220\u9664\u8BE5\u6587\u4EF6\u3002",
|
|
@@ -10229,16 +10452,17 @@ var enT = {
|
|
|
10229
10452
|
"arc.reason.capped": "Only the first 50 results are listed.",
|
|
10230
10453
|
"arc.reason.listIncomplete": "The file list is incomplete, so some missing imports could not be confirmed.",
|
|
10231
10454
|
"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.",
|
|
10455
|
+
"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
10456
|
"dup001.block": "{lines} meaningful lines (lines {range}) appear in {copies} places.",
|
|
10457
|
+
"dup001.blockOverlap": "{lines} meaningful lines (lines {range}) repeat in full or in part in {copies} places; overlapping repeats are shown once.",
|
|
10234
10458
|
"dup001.fix": "Move the shared code into one function or module and call it from the {copies} places.",
|
|
10235
10459
|
"dup.verify": "Run the same check again and confirm {path}:{line} no longer appears.",
|
|
10236
10460
|
"dup.reason.noCode": "No supported source files were found.",
|
|
10237
10461
|
"dup.reason.capped": "Only the first 50 duplicated blocks are listed.",
|
|
10238
10462
|
"rule.AGT-001": "Skill files (SKILL.md)",
|
|
10239
10463
|
"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":
|
|
10464
|
+
"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.",
|
|
10465
|
+
"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
10466
|
"agt.verify": "Run the same check again and confirm {path}:{line} no longer appears.",
|
|
10243
10467
|
"rule.DOC-001": "Docs vs project",
|
|
10244
10468
|
"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 +10490,11 @@ var enT = {
|
|
|
10266
10490
|
"agt001.longDescription.fix": "Shorten the description in {path} and move details into the body.",
|
|
10267
10491
|
"agt001.emptyBody": "{path} has no instructions after the front matter.",
|
|
10268
10492
|
"agt001.emptyBody.fix": "Write the skill's instructions in the body of {path}.",
|
|
10493
|
+
"agt001.autoSideEffect": 'Skill "{name}" looks like it has side effects ({word}), but Claude may start it on its own.',
|
|
10494
|
+
"agt001.autoSideEffect.fix": 'Add "disable-model-invocation: true" to the front matter of {path} so that only a person starts it.',
|
|
10269
10495
|
"agt002.package-manager": "Instruction files name different package managers: {values}.",
|
|
10270
10496
|
"agt002.indentation": "Instruction files ask for different indentation: {values}.",
|
|
10271
|
-
"agt002.node-version": "Instruction files ask for
|
|
10497
|
+
"agt002.node-version": "Instruction files ask for Node.js versions that do not agree: {values}.",
|
|
10272
10498
|
"agt002.fix": "Pick one {topic} rule, keep it in one shared file and remove the others.",
|
|
10273
10499
|
"rule.DEP-001": "Pinned dependency versions",
|
|
10274
10500
|
"rule.DEP-002": "Known vulnerabilities (OSV)",
|
|
@@ -10285,7 +10511,7 @@ var enT = {
|
|
|
10285
10511
|
"rule.MCP-001": "MCP config structure",
|
|
10286
10512
|
"rule.MCP-002": "Risky MCP settings",
|
|
10287
10513
|
"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
|
|
10514
|
+
"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
10515
|
"mcp.reason.none": "No MCP config files were found.",
|
|
10290
10516
|
"mcp.verify": "Run the same check again and confirm {path}:{line} no longer appears.",
|
|
10291
10517
|
"mcp001.parse": "{path} could not be parsed as JSON.",
|
|
@@ -10308,6 +10534,8 @@ var enT = {
|
|
|
10308
10534
|
"mcp002.unpinned.fix": 'Pin "{package}" to a reviewed version (for example package@1.2.3).',
|
|
10309
10535
|
"mcp002.insecureUrl": 'Server "{server}" connects to a remote URL over plain HTTP.',
|
|
10310
10536
|
"mcp002.insecureUrl.fix": 'Use an https:// URL for "{server}".',
|
|
10537
|
+
"mcp002.broadAccess": 'Server "{server}" is given {path}, which opens the whole disk or a home folder.',
|
|
10538
|
+
"mcp002.broadAccess.fix": 'Give "{server}" only the folders it needs, for example the project folder.',
|
|
10311
10539
|
"rule.SEC-001": "Credential patterns",
|
|
10312
10540
|
"rule.SEC-002": "Sensitive files",
|
|
10313
10541
|
"sec001.scope": "Looks for well-known key and token formats in readable text files. Values are masked and never checked online.",
|
|
@@ -10387,16 +10615,17 @@ var koT = {
|
|
|
10387
10615
|
"arc.reason.capped": "\uACB0\uACFC\uB294 \uCC98\uC74C 50\uAC1C\uAE4C\uC9C0\uB9CC \uBCF4\uC5EC \uC90D\uB2C8\uB2E4.",
|
|
10388
10616
|
"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
10617
|
"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.",
|
|
10618
|
+
"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
10619
|
"dup001.block": "\uC758\uBBF8 \uC788\uB294 {lines}\uC904({range}\uD589)\uC774 {copies}\uACF3\uC5D0 \uBC18\uBCF5\uB429\uB2C8\uB2E4.",
|
|
10620
|
+
"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
10621
|
"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
10622
|
"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
10623
|
"dup.reason.noCode": "\uC9C0\uC6D0\uD558\uB294 \uC18C\uC2A4 \uD30C\uC77C\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
|
|
10395
10624
|
"dup.reason.capped": "\uC911\uBCF5 \uBE14\uB85D\uC740 \uCC98\uC74C 50\uAC1C\uAE4C\uC9C0\uB9CC \uBCF4\uC5EC \uC90D\uB2C8\uB2E4.",
|
|
10396
10625
|
"rule.AGT-001": "\uC2A4\uD0AC \uD30C\uC77C(SKILL.md)",
|
|
10397
10626
|
"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":
|
|
10627
|
+
"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.",
|
|
10628
|
+
"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
10629
|
"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
10630
|
"rule.DOC-001": "\uBB38\uC11C\uC640 \uD504\uB85C\uC81D\uD2B8 \uBD88\uC77C\uCE58",
|
|
10402
10631
|
"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 +10653,11 @@ var koT = {
|
|
|
10424
10653
|
"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
10654
|
"agt001.emptyBody": "{path}\uC758 front matter \uB4A4\uC5D0 \uC9C0\uC2DC \uB0B4\uC6A9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
10426
10655
|
"agt001.emptyBody.fix": "{path} \uBCF8\uBB38\uC5D0 \uC2A4\uD0AC\uC758 \uC9C0\uC2DC \uB0B4\uC6A9\uC744 \uC801\uC73C\uC138\uC694.",
|
|
10427
|
-
"
|
|
10428
|
-
"
|
|
10429
|
-
"agt002.
|
|
10656
|
+
"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.',
|
|
10657
|
+
"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.',
|
|
10658
|
+
"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}.",
|
|
10659
|
+
"agt002.indentation": "\uC9C0\uC2DC \uBB38\uC11C\uAC00 \uC11C\uB85C \uB2E4\uB978 \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC694\uAD6C\uD569\uB2C8\uB2E4: {values}.",
|
|
10660
|
+
"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
10661
|
"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
10662
|
"rule.DEP-001": "\uC758\uC874\uC131 \uBC84\uC804 \uACE0\uC815",
|
|
10432
10663
|
"rule.DEP-002": "\uC54C\uB824\uC9C4 \uCDE8\uC57D\uC810(OSV)",
|
|
@@ -10443,7 +10674,7 @@ var koT = {
|
|
|
10443
10674
|
"rule.MCP-001": "MCP \uC124\uC815 \uAD6C\uC870",
|
|
10444
10675
|
"rule.MCP-002": "\uC704\uD5D8\uD55C MCP \uC124\uC815",
|
|
10445
10676
|
"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.",
|
|
10677
|
+
"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
10678
|
"mcp.reason.none": "MCP \uC124\uC815 \uD30C\uC77C\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
|
|
10448
10679
|
"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
10680
|
"mcp001.parse": "{path}\uC744(\uB97C) JSON\uC73C\uB85C \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
@@ -10466,6 +10697,8 @@ var koT = {
|
|
|
10466
10697
|
"mcp002.unpinned.fix": '"{package}"\uB97C \uAC80\uD1A0\uD55C \uBC84\uC804\uC73C\uB85C \uACE0\uC815\uD558\uC138\uC694(\uC608: package@1.2.3).',
|
|
10467
10698
|
"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
10699
|
"mcp002.insecureUrl.fix": '"{server}"\uC5D0\uB294 https:// \uC8FC\uC18C\uB97C \uC4F0\uC138\uC694.',
|
|
10700
|
+
"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.',
|
|
10701
|
+
"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
10702
|
"rule.SEC-001": "\uBE44\uBC00 \uD0A4 \uD328\uD134",
|
|
10470
10703
|
"rule.SEC-002": "\uBBFC\uAC10\uD55C \uD30C\uC77C",
|
|
10471
10704
|
"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 +10778,17 @@ var jaT = {
|
|
|
10545
10778
|
"arc.reason.capped": "\u7D50\u679C\u306F\u6700\u521D\u306E 50 \u4EF6\u3060\u3051\u3092\u8868\u793A\u3057\u307E\u3059\u3002",
|
|
10546
10779
|
"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
10780
|
"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",
|
|
10781
|
+
"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
10782
|
"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",
|
|
10783
|
+
"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
10784
|
"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
10785
|
"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
10786
|
"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
10787
|
"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
10788
|
"rule.AGT-001": "\u30B9\u30AD\u30EB\u30D5\u30A1\u30A4\u30EB(SKILL.md)",
|
|
10555
10789
|
"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",
|
|
10790
|
+
"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",
|
|
10791
|
+
"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
10792
|
"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
10793
|
"rule.DOC-001": "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3068\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u4E0D\u4E00\u81F4",
|
|
10560
10794
|
"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 +10816,11 @@ var jaT = {
|
|
|
10582
10816
|
"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
10817
|
"agt001.emptyBody": "{path} \u306E front matter \u306E\u5F8C\u306B\u6307\u793A\u304C\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
10584
10818
|
"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.
|
|
10819
|
+
"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',
|
|
10820
|
+
"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',
|
|
10821
|
+
"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",
|
|
10822
|
+
"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",
|
|
10823
|
+
"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
10824
|
"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
10825
|
"rule.DEP-001": "\u4F9D\u5B58\u95A2\u4FC2\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u56FA\u5B9A",
|
|
10590
10826
|
"rule.DEP-002": "\u65E2\u77E5\u306E\u8106\u5F31\u6027(OSV)",
|
|
@@ -10601,7 +10837,7 @@ var jaT = {
|
|
|
10601
10837
|
"rule.MCP-001": "MCP \u8A2D\u5B9A\u306E\u69CB\u9020",
|
|
10602
10838
|
"rule.MCP-002": "\u5371\u967A\u306A MCP \u8A2D\u5B9A",
|
|
10603
10839
|
"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\
|
|
10840
|
+
"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
10841
|
"mcp.reason.none": "MCP \u306E\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
10606
10842
|
"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
10843
|
"mcp001.parse": "{path} \u3092 JSON \u3068\u3057\u3066\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3002",
|
|
@@ -10624,6 +10860,8 @@ var jaT = {
|
|
|
10624
10860
|
"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
10861
|
"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
10862
|
"mcp002.insecureUrl.fix": '"{server}" \u306B\u306F https:// \u306E URL \u3092\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044\u3002',
|
|
10863
|
+
"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',
|
|
10864
|
+
"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
10865
|
"rule.SEC-001": "\u8A8D\u8A3C\u60C5\u5831\u306E\u30D1\u30BF\u30FC\u30F3",
|
|
10628
10866
|
"rule.SEC-002": "\u6A5F\u5BC6\u30D5\u30A1\u30A4\u30EB",
|
|
10629
10867
|
"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 +10941,17 @@ var zhT = {
|
|
|
10703
10941
|
"arc.reason.capped": "\u53EA\u5217\u51FA\u524D 50 \u4E2A\u7ED3\u679C\u3002",
|
|
10704
10942
|
"arc.reason.listIncomplete": "\u6587\u4EF6\u5217\u8868\u4E0D\u5B8C\u6574\uFF0C\u90E8\u5206\u5BFC\u5165\u65E0\u6CD5\u786E\u8BA4\u3002",
|
|
10705
10943
|
"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",
|
|
10944
|
+
"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
10945
|
"dup001.block": "{lines} \u884C\u6709\u6548\u4EE3\u7801\uFF08\u7B2C {range} \u884C\uFF09\u5728 {copies} \u5904\u91CD\u590D\u3002",
|
|
10946
|
+
"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
10947
|
"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
10948
|
"dup.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\uFF0C\u786E\u8BA4 {path}:{line} \u4E0D\u518D\u51FA\u73B0\u3002",
|
|
10710
10949
|
"dup.reason.noCode": "\u672A\u627E\u5230\u652F\u6301\u7684\u6E90\u6587\u4EF6\u3002",
|
|
10711
10950
|
"dup.reason.capped": "\u53EA\u5217\u51FA\u524D 50 \u4E2A\u91CD\u590D\u4EE3\u7801\u5757\u3002",
|
|
10712
10951
|
"rule.AGT-001": "\u6280\u80FD\u6587\u4EF6\uFF08SKILL.md\uFF09",
|
|
10713
10952
|
"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",
|
|
10953
|
+
"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",
|
|
10954
|
+
"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
10955
|
"agt.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\uFF0C\u786E\u8BA4 {path}:{line} \u4E0D\u518D\u51FA\u73B0\u3002",
|
|
10717
10956
|
"rule.DOC-001": "\u6587\u6863\u4E0E\u9879\u76EE\u4E0D\u4E00\u81F4",
|
|
10718
10957
|
"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 +10979,11 @@ var zhT = {
|
|
|
10740
10979
|
"agt001.longDescription.fix": "\u7F29\u77ED {path} \u7684 description\uFF0C\u628A\u7EC6\u8282\u79FB\u5230\u6B63\u6587\u3002",
|
|
10741
10980
|
"agt001.emptyBody": "{path} \u7684 front matter \u4E4B\u540E\u6CA1\u6709\u6307\u4EE4\u5185\u5BB9\u3002",
|
|
10742
10981
|
"agt001.emptyBody.fix": "\u5728 {path} \u7684\u6B63\u6587\u4E2D\u5199\u51FA\u6280\u80FD\u7684\u6307\u4EE4\u3002",
|
|
10743
|
-
"
|
|
10744
|
-
"
|
|
10745
|
-
"agt002.
|
|
10982
|
+
"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",
|
|
10983
|
+
"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',
|
|
10984
|
+
"agt002.package-manager": "\u6307\u4EE4\u6587\u4EF6\u4E2D\u5199\u4E86\u4E0D\u540C\u7684\u5305\u7BA1\u7406\u5668\uFF1A{values}\u3002",
|
|
10985
|
+
"agt002.indentation": "\u6307\u4EE4\u6587\u4EF6\u8981\u6C42\u7684\u7F29\u8FDB\u4E0D\u540C\uFF1A{values}\u3002",
|
|
10986
|
+
"agt002.node-version": "\u6307\u4EE4\u6587\u4EF6\u8981\u6C42\u7684 Node.js \u7248\u672C\u4E0D\u4E00\u81F4\uFF1A{values}\u3002",
|
|
10746
10987
|
"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
10988
|
"rule.DEP-001": "\u4F9D\u8D56\u7248\u672C\u56FA\u5B9A",
|
|
10748
10989
|
"rule.DEP-002": "\u5DF2\u77E5\u6F0F\u6D1E\uFF08OSV\uFF09",
|
|
@@ -10759,7 +11000,7 @@ var zhT = {
|
|
|
10759
11000
|
"rule.MCP-001": "MCP \u914D\u7F6E\u7ED3\u6784",
|
|
10760
11001
|
"rule.MCP-002": "\u6709\u98CE\u9669\u7684 MCP \u8BBE\u7F6E",
|
|
10761
11002
|
"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\
|
|
11003
|
+
"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
11004
|
"mcp.reason.none": "\u672A\u627E\u5230 MCP \u914D\u7F6E\u6587\u4EF6\u3002",
|
|
10764
11005
|
"mcp.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\uFF0C\u786E\u8BA4 {path}:{line} \u4E0D\u518D\u51FA\u73B0\u3002",
|
|
10765
11006
|
"mcp001.parse": "\u65E0\u6CD5\u5C06 {path} \u89E3\u6790\u4E3A JSON\u3002",
|
|
@@ -10782,6 +11023,8 @@ var zhT = {
|
|
|
10782
11023
|
"mcp002.unpinned.fix": '\u5C06 "{package}" \u56FA\u5B9A\u5230\u5DF2\u5BA1\u67E5\u7684\u7248\u672C\uFF08\u4F8B\u5982 package@1.2.3\uFF09\u3002',
|
|
10783
11024
|
"mcp002.insecureUrl": '\u670D\u52A1\u5668 "{server}" \u901A\u8FC7\u660E\u6587 HTTP \u8FDE\u63A5\u8FDC\u7A0B\u5730\u5740\u3002',
|
|
10784
11025
|
"mcp002.insecureUrl.fix": '"{server}" \u8BF7\u4F7F\u7528 https:// \u5730\u5740\u3002',
|
|
11026
|
+
"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",
|
|
11027
|
+
"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
11028
|
"rule.SEC-001": "\u51ED\u636E\u6A21\u5F0F",
|
|
10786
11029
|
"rule.SEC-002": "\u654F\u611F\u6587\u4EF6",
|
|
10787
11030
|
"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 +11042,248 @@ var zhT = {
|
|
|
10799
11042
|
"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
11043
|
};
|
|
10801
11044
|
|
|
11045
|
+
// ../core/src/i18n/messages-cli.ts
|
|
11046
|
+
var enC = {
|
|
11047
|
+
"cli.header": "RepoRefit \xB7 {tool} \xB7 {read} files read of {listed} listed \xB7 {seconds}s",
|
|
11048
|
+
"cli.summary": "{findings} findings (high {high}, medium {medium}, low {low}) \xB7 {passed}/{evaluated} checks passed",
|
|
11049
|
+
"cli.partial": "Partial scan: {reasons}",
|
|
11050
|
+
"cli.partialUnknown": "some files were not read.",
|
|
11051
|
+
"cli.symlinks": "Skipped {count} symbolic links (never followed).",
|
|
11052
|
+
"cli.ruleDetails": "Rule details: {url}",
|
|
11053
|
+
"cli.wroteReport": "Wrote {md} and {json}",
|
|
11054
|
+
"cli.wroteBadge": "Wrote {file}.",
|
|
11055
|
+
"cli.badgeReadme": "README (at the top of the checked folder): {snippet}",
|
|
11056
|
+
"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.",
|
|
11057
|
+
"cli.cannotRead": "Cannot read {path}: {reason}",
|
|
11058
|
+
"cli.cannotWrite": "Cannot write {path}: {reason}",
|
|
11059
|
+
"cli.cannotCreate": "Cannot create the folder {path}: {reason}",
|
|
11060
|
+
"cli.reportIsFile": "Cannot write the report to {path}: it is a file. --out for report names a folder.",
|
|
11061
|
+
"cli.reason.notFound": "folder not found",
|
|
11062
|
+
"cli.reason.notFolder": "not a folder",
|
|
11063
|
+
"cli.reason.permission": "permission denied",
|
|
11064
|
+
"cli.reason.fileInPath": "part of the path is a file, not a folder",
|
|
11065
|
+
"cli.reason.isFolder": "it is a folder",
|
|
11066
|
+
"cli.reason.missingPath": "the path does not exist (check the drive or the folder name)",
|
|
11067
|
+
"cli.reason.diskFull": "no space left on the disk",
|
|
11068
|
+
"cli.reason.readOnly": "read-only file system",
|
|
11069
|
+
"cli.reason.tooLong": "the path is too long",
|
|
11070
|
+
"cli.compare.title": "RepoRefit compare \xB7 {tool}",
|
|
11071
|
+
"cli.compare.rule": "rule",
|
|
11072
|
+
"cli.compare.before": "before",
|
|
11073
|
+
"cli.compare.after": "after",
|
|
11074
|
+
"cli.compare.total": "total",
|
|
11075
|
+
"cli.compare.tokens": "Estimated tokens of the instruction files each agent reads at the project root (/):",
|
|
11076
|
+
"cli.compare.tokenLine": "{agent}: {before} -> {after} ({delta} tokens, {change})",
|
|
11077
|
+
"cli.compare.fewer": "{percent}% fewer",
|
|
11078
|
+
"cli.compare.more": "{percent}% more",
|
|
11079
|
+
"cli.compare.underOne": "under 1%",
|
|
11080
|
+
"cli.compare.same": "no change",
|
|
11081
|
+
"cli.compare.noRate": "no rate: the original had 0 tokens",
|
|
11082
|
+
"cli.compare.notComparable": "{agent}: not comparable (instruction files missing, conditional or partly read)",
|
|
11083
|
+
"cli.compare.noAgents": "No agent reads instruction files at / in either copy.",
|
|
11084
|
+
"cli.compare.limits": "Instruction files only: conversation, output, caching and actual charges are not included.",
|
|
11085
|
+
"cli.keep.title": "Rule preservation (string and structure checks only; a reworded rule goes to review, never counted as kept):",
|
|
11086
|
+
"cli.keep.none": "No instruction files in the original.",
|
|
11087
|
+
"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}",
|
|
11088
|
+
"cli.keep.verdict.clean": "no loss found in the checked scope",
|
|
11089
|
+
"cli.keep.verdict.estimated": "no loss found; reworded rules look the same (estimate), read them once",
|
|
11090
|
+
"cli.keep.verdict.unknown": "cannot judge ({reasons})",
|
|
11091
|
+
"cli.keep.verdict.review": "review the revised copy",
|
|
11092
|
+
"cli.keep.grade.estimated": "probably the same",
|
|
11093
|
+
"cli.keep.grade.review": "review",
|
|
11094
|
+
"cli.keep.grade.missing": "possible loss",
|
|
11095
|
+
"cli.keep.grade.scope": "out of scope",
|
|
11096
|
+
"cli.keep.reason.reworded": "reworded",
|
|
11097
|
+
"cli.keep.reason.fixedChanged": "fixed tokens changed",
|
|
11098
|
+
"cli.keep.reason.outOfScope": "no longer read here",
|
|
11099
|
+
"cli.keep.unknown.partial": "partial scan",
|
|
11100
|
+
"cli.keep.unknown.unread": "unread files",
|
|
11101
|
+
"cli.keep.mandatory": "mandatory",
|
|
11102
|
+
"cli.keep.more": "\u2026 {count} more"
|
|
11103
|
+
};
|
|
11104
|
+
var koC = {
|
|
11105
|
+
"cli.header": "RepoRefit \xB7 {tool} \xB7 \uD30C\uC77C {listed}\uAC1C \uC911 {read}\uAC1C \uC77D\uC74C \xB7 {seconds}\uCD08",
|
|
11106
|
+
"cli.summary": "\uBC1C\uACAC {findings}\uAC74(\uB192\uC74C {high}, \uC911\uAC04 {medium}, \uB0AE\uC74C {low}) \xB7 \uAC80\uC0AC {evaluated}\uAC1C \uC911 {passed}\uAC1C \uD1B5\uACFC",
|
|
11107
|
+
"cli.partial": "\uBD80\uBD84 \uAC80\uC0AC: {reasons}",
|
|
11108
|
+
"cli.partialUnknown": "\uC77C\uBD80 \uD30C\uC77C\uC744 \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
|
|
11109
|
+
"cli.symlinks": "\uC2EC\uBCFC\uB9AD \uB9C1\uD06C {count}\uAC1C\uB294 \uB530\uB77C\uAC00\uC9C0 \uC54A\uACE0 \uAC74\uB108\uB6F0\uC5C8\uC2B5\uB2C8\uB2E4.",
|
|
11110
|
+
"cli.ruleDetails": "\uADDC\uCE59 \uC124\uBA85: {url}",
|
|
11111
|
+
"cli.wroteReport": "{md}, {json} \uD30C\uC77C\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",
|
|
11112
|
+
"cli.wroteBadge": "{file} \uD30C\uC77C\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",
|
|
11113
|
+
"cli.badgeReadme": "README(\uAC80\uC0AC\uD55C \uD3F4\uB354 \uB9E8 \uC704)\uC5D0 \uB123\uC744 \uB0B4\uC6A9: {snippet}",
|
|
11114
|
+
"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.",
|
|
11115
|
+
"cli.cannotRead": "{path}\uC744(\uB97C) \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: {reason}",
|
|
11116
|
+
"cli.cannotWrite": "{path}\uC5D0 \uC800\uC7A5\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: {reason}",
|
|
11117
|
+
"cli.cannotCreate": "{path} \uD3F4\uB354\uB97C \uB9CC\uB4E4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: {reason}",
|
|
11118
|
+
"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.",
|
|
11119
|
+
"cli.reason.notFound": "\uD3F4\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
11120
|
+
"cli.reason.notFolder": "\uD3F4\uB354\uAC00 \uC544\uB2D9\uB2C8\uB2E4",
|
|
11121
|
+
"cli.reason.permission": "\uAD8C\uD55C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
11122
|
+
"cli.reason.fileInPath": "\uACBD\uB85C \uC911\uAC04\uC5D0 \uD3F4\uB354\uAC00 \uC544\uB2CC \uD30C\uC77C\uC774 \uC788\uC2B5\uB2C8\uB2E4",
|
|
11123
|
+
"cli.reason.isFolder": "\uD3F4\uB354\uC785\uB2C8\uB2E4",
|
|
11124
|
+
"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)",
|
|
11125
|
+
"cli.reason.diskFull": "\uB514\uC2A4\uD06C \uACF5\uAC04\uC774 \uBD80\uC871\uD569\uB2C8\uB2E4",
|
|
11126
|
+
"cli.reason.readOnly": "\uC77D\uAE30 \uC804\uC6A9 \uD30C\uC77C \uC2DC\uC2A4\uD15C\uC785\uB2C8\uB2E4",
|
|
11127
|
+
"cli.reason.tooLong": "\uACBD\uB85C\uAC00 \uB108\uBB34 \uAE41\uB2C8\uB2E4",
|
|
11128
|
+
"cli.compare.title": "RepoRefit \uBE44\uAD50 \xB7 {tool}",
|
|
11129
|
+
"cli.compare.rule": "\uADDC\uCE59",
|
|
11130
|
+
"cli.compare.before": "\uC6D0\uBCF8",
|
|
11131
|
+
"cli.compare.after": "\uC218\uC815\uBCF8",
|
|
11132
|
+
"cli.compare.total": "\uD569\uACC4",
|
|
11133
|
+
"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:",
|
|
11134
|
+
"cli.compare.tokenLine": "{agent}: {before} -> {after} ({delta}\uD1A0\uD070, {change})",
|
|
11135
|
+
"cli.compare.fewer": "{percent}% \uAC10\uC18C",
|
|
11136
|
+
"cli.compare.more": "{percent}% \uC99D\uAC00",
|
|
11137
|
+
"cli.compare.underOne": "1% \uBBF8\uB9CC",
|
|
11138
|
+
"cli.compare.same": "\uBCC0\uD654 \uC5C6\uC74C",
|
|
11139
|
+
"cli.compare.noRate": "\uC6D0\uBCF8\uC774 0\uD1A0\uD070\uC774\uB77C \uBE44\uC728 \uC5C6\uC74C",
|
|
11140
|
+
"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)",
|
|
11141
|
+
"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.",
|
|
11142
|
+
"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.",
|
|
11143
|
+
"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):",
|
|
11144
|
+
"cli.keep.none": "\uC6D0\uBCF8\uC5D0 \uC9C0\uC2DC \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
11145
|
+
"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}",
|
|
11146
|
+
"cli.keep.verdict.clean": "\uD655\uC778\uD55C \uBC94\uC704\uC5D0\uC11C \uC783\uC740 \uADDC\uCE59 \uC5C6\uC74C",
|
|
11147
|
+
"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",
|
|
11148
|
+
"cli.keep.verdict.unknown": "\uD310\uB2E8\uD560 \uC218 \uC5C6\uC74C({reasons})",
|
|
11149
|
+
"cli.keep.verdict.review": "\uC218\uC815\uBCF8\uC744 \uAC80\uD1A0\uD558\uC138\uC694",
|
|
11150
|
+
"cli.keep.grade.estimated": "\uAC19\uC544 \uBCF4\uC784",
|
|
11151
|
+
"cli.keep.grade.review": "\uAC80\uD1A0",
|
|
11152
|
+
"cli.keep.grade.missing": "\uC0AC\uB77C\uC84C\uC744 \uC218 \uC788\uC74C",
|
|
11153
|
+
"cli.keep.grade.scope": "\uBC94\uC704 \uBC16",
|
|
11154
|
+
"cli.keep.reason.reworded": "\uBC14\uAFD4 \uC500",
|
|
11155
|
+
"cli.keep.reason.fixedChanged": "\uACE0\uC815 \uD1A0\uD070 \uBCC0\uACBD",
|
|
11156
|
+
"cli.keep.reason.outOfScope": "\uC5EC\uAE30\uC11C\uB294 \uB354 \uC774\uC0C1 \uC77D\uC9C0 \uC54A\uC74C",
|
|
11157
|
+
"cli.keep.unknown.partial": "\uBD80\uBD84 \uAC80\uC0AC",
|
|
11158
|
+
"cli.keep.unknown.unread": "\uC77D\uC9C0 \uBABB\uD55C \uD30C\uC77C",
|
|
11159
|
+
"cli.keep.mandatory": "\uD544\uC218",
|
|
11160
|
+
"cli.keep.more": "\u2026 {count}\uAC1C \uB354"
|
|
11161
|
+
};
|
|
11162
|
+
var jaC = {
|
|
11163
|
+
"cli.header": "RepoRefit \xB7 {tool} \xB7 {listed} \u4EF6\u4E2D {read} \u4EF6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u307F \xB7 {seconds} \u79D2",
|
|
11164
|
+
"cli.summary": "\u691C\u51FA {findings} \u4EF6(\u9AD8 {high}\u3001\u4E2D {medium}\u3001\u4F4E {low}) \xB7 \u691C\u67FB {evaluated} \u4EF6\u4E2D {passed} \u4EF6\u5408\u683C",
|
|
11165
|
+
"cli.partial": "\u90E8\u5206\u7684\u306A\u691C\u67FB: {reasons}",
|
|
11166
|
+
"cli.partialUnknown": "\u4E00\u90E8\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
11167
|
+
"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",
|
|
11168
|
+
"cli.ruleDetails": "\u30EB\u30FC\u30EB\u306E\u8AAC\u660E: {url}",
|
|
11169
|
+
"cli.wroteReport": "{md} \u3068 {json} \u3092\u66F8\u304D\u51FA\u3057\u307E\u3057\u305F\u3002",
|
|
11170
|
+
"cli.wroteBadge": "{file} \u3092\u66F8\u304D\u51FA\u3057\u307E\u3057\u305F\u3002",
|
|
11171
|
+
"cli.badgeReadme": "README(\u691C\u67FB\u3057\u305F\u30D5\u30A9\u30EB\u30C0\u30FC\u306E\u6700\u4E0A\u4F4D)\u306B\u5165\u308C\u308B\u5185\u5BB9: {snippet}",
|
|
11172
|
+
"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",
|
|
11173
|
+
"cli.cannotRead": "{path} \u3092\u8AAD\u3081\u307E\u305B\u3093: {reason}",
|
|
11174
|
+
"cli.cannotWrite": "{path} \u306B\u66F8\u304D\u8FBC\u3081\u307E\u305B\u3093: {reason}",
|
|
11175
|
+
"cli.cannotCreate": "\u30D5\u30A9\u30EB\u30C0\u30FC {path} \u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: {reason}",
|
|
11176
|
+
"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",
|
|
11177
|
+
"cli.reason.notFound": "\u30D5\u30A9\u30EB\u30C0\u30FC\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
11178
|
+
"cli.reason.notFolder": "\u30D5\u30A9\u30EB\u30C0\u30FC\u3067\u306F\u3042\u308A\u307E\u305B\u3093",
|
|
11179
|
+
"cli.reason.permission": "\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
11180
|
+
"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",
|
|
11181
|
+
"cli.reason.isFolder": "\u30D5\u30A9\u30EB\u30C0\u30FC\u3067\u3059",
|
|
11182
|
+
"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)",
|
|
11183
|
+
"cli.reason.diskFull": "\u30C7\u30A3\u30B9\u30AF\u306E\u7A7A\u304D\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
11184
|
+
"cli.reason.readOnly": "\u8AAD\u307F\u53D6\u308A\u5C02\u7528\u306E\u30D5\u30A1\u30A4\u30EB\u30B7\u30B9\u30C6\u30E0\u3067\u3059",
|
|
11185
|
+
"cli.reason.tooLong": "\u30D1\u30B9\u304C\u9577\u3059\u304E\u307E\u3059",
|
|
11186
|
+
"cli.compare.title": "RepoRefit \u6BD4\u8F03 \xB7 {tool}",
|
|
11187
|
+
"cli.compare.rule": "\u30EB\u30FC\u30EB",
|
|
11188
|
+
"cli.compare.before": "\u5143",
|
|
11189
|
+
"cli.compare.after": "\u4FEE\u6B63\u7248",
|
|
11190
|
+
"cli.compare.total": "\u5408\u8A08",
|
|
11191
|
+
"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:",
|
|
11192
|
+
"cli.compare.tokenLine": "{agent}: {before} -> {after}({delta} \u30C8\u30FC\u30AF\u30F3\u3001{change})",
|
|
11193
|
+
"cli.compare.fewer": "{percent}% \u6E1B\u5C11",
|
|
11194
|
+
"cli.compare.more": "{percent}% \u5897\u52A0",
|
|
11195
|
+
"cli.compare.underOne": "1% \u672A\u6E80",
|
|
11196
|
+
"cli.compare.same": "\u5909\u5316\u306A\u3057",
|
|
11197
|
+
"cli.compare.noRate": "\u5143\u304C 0 \u30C8\u30FC\u30AF\u30F3\u306E\u305F\u3081\u5272\u5408\u306A\u3057",
|
|
11198
|
+
"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)",
|
|
11199
|
+
"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",
|
|
11200
|
+
"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",
|
|
11201
|
+
"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):",
|
|
11202
|
+
"cli.keep.none": "\u5143\u306E\u7248\u306B\u6307\u793A\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
11203
|
+
"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}",
|
|
11204
|
+
"cli.keep.verdict.clean": "\u78BA\u8A8D\u3057\u305F\u7BC4\u56F2\u3067\u5931\u308F\u308C\u305F\u30EB\u30FC\u30EB\u306F\u3042\u308A\u307E\u305B\u3093",
|
|
11205
|
+
"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",
|
|
11206
|
+
"cli.keep.verdict.unknown": "\u5224\u65AD\u3067\u304D\u307E\u305B\u3093({reasons})",
|
|
11207
|
+
"cli.keep.verdict.review": "\u4FEE\u6B63\u7248\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
11208
|
+
"cli.keep.grade.estimated": "\u540C\u3058\u306B\u898B\u3048\u308B",
|
|
11209
|
+
"cli.keep.grade.review": "\u78BA\u8A8D",
|
|
11210
|
+
"cli.keep.grade.missing": "\u5931\u308F\u308C\u305F\u53EF\u80FD\u6027",
|
|
11211
|
+
"cli.keep.grade.scope": "\u7BC4\u56F2\u5916",
|
|
11212
|
+
"cli.keep.reason.reworded": "\u8A00\u3044\u63DB\u3048",
|
|
11213
|
+
"cli.keep.reason.fixedChanged": "\u56FA\u5B9A\u30C8\u30FC\u30AF\u30F3\u5909\u66F4",
|
|
11214
|
+
"cli.keep.reason.outOfScope": "\u3053\u3053\u3067\u306F\u8AAD\u307E\u308C\u306A\u304F\u306A\u3063\u305F",
|
|
11215
|
+
"cli.keep.unknown.partial": "\u90E8\u5206\u7684\u306A\u691C\u67FB",
|
|
11216
|
+
"cli.keep.unknown.unread": "\u8AAD\u3081\u306A\u3044\u30D5\u30A1\u30A4\u30EB",
|
|
11217
|
+
"cli.keep.mandatory": "\u5FC5\u9808",
|
|
11218
|
+
"cli.keep.more": "\u2026 \u307B\u304B {count} \u4EF6"
|
|
11219
|
+
};
|
|
11220
|
+
var zhC = {
|
|
11221
|
+
"cli.header": "RepoRefit \xB7 {tool} \xB7 \u5DF2\u8BFB\u53D6 {listed} \u4E2A\u6587\u4EF6\u4E2D\u7684 {read} \u4E2A \xB7 {seconds} \u79D2",
|
|
11222
|
+
"cli.summary": "\u53D1\u73B0 {findings} \u9879\uFF08\u9AD8 {high}\u3001\u4E2D {medium}\u3001\u4F4E {low}\uFF09\xB7 {evaluated} \u9879\u68C0\u67E5\u4E2D {passed} \u9879\u901A\u8FC7",
|
|
11223
|
+
"cli.partial": "\u90E8\u5206\u68C0\u67E5\uFF1A{reasons}",
|
|
11224
|
+
"cli.partialUnknown": "\u6709\u4E9B\u6587\u4EF6\u672A\u80FD\u8BFB\u53D6\u3002",
|
|
11225
|
+
"cli.symlinks": "\u5DF2\u8DF3\u8FC7 {count} \u4E2A\u7B26\u53F7\u94FE\u63A5\uFF08\u4ECE\u4E0D\u8DDF\u968F\uFF09\u3002",
|
|
11226
|
+
"cli.ruleDetails": "\u89C4\u5219\u8BF4\u660E\uFF1A{url}",
|
|
11227
|
+
"cli.wroteReport": "\u5DF2\u5199\u5165 {md} \u548C {json}",
|
|
11228
|
+
"cli.wroteBadge": "\u5DF2\u5199\u5165 {file}\u3002",
|
|
11229
|
+
"cli.badgeReadme": "README\uFF08\u4F4D\u4E8E\u6240\u68C0\u67E5\u6587\u4EF6\u5939\u7684\u9876\u5C42\uFF09\u4E2D\u52A0\u5165\uFF1A{snippet}",
|
|
11230
|
+
"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",
|
|
11231
|
+
"cli.cannotRead": "\u65E0\u6CD5\u8BFB\u53D6 {path}\uFF1A{reason}",
|
|
11232
|
+
"cli.cannotWrite": "\u65E0\u6CD5\u5199\u5165 {path}\uFF1A{reason}",
|
|
11233
|
+
"cli.cannotCreate": "\u65E0\u6CD5\u521B\u5EFA\u6587\u4EF6\u5939 {path}\uFF1A{reason}",
|
|
11234
|
+
"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",
|
|
11235
|
+
"cli.reason.notFound": "\u6587\u4EF6\u5939\u4E0D\u5B58\u5728",
|
|
11236
|
+
"cli.reason.notFolder": "\u4E0D\u662F\u6587\u4EF6\u5939",
|
|
11237
|
+
"cli.reason.permission": "\u6CA1\u6709\u6743\u9650",
|
|
11238
|
+
"cli.reason.fileInPath": "\u8DEF\u5F84\u4E2D\u6709\u4E00\u90E8\u5206\u662F\u6587\u4EF6\u800C\u4E0D\u662F\u6587\u4EF6\u5939",
|
|
11239
|
+
"cli.reason.isFolder": "\u5B83\u662F\u6587\u4EF6\u5939",
|
|
11240
|
+
"cli.reason.missingPath": "\u8DEF\u5F84\u4E0D\u5B58\u5728\uFF08\u8BF7\u68C0\u67E5\u9A71\u52A8\u5668\u6216\u6587\u4EF6\u5939\u540D\u79F0\uFF09",
|
|
11241
|
+
"cli.reason.diskFull": "\u78C1\u76D8\u7A7A\u95F4\u4E0D\u8DB3",
|
|
11242
|
+
"cli.reason.readOnly": "\u53EA\u8BFB\u6587\u4EF6\u7CFB\u7EDF",
|
|
11243
|
+
"cli.reason.tooLong": "\u8DEF\u5F84\u592A\u957F",
|
|
11244
|
+
"cli.compare.title": "RepoRefit \u6BD4\u8F83 \xB7 {tool}",
|
|
11245
|
+
"cli.compare.rule": "\u89C4\u5219",
|
|
11246
|
+
"cli.compare.before": "\u539F\u7248",
|
|
11247
|
+
"cli.compare.after": "\u4FEE\u6539\u7248",
|
|
11248
|
+
"cli.compare.total": "\u5408\u8BA1",
|
|
11249
|
+
"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",
|
|
11250
|
+
"cli.compare.tokenLine": "{agent}\uFF1A{before} -> {after}\uFF08{delta} token\uFF0C{change}\uFF09",
|
|
11251
|
+
"cli.compare.fewer": "\u51CF\u5C11 {percent}%",
|
|
11252
|
+
"cli.compare.more": "\u589E\u52A0 {percent}%",
|
|
11253
|
+
"cli.compare.underOne": "\u4E0D\u5230 1%",
|
|
11254
|
+
"cli.compare.same": "\u6CA1\u6709\u53D8\u5316",
|
|
11255
|
+
"cli.compare.noRate": "\u539F\u7248\u4E3A 0 token\uFF0C\u65E0\u6CD5\u8BA1\u7B97\u6BD4\u4F8B",
|
|
11256
|
+
"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",
|
|
11257
|
+
"cli.compare.noAgents": "\u4E24\u4E2A\u7248\u672C\u4E2D\u90FD\u6CA1\u6709\u4EE3\u7406\u5728 / \u8BFB\u53D6\u6307\u4EE4\u6587\u4EF6\u3002",
|
|
11258
|
+
"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",
|
|
11259
|
+
"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",
|
|
11260
|
+
"cli.keep.none": "\u539F\u7248\u4E2D\u6CA1\u6709\u6307\u4EE4\u6587\u4EF6\u3002",
|
|
11261
|
+
"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}",
|
|
11262
|
+
"cli.keep.verdict.clean": "\u68C0\u67E5\u8303\u56F4\u5185\u6CA1\u6709\u53D1\u73B0\u4E22\u5931",
|
|
11263
|
+
"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",
|
|
11264
|
+
"cli.keep.verdict.unknown": "\u65E0\u6CD5\u5224\u65AD\uFF08{reasons}\uFF09",
|
|
11265
|
+
"cli.keep.verdict.review": "\u8BF7\u590D\u6838\u4FEE\u6539\u7248",
|
|
11266
|
+
"cli.keep.grade.estimated": "\u770B\u4F3C\u76F8\u540C",
|
|
11267
|
+
"cli.keep.grade.review": "\u590D\u6838",
|
|
11268
|
+
"cli.keep.grade.missing": "\u53EF\u80FD\u4E22\u5931",
|
|
11269
|
+
"cli.keep.grade.scope": "\u8303\u56F4\u5916",
|
|
11270
|
+
"cli.keep.reason.reworded": "\u6539\u5199",
|
|
11271
|
+
"cli.keep.reason.fixedChanged": "\u56FA\u5B9A\u8BCD\u53D8\u5316",
|
|
11272
|
+
"cli.keep.reason.outOfScope": "\u8FD9\u91CC\u4E0D\u518D\u8BFB\u53D6",
|
|
11273
|
+
"cli.keep.unknown.partial": "\u90E8\u5206\u68C0\u67E5",
|
|
11274
|
+
"cli.keep.unknown.unread": "\u672A\u8BFB\u53D6\u7684\u6587\u4EF6",
|
|
11275
|
+
"cli.keep.mandatory": "\u5FC5\u987B",
|
|
11276
|
+
"cli.keep.more": "\u2026 \u8FD8\u6709 {count} \u9879"
|
|
11277
|
+
};
|
|
11278
|
+
|
|
10802
11279
|
// ../core/src/i18n/messages.ts
|
|
10803
11280
|
var en = {
|
|
10804
11281
|
"report.title": "RepoRefit report",
|
|
10805
11282
|
"report.generated": "Generated (UTC)",
|
|
10806
11283
|
"report.scanId": "Scan ID",
|
|
10807
11284
|
"report.input": "Input",
|
|
10808
|
-
"report.input.zip": "Local ZIP file (
|
|
10809
|
-
"report.input.folder": "Local folder (
|
|
11285
|
+
"report.input.zip": "Local ZIP file (read on this device, not uploaded)",
|
|
11286
|
+
"report.input.folder": "Local folder (read on this device, not uploaded)",
|
|
10810
11287
|
"report.input.github": "Public GitHub repository",
|
|
10811
11288
|
"report.wrapper": "Detected root folder (stripped)",
|
|
10812
11289
|
"report.commit": "Commit SHA",
|
|
@@ -10895,8 +11372,8 @@ var ko = {
|
|
|
10895
11372
|
"report.generated": "\uC0DD\uC131 \uC2DC\uAC01(UTC)",
|
|
10896
11373
|
"report.scanId": "\uAC80\uC0AC ID",
|
|
10897
11374
|
"report.input": "\uC785\uB825",
|
|
10898
|
-
"report.input.zip": "\uB85C\uCEEC ZIP \uD30C\uC77C(\
|
|
10899
|
-
"report.input.folder": "\uB85C\uCEEC \uD3F4\uB354(\
|
|
11375
|
+
"report.input.zip": "\uB85C\uCEEC ZIP \uD30C\uC77C(\uC774 \uAE30\uAE30\uC5D0\uC11C \uC77D\uC74C, \uC5C5\uB85C\uB4DC \uC5C6\uC74C)",
|
|
11376
|
+
"report.input.folder": "\uB85C\uCEEC \uD3F4\uB354(\uC774 \uAE30\uAE30\uC5D0\uC11C \uC77D\uC74C, \uC5C5\uB85C\uB4DC \uC5C6\uC74C)",
|
|
10900
11377
|
"report.input.github": "\uACF5\uAC1C GitHub \uC800\uC7A5\uC18C",
|
|
10901
11378
|
"report.wrapper": "\uC778\uC2DD\uD55C \uCD5C\uC0C1\uC704 \uD3F4\uB354(\uC81C\uAC70\uB428)",
|
|
10902
11379
|
"report.commit": "\uCEE4\uBC0B SHA",
|
|
@@ -10985,8 +11462,8 @@ var ja = {
|
|
|
10985
11462
|
"report.generated": "\u751F\u6210\u65E5\u6642(UTC)",
|
|
10986
11463
|
"report.scanId": "\u691C\u67FB ID",
|
|
10987
11464
|
"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(\
|
|
11465
|
+
"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)",
|
|
11466
|
+
"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
11467
|
"report.input.github": "\u516C\u958B GitHub \u30EA\u30DD\u30B8\u30C8\u30EA",
|
|
10991
11468
|
"report.wrapper": "\u691C\u51FA\u3057\u305F\u6700\u4E0A\u4F4D\u30D5\u30A9\u30EB\u30C0\u30FC(\u9664\u53BB\u6E08\u307F)",
|
|
10992
11469
|
"report.commit": "\u30B3\u30DF\u30C3\u30C8 SHA",
|
|
@@ -11075,8 +11552,8 @@ var zhHans = {
|
|
|
11075
11552
|
"report.generated": "\u751F\u6210\u65F6\u95F4(UTC)",
|
|
11076
11553
|
"report.scanId": "\u68C0\u67E5 ID",
|
|
11077
11554
|
"report.input": "\u8F93\u5165",
|
|
11078
|
-
"report.input.zip": "\u672C\u5730 ZIP \u6587\u4EF6(\u5728\
|
|
11079
|
-
"report.input.folder": "\u672C\u5730\u6587\u4EF6\u5939(\u5728\
|
|
11555
|
+
"report.input.zip": "\u672C\u5730 ZIP \u6587\u4EF6(\u5728\u672C\u8BBE\u5907\u4E0A\u8BFB\u53D6,\u4E0D\u4E0A\u4F20)",
|
|
11556
|
+
"report.input.folder": "\u672C\u5730\u6587\u4EF6\u5939(\u5728\u672C\u8BBE\u5907\u4E0A\u8BFB\u53D6,\u4E0D\u4E0A\u4F20)",
|
|
11080
11557
|
"report.input.github": "\u516C\u5F00 GitHub \u4ED3\u5E93",
|
|
11081
11558
|
"report.wrapper": "\u8BC6\u522B\u51FA\u7684\u9876\u5C42\u6587\u4EF6\u5939(\u5DF2\u53BB\u9664)",
|
|
11082
11559
|
"report.commit": "\u63D0\u4EA4 SHA",
|
|
@@ -11161,10 +11638,10 @@ var zhHans = {
|
|
|
11161
11638
|
"exclusion.not-supported-yet": "\u6682\u4E0D\u652F\u6301"
|
|
11162
11639
|
};
|
|
11163
11640
|
var CATALOGS = {
|
|
11164
|
-
en: { ...en, ...en2, ...enT },
|
|
11165
|
-
ko: { ...ko, ...ko2, ...koT },
|
|
11166
|
-
ja: { ...ja, ...ja2, ...jaT },
|
|
11167
|
-
"zh-Hans": { ...zhHans, ...zh2, ...zhT }
|
|
11641
|
+
en: { ...en, ...en2, ...enT, ...enC },
|
|
11642
|
+
ko: { ...ko, ...ko2, ...koT, ...koC },
|
|
11643
|
+
ja: { ...ja, ...ja2, ...jaT, ...jaC },
|
|
11644
|
+
"zh-Hans": { ...zhHans, ...zh2, ...zhT, ...zhC }
|
|
11168
11645
|
};
|
|
11169
11646
|
function t(locale, key, params = {}) {
|
|
11170
11647
|
const template = CATALOGS[locale][key] ?? CATALOGS.en[key] ?? key;
|
|
@@ -11215,9 +11692,9 @@ function findingBlock(locale, f, n) {
|
|
|
11215
11692
|
`### ${n}. ${code(where3)} \xB7 ${f.ruleId} \xB7 ${t(locale, `severity.${f.severity}`)}`,
|
|
11216
11693
|
"",
|
|
11217
11694
|
msg(locale, f.messageKey, f.params),
|
|
11218
|
-
""
|
|
11219
|
-
`- ${t(locale, "report.target")}: ${code(String(f.params.target ?? ""))}`
|
|
11695
|
+
""
|
|
11220
11696
|
];
|
|
11697
|
+
if (f.params.target !== void 0 && f.params.target !== "") lines.push(`- ${t(locale, "report.target")}: ${code(String(f.params.target))}`);
|
|
11221
11698
|
if (f.params.resolved !== void 0) lines.push(`- ${t(locale, "report.resolved")}: ${code(String(f.params.resolved))}`);
|
|
11222
11699
|
lines.push(
|
|
11223
11700
|
`- ${t(locale, "report.fix")}: ${msg(locale, f.recommendation.messageKey, f.recommendation.params)}`,
|
|
@@ -11396,65 +11873,6 @@ function renderFixPlan(report, locale) {
|
|
|
11396
11873
|
return out.join("\n");
|
|
11397
11874
|
}
|
|
11398
11875
|
|
|
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
11876
|
// ../core/src/ai/preservation.ts
|
|
11459
11877
|
var MANDATORY_RE = /\b(must|never|always|required|do not|don't|shall not)\b|반드시|절대|금지|필수|하지 ?마|必ず|禁止|してはいけない|しないで|必须|不要|不得|务必/i;
|
|
11460
11878
|
var TAG_RE = {
|
|
@@ -11464,18 +11882,61 @@ var TAG_RE = {
|
|
|
11464
11882
|
database: /\b(database|migration|schema|sql|db)\b|데이터베이스|마이그레이션|データベース|マイグレーション|数据库|迁移/i,
|
|
11465
11883
|
delete: /\b(delet|remov|drop|rm -rf|truncat)\w*|삭제|削除|删除/i
|
|
11466
11884
|
};
|
|
11467
|
-
var NEGATION_RE = /\b(not|never|no|without|don't|doesn't|won't|cannot|can't)\b|않|말고|말
|
|
11885
|
+
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;
|
|
11886
|
+
var MODALS = [
|
|
11887
|
+
["always", /\b(always|every time|must|required|mandatory)\b|반드시|항상|꼭|필수|必ず|常に|いつも|必須|必须|总是|始终|务必|一定/gi],
|
|
11888
|
+
["sometimes", /\b(sometimes|occasionally|optionally)\b|가끔|때때로|ときどき|時々|たまに|偶尔|有时/gi],
|
|
11889
|
+
["may", /\b(may|can|could|allowed)\b|수 있|해도 된|できる|できます|てもよい|てもいい|可以|允许/gi],
|
|
11890
|
+
["should", /\b(should|recommended|prefer)\b|권장|하는 것이 좋|推奨|べき|望ましい|应该|应当|最好|建议/gi],
|
|
11891
|
+
["only", /\b(only|solely)\b|(?<=[가-힣])만(?=\s|$|[.,])|だけ|のみ|只|仅/gi],
|
|
11892
|
+
// Order words: "before you commit" and "after you commit" are different rules (answer set en-16, ko-16, ja-16, zh-16).
|
|
11893
|
+
["before", /\b(before|prior to|first|until|beforehand)\b|전에|전까지|먼저|前に|前の|事前に|までに|先に|之前|先/gi],
|
|
11894
|
+
["after", /\b(after|afterwards|then)\b|후에|뒤에|다음에|後に|後で|てから|之后|后|再/gi],
|
|
11895
|
+
// Who acts or decides: "ask" and "check with the team" are different rules (operator review 12-02, en-08).
|
|
11896
|
+
["actor:team", /\b(team|teammates?|colleagues?|peers?)\b|팀(?!장)|동료|チーム|同僚|团队|同事/gi],
|
|
11897
|
+
["actor:lead", /\b(leads?|managers?|owners?|maintainers?|admins?|administrators?)\b|팀장|리더|담당자|관리자|책임자|메인테이너|リーダー|担当者|管理者|責任者|メンテナ|负责人|管理员|主管|维护者/gi],
|
|
11898
|
+
["actor:anyone", /\b(anyone|any contributor|contributors?)\b|누구나|아무나|誰でも|任何人|贡献者/gi],
|
|
11899
|
+
// What must happen: asking, getting approval, checking and telling are different duties (ko-08, ja-08, zh-08).
|
|
11900
|
+
["act:ask", /\b(ask|consult|discuss|check with|talk to)\b|물어|문의|상의|상담|여쭤|聞い|尋ね|相談|問い合わせ|询问|咨询|商量|请教/gi],
|
|
11901
|
+
["act:approve", /\b(approv\w*|sign[- ]off|permission)\b|승인|허락|허가|확인을? ?받|承認|許可|了承|批准|审批|许可/gi],
|
|
11902
|
+
["act:verify", /\b(verify|confirm|check(?! with))\b|확인(?!을? ?받)|검증|점검|確認|確かめ|确认|检查|核对/gi],
|
|
11903
|
+
["act:notify", /\b(tell|inform|notify|report to)\b|알리|알려|통보|知らせ|通知|連絡|告知/gi],
|
|
11904
|
+
// Where it applies: existing versus new code, all versus some, an area versus related parts (ko-08, ko-09 note).
|
|
11905
|
+
["scope:existing", /\b(existing|current|old|legacy)\b|기존|이전|既存|現在の|现有|已有|旧/gi],
|
|
11906
|
+
["scope:new", /\b(new|newly)\b|(?:^|\s)새(?=\s|로)|신규|新規|新しい|新/gi],
|
|
11907
|
+
["scope:all", /\b(all|every|each|any)\b|모든|전체|전부|すべて|全て|全部|所有|每个/gi],
|
|
11908
|
+
["scope:some", /\b(some|certain|part of)\b|일부|一部|部分|某些/gi],
|
|
11909
|
+
["scope:related", /\b(related|relevant)\b|관련|関連|相关|有关/gi],
|
|
11910
|
+
// Which environment: a rule for production and the same rule for tests are different rules (external QA 12-02).
|
|
11911
|
+
["env:production", /\b(production|prod)\b|운영 ?환경|프로덕션|本番|生产环境|线上/gi],
|
|
11912
|
+
["env:test", /\b(?:test|testing|staging) (?:environment|env)\b|테스트 ?환경|스테이징|テスト環境|ステージング|测试环境|预发/gi],
|
|
11913
|
+
["env:development", /\b(?:development|dev|local) (?:environment|env|machine)\b|개발 ?환경|로컬|開発環境|ローカル|开发环境|本地/gi],
|
|
11914
|
+
// Numeric conditions: "Node 20 or later" and "Node 20" are different requirements.
|
|
11915
|
+
["cmp:min", /\b(or later|or newer|or above|or higher|or more|at least|and up)\b|이상|최소|以上|以降|少なくとも|及以上|至少|不少于/gi],
|
|
11916
|
+
["cmp:max", /\b(or earlier|or older|or below|or lower|or less|at most)\b|이하|최대|以下|及以下|至多|不超过/gi],
|
|
11917
|
+
["cmp:over", /\b(more than|greater than|exceeds?)\b|초과|を超え|超过|大于/gi],
|
|
11918
|
+
["cmp:under", /\b(less than|fewer than)\b|미만|未満|小于|少于/gi]
|
|
11919
|
+
];
|
|
11920
|
+
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;
|
|
11921
|
+
var REVIEW_MIN = 0.5;
|
|
11922
|
+
var ESTIMATE_MIN = 0.6;
|
|
11468
11923
|
var unify = (s) => s.replace(/\r\n?/g, "\n").trim();
|
|
11469
11924
|
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();
|
|
11925
|
+
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
11926
|
}
|
|
11472
11927
|
function fixedTokens(s) {
|
|
11473
11928
|
const out = [];
|
|
11474
|
-
for (const m of s.matchAll(/`([^`]+)`/g)) out.push(`code:${m[1]}`);
|
|
11475
|
-
const plain = s.replace(/`[^`]
|
|
11929
|
+
for (const m of s.matchAll(/`([^`]+)`/g)) if (/[\s/.\d-]/.test(m[1])) out.push(`code:${m[1]}`);
|
|
11930
|
+
const plain = s.replace(/`([^`]+)`/g, (m, w) => /[\s/.\d-]/.test(w) ? " " : w);
|
|
11476
11931
|
for (const m of plain.matchAll(/\d+(?:[.,]\d+)?%?/g)) out.push(`num:${m[0]}`);
|
|
11477
11932
|
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
|
-
|
|
11933
|
+
if (NEGATION_RE.test(plain)) out.push("neg");
|
|
11934
|
+
NEGATION_RE.lastIndex = 0;
|
|
11935
|
+
for (const [name, re] of MODALS) {
|
|
11936
|
+
if (re.test(plain)) out.push(`modal:${name}`);
|
|
11937
|
+
re.lastIndex = 0;
|
|
11938
|
+
}
|
|
11939
|
+
for (const tool2 of new Set([...plain.matchAll(TOOL_RE)].map((m) => m[1].toLowerCase()))) out.push(`tool:${tool2}`);
|
|
11479
11940
|
return out.sort();
|
|
11480
11941
|
}
|
|
11481
11942
|
var sameFixed = (a, b) => a.length === b.length && a.every((x, i) => x === b[i]);
|
|
@@ -11487,12 +11948,30 @@ function words(s) {
|
|
|
11487
11948
|
for (const part of cjk.split(" ")) for (let i = 0; i + 1 < part.length; i++) out.add(part.slice(i, i + 2));
|
|
11488
11949
|
return out;
|
|
11489
11950
|
}
|
|
11951
|
+
var ZH_FUNCTION = /[的了要请先再在中得于把被让使将着过呢吗吧啊也都就还又很时并而或与和及对向到从用以为是有会能可应当必须需要]/g;
|
|
11952
|
+
function contentWords(s) {
|
|
11953
|
+
const out = /* @__PURE__ */ new Set();
|
|
11954
|
+
const lower = s.toLowerCase();
|
|
11955
|
+
for (const m of lower.matchAll(/[a-z0-9_]+/g)) out.add(m[0]);
|
|
11956
|
+
for (const m of lower.matchAll(new RegExp("\\p{Script=Hangul}+", "gu"))) out.add(m[0].slice(0, 2));
|
|
11957
|
+
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"));
|
|
11958
|
+
for (const run of runs ?? []) {
|
|
11959
|
+
if (run.length === 1) out.add(run);
|
|
11960
|
+
for (let i = 0; i + 1 < run.length; i++) out.add(run.slice(i, i + 2));
|
|
11961
|
+
}
|
|
11962
|
+
return out;
|
|
11963
|
+
}
|
|
11490
11964
|
function overlap(a, b) {
|
|
11491
11965
|
if (a.size === 0 || b.size === 0) return 0;
|
|
11492
11966
|
let both = 0;
|
|
11493
11967
|
for (const w of a) if (b.has(w)) both++;
|
|
11494
11968
|
return both / Math.min(a.size, b.size);
|
|
11495
11969
|
}
|
|
11970
|
+
function ruleSimilarity(a, b) {
|
|
11971
|
+
const na = normalizeRule(a);
|
|
11972
|
+
const nb = normalizeRule(b);
|
|
11973
|
+
return Math.max(overlap(words(na), words(nb)), overlap(contentWords(na), contentWords(nb)));
|
|
11974
|
+
}
|
|
11496
11975
|
function extractRuleUnits(doc) {
|
|
11497
11976
|
const units = [];
|
|
11498
11977
|
const tree = parseTree(doc.text);
|
|
@@ -11539,15 +12018,16 @@ function extractRuleUnits(doc) {
|
|
|
11539
12018
|
visit(tree);
|
|
11540
12019
|
return units;
|
|
11541
12020
|
}
|
|
11542
|
-
var severity = (i) => (i.mandatory ? 2 : 0) + (i.tags.length > 0 ? 1 : 0);
|
|
12021
|
+
var severity = (i) => (i.grade === "estimated" ? -10 : 0) + (i.mandatory ? 2 : 0) + (i.tags.length > 0 ? 1 : 0);
|
|
11543
12022
|
function comparePreservation(platform, workdir, before, after) {
|
|
11544
|
-
const
|
|
11545
|
-
const beforeCtx =
|
|
11546
|
-
const afterCtx =
|
|
12023
|
+
const scopeOf2 = (docs) => activeContext(platform, workdir, docs);
|
|
12024
|
+
const beforeCtx = scopeOf2(before.docs);
|
|
12025
|
+
const afterCtx = scopeOf2(after.docs);
|
|
11547
12026
|
const beforeScope = new Set(beforeCtx.files.map((f) => f.path));
|
|
11548
12027
|
const afterScope = new Set(afterCtx.files.map((f) => f.path));
|
|
11549
12028
|
const unitsOf = (texts) => texts.flatMap((t2) => extractRuleUnits(t2));
|
|
11550
12029
|
const beforeUnits = unitsOf(before.texts.filter((t2) => beforeScope.has(t2.path)));
|
|
12030
|
+
const beforeNorms = new Set(beforeUnits.map((u) => u.normalized));
|
|
11551
12031
|
const afterAll = unitsOf(after.texts);
|
|
11552
12032
|
const afterIn = afterAll.filter((u) => afterScope.has(u.path));
|
|
11553
12033
|
const unknownReasons = [];
|
|
@@ -11556,19 +12036,19 @@ function comparePreservation(platform, workdir, before, after) {
|
|
|
11556
12036
|
const loc2 = (u) => ({ path: u.path, line: u.line, preview: u.preview });
|
|
11557
12037
|
const items = [];
|
|
11558
12038
|
let kept = 0;
|
|
12039
|
+
let estimated = 0;
|
|
11559
12040
|
let review = 0;
|
|
11560
12041
|
let fixedChanged = 0;
|
|
11561
12042
|
let missing = 0;
|
|
11562
12043
|
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
12044
|
const match = (u, pool) => {
|
|
11566
12045
|
const exact = pool.find((a) => a.exact === u.exact);
|
|
11567
12046
|
if (exact) return { grade: "exact", at: exact, reason: null };
|
|
11568
12047
|
const norm = pool.find((a) => a.normalized === u.normalized);
|
|
11569
12048
|
if (norm) return { grade: "normalized", at: norm, reason: null };
|
|
11570
12049
|
const inside = pool.find((a) => a.normalized.includes(u.normalized));
|
|
11571
|
-
|
|
12050
|
+
const substantial = u.normalized.length >= 8 || (u.normalized.match(/[\p{Script=Hangul}\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/gu) ?? []).length >= 4;
|
|
12051
|
+
if (inside && substantial) return { grade: "structural", at: inside, reason: null };
|
|
11572
12052
|
const sentences = u.normalized.split(/(?<=[.!?。!?])\s*/).map((s) => normalizeRule(s)).filter((s) => s.length >= 4);
|
|
11573
12053
|
if (sentences.length > 1) {
|
|
11574
12054
|
const homes = sentences.map((s) => pool.find((a) => a.normalized.includes(s)));
|
|
@@ -11577,10 +12057,15 @@ function comparePreservation(platform, workdir, before, after) {
|
|
|
11577
12057
|
let best = null;
|
|
11578
12058
|
let score = 0;
|
|
11579
12059
|
for (const a of pool) {
|
|
11580
|
-
|
|
12060
|
+
if (beforeNorms.has(a.normalized) && a.normalized !== u.normalized && !sameFixed(u.fixed, a.fixed)) continue;
|
|
12061
|
+
const o = ruleSimilarity(u.normalized, a.normalized);
|
|
11581
12062
|
if (o > score) [best, score] = [a, o];
|
|
11582
12063
|
}
|
|
11583
|
-
if (best && score >=
|
|
12064
|
+
if (best && score >= REVIEW_MIN) {
|
|
12065
|
+
const same = sameFixed(u.fixed, best.fixed);
|
|
12066
|
+
if (same && score >= ESTIMATE_MIN) return { grade: "estimated", at: best, reason: "reworded" };
|
|
12067
|
+
return { grade: "review", at: best, reason: same ? "reworded" : "fixedChanged" };
|
|
12068
|
+
}
|
|
11584
12069
|
return { grade: "missing", at: null, reason: null };
|
|
11585
12070
|
};
|
|
11586
12071
|
const claimed = /* @__PURE__ */ new Set();
|
|
@@ -11597,6 +12082,9 @@ function comparePreservation(platform, workdir, before, after) {
|
|
|
11597
12082
|
if (anywhere.grade === "exact" || anywhere.grade === "normalized" || anywhere.grade === "structural") {
|
|
11598
12083
|
scopeReduced++;
|
|
11599
12084
|
items.push({ ...base2, grade: "scope", reason: "outOfScope", after: anywhere.at ? loc2(anywhere.at) : null });
|
|
12085
|
+
} else if (inScope.grade === "estimated") {
|
|
12086
|
+
estimated++;
|
|
12087
|
+
items.push({ ...base2, grade: "estimated", reason: "reworded", after: inScope.at ? loc2(inScope.at) : null });
|
|
11600
12088
|
} else if (inScope.grade === "review") {
|
|
11601
12089
|
review++;
|
|
11602
12090
|
if (inScope.reason === "fixedChanged") fixedChanged++;
|
|
@@ -11614,16 +12102,16 @@ function comparePreservation(platform, workdir, before, after) {
|
|
|
11614
12102
|
const a = na.get(n) ?? 0;
|
|
11615
12103
|
if (c > 1 && a >= 1 && a < c) removedDuplicates += c - a;
|
|
11616
12104
|
}
|
|
11617
|
-
const beforeNorms = new Set(beforeUnits.map((u) => u.normalized));
|
|
11618
12105
|
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
12106
|
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 +
|
|
12107
|
+
const verdict = unknownReasons.length > 0 ? "unknown" : missing + scopeReduced + review > 0 ? "review" : estimated > 0 ? "estimated" : "clean";
|
|
11621
12108
|
return {
|
|
11622
12109
|
platform,
|
|
11623
12110
|
workdir,
|
|
11624
12111
|
units: beforeUnits.length,
|
|
11625
12112
|
mandatory: beforeUnits.filter((u) => u.mandatory).length,
|
|
11626
12113
|
kept,
|
|
12114
|
+
estimated,
|
|
11627
12115
|
review,
|
|
11628
12116
|
fixedChanged,
|
|
11629
12117
|
missing,
|
|
@@ -11636,6 +12124,92 @@ function comparePreservation(platform, workdir, before, after) {
|
|
|
11636
12124
|
};
|
|
11637
12125
|
}
|
|
11638
12126
|
|
|
12127
|
+
// ../core/src/results.ts
|
|
12128
|
+
function changePercent(before, after) {
|
|
12129
|
+
if (!Number.isFinite(before) || !Number.isFinite(after) || before === 0) return null;
|
|
12130
|
+
return Math.round((after - before) / before * 100);
|
|
12131
|
+
}
|
|
12132
|
+
function allToolsSummary(report, tools) {
|
|
12133
|
+
const verdict = report.rules.filter((r) => r.ruleId !== "INV-001" && r.status !== "skipped" && r.status !== "error");
|
|
12134
|
+
const rulesPassed = verdict.filter((r) => r.status === "pass").length;
|
|
12135
|
+
return {
|
|
12136
|
+
rulesEvaluated: verdict.length,
|
|
12137
|
+
rulesPassed,
|
|
12138
|
+
passPercent: verdict.length ? Math.round(rulesPassed / verdict.length * 100) : null,
|
|
12139
|
+
tools: tools.map((t2) => {
|
|
12140
|
+
const rs = report.rules.filter((r) => t2.rules.includes(r.ruleId));
|
|
12141
|
+
const findings = rs.reduce((n, r) => n + r.findings.length, 0);
|
|
12142
|
+
const high = rs.reduce((n, r) => n + r.findings.filter((f) => f.severity === "high").length, 0);
|
|
12143
|
+
const ran = rs.filter((r) => r.status !== "skipped" && r.status !== "error");
|
|
12144
|
+
const status = ran.length === 0 ? report.coverage?.partial ? "unread" : "not-checked" : findings ? "issues" : ran.some((r) => r.status === "partial") ? "partial" : "clean";
|
|
12145
|
+
return { tool: t2.id, status, findings, high };
|
|
12146
|
+
})
|
|
12147
|
+
};
|
|
12148
|
+
}
|
|
12149
|
+
|
|
12150
|
+
// ../core/src/compare.ts
|
|
12151
|
+
function compareRuns(a, b, folder2 = "") {
|
|
12152
|
+
const ids = [...new Set([...a.report.rules, ...b.report.rules].map((r) => r.ruleId))].filter((id) => id !== "INV-001");
|
|
12153
|
+
const count = (r, id) => r.rules.find((x) => x.ruleId === id)?.findings.length ?? 0;
|
|
12154
|
+
const total = (r) => r.rules.reduce((n, x) => n + x.findings.length, 0);
|
|
12155
|
+
const agents = (r) => (r.metrics.tokens?.active ?? []).filter((c) => c.files.length > 0).map((c) => c.platform);
|
|
12156
|
+
const seen = /* @__PURE__ */ new Set([...agents(a.report), ...agents(b.report)]);
|
|
12157
|
+
const tokens = PLATFORMS.filter((p) => seen.has(p)).map((platform) => {
|
|
12158
|
+
const before = measurableContext(a.report, platform, folder2)?.tokens ?? null;
|
|
12159
|
+
const after = measurableContext(b.report, platform, folder2)?.tokens ?? null;
|
|
12160
|
+
const both = before !== null && after !== null;
|
|
12161
|
+
return { platform, before, after, delta: both ? after - before : null, percent: both ? changePercent(before, after) : null };
|
|
12162
|
+
});
|
|
12163
|
+
const side = (s) => ({ docs: s.report.metrics.tokens?.docs ?? [], texts: s.texts, partial: s.report.coverage.partial });
|
|
12164
|
+
const preservation = PLATFORMS.filter((p) => agents(a.report).includes(p)).map((p) => comparePreservation(p, folder2, side(a), side(b))).filter((r) => r.units > 0);
|
|
12165
|
+
return {
|
|
12166
|
+
rules: ids.map((ruleId) => ({ ruleId, before: count(a.report, ruleId), after: count(b.report, ruleId) })),
|
|
12167
|
+
findings: { before: total(a.report), after: total(b.report) },
|
|
12168
|
+
tokens,
|
|
12169
|
+
preservation
|
|
12170
|
+
};
|
|
12171
|
+
}
|
|
12172
|
+
|
|
12173
|
+
// ../core/src/tools.ts
|
|
12174
|
+
var TOOLS = [
|
|
12175
|
+
{ id: "tokens", status: "live", rules: ["MD-002", "AI-001", "AI-002", "AI-003", "AI-004"], milestone: "M2", category: "ai-context" },
|
|
12176
|
+
{ id: "markdown", status: "live", rules: ["MD-001", "MD-003"], milestone: "M1\u2013M2", category: "documentation" },
|
|
12177
|
+
{ id: "secrets", status: "live", rules: ["SEC-001", "SEC-002"], milestone: "M3", category: "security" },
|
|
12178
|
+
{ id: "dependencies", status: "live", rules: ["DEP-001", "DEP-002"], milestone: "M3 (OSV with consent)", category: "security" },
|
|
12179
|
+
{ id: "mcp", status: "live", rules: ["MCP-001", "MCP-002"], milestone: "M3", category: "ai-context" },
|
|
12180
|
+
{ id: "agent-rules", status: "live", rules: ["AI-001", "AI-004", "AGT-001", "AGT-002", "DOC-001"], milestone: "P1", category: "ai-context" },
|
|
12181
|
+
{ id: "duplicates", status: "live", rules: ["DUP-001"], milestone: "P1", category: "code-quality" },
|
|
12182
|
+
{ id: "architecture", status: "live", rules: ["ARC-001", "ARC-002"], milestone: "P1", category: "architecture" },
|
|
12183
|
+
{ id: "deploy", status: "live", rules: ["OPS-001", "OPS-002", "OPS-003"], milestone: "P1", category: "deploy" }
|
|
12184
|
+
];
|
|
12185
|
+
var ALL_TOOLS = "all";
|
|
12186
|
+
function toolById(id) {
|
|
12187
|
+
return TOOLS.find((t2) => t2.id === id);
|
|
12188
|
+
}
|
|
12189
|
+
function resolveTool(id) {
|
|
12190
|
+
const tool2 = toolById(id);
|
|
12191
|
+
return tool2 && tool2.status === "live" ? tool2.id : ALL_TOOLS;
|
|
12192
|
+
}
|
|
12193
|
+
function rulesFor(selection) {
|
|
12194
|
+
const tools = selection === ALL_TOOLS ? TOOLS.filter((t2) => t2.status === "live") : TOOLS.filter((t2) => t2.id === selection);
|
|
12195
|
+
return ["INV-001", ...new Set(tools.flatMap((t2) => t2.rules))];
|
|
12196
|
+
}
|
|
12197
|
+
function filterReport(report, selection) {
|
|
12198
|
+
const ids = new Set(rulesFor(selection));
|
|
12199
|
+
return {
|
|
12200
|
+
...report,
|
|
12201
|
+
rules: report.rules.filter((r) => ids.has(r.ruleId)),
|
|
12202
|
+
metrics: {
|
|
12203
|
+
...report.metrics,
|
|
12204
|
+
tokens: ids.has("AI-002") ? report.metrics.tokens : null,
|
|
12205
|
+
dependencies: ids.has("DEP-001") ? report.metrics.dependencies ?? null : null,
|
|
12206
|
+
duplicates: ids.has("DUP-001") ? report.metrics.duplicates : void 0,
|
|
12207
|
+
architecture: ids.has("ARC-001") ? report.metrics.architecture : void 0,
|
|
12208
|
+
deploy: ids.has("OPS-001") ? report.metrics.deploy : void 0
|
|
12209
|
+
}
|
|
12210
|
+
};
|
|
12211
|
+
}
|
|
12212
|
+
|
|
11639
12213
|
// ../ui/share.ts
|
|
11640
12214
|
function badgeMessage(d) {
|
|
11641
12215
|
if (!d.evaluated) return "not checked";
|
|
@@ -11658,7 +12232,7 @@ function badgeSvg(label, message, color) {
|
|
|
11658
12232
|
}
|
|
11659
12233
|
|
|
11660
12234
|
// src/run.ts
|
|
11661
|
-
import { lstatSync, readdirSync, readFileSync } from "node:fs";
|
|
12235
|
+
import { lstatSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
11662
12236
|
import { basename, join as join3, resolve } from "node:path";
|
|
11663
12237
|
var SKIP_DIRS = /* @__PURE__ */ new Set([".git", ".hg", ".svn", "node_modules", ".pnpm-store", ".yarn", ".next", ".nuxt", ".turbo", ".cache", ".venv", "venv", "__pycache__", "target", ".gradle"]);
|
|
11664
12238
|
function listFolder(root, opts) {
|
|
@@ -11729,6 +12303,14 @@ function cliLimits(maxFiles = 5e4, maxReadMb = 512) {
|
|
|
11729
12303
|
}
|
|
11730
12304
|
async function runFolder(root, o) {
|
|
11731
12305
|
const started = Date.now();
|
|
12306
|
+
let st;
|
|
12307
|
+
try {
|
|
12308
|
+
st = statSync(root);
|
|
12309
|
+
} catch (e) {
|
|
12310
|
+
if (e.code === "ENOENT") throw Object.assign(new Error("folder not found"), { code: "RR_FOLDER_NOT_FOUND" });
|
|
12311
|
+
throw e;
|
|
12312
|
+
}
|
|
12313
|
+
if (!st.isDirectory()) throw Object.assign(new Error("not a folder"), { code: "RR_NOT_A_FOLDER" });
|
|
11732
12314
|
const limits = cliLimits(o.maxFiles, o.maxReadMb);
|
|
11733
12315
|
const tool2 = resolveTool(o.tool);
|
|
11734
12316
|
const listing = listFolder(root, { maxFiles: limits.maxDiscoveredFiles, useIgnoreFiles: o.useIgnoreFiles ?? true, ignore: o.ignore ?? [] });
|
|
@@ -11763,15 +12345,69 @@ function shouldFail(r, failOn) {
|
|
|
11763
12345
|
}
|
|
11764
12346
|
|
|
11765
12347
|
// src/version.ts
|
|
11766
|
-
var VERSION = "0.4.
|
|
12348
|
+
var VERSION = "0.4.1";
|
|
11767
12349
|
|
|
11768
12350
|
// src/mcp.ts
|
|
11769
12351
|
import { createInterface } from "node:readline";
|
|
11770
|
-
import { statSync } from "node:fs";
|
|
12352
|
+
import { statSync as statSync2 } from "node:fs";
|
|
11771
12353
|
import { resolve as resolve2 } from "node:path";
|
|
11772
12354
|
|
|
12355
|
+
// src/compare.ts
|
|
12356
|
+
import * as nodePath from "node:path";
|
|
12357
|
+
function tokenChangeText(c, locale) {
|
|
12358
|
+
if (c.before === null || c.after === null || c.delta === null) return null;
|
|
12359
|
+
const delta = c.delta > 0 ? `+${c.delta}` : String(c.delta);
|
|
12360
|
+
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)) });
|
|
12361
|
+
return t(locale, "cli.compare.tokenLine", { agent: t(locale, `platform.${c.platform}`), before: c.before, after: c.after, delta, change });
|
|
12362
|
+
}
|
|
12363
|
+
function renderCompare(c, tool2, locale) {
|
|
12364
|
+
const L = (key, params = {}) => t(locale, `cli.${key}`, params);
|
|
12365
|
+
const lines = [L("compare.title", { tool: tool2 }), "", `${L("compare.rule").padEnd(9)} ${L("compare.before").padStart(6)} ${L("compare.after").padStart(5)}`];
|
|
12366
|
+
for (const r of c.rules) lines.push(`${r.ruleId.padEnd(9)} ${String(r.before).padStart(6)} ${String(r.after).padStart(5)}`);
|
|
12367
|
+
lines.push(`${L("compare.total").padEnd(9)} ${String(c.findings.before).padStart(6)} ${String(c.findings.after).padStart(5)}`, "");
|
|
12368
|
+
lines.push(L("compare.tokens"));
|
|
12369
|
+
if (c.tokens.length === 0) lines.push(` ${L("compare.noAgents")}`);
|
|
12370
|
+
for (const x of c.tokens) lines.push(` ${tokenChangeText(x, locale) ?? L("compare.notComparable", { agent: t(locale, `platform.${x.platform}`) })}`);
|
|
12371
|
+
lines.push(` ${L("compare.limits")}`, "", L("keep.title"));
|
|
12372
|
+
if (c.preservation.length === 0) lines.push(` ${L("keep.none")}`);
|
|
12373
|
+
for (const r of c.preservation) {
|
|
12374
|
+
const verdict = r.verdict === "unknown" ? L("keep.verdict.unknown", { reasons: r.unknownReasons.map((x) => L(`keep.unknown.${x}`)).join(", ") }) : L(`keep.verdict.${r.verdict}`);
|
|
12375
|
+
lines.push(
|
|
12376
|
+
` ${L("keep.line", {
|
|
12377
|
+
agent: t(locale, `platform.${r.platform}`),
|
|
12378
|
+
units: r.units,
|
|
12379
|
+
mandatory: r.mandatory,
|
|
12380
|
+
kept: r.kept,
|
|
12381
|
+
estimated: r.estimated,
|
|
12382
|
+
review: r.review,
|
|
12383
|
+
fixed: r.fixedChanged,
|
|
12384
|
+
missing: r.missing,
|
|
12385
|
+
scope: r.scopeReduced,
|
|
12386
|
+
duplicates: r.removedDuplicates,
|
|
12387
|
+
added: r.added,
|
|
12388
|
+
verdict
|
|
12389
|
+
})}`
|
|
12390
|
+
);
|
|
12391
|
+
for (const i of r.items.slice(0, 10)) {
|
|
12392
|
+
const where3 = i.after ? ` -> ${i.after.path}:${i.after.line}` : "";
|
|
12393
|
+
const reason = i.reason ? ` (${L(`keep.reason.${i.reason}`)})` : "";
|
|
12394
|
+
lines.push(` ${i.before.path}:${i.before.line}${where3} ${L(`keep.grade.${i.grade}`)}${reason}${i.mandatory ? ` [${L("keep.mandatory")}]` : ""} ${i.before.preview}`);
|
|
12395
|
+
}
|
|
12396
|
+
if (r.items.length > 10) lines.push(` ${L("keep.more", { count: r.items.length - 10 })}`);
|
|
12397
|
+
}
|
|
12398
|
+
return lines.join("\n") + "\n";
|
|
12399
|
+
}
|
|
12400
|
+
function badgeLink(folder2, file, path = nodePath) {
|
|
12401
|
+
const rel = path.relative(path.resolve(folder2), path.resolve(file));
|
|
12402
|
+
if (!rel || rel === ".." || rel.startsWith(`..${path.sep}`) || path.isAbsolute(rel)) return null;
|
|
12403
|
+
const url = rel.split(path.sep).join("/").replace(/ /g, "%20").replace(/\(/g, "%28").replace(/\)/g, "%29");
|
|
12404
|
+
return `[](https://reporefit.com/)`;
|
|
12405
|
+
}
|
|
12406
|
+
|
|
11773
12407
|
// ../ui/rule-docs.ts
|
|
11774
12408
|
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"];
|
|
12409
|
+
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" };
|
|
12410
|
+
var ruleScopeKey = (id) => `${id.toLowerCase().replace("-", "")}.scope${SCOPE_SUFFIX[id] ?? ""}`;
|
|
11775
12411
|
var ruleDocs = {
|
|
11776
12412
|
en: {
|
|
11777
12413
|
"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 +12551,23 @@ var toolsList = [
|
|
|
11915
12551
|
description: "Explain one rule: what it checks, why it matters and how to fix it.",
|
|
11916
12552
|
inputSchema: { type: "object", properties: { rule_id: { type: "string", enum: [...RULE_ORDER] }, lang: { type: "string", enum: ["en", "ko", "ja", "zh-Hans"] } }, required: ["rule_id"] },
|
|
11917
12553
|
annotations: { readOnlyHint: true, openWorldHint: false }
|
|
12554
|
+
},
|
|
12555
|
+
{
|
|
12556
|
+
name: "compare",
|
|
12557
|
+
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.",
|
|
12558
|
+
inputSchema: {
|
|
12559
|
+
type: "object",
|
|
12560
|
+
properties: {
|
|
12561
|
+
before: { type: "string", description: "Original project folder." },
|
|
12562
|
+
after: { type: "string", description: "Edited copy of the project." },
|
|
12563
|
+
tool: { type: "string", enum: TOOL_IDS, description: "Which checks to run. Default all." },
|
|
12564
|
+
lang: { type: "string", enum: ["en", "ko", "ja", "zh-Hans"], description: "Language of the summaries. Default en." }
|
|
12565
|
+
},
|
|
12566
|
+
required: ["before", "after"]
|
|
12567
|
+
},
|
|
12568
|
+
annotations: { readOnlyHint: true, openWorldHint: false }
|
|
11918
12569
|
}
|
|
11919
12570
|
];
|
|
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
12571
|
var ToolError = class extends Error {
|
|
11923
12572
|
};
|
|
11924
12573
|
function folder(p) {
|
|
@@ -11926,7 +12575,7 @@ function folder(p) {
|
|
|
11926
12575
|
const abs = resolve2(p);
|
|
11927
12576
|
let st;
|
|
11928
12577
|
try {
|
|
11929
|
-
st =
|
|
12578
|
+
st = statSync2(abs);
|
|
11930
12579
|
} catch {
|
|
11931
12580
|
throw new ToolError(`Folder not found: ${abs}`);
|
|
11932
12581
|
}
|
|
@@ -11983,7 +12632,59 @@ async function callTool(name, args) {
|
|
|
11983
12632
|
const id = args.rule_id;
|
|
11984
12633
|
if (typeof id !== "string" || !RULE_ORDER.includes(id)) throw new ToolError(`Unknown rule: ${String(id)}`);
|
|
11985
12634
|
const d = ruleDocs[locale][id];
|
|
11986
|
-
return JSON.stringify({ id, name: t(locale, `rule.${id}`), checks: t(locale,
|
|
12635
|
+
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);
|
|
12636
|
+
}
|
|
12637
|
+
if (name === "compare") {
|
|
12638
|
+
const opts = { tool: tool(args.tool) };
|
|
12639
|
+
const a = await runFolder(folder(args.before), opts);
|
|
12640
|
+
const b = await runFolder(folder(args.after), opts);
|
|
12641
|
+
const c = compareRuns({ report: a.report, texts: a.instructionTexts }, { report: b.report, texts: b.instructionTexts });
|
|
12642
|
+
const agent = (p) => t(locale, `platform.${p}`);
|
|
12643
|
+
return JSON.stringify(
|
|
12644
|
+
{
|
|
12645
|
+
engine: ENGINE_VERSION,
|
|
12646
|
+
ruleset: RULESET_VERSION,
|
|
12647
|
+
tool: a.tool,
|
|
12648
|
+
findings: c.findings,
|
|
12649
|
+
rules: c.rules.filter((r) => r.before || r.after).map((r) => ({ rule: r.ruleId, before: r.before, after: r.after })),
|
|
12650
|
+
// percent: signed change rounded to an integer (negative = fewer tokens), null when the original had 0 tokens.
|
|
12651
|
+
tokens: c.tokens.map((x) => ({
|
|
12652
|
+
agent: x.platform,
|
|
12653
|
+
name: agent(x.platform),
|
|
12654
|
+
before: x.before,
|
|
12655
|
+
after: x.after,
|
|
12656
|
+
change: x.delta,
|
|
12657
|
+
percent: x.percent,
|
|
12658
|
+
summary: tokenChangeText(x, locale) ?? t(locale, "cli.compare.notComparable", { agent: agent(x.platform) })
|
|
12659
|
+
})),
|
|
12660
|
+
token_note: t(locale, "cli.compare.limits"),
|
|
12661
|
+
preservation: c.preservation.map((r) => ({
|
|
12662
|
+
agent: r.platform,
|
|
12663
|
+
name: agent(r.platform),
|
|
12664
|
+
rules: r.units,
|
|
12665
|
+
mandatory: r.mandatory,
|
|
12666
|
+
kept: r.kept,
|
|
12667
|
+
probably_same: r.estimated,
|
|
12668
|
+
review: r.review,
|
|
12669
|
+
fixed_tokens_changed: r.fixedChanged,
|
|
12670
|
+
possible_losses: r.missing,
|
|
12671
|
+
out_of_scope: r.scopeReduced,
|
|
12672
|
+
duplicates_removed: r.removedDuplicates,
|
|
12673
|
+
new: r.added,
|
|
12674
|
+
verdict: r.verdict,
|
|
12675
|
+
items: r.items.slice(0, 20).map((i) => ({
|
|
12676
|
+
before: `${i.before.path}:${i.before.line}`,
|
|
12677
|
+
after: i.after ? `${i.after.path}:${i.after.line}` : null,
|
|
12678
|
+
grade: i.grade,
|
|
12679
|
+
reason: i.reason,
|
|
12680
|
+
mandatory: i.mandatory,
|
|
12681
|
+
text: i.before.preview
|
|
12682
|
+
}))
|
|
12683
|
+
}))
|
|
12684
|
+
},
|
|
12685
|
+
null,
|
|
12686
|
+
2
|
|
12687
|
+
);
|
|
11987
12688
|
}
|
|
11988
12689
|
throw new ToolError(`Unknown tool: ${name}`);
|
|
11989
12690
|
}
|
|
@@ -12059,7 +12760,7 @@ Commands:
|
|
|
12059
12760
|
Options:
|
|
12060
12761
|
--tool <id> all (default), ${TOOLS.map((x) => x.id).join(", ")}
|
|
12061
12762
|
--format <f> scan output: text (default), json, md
|
|
12062
|
-
--out <path> output file (fix, badge, scan) or folder (report)
|
|
12763
|
+
--out <path> output file (fix, badge, scan) or folder (report); missing folders are created
|
|
12063
12764
|
--lang <l> en (default), ko, ja, zh-Hans
|
|
12064
12765
|
--fail-on <s> exit 1 when a finding is at least: high, medium, low, none (default)
|
|
12065
12766
|
--ignore <glob> extra ignore pattern, gitignore syntax (repeatable)
|
|
@@ -12068,7 +12769,7 @@ Options:
|
|
|
12068
12769
|
--max-read-mb <n> stop reading after n MiB of text (default 512; reported as partial)
|
|
12069
12770
|
--quiet no progress on stderr
|
|
12070
12771
|
|
|
12071
|
-
Exit codes: 0 ok, 1 findings at or above --fail-on, 2 usage or
|
|
12772
|
+
Exit codes: 0 ok, 1 findings at or above --fail-on, 2 usage, read or write error, 130 cancelled.
|
|
12072
12773
|
Docs: ${DOCS}`;
|
|
12073
12774
|
var COMMANDS = /* @__PURE__ */ new Set(["scan", "fix", "report", "badge", "compare", "rules", "mcp", "help", "version"]);
|
|
12074
12775
|
var VALUED = /* @__PURE__ */ new Set(["tool", "format", "out", "lang", "fail-on", "ignore", "max-files", "max-read-mb"]);
|
|
@@ -12102,19 +12803,58 @@ var where2 = (locale, f) => f.line ? `${f.path}:${f.line}` : t(locale, "report.p
|
|
|
12102
12803
|
function renderText(r, locale) {
|
|
12103
12804
|
const rank = { high: 0, medium: 1, low: 2, info: 3, unknown: 4 };
|
|
12104
12805
|
const c = r.report.coverage;
|
|
12105
|
-
const lines = [
|
|
12106
|
-
for (const f of [...r.findings].sort((a,
|
|
12806
|
+
const lines = [t(locale, "cli.header", { tool: r.tool, read: c.inspected, listed: c.discovered, seconds: (r.elapsedMs / 1e3).toFixed(1) }), ""];
|
|
12807
|
+
for (const f of [...r.findings].sort((a, b2) => rank[a.severity] - rank[b2.severity])) {
|
|
12107
12808
|
lines.push(`${f.severity.padEnd(6)} ${f.ruleId.padEnd(8)} ${where2(locale, f.location)} ${t(locale, f.messageKey, f.params)}`);
|
|
12108
12809
|
}
|
|
12109
12810
|
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(/#.*$/, "")}`);
|
|
12811
|
+
const b = r.bySeverity;
|
|
12812
|
+
lines.push("", t(locale, "cli.summary", { findings: r.findings.length, high: b.high, medium: b.medium, low: b.low, passed: r.passed, evaluated: r.evaluated }));
|
|
12813
|
+
if (c.partial) lines.push(t(locale, "cli.partial", { reasons: c.reasons.map((x) => t(locale, `coverage.${x.code}`, x.params)).join(" ") || t(locale, "cli.partialUnknown") }));
|
|
12814
|
+
if (r.listing.skippedSymlinks) lines.push(t(locale, "cli.symlinks", { count: r.listing.skippedSymlinks }));
|
|
12815
|
+
if (r.findings.length) lines.push(t(locale, "cli.ruleDetails", { url: RULES_URL(locale, r.findings[0].ruleId).replace(/#.*$/, "") }));
|
|
12116
12816
|
return lines.join("\n") + "\n";
|
|
12117
12817
|
}
|
|
12818
|
+
function fsReason(e, locale = "en") {
|
|
12819
|
+
const code2 = e.code;
|
|
12820
|
+
const key = {
|
|
12821
|
+
EACCES: "permission",
|
|
12822
|
+
EPERM: "permission",
|
|
12823
|
+
ENOTDIR: "fileInPath",
|
|
12824
|
+
EEXIST: "fileInPath",
|
|
12825
|
+
EISDIR: "isFolder",
|
|
12826
|
+
ENOENT: "missingPath",
|
|
12827
|
+
ENOSPC: "diskFull",
|
|
12828
|
+
EROFS: "readOnly",
|
|
12829
|
+
ENAMETOOLONG: "tooLong",
|
|
12830
|
+
RR_FOLDER_NOT_FOUND: "notFound",
|
|
12831
|
+
RR_NOT_A_FOLDER: "notFolder"
|
|
12832
|
+
};
|
|
12833
|
+
return code2 && key[code2] ? t(locale, `cli.reason.${key[code2]}`) : e.message;
|
|
12834
|
+
}
|
|
12835
|
+
function writeOutput(io, locale, file, text3) {
|
|
12836
|
+
try {
|
|
12837
|
+
mkdirSync(dirname2(resolve3(file)), { recursive: true });
|
|
12838
|
+
writeFileSync(file, text3);
|
|
12839
|
+
return true;
|
|
12840
|
+
} catch (e) {
|
|
12841
|
+
io.err(t(locale, "cli.cannotWrite", { path: file, reason: fsReason(e, locale) }) + "\n");
|
|
12842
|
+
return false;
|
|
12843
|
+
}
|
|
12844
|
+
}
|
|
12845
|
+
function prepareFolder(io, locale, dir) {
|
|
12846
|
+
try {
|
|
12847
|
+
if (statSync3(dir, { throwIfNoEntry: false })?.isFile()) {
|
|
12848
|
+
io.err(t(locale, "cli.reportIsFile", { path: dir }) + "\n");
|
|
12849
|
+
return false;
|
|
12850
|
+
}
|
|
12851
|
+
mkdirSync(dir, { recursive: true });
|
|
12852
|
+
return true;
|
|
12853
|
+
} catch (e) {
|
|
12854
|
+
io.err(t(locale, "cli.cannotCreate", { path: dir, reason: fsReason(e, locale) }) + "\n");
|
|
12855
|
+
return false;
|
|
12856
|
+
}
|
|
12857
|
+
}
|
|
12118
12858
|
function badgeFor(r) {
|
|
12119
12859
|
const d = { tool: r.tool, evaluated: r.evaluated, passed: r.passed, findings: r.findings.length, high: r.bySeverity.high };
|
|
12120
12860
|
return badgeSvg("RepoRefit", badgeMessage(d) + (r.report.coverage.partial ? " (partial)" : ""), badgeColor(d));
|
|
@@ -12180,8 +12920,7 @@ Run "reporefit help" for usage.
|
|
|
12180
12920
|
return await runFolder(folder2, runOpts);
|
|
12181
12921
|
} catch (e) {
|
|
12182
12922
|
if (e instanceof ScanCancelledError) return io.err("\nCancelled.\n"), 130;
|
|
12183
|
-
io.err(
|
|
12184
|
-
`);
|
|
12923
|
+
io.err(t(locale, "cli.cannotRead", { path: folder2, reason: fsReason(e, locale) }) + "\n");
|
|
12185
12924
|
return 2;
|
|
12186
12925
|
}
|
|
12187
12926
|
};
|
|
@@ -12191,62 +12930,38 @@ Run "reporefit help" for usage.
|
|
|
12191
12930
|
if (typeof a === "number") return a;
|
|
12192
12931
|
const b = await scan(args[1]);
|
|
12193
12932
|
if (typeof b === "number") return b;
|
|
12194
|
-
const
|
|
12195
|
-
|
|
12196
|
-
const lines = [`RepoRefit compare \xB7 ${a.tool}`, "", "rule before after"];
|
|
12197
|
-
for (const id of ids) lines.push(`${id.padEnd(9)} ${String(count(a, id)).padStart(6)} ${String(count(b, id)).padStart(5)}`);
|
|
12198
|
-
lines.push(`${"total".padEnd(9)} ${String(a.findings.length).padStart(6)} ${String(b.findings.length).padStart(5)}`);
|
|
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");
|
|
12933
|
+
const c = compareRuns({ report: a.report, texts: a.instructionTexts }, { report: b.report, texts: b.instructionTexts });
|
|
12934
|
+
io.out(renderCompare(c, a.tool, locale));
|
|
12204
12935
|
return shouldFail(b, failOn) ? 1 : 0;
|
|
12205
12936
|
}
|
|
12206
12937
|
const r = await scan(args[0] ?? ".");
|
|
12207
12938
|
if (typeof r === "number") return r;
|
|
12208
12939
|
if (command === "fix") {
|
|
12209
12940
|
const md = renderFixPlan(r.report, locale);
|
|
12210
|
-
if (opts.out)
|
|
12211
|
-
|
|
12941
|
+
if (opts.out) {
|
|
12942
|
+
if (!writeOutput(io, locale, opts.out, md)) return 2;
|
|
12943
|
+
} else io.out(md);
|
|
12212
12944
|
} else if (command === "report") {
|
|
12213
12945
|
const dir = opts.out ?? ".";
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
12946
|
+
if (!prepareFolder(io, locale, dir)) return 2;
|
|
12947
|
+
if (!writeOutput(io, locale, join4(dir, "reporefit-report.md"), renderMarkdownReport(r.report, locale))) return 2;
|
|
12948
|
+
if (!writeOutput(io, locale, join4(dir, "reporefit-report.json"), renderJsonReport(r.report))) return 2;
|
|
12949
|
+
io.out(t(locale, "cli.wroteReport", { md: join4(dir, "reporefit-report.md"), json: join4(dir, "reporefit-report.json") }) + "\n");
|
|
12218
12950
|
} else if (command === "badge") {
|
|
12219
12951
|
const file = opts.out ?? "reporefit-badge.svg";
|
|
12220
|
-
|
|
12221
|
-
|
|
12952
|
+
if (!writeOutput(io, locale, file, badgeFor(r))) return 2;
|
|
12953
|
+
const folder2 = args[0] ?? ".";
|
|
12954
|
+
const link = badgeLink(folder2, file);
|
|
12955
|
+
io.out(`${t(locale, "cli.wroteBadge", { file })} ${link ? t(locale, "cli.badgeReadme", { snippet: link }) : t(locale, "cli.badgeOutside", { folder: resolve3(folder2) })}
|
|
12222
12956
|
`);
|
|
12223
12957
|
} else {
|
|
12224
12958
|
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
|
-
|
|
12959
|
+
if (opts.out) {
|
|
12960
|
+
if (!writeOutput(io, locale, opts.out, output)) return 2;
|
|
12961
|
+
} else io.out(output);
|
|
12227
12962
|
}
|
|
12228
12963
|
return shouldFail(r, failOn) ? 1 : 0;
|
|
12229
12964
|
}
|
|
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
12965
|
|
|
12251
12966
|
// src/bin.ts
|
|
12252
12967
|
var controller = new AbortController();
|