feat: add multi-agent workflow review stages (judge)#368
Merged
Conversation
- Add JudgeAction to pipeline OnEnter with model, inputs, require.verdict, instructions, output, continue_on_error, max_tokens, timeout - Add JudgeInput constants: issue, git_diff, test_output, files - Add executeJudgeAction() that calls LLM with constrained inputs and parses structured JSON response (verdict, summary, findings, required_fixes) - Add judge_verdict trigger type for auto-transition after judge (pass/fail) - Add autoTransitionAfterJudge() for bounded retry loops - Persist judge output as pipeline artifact for later stage reference - Inject judge results into claw chat (pass/fail with findings) - Block or continue based on required verdict and continue_on_error - Add comprehensive tests for parsing, execution, and transitions
Contributor
|
Reviews (1): Last reviewed commit: "feat: add multi-agent workflow review st..." | Re-trigger Greptile |
- Remove unused stageID parameter from executeJudgeAction - Fix fragile JSON extraction: use brace counting instead of strings.LastIndex to properly handle nested braces, escaped quotes, and trailing text - Fix P1 bug: move autoTransitionAfterJudge before require.verdict check so judge_verdict triggers always fire even when verdict doesn't match required value (enables fail->fix retry loops) - Add tests for trailing text, nested braces, and escaped quotes
Contributor
|
Reviews (2): Last reviewed commit: "fix: address greptile review comments on..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #353
Summary
Adds first-class support for model-backed review/judge stages in workflow pipelines. A judge stage can run after implementation and tests, using a different model/provider to review the work before PR creation.
Changes
Pipeline Schema (pkg/hub/pipeline/pipeline.go)
New JudgeAction in OnEnter:
New judge_verdict trigger type -- enables auto-transition after judge:
Execution Engine (pkg/hub/pipeline_runner.go)
Tests
Verification
Example Workflow
This workflow:
go test ./...on[DONE], stores output