Skip to content

ci(docsgate): the mcp-tools change rule watches a path that has never existed #588

Description

@jongio

Summary

The mcp-tools change rule in cli/src/internal/docsgate/changed.go:63-68 watches cli/src/internal/mcp/. That directory doesn't exist and never has, so the rule can't fire. The MCP tool surface has no docs enforcement, which is the thing PR #583 added the rule to guarantee.

Evidence

git log --all -- cli/src/internal/mcp returns nothing. The path has never been committed.

All MCP code lives in cli/src/cmd/app/commands/: mcp.go, mcp_tools.go, mcp_helpers.go, mcp_info.go, mcp_resources.go, mcp_sanitize.go, mcp_process_unix.go, mcp_process_windows.go.

mcp_tools.go registers all 12 tools: get_services, get_service_logs, get_service_errors, get_project_info, run_services, stop_services, start_service, restart_service, install_dependencies, check_requirements, get_environment_variables, set_environment_variable.

Why it matters

The docs it protects are real: web/src/pages/mcp/tools.astro documents the tool surface, so drift is possible and currently unguarded.

Editing an MCP tool does still trip the cli-commands rule, since mcp_tools.go sits under cli/src/cmd/app/commands/ and that rule watches the whole directory. But that rule's hint points at cli/docs/cli-reference.md, which is the wrong place for an MCP change, and satisfying it never requires touching the MCP docs.

Note also that CheckChangedFiles returns early when hasDocChange(changed) is true, so any unrelated doc edit in the same PR suppresses every change rule.

Suggested fix

Either point the rule at cli/src/cmd/app/commands/ with an mcp filename filter, or move the MCP code to cli/src/internal/mcp/ so it matches the rule as written. Moving the code is cleaner, since the rule table reads as though that layout was intended.

Either way, add a test that every rule prefix resolves to a real directory, so a dead rule can't ship again.

Acceptance criteria

  • The mcp-tools rule matches the files that actually define MCP tools
  • A test fails if any changeRule prefix doesn't exist in the repo
  • Editing mcp_tools.go without touching MCP docs trips the mcp-tools rule

Activity

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

    bugSomething isn't workinglane/mcpSwarm lane: MCP tools and docsgate

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions