Skip to content

feat: bidirectional triage gates with AI-optimized templates#69

Merged
snipcodeit merged 5 commits intomainfrom
issue/68-bidirectional-triage-gates
Feb 27, 2026
Merged

feat: bidirectional triage gates with AI-optimized templates#69
snipcodeit merged 5 commits intomainfrom
issue/68-bidirectional-triage-gates

Conversation

@snipcodeit
Copy link
Owner

Summary

  • Add enforced triage quality gates to /mgw:issue — validity, security, and detail sufficiency gates that block execution of invalid/insecure/underspecified issues
  • Redesign GitHub issue templates (bug report, feature request) with structured fields for acceptance criteria, scope estimates, security checkboxes, and triage-optimized metadata
  • Create new architecture/refactor issue template for structural changes
  • Redesign PR template with 10 sections including milestone context, design decisions, security notes, and GSD artifacts
  • Add 7 new MGW pipeline labels (mgw:needs-info, mgw:needs-security-review, mgw:triaged, mgw:approved, mgw:discussing, mgw:in-progress, mgw:blocked) with full lifecycle management
  • Add resolution comment classification type to detect when stakeholder comments resolve previously blocked gates
  • Extend pipeline_stage enum with needs-info, needs-security-review, discussing, approved states and document stage flow diagram
  • Add --force and --security-ack override flags to /mgw:run for gate bypass with logged warnings

Closes #68

Changes

Foundation (state.md, github.md, init.md)

  • Extended pipeline_stage enum with 4 new stages + stage flow diagram
  • Added gate_result schema to triage section (status, blockers, warnings, missing_fields)
  • Added 7 MGW pipeline label definitions and remove_mgw_labels_and_apply() lifecycle function
  • Added triage gate comment template and scope proposal comment template
  • Extended init.md ensure_labels step with all 7 new labels

Templates (.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 sections
  • labeler.yml — triage-pipeline rule added

Pipeline Logic (issue.md, run.md, review.md)

  • issue.md — new evaluate_gates and post_triage_github steps for immediate feedback
  • run.md — gate validation (needs-info blocks without --force, needs-security-review without --security-ack), discussion phase for new-milestone, label lifecycle, security keyword re-triage
  • review.mdresolution classification type with re-triage prompt

Security & Performance

  • Security: Improves security posture by preventing high-security issues from executing without acknowledgment. Gate override mechanism (--force/--security-ack) logs warnings for audit trail.
  • Performance: No runtime impact — all changes are to markdown command definitions and YAML templates.

Artifacts

Artifact Path
Plan .planning/quick/2-feat-bidirectional-triage-gates-with-ai-/2-PLAN.md
Summary .planning/quick/2-feat-bidirectional-triage-gates-with-ai-/2-SUMMARY.md
Verification .planning/quick/2-feat-bidirectional-triage-gates-with-ai-/2-VERIFICATION.md

Breaking Changes

None — all changes are additive. Existing .mgw/ state files remain compatible (new fields have defaults).

Test Plan

  • Verify bug_report.yml renders in GitHub issue creation with 5 new fields
  • Verify feature_request.yml renders with required acceptance criteria field
  • Verify architecture_refactor.yml appears as new template option
  • Verify PR template has all 10 sections
  • Verify init.md creates all 7 mgw:* labels (run /mgw:init in test repo)
  • Verify issue.md evaluate_gates step blocks on validity=invalid
  • Verify run.md refuses needs-info without --force
  • Verify review.md classifies resolution-type comments correctly
  • Verify deployed copies in .claude/commands/mgw/ match source commands/

Cross-References

Stephen Miller and others added 5 commits February 27, 2026 14:20
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>
@github-actions github-actions bot added slash-commands Changes to slash command files github-config GitHub configuration changes triage-pipeline labels Feb 27, 2026
@snipcodeit snipcodeit merged commit 1689f45 into main Feb 27, 2026
1 check passed
@snipcodeit snipcodeit deleted the issue/68-bidirectional-triage-gates branch February 27, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github-config GitHub configuration changes slash-commands Changes to slash command files triage-pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: bidirectional triage gates with AI-optimized templates

1 participant