[Quality audit] Simplify MCP coordinator and tool surface
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- devtools
調査の方向性
Start with CODE_QUALITY_FINDINGS.md and the cited files under electron/mcp/**, especially coordinator.ts, server.ts, and validation.ts; inspect the existing config builder and related tests before choosing a finding. Run the MCP coordinator, validation, and tool-list tests, including the listed token-rotation, hydration, Docker path, prompt, idle, and cleanup cases. Done means the scoped duplications and unreachable validation branch are addressed and all acceptance checks pass.
索引モデルが issue の本文から書いたものです。
説明
Derived from the local audit report CODE_QUALITY_FINDINGS.md created on 2026-05-30.
Scope
This issue tracks complexity and duplication in electron/mcp/**.
Findings
- Finding 9: tested MCP config builder is bypassed.
- Evidence:
buildCoordinatorMCPConfigis defined and tested, butStartMCPServermanually rebuilds the same object. - Fix direction: call
buildCoordinatorMCPConfiginStartMCPServer.
- Evidence:
- Finding 10: sub-task MCP config construction is duplicated.
- Evidence: duplicated
mcpServers["parallel-code"]construction in restart rewrite, task creation, and hydration. - Fix direction: extract
buildSubTaskMcpConfig,writeSubTaskMcpConfig, andisAllowedSubTaskMcpConfigPath; confirmmcpServerInfo.tokencontract.
- Evidence: duplicated
- Finding 15: agent output monitoring is copied in MCP coordinator.
- Evidence: duplicated base64 decode, tail buffering, ANSI stripping, prompt detection, idle transitions, and resolver flushing.
- Fix direction: extract
createAgentOutputMonitor(task)andhandlePromptDetected(task).
- Finding 16: task teardown cleanup repeats in MCP coordinator.
- Evidence:
removeCoordinatedTask,cleanupTask, andderegisterCoordinatorrepeat lifecycle cleanup with subtle behavior differences. - Fix direction: extract narrow helpers for subscriptions, idle waiters, config cleanup, and control-state clearing.
- Evidence:
- Finding 17: MCP
createTaskhas too many responsibilities.- Evidence:
electron/mcp/coordinator.ts:398-740. - Fix direction: move preamble write/restore logic into
preamble.tsand use small queued file mutation helpers.
- Evidence:
- Finding 18: MCP tool diff formatting and truncation is duplicated.
- Evidence:
electron/mcp/server.tsandelectron/mcp/coordinator.tsboth format/truncate diffs. - Fix direction: centralize
formatDiffForTool(result, mergeInfo?)and oneMAX_DIFF_BYTES.
- Evidence:
- Finding 19: deprecated
review_and_merge_taskis still advertised.- Evidence:
electron/mcp/mcp-tool-list.ts,electron/mcp/server.ts,electron/mcp/client.ts. - Fix direction: keep compatibility handler if needed but remove the tool from advertised tools.
- Evidence:
- Finding 35: validation has an unreachable specific branch and duplicate tests.
- Evidence:
electron/mcp/validation.ts, duplicated validation coverage in coordinator tests. - Fix direction: move the
@{check before the generic invalid-character regex, or remove the branch; keep validation tests invalidation.test.ts.
- Evidence:
Acceptance checks
- MCP coordinator test suite
- MCP validation tests
- MCP tool-list tests
- token-rotation, hydration, Docker path, prompt, idle, and cleanup cases
- 主要言語
- TypeScript
- スター
- 1k
- フォーク
- 144
- 平均マージ
- 4日 19時間
- マージ済み PR(30日)
- 28
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
johannesjo/parallel-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johannesjo/parallel-code#385 ·
メンテナーはふだん 4 日以内に返信
-
Option to show usage as used instead of left, and potential further customization ideas対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
johannesjo/parallel-code#353 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johannesjo/parallel-code#163 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
johannesjo/parallel-code#375 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
Package as a Platpakオープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
johannesjo/parallel-code#374 ·
メンテナーはふだん 4 日以内に返信
johannesjo/parallel-code の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
ci
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ClickHouse/clickhouse-js#1248 ·
メンテナーはふだん 1 日以内に返信
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltオープンtechnik
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
AhmedNAgy25/analysor#25 ·
メンテナーはふだん 1 日以内に返信