refactor(cli): keep each tool's formats in its own profile
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 18/100
- Issue 類型
- 重構
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
Start with cli/tests/architecture/tool-addition-cost.arch.test.ts and the rules in cli/.claude/rules/00-architecture/0-hexagonal.md to see what the guardrail checks. Then trace the tool-named identifiers in formats/opencode-mcp-merge.ts, formats/vscode-mcp-merge.ts and formats/agent-frontmatter-strip.ts, and their callers. Done means the application/ and domain/formats/ baseline is empty and the golden snapshot is unchanged. This depends on #1141, which is not merged yet.
由索引模型根據 Issue 內容生成。
描述
Problem
The CLI's own rule says application code never branches on the targeted tool and reads its capability instead (cli/.claude/rules/00-architecture/0-hexagonal.md), and a tool may only be named in its profile (cli/tests/architecture/tool-addition-cost.arch.test.ts). That test only sees a tool named in a string literal. Identifiers escape it: measured, 30 files outside src/contexts/tools/domain/profiles/ carry a tool name in what they declare or import, 9 of them in an application/ layer. A second host that needs the same behaviour means editing application code again.
#1141 moves every hook format into its tool's profile, hands the project-hooks format through PluginsCapability, and adds the guardrail for application/ and domain/formats/, with today's remaining violations as a baseline that may only shrink. This issue empties that baseline.
Scope
- OpenCode's MCP merge:
formats/opencode-mcp-merge.ts, called by name frominstall-runtime-config-use-case.ts,flat-mcp-materializer.ts,plugin-remove-use-case.tsandproject-plugin-cleanup.ts. formats/vscode-mcp-merge.tsandformats/agent-frontmatter-strip.ts(Copilot and Cursor agent frontmatter).clean-user-scope-use-case.ts(purgeCursorUserScopeFiles),telemetry-on-use-case.ts(claudeSettings),flat-build-strategy.ts(the Claude root rewrite).- Same method as #1141: move each tool's format into its profile, expose what the application needs through the capability, behaviour unchanged, the golden snapshot identical.
Acceptance criteria
- The guardrail's baseline for
application/anddomain/formats/is empty. - No application file imports a module from a tool's profile or a function named after a tool.
- The golden snapshot is unchanged, and the CLI suite and the touched mutation scopes hold their floors.
Prior art in this repo
- #1141 and the guardrail it adds.
cli/.claude/rules/00-architecture/0-hexagonal.md,0-contexts.md;tool-addition-cost.arch.test.ts,context-boundary.arch.test.ts.
Out of scope
- The composition root (
src/runtime/wiring/) and readers whose job is one tool's own files (telemetry transcript readers, host plugin registry readers): naming the tool is their purpose.
- 主要語言
- TypeScript
- 星號
- 481
- 分支
- 45
- 平均合併
- 1 天 13 小時
- 30 天內合併 PR
- 91
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ai-driven-dev/framework 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
ai-driven-dev/framework#1311 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 79/100
ai-driven-dev/framework#1244 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
ai-driven-dev/framework#1197 ·
維護者通常 1 天內回覆
-
refactor(aidd-context): apply the new skill template to learn可能已有人在做 @blafourcade 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
ai-driven-dev/framework#1186 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 83/100
ai-driven-dev/framework#1163 · 1 則留言 ·
維護者通常 1 天內回覆
查看 ai-driven-dev/framework 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
solidjs/solid-docs#1716 ·
維護者通常 1 天內回覆
-
bug needs-triage
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
Progress indicated by console logs is off by one可能已有人在做 @marceliwac 今天認領。 未關閉bug needs-triage
難度 2/5 1-3 小時 新手友好度 76/100
aws-samples/aws-cdk-examples#1336 ·
-
難度 2/5 1-3 小時 新手友好度 74/100
melgarafael/DeskcommCRM#4999 · 1 則留言 ·
維護者通常 1 天內回覆
-
type: bug
難度 2/5 1-3 小時 新手友好度 78/100
nrwl/nx#37955 · 1 個 reaction ·
維護者通常 2 天內回覆