Skip to main content

improve_command

Function improve_command 

Source
pub fn improve_command(_verbose: bool) -> Result<()>
Expand description

Run the improve command.

This command gathers context from git and previous autom8 sessions, displays a summary, and spawns an interactive Claude session for follow-up work.

The workflow is:

  1. Check if we’re in a git repo (required)
  2. Gather context (git, spec, session knowledge)
  3. Display summary to the user (including any edge case warnings)
  4. Build the context prompt
  5. Spawn interactive Claude session

Edge cases handled:

  • Not in a git repo: shows error with suggestion
  • On main/master branch: shows warning but proceeds
  • No session/spec found: shows message that only git context is available
  • No commits vs base: shows “no commits yet” in summary

§Arguments

  • _verbose - Reserved for future extensibility (currently unused)

§Returns

  • Ok(()) - Session completed
  • Err - Not in git repo, context loading failed, or Claude spawn failed