github-milestone-cycle-ops
Github Milestone Cycle Ops
Run portfolio planning as a GitHub execution-control system, not a static roadmap. Keep all active projects loaded with AI-ready work while preserving value-first prioritization.
Use gh CLI + GraphQL for live state and act directly in GitHub (issues, milestones, project board updates). Treat documents as control surfaces for planning and execution routing.
Operating Mode (Hard Gate)
This skill is planning_only.
Allowed actions:
- Read context from control-plane files and GitHub.
- Create/update milestones, issues, labels, and project board fields.
- Write cycle-sync outputs to control-plane write-back paths.
Disallowed actions (unless user explicitly asks in a separate build task):
- Editing source code in product repositories.
- Creating implementation PRs or committing code changes.
- Running build/test/lint as part of cycle planning.
- Performing dependency upgrades in codebases.
If a request mixes planning and implementation, this skill must do planning + GitHub alignment only, then stop with an execution handoff list.
Execution Context Model
Assume this skill may run inside an individual project repo, not inside control-plane root.
Resolve context in this order:
- Local project repo files (current working repo)
- control-plane central files at
$PORTFOLIO_ROOTwhen present - Live GitHub state
Always use control-plane central goals/priorities to align local project planning.
control-plane Context Sources
When control-plane is available, read these before finalizing a plan:
$PORTFOLIO_ROOT/projects/README.md$PORTFOLIO_ROOT/tasks.md$PORTFOLIO_ROOT/projects/<slug>/PROJECT.mdfor the current project- Latest GitHub ops report in
$PORTFOLIO_ROOT/operator/daily_notes/github-ops/ - Latest project-health snapshot in
$PORTFOLIO_ROOT/operator/daily_notes/ - Latest priority sync note in
$PORTFOLIO_ROOT/operator/daily_notes/priority-sync/
If these sources conflict, prefer live GitHub execution truth, then update both local repo planning and control-plane planning notes.
Operating Rules
- Use one shared milestone name across all repos inside a project cycle.
- Keep every active project supplied with actionable tasks so agents do not idle.
- Prioritize value and speed-to-outcome over completeness or perfect planning.
- Push back on overloading cycles; keep planned load at
70-85%of realistic capacity. - Enforce AI-ready issue quality before loading work into an active cycle.
- Use parent-first orchestration: if a control-plane parent project exists, run planning at parent level and include all child repos in one pass.
- Run a priority-intake pass before any GitHub mutations (close/retarget/create/move).
- Include full URL links for every referenced issue, PR, milestone, and board item.
- End with one unambiguous next-step contract (single recommended action first).
- If no fresh priority sync exists (older than 7 days), avoid destructive mutations and output
Priority Sync Needed.
Parent-First Scope Resolution
If control-plane exists, resolve scope like this:
- Identify current repo.
- Find matching parent project slug in
$PORTFOLIO_ROOT/projects/. - If parent exists and lists multiple repos, run against the parent project, not a single child repo.
- Apply one milestone plan across all repos in that parent project.
- Only break parent-first mode if the child repo has an explicitly independent milestone charter documented in control-plane.
Example:
project-alpha-weborproject-alpha-apicontext -> run on parentproject-alpha.project-beta-weborproject-beta-apicontext -> run on parentproject-beta.
Workflow
-2) Mode Lock (Mandatory)
- Set run mode to
planning_only. - Confirm no source-code edits will be performed.
- Restrict all mutations to GitHub planning surfaces + control-plane write-back files.
- If the task drifts toward coding, stop and return to milestone/issue/board operations.
-1) Priority Sync (Mandatory)
- Load latest priority sync artifact using references/priority-sync-template.md:
- human priorities per project
- AI priorities per project
- explicit decision outcomes when priorities conflict
- Treat this artifact as hard guidance for cycle loading and issue ordering.
- Parse
Execution Overridesand apply them before general backlog heuristics. - If an override references a specific issue/PR URL, make it the first candidate in
Next Step (Do This Now)unless blocked. - Freshness rule:
- fresh: created within last 7 days
- stale: older than 7 days
- If stale or missing:
- interactive run: request/update priority sync first
- non-interactive run: continue in conservative mode, do not close issues/PRs, and emit
Priority Sync Needed
0) Priority Intake (Mandatory)
- Capture project priorities before execution:
- top 1-3 outcomes for this cycle
- constraints/non-goals
- risk tolerance and speed preference
- If interactive run, ask for missing priorities first.
- If non-interactive automation, infer from:
- latest priority sync note in
operator/daily_notes/priority-sync/ $PORTFOLIO_ROOT/tasks.md- project
PROJECT.md - latest GitHub ops + project-health notes
- latest priority sync note in
- If priorities are still unclear, switch to plan-only mode and output
Priority Questionsinstead of mutating GitHub.
1) Build Live Context
- Resolve execution scope:
- current repo scope
- parent project scope in control-plane (preferred when available)
- linked repos in same parent project
- control-plane project slug mapping
- Pull GitHub state for each repo:
- open issues
- open PRs
- oldest stale issues
- milestone progress
AgentandNeeds-Speclabel counts
- Pull current GitHub project board columns/status totals and identify bottlenecks.
- If business/technical uncertainty is high, run focused web/product research with $agent-browser before planning.
Use references/github-commands.md for deterministic command patterns.
2) Define Current + Next Milestone
- Keep exactly two planning horizons visible:
Current milestone: execution nowNext milestone: pre-shaped queue for immediate handoff
- For multi-repo projects, apply the same milestone title + due date across all repos.
- Write milestone DoD as outcome statements, not task lists.
- Validate each milestone against:
- measurable business or delivery value
- feasibility in one cycle
- dependency clarity
Use references/milestone-patterns.md for naming and DoD standards.
3) Shape Backlog Into AI-Ready Issues
Before loading work into a cycle, each issue must include:
- Problem statement and target outcome
- Acceptance criteria (testable)
- Scope guardrails (what not to do)
- Dependencies and blockers
- Effort hint (
XS/S/M/L) and impact (H/M/L) - Owner mode (
Agent,Human, orHybrid)
Use references/issue-spec.md for the exact template.
4) Compute Cycle Load
- Estimate available capacity (human + agent) for the cycle.
- Reserve
15-30%slack for interrupts, reviews, and integration overhead. - Cap planned load to
70-85%of realistic capacity. - Balance load using:
60%core value delivery (revenue/users/critical ship)30%enabling work (automation, reliability, debt blocking velocity)10%optional bets (R&D/opportunity pull)
- Keep minimum flow for every active project:
- at least 1 milestone-critical issue in progress
- at least 2 AI-ready issues queued next
Use references/cycle-load-model.md for sizing heuristics.
5) Sync GitHub System-of-Execution
- Create/update milestones across all repos in scope.
- Create/update issues and attach the correct milestone.
- Apply labels to enforce execution routing:
Agentfor autonomous workNeeds-Specfor unclear scopeBlockedwhen waiting dependencies exist
- Ensure project board status reflects true execution state.
- Close or re-scope stale issues that no longer match current milestones.
6) Output the Plan and Action List
Always produce:
- Milestone summary:
- current milestone name, target, DoD
- next milestone name, target, DoD
- Cycle load table:
- total capacity
- planned load
- slack
- load split (
60/30/10)
- GitHub actions executed:
- milestones created/updated
- issues created/updated
- board updates
- Immediate next actions (top 5) with owner mode and due dates.
- Priority alignment summary:
- human priorities used
- AI priorities used
- resolved conflicts
- priority sync file path + date
Formatting requirements:
- Add full links for all items, for example:
https://github.com/<owner>/<repo>/issues/<n>https://github.com/<owner>/<repo>/pull/<n>https://github.com/<owner>/<repo>/milestone/<n>
- Use absolute dates (
YYYY-MM-DD) for due/target fields. - Avoid vague “next step” text; use the contract below.
Required final section:
Next Step (Do This Now) with:
Action(single action only)Why now(one sentence, value + unblock)Target link(one primary issue/PR URL)Execution checklist(3-6 concrete steps)Done when(testable acceptance)Owner mode(Agent|Human|Hybrid)ETA(for example60-90 minutes)Fallback(what to do if blocked)
After producing output, write run results to control-plane using the contract in references/control-plane-writeback.md.
Mandatory Write-Back
When control-plane exists, write:
- Markdown report:
$PORTFOLIO_ROOT/operator/daily_notes/project-cycle-sync/<YYYY-MM-DD>-<project-slug>-milestone-cycle-sync.md
- JSON report:
$PORTFOLIO_ROOT/operator/daily_notes/project-cycle-sync/<YYYY-MM-DD>-<project-slug>-milestone-cycle-sync.json
Include:
- Current + next milestone and DoD
- Cycle load and slack
- GitHub changes made
- Top risks and blockers
- Next 5 actions
If control-plane path is unavailable, write the same files under:
<repo-root>/.codex/reports/milestone-cycle-sync/
Quality Gates
Do not mark a planning pass complete if any of these are true:
- Active project has no clear current milestone DoD.
- Active project has fewer than 3 AI-ready issues.
- Milestone load exceeds
85%of realistic capacity. - Multi-repo project has inconsistent milestone names/dates across repos.
- Project board has stale status (issue state conflicts with board state).
- Any product source file was edited during the run.
Escalation and Pushback
Challenge non-optimal instructions when they reduce delivery speed or quality. Offer a better option with reasoned tradeoffs, then proceed with the best viable plan.
Examples:
- If asked to load too much work in one cycle, reduce load and preserve slack.
- If asked to keep vague issues in active milestones, move them to
Needs-Spec. - If asked to focus only one project while others have no queued tasks, create thin-slice queues for each active project to avoid agent idle time.