Framework knowledge is spread across 6+ tables in 4 modules plus templates
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 7
- Fork
- 4
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TMHSDigital/CFX-Developer-Tools
-
help wanted severity: low tech-debt
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
TMHSDigital/CFX-Developer-Tools#79 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement help wanted severity: low
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
TMHSDigital/CFX-Developer-Tools#68 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
help wanted severity: low tech-debt
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
TMHSDigital/CFX-Developer-Tools#66 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies severity: low
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
TMHSDigital/CFX-Developer-Tools#62 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement severity: medium
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
TMHSDigital/CFX-Developer-Tools#58 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TMHSDigital/CFX-Developer-Tools
Issue tương tự
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FAIRmat-NFDI/sand#239 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
coco-research/coco#539 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
JustBeanie/hass-volcano-hybrid#34 ·
Maintainer thường phản hồi trong vòng 1 ngày