GitHub Agentic Workflows

ResearchPlanAssignOps

ResearchPlanAssignOps is a four-phase development pattern that moves from automated discovery to merged code with human control at every decision point. A research agent surfaces insights, a planning agent converts them into actionable issues, a coding agent implements the work by assigning issues to GitHub Copilot, and a human reviews and merges.

flowchart LR
    research([Research]) --> plan[Plan issues]
    plan --> assign[Assign to Copilot]
    assign --> merge[Review & merge]

Each phase produces a concrete artifact consumed by the next, and every transition is a human checkpoint.

A scheduled workflow investigates the codebase from a specific angle and publishes its findings as a GitHub discussion. The discussion is the contract between the research phase and everything that follows—it contains the analysis, recommendations, and context a planner needs.

The go-fan workflow is a live example: it runs each weekday, picks one Go dependency, compares current usage against upstream best practices, and creates a [go-fan] discussion under the audits category.

---
name: Go Fan
on:
schedule: daily on weekdays
workflow_dispatch:
engine: claude
safe-outputs:
create-discussion:
title-prefix: "[go-fan] "
category: "audits"
max: 1
close-older-discussions: true
tools:
cache-memory: true
github:
toolsets: [default]
---
Analyze today's Go dependency. Compare current usage in this
repository against upstream best practices and recent releases.
Save a summary to scratchpad/mods/ and create a discussion
with findings and improvement recommendations.

The research agent uses cache-memory to track which modules have been reviewed so it rotates through them systematically across runs.

After reading the research discussion, a developer triggers the /plan command on it. The plan workflow reads the discussion, extracts concrete work items, and creates up to five sub-issues grouped under a parent tracking issue.

/plan focus on the quick wins and API simplifications

The planner formats each sub-issue for a coding agent: a clear objective, the files to touch, step-by-step implementation guidance, and acceptance criteria. Issues are tagged [plan] and ai-generated.

[!TIP] The /plan command accepts inline guidance. Steer it toward high-priority findings or away from lower-priority ones before it generates issues.

With well-scoped issues in hand, the developer assigns them to Copilot for automated implementation. Copilot opens a pull request and posts progress updates as it works.

Issues can be assigned individually through the GitHub UI, or pre-assigned in bulk via an orchestrator workflow:

---
name: Auto-assign plan issues to Copilot
on:
issues:
types: [labeled]
engine: copilot
safe-outputs:
assign-to-user:
target: "*"
add-comment:
target: "*"
---
When an issue is labeled `plan` and has no assignee,
assign it to Copilot and add a comment indicating
automated assignment.

For multi-issue plans, assignments can run in parallel—Copilot works independently on each issue and opens separate PRs.

Copilot’s pull request is reviewed by a human maintainer. The maintainer checks correctness, runs tests, and merges. The tracking issue created in Phase 2 closes automatically when all sub-issues are resolved.

A full cycle driven by go-fan:

  • Monday 7 AMgo-fan posts a discussion “[go-fan] Go Module Review: spf13/cobra” recommending context propagation via cobra’s SetContext and shared setup via PersistentPreRunE.
  • Monday afternoon — A developer types /plan on the discussion. The planner opens a [plan] cobra improvements tracking issue with three sub-issues (context propagation, PersistentPreRunE refactor, cancellation tests), then assigns the first two to Copilot, which opens PRs within minutes.
  • Tuesday — The developer reviews the PRs, requests one minor change, and merges both. The tracking issue closes automatically.

The Phase 1 example already shows the core research config (create-discussion with close-older-discussions: true, plus cache-memory). Two more safe-output knobs shape the later phases.

group: true creates the parent tracking issue automatically—do not create it manually:

safe-outputs:
create-issue:
expires: 2d
title-prefix: "[plan] "
labels: [plan, ai-generated]
max: 5
group: true

When research produces self-contained, well-scoped issues, assign directly and skip the manual plan phase—as duplicate-code-detector does for narrow duplication fixes:

safe-outputs:
create-issue:
title-prefix: "[fix] "
labels: [ai-generated]
assignees: copilot

Adapt the pattern by varying the research focus (static analysis, performance, documentation quality, security, code duplication, test coverage), the frequency (daily, weekly, on-demand), the report format (discussions for open-ended findings, issues for self-contained tasks), and the assignment method (pre-assign in the research workflow, bulk-assign via an orchestrator, or assign individually through the GitHub UI).

The multi-phase approach takes longer than direct execution and requires developers to review research reports and generated issues. Research agents may surface findings that don’t require action (false positives), and each phase transition needs clear handoffs. Research agents often require specialized MCPs (Serena, Tavily, etc.) for deeper analysis.

This pattern fits when:

  • The scope of work is unknown until analysis runs
  • Issues need human prioritization before implementation
  • Research findings vary in quality (some runs find nothing actionable)
  • Multiple work items can be executed in parallel

Prefer a simpler pattern when:

  • The work is already well-defined (use IssueOps)
  • Issues can go directly to Copilot without review (use the assignees: copilot shortcut in your research workflow)
  • Work spans multiple repositories (use MultiRepoOps)
PhaseWorkflowDescription
Researchgo-fanDaily Go dependency analysis with best-practice comparison
Researchcopilot-cli-deep-researchWeekly analysis of Copilot CLI feature usage
Researchstatic-analysis-reportDaily security scan with clustered findings
Researchduplicate-code-detectorDaily semantic duplication analysis (auto-assigns)
Planplan/plan slash command—converts issues or discussions into sub-issues
AssignGitHub UI / workflowAssign issues to Copilot for automated PR creation