Skip to content

Add /plan workflow for breaking down complex issues into sub-tasks#527

Merged
Mossaka merged 3 commits into
mainfrom
copilot/add-agentic-workflow-plan
Nov 12, 2025
Merged

Add /plan workflow for breaking down complex issues into sub-tasks#527
Mossaka merged 3 commits into
mainfrom
copilot/add-agentic-workflow-plan

Conversation

Copilot AI commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

✅ /plan Agentic Workflow Implementation Complete

Successfully created a new agentic workflow triggered by /plan command that analyzes complex GitHub issues and breaks them down into manageable sub-issues.

Checklist:

  • Explore repository structure and existing workflows (scout.md, issue-triage.md)
  • Understand safe-outputs configuration for issue creation
  • Research GitHub parent-child issue relationships
  • Create plan.md workflow file in .github/workflows/
  • Configure workflow with /plan command trigger
  • Add safe-outputs for create-issue (max: 5) and add-comment
  • Add cache-memory for deep research capabilities
  • Write comprehensive instructions for the agent
  • Compile the workflow using gh aw compile
  • Verify generated .lock.yml file (282.4 KB)
  • Final validation - 0 errors, 0 warnings
  • Remove pre-assigned labels (let issue-triage workflow handle labeling)

Implementation Summary

Workflow Features:

  • Trigger: /plan command in issues, PRs, comments, and review comments
  • Engine: GitHub Copilot
  • Timeout: 15 minutes
  • Roles: admin, maintainer, write only
  • Strict Mode: Enabled

Security & Permissions:

  • Main job: Read-only (contents, actions, issues, pull-requests)
  • Write operations: Handled by separate safe-output jobs
  • create-issue: Up to 5 sub-issues with "[subtask]" prefix (labels assigned by issue-triage workflow)
  • add-comment: Summary comment on parent issue with task list

Agent Capabilities:

  1. Deep Repository Analysis:

    • Explores codebase structure and architecture
    • Reviews documentation and design docs
    • Understands testing infrastructure
    • Analyzes related issues and PRs
  2. Intelligent Decision Making:

    • Determines if breakdown is beneficial
    • Avoids unnecessary fragmentation
    • Provides guidance when breakdown isn't needed
  3. Structured Sub-Tasks:

    • Each includes: objective, context, implementation details
    • Clear acceptance criteria and testing strategy
    • Dependency tracking for ordered implementation
    • Direct parent issue reference
  4. Parent-Child Linking:

    • Each sub-issue references parent: **Parent Issue**: #X
    • Parent gets comment with task list of all sub-issues
    • Task list format supports GitHub's native checkbox tracking
    • Labels automatically assigned by issue-triage workflow

Performance:

  • Cache-memory with 7-day retention for deep research
  • Concurrency grouping by issue/PR number
  • Efficient reuse of analysis across runs

Generated Files:

  • .github/workflows/plan.md (210 lines) - Source workflow
  • .github/workflows/plan.lock.yml (5,792 lines) - Compiled GitHub Actions workflow

Compilation Status:

✓ Compiled 1 workflow(s): 0 error(s), 0 warning(s)

Recent Changes

Addressed feedback: Removed pre-assigned labels from create-issue configuration. Sub-issues will be automatically labeled by the existing issue-triage workflow, which provides more consistent and appropriate labeling across all issues.

Original prompt

Add an agentic workflow, similar to scout, that is triggered by command /plan

This workflow asks the agent to analyze the issue, and determine if the scope of the issue needs to be further breaking down into sub issues. If so, it should create at most 5 sub issues, and set the current as the parent.

This workflow should use safe output for create issues.

It should also do a deep research of the current repository to understand the task and properly break down the big feature ask into implementable and testable sub tasks.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Add agentic workflow for issue analysis and breakdown Add /plan workflow for breaking down complex issues into sub-tasks Nov 12, 2025
Copilot AI requested a review from Mossaka November 12, 2025 06:18

@Mossaka Mossaka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot address the comment

Comment thread .github/workflows/plan.md Outdated
safe-outputs:
create-issue:
title-prefix: "[subtask] "
labels: [sub-issue, planned]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove those labels since there is an agentic workflow to assign labels

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the labels configuration in 2fe3b43. Sub-issues created by /plan will now be labeled by the issue-triage workflow instead.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a /plan agentic workflow that analyzes complex issues and breaks them down into manageable sub-tasks with parent-child relationships using GitHub's sub-issue linking functionality.

Key changes:

  • New command-triggered workflow for authorized users (admin/maintainer/write roles)
  • Automated sub-issue creation with structured format and parent linking
  • Cache-memory persistence for deep repository analysis
  • Safe-outputs configuration for secure issue and comment creation

Reviewed Changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/plan.md Workflow definition with command trigger, safe-outputs config, and detailed agent instructions for task decomposition
.github/workflows/plan.lock.yml Auto-generated GitHub Actions workflow with multi-job orchestration, MCP server setup, and GraphQL sub-issue linking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/plan.md
Comment on lines +14 to +15
cache-memory:
retention-days: 7

Copilot AI Nov 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retention-days field is not a valid configuration option for cache-memory according to the schema. The cache-memory configuration only supports a key field (string) or boolean value.

Issue: Line 15 shows retention-days: 7 which is not supported.

Solution: Remove the retention-days field. If you need to control cache retention, use the standard GitHub Actions cache retention settings at the repository level. The correct configuration should be:

tools:
  cache-memory:
    key: memory-${{ github.workflow }}-${{ github.run_id }}

or simply:

tools:
  cache-memory: true
Suggested change
cache-memory:
retention-days: 7
cache-memory: true

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/plan.md
max: 5
add-comment:
max: 1
timeout-minutes: 15

Copilot AI Nov 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field name timeout-minutes is incorrect. According to the schema, it should be timeout_minutes (with an underscore, not a hyphen).

Fix: Change timeout-minutes: 15 to timeout_minutes: 15

Suggested change
timeout-minutes: 15
timeout_minutes: 15

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/plan.md
add-comment:
max: 1
timeout-minutes: 15
strict: true

Copilot AI Nov 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The strict: true field is not a valid configuration option according to the agentic workflow schema. This field does not exist in the frontmatter specification.

Solution: Remove this line as it will cause compilation errors.

Suggested change
strict: true

Copilot uses AI. Check for mistakes.
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
@Mossaka Mossaka merged commit b1490f9 into main Nov 12, 2025
39 checks passed
@Mossaka Mossaka deleted the copilot/add-agentic-workflow-plan branch November 12, 2025 06:26
Copilot AI requested a review from Mossaka November 12, 2025 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants