Skip to content

Simplify get UX: positional instance alias and multi-token --query#66

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/simplify-get-cli
Closed

Simplify get UX: positional instance alias and multi-token --query#66
Copilot wants to merge 3 commits intomainfrom
copilot/simplify-get-cli

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 12, 2026

This PR reduces friction in 99problems get by supporting an optional positional instance alias and unquoted multi-token query input, while preserving backward compatibility with -I/--instance.

  • CLI parsing updates

    • Added optional positional instance for get:
      • 99problems get <instance> ...
    • Kept -I/--instance intact for compatibility.
    • Updated --query/-q to accept multiple tokens (<QUERY>...) and join them with spaces before request construction.
  • Instance resolution semantics

    • Implemented explicit conflict behavior when both positional and --instance are provided:
      • same value → accepted
      • different values → usage error with clear guidance
    • Centralized resolution logic before config loading to keep behavior deterministic.
  • Regression coverage

    • Added parser tests for positional instance and multi-token query parsing.
    • Added unit tests for instance conflict handling and query token joining.
  • Docs/help refresh

    • Updated get help examples and command docs to show positional instance usage.
    • Updated README examples to show unquoted multi-token -q usage and [INSTANCE] command form.
# Positional instance
99problems get jira -i 25

# Backward-compatible flag form
99problems get -I jira -i 25

# Multi-token query without shell quoting
99problems get -q is:issue state:open architectural --no-comments
Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature] Simplify get CLI with positional instance and unquoted multi-token query</issue_title>
<issue_description>### Problem

The get command still has avoidable UX friction:

  1. instance selection requires -I/--instance, while many users expect positional usage such as 99problems get jira -i 25.
  2. -q/--query commonly requires quoting the full query string, which is awkward and makes mixed quote content harder.

This increases command complexity for frequent use and onboarding.

Design

Implement a focused CLI simplification pass:

  1. support instance alias as optional first positional argument (99problems get <instance> ...),
  2. keep -I/--instance for backward compatibility in this phase,
  3. make -q/--query accept multiple unquoted tokens until the next flag and join them with spaces,
  4. keep shell quoting semantics unchanged.

Scope

  • Add optional positional instance alias to get.
  • Preserve -I/--instance support.
  • Define conflict behavior when both positional and -I are provided:
    • same value => allowed,
    • different values => usage error.
  • Update -q/--query parsing to multi-token capture and token joining.
  • Update help/man/README examples for positional instance and unquoted query usage.
  • Add parser/regression tests for new CLI behavior.

Boundary

  • No removal of -I/--instance in this issue.
  • No positional platform support in this issue (positional is instance-only).
  • No custom quote interpretation layer beyond normal shell behavior.
  • No additional CLI redesign outside instance/query simplification.

Acceptance Criteria

  • 99problems get jira -i 25 works as expected.
  • 99problems get -I jira -i 25 remains valid.
  • If positional instance and -I conflict, command fails with clear usage guidance.
  • 99problems get -q is:issue state:open architectural --no-comments parses and executes with full query content.
  • Existing non-targeted get behaviors remain unchanged.
  • Tests and pedantic clippy checks pass.

Context

This is a small, high-impact CLI ergonomics improvement that keeps compatibility while moving toward lower-friction command usage.

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 12, 2026 00:28
Co-authored-by: mbe24 <7420624+mbe24@users.noreply.github.com>
Co-authored-by: mbe24 <7420624+mbe24@users.noreply.github.com>
Copilot AI changed the title [WIP] [Feature] Simplify get CLI with positional instance and unquoted multi-token query Simplify get UX: positional instance alias and multi-token --query Mar 12, 2026
@mbe24 mbe24 closed this Mar 13, 2026
@mbe24 mbe24 deleted the copilot/simplify-get-cli branch March 13, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Simplify get CLI with positional instance and unquoted multi-token query

2 participants