pub enum Command {
Show 16 variants
Run {
issues: Vec<i64>,
common: Common,
loop_flags: LoopFlags,
triage_flags: TriageFlags,
plan_out: PathBuf,
no_worktrees: bool,
},
Code {
prompt: Vec<String>,
common: Common,
loop_flags: LoopFlags,
triage_flags: TriageFlags,
dry_run: bool,
file_only: bool,
plan_out: PathBuf,
no_worktrees: bool,
},
Followup {
common: Common,
loop_flags: LoopFlags,
triage_flags: TriageFlags,
file: Option<PathBuf>,
screen_only: bool,
file_only: bool,
plan_out: PathBuf,
no_worktrees: bool,
},
Triage {
issues: Vec<i64>,
common: Common,
plan_out: PathBuf,
},
Resume {
prs: Vec<i64>,
common: Common,
loop_flags: LoopFlags,
next_actor: Option<String>,
},
Checkin {
items: Vec<i64>,
common: Common,
dry_run: bool,
reply_only: bool,
any_author: bool,
again: bool,
keep_worktrees: bool,
},
Answer {
items: Vec<i64>,
common: Common,
dry_run: bool,
again: bool,
},
Review {
items: Vec<i64>,
common: Common,
dry_run: bool,
max_rounds: Option<u32>,
verdict: bool,
recheck: bool,
},
Brainstorm {
topic: Vec<String>,
common: Common,
max_rounds: Option<u32>,
ideas: usize,
out: Option<PathBuf>,
file_issues: bool,
from: Option<PathBuf>,
},
Split {
items: Vec<i64>,
common: Common,
dry_run: bool,
again: bool,
},
Listen {
items: Vec<i64>,
common: Common,
once: bool,
dry_run: bool,
since: Option<String>,
},
Post {
prs: Vec<i64>,
repo: PathBuf,
config: Option<PathBuf>,
file: Option<PathBuf>,
dry_run: bool,
},
Init {
out: PathBuf,
force: bool,
update: bool,
},
Clean {
repo: PathBuf,
config: Option<PathBuf>,
all: bool,
pr_state: bool,
},
Doctor {
config: Option<PathBuf>,
},
ScrubFilter,
}Variants§
Run
Triage the issues, then work them in dependency order.
Fields
triage_flags: TriageFlagsCode
Turn a project prompt into a detailed issue, then run it through triage and the implementation and review loop to open a pull request.
One agent reads the repository and drafts the issue. Both agents then
triage it just as they do for spar run. –limit and –min-number do
not affect the newly filed issue.
Fields
triage_flags: TriageFlagsFollowup
Work the follow-ups recorded in .spar/followups.md.
One agent reads every entry against the current checkout and rules on it: still there, already fixed, not worth it, or a duplicate. What survives is filed as an issue and worked like any other, which means both agents still triage it before anything is implemented. An entry that was filed or dropped leaves the queue and is kept in .spar/followups.done.md.
Takes no numbers: an entry has no number a person could type. –limit caps how many are taken, and –min-number does nothing here.
Fields
triage_flags: TriageFlagsTriage
Triage only. Writes the plan and touches nothing else.
Fields
Resume
Continue the review loop on existing PRs, including ones spar did not create.
Fields
Checkin
Answer the comments on a pull request, and act on the ones worth acting on.
Reads every comment somebody else left that has not been answered. Both agents judge each one. A change they both agree is right and belongs here is made, pushed, answered in its own thread, and the thread marked resolved. One they both judge wrong gets the reason and the thread is left open for you. One they disagree about is parked.
Fields
items: Vec<i64>Pull request numbers. An issue number resolves to its open PR. Omit to take every open PR, up to –limit.
Act on a comment from anyone, not only from somebody who can write to this repository.
Answer
Answer what an issue asks of you by name, and leave the rest to you.
Finds the places on the issue, its body and its comments, that mention you and have not been answered. One agent drafts an answer to each question put to you, with the code open; the other checks every one. A question of fact both agree on is answered in one comment, which mentions nobody. Anything that asks you to decide, commit, or give a view is never answered for you: it is listed, with what was found, in .spar/answers/issue-N.md. A mention is judged once.
Fields
Review
Review pull requests without changing them, including from a fork.
Both agents review independently, then rule on each other’s findings, then answer the objections. Nothing is committed, pushed, or merged.
Fields
items: Vec<i64>Pull request numbers. An issue number resolves to its open PR. Omit to take every open PR, up to –limit.
max_rounds: Option<u32>Adjudication passes. 1 is two independent reviews with no cross-checking, 2 adds it, 3 adds a rebuttal on what they dispute.
Brainstorm
Brainstorm novel ways to reach a goal, by pairing pieces that exist.
The premise is that the parts of an answer usually exist already and have not been put together. Both agents take inventory of what exists and propose independently, then each builds on or challenges what only the other proposed, then what was challenged is defended or withdrawn and both rank what is left. The session is written to a local file. With no subject, the agents read the repository and brainstorm for it.
Takes words, not numbers. –limit, –min-number, and –base do nothing here.
Fields
topic: Vec<String>The subject, in as many words as it takes. Omit to brainstorm the repository itself.
Split
Break an issue or a pull request into smaller ones.
One agent proposes the parts with the code open, the other rules on the proposal: accept, reject, or accept with named parts struck. Disagreement resolves toward not splitting.
An issue’s parts are filed as issues and the parent is rewritten into a checklist that points at them. A pull request’s parts each get their own branch and their own pull request, and the original is left open and otherwise untouched: split branches use create-only pushes, and the parent is never closed or rebased. A pull request from a fork is proposed in a comment rather than split.
It decomposes and stops. Nothing is triaged, implemented, or merged. Run
the reported child numbers next, or enable decompose_trackers and run
the issue parent.
Fields
Listen
Watch the repository and act on what happens, spending nothing while it waits.
Polls GitHub through gh for activity on pull requests spar has
reviewed, for pull requests assigned to you or awaiting your review,
and for mentions of you. A reviewed pull request gets a second look
and a verdict when your review is requested again or you are mentioned
on it, never for a push or a comment alone; a new one gets a review; a
comment on a pull request you wrote gets spar checkin; a mention of
you on an issue gets spar answer. Waiting costs no agent calls: only
a review, a second look, a check-in, or an answer does.
With numbers, watches only those issues and pull requests and exits once every one is closed. Ctrl-C stops it after the call in flight is stopped; a second Ctrl-C stops it at once.
Fields
Post
Post a review a dry run produced, without running the agents again.
spar review <pr> --dry-run saves what it produced. Read it, edit the
file if you like, then post exactly that.
Fields
Init
Detect installed agent CLIs and write a spar.toml.
On an existing config, --update appends any settings it does not
mention, which is how to pick up options added by a newer release.
Fields
Clean
Remove worktrees, branches, and state whose PR is merged or closed.
Fields
Doctor
Check prerequisites and resolve each configured agent.
ScrubFilter
Read a commit message on stdin and write the scrubbed version to stdout.
Used by git filter-branch, not by people.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand