Repository navigation
Conversation
Greptile SummaryThis PR adds per-command flag descriptions to command specifications, backfills orchestration help, and restructures orchestration message specifications.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/cli/command-flag-help-layout.ts | Adds structured flag-help parsing for the aligned command-help renderer. |
| src/cli/help.ts | Renders option descriptions in a column derived from resolved labels. |
| src/cli/specs/orchestration-flag-help.ts | Centralizes descriptions for shared orchestration flags. |
| src/cli/specs/orchestration-message-specs.ts | Moves message command specifications and adds their per-flag descriptions. |
| src/cli/specs/orchestration-worker-specs.ts | Backfills structured help for orchestration worker flags. |
| src/cli/specs/orchestration.ts | Backfills orchestration command flag descriptions and composes extracted message specifications. |
| src/cli/specs/orchestration.test.ts | Adds coverage, alignment, and precedence tests for orchestration flag help. |
Reviews (2): Last reviewed commit: "feat(cli): describe orchestration flags" | Re-trigger Greptile
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 78494921cd9566927d535248bc5d31eac02ae841 and 0296c39. 📒 Files selected for processing (12)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe CLI now supports optional per-command flag descriptions in Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change adds per-flag descriptions to the orchestration CLI help and aligns them in columns. It does not change command behavior, and no merge-blocking issue was found. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The new descriptions affect help output, not accepted arguments or command authority. Existing caller-identity controls are preserved, and no material security risk was identified in the reviewed change. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation Issue Resolution Add non-empty descriptions for
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
- Spec-level
flagHelp:CommandSpecgains an optionalflagHelp?: Record<string, string>, consulted first by the help renderer with the existing special-case and global maps kept as fallback. - Orchestration backfill: every orchestration flag now carries a one-line description, sharing a base map via
orchestrationFlagHelp()with per-spec overrides; message specs were extracted toorchestration-message-specs.ts. - Ratchet + precedence tests: a ratchet test asserts every orchestration flag has spec-level help, and a precedence test pins spec-level over global.
ℹ️ Nitpicks
- The four orchestration special cases still in
src/cli/help.ts(orchestration worker-readcursor,orchestration worker-listterminal-state,orchestration task-createtask-title/display-name) are now unreachable because spec-levelflagHelpcovers those flags. Remove them so the old side table doesn't drift silently.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
dc2c184 to
932b2bd
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 85ebfaba-288c-4fd9-a869-0a51d1413615
📥 Commits
Reviewing files that changed from the base of the PR and between 212c0e4 and 932b2bdf1c90a8163bbfd2fbd5ea4ca7a08c1fde.
📒 Files selected for processing (9)
src/cli/command-flag-help-layout.tssrc/cli/command-spec.tssrc/cli/help.tssrc/cli/index.test.tssrc/cli/specs/orchestration-flag-help.tssrc/cli/specs/orchestration-message-specs.tssrc/cli/specs/orchestration-worker-specs.tssrc/cli/specs/orchestration.test.tssrc/cli/specs/orchestration.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- src/cli/command-spec.ts
- src/cli/specs/orchestration-flag-help.ts
- src/cli/specs/orchestration-worker-specs.ts
- src/cli/specs/orchestration.ts
- src/cli/specs/orchestration-message-specs.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — one alignment regression in the legacy help fallback; prior feedback is otherwise addressed cleanly.
Reviewed changes
- Dynamic column alignment: new
resolveFlagHelpinsrc/cli/command-flag-help-layout.tssplits labels from descriptions, andformatCommandHelpnow pads labels to a computed description column instead of relying on hand-spaced strings. - Single-space normalization: every orchestration spec-level
flagHelpdropped its manual double space, and the ratchet test now also rejects a\s{2,}after a<...>placeholder. - Prior feedback addressed:
worker-list --terminal-statere-enumerates the valid states;worker-startgained a--terminal/--worktreereuse note and clearer placement wording. - Test updates: linear / worker-read / task-create assertions moved to
\s+regex matching, and a new test pinsworker-startdescriptions to a single column.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
932b2bd to
ccf33da
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Rebased onto Four conflicts, all resolved in favour of
Verified on Windows 11 / Node 24 / pnpm 12: |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 382925c1-7efe-4b4d-ac8f-0c9ec4f9eb08
📥 Commits
Reviewing files that changed from the base of the PR and between 8cd0abf and ccf33da62868656d7969087700230724a1f6b935.
📒 Files selected for processing (12)
src/cli/command-flag-help-layout.tssrc/cli/command-spec.tssrc/cli/handlers/orchestration-worker-cli.test.tssrc/cli/help.tssrc/cli/index.test.tssrc/cli/legacy-command-flag-help.tssrc/cli/specs/orchestration-flag-help.tssrc/cli/specs/orchestration-message-specs.tssrc/cli/specs/orchestration-worker-specs.tssrc/cli/specs/orchestration.test.tssrc/cli/specs/orchestration.tssrc/cli/specs/skills.test.ts
🚧 Files skipped from review as they are similar to previous changes (7)
- src/cli/command-spec.ts
- src/cli/specs/orchestration-flag-help.ts
- src/cli/index.test.ts
- src/cli/specs/orchestration-message-specs.ts
- src/cli/specs/orchestration.ts
- src/cli/help.ts
- src/cli/specs/orchestration-worker-specs.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Unpadded legacy help parsed:
resolveFlagHelpnow falls back to a single-space label pattern after the two-space split, so single-spaced legacy entries (--include-visual-layouts,--setup run|skip|inherit,--parent-worktree <selector>,--workspace-mode,--missed-run-grace-minutes) split into label + description instead of inflating the description column. - Layout tests added:
command-flag-help-layout.test.tspins the split shapes, asserts no legacy label swallows prose across every command spec, and checksterminal list/worktree createrender into a single description column. - Help assertions tightened:
index.test.ts,skills.test.ts, andorchestration-worker-cli.test.tsnarrowed\s+to[ \t]+for the dynamically-aligned output.
This resolves the prior alignment concern — verified the split behavior against all fifteen single-spaced entries in legacy-command-flag-help.ts, and ran the touched suites (command-flag-help-layout, orchestration, index, skills, orchestration-worker-cli) green locally.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
A CommandSpec can now describe its own flags through `flagHelp`. Flags it leaves out keep their description from the shared help tables, so nothing changes for commands that do not use it. Option rows are now rendered with every description starting in one column. The shared tables are still hand-padded strings, so each entry is split into label and description first. Several entries use a single space between the two (for example `--setup run|skip|inherit Setup...`); those used to print as one long label and pushed the column out. A value spec is always bracketed or alternation-separated, which is what the split relies on. Help assertions that pinned the old hand-padded spacing now match any run of spaces or tabs instead. Refs stablyai#17391
`orca orchestration <command> --help` printed most options as a bare `--flag` with no text, because the shared help tables never described the orchestration vocabulary. Each orchestration spec now carries `flagHelp` for every flag it accepts, written from what the handler does with it. `--from`, `--run` and `--dispatch-capability` share one wording through `orchestrationFlagHelp`; per-command entries override it where the flag means something narrower. Global flags and `--retry-request` stay out of the specs: they are described once in the shared flag table so every command keeps a single wording. A ratchet test fails when an orchestration flag has no spec-level description, when a spec duplicates a shared-table flag, or when a rendered option row has no description (the remote-selection flags and `--retry-request` are exempt until the shared table describes them). The send/check/reply/inbox and gate specs move to their own files to stay under the max-lines limit; spec contents and order are unchanged apart from `flagHelp`. The orchestration rows of the inline help chain in help.ts are now dead and are removed. Fixes stablyai#17391
7849492 to
0296c39
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviewed the branch after it was rebuilt onto main (de8bffe240); no incremental diff could be computed because the previous revision was not in the shallow checkout, so I re-derived the delta against the prior pullfrog review (78494921cd) and read the full PR diff. The content is functionally the same as the version already approved, restructured and reworded.
- Layout padding moved into a row formatter:
formatFlagHelpRowsnow computes the description column from described labels only, so a long bare label (--pairing-code/--environment) no longer pushes sibling descriptions right. This is a strict improvement over the inline padding it replaced. - Gate and message specs extracted: gate-create/-resolve/-list moved to
orchestration-gate-specs.tsand send/check/reply/inbox toorchestration-message-specs.ts;orchestration.tsspreads both arrays. Spec contents and order are preserved. - Shared base map narrowed:
orchestrationFlagHelpnow carries onlyfrom,run, anddispatch-capability; global flags and--retry-requestfall back to the shared table, with the ratchet refusing a spec-level duplicate. - Orchestration descriptions and notes rewritten: flag and note wording across run/task/dispatch/worker/ask/reset specs was tightened, and
identityFlagRoleswas filled in where callers had been omitted.
Verified locally: command-flag-help-layout, orchestration-flag-help, skills, and orchestration-worker-cli suites pass (23 tests), and pnpm tc:cli exits 0. All prior pullfrog threads are already resolved, and no unresolved concern anchors to the new lines.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

ELI5
orca orchestration task-create --helplisted--spec,--deps,--parentand friends with nothing after them — you had to guess what each flag means or learn it from an error. Now every orchestration flag carries a one-line description, and the description lives in the command spec itself so a new flag can't ship undescribed by accident.What Changed
Before, most options on
orca orchestration <command> --helpprinted as a bare--flagwith no description, and rows from the shared help tables were hand-padded, so descriptions started in different columns (entries written with a single space, such as--setup run|skip|inherit Setup policy…, printed as one long label).CommandSpecgains an optionalflagHelpmap. A spec can describe its own flags; flags it omits keep their description from the shared tables (FLAG_HELP_TEXT, command-scoped help), so commands that don't use it are unchanged.formatCommandHelpsplits each row into label and description and starts every description in one column. Single-spaced shared entries are split correctly: a value spec is always bracketed (<id>) or alternation-separated (run|skip|inherit).flagHelp.--retry-request, or if a rendered orchestration option row has no description.Relationship to #24194: complementary. It adds shared-table descriptions for
--environment,--pairing-code,--wait-submitand--retry-request; this PR does not describe those, and the ratchet keeps orchestration specs from duplicating them. Until it lands, the rendered-row check exempts--pairing-code,--environmentand--retry-request; whichever PR lands second can drop that exemption. Its diff applied on top of this branch passes both PRs' tests, and the new rows align in the same column.Why
For an agent driving the CLI this is not cosmetic: with only
--helpto go on, coordinators discover flag semantics by trial and error. In a 12-hour orchestration session (#17391), lanes repeatedly burned turns probing orchestration flags whose meaning the help never states. The structural cause was that help text lived in hand-maintained side tables inhelp.ts, so every new flag started undescribed; carrying the description in the spec removes the whack-a-mole.Linked Issue
Fixes #17391
Visual Proof
N/A — CLI help text; the ratchet test enumerates the coverage. Rendered
orca orchestration worker-start --helpoptions after the change (the three bare rows are left to #24194):Testing
Rebuilt on
main(de8bffe) on 2026-10-02, Windows 11, Node 24.19, pnpm 12.8:pnpm test src/cli: 1463 passed, 45 skipped, 14 failed. The same 14 tests fail on an untouchedmainon this machine (recovery-command executable resolution, client-recovery timeouts); no new failures.pnpm tc:cli: exit 0.oxlint,oxfmt --check,pnpm run check:code-quality:changed,check:max-lines-ratchet,verify:bundled-skill-guides: pass. No max-lines disable or per-file bump.pnpm buildand the fullpnpm test.AI Disclosure
Implemented by a Codex lane under my orchestration (strict TDD), reviewed and re-verified locally by me with Claude Code assistance.
Review
allowedFlagsvalidation, parsing, and RPC surfaces untouched. No wire-visible change, so no client/host compatibility concern.--agent/--terminalexclusivity note was deliberately left to the usage line where it already lives.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Author
X: @EnricoPin