dsh-cc/dsh-cc--packages-compat-cc-serena-first ↗★ 1

@dsh-cc/serena-first

在 serena MCP 就绪时,向系统提示注入 Serena 优先的策略段落。 适合已接入 serena MCP、希望优先用符号工具的用户。

套件
@dsh-cc/serena-first
相容性
待驗證
Harness 依賴範圍
>=0.1.5-rc.1
Cordis 依賴範圍
>=0.1.5-rc.1
版本
0.7.1
授權
Apache-2.0
最近更新
2026年9月16日

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗

@dsh-cc/serena-first

English | 中文

Serena-first prompt steering for the CC preset (packages/preset/cc).

When a serena MCP server is connected (repo .serena/project.yml, user-scoped ~/.claude.json entry — see docs/code-intelligence-health.md), the session carries ~30 mcp__serena__* symbol tools that answer code questions without loading whole files. This plugin makes the system prompt say so:

  • Contribution A — a registered section serena-first (order 105) with a dynamic provider that renders the policy paragraph while serena is ready and an empty string (dropped at render) otherwise.
  • Contribution B — a system-prompt/assemble waterfall listener ({ prepend: true }, outermost, so its return value is authoritative) that replace-not-mutate appends one sentence each to the upstream tool:read and tool:grep sections while serena is ready.

Detection is registry-only and live: a duck-typed mcpConnections entry (state: 'ready' with toolCount > 0), re-evaluated on every assembly, so a mid-session disconnect stops the steering on the next turn. Scope-less assemblies pass through (mirrors tool-append-order); tool:write, tool:edit, and tool:glob are never rewritten.

Config: enabled (default true), serverName (default 'serena') — the latter drives both detection and every emitted mcp____* name.