Skip to content

feat: comment-aware pipeline for MGW#40

Merged
snipcodeit merged 1 commit intomainfrom
issue/36-feat-comment-aware-pipeline
Feb 27, 2026
Merged

feat: comment-aware pipeline for MGW#40
snipcodeit merged 1 commit intomainfrom
issue/36-feat-comment-aware-pipeline

Conversation

@snipcodeit
Copy link
Owner

Summary

  • Add comment tracking to MGW pipeline so it detects new comments posted on issues between triage and execution
  • Classify comments as material (scope change), informational (no impact), or blocking (halt pipeline) using a general-purpose agent
  • Add pre-flight comment check in run.md that gates GSD execution on comment review
  • Create standalone /mgw:review command for on-demand comment classification

Closes #36

Milestone Context

  • Milestone: v1 — Pipeline Intelligence
  • Phase: 7 — Pipeline Fixes
  • Issue: 2 of 4 in milestone

Changes

  • State schema (workflows/state.md): Added triage.last_comment_count and triage.last_comment_at fields to issue state schema; added blocked as valid pipeline stage; documented comment tracking lifecycle, classification rules, and drift detection
  • Pipeline orchestrator (commands/run.md, .claude/commands/mgw/run.md): Added preflight_comment_check step between worktree creation and triage comment posting; spawns classification agent when new comments detected; handles material/informational/blocking responses
  • Triage (commands/issue.md, .claude/commands/mgw/issue.md): Added comment snapshot capture in fetch_issue step; populates last_comment_count and last_comment_at in write_state step
  • Sync (commands/sync.md, .claude/commands/mgw/sync.md): Added comment delta check in check_each step; reports unreviewed comments in sync summary
  • Review command (commands/review.md, .claude/commands/mgw/review.md): New standalone command for on-demand comment review with interactive action selection
  • GitHub patterns (workflows/github.md): Added comment count, recent comments, and last comment timestamp CLI patterns
  • GSD patterns (workflows/gsd.md): Added comment classification agent spawn template
  • Validation (workflows/validation.md): Added review.md to delegation boundary table

Test Plan

  • Verify triage.last_comment_count and triage.last_comment_at are populated when /mgw:issue runs triage on an issue with existing comments
  • Verify /mgw:run pre-flight check correctly detects new comments when count exceeds stored value
  • Verify pre-flight check skips gracefully when state file has no comment tracking fields (backward compatibility)
  • Verify blocking classification sets pipeline_stage to blocked and halts execution
  • Verify material classification enriches planner context with new requirements
  • Verify informational classification logs and continues without blocking
  • Verify /mgw:sync reports comment drift in sync summary
  • Verify /mgw:review works standalone for manual comment triage
  • Verify both commands/ and .claude/commands/mgw/ mirrors are in sync

Add comment tracking to MGW's pipeline so it detects new comments posted
on issues between triage and execution. Comments are classified as
material (scope change), informational (no impact), or blocking (halt).

State schema changes:
- Add triage.last_comment_count and triage.last_comment_at fields
- Add "blocked" as valid pipeline_stage

Pipeline changes:
- issue.md: capture comment snapshot during triage
- run.md: pre-flight comment check before GSD execution
- sync.md: include comment delta in drift detection
- review.md: standalone comment review command (new)

Workflow changes:
- state.md: document comment tracking schema and classification
- github.md: add comment-fetching CLI patterns
- gsd.md: add comment classification agent spawn pattern
- validation.md: add review.md to delegation boundary table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

slash-commands Changes to slash command files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: comment-aware pipeline — detect and react to new GitHub comments before execution

1 participant