Skip to content

feat: add /mgw:ask contextual question routing command#42

Merged
snipcodeit merged 2 commits intomainfrom
issue/38-feat-mgw-ask-question-routing
Feb 27, 2026
Merged

feat: add /mgw:ask contextual question routing command#42
snipcodeit merged 2 commits intomainfrom
issue/38-feat-mgw-ask-question-routing

Conversation

@snipcodeit
Copy link
Owner

Summary

  • Add /mgw:ask <question> slash command that classifies questions/observations during milestone execution into five categories: in-scope, adjacent, separate, duplicate, or out-of-scope
  • Spawns a general-purpose classification agent with full project context (milestone, all issues, active state, recent git diff) that reads code/state and returns a structured classification report
  • Offers category-specific follow-up actions: file new issue (separate), post comment on related issue (adjacent), note for backlog (out-of-scope)
  • Updates help.md with new Query command section and all four workflow consumer tables

Closes #38

Milestone Context

  • Milestone: v1 — Pipeline Intelligence
  • Phase: 8 — Query Layer
  • Issue: 4 of 4 in milestone

Changes

  • commands/ask.md — New slash command definition (question classification agent, 5 classification categories, follow-up actions)
  • .claude/commands/mgw/ask.md — Mirror of commands/ask.md
  • commands/help.md — Add Query section with /mgw:ask entry
  • .claude/commands/mgw/help.md — Mirror of commands/help.md
  • .claude/commands/mgw/workflows/gsd.md — Add question classification agent pattern, update consumers table
  • .claude/commands/mgw/workflows/validation.md — Add ask.md to delegation boundary consumers table
  • .claude/commands/mgw/workflows/state.md — Add ask.md to validate_and_load and project state consumers
  • .claude/commands/mgw/workflows/github.md — Add ask.md to issue operations and mutations consumers

Test Plan

  • Run /mgw:ask "test question" and verify classification agent spawns with full context
  • Verify project.json is loaded and milestone/issue context is passed to agent
  • Verify .mgw/active/ state files are loaded for active work context
  • Verify git diff output is included in agent context
  • Verify classification output matches one of: in-scope, adjacent, separate, duplicate, out-of-scope
  • Verify "separate" classification offers to file a new issue via gh issue create
  • Verify "adjacent" classification offers to post a comment on the related issue
  • Verify help.md shows /mgw:ask under new Query section
  • Verify commands/ask.md and .claude/commands/mgw/ask.md are identical mirrors
  • Verify delegation boundary: orchestrator reads state only, agent reads code/state

New slash command for classifying questions/observations during milestone
execution. Spawns a general-purpose agent with full project context (milestone,
issues, active state, git diff) that returns one of five classifications:
in-scope, adjacent, separate, duplicate, or out-of-scope. Offers follow-up
actions per classification (file new issue, post comment, etc.).

Closes #38

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merged consumer table entries from both ask.md (#38) and review.md (#36)
branches into unified tables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@snipcodeit snipcodeit merged commit a7db5ea into main Feb 27, 2026
@snipcodeit snipcodeit deleted the issue/38-feat-mgw-ask-question-routing branch February 27, 2026 02:24
snipcodeit pushed a commit that referenced this pull request Mar 3, 2026
… as separate mode

Revises implementation based on PR feedback:
- Keep original issue comment classification (default behavior)
- Add PR deep analysis as separate mode (--pr flag or PR URL)
- Dual-mode command handles both use cases

Usage:
  /mgw:review 42           - Review comments on issue #42
  /mgw:review 42 --pr      - Deep PR analysis on PR #42
  /mgw:review https://github.com/owner/repo/pull/42 - Deep PR review
snipcodeit pushed a commit that referenced this pull request Mar 3, 2026
… as separate mode

Revises implementation based on PR feedback:
- Keep original issue comment classification (default behavior)
- Add PR deep analysis as separate mode (--pr flag or PR URL)
- Dual-mode command handles both use cases

Usage:
  /mgw:review 42           - Review comments on issue #42
  /mgw:review 42 --pr      - Deep PR analysis on PR #42
  /mgw:review https://github.com/owner/repo/pull/42 - Deep PR review
snipcodeit pushed a commit that referenced this pull request Mar 3, 2026
… as separate mode

Revises implementation based on PR feedback:
- Keep original issue comment classification (default behavior)
- Add PR deep analysis as separate mode (--pr flag or PR URL)
- Dual-mode command handles both use cases

Usage:
  /mgw:review 42           - Review comments on issue #42
  /mgw:review 42 --pr      - Deep PR analysis on PR #42
  /mgw:review https://github.com/owner/repo/pull/42 - Deep PR review
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: /mgw:ask — contextual question routing during milestone execution

1 participant