Skip to content

feat(cli): add positional project selector to run - #26

Merged
caorushizi merged 5 commits into
masterfrom
codex/one-run-positional-project
Sep 3, 2026
Merged

feat(cli): add positional project selector to run#26
caorushizi merged 5 commits into
masterfrom
codex/one-run-positional-project

Conversation

@caorushizi

Copy link
Copy Markdown
Contributor

Require -- before child commands so run can distinguish an optional project name or path from the command being executed.

Require -- before child commands so run can distinguish an optional project name or path from the command being executed.
Copilot AI lite review requested due to automatic review settings September 2, 2026 23:54
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
one-cli-docs Ready Ready Preview Sep 3, 2026 12:20am UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are correctness and contract-alignment issues (selector conflict comparison, reference text mismatch, and missing coverage for new parsing paths) that should be addressed before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates one run to support an optional positional project selector and to require a -- separator so the command can reliably distinguish a project selector from the child command being executed.

Changes:

  • Add positional [project] support to one run and enforce -- as a required separator for the child command.
  • Introduce RUN_USAGE_INVALID and new localized error messages for common invalid-usage cases.
  • Update help snapshots and skill reference docs to reflect the revised one run contract.
File summaries
File Description
packages/skills/one-cli/references/REFERENCE.md Updates skill reference for new positional project and adds RUN_USAGE_INVALID to the error-code table.
packages/cli/testdata/reference/help/run.txt Refreshes one run help snapshot to document positional selection and required --.
packages/cli/internal/transport/cobra/run/cmd.go Implements parsing/validation for positional project + required separator and wires errors to RUN_USAGE_INVALID.
packages/cli/internal/platform/i18n/locales/zh-CN.json Adds new zh-CN messages for run usage errors.
packages/cli/internal/platform/i18n/locales/en-US.json Adds new en-US messages for run usage errors.
packages/cli/internal/platform/errors/codes.go Adds RUN_USAGE_INVALID code/definition and updates error-code registry.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/cli/internal/transport/cobra/run/cmd.go
Comment thread packages/cli/internal/transport/cobra/run/cmd.go
Comment thread packages/cli/internal/platform/errors/codes.go Outdated
Comment thread packages/skills/one-cli/references/REFERENCE.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
caorushizi and others added 2 commits September 3, 2026 08:13
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: caorushizi <19359849+caorushizi@users.noreply.github.com>
@caorushizi
caorushizi merged commit fd55dd6 into master Sep 3, 2026
7 checks passed
@caorushizi
caorushizi deleted the codex/one-run-positional-project branch September 3, 2026 14:03
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.

3 participants