Skip to content

feat(board): add mgw:board command for project board management#87

Merged
snipcodeit merged 1 commit intomainfrom
issue/72-add-mgwboard-command-create-show-a
Mar 1, 2026
Merged

feat(board): add mgw:board command for project board management#87
snipcodeit merged 1 commit intomainfrom
issue/72-add-mgwboard-command-create-show-a

Conversation

@snipcodeit
Copy link
Owner

Summary

  • Add new /mgw:board command with create, show, and configure subcommands
  • Integrates with GitHub Projects v2 GraphQL API to manage board creation and field schema
  • Uses board schema from Design and scaffold GitHub Projects v2 board with MGW custom fields #71 (docs/BOARD-SCHEMA.md) — 5 custom fields with pipeline_stage mapping
  • Stores board node_id, field IDs, and option IDs in project.json for downstream commands

Closes #72

Milestone Context

Changes

  • New: .claude/commands/mgw/board.md — full board command implementation

mgw:board create (idempotent)

  • Resolves owner node ID via GraphQL (user + org fallback)
  • Creates GitHub Projects v2 board via createProjectV2 mutation
  • Creates 5 custom fields: Status (13 SINGLE_SELECT options), AI Agent State (TEXT), Milestone (TEXT), Phase (TEXT), GSD Route (4 SINGLE_SELECT options)
  • Status options map 1:1 to all pipeline_stage values
  • Stores board number, URL, node_id, field IDs, and option IDs in project.json under project.project_board.fields
  • Exits cleanly if board already configured (no duplicate creation)

mgw:board show

  • Displays board URL, node ID, and field IDs with types
  • Fetches live board items from GitHub via GraphQL
  • Groups items by Status field value in pipeline order
  • Handles empty boards with helpful next-step message
  • Falls back to org query if user query fails

mgw:board configure

  • Fetches current field state from GitHub
  • Compares all fields against canonical schema from docs/BOARD-SCHEMA.md
  • Reports missing Status options, GSD Route options, and text fields
  • Explains GitHub Projects v2 API limitation on modifying existing single-select options

Test Plan

  • /mgw:board create creates board and stores in project.json (run once, verify project.json updated)
  • /mgw:board create (run again) exits cleanly with existing board URL — idempotency confirmed
  • /mgw:board show displays board URL, field list, and items grouped by Status
  • /mgw:board show on empty board shows "No items" with helpful next-step
  • /mgw:board configure fetches field state and reports schema comparison
  • GraphQL mutations match patterns from docs/BOARD-SCHEMA.md (Design and scaffold GitHub Projects v2 board with MGW custom fields #71)
  • project.json updated with node_id, field IDs, option IDs under project.project_board.fields
  • Error if no project.json (clear message to run /mgw:project first)
  • Error if board not configured for show/configure (clear message to run create)

Implement new /mgw:board command with three subcommands:
- create: idempotent board creation with 5 custom fields via GraphQL
- show: display board state with items grouped by Status field
- configure: compare field options against canonical schema

Custom fields follow board schema from #71 (docs/BOARD-SCHEMA.md):
- Status (SINGLE_SELECT, 13 options mapping 1:1 to pipeline_stage)
- AI Agent State (TEXT, updated during GSD execution)
- Milestone (TEXT, from project.json milestone name)
- Phase (TEXT, phase number + name format)
- GSD Route (SINGLE_SELECT, 4 options for all known routes)

Board metadata (node_id, field IDs, option IDs) stored in
project.json under project.project_board.fields for downstream
commands to read without re-querying GitHub.

Closes #72

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.

Add mgw:board command — create, show, and configure project board

1 participant