Skip to content

feat(framework): drive the domain preset loop as the review phase (#252)#262

Merged
suleimansh merged 1 commit into
mainfrom
feat/domain-loop-review-phase
Jul 5, 2026
Merged

feat(framework): drive the domain preset loop as the review phase (#252)#262
suleimansh merged 1 commit into
mainfrom
feat/domain-loop-review-phase

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #252. Part of #204 (Open Loop). Implements the direction Rom agreed on the issue: presets own the review loop, keep architect/build/deploy as the spine.

When a run has a domain preset, its loop now REPLACES the built-in production-grade checklist. Each checklist pass dispatches a major-change event through the preset driver-backed loop, so its review chain (code review, test coverage, security review) fires through the wrapped agent, and Bootstrap pass/improve/maxPasses gates on the union of the { blockers } verdicts. A preset with no loop for the build event falls back to the built-in checklist, so a run is never left unreviewed.

  • New domainLoopChecklist(loop, {kind?, fallback?}) + verdictFromLoopRun in steps.ts.
  • run.ts uses the domain loop as the reviewer when a preset is present (serve gate still unions in).
  • The shipped Software Development review prompts now end with a { blockers } verdict so the loop actually gates.

Verified:

  • Unit: domainLoopChecklist unions blockers, falls back when no loop matches, surfaces a failed review as a blocker.
  • Integration (real Bootstrap + LoopEngine + driver): a preset loop clears in 1 pass; a blocking review -> improve -> clears in 2 passes.
  • Smoke (--fake --preset software-development): the review chain drives the checklist, flags "No authentication...", improve runs, pass 2 clears -> production-grade, no crash.

Typecheck + framework 118 + ai-autopilot 316 tests green. Changeset minor (both packages).

Follow-up (separate): a bug-fix event path, and letting a preset choose the build event kind.

@suleimansh suleimansh added enhancement New feature or request priority: high Should be addressed soon labels Jul 5, 2026
@suleimansh suleimansh self-assigned this Jul 5, 2026
@suleimansh suleimansh merged commit 8c3e7d0 into main Jul 5, 2026
2 checks passed
@suleimansh suleimansh deleted the feat/domain-loop-review-phase branch July 5, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: high Should be addressed soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open Loop: drive the domain loop as a run phase

1 participant