Skip to content

Add dry-run mode for safe iteration simulation #3

@fveracoechea

Description

@fveracoechea

What to build

Add a --dry-run mode to the agent loop that simulates the full iteration lifecycle without making any actual git changes. This allows users to test their prompts, configuration, and issue tracker setup safely.

In dry-run mode, the loop should:

  • Print what worktree and branch would be created (but not create them)
  • Print what agent prompts would be sent (but not start the Opencode server)
  • Print what commits would be made (but not commit)
  • Print what merge would happen (but not merge)
  • Still gather context and list issues from the tracker so the user can verify the setup

Acceptance criteria

  • Add --dry-run CLI flag (see CLI argument parsing issue; this can be developed in parallel but will only be usable once both land).
  • When config.dryRun is true, skip all destructive git operations: createWorktree, autoCommit, mergeBranch, removeWorktree, createPR.
  • In dry-run mode, log a clear message at each skipped step (e.g., [DRY RUN] Would create worktree: ...).
  • Context gathering and issue listing from the tracker still run so the user can verify their setup.
  • The loop still signals NEXT / COMPLETE based on what the agent would have done.
  • Add tests verifying dry-run skips destructive operations and logs correctly.
  • bun lint:ci, bun typecheck, and bun test pass after changes.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions