Skip to content

"Add pitboss start universal entry + iteration wizard#15

Merged
elicpeter merged 2 commits into
elicpeter:mainfrom
jrf227:feat/wizard-config-start-nuke
May 25, 2026
Merged

"Add pitboss start universal entry + iteration wizard#15
elicpeter merged 2 commits into
elicpeter:mainfrom
jrf227:feat/wizard-config-start-nuke

Conversation

@jrf227

@jrf227 jrf227 commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Three new top-level commands and a guided wizard:

  • pitboss start — universal entry point. Auto-detects .pitboss/; routes new users into setup +
    chains to play, existing users into an iteration wizard (continue/sweep/new-plan).
  • pitboss config (alias: setup) — multi-step config wizard with explanatory screens for each knob
    (models, budget, sweeps, auditor, tests). On an existing workspace, opens to a summary screen
    pre-populated from disk; user can save or step back through to edit. Writes an exhaustive
    self-documenting config.toml (no invisible defaults).
  • pitboss nuke — deletes .pitboss/ after y/N confirmation.

The new-plan path inside pitboss start drives an in-TUI interview (1-5 / 5-10 / 10-20 / as-many
question ranges) against the planner agent and shows the generated phase list with run/wait/terminate
options.

Why

rebuy / sweep / hand-edit deferred.md. This is purely additive — every existing command keeps its
signature and behavior.

Tests

  • 713 tests passing (was 707; +6 new for nuke, config round-trip, scroll math)
  • cargo clippy --all-targets -D warnings clean
  • cargo fmt --check clean
  • No snapshot drift in src/{prompts,tui,grind}/snapshots/

Test plan

  • cargo install --path . --force
  • pitboss config in a fresh dir → walk 6 steps → confirm .pitboss/config.toml has every section
  • pitboss start in the same dir → iteration wizard → New plan → interview → review screen → Run
  • pitboss setup (alias) still works
  • pitboss nukey deletes .pitboss/; n leaves it
  • pitboss play --dry-run unchanged from main
    EOF
    )"

  - new-user branch routes to setup
  - existing-user branch shows snapshot (budget/phases/deferred)
    with continue/sweep/new-plan paths
  - new-plan flow drives in-TUI interview + planner agent
    (questioner_ranged.txt template), shows generated phase list
    with run/wait/terminate choices
  "
@jrf227

jrf227 commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

LMK what you think

@elicpeter elicpeter requested review from Copilot and elicpeter May 24, 2026 08:19
@elicpeter elicpeter added the enhancement New feature or request label May 24, 2026
@elicpeter

Copy link
Copy Markdown
Owner

Can you fix rustdoc

Copilot AI 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.

Pull request overview

Adds a new “universal entry” workflow for Pitboss by introducing an interactive config wizard, an interactive start iteration wizard (including optional interview-driven plan generation), and a destructive nuke command to remove .pitboss/.

Changes:

  • Introduces pitboss config (alias setup) with a full-screen TUI wizard that writes an explicit, self-documenting .pitboss/config.toml and scaffolds workspace files when creating.
  • Introduces pitboss start with an iteration wizard for existing workspaces (continue/sweep/new plan), including in-TUI questioner + planner dispatch using a new ranged questioner prompt template.
  • Adds pitboss nuke to delete .pitboss/ after confirmation; enables bracketed paste mode in the terminal guard.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/tui/wizard.rs New config/setup TUI wizard for collecting configuration inputs.
src/tui/mod.rs Exposes new TUI modules and enables bracketed paste in terminal setup/restore.
src/tui/iteration.rs New iteration/new-plan TUI flow used by pitboss start for existing workspaces.
src/prompts/templates/questioner_ranged.txt New template to enforce min/max question counts for interview mode.
src/prompts/mod.rs Adds prompt renderer for questioner_ranged and includes it in template budget tests.
src/cli/start.rs Implements pitboss start flows, workspace snapshotting, and silent agent dispatch helpers.
src/cli/plan.rs Exposes collect_repo_summary for reuse by the start/iteration wizard dispatch.
src/cli/nuke.rs Implements pitboss nuke with confirmation and basic tests.
src/cli/mod.rs Wires new config, start, and nuke commands into Clap + dispatch.
src/cli/init.rs Adds scaffold_dirs helper for config wizard workspace creation.
src/cli/config.rs Implements pitboss config wizard orchestration and config/plan/deferred writers with tests.
.gitignore Ignores pitboss-contributions.md.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tui/wizard.rs
Ev::Quit => break None,
Ev::Done(r) => break Some(r),
}
}
Comment thread src/cli/config.rs
Comment on lines +170 to +177
let audit_enabled = result.audit_enabled;
let sweep_enabled = result.sweep_enabled;
let sweep_min = result.sweep_threshold.unwrap_or(5);
// Pitboss requires `trigger_min_items <= trigger_max_items` (default
// max = 8). The wizard only collects min, so when the user picks a
// threshold above 8 we lift max alongside it with a small buffer so
// the agent still has headroom to drain a few extra items per sweep.
let sweep_max = sweep_min.saturating_add(3).max(8);
Comment thread src/cli/nuke.rs Outdated
Comment thread src/cli/mod.rs
Comment on lines +105 to +109
/// Universal entry point. Auto-detects whether `.pitboss/` exists:
/// without it, runs the setup wizard and chains into `play --tui`; with
/// it, opens the iteration wizard (current budget, deferred items, and
/// completed phases) and offers continue / sweep / new-plan paths.
Start,
Comment thread src/tui/iteration.rs
Comment on lines +1158 to +1167
let inner_w = area.width.saturating_sub(2).max(1) as usize;
let inner_h = area.height.saturating_sub(2).max(1) as usize;
let total_lines = display.chars().count().div_ceil(inner_w).max(1);
let max_scroll = total_lines.saturating_sub(inner_h) as u16;
let auto_scroll = match cursor_pos {
Some(pos) => {
let cursor_line = pos / inner_w;
let min_scroll = cursor_line.saturating_sub(inner_h.saturating_sub(1)) as u16;
min_scroll.min(max_scroll)
}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@elicpeter elicpeter merged commit 9c27a16 into elicpeter:main May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants