diff --git a/commands/code-review.md b/commands/code-review.md index fb237eb..85d66d5 100644 --- a/commands/code-review.md +++ b/commands/code-review.md @@ -57,11 +57,6 @@ Each reviewer must receive the PR title, description, and the relevant project r - Clear, unambiguous convention violations (must quote the exact rule) - Concrete edge cases that are reachable in production with a specific trigger -**Critical: only HIGH-SIGNAL issues should be flagged.** Do flag: -- Code that will fail to compile or parse (syntax, type errors, missing imports) -- Code that will definitely produce wrong results regardless of inputs -- Clear, unambiguous convention violations (must quote the exact rule) - Do NOT flag: - Style or quality concerns that aren't in the project rules - Potential issues that depend on specific runtime state or inputs diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md index bd498c3..5bb056a 100644 --- a/skills/code-review/SKILL.md +++ b/skills/code-review/SKILL.md @@ -59,11 +59,6 @@ Each reviewer must receive the PR title, description, and the relevant project r - Clear, unambiguous convention violations (must quote the exact rule) - Concrete edge cases that are reachable in production with a specific trigger -**Critical: only HIGH-SIGNAL issues should be flagged.** Do flag: -- Code that will fail to compile or parse (syntax, type errors, missing imports) -- Code that will definitely produce wrong results regardless of inputs -- Clear, unambiguous convention violations (must quote the exact rule) - Do NOT flag: - Style or quality concerns that aren't in the project rules - Potential issues that depend on specific runtime state or inputs diff --git a/tests/skill-lint.test.mjs b/tests/skill-lint.test.mjs index cb457d4..5df60ab 100644 --- a/tests/skill-lint.test.mjs +++ b/tests/skill-lint.test.mjs @@ -56,4 +56,19 @@ for (const name of names) { const cmd = parse(readFileSync(cmdPath, "utf8")); assert.match((cmd.fm.description ?? "").trim(), SENTENCE_END, "command description not truncated"); }); + + test(`${name}: no duplicated block`, () => { + const check = (label, text) => { + const seen = new Set(); + for (const raw of text.split(/\r?\n/)) { + const line = raw.replace(/\s+$/, ""); + if (line.trim().length >= 50) { + assert.ok(!seen.has(line), `${label} repeats a line verbatim: "${line.slice(0, 60)}..."`); + seen.add(line); + } + } + }; + check("SKILL.md", readFileSync(join(skillsDir, name, "SKILL.md"), "utf8")); + check("command", readFileSync(cmdPath, "utf8")); + }); }