Skip to content

refactor: 抽出 generic plugin-presence detector helper (tangential from #28 plan) #34

@kiki830621

Description

@kiki830621

Refactor Opportunity

Source: surfaced during /idd-plan #28 tangential sweep (Step 2.5)

#28 將寫一個 scripts/check-ralph-loop.sh POSIX-portable detector,#27 (Source Type Adapter fail-fast) 也需要類似的「detect MCP plugin 存在」邏輯。兩處共用 abstraction 候選:

scripts/check-plugin-presence.sh <plugin-name> [marketplace]
  → exit 0 if installed, exit 1 if missing
  → 印出 detect path 讓 user debug
  → 認 IDD_SKIP_PLUGIN_CHECK env var escape hatch

#27 detect 4 個 source-type MCP plugins (che-word-mcp / che-telegram-mcp / che-apple-mail-mcp / che-apple-notes-mcp),#28 detect 1 個 ralph-loop。共 5 個 caller。

When to do

#28 implement 完成、#27 進 implement 之前。#28 內做(避免 scope creep + #28 自己只用 1 次,還沒到該抽 abstraction 的訊號)。

#27 implement 第一步:看 #28 的 helper,若可平移為 generic version 就 refactor;若不能(detect logic 本質不同)則 #27 寫獨立 helper,本 issue close 為「natural emergence didn't materialize」。

Type

refactor

Priority: P3 (Code quality, not blocker)

Related


Current Status

Phase: closed
Last updated: 2026-05-07 by idd-close

Resolution

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions