Skip to content

Add validate_manifest_tool backed by one validator shared with CI #54

Closed

Description

@TMHSDigital

Summary

Add a validate_manifest_tool that parses an existing fxmanifest.lua and reports errors and warnings, and back it with the same validator module CI uses. Today the only programmatic manifest check is an inline substring test in CI, and the richer standards exist only as prose in a Cursor rule.

Where

  • .github/workflows/validate.yml:207-231 (inline heredoc, walks only templates/, substring checks)
  • .github/workflows/validate.yml:25-55, :90-121 (other inline heredoc checks, natives check duplicated)
  • rules/fxmanifest-standards.mdc:12-19 (standards as prose)
  • mcp-server/tools/manifest_common.py:25-26 (only manifest parsing in the server: two regexes)
  • mcp-server/server.py:69-92 (generate_manifest_tool)

Details

  • The CI check tests "fx_version" not in content, "games" not in content, "'cerulean'" not in content for files under templates/ only; a comment satisfies all three, and examples/ is never checked.
  • Standards such as "no __resource.lua", "ui_page must be listed in files", and valid games values are only in rules/fxmanifest-standards.mdc, which Claude Code and other MCP clients never load.
  • CI logic lives in heredocs that cannot be linted or unit-tested, and the GTA5/RDR3 native schema checks are two copies of the same block. CLAUDE.md points contributors at .github/scripts/validate_plugin.py, which does not exist.

Impact

Users cannot ask the agent to check a manifest deterministically. Path mistakes (a glob matching nothing, a ui_page missing from files, a FiveM-only framework declaring rdr3) only show up when FXServer loads the resource. CI and the rule encode the standards separately and can drift.

Suggested fix

  • Add mcp-server/tools/manifest_validate.py with a small directive parser (string, table and {} forms) and a validate_manifest(path) function returning errors and warnings.
  • Checks: fx_version present and cerulean; games present with valid values; deprecated lua54 'yes' and __resource.lua; every script, files and ui_page entry resolves (glob) relative to the resource; ui_page covered by files; framework dependency consistent with games. Optional format="json".
  • Register validate_manifest_tool(path) in server.py.
  • Replace the heredoc in validate.yml:207-231 with python mcp-server/tools/manifest_validate.py templates examples. Optionally move the other heredoc checks into .github/scripts/validate_plugin.py (functions for JSON, natives, events, docs index, counts, templates) so the CLAUDE.md instruction becomes true.

Acceptance criteria

  • validate_manifest_tool returns clear errors for a manifest with a missing fx_version, an invalid games value, an unresolved script path, and a ui_page not covered by files.
  • CI validates every manifest under templates/ and examples/ using the same module.
  • The validator has unit tests with good and bad fixtures.
  • Contributors can run the CI checks locally with one command.

Getting started

  • Relevant files: mcp-server/tools/, mcp-server/server.py, .github/workflows/validate.yml, rules/fxmanifest-standards.mdc
  • 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/ROADMAP.md (Milestone 5, fxmanifest.lua validator), skills/fxmanifest/SKILL.md

Filed by repo-audit/full-audit at 701824d. Severity: medium. Effort: M. audit-key: enhancement|mcp-server/tools|validate_manifest_tool

Activity

  1. added
    enhancement
    help wanted
    on Nov 21, 2026
  2. TMHSDigital commented on Nov 21, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in 10b46d5.

    Added mcp-server/tools/manifest_validate.py (directive parser for string, table and multi-line table forms) and the validate_manifest_tool(path, format) MCP tool. Checks: fx_version present and cerulean, games present and valid, no lua54 directive or __resource.lua, every script/files/ui_page entry matches a file (missing dist/ build output is a warning), ui_page covered by files, framework dependency matches the games. CI now validates templates/ and examples/ with the same module (python3 mcp-server/tools/manifest_validate.py templates examples), which is also the one-command local check.

    Verified: unit tests with good and bad fixtures for each check plus JSON output; all 16 repo manifests pass (warnings only for unbuilt C#/NUI output); Validate passed on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wantedseverity: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions