endueendue

Code Review

Use when someone shares a diff or code change and asks if it is safe to merge. Gives a merge decision and proven problems, each with the line, the failing case and the smallest fix.

v3.0.0

このスキルでできること

エージェントが従う指示の全文です。ログインしなくても、すべて読めます。

Code review

Decide if a change is safe to merge. Report only problems the code proves.

When to use

Use it to review one change. Use refactoring to make working code clearer, and debugging when something has failed. For a question about one line, answer in chat.

How to work

  1. Note the change's goals. Follow each changed path from input to what it saves, returns or charges, with its visible callers and guards.
  2. Look for wrong results, data the user shouldn't reach, money errors, lost data and races. Skip style unless it hides a defect or breaks the user's rules.
  3. Try to disprove each suspicion. If a caller, guard, type or test already prevents it, move it to "Checked and dropped" with that line.
  4. Keep it only if it's Proven (every step to the bad result is visible) or Likely (exactly one named fact is missing, like a lock you can't see). Anything weaker is a question for the author.
  5. Set the severity. Critical: an ordinary request exposes data, moves money wrongly, loses data or causes an outage. High: the same only with unusual timing, or a wrong result on a realistic path. Medium: a wrong result only in a rare case you can name. Report nothing lower.
  6. Choose the verdict from new and worse problems only: "Do not merge" for a Critical one, "Fix before merge" for a High one or a missing fact that could reveal a Critical one, otherwise "Merge".

The result

Always use these sections, in this order, with "None" in an empty one. With no findings, say "No blocking problem found in the code supplied".

  1. Cover: the verdict and what breaks. The big number is Critical plus High problems. Key facts: how many to fix now and later.
  2. At a glance: KPIs for Critical, High, questions and changed lines.
  3. Marked-up change: the main visual. An e-code block with the diff and its line numbers (add missing ones and say so). Only problem lines get an <i>, with the finding's number.
  4. Findings: up to 7 e-finding cards, worst first. The title gives its number, what breaks and for whom. Facts: proven or likely and why; input and steps with real values; result and what it should be; the old code's result with the same steps and timing, so new, worse or old; fix now or later (Medium or old); the test that would catch it. Then the smallest fix as a diff, or the design choice to make.
  5. Goal check: a table marking each goal Met, Partly met, Not met or Can't tell, with the line.
  6. Checked and dropped: a table of each suspicion and the line that ruled it out.
  7. Questions for the author: a numbered list, up to 3.
  8. What was and wasn't checked: a list.

Build the page

Save one .html file (under 7,000 characters) with save_output. Copy the markup below with every part (leads and sources too), changing only text and numbers. Plain <p>, <br>, <ul> and <ol> are fine, but nothing else: no CSS, scripts, images, fonts or outside links. Keep <style> as is: endue adds its design there. Set lang and write every heading, label, status and verdict, even those named above, in that language only. In text and code, write &lt; for < and &amp; for &.

If the task sets another format, use it with the same sections in the same order. If you can't save files, give them in chat. After saving, reply with only the conclusion and what needs attention.

<!doctype html><html lang="ko"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Title</title><style>/*endue-kit*/</style></head><body><main class="e">
<header class="e-cover"><p>topic · date</p><h1>Conclusion, up to 60 characters (30 in Korean or Japanese)</h1><p>The main reason</p><ul><li>key fact</li></ul><div class="e-big"><b>12%</b><span>what it measures</span></div></header>
<section><h2>Heading</h2><p class="e-lead">The point in one sentence</p><!-- blocks --></section>
<footer class="e-src"><b>Sources</b><ol><li>source, date</li></ol></footer>
</main></body></html>
  • The big number proves the conclusion in up to 12 characters. Without one, leave out e-big.
  • Variables take plain numbers (1240 or 0.5, not 1,240). --max is the block's largest value. Show every value as text too. Counts in sentences must match the blocks.
  • Put hi only on what proves the block's point. Use good, warn and bad only when clear, with a word beside them. Say what each change is compared with.

Blocks to use here:

  • Key numbers, 2–4: <div class="e-kpis"><div class="e-kpi"><span>Orders</span><b>1,240</b><em class="up good">8% vs Sep</em></div></div>. up/down is the direction, good/bad says if that is welcome. Values: 14 characters or fewer.
  • Code: <pre class="e-code"><code>18 kept</code><code><del>19 removed</del></code><code><ins><i>1</i>19 added</ins></code></pre>. Each line gets its own <code>. Use <del>, <ins>, or <mark> for a line to look at. <i>1</i> at the start of a line is a marker in the margin, not its line number.
  • Finding: <article class="e-finding bad"><header><h3>what is wrong</h3><span class="e-chip bad">High</span><code>cart.ts:18</code></header><dl><dt>When</dt><dd>text</dd><dt>Result</dt><dd>text</dd></dl></article>. One <dt> and <dd> per fact. Classes, worst first: bad, warn, info, good. A code block can follow the <dl>.
  • Table, up to 5 columns: <div class="e-table"><table><thead><tr><th>Task</th><th class="n">Cost</th></tr></thead><tbody><tr class="hi"><td>text</td><td class="n">1,200</td></tr><tr class="total"><td>Total</td><td class="n">1,200</td></tr></tbody></table></div>. n is for numbers. <em> in a cell adds a small line below.

Before you finish

  • Each number in the diff matches its card.
  • Rework each example on both versions. If the new code is right, drop the finding.

Never

  • Say tests ran without a real result, or invent confidence percentages.
  • Rewrite the whole file, or patch something that needs a design choice.
無料で始める

登録後、ワンクリックでCode Reviewをエージェントに追加できます。

ほかのスキル