Rename the focus step and add a Custom task option · Entire
Rename the focus step and add a Custom task option
e4afce4→main·
dipree·1mo ago·1 file·+49 added/-6 removed
The first guided step sets the profile's Task (+ default skills), so it's
the review focus, not a "type": retitle "What kind of review?" →
"What should they review?".
Add "Custom… — describe your own task": picking it prompts for free-text
that becomes the crew's shared task (saved under the custom profile).
The current profile (including custom) is marked and pre-selected.
Sessions
41d7d873548eView transcript
?\
List me all the potential command combinations for review.Pi·Opus 4.8·1 step
Changes
1
cmd/entire/cli/review
Mpicker.go+49/-6
108 unmodified lines
109
110
111
112
113
113
114
115
116
117
118
119
120
121
122
8 unmodified lines
131
132
133
134
135
136
137
138
139
27 unmodified lines
167
168
169
165
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
1 unmodified line
188
189
190
173
191
192
193
194
2 unmodified lines
197
198
199
200
201
202
203
204
205
206
207
208
184
209
210
211
212
213
189
214
215
191
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
108 unmodified lines
if s != nil {
currentDefault = strings.TrimSpace(s.ReviewDefaultProfile)
}
customTask := ""
if !profileWasProvided {
pickedProfile, err := promptForSimpleReviewProfile(ctx, currentDefault)
pickedProfile, pickedTask, err := promptForReviewFocus(ctx, currentDefault)
if err != nil {
return "", settings.ReviewProfileConfig{}, err
}
profileName = pickedProfile
customTask = pickedTask
}
// Seed the flow from the existing profile (if any) so re-configuring edits
8 unmodified lines
if err != nil {
return "", settings.ReviewProfileConfig{}, err
}
if customTask != "" {
profile.Task = customTask
}
if len(profile.Agents) > 1 {
masterAgent, masterModel, err := promptForStandaloneMaster(ctx, launchable, existing)
if err != nil {
27 unmodified lines
return names
}
func promptForSimpleReviewProfile(ctx context.Context, current string) (string, error) {
// customProfileName is the profile name used when the user writes a custom
// task in the focus picker.
const customProfileName = "custom"
// reviewFocusCustomSentinel is the focus-picker option value for "write your
// own task". Distinct from real profile names.
const reviewFocusCustomSentinel = "__custom_task__"
// promptForReviewFocus asks what the crew should review. The presets set a
// named profile (task + default skills); "Custom…" lets the user write the
// shared task directly. Returns (profileName, customTask); customTask is
// non-empty only for the custom path. current pre-selects the profile being
// edited.
func promptForReviewFocus(ctx context.Context, current string) (string, string, error) {
current = strings.TrimSpace(current)
picked := DefaultProfileName
presets := []struct{ label, value string }{
1 unmodified line
{"Security — auth, injection, secrets", "security"},
{"Accessibility — keyboard, screen readers, contrast", "accessibility"},
}
options := make([]huh.Option[string], 0, len(presets))
options := make([]huh.Option[string], 0, len(presets)+1)
for _, p := range presets {
label := p.label
if p.value == current {
2 unmodified lines
}
options = append(options, huh.NewOption(label, p.value))
}
customLabel := "Custom… — describe your own task"
if current == customProfileName {
customLabel += " (current)"
picked = reviewFocusCustomSentinel
}
options = append(options, huh.NewOption(customLabel, reviewFocusCustomSentinel))
form := newAccessibleForm(huh.NewGroup(
huh.NewSelect[string]().
Title("What kind of review?").
Title("What should they review?").
Options(options...).
Value(&picked),
))
if err := form.RunWithContext(ctx); err != nil {
return "", fmt.Errorf("review profile picker: %w", err)
return "", "", fmt.Errorf("review focus picker: %w", err)
}
return picked, nil
if picked != reviewFocusCustomSentinel {
return picked, "", nil
}
task := ""
taskForm := newAccessibleForm(huh.NewGroup(
huh.NewText().
Title("Describe the review task").
Description("What should the crew look for? This becomes the shared task for every worker.").
Value(&task),
))
if err := taskForm.RunWithContext(ctx); err != nil {
return "", "", fmt.Errorf("custom task input: %w", err)
}
task = strings.TrimSpace(task)
if task == "" {
return DefaultProfileName, "", nil // empty custom task → fall back to general
}
return customProfileName, task, nil
}
// crewSlot is one worker slot in the review crew: an agent plus an optional