| file_type | documentation |
|---|---|
| title | Milestone Allocation Strategy |
| category | Workflow |
This document explains how issues and pull requests are automatically allocated to version milestones in the LightSpeed .github repository.
The metadata-governance workflow automatically routes new issues and PRs to the appropriate version milestone based on their labels. This ensures consistent planning and capacity management across the release roadmap.
The metadata-governance.yml workflow activates when:
- Issues: opened, reopened, or edited
- Pull Requests: opened, reopened, edited, synchronized, or marked ready for review
The workflow executes three sequential jobs:
- Sync issue/PR metadata — Extract and normalize issue fields
- Allocate to milestone — Determine target milestone based on labels
- Check milestone capacity — Post warnings if a milestone approaches capacity
Issues are routed to milestones using a three-tier label system:
Issues labeled with any of these are assigned to v1.0 (or the configured next_milestone):
security— Security vulnerabilities or hardeningcritical-bug— Blocking defectscompliance— Regulatory or legal requirementsa11y— Accessibility compliance work
Use case: These issues block the current release and must be addressed immediately.
Issues labeled with any of these are not assigned a milestone (null):
research— Exploratory or discovery workspike— Time-boxed investigationproof-of-concept— Prototype or experimental featureenhancement— Future improvement
Use case: These are candidate work for future releases but not yet committed to a specific version.
All other issues without matching labels default to v1.0.
Use case: Generic issues (bugs, features, chores) are assigned to the next planned release.
If an issue has multiple labels:
- High-priority labels take precedence over backlog labels
- Example: an issue labeled both
securityandenhancement→ assigned to v1.0 (security wins)
Once allocated, an issue's milestone is not updated if labels change after creation. This prevents race conditions and allows deliberate milestone reassignment via GitHub's UI.
To move an issue to a different milestone:
- Open the issue on GitHub
- Click the Milestone field
- Select the target milestone
Milestones must be pre-created in GitHub. The allocation system expects these versions to exist:
| Milestone | Purpose |
|---|---|
| v1.0 | Foundation & Multi-Provider Agent Standardization |
| v1.1 | File Organization & Core Infrastructure |
| v1.2 | Documentation Consolidation & Governance |
| v1.3 | Automation Hardening & Release Safety |
| v1.4 | Testing & Quality Coverage |
| v1.5 | Advanced Features & Plugin Integration |
| v1.6 | Future/Reserve |
Milestones are managed via GitHub's web interface:
- Go to Issues → Milestones
- Click New milestone
- Enter the version title (e.g.,
v1.0) - Set an optional due date
- Click Create milestone
Note: If a milestone doesn't exist, allocation fails silently with a warning in the workflow logs.
The workflow monitors milestone capacity and posts warnings when thresholds are exceeded.
- Warn: 50+ open issues (non-excluded types)
- Error: 100+ open issues (non-excluded types)
The following issue types do not count toward capacity warnings:
chore— Maintenance, dependency updatestask— Small scoped workdocumentation— Docs and content updates
Rationale: These are typically smaller, lower-risk items and shouldn't block milestone planning.
When a milestone reaches a threshold, the workflow posts a comment on the triggering issue:
## ⚠️ Milestone Capacity Warning
⚠️ **v1.0**: Milestone 'v1.0' approaching capacity (52 >= 50 issues)
_Maintained by milestone capacity monitoring. Consider deferring lower-priority work to future milestones._
Action: Review the milestone and defer lower-priority items to v1.1 or later.
The allocation strategy is configured in .github/project-routes.yml:
milestone_strategy:
type: "version-based"
active_milestones:
- v1.0
- v1.1
- v1.2
- v1.3
- v1.4
- v1.5
- v1.6
allocation:
high_priority_labels: [security, critical-bug, compliance, a11y]
next_milestone: v1.0
backlog_labels: [research, spike, proof-of-concept, enhancement]
backlog_milestone: null
default_milestone: v1.0
capacity:
warn_threshold: 50
error_threshold: 100
exclude_types: [chore, task, documentation]To adjust the allocation strategy:
- Edit
.github/project-routes.yml - Modify
allocationorcapacitysections - Create a PR with the changes
- The workflow automatically uses the updated config on merge
.github/workflows/metadata-governance.yml— Main workflow orchestratorscripts/agents/includes/milestone-allocation.cjs— Allocation logic and label routingscripts/agents/includes/allocate-milestone.cjs— GitHub API integrationscripts/agents/includes/check-milestone-capacity.cjs— Capacity monitoring.github/project-routes.yml— Configuration
Labels are extracted from:
- GitHub issue labels — Primary source (checked first)
- Fallback: Issue type field (if available)
Capacity counts use estimated totals based on pagination:
- Fetches first 100 issues per milestone
- Calculates total pages from HTTP link headers
- Estimates total count as
page_count × 100 - Applies exclusion filter to estimate filtered count
Limitation: This estimation can over/underestimate for edge cases. For exact counts, check GitHub's issue filter UI.
Cause: Workflow failed or milestone doesn't exist.
Fix:
- Check the workflow run log (GitHub Actions → Metadata • Issues & PRs)
- Verify milestones exist in Issues → Milestones
- Check the issue's labels against the allocation rules
- Manually assign the milestone via GitHub's UI
Cause: Included issue types exceed capacity.
Fix:
- Review the milestone's issue count
- Defer lower-priority items to future milestones
- Consider adjusting thresholds in
.github/project-routes.yml
Cause: Configuration syntax error or missing labels.
Fix:
- Validate
.github/project-routes.ymlsyntax (runnpm run lint:js) - Ensure issue has the expected labels
- Check workflow logs for error messages
- Apply labels when creating issues — Allocation happens on issue open, so labels must exist at creation time
- Use high-priority labels judiciously — Only for blocking work that impacts the current release
- Use backlog labels for future work — Exploratory or enhancement issues shouldn't be assigned to a specific milestone
- Check milestone before submitting — Review the target milestone and consider capacity
- Review capacity warnings — When a milestone approaches thresholds, discuss deferral of lower-priority work
- Keep milestones current — Close completed milestones and create new versions as releases progress
- Audit label usage — Periodically review which labels trigger allocation to ensure consistency
- Communicate changes — If modifying the allocation strategy, update this doc and notify the team
- Automatic re-allocation on label changes (currently manual)
- GraphQL-based exact capacity counts (currently estimated via pagination)
- Escalation workflow for backlog items to active milestones
- Burndown and velocity charts per milestone
- Epic-based routing (future support when GitHub Projects v3 adds parent/child relations)
- Branching Strategy — How to name branches
- PR Creation Process — PR template routing
.github/project-routes.yml— Configuration source.github/workflows/metadata-governance.yml— Workflow implementation
Have questions? Ping us on GitHub! 🐙 Made with 💚 by LightSpeedWP
Have questions? Ping us on GitHub! 🐙 Made with 💚 by LightSpeedWP Contact
Have questions? Ping us on GitHub! 🐙 Made with 💚 by LightSpeedWP Contact
Have questions? Ping us on GitHub! 🐙 Made with 💚 by LightSpeedWP Contact
Have questions? Ping us on GitHub! 🐙 Made with 💚 by LightSpeedWP Contact
Have questions? Ping us on GitHub! 🐙 Made with 💚 by LightSpeedWP Contact
Have questions? Ping us on GitHub! 🐙 Made with 💚 by LightSpeedWP