Extract review-merge-pr workflow from monolithic LLM project skill #334

Closed
opened 2026-07-07 02:25:31 -05:00 by jcwalker3 · 2 comments
Owner

Part of #333.

Problem

PR review/merge rules currently live inside the monolithic skills/llm-project-workflow/SKILL.md and scattered templates (templates/review-pr.md, templates/merge-pr.md, templates/worktree-cleanup.md). The combined prompt is too large to paste safely and mixes reviewer gates with author/issue-creation rules.

Reviewers need a single durable workflow file they can load before any PR mutation.

Required behavior

Extract reviewer-only rules into:

  • skills/llm-project-workflow/workflows/review-merge-pr.md
  • skills/llm-project-workflow/schemas/review-merge-final-report.md

SKILL.md should route review/merge tasks to review-merge-pr.md instead of inlining the full rulebook.

review-merge-pr.md must include

  • Identity/profile/runtime/capability gates (gitea-reviewer, not author)
  • Author safety (no self-review/self-merge)
  • Main checkout rule (orchestration only; validation under branches/)
  • Complete PR inventory with pagination proof
  • Queue ordering and skip justification rules
  • Already-landed PR gate and reconciliation redirect
  • Worktree safety (scripts/worktree-review, dirty-worktree stop)
  • Pinned head SHA before review/merge mutations
  • Validation, diff review, scope, security, linked-issue checks
  • Dry-run → mark final decision → submit review → verify visible verdict
  • Merge preflight (head SHA, mergeable, approval visible, no blocking REQUEST_CHANGES)
  • Post-merge cleanup rules
  • Recovery handoff requirements on blocked runs
  • Hard walls: no issue creation, no code edits, no author mutations, no raw MCP repair

review-merge-final-report.md must include

  • Reviewer controller handoff schema with precise mutation categories
  • Required proof fields from recent validator issues (#311, #314, #317, #320, #323, #330)
  • Mode declaration: review-merge-pr

Out of scope

  • create-issue.md extraction (#333 sibling)
  • work-issue.md extraction (#333 sibling)
  • Runtime MCP code changes unless needed for workflow retrieval tests

Acceptance criteria

  • workflows/review-merge-pr.md exists and is self-contained for a full review/merge run.
  • schemas/review-merge-final-report.md exists and matches reviewer handoff requirements.
  • SKILL.md routes review/merge tasks to the extracted workflow; reviewer rules removed or replaced with links.
  • templates/review-pr.md and templates/merge-pr.md reference the extracted workflow instead of duplicating rules.
  • Existing reviewer prompt hard walls are preserved verbatim or by reference.
  • Tests or verifier coverage reject review reports that did not load review-merge-pr.md.
  • Tests or verifier coverage reject author/create-issue schema fields in review-mode final reports.

Related

  • #333 — parent split
  • #296 — canonical PR review/merge prompt exposure
  • #327 — final-report validator rules
Part of #333. ## Problem PR review/merge rules currently live inside the monolithic `skills/llm-project-workflow/SKILL.md` and scattered templates (`templates/review-pr.md`, `templates/merge-pr.md`, `templates/worktree-cleanup.md`). The combined prompt is too large to paste safely and mixes reviewer gates with author/issue-creation rules. Reviewers need a single durable workflow file they can load before any PR mutation. ## Required behavior Extract reviewer-only rules into: - `skills/llm-project-workflow/workflows/review-merge-pr.md` - `skills/llm-project-workflow/schemas/review-merge-final-report.md` `SKILL.md` should route review/merge tasks to `review-merge-pr.md` instead of inlining the full rulebook. ### `review-merge-pr.md` must include - Identity/profile/runtime/capability gates (`gitea-reviewer`, not author) - Author safety (no self-review/self-merge) - Main checkout rule (orchestration only; validation under `branches/`) - Complete PR inventory with pagination proof - Queue ordering and skip justification rules - Already-landed PR gate and reconciliation redirect - Worktree safety (`scripts/worktree-review`, dirty-worktree stop) - Pinned head SHA before review/merge mutations - Validation, diff review, scope, security, linked-issue checks - Dry-run → mark final decision → submit review → verify visible verdict - Merge preflight (head SHA, mergeable, approval visible, no blocking REQUEST_CHANGES) - Post-merge cleanup rules - Recovery handoff requirements on blocked runs - Hard walls: no issue creation, no code edits, no author mutations, no raw MCP repair ### `review-merge-final-report.md` must include - Reviewer controller handoff schema with precise mutation categories - Required proof fields from recent validator issues (#311, #314, #317, #320, #323, #330) - Mode declaration: `review-merge-pr` ## Out of scope - `create-issue.md` extraction (#333 sibling) - `work-issue.md` extraction (#333 sibling) - Runtime MCP code changes unless needed for workflow retrieval tests ## Acceptance criteria - [ ] `workflows/review-merge-pr.md` exists and is self-contained for a full review/merge run. - [ ] `schemas/review-merge-final-report.md` exists and matches reviewer handoff requirements. - [ ] `SKILL.md` routes review/merge tasks to the extracted workflow; reviewer rules removed or replaced with links. - [ ] `templates/review-pr.md` and `templates/merge-pr.md` reference the extracted workflow instead of duplicating rules. - [ ] Existing reviewer prompt hard walls are preserved verbatim or by reference. - [ ] Tests or verifier coverage reject review reports that did not load `review-merge-pr.md`. - [ ] Tests or verifier coverage reject author/create-issue schema fields in review-mode final reports. ## Related - #333 — parent split - #296 — canonical PR review/merge prompt exposure - #327 — final-report validator rules
jcwalker3 added the status:in-progress label 2026-07-07 02:31:26 -05:00
Author
Owner

Implementation PR opened: #335

Branch: feat/issue-334-review-merge-workflow-extract
Worktree: branches/feat-issue-334-review-merge-workflow-extract

Delivered:

  • workflows/review-merge-pr.md
  • schemas/review-merge-final-report.md
  • SKILL.md task-mode router (§F/§G → links)
  • Template updates + tests/test_llm_workflow_split.py
Implementation PR opened: #335 Branch: `feat/issue-334-review-merge-workflow-extract` Worktree: `branches/feat-issue-334-review-merge-workflow-extract` Delivered: - `workflows/review-merge-pr.md` - `schemas/review-merge-final-report.md` - SKILL.md task-mode router (§F/§G → links) - Template updates + `tests/test_llm_workflow_split.py`
Author
Owner

Updated PR #335: replaced summary workflows/review-merge-pr.md with full canonical §0–§38 prompt. schemas/review-merge-final-report.md now matches §37 controller handoff field list.

Updated PR #335: replaced summary `workflows/review-merge-pr.md` with full canonical §0–§38 prompt. `schemas/review-merge-final-report.md` now matches §37 controller handoff field list.
sysadmin removed the status:in-progress label 2026-07-07 03:57:21 -05:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#334