Skip to content

feat(cli): track gh-parity names and usage-error capture #4833

Open
12 of 15 issues completed
Open

Description

@dan-petty

Problem or Motivation

The owner asked on 2026-11-11:

I noticed agents implemented devops gh issues view when I requested devops gh issue view and I frequently see agents trying to use devops gh issue view. I would like to fix that and catch similar issues with devops cli use for future analysis about missing flags, features, or aliases.

A study of three agent logs found 1,737 usage errors of the devops CLI from 2026-09-23 to 2026-11-11: 452 calls in Claude Code transcripts and 1,285 calls in Kilo, Antigravity and Loki records. No command records these errors. _delegate records only the error class (#2024). To find them, the study read 4,338 transcripts and the other logs by hand.

The causes, largest first:

Cause Failures Child
devops gh issue for the plural group: 186 Claude Code calls by 181 agents in 12 sessions, 444 other calls in 270 sessions. The failures continued after #2361 and #2374 delivered devops gh issues view. 630 (36%) 1
devops gh run for the plural group, plus 10 run-gh 58 1
gh flags and commands that devops pr view and pr list do not have: --json 123, --head and --base 41, pr status 27 in 20 sessions, --comments 12, --search 9 212 6
Names that are absent by design or have another name, with no Click suggestion: pr merge 53, roadmap show, list, view, status or get 49, openspec validate or list 37, ci <row> 25, pr show or info 14, ai cost-report 8, gh auth 6 192 10
gh flags that devops gh issues view and list do not have: --search 44, --comments 30, --json 15 89 7
No comment command: pr comment in 10 sessions 42 9
pr describe with no --summary (23) or no issue argument (13); the devops-pr-ci skill line names neither 36 11
--body-file on pr create and pr edit, plus 3 on gh issues create 33 8

0 of 173 failing agent prompts held the singular form. Agents type gh's nouns and flags from what they know of gh, not from what they read. After a failure, agents go to devops gh api: 19,540 calls in the Claude Code logs, with 2,197 comment reads and 959 comment posts.

Goal

  • devops gh uses gh's nouns. A command that mirrors gh uses gh's command and flag names. A test and a CONTRIBUTING.md rule keep it so.
  • One hook records each usage error: kind, command path, typed name, Click's suggestion and caller. No record holds an argument value.
  • One command ranks the records of a window and proposes a fix class. The brain step of feat(roadmap): the brain files project insights through intake #4693 files the top rows each week, and the project review of feat(roadmap): read project review facts through a catalog #4692 counts them before and after a change.
  • The gh flags and commands with the most failures exist. A name that is absent by design shows a hint.

Decisions

  • Rename with no alias. devops gh issues, runs, labels and secrets become issue, run, label and secret. AGENTS.md keeps no old path while the project is alpha. Click prints "Did you mean issue?" for an old plural, and 121 of 186 agents ran Click's suggestion within 3 calls. An alias later needs counter evidence and the owner's exception.
  • Keep the other names. project, pr, api and status have gh's name. milestones, views, pages, metrics, branch-protection and rate-limit have no gh peer (milestones was typed 19 times with 0 singular attempts). The rename removes the hidden rate_limit alias (0 calls).
  • One pr app. devops gh pr and devops pr stay one app in two places; a flag added to one is in both.
  • gh's flag form. A command that mirrors gh takes --json <fields> and --jq. The boolean --json of the other 118 commands does not change.
  • No pr merge. Only a person merges. A hint line tells the agent, and no command runs.
  • Hints, not aliases, for names that are absent by design, that belong to another tool or that have another name. A hint is data, runs nothing and never covers a name that Click already suggests.
  • One capture hook at the root group class, with Click's own exception types (the copy that Typer vendors) and two tags for the two plain UsageError cases. No message parsing.
  • Privacy. Counter labels are kind, command_path and caller only. The typed name and the suggestion go only to the log record and the local ledger. A name that mask_secrets changes, that is longer than 40 characters or that is not a CLI name becomes <value>. No record holds argv, an option value, a message, a body, a path, a host or a user name. Export follows telemetry.enabled and the owner telemetry rules: the cluster collector only, no prompt or tool content.
  • Caller kind comes from the shared AI_AGENT marker first, then from tool markers; mcp from the dispatcher; ci from CI or GITHUB_ACTIONS; else person.
  • Local ledger <user data root>/usage-errors.jsonl through the stdlib RotatingFileHandler (1 MiB, 3 backups), with a setting to turn it off.
  • Analysis is one command, devops telemetry usage-errors, with no model call. The weekly filing folds into feat(roadmap): the brain files project insights through intake #4693 and shares its cap of 2 proposals a week, with a marker search first. Two data rows fold into the review catalog of feat(roadmap): read project review facts through a catalog #4692.

Ordered child list

Each line gives the issue, its title, its child number in the order and the issues to merge first. "Start now" marks an item with no unmet dependency. Children 4 and 5 are existing issues with a scope comment.

Deferred items (not filed)

Item Failures Reason
pr create --head 14 Open #4708 changes pr create.
release pr --dry-run 7 Agents stay out of releases.
pytest flags on ci test 5 Low count.
gh runs rerun 2 Low count.
-L for --limit 0 No failure.

Related open items

#4693 and #4692 get a scope comment each (children 4 and 5). #2346 reads agent transcripts on one host for recurring problems of all kinds; child 3 reads the records of the CLI itself, so the two do not overlap. #4708 changes pr create (child 8 keeps its change). #3637 (pr describe) belongs to another session, so nothing folds into it. #2024 (closed) records the error class today.

Measure of the whole

Measure Today (2026-09-23 to 2026-11-11) Target
Failures of devops gh issue and gh run (with run-gh) 688 0: the names resolve
Usage errors with a record of kind, command path and name 0 of 1,737 each one
Failures of the gh flags and commands of children 6-9 376 0 for the added flags and commands
devops gh api comment reads and posts in the Claude Code logs 2,197 and 959 fewer each week
Old plural names typed after the rename not counted counted; an alias needs this count and the owner's exception

Target Subsystem

SDLC, Git & PR Governance (devops gh and devops pr), with CLI telemetry and the roadmap brain.

Existing Tool Considered

gh's command and flag names are the reference, and devops pr already passes its arguments to gh through run_gh. Click's own exception types and its "Did you mean" suggestion (vendored by Typer 0.27.2 as typer._click). Stdlib logging with RotatingFileHandler. The OtlpExporter seam (#1319) and the cluster collector. The jq package on PyPI for --jq on commands that read through REST, after a premise check. The @vercel/detect-agent marker list for the caller kind (a maintained PyPI port first, if one exists). Built: the hint table (child 10 states its cost) and the ranking command (child 3); the study found no open tool that ranks Click usage errors.

Acceptance Criteria

  • Each child is merged, or closed with evidence.
  • 7 days after children 1 and 2 merge, devops telemetry usage-errors --since 7d shows no unknown_command row for gh issue, gh run, gh label or gh secret.
  • No line of the ledger, no log record and no counter label holds an argument value.

Dependencies

None for the tracker. The children carry their own.

Alternatives check of 2026-11-27: in-use.
The repository already uses this tool.
Tool: detect_agent (https://pypi.org/project/detect_agent), not stated, last activity 2026-08-12, maintained.
Reason: Searches found no open tool that hooks Click usage errors, keeps a local ledger and ranks them; detect_agent, already used for the caller kind, covers only that one part, while the hook, names, hints and ranking stay in-repo.

Covers:

  • Caller kind from the AI_AGENT marker first, then tool markers
  • One caller value: agent, mcp, ci or person
  • Already called by the CLI's caller module

Lacks:

  • No Click usage-error hook or typed-name capture
  • No suggestion capture, local ledger or ranking command
  • No hints for absent names and no gh-parity naming
  • No privacy filter that replaces a value with a placeholder

Proposed design

Problem statement

This item is a tracker: 12 ordered children deliver it, and no pull request of its own merges (AGENTS.md rule 8). The CLI does not mirror gh's names and flags in every group, and agents type gh's nouns and flags from what they know. The study found 1,737 usage errors from 2026-09-23 to 2026-11-11: 630 typed devops gh issue and 212 typed gh flags that pr view and pr list lack. The capture hook is live: the OTLP records hold 159 usage errors in the 7 days to 2026-11-12, and 127 of them are --json on a view or list command. The children pass the tool's own flags through, add the missing flags and commands, rank the records and show hints. Only one child pull request is open at a time, because each changes the generated command reference.

Acceptance criteria

Requirement: The gh noun groups keep gh's singular names

Each devops gh group that mirrors a gh noun SHALL use gh's singular command name, and the CLI SHALL keep no plural alias.

Scenario: An old plural group name

  • WHEN a caller runs devops gh issues view 1
  • THEN the CLI exits 2 with No such command 'issues' and a suggestion of issue, and no alias resolves the plural name.

Requirement: A mirrored command passes the tool's own flags

A devops gh or devops pr command that mirrors a gh command SHALL pass an option that devops does not declare to gh, instead of refusing it.

Scenario: gh's --json on a view command

  • WHEN a caller runs devops gh issue view 1 --json title and the test replaces the gh runner with a fake
  • THEN the command passes --json title to gh and prints gh's output, and it raises no No such option: --json error.

Requirement: A usage-error record holds no argument value

No usage-error counter label, log record or ledger line SHALL hold an argument value, a message, an argv, a path, a host or a user name.

Scenario: A typed name that carries a value

  • WHEN the CLI records an unknown option whose typed text mask_secrets changes, is over 40 characters or is not a CLI name
  • THEN the counter labels, the cli_usage_error log record and the usage-errors.jsonl line hold <value> in place of that text.

Requirement: The ranking command names the top usage errors

devops telemetry usage-errors SHALL rank the local usage-error ledger lines of a window by count and SHALL name a fix class for each row with no model call.

Scenario: A window that holds two error kinds

  • WHEN a caller runs devops telemetry usage-errors --since 7d over a ledger with two kinds
  • THEN the command prints the rows in count order with their kind, command path and fix class, and it makes no model call.

Requirement: An absent name shows a hint

The CLI SHALL print a hint for a known wrong command name and SHALL run no command for it.

Scenario: devops gh pr merge

  • WHEN a caller runs devops gh pr merge 1
  • THEN the CLI exits 2, prints the hint that only a person merges, and runs no merge command.

Existing Tool Considered

detect_agent 0.6.0 (https://pypi.org/project/detect_agent, released 2026-08-12, maintained) is in use: src/devops_cli/core/caller.py:58 calls determine_agent, and docs/TELEMETRY.md:238 records the caller kind from it. It covers the caller kind only. It lacks the Click usage-error hook, the typed name and suggestion, the ledger, the ranking command, the renames, the hints and the ADR 0026 pass-through. The #4839 proposal records Apache-2.0, but the alternatives check of 2026-11-14 found no license on its PyPI page, so a license check comes before any wider use. The repository builds the other parts: #4839 delivered the hook and the ledger, the hints child (#4860) states the hint table's cost, #5223 states the pass-through's cost, and the ranking command of #4840 is a reader and a count over the existing ledger, estimated at about 30k tokens to build, about 5k tokens a month to keep and fix, and about 2 days of elapsed time.

Key questions

  • Which names does devops gh use for the gh noun groups, and does an old plural alias stay?: devops gh issue, run, label and secret, in gh's singular form, with no alias. The rename is in place: src/devops_cli/commands/gh.py:133 registers label, line 138 issue, line 139 run and line 141 secret. tests/commands/test_gh_cmd.py:1286 checks each gh noun, and line 1303 checks that issues, runs, labels, secrets and rate_limit exit 2 with Click's suggestion of the new name. An alias later needs the count of old names and the owner's exception. (best practice) [sources: CONTRIBUTING.md:203, src/devops_cli/commands/gh.py:133, tests/commands/test_gh_cmd.py:1286, tests/commands/test_gh_cmd.py:1303]
    • Chosen: Rename to gh's singular names with no alias. gh writes the singular, CONTRIBUTING.md:203 requires gh's name, and the pre-1.0 rule keeps no shim; the test at tests/commands/test_gh_cmd.py:1303 enforces it.
    • Rejected: Keep the plural with a singular alias. It keeps a legacy path that the pre-1.0 rule forbids, and Click already suggests the singular.
    • Rejected: Keep the plural names. It keeps the mismatch that caused 630 failures.
  • Which check keeps the devops gh names at parity with gh?: tests/commands/test_gh_cmd.py:1282 lists the gh nouns (issue, pr, run, label, secret, project, api, status), and the parametrized test at line 1286 fails when devops gh <noun> --help is not a command. CONTRIBUTING.md:203 states the rule. [sources: CONTRIBUTING.md:203, tests/commands/test_gh_cmd.py:1282, tests/commands/test_gh_cmd.py:1286]
  • How does a command that mirrors gh take gh's flags, and does the boolean --json of the other commands change?: The command passes an option that it does not declare to gh, so --json, --jq, --search and --head come from gh and not from devops code. The owner direction of 2026-11-12, which feat(cli): tool commands pass unknown arguments to the tool #5223 records as ADR 0026, sets the rule. The repository already uses the mechanism: devops gh api sets allow_extra_args and ignore_unknown_options at src/devops_cli/commands/gh.py:1445, and the delegated commands set the same at src/devops_cli/core/cli.py:271. The boolean --json of the other 118 commands does not change. (best practice) [sources: CONTRIBUTING.md:203, src/devops_cli/commands/gh.py:1445, src/devops_cli/core/cli.py:271]
    • Chosen: Pass the unknown arguments to gh. gh parses its own flags; devops gh api and the delegated commands already do this, and CONTRIBUTING.md:203 requires gh's names.
    • Rejected: Build each gh flag in devops code. It copies gh's flag set, goes stale, and agents type gh's flags anyway.
    • Rejected: Read the fields over REST with the jq package. gh already parses --json and --jq, so a second parser adds code for no need.
  • Which source gives the caller kind of a usage error?: detect_agent 0.6.0, which src/devops_cli/core/caller.py:58 calls through determine_agent; it reads AI_AGENT first and then its table of tool markers. The record's caller is mcp first, then agent when a tool is found, then ci when CI or GITHUB_ACTIONS is set, else person (src/devops_cli/telemetry/usage_errors.py:228). [sources: src/devops_cli/core/caller.py:58, src/devops_cli/telemetry/usage_errors.py:228, docs/TELEMETRY.md:238, openspec/specs/command-telemetry/spec.md:189, https://pypi.org/project/detect_agent]
  • What does a usage-error record hold, and what keeps an argument value out?: The counter holds kind, command_path and caller only. The cli_usage_error log record and the usage-errors.jsonl line add the typed name, Click's suggestion, the agent tool and the version. A typed name that mask_secrets changes, is over 40 characters or is not a CLI name becomes <value> (src/devops_cli/telemetry/usage_errors.py:223). No record holds argv, an option value, a message, a body, a path, a host or a user name. [sources: docs/TELEMETRY.md:238, ARCHITECTURE.md:172, openspec/specs/command-telemetry/spec.md:146, src/devops_cli/telemetry/usage_errors.py:223]
  • Where does the local ledger live, and how is it bounded?: <user data root>/usage-errors.jsonl, through _LedgerFile, a stdlib RotatingFileHandler with 1 MiB a file and 3 backups (src/devops_cli/telemetry/usage_errors.py:48 and line 261), so 4 files in all. The setting telemetry.usage_ledger set to false stops it (src/devops_cli/telemetry/usage_errors.py:238). [sources: src/devops_cli/telemetry/usage_errors.py:48, src/devops_cli/telemetry/usage_errors.py:238, src/devops_cli/telemetry/usage_errors.py:261, docs/TELEMETRY.md:238, openspec/changes/archive/2026-11-12-4839-record-each-cli-usage-error-by/design.md:10]
  • Does devops gh pr merge exist?: No. AGENTS.md:21 gives merges to a person only. The name shows a hint line that says so and runs no command. (best practice) [sources: AGENTS.md:21]
    • Chosen: Show a hint and run nothing. AGENTS.md:21 gives the merge to a person only, so a command that merges would break the rule.
    • Rejected: Run gh pr merge. It lets an agent merge, which AGENTS.md:21 forbids.
    • Rejected: Do nothing for the name. 53 calls hit it, and Click gives no suggestion, so the agent learns nothing.
  • How does the ranking command work, and how does the weekly filing stay bounded?: devops telemetry usage-errors reads the local usage-errors.jsonl ledger, counts the records of the window by kind, command path and typed name, sorts them, and names a fix class for each row with no model call. The project records the ledger as the source: the feat(telemetry): record each CLI usage error by name and kind #4839 tasks say feat(telemetry): rank CLI usage errors and propose fixes #4840 ranks the ledger lines, and feat(ai): add devops ai agent-audit for recurring problems #2346 names the telemetry ledger. The ledger and the cli_usage_error log record hold the typed name and Click's suggestion; the counter holds only kind, command_path and caller. The weekly filing stays in feat(roadmap): the brain files project insights through intake #4693: the brain step files the top rows, shares its cap of 2 proposals a week (docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md:84), and searches for its marker with GitHubClient.search_issue_bodies (src/devops_cli/github/client.py:573) before it files, as the review filer does (src/devops_cli/review/filed_findings.py:107). Two data rows fold into the review catalog of feat(roadmap): read project review facts through a catalog #4692. (best practice) [sources: docs/TELEMETRY.md:238, src/devops_cli/telemetry/usage_errors.py:261, openspec/changes/archive/2026-11-12-4839-record-each-cli-usage-error-by/tasks.md:24, openspec/changes/archive/2026-11-15-2346-add-devops-ai-agent-audit-for/proposal.md:10, docs/adr/0023-the-project-brain-is-a-derived-index-in-two-cache-tiers-and-two-scheduled-runs-keep-it.md:84, src/devops_cli/github/client.py:573, src/devops_cli/review/filed_findings.py:107]
    • Chosen: One command over the local ledger with a deterministic count and no model call. The project records the ledger as the source, a count over a window is deterministic, and ADR 0005 keeps measurement to tools.
    • Rejected: Read the OTLP counter or the cluster log store instead. The counter labels hold no typed name or suggestion; the log store holds them but needs cluster access, and the project records the local ledger as the source.
    • Rejected: Ask a model to group the errors each week. It adds a model call for a count that a sort gives, and ADR 0005 gives models explanation and planning, not measurement.
  • Do devops pr and devops gh pr stay two paths to one app?: Yes. src/devops_cli/commands/gh.py:142 mounts the pr app under devops gh, so devops pr and devops gh pr are one app at two paths, as an exception of ADR 0026. A flag added to one is in both. pr wait goes. (best practice) [sources: src/devops_cli/commands/gh.py:142, src/devops_cli/commands/pr.py:1]
    • Chosen: One app at the two paths. Agents type both paths, and a second app would drift from the first; src/devops_cli/commands/gh.py:142 already mounts the same app.
    • Rejected: Move pr under gh pr only. It breaks the short path that agents and documents already use, with no gh peer to justify the move.

Fit

Needs splitting into 12 items:

  1. feat(cli): usage errors show a hint for known wrong commands #4860 hints for known wrong commands (start now)
  2. feat(cli): tool commands pass unknown arguments to the tool #5223 tool commands pass unknown arguments to the tool (waits on a private security fix of the owner and feat(cli): usage errors show a hint for known wrong commands #4860; its pull request does not open while a fix(docs): the argv check finds a missing required option #4862 pull request is open)
  3. feat(gh): gh issue view, list and status run gh #4848 gh issue view, list and status run gh
  4. feat(pr): pr view, list, checks, diff and status run gh #4842 pr view, list, checks, diff and status run gh
  5. feat(pr): pr create, edit, close and ready pass gh arguments #4852 pr create, edit, close and ready pass gh arguments
  6. feat(gh): gh issue create, edit, close and reopen run gh #5226 gh issue create, edit, close and reopen run gh
  7. feat(pr): pr comment and gh issue comment run gh #4855 pr comment and gh issue comment run gh
  8. feat(openspec): openspec validate, list and show run openspec #5227 openspec validate, list and show run openspec (no longer waits for build(openspec): move OpenSpec to 2.0.0 and its skill layout #5078)
  9. feat(gh): gh status, label list and secret list run gh #5228 gh status, label list and secret list run gh
  10. feat(telemetry): rank CLI usage errors and propose fixes #4840 rank usage errors
  11. fix(cli): a short flag never means another tool option #5229 a short flag never means another tool option
  12. feat(argo): argo cd commands take the Argo CD route names #5230 argo cd, feat(monitoring): grafana and prometheus take the route names #5231 grafana and prometheus, feat(cloudflare): cloudflare commands take the API route names #5232 cloudflare, feat(vault): vault commands take the Vault API route names #5234 vault, feat(ai): ai gateway and rag commands take the API route names #5236 ai gateway and rag (the API groups, in this order, sub-issues of feat(cli): tool commands pass unknown arguments to the tool #5223)

Suspected block

None.

Dependencies

None.

Sub-issues

Sub-issues

12 of 15 Issues completed
Loading 15 sub-issues

Activity

  1. added
    source/agent
    type/feature
    scope/cli
    status/new
    value/high
    effort/high
    on Nov 11, 2026
  2. 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/cli. The (cli) scope of the title gives the scope.
    • Priority: P2-Medium. 1,737 documented usage errors justify action, but no user is blocked and the project is alpha.
    • Value: High. A single naming fix removes 36% of all recorded agent CLI failures.
    • Effort: High. The change spans renames, a new hook, a ranking command, missing flags, hints, and a CONTRIBUTING.md rule.
    • Related: feat(ai): add devops ai agent-audit for recurring problems #2346, which asks for a different change. Both capture and analyze agent CLI usage patterns, but #2346 is a general audit tool while this candidate adds a dedicated hook, a ranking command, and gh-parity renames.
  3. added
    priority/p2-medium
    on Nov 11, 2026
  4. added
    priority/p2-medium
    and removed
    priority/p2-medium
    on Nov 11, 2026
  5. 4 remaining items

  6. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Live data, 2026-11-12. The OTLP records cli_usage_error (service devops-cli, Loki) hold 159 usage errors in the last 7 days. All 159 come from agents (usage_caller=agent, usage_agent_tool=claude_code) on the development container. The Service and its Job pods recorded none. Releases 0.118.0 to 0.121.1.

    Command path Kind Name Count Item
    gh issue view unknown_option --json 98 #4848
    gh pr view unknown_option --json 25 #4842
    gh issue view unknown_option --comments 10 #4848
    gh issue list unknown_option --search 9 #4848
    openspec unknown_command validate 3 -
    gh pr list unknown_option --json 2 #4842
    pr view unknown_option --json 2 #4842
    ci unknown_option --list 2 -
    others (1 each) gh pr create --head, gh issue view --jq, ci list, --format at the root, gh pr list --head, pr list --head, gh pr ready --undo, infra onboard --format 8 #4842, #4848

    --json on a view or list command is 127 of 159 (80 %). #4848 covers 118 records (74 %) and #4842 covers 31 (20 %). The order agrees with the transcript study of this tracker (--json 138, --search 53, --comments 42, --head/--base 41). The query: sum by (usage_command_path, usage_kind, usage_name, usage_caller) (count_over_time({service_name="devops-cli"} |= "cli_usage_error" [7d])).

  7. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Re-scope (owner direction of 2026-11-12). The title stays.

    The owner asked on 2026-11-12 that devops commands that run a CLI tool take the names and parameters of the tool and pass them through, and that API commands take the route names. ADR 0026 (#5223) records the rule. The goal line 'A command that mirrors gh uses gh's command and flag names' now covers each tool. The flags come from the tool through pass-through, not from code.

    Decisions that change

    • gh's flag form. A pass-through command takes every gh flag, --json <fields> and --jq included, because gh parses them. The boolean --json of the other commands does not change.
    • GraphQL. Issue and pull request reads go to gh. A call costs 1 point. In 7 days the highest hour of the agents used between 27 % and about 40 % of the budget, with 0 GraphQL throttle waits. The trigger to decide again reads the gauge of feat(github): record the rate limit of each response as gauges #4752. feat(gh): gh issue view, list and status run gh #4848 no longer builds the fields of gh over REST.
    • No fallback, one run. A pass-through command has no REST fallback, and a write runs gh once. On a rate-limit refusal, it prints the error of gh and the reset time.
    • Safety. Every gh entry accepts only OWNER/REPO for -R. MCP gives each entry an allowlist of options.
    • Two paths. devops pr and devops gh pr stay one app at two paths, as an exception of ADR 0026. pr wait goes.

    New ordered list

    Only one of these pull requests is open at a time, because each changes the generated command reference.

    1. feat(cli): usage errors show a hint for known wrong commands #4860 hints for known wrong commands (start now)
    2. feat(cli): tool commands pass unknown arguments to the tool #5223 tool commands pass unknown arguments to the tool. Dependencies: a private security fix (owner) and feat(cli): usage errors show a hint for known wrong commands #4860. Do not open its pull request while a pull request of fix(docs): the argv check finds a missing required option #4862 is open.
    3. feat(gh): gh issue view, list and status run gh #4848 gh issue view, list and status run gh
    4. feat(pr): pr view, list, checks, diff and status run gh #4842 pr view, list, checks, diff and status run gh
    5. feat(pr): pr create, edit, close and ready pass gh arguments #4852 pr create, edit, close and ready pass gh arguments
    6. feat(gh): gh issue create, edit, close and reopen run gh #5226 gh issue create, edit, close and reopen run gh
    7. feat(pr): pr comment and gh issue comment run gh #4855 pr comment and gh issue comment run gh
    8. feat(openspec): openspec validate, list and show run openspec #5227 openspec validate, list and show run openspec (no longer waits for build(openspec): move OpenSpec to 2.0.0 and its skill layout #5078)
    9. feat(gh): gh status, label list and secret list run gh #5228 gh status, label list and secret list run gh
    10. feat(telemetry): rank CLI usage errors and propose fixes #4840 rank usage errors
    11. fix(cli): a short flag never means another tool option #5229 a short flag never means another tool option
    12. The API groups, in this order: feat(argo): argo cd commands take the Argo CD route names #5230 argo cd, feat(monitoring): grafana and prometheus take the route names #5231 grafana and prometheus, feat(cloudflare): cloudflare commands take the API route names #5232 cloudflare, feat(vault): vault commands take the Vault API route names #5234 vault, feat(ai): ai gateway and rag commands take the API route names #5236 ai gateway and rag

    The five items of the API groups are sub-issues of #5223. #4752 adds the GraphQL gauge that the trigger reads; it is not in the list. #4862, #4693 and #4692 do not change. #5015 is closed as superseded by #5223.

  8. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    Usage error seen on 2026-11-13 (review of #5411): devops ci test refuses a pytest node ID.

    Command: uv run devops ci test "tests/roadmap/stage/test_roadmap_stage_verify_eval.py::test_the_report_gates_good_returning"

    Output: The path 'tests/roadmap/stage/test_roadmap_stage_verify_eval.py::test_the_report_gates_good_returning' does not exist. Check the name: a path that is not there gives no test.

    The test exists. The command reads the argument as a file path. A path::name argument is the usual pytest form, and the acceptance criteria of issues name tests in that form. Two possible fixes: accept path::name and give it to pytest, or name -k in the error text. I used uv run pytest -k as a workaround.

  9. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    Usage error found while opening #5569 (2026-11-13).

    devops pr create refused the body with:

    The body has 1014 characters before its trailers. The limit is 1000. Shorten the text above `Closes`.
    

    The text above Closes had 923 characters. _text_problems in src/devops_cli/roadmap/pull_form.py measures the body up to and including the Change: line, so the count also holds the Closes #<n> line and the Change: line (about 90 characters). The message (form_body_long) and CONTRIBUTING.md section 4 say "before the trailers", and an agent reads those two lines as trailers. So the agent cannot predict the count.

    Possible fixes: measure only the text above Closes (as the message and CONTRIBUTING.md say), or say in the message that the count includes the Closes and Change: lines and give the length of the text above Closes that is allowed.

  10. dan-petty commented on Nov 14, 2026

    @dan-petty
    OwnerAuthor

    Three tool-interface problems seen on 2026-11-14 in the review of #5584:

    1. devops pr monitor 5584 and devops pr checks print ! Inspect failed job logs via: gh run view --log-failed <run_id> (src/devops_cli/commands/pr.py:575). The hint names bare gh, which AGENTS.md rule 7 forbids. devops gh run view <run_id> --log-failed exists, so the hint can name it.
    2. devops gh issue view 5573 --json title,body,state,labels --jq ... stops with No such option: --json. gh issue view has --json, so an agent tries it first.
    3. devops gh issue list --state open --search '...' --limit 10 stops with No such option: --search. gh issue list has --search. The work-around was devops gh api 'search/issues?q=...'.
  11. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Alternatives check: in-use

    Reason: Searches found no open tool that records Click usage errors with their kind, path, typed name and suggestion, ranks them over a window, or keeps a CLI's names at parity with the tool it mirrors. The one piece with an off-the-shelf answer is the caller kind: a maintained Python port of the detect-agent marker list exists on PyPI (detect_agent 0.6.0), which covers just that one field of the capture hook, so the rest of the tracker (hook, ledger, ranking command, renames, missing flags, hints) still has to be built.

    The repository already uses this tool.

    Tool: detect_agent (https://pypi.org/project/detect_agent)

    • License: not stated
    • Last activity: 2026-08-12
    • Maintained: yes

    Covers:

    • Classifies which AI agent or tool is driving the process from environment markers, which is the caller / caller kind field the capture hook needs (agent tool name vs person vs ci).
    • Replaces hand-writing the shared AI_AGENT marker table that child 2 would otherwise maintain.

    Lacks:

    • Does not hook Click/Typer to catch usage errors, nor record kind, command path, typed name or Click's suggestion.
    • Does not rank the records of a window, propose a fix class or feed the weekly filing (devops telemetry usage-errors).
    • Does not rename gh issues/runs/labels/secrets, add the gh flags and commands, or render hints for absent names.
    • Does not give the privacy masking, the rotating JSONL ledger, the telemetry gating or the ADR 0026 pass-through behaviour.
    • Its PyPI page states no license, so adopting it in a public repository needs a license check first.

    Tools considered:

    Searches run:

    • detect-agent Python port PyPI detect AI coding agent, results: 5
    • Python Click CLI usage error tracking library record unknown command option, results: 5
    • "detect-agent" vercel github npm package AI agent marker environment variables, results: 5
    • click usage error telemetry OpenTelemetry instrumentation CLI python package, results: 5
    • detect-agent pypi, results: 5
    • jq python package PyPI, results: 5
    • opentelemetry-instrumentation-click PyPI package Click instrumentation, results: 5
    • vercel detect-agent npm package detect which AI agent is running, results: 5
    • "usage error" logging library python CLI capture unknown_command telemetry, results: 5
    • open source tool analyze CLI usage errors unknown option counts Click Typer applications, results: 5

    Sources:

    Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.

  12. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    The proposal at e5dfddb needs splitting into 12 items. A person splits the item into the items below, or replies in a comment or edits the body to keep one item, and the next refine round looks at the item again.

    1. feat(cli): usage errors show a hint for known wrong commands #4860 hints for known wrong commands (start now)
    2. feat(cli): tool commands pass unknown arguments to the tool #5223 tool commands pass unknown arguments to the tool (waits on a private security fix of the owner and feat(cli): usage errors show a hint for known wrong commands #4860; its pull request does not open while a fix(docs): the argv check finds a missing required option #4862 pull request is open)
    3. feat(gh): gh issue view, list and status run gh #4848 gh issue view, list and status run gh
    4. feat(pr): pr view, list, checks, diff and status run gh #4842 pr view, list, checks, diff and status run gh
    5. feat(pr): pr create, edit, close and ready pass gh arguments #4852 pr create, edit, close and ready pass gh arguments
    6. feat(gh): gh issue create, edit, close and reopen run gh #5226 gh issue create, edit, close and reopen run gh
    7. feat(pr): pr comment and gh issue comment run gh #4855 pr comment and gh issue comment run gh
    8. feat(openspec): openspec validate, list and show run openspec #5227 openspec validate, list and show run openspec (no longer waits for build(openspec): move OpenSpec to 2.0.0 and its skill layout #5078)
    9. feat(gh): gh status, label list and secret list run gh #5228 gh status, label list and secret list run gh
    10. feat(telemetry): rank CLI usage errors and propose fixes #4840 rank usage errors
    11. fix(cli): a short flag never means another tool option #5229 a short flag never means another tool option
    12. feat(argo): argo cd commands take the Argo CD route names #5230 argo cd, feat(monitoring): grafana and prometheus take the route names #5231 grafana and prometheus, feat(cloudflare): cloudflare commands take the API route names #5232 cloudflare, feat(vault): vault commands take the Vault API route names #5234 vault, feat(ai): ai gateway and rag commands take the API route names #5236 ai gateway and rag (the API groups, in this order, sub-issues of feat(cli): tool commands pass unknown arguments to the tool #5223)
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/highpriority/p2-mediumscope/clisource/agentstatus/newtype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions