Skip to content

Rule frontmatter contradicts CLAUDE.md and some rule advice is inaccurate #61

Closed

Description

@TMHSDigital

Summary

Rule frontmatter does the opposite of what CLAUDE.md documents (the manifest and performance rules load in every chat while the security rule loads only for matching files), and several pieces of advice in the rules are technically inaccurate.

Where

  • rules/fxmanifest-standards.mdc:4-5, rules/performance-rules.mdc:4-5, rules/security-best-practices.mdc:4-5
  • CLAUDE.md:61-68 (rules table), CLAUDE.md:135-136
  • skills/*/SKILL.md:1-6 (frontmatter)
  • rules/security-best-practices.mdc:14
  • rules/cfx-lua-conventions.mdc:15, :64-68, :75
  • .github/scripts/build_docs_index.py:10

Details

Frontmatter

  • CLAUDE.md scopes fxmanifest-standards.mdc to **/fxmanifest.lua and security-best-practices.mdc to "Global". In the files, fxmanifest-standards and performance-rules have alwaysApply: true (Cursor then ignores globs and injects the rule everywhere), while security-best-practices has alwaysApply: false.
  • CLAUDE.md says skill frontmatter is name and description; all 10 skills use title/description/standards-version (9 with globs), none has name, and txadmin-integration has no globs.

Advice accuracy (checklist)

  • security-best-practices.mdc:14 says to "Prefix server events intended only for internal use to prevent remote triggering". A name prefix does not affect whether clients can trigger an event. Correct guidance: events meant only for server-internal use should be registered with AddEventHandler only (not RegisterNetEvent), and net handlers should validate source.
  • cfx-lua-conventions.mdc:75 says to use quat with GetEntityRotation / SetEntityRotation "quaternion overloads". Both are Euler (GetEntityRotation returns a vector3); the quaternion natives are GetEntityQuaternion / SetEntityQuaternion.
  • cfx-lua-conventions.mdc:15 shows backtick hashing as `adder` inside a markdown code span, so the rendered example shows plain adder without backticks.
  • cfx-lua-conventions.mdc:64-68 names a variable v4 with the comment "vector4 for position + heading" while assigning a vector3.
  • build_docs_index.py:10 says "Requires: requests (included in mcp-server/requirements.txt)"; the script uses urllib and requests is not in requirements.

Impact

Manifest and performance rules consume context in unrelated chats while the security rule is missing where it matters. Agents relying on the inaccurate items write ineffective event protection and call quaternion overloads that do not exist.

Suggested fix

  • Set alwaysApply: false on fxmanifest-standards and performance-rules and true on security-best-practices, or update CLAUDE.md to match the intended behaviour.
  • Either add name: <dir> to each SKILL.md or update the CLAUDE.md convention to the frontmatter actually in use.
  • Rewrite each checklist item as described, using a fenced code block to show the backtick hash.

Acceptance criteria

  • Rule alwaysApply/globs match the scopes documented in CLAUDE.md.
  • Skill frontmatter and the documented convention agree.
  • Each checklist item is corrected.

Getting started

  • Relevant files: rules/*.mdc, skills/*/SKILL.md, CLAUDE.md, .github/scripts/build_docs_index.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: Cursor rules documentation (alwaysApply, globs)

Filed by repo-audit/full-audit at 701824d. Severity: low. Effort: S. audit-key: quality|rules/fxmanifest-standards.mdc|frontmatter-and-advice

Activity

  1. added
    tech-debt
    on Nov 21, 2026
  2. TMHSDigital commented on Nov 21, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in ed75931.

    All six rules are now path-scoped (fxmanifest-standards and performance-rules had alwaysApply: true, which made Cursor ignore their globs), and the CLAUDE.md rules table lists each rule's globs. Corrected the advice: server-internal events must use AddEventHandler only (an event name or prefix does not stop clients from triggering a net event), the backtick hash example renders literally, the misleading v4 variable is renamed, and Get/SetEntityRotation are described as Euler with Get/SetEntityQuaternion for quaternions. The skill-frontmatter part was handled in #47/#48 and the standard migration is tracked in #79; the build_docs_index requirements note was fixed in #24.

    Verified: all six rules have alwaysApply: false; CI content checks pass.

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

    severity: lowtech-debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions