mirror of
https://github.com/waybarrios/opencode-power-pack.git
synced 2026-11-18 18:03:43 +00:00
Remove duplicated HIGH-SIGNAL block in code-review, add a dup test
The "Critical: only HIGH-SIGNAL issues should be flagged" block appeared twice, back to back, in code-review's SKILL.md and command. The second copy was a strict subset of the first (it dropped the "Concrete edge cases" bullet), so it was pure redundancy. The duplicate is removed; the complete first copy stays. The skill-lint suite gains a per-skill "no duplicated block" check (no non-empty line >= 50 chars repeats within a SKILL.md or its command), which catches this class of copy-paste error. SKILL.md and command stay in sync.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user