REVIEW.md
Guidance for the automated reviewer (kilo-code-bot) on PRs in this repo.
The goal of the review is to catch things CI cannot catch: bugs, design issues, and judgment calls about style and fork hygiene. Be helpful, not pedantic — frame everything as a suggestion the human can accept or reject.
CI already runs and will report failures directly. Do not comment on:
lint, turbo typecheck)knip unused exportskilocode_change marker rules — both directions:
script/check-opencode-annotations.ts)packages/kilo-vscode/, packages/kilo-ui/, packages/opencode/src/kilocode/ (bun run check-kilocode-change)script/check-workflows.ts)packages/kilo-docs/source-links.md (script/extract-source-links.ts)script/check-md-table-padding.ts)generate.yml)check-kilo-generated-artifacts.yml)If the only issue you'd raise is one of the above, just say lgtm.
Read enough of the surrounding file to actually understand the change — diffs alone hide context. Look for:
awaitThe full guide is in AGENTS.md. Don't be a zealot — only flag actual violations, and recognize when the existing code already complies through a different mechanism.
let: prefer const with ternary or IIFE (packages/opencode/src/util/iife.ts). But let is fine when it's genuinely the simplest option; don't demand IIFE rewrites for trivial cases.else: prefer early returns. Don't complain about else if the code already uses early returns elsewhere. You may flag excessive nesting regardless.catch: always flag — empty catches hide bugs.try/catch where possible: if a try/catch is added, consider whether it's needed at all.any: flag new any usage unless there's a clear reason.cfg, pid, dir, opts, err over inputPID, connectTimeout. Only flag newly introduced multi-word names where a clear single-word alternative exists.obj.a over const { a } = obj to preserve context.Bun.file() etc. over node equivalents in CLI code.When suggesting fixes, ensure the suggestion is valid TypeScript (matched braces, correct syntax). Prefer prose comments over suggestion blocks unless the fix is trivially mechanical.
Kilo CLI is a fork of opencode. Minimizing diff against upstream is a top priority.
packages/opencode/ not in a path containing kilocode), ask whether the logic could live in a Kilo-only directory instead (packages/opencode/src/kilocode/, packages/kilo-gateway/, etc.) or be reduced to a smaller hook..kilo/skills/kilocode-merge-minimizer/SKILL.md for the decision rules.When Config.Info in packages/opencode/src/config/config.ts gains a new kilocode_change field, the matching JSON Schema entry must also be added in the cloud repo (apps/web/src/app/config.json/extras.ts). CI does not check this — flag it as a reminder if you see a new config field added.
packages/opencode/ should generally come with a test under packages/opencode/test/..changeset/*.md). If a PR clearly changes user-visible behavior and has no changeset, mention it.For changes under packages/kilo-vscode/webview-ui/:
webview-ui/src/stories/. Minor tweaks and i18n-only changes don't need one.gh api .../pulls/{n}/comments.lgtm and nothing else.