feat: bidirectional triage gates with AI-optimized templates#69
Merged
snipcodeit merged 5 commits intomainfrom Feb 27, 2026
Merged
feat: bidirectional triage gates with AI-optimized templates#69snipcodeit merged 5 commits intomainfrom
snipcodeit merged 5 commits intomainfrom
Conversation
Plan covers 3 tasks across 15 files: - Task 1: State schema extension, label lifecycle ops, init bootstrapper - Task 2: GitHub issue/PR template redesign + architecture_refactor.yml - Task 3: Triage gates in issue.md, pipeline validation in run.md, resolution classification in review.md, deployed copy sync Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e comment templates - Add needs-info, needs-security-review, discussing, approved, failed, blocked to pipeline_stage enum - Add gate_result object to triage schema (status, blockers, warnings, missing_fields) - Add Stage Flow Diagram section to state.md showing all stage transitions - Add Label Lifecycle Operations section to github.md with 7 MGW pipeline labels - Add remove_mgw_labels_and_apply bash function - Add Gate Blocked, Gate Passed, and Scope Proposal comment templates to github.md - Add 7 mgw:* label creation commands to init.md ensure_labels step - Update init.md report and success_criteria for new labels - Sync commands/init.md to .claude/commands/mgw/init.md
…imized fields - Add 5 new fields to bug_report.yml: acceptance-criteria, scope-estimate, security-impact, whats-involved, related-issues - Add 7 new fields to feature_request.yml: acceptance-criteria (required), scope-estimate, priority, security-impact, whats-involved, non-functional, related-issues - Create new architecture_refactor.yml template with: bluf, current-state, target-state, migration-strategy, risk-areas, breaking-changes, acceptance-criteria, scope-estimate, whats-involved, related-issues - Redesign PULL_REQUEST_TEMPLATE.md with 10 sections: Summary, Milestone Context, Changes, Design Decisions, Security and Performance, Artifacts, Breaking Changes, Test Plan, Cross-References, Checklist - Add triage-pipeline labeler rule covering issue.md, run.md, review.md, state.md, github.md
…ution classification - Add evaluate_gates step to issue.md evaluating validity, security, and detail sufficiency gates - Add post_triage_github step to issue.md posting immediate triage feedback (blocked or passed comment) - Update present_report in issue.md to display gate results with override/wait/reject options - Update write_state in issue.md to store gate_result and set pipeline_stage from gate outcome - Update offer_next in issue.md to handle wait/override/accepted flows - Add needs-info gate check to run.md validate_and_load (blocks without --force) - Add needs-security-review gate check to run.md validate_and_load (blocks without --security-ack) - Apply mgw:in-progress label in run.md create_worktree after worktree creation - Add security keyword detection in run.md preflight_comment_check for material comments - Apply mgw:blocked label in run.md when blocking comments detected - Change run.md post_triage_update to work-starting (triage comment now in issue.md) - Add discussion phase trigger in run.md execute_gsd_milestone for new-milestone route - Remove mgw:in-progress label in run.md cleanup_and_complete - Add resolution classification type to review.md with re-triage prompt - Update review.md output_format JSON to include resolved_blocker field - Sync all 3 source commands to .claude/commands/mgw/ deployed copies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 tasks
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
/mgw:issue— validity, security, and detail sufficiency gates that block execution of invalid/insecure/underspecified issuesmgw:needs-info,mgw:needs-security-review,mgw:triaged,mgw:approved,mgw:discussing,mgw:in-progress,mgw:blocked) with full lifecycle managementresolutioncomment classification type to detect when stakeholder comments resolve previously blocked gatesneeds-info,needs-security-review,discussing,approvedstates and document stage flow diagram--forceand--security-ackoverride flags to/mgw:runfor gate bypass with logged warningsCloses #68
Changes
Foundation (state.md, github.md, init.md)
pipeline_stageenum with 4 new stages + stage flow diagramgate_resultschema to triage section (status, blockers, warnings, missing_fields)remove_mgw_labels_and_apply()lifecycle functionensure_labelsstep with all 7 new labelsTemplates (.github/)
bug_report.yml— 5 new fields (acceptance criteria, scope estimate, security checkboxes, what's involved, related issues)feature_request.yml— 7 new fields (acceptance criteria required, scope, priority, security, what's involved, non-functional, related issues)architecture_refactor.yml— NEW template with 10 fields (BLUF, current/target state, migration strategy, risk areas, etc.)PULL_REQUEST_TEMPLATE.md— full redesign with 10 sectionslabeler.yml— triage-pipeline rule addedPipeline Logic (issue.md, run.md, review.md)
issue.md— newevaluate_gatesandpost_triage_githubsteps for immediate feedbackrun.md— gate validation (needs-info blocks without--force, needs-security-review without--security-ack), discussion phase for new-milestone, label lifecycle, security keyword re-triagereview.md—resolutionclassification type with re-triage promptSecurity & Performance
--force/--security-ack) logs warnings for audit trail.Artifacts
.planning/quick/2-feat-bidirectional-triage-gates-with-ai-/2-PLAN.md.planning/quick/2-feat-bidirectional-triage-gates-with-ai-/2-SUMMARY.md.planning/quick/2-feat-bidirectional-triage-gates-with-ai-/2-VERIFICATION.mdBreaking Changes
None — all changes are additive. Existing
.mgw/state files remain compatible (new fields have defaults).Test Plan
bug_report.ymlrenders in GitHub issue creation with 5 new fieldsfeature_request.ymlrenders with required acceptance criteria fieldarchitecture_refactor.ymlappears as new template optioninit.mdcreates all 7mgw:*labels (run/mgw:initin test repo)issue.mdevaluate_gatesstep blocks on validity=invalidrun.mdrefuses needs-info without--forcereview.mdclassifies resolution-type comments correctly.claude/commands/mgw/match sourcecommands/Cross-References