Skip to content

(janitor/dead-code): remove unused code-review platform prompt helpers - #6041

Merged
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/dead-code-platform-helpers
Sep 11, 2026
Merged

(janitor/dead-code): remove unused code-review platform prompt helpers#6041
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/dead-code-platform-helpers

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What was deleted

Removed four exported symbols from apps/web/src/lib/code-reviews/prompts/platform-helpers.ts:

  • getCliTool(platform) — returned the platform CLI name (gh/glab/bb)
  • getPrTerm(platform) — returned the PR/MR term (PR/MR)
  • replacePlatformPlaceholders(text, platform, values) — replaced {CLI}, {PR_TERM}, {REPO}, {PR_NUMBER}, etc. placeholders
  • PLATFORM_TERMINOLOGY — platform terminology map

102 lines removed. getPlatformConfig, the PlatformConfig type, and the three per-platform config objects are retained because they remain reachable and in use.

Evidence of unreachability

  • Repository-wide, case-insensitive searches for each symbol name across all file types (.ts, .tsx, .md, .json, tests, .specs, CI workflows) return only their own definitions.
  • The file is imported from exactly one place: generate-prompt.ts, which imports only getPlatformConfig.
  • No barrel/export * re-exports the file or these symbols (no prompts index re-export exists).
  • No dynamic import()/require() of the file path exists.
  • The external consumer repo Kilo-Org/kilocode contains no reference to these symbols (this is internal apps/web code, not a published package, so no external contract is involved).

Entry points checked

  • Next.js conventions: the file is a shared lib module, not a route/page/layout/middleware; not discoverable by file-system convention.
  • Tests: no test imports or jest.mock/requireActual these symbols; the only platform-helpers.test.ts belongs to a different file (src/lib/bot/platform-helpers.ts).
  • Prompt templates: default-prompt-template*.json use {PR_NUMBER}/{MR_IID}/{BASE_SHA}/{HEAD_SHA} placeholders handled inline in generate-prompt.ts/prepare-review-payload.ts; they do not use the {CLI}/{PR_TERM} placeholders this helper existed to substitute.
  • Config/CI/scripts: no references in knip config, tsconfig paths, jest config, or GitHub workflows.
  • Cloudflare/Wrangler: N/A — apps/web is a Vercel Next.js app with no Wrangler bindings or Durable Objects involved.

Contract and compatibility

  • Internal, unpublished apps/web code; no package exports, SDK, CLI, or plugin surface affected.
  • No import-time side effects removed (pure functions and a const object).
  • No persisted data, migrations, or compatibility shims involved.

Validation

  • tsgo --noEmit -p apps/web/tsconfig.json — passes (exit 0).
  • oxlint --config .oxlintrc.json on the file — 0 warnings, 0 errors.
  • oxfmt --check on the file — clean; git diff --check clean.
  • apps/web prompt unit tests (jest src/lib/code-reviews/prompts) could not run in this environment because their shared setup requires a live PostgreSQL instance (not available here), which is expected and unrelated to this change.

Delete getCliTool, getPrTerm, replacePlatformPlaceholders, and
PLATFORM_TERMINOLOGY from code-reviews/prompts/platform-helpers.ts.
None are referenced anywhere in the repository (source, tests, configs,
docs, or prompt templates) or by the external Kilo-Org/kilocode consumer.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 10, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge (squash) September 10, 2026 07:49
@kilo-code-bot

kilo-code-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • apps/web/src/lib/code-reviews/prompts/platform-helpers.ts

Reviewed by grok-4.6 · Input: 82.7K · Output: 3.5K · Cached: 123.9K

Review guidance: REVIEW.md from base branch main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant