Skip to content

feat(cli): accept basou portfolio list and redirect --check#174

Merged
takashi-matsuyama merged 1 commit into
mainfrom
feat/portfolio-list-alias
Jul 14, 2026
Merged

feat(cli): accept basou portfolio list and redirect --check#174
takashi-matsuyama merged 1 commit into
mainfrom
feat/portfolio-list-alias

Conversation

@takashi-matsuyama

@takashi-matsuyama takashi-matsuyama commented Jul 14, 2026

Copy link
Copy Markdown
Member

Why

Follow-up polish on basou portfolio (#173). The core listing shipped, but two natural agent spellings still errored — ironic for a change whose goal is removing foot-guns:

  • basou portfolio listerror: too many arguments (an agent reaching for a list sub-verb).
  • basou portfolio --checkerror: unknown option '--check' (--check is a basou view flag; the old memory shorthand reached for it).

What

  • basou portfolio list now lists — an alias for the bare command. Any other action word is rejected with a pointer.
  • basou portfolio --check prints a pointer to basou view --portfolio --check (where the redundancy/footprint preflight lives) and exits 1. It still never runs the preflight — the scope boundary vs basou view --check (a fixed constraint from feat(cli): add read-only basou portfolio listing command #173's review) holds; --check is declared only to turn the mistake into a signpost.

Verified (local)

basou portfolio             -> exit 0 (list)
basou portfolio list        -> exit 0 (list)
basou portfolio --json      -> exit 0
basou portfolio list --json -> exit 0 (12 workspaces)
basou portfolio --check     -> exit 1 + "Run `basou view --portfolio --check` ..."
basou portfolio bogus       -> exit 1 + "Unknown portfolio action 'bogus' ..."
basou portfolio list extra  -> exit 1 (commander: too many arguments)

Misuse branches exit 1 (matching commander's own unknown-option exit and the 62 other exit-1 sites in the CLI; exit codes are part of the 1.0 compat contract), not a novel code. cli typecheck / biome / lint:lang / 996 cli tests green; new runPortfolioCommand dispatcher tests cover the list alias, the --check redirect (exit 1, never reads config or lists), and unknown-action rejection.

Review note

The delegated adversarial reviewer was cut off mid-run by a session limit, so this went through a self-review + empirical edge-case verification instead (bare / list / --json / list --json / --check / bogus / list extra / --check+list precedence). That surfaced and fixed one real issue: the misuse branches originally used a novel exitCode 2, now normalized to 1 for consistency with the rest of the CLI and the compat contract.

Scope

Additive; no change to the --json contract or any other command. Bundles with #173 into the next release (v0.35.0).

🤖 Generated with Claude Code

Polish on the read-only `basou portfolio` listing so the natural agent
spellings stop erroring:
- `basou portfolio list` now lists (an alias for the bare command) instead of
  `error: too many arguments`.
- `basou portfolio --check` prints a pointer to `basou view --portfolio
  --check` (where the redundancy/footprint preflight lives) and exits 1,
  instead of a bare `unknown option '--check'`. It still never runs the
  preflight, so the scope boundary vs `basou view --check` holds.
- Any other action word is rejected with the same pointer.

Misuse branches exit 1 (matching commander's own unknown-option exit and the
rest of the CLI), not a novel code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@takashi-matsuyama
takashi-matsuyama force-pushed the feat/portfolio-list-alias branch from 136fb4e to 6724356 Compare July 14, 2026 22:36
@takashi-matsuyama
takashi-matsuyama merged commit 4822a9d into main Jul 14, 2026
7 checks passed
@takashi-matsuyama
takashi-matsuyama deleted the feat/portfolio-list-alias branch July 14, 2026 22:44
takashi-matsuyama added a commit that referenced this pull request Jul 14, 2026
Release v0.35.0: basou portfolio command (#173) + list alias / --check pointer (#174).
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.

1 participant