Goal
Implement local AI modes and guardrails so AI review is scoped and predictable in the configured mode.
User value
Developers get local AI feedback with explicit blocking, advisory, and off behavior plus visible cost and latency guardrails.
Implementation notes
- Add
ai.mode: blocking | advisory | off.
- Keep local AI
blocking by default, with advisory and off as supported softer modes.
- Add guardrails such as
max_changed_lines, max_prompt_tokens, and timeout_seconds once their defaults are frozen.
- Respect the AI-only skip decision exposed by the documented skip-control work so deterministic checks can still run when local AI is skipped.
- Print when AI is skipped because a guardrail was reached.
- Make provider error behavior explicit for each AI mode.
Risks / tradeoffs
- A blocking default needs clear timeout, provider failure, and auth behavior to stay predictable.
- Token estimates may be approximate across providers.
Suggested priority
P1
Milestone
M3: Local AI review
TBD considerations
- Exact cost/latency guardrail defaults.
- Privacy policy for diff context, full-file context, and secret handling before AI calls.
Acceptance criteria
- Default
blocking, explicit advisory, and explicit off modes are covered by tests.
- AI-only skip keeps the deterministic layer running when the skip-control path selects it.
- Guardrail skips are visible and non-surprising.
Goal
Implement local AI modes and guardrails so AI review is scoped and predictable in the configured mode.
User value
Developers get local AI feedback with explicit blocking, advisory, and off behavior plus visible cost and latency guardrails.
Implementation notes
ai.mode: blocking | advisory | off.blockingby default, withadvisoryandoffas supported softer modes.max_changed_lines,max_prompt_tokens, andtimeout_secondsonce their defaults are frozen.Risks / tradeoffs
Suggested priority
P1
Milestone
M3: Local AI review
TBD considerations
Acceptance criteria
blocking, explicitadvisory, and explicitoffmodes are covered by tests.