logic-review
Logic-Lens — Logic Review
When to Use
Use this skill when you need find logic bugs in a single file or function via semi-formal execution tracing (Premises → Trace → Divergence → Trigger → Remedy). Trigger when a user shares code and suspects something is wrong without naming a concrete failure — phrases like "review this", "does this look right",...
Output Skeleton Contract
The downstream grader (scripts/grade-iteration.py) and other Logic-Lens skills consume this report by substring-matching literal tokens defined in ../_shared/common.md §1 (header map), §2 (mandatory field labels + Logic Score), and ../_shared/report-template.md (skeleton). Paraphrasing those tokens — even with a synonym that reads fine to a human — breaks the contract regardless of analysis quality.
Three failure modes observed in benchmark that deserve specific callout beyond the general rule:
- Synonym substitution for field labels whose substituted form omits the required substring — replacing
Premises/前提with前置条件构建/前置条件(eval-201), orDivergence/偏差with根因/核心缺陷/结论(eval-252). Each substitution reads fine to a human and may even appear as a section heading or table column, but the substituted word does NOT contain the required substring, so grader and cross-skill consumers see the document as missing the field entirely. Use the literal token fromcommon.md§1; you can still add a descriptive subtitle alongside it. - Demoting a confirmed L-code finding to
### 附加观察(非 Finding)/### Additional observation— if Premises→Trace→Divergence holds, the finding belongs inside## Findingswith the five literal fields, even at Suggestion severity. This was a recurring cause of eval-279 (quicksort L4) failing on Sonnet runs. - Omitting
Divergence:/偏差:field entirely — the single most frequent failure mode. Many outputs correctly analyze the bug but write the divergence as prose, in a table cell, or under headings like根因,故障点,核心问题,缺陷. TheDivergence:field is the specific label for "the point where actual behavior diverges from the premise." It is NOT optional and has no acceptable synonym. For no-bug findings useDivergence: None — [why the premise holds](中文偏差:无——[原因]).
Correctly formatted finding — use as template: