feat(agents): add PR review closure templates#3151
Closed
stone16 wants to merge 1 commit into
Closed
Conversation
|
@stone16 is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Adds a PR review closure architecture spec and two prompt-only curated agent templates: PR Review Orchestrator and PR Review Worker. The shipped MVP lets one Multica issue own a review window while per-PR workers run in separate sessions and report four-state comment outcomes.
Why
STO-136 is about reducing human touchpoints before PRs are ready. The current GitHub integration mirrors PR metadata and check state, but not review comments, so this starts with a reversible template-based workflow that uses runtime GitHub access and one Multica issue summary instead of adding schema prematurely.
Approach
Implemented cp-01 by adding
docs/pr-review-closure-architecture.md, covering the orchestrator/worker boundary, runtime flow, data model, observability, security, alternatives, and checkpoint verification commands.Implemented cp-02 by adding prompt-only templates under
server/internal/agenttmpl/templates/. The orchestrator template owns PR discovery, one-PR-per-worker delegation, no-self-review routing, and the final summary contract. The worker template owns checkout-at-head-SHA, four-state review comment resolution, scoped fixes, and verification evidence. Rejected a first-class GitHub review-comment schema for the MVP because the existing product only mirrors PR metadata/check suites; the template path is reversible and faster to validate.How I Tested
End-to-end test case table:
server/internal/agenttmpl/loader_test.go:14server/internal/handler/squad_briefing_test.go:279server/internal/handler/squad_assign_trigger_test.go:13,server/internal/handler/squad_comment_trigger_test.go:545Verbatim test output:
Rollback Plan
Revert this PR. Blast radius is zero data integrity risk: it only adds documentation and static template JSON. Time to rollback is one revert commit.
Out of Scope