Framework knowledge is spread across 6+ tables in 4 modules plus templates
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start with mcp-server/tools/manifest_common.py (FRAMEWORK_DEPS, VALID_FRAMEWORKS and the error string), then compare FRAMEWORK_INIT_CLIENT and FRAMEWORK_INIT_SERVER in mcp-server/tools/scaffold.py and the scores/evidence literals in mcp-server/tools/detect_framework.py. The issue proposes a single framework registry, with tests written first for validation, detection and scaffold output. Done means those modules derive from one registry and a newly registered framework works without edits elsewhere; there is no test suite yet, so the first step is adding one.
由索引模型根據 Issue 內容生成。
描述
Summary
The list of supported frameworks and what each one means is repeated in at least six tables across four Python modules, plus tool docstrings and one directory per framework under templates/. None reference each other, so adding or changing a framework requires about nine coordinated edits and a partial edit fails silently.
Where
mcp-server/tools/manifest_common.py:12-19(FRAMEWORK_DEPS),:23(VALID_FRAMEWORKS),:43(hand-written error string)mcp-server/tools/scaffold.py:15-33(FRAMEWORK_INIT_CLIENTandFRAMEWORK_INIT_SERVER, byte-identical)mcp-server/tools/detect_framework.py:14-43(MANIFEST_SIGNALS,CODE_SIGNALS),:58-65(scores/evidenceliterals)mcp-server/server.py:45, 86, 108(framework lists in tool docstrings)templates/<framework>/,templates/vorp/fxmanifest.lua:2(game compatibility only in comments)
Details
- A framework missing from the
scoresliteral raisesKeyErrorindetect_framework; one missing fromFRAMEWORK_INIT_*produces an empty init line with no error. FRAMEWORK_INIT_SERVERis a verbatim duplicate ofFRAMEWORK_INIT_CLIENT.- Game compatibility (VORP/RSG are RedM-only, Qbox/ESX/QB/ox are FiveM-only) exists only in template comments and is not enforced (see "Reject invalid framework/game combinations and offer a multi-framework bridge").
Impact
Maintainability: adding a framework (for example a new RedM core) means touching about nine places, and missed spots produce wrong output rather than errors.
Suggested fix
- Tests first:
validate_inputsaccepts every framework;detect_frameworkreturns each framework for a minimal fixture workspace; the scaffold emits each framework's init line. - Add a
FRAMEWORKS: dict[str, Framework]registry inmanifest_common.py, whereFrameworkis a dataclass (id,dependency,init_lua,games,manifest_signals,code_signals). - Derive
VALID_FRAMEWORKS,FRAMEWORK_DEPSand the error message from it (keep the old names as aliases). - Point the scaffold at
FRAMEWORKS[fw].init_luaand delete both INIT dicts. - Build
detect_framework'sscores/evidenceand signals from the registry. - Enforce
gamesinvalidate_inputs.
Acceptance criteria
- Framework metadata lives in one registry; other modules derive from it.
- Adding a framework to the registry is enough for validation, scaffold init, manifest dependency and detection (plus a template directory).
- Tests cover every registered framework.
Getting started
- Relevant files:
mcp-server/tools/manifest_common.py,mcp-server/tools/scaffold.py,mcp-server/tools/detect_framework.py,mcp-server/server.py - How to run checks: there is no test suite yet; run the MCP server with
cd mcp-server && pip install -r requirements.txt && python server.py, and CI checks live in.github/workflows/validate.yml - Related docs:
skills/framework-detection/SKILL.md
Filed by repo-audit/full-audit at 701824d. Severity: medium. Effort: M. audit-key: tech-debt|mcp-server/tools/manifest_common.py|VALID_FRAMEWORKS
- 主要語言
- Python
- 星號
- 7
- 分支
- 4
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/CFX-Developer-Tools 的其他 Issue
-
help wanted severity: low tech-debt
難度 3/5 1-2 天 新手友好度 45/100
TMHSDigital/CFX-Developer-Tools#79 ·
維護者通常 1 天內回覆
-
enhancement help wanted severity: low
難度 3/5 1-2 天 新手友好度 55/100
TMHSDigital/CFX-Developer-Tools#68 ·
維護者通常 1 天內回覆
-
help wanted severity: low tech-debt
難度 4/5 3-5 天 新手友好度 35/100
TMHSDigital/CFX-Developer-Tools#66 ·
維護者通常 1 天內回覆
-
dependencies severity: low
難度 3/5 1-2 天 新手友好度 65/100
TMHSDigital/CFX-Developer-Tools#62 · 2 則留言 ·
維護者通常 1 天內回覆
-
enhancement severity: medium
難度 3/5 1-2 天 新手友好度 55/100
TMHSDigital/CFX-Developer-Tools#58 · 1 則留言 ·
維護者通常 1 天內回覆
查看 TMHSDigital/CFX-Developer-Tools 的全部 Issue
相似的 Issue
-
hive size:simple
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)未關閉
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 70/100
painted-porch/marcus#977 ·
維護者通常 1 天內回覆
-
llm translation
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
FAIRmat-NFDI/sand#239 ·
維護者通常 1 天內回覆