Skip to content

chore(help): simplify command indexes - #2219

Merged
nborges-aws merged 1 commit into
aws:refactorfrom
notgitika:chore/clean-command-help
Sep 4, 2026
Merged

chore(help): simplify command indexes#2219
nborges-aws merged 1 commit into
aws:refactorfrom
notgitika:chore/clean-command-help

Conversation

@notgitika

@notgitika notgitika commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use the documented Commander subcommandTerm formatter to show command names only
  • remove options, arguments, and subcommand syntax from parent command indexes
  • keep the complete invocation grammar in each command-specific Usage: line

This makes every command index consistent and easier to scan without changing parsing or command-specific help.

Example

Before:

Commands:
  create [options]             create a new AgentCore project
  add                          add project resources
  remove [options] [resource]  remove a resource from the project

After:

Commands:
  create  create a new AgentCore project
  add     add project resources
  remove  remove a resource from the project

agentcore project remove --help still shows Usage: agentcore project remove [options] [resource].

Testing

  • bun test src/router/router.test.ts
  • bun run typecheck
  • bun run lint:check
  • bun run format:check
  • full suite reached 2,901 passing tests; the local Bun 1.3.6 fallback install then stopped on a missing nested CDK fixture dependency because it cannot parse the branch lockfile version

@github-actions github-actions Bot added the size/s PR size: S label Sep 4, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 4, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
agentcore-devx-automation[bot]

This comment was marked as outdated.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 4, 2026
@codecov-commenter

codecov-commenter commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.04%. Comparing base (da28031) to head (07e5d89).

Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #2219   +/-   ##
=========================================
  Coverage     97.04%   97.04%           
=========================================
  Files           544      544           
  Lines         37536    37537    +1     
=========================================
+ Hits          36428    36429    +1     
  Misses         1108     1108           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Sep 4, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Sep 4, 2026
@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Sep 4, 2026
@notgitika
notgitika force-pushed the chore/clean-command-help branch from 2ec6da0 to 07e5d89 Compare September 4, 2026 05:46
@notgitika notgitika closed this Sep 4, 2026
@notgitika notgitika reopened this Sep 4, 2026
@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Sep 4, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 4, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed claude-security-reviewing Claude Code /security-review in progress agentcore-harness-reviewing AgentCore Harness review in progress labels Sep 4, 2026

@agentcore-devx-automation agentcore-devx-automation Bot 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.

AgentCore Harness Review

Verdict: Looks good

Small, well-scoped change that overrides Commander's subcommandTerm so the command index shows just names instead of the full name [options] <args> signature. Behavior:

  • Usage: line is untouched (still shows [options] [command]), which the test asserts.
  • Subcommand entries drop [options], positional args, and the [command] marker on groups.

The test uses real Router/Commander instances and covers the three interesting cases (flags, positional args, nested groups). No mocking concerns, and no telemetry is warranted for a help-formatting change. Nothing blocking — all substantive points were already covered by the prior automated review.

@nborges-aws
nborges-aws merged commit 289cbf1 into aws:refactor Sep 4, 2026
22 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants