.kilo/skills/kilocode-merge-minimizer/SKILL.md
Use this skill whenever a normal development task touches shared upstream-owned code and includes Kilo-specific behavior, especially for marker cleanup, extraction work, or kilocode_change annotations.
Do not use this as the primary guide for upstream merge resolution. Upstream merges have their own instructions and should not duplicate that workflow here.
Minimize Kilo's long-term diff against upstream OpenCode while preserving behavior.
Prefer this shape for Kilo-specific additions:
kilocode_change markers.For changes to existing upstream behavior, prefer the smallest in-place shared-file diff with narrow markers. Do not move changed upstream logic into Kilo-owned code just to avoid textual conflicts, because that can create harder semantic merge conflicts.
script/check-opencode-annotations.ts as the source of truth for current shared scopes and exempt paths.script/upstream/fix-kilocode-markers.ts for stale or broad markers, inspecting --dry-run output before applying changes.Extract Kilo logic when:
Keep the change inline when:
Always preserve upstream behavior order unless the Kilo behavior change is intentional and tested.
const value = 42 // kilocode_change.// kilocode_change start
registerKiloFeature(app)
// kilocode_change end
# comments for YAML, TOML, and shell.// kilocode_change - new file only for unavoidable new Kilo-specific files inside shared upstream paths.After editing shared files or marker comments, run:
bun run script/check-opencode-annotations.ts
If the PR uses a non-default comparison base, pass the correct base ref:
bun run script/check-opencode-annotations.ts --base <base-ref>
For stale or broad markers in one shared file, inspect the dry run before applying:
bun run script/upstream/fix-kilocode-markers.ts <repo-relative-file> --dry-run
Before finishing, confirm: