Skip to content

feat(board): add mgw:board sync — reconcile all board items with current .mgw/ state#97

Closed
snipcodeit wants to merge 1 commit intomilestone-1from
issue/82-board-sync-reconcile
Closed

feat(board): add mgw:board sync — reconcile all board items with current .mgw/ state#97
snipcodeit wants to merge 1 commit intomilestone-1from
issue/82-board-sync-reconcile

Conversation

@snipcodeit
Copy link
Owner

Summary

  • Adds mgw:board sync as a fifth subcommand to mgw:board, enabling full board reconciliation after context resets or drift
  • Iterates all .mgw/active/*.json state files, fetches board items in a single GraphQL bulk query, adds missing issues, and updates Status/AI Agent State/Phase/Milestone fields to match local state
  • Implements diff-only writes (only changed fields are updated) and non-blocking per-item error handling with a reconciliation diff table output
  • Documents the bulk reconciliation pattern in board-sync.md Consumers table

Closes #82

Milestone Context

  • Milestone: v2 — Team Collaboration & Lifecycle Orchestration
  • Phase: 16 — Team Awareness & Assignment
  • Issue: 3 of 6 in milestone

Changes

.claude/commands/mgw/board.md

  • Updated argument-hint and description frontmatter to include sync
  • Updated <objective> block — now lists 5 subcommands with sync described
  • parse_and_validate step: added sync to usage message and case statement
  • New <step name="subcommand_sync"> process block with full reconciliation implementation:
    • Guard: board must be configured
    • Bulk GraphQL fetch of all board items via node(id: $BOARD_NODE_ID)
    • Per-issue loop: add missing items, diff Status/AI Agent State/Phase/Milestone, apply updates
    • Reconciliation diff table output with summary line
  • Added 16 sync-specific entries to <success_criteria>

.claude/commands/mgw/workflows/board-sync.md

  • Added board.md (sync) row to the Consumers table documenting the bulk reconciliation pattern

Test Plan

  • Run /mgw:board sync with no board configured → "No board configured" error
  • Run /mgw:board sync with empty .mgw/active/ → "Nothing to sync" clean exit
  • Run /mgw:board sync with active issues and a configured board → reconciliation table printed
  • Verify issues not on board are added via addProjectV2ItemById
  • Verify Status field is updated when pipeline_stage differs from board Status value
  • Verify AI Agent State is cleared when it has a stale value
  • Verify Phase field is updated from phase:* label on the issue
  • Verify Milestone field is updated from project.json milestone title lookup
  • Verify per-item errors are logged in the diff table without stopping the loop
  • Verify mgw:board usage message now includes sync in the subcommand list
  • Confirm board-sync.md Consumers table includes the board.md (sync) row

Implements `mgw:board sync` — iterates all .mgw/active/*.json state files,
fetches current board items in a single GraphQL bulk query, adds missing issues
to the board, and updates Status/AI Agent State/Phase/Milestone fields to match
local state. Prints a reconciliation diff table showing per-issue changes.

Closes #82

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@github-actions github-actions bot added the slash-commands Changes to slash command files label Mar 1, 2026
@snipcodeit snipcodeit deleted the branch milestone-1 March 1, 2026 09:24
@snipcodeit snipcodeit closed this Mar 1, 2026
@snipcodeit snipcodeit deleted the issue/82-board-sync-reconcile branch March 1, 2026 19:32
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.

1 participant