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
3 changes: 3 additions & 0 deletions packages/autonav/src/cli/nav-memento.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { resolveAndCreateHarness } from "../harness/index.js";
interface MementoCommandOptions {
pr?: boolean;
maxIterations?: string;
maxReviewRounds?: string;
promise?: string;
branch?: string;
task?: string;
Expand Down Expand Up @@ -78,6 +79,7 @@ program
)
.option("--branch <name>", "Git branch name for work")
.option("--task <text>", "Task description (reads TASK.md if not provided)")
.option("--max-review-rounds <n>", "Maximum review-fix rounds per iteration (default: 10)", "10")
.option("--verbose", "Show detailed logging")
.option("--model <model>", "Model for implementer agent", "claude-haiku-4-5")
.option("--nav-model <model>", "Model for navigator agent", "claude-opus-4-5")
Expand Down Expand Up @@ -184,6 +186,7 @@ async function executeMemento(
verbose,
model: options.model,
navModel: options.navModel,
maxReviewRounds: parseInt(options.maxReviewRounds || "10", 10),
}, harness);

// Display results
Expand Down
4 changes: 2 additions & 2 deletions packages/autonav/src/memento/loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ ${truncatedDiff}
/**
* Review implementation changes (Phase 3 of the 4-phase iteration loop).
*
* Runs up to 5 review-fix cycles:
* Runs up to maxReviewRounds (default 10) review-fix cycles:
* 1. Stage changes and get diff
* 2. Ask opus to review (single-turn, no tools)
* 3. If LGTM → done
Expand All @@ -655,7 +655,7 @@ async function reviewImplementation(
verbose: boolean,
harness: Harness
): Promise<{ lgtm: boolean; fixApplied: boolean }> {
const MAX_REVIEW_ROUNDS = 5;
const MAX_REVIEW_ROUNDS = options.maxReviewRounds ?? 10;
let fixApplied = false;

for (let round = 1; round <= MAX_REVIEW_ROUNDS; round++) {
Expand Down
3 changes: 3 additions & 0 deletions packages/autonav/src/memento/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ export interface MementoOptions {

/** Show detailed logging */
verbose?: boolean;

/** Maximum review-fix rounds per iteration (default: 10) */
maxReviewRounds?: number;
}

/**
Expand Down
Loading