feat(milestone): post board link to Discussions when milestone starts execution#96
Merged
snipcodeit merged 19 commits intomainfrom Mar 1, 2026
Merged
Conversation
…ields Add docs/BOARD-SCHEMA.md documenting the full GitHub Projects v2 board field schema for MGW pipeline visibility. Defines 5 custom fields: - Status (single-select, 13 options mapping 1:1 to pipeline_stage values) - AI Agent State (text, shows active GSD agent) - Milestone (text, from project.json) - Phase (text, number + name format) - GSD Route (single-select, 4 options for all known routes) Includes GraphQL mutation templates, project.json board key schema, and board view planning for downstream issues (#72-#79). Closes #71 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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]>
…nd extend Adds sync_milestone_to_board step to mgw:project command. After issues are created (both init and extend modes), each issue is added to the GitHub Projects v2 board as an item with Milestone, Phase, and GSD Route fields set. Board item IDs are stored in project.json per issue (board_item_id field). Non-blocking: any GraphQL failure logs a warning and the pipeline continues. Sync is skipped silently when board is not configured or custom fields are not set up. Closes #73 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ions Add update_board_status shared utility (board-sync.md) and hook into issue.md and run.md stage transitions. All board updates are non-blocking — API failures never prevent pipeline execution. Reads field/option IDs from board-schema.json or project.json at runtime. Closes #74 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Add update_board_agent_state utility to board-sync.md and hook into run.md at planner/executor/verifier spawn points for both quick and plan-phase routes. Field is cleared after PR creation. All calls are non-blocking — API failures never interrupt pipeline execution. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Add sync_pr_to_board utility to workflows/board-sync.md that calls addProjectV2ItemById to add a PR as a GitHub Projects v2 board item - Hook sync_pr_to_board into run.md after PR creation (non-blocking) - Hook sync_pr_to_board into pr.md update_state step (linked mode only) - Add board_reconcile step to sync.md that iterates cross-refs and calls sync_pr_to_board for all issue→PR implements links (idempotent, non-blocking) - Add board-sync.md to execution_context of pr.md and sync.md - Pull forward board-sync.md, board.md, issue.md, and state.md from prior milestone board issues (#71-#75) as this branch is based on main Closes #76 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Add mgw:board views subcommand supporting kanban, table, and roadmap layouts. Creates GitHub Projects v2 views via GraphQL and outputs user instructions for setting group-by configuration in the GitHub UI (API limitation). Create docs/BOARD-SCHEMA.md documenting custom fields, Status options, GSD route options, and the three intended layout views with their configuration. Closes #77 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Rename table view from "All Issues" to "Triage Table — Team Planning" - Add step-by-step column configuration instructions for triage planning - Column order: Status, Milestone, Phase, GSD Route, AI Agent State - Sort by Status ascending surfaces active work at top - Update BOARD-SCHEMA.md with triage table column order and sort config - Document table view entry in project.json storage schema Closes #78 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ine grouping - Add mgw:board views roadmap subcommand — creates ROADMAP_LAYOUT view named "Roadmap — Milestone Timeline" via createProjectV2View GraphQL mutation - View dispatch updated: roadmap case delivers milestone grouping instructions and documents date field limitation (MGW uses iteration-based tracking) - Document milestone due date workaround for timeline bar rendering - Store roadmap view ID in project.json alongside kanban and table entries - Update docs/BOARD-SCHEMA.md with full roadmap view configuration reference: - Group by Milestone step-by-step UI instructions - Date field limitation explanation and gh api workaround - Updated views table and storage schema with roadmap entry - Completes the views subcommand: kanban + table + roadmap all implemented Closes #79 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
When mgw:milestone begins executing a milestone, post a GitHub Discussion in the Announcements category with milestone name, issue list (number, title, assignee, GSD route), board URL, and issue count. Falls back to a comment on the first issue if Discussions are not enabled. Hook is non-blocking — announcement failures never stop milestone execution. Implements Issue #81 (Phase 16 — Team Awareness & Assignment, v2 milestone). Changes: - lib/github.cjs: add postMilestoneStartAnnouncement() function that uses GraphQL createDiscussion mutation with Announcements category detection and graceful fallback to gh issue comment - commands/milestone.md: add post_start_hook step between rate_limit_guard and dry_run; skipped when --dry-run is set Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This was referenced Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
postMilestoneStartAnnouncement()tolib/github.cjs— posts a GitHub Discussion in the Announcements category whenmgw:milestonebegins executing, with milestone name, issue list (assignee + GSD route per issue), board URL, and total issue countpost_start_hookstep tocommands/milestone.mdthat fires once before the per-issue execute loop; skipped entirely when--dry-runis setCloses #81
Milestone Context
Changes
lib/github.cjspostMilestoneStartAnnouncement(opts)usinggh api graphqlto call thecreateDiscussionmutation targeting the Announcements category{ posted: false }returnmodule.exportscommands/milestone.md<step name="post_start_hook">inserted betweenrate_limit_guardanddry_runISSUES_PAYLOADJSON array (number, title, assignee, gsdRoute) via python3board_urlfromproject.jsonmilestone entry (set by Design and scaffold GitHub Projects v2 board with MGW custom fields #71/Add mgw:board command — create, show, and configure project board #72 work); shows_(not configured)_if absentpostMilestoneStartAnnouncementvianode -ewith environment variables for clean JSON passing|| echo/2>/dev/nullguards to ensure non-blocking behaviorTest Plan
node -e "require('./lib/github.cjs').postMilestoneStartAnnouncement"exits 0 and logsfunctionnode -e "require('./lib/index.cjs').postMilestoneStartAnnouncement"exits 0 and logsfunctionrepo: nullreturns{ posted: false, method: 'none', url: null }without throwingmgw:milestone --dry-runprintsSkipping milestone-start announcement (dry-run mode)and does not postgrep -n "post_start_hook\|rate_limit_guard\|dry_run" commands/milestone.mdshows rate_limit_guard before post_start_hook before dry_run