Scaffolder duplicates templates/ boilerplate and a second manifest renderer
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp, javascript, lua, python
調査の方向性
Start in mcp-server/tools/scaffold.py (_build_manifest, _scaffold_lua/_js/_csharp) and compare it with generate_manifest in mcp-server/tools/manifest_gen.py and manifest_common.py, then with the matching folders under templates/. Step one is golden-output tests for scaffold_resource and snapshot tests for generate_manifest, since no test suite exists yet. Done means one shared manifest renderer, scaffold output matching templates/<framework> after substitution, and a decision on NUI support.
索引モデルが issue の本文から書いたものです。
説明
Summary
scaffold_resource_tool builds every file from inline Python strings and never reads templates/, and it has its own manifest renderer separate from generate_manifest. The copies have already drifted from the templates and from each other.
Where
mcp-server/tools/scaffold.py:15-33(FRAMEWORK_INIT_CLIENT/FRAMEWORK_INIT_SERVER)mcp-server/tools/scaffold.py:84-137(_build_manifest)mcp-server/tools/scaffold.py:140-256(_scaffold_lua,_scaffold_js,_scaffold_csharp)mcp-server/tools/manifest_gen.py:58-128(generate_manifest, second renderer; re-implementsgames_blockat 58-61)mcp-server/tools/manifest_common.py:4,:29-33(games_block),:47-51(substitute_variables, no callers)templates/,skills/resource-scaffolding/SKILL.md:110-116
Details
Drift already present between the scaffold output, generate_manifest, and templates/:
- The scaffolded C# csproj has no
HintPathfor CitizenFX.Core; the template has one. - C# manifest entries differ three ways (scaffold
Client/ClientMain.net.dll/Server/ServerMain.net.dll,generate_manifest{name}.net.dll, templateMyResource.net.dll). - Framework templates include
'@oxmysql/lib/MySQL.lua'and show player-data calls; scaffold output has neither. - Templates pin VORP/RSG to
rdr3and ESX/QB/Qbox/ox togta5; the scaffold accepts any game with any framework. - No NUI option exists although
templates/nui-viteandtemplates/nui-svelteare maintained, and CLAUDE.md says the scaffold supports "optional NUI".
manifest_common.py says it exists "to avoid duplication", yet both tools build the same header list and per-language script blocks separately. generate_manifest supports dependencies, scanned scripts and NUI; the scaffold supports none of them. substitute_variables exists for templating but has no callers, while docs/ROADMAP.md marks templating as shipped.
The functional bugs are tracked separately in "C# scaffold fails to compile; C# manifests reference DLLs that are never built" and "generate_manifest emits Lua tables without commas, mishandles scanned scripts".
Impact
Users get structurally different resources from the MCP tool and from the templates. Every template fix must be ported by hand into Python string literals with nothing checking it, and every manifest convention change must be made in two functions.
Suggested fix
Each step can ship on its own:
- Add golden-output tests for
scaffold_resourceacross language and framework, and snapshot tests forgenerate_manifest(with deps, scripts, has_nui). - Add
render_manifest(name, game, language, framework, author, description, deps=(), extra_scripts=(), has_nui=False)tomanifest_common.py, ported fromgenerate_manifest; makegenerate_manifestcall it (snapshots unchanged), then make the scaffold call it and delete_build_manifest. - Add
{{name}}/{{author}}placeholders totemplates/and have_scaffold_lua/_js/_csharpcopytemplates/<x>/throughsubstitute_variables, resolving the templates dir relative to__file__. Delete the inline strings. - Add optional parameters:
output_dir,nui: none|vanilla|react|svelte(overlaytemplates/nui-*),dry_run.
Acceptance criteria
- There is one manifest renderer used by both tools.
- Scaffold output for a framework matches
templates/<framework>after name/author substitution (enforced by a test). -
scaffold_resource_toolcan add NUI from the maintained templates, or CLAUDE.md stops claiming it. -
substitute_variablesis used or removed, and ROADMAP reflects reality.
Getting started
- Relevant files:
mcp-server/tools/scaffold.py,mcp-server/tools/manifest_gen.py,mcp-server/tools/manifest_common.py,templates/ - 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:
docs/ARCHITECTURE.md(Templates),skills/resource-scaffolding/SKILL.md
Filed by repo-audit/full-audit at 701824d. Severity: medium. Effort: M. audit-key: tech-debt|mcp-server/tools/scaffold.py|scaffold_resource
- 主要言語
- Python
- スター
- 7
- フォーク
- 4
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
llm translation
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FAIRmat-NFDI/sand#239 ·
メンテナーはふだん 1 日以内に返信
-
bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
coco-research/coco#539 ·
メンテナーはふだん 1 日以内に返信
-
dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
JustBeanie/hass-volcano-hybrid#34 ·
メンテナーはふだん 1 日以内に返信