Rename Inspect Command to Review · Entire
Review of the Current Implementation
Review the current implementation carefully. Is there any dead or redundant code? It feels like a big change that was iterated on for long. Can it be simplified?
Dead or Redundant Code
Yes — there's a meaningful amount of dead and redundant code. The branch shows clear signs of long iteration. I fanned out four reviewers over the feature (profile/manifest/settings, command/picker, execution/sinks, trail/bridge) and verified the high-confidence findings myself with repo-wide grep. The cleanups fall into three buckets.
1. Entirely Dead Code — Safe to Delete
| What | Location | Evidence |
|---|---|---|
multipicker.go whole file (PickAgents, buildAgentMultiSelect, ErrNoAgentsSelected) |
review/multipicker.go |
Zero callers outside its own test. Leftover from the old interactive agent-subset picker; the multi-agent path now fans out over all eligible agents. The test helper newDispatchTestDeps even takes multiPickerFn/promptForAgentFn and discards both (_ = ...). |
PromptForAgent |
review/picker.go:1144 |
Only its own definition + doc comment. Not even tested. |
trail.Store storage layer (store.go, ~490 lines: NewStore, EnsureBranch/Write/Read/List/Update + the entire/trails/v1 orphan-branch machinery) |
cmd/entire/cli/trail/store.go |
NewStore has zero callers anywhere. All trail data now flows through the API. |
TrailDetailResponse |
api/trail_types.go:100 |
Declared, never referenced — the single-trail GET is never called; lookups go through the list endpoint. |
EntireSettings.ReviewConfigFor |
- legacy
Review mapreader |settings/settings.go:378| Only its own test calls it; reads the pre-profileReviewmap that nothing consumes.selectReviewProfileexplicitly documents "no legacy fallback... intentionally no migration." | | Unused settings fieldsReviewMigrationDismissed,ReviewFixAgent|settings/settings.go:166, 107| Set/merged but never read; comments already say the flows they gated ("migration", "--fix") were removed. | | Dead write-request API fields the CLI never populates |api/trail_types.go|TrailUpdateRequest.{Branch,Base,Assignees,Priority,Type},TrailCreateRequest.{Assignees,Labels,Priority,Type},TrailCreateResponse.BranchCreated,TrailReviewCommentInput.{Status,StatusReason}— write-side structs, so unused = genuinely dead. |
2. The Biggest Single Simplification — The Dead "Prompted Synthesis" Path
Two independent reviewers flagged this, and I confirmed it: autoSynthesis is only ever set to true (cmd.go:1206). That makes an entire second code path unreachable in production:
- The
Auto: falsearms ofcomposeMultiAgentSinks(cmd.go:~1320–1355) SynthesisSink's whole!s.Autoblock (synthesis_sink.go:113-134) plusPromptYN/InputTTY/realPromptYNprompting machinery
...Collapsing SynthesisSink to the auto path alone removes ~40+ lines and a whole parallel branch.
3. Redundancy / Over-engineering Worth Tidying (Lower Priority)
- One-line passthrough wrappers kept alive mainly by their own tests:
detectScopeBaseRef→fallbackScopeRef RunReviewProfileConfigPickerreturns a map every caller discards; should return onlyerror.
Summary of Changes
Commit 48d27b1fc on review-profiles (pushed): +162 / −900 lines across 22 files (2 source files deleted entirely).
Bucket 1 — Dead Code Removed
- Deleted
multipicker.go(unused agent multi-picker) andPromptForAgent. - Deleted the
trail.Storelocal-storage layer (store.go) plus theID/Priority/Typetypes. - Removed
TrailDetailResponseand the write-request fields the CLI never sends.
Bucket 2 — Collapsed the Synthesis Path
- Confirmed
autoSynthesiswas alwaystrue, making the prompted (Auto=false) branch unreachable. - Removed
SynthesisSink.{Auto,InputTTY,PromptYN}, the legacy compose branch...
Verification: mise run fmt, mise run lint, mise run test:ci — unit + integration all green.