Skip to content

feat(gh): name the gh groups issue, run, label and secret #4835

Closed

Description

@dan-petty

Problem or Motivation

Agents type gh's nouns, and devops gh uses plural names. devops gh issue ... failed 630 times from 2026-09-23 to 2026-11-11: 186 calls by 181 agents in 12 Claude Code sessions and 444 calls in 270 Kilo and Antigravity sessions. That is 36% of the 1,737 usage errors found. The failures continued after #2361 and #2374 delivered devops gh issues view. devops gh run failed 48 times (3 and 45), plus 10 run-gh. 0 of 173 failing agent prompts held the singular form, so agents type the gh noun from what they know. After the failure, 146 of 186 agents sent devops gh api to the same resource. The plural comes from the repository text: 153 mentions of the four plural groups in 28 files and 15 MCP tool-name lines in 5 source files. The hidden rate_limit command is a compatibility alias, which the alpha rule does not permit.

Tracker #4833, child 1. The owner asked on 2026-11-11 to fix the devops gh issue name and to record such errors for a later analysis of missing flags, features and aliases. The counts come from a study of Claude Code, Kilo, Antigravity and Loki records from 2026-09-23 to 2026-11-11.

Proposed Solution & Architectural Design

Rename the groups in src/devops_cli/commands/gh.py: issues to issue, runs to run, labels to label and secrets to secret. Add no alias: AGENTS.md removes the old path while the project is alpha, and Click prints 'Did you mean issue?' for an old plural (121 of 186 agents ran Click's suggestion within 3 calls). Keep project, pr, api and status (same as gh) and milestones, views, pages, metrics, branch-protection and rate-limit (gh has no peer). Remove the hidden rate_limit command (0 calls). In the same pull request, change every surface that names an old group: the MCP tool names (gh_issues_view to gh_issue_view) in ai/mcp/roles.py, server.py, path_confinement.py, CONST_MCP_EXPOSURE_TABLE and the tool-listing snapshot; the roadmap tool registry roadmap/tools.py and the stage allow-list tests; lang/en/help.py and messages.py; the knowledge base; the OpenSpec spec text (the capability ids stay); README.md, CONTRIBUTING.md, docs/ROUTINE_TASKS.md, docs/SDLC.md, docs/roadmap/intake.md, docs/DASHBOARD_TABS_AUDIT.md, docs/adr/0001, .github/labels.yml and the tests. Regenerate docs/CLI_REFERENCE.md, docs/commands/gh.md and docs/MCP_TOOLS.md. Correct the comment at ai/mcp/dispatcher.py:33 (gh names it gh secret set). Add one rule to CONTRIBUTING.md: a command that mirrors a gh command uses gh's command name and flag names. Add a test with a table of gh nouns (issue, pr, run, label, secret, project, api, status) that fails when a devops gh group that mirrors gh has another name. No ConfigMap or manifest names the old groups, so the Service needs no preparation. Before the push, rebase on main; if open #4784 or #4678 changes the same MCP tables, keep their change and apply the new names (do not change those issues). After the merge, update the agent memory files that hold the plural (outside git).

Target Subsystem

SDLC, Git & PR Governance (devops gh, with the MCP tool names in src/devops_cli/ai/mcp/).

Existing Tool Considered

gh's own command names are the reference. Click's "Did you mean" suggestion (difflib, vendored by Typer) tells a caller the new name, so no alias code is necessary. The work is a rename and one test; nothing new is built.

Acceptance Criteria

uv run devops gh issue view 1 --help, gh run list --help, gh label list --help and gh secret list --help exit 0. uv run devops gh issues view 1 exits 2 and prints 'Did you mean issue?'; the same holds for runs, labels and secrets, and devops gh rate_limit suggests rate-limit. git grep -wE 'devops gh (issues|runs|labels|secrets)' -- ':!CHANGELOG.md' ':!openspec/changes/archive' ':!docs/agent/archive' prints 0 lines (153 today). The MCP tool-listing snapshot holds gh_issue_view and no tool that starts with gh_issues_, gh_runs_, gh_labels_ or gh_secrets_. The gh-noun test fails when one group gets its old name back. The docs argv check and the required CI checks pass.

Dependencies

None. An agent can start it now.

Source: #4833

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/gh
    status/new
    value/high
    effort/medium
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/gh. The (gh) scope of the title gives the scope.
    • Priority: P2-Medium. 630 agent failures over 7 weeks is real friction, but agents already work around it via devops gh api.
    • Value: High. Eliminates 36 percent of recorded usage errors and aligns the CLI with the gh nouns agents already know.
    • Effort: Medium. A rename across 28 files, 15 MCP tool names, docs and tests, but no new logic is built.
    • Related: feat(gh): gh issues, milestones, labels and runs commands list their requests in a dry run and make none #2235, which asks for a different change. Both target the same gh issues, labels and runs command groups, but #2235 adds dry-run request listing while the candidate renames the groups to singular.
  4. added
    priority/p2-medium
    owner/agent
    on Nov 11, 2026
  5. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Seen again on 2026-11-12: an agent ran uv run devops gh issue view 4688 --comments and got "No such command 'issue'. Did you mean 'issues'?". The agent then used devops gh issues view.

  6. added
    status/in-progress
    and removed
    status/new
    on Nov 12, 2026
  7. removed
    status/in-progress
    owner/agent
    on Nov 12, 2026
  8. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-12 05:27 UTC

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

    effort/mediumpriority/p2-mediumscope/ghsource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions