Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ Cargo.lock.bak
.DS_Store
/.idea
.pitboss/
pitboss-contributions.md
427 changes: 0 additions & 427 deletions src/cli/config.rs

This file was deleted.

26 changes: 0 additions & 26 deletions src/cli/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,32 +175,6 @@ pub fn run(workspace: impl AsRef<Path>) -> Result<()> {
Ok(())
}

/// Create the directory structure, state file, and `.gitignore` entry without
/// writing any template content files. Used by `pitboss setup`, which
/// provides its own `plan.md` and `config.toml` via the wizard.
pub(crate) fn scaffold_dirs(workspace: &Path) -> Result<()> {
fs::create_dir_all(workspace)
.with_context(|| format!("init: creating workspace {:?}", workspace))?;

let pitboss_root = workspace.join(".pitboss");
if pitboss_root.exists() && !pitboss_root.is_dir() {
anyhow::bail!(
"init: {:?} exists but is not a directory; refusing to overwrite",
pitboss_root
);
}

let mut report = Vec::new();
ensure_dir(workspace, ".pitboss/play/snapshots", &mut report)?;
ensure_dir(workspace, ".pitboss/play/logs", &mut report)?;
ensure_dir(workspace, ".pitboss/grind/prompts", &mut report)?;
ensure_dir(workspace, ".pitboss/grind/rotations", &mut report)?;
ensure_dir(workspace, ".pitboss/grind/runs", &mut report)?;
init_state_file(workspace, &mut report)?;
update_gitignore(workspace, &mut report)?;
Ok(())
}

fn write_if_missing(
workspace: &Path,
rel: &str,
Expand Down
45 changes: 1 addition & 44 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@
use anyhow::Result;
use clap::{Parser, Subcommand};

pub mod config;
pub mod exit_code;
pub mod fold;
pub mod grind;
pub mod init;
pub mod interview;
pub mod nuke;
pub mod plan;
pub mod play;
pub mod prompts;
pub mod rebuy;
pub mod start;
pub mod status;
pub mod sweep;

Expand Down Expand Up @@ -69,18 +66,12 @@ impl Cli {
match &self.command {
Command::Play { tui, .. } | Command::Rebuy { tui, .. } => *tui,
Command::Grind(args) => args.tui,
// Config and Start both run a full-screen wizard in alternate
// mode — suppress the fmt layer so tracing output doesn't corrupt
// the terminal buffer. (Start may also chain into `play --tui`,
// which keeps the same alternate-screen mode active.)
Command::Config { .. } | Command::Start => true,
Command::Init
| Command::Plan { .. }
| Command::Status
| Command::Fold { .. }
| Command::Sweep(_)
| Command::Prompts(_)
| Command::Nuke => false,
| Command::Prompts(_) => false,
}
}
}
Expand All @@ -89,28 +80,6 @@ impl Cli {
pub enum Command {
/// Scaffold a new pitboss workspace in the current directory.
Init,
/// Interactive TUI wizard for `.pitboss/config.toml`. On a fresh
/// workspace, walks the user through every config knob (models, budget,
/// sweeps, auditor, tests). On an existing workspace, opens straight to
/// a summary of current settings with an option to edit. Aliased as
/// `setup` for backwards compatibility.
#[command(alias = "setup")]
Config {
/// Accepted for backwards compatibility with `pitboss setup --force`.
/// No-op: `pitboss config` always allows re-editing an existing
/// workspace.
#[arg(long, hide = true)]
force: bool,
},
/// Universal entry point. Auto-detects whether `.pitboss/` exists:
/// without it, runs the setup wizard and prints next steps; with it,
/// opens the iteration wizard (current budget, deferred items, and
/// completed phases) and offers continue / sweep / new-plan paths.
Start,
/// Completely remove pitboss from the workspace. Deletes the
/// `.pitboss/` directory (config, plan, deferred items, state, all
/// logs) after a `y/N` confirmation. Cannot be undone.
Nuke,
/// Generate a `plan.md` for a goal using the planner agent.
Plan {
/// Free-form description of what to build.
Expand Down Expand Up @@ -219,18 +188,6 @@ pub async fn dispatch(cli: Cli) -> Result<ExitCode> {
init::run(std::env::current_dir()?)?;
Ok(ExitCode::Success)
}
Command::Config { force: _ } => {
config::run(std::env::current_dir()?).await?;
Ok(ExitCode::Success)
}
Command::Start => {
start::run(std::env::current_dir()?).await?;
Ok(ExitCode::Success)
}
Command::Nuke => {
nuke::run(std::env::current_dir()?).await?;
Ok(ExitCode::Success)
}
Command::Plan {
goal,
force,
Expand Down
141 changes: 0 additions & 141 deletions src/cli/nuke.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/cli/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ const MANIFEST_FILES: &[&str] = &[
/// READMEs we surface verbatim (truncated). Lowercase variants are tried too.
const README_FILES: &[&str] = &["README.md", "README", "README.txt", "README.rst"];

pub(crate) fn collect_repo_summary(workspace: &Path) -> Result<String> {
fn collect_repo_summary(workspace: &Path) -> Result<String> {
let mut sections: Vec<String> = Vec::new();
sections.push(format!(
"Top-level entries:\n{}",
Expand Down
Loading
Loading