Skip to content

[plan] Document workflow_run vs pull_request trigger decision tree in create-agentic-workflow prompt #21708

Description

@github-actions

Objective

Codify the workflow_run vs pull_request trigger selection reasoning as a reusable decision tree pattern in the create-agentic-workflow.md prompt.

Context

From discussion #21704 (Agent Persona Exploration - 2026-03-19), the evaluation found that the agent correctly chooses between workflow_run and pull_request triggers — but this reasoning is implicit. Making it explicit in the prompt library will help new workflow authors understand the tradeoff.

Key insight observed during evaluation:

  • Use workflow_run when CI artifacts are needed (coverage reports, build outputs, deployment results)
  • Use pull_request with path filters when reacting to code changes directly (schema reviews, visual regression)

Approach

  1. Locate the create-agentic-workflow.md prompt file (likely in skills/ or .github/)
  2. Add a "Trigger Selection" section with a decision tree:
    • Does the workflow need CI artifacts from a prior run? → workflow_run
    • Is the workflow reacting to code changes (files, PRs)? → pull_request with paths: filters
    • Is it time-based or manual? → schedule + workflow_dispatch
    • Is it release/tag-based? → push: tags:
  3. Include the trigger hierarchy pattern: workflow_run → pull_request (path filters) → schedule + workflow_dispatch → push: tags
  4. Add a brief rationale for each choice with an example snippet

Files to Modify

  • The create-agentic-workflow.md prompt (check skills/ and .github/ directories)

Acceptance Criteria

  • Decision tree for trigger selection is documented in the prompt
  • Includes rationale for workflow_run vs pull_request choice
  • Covers all 4 trigger categories with examples
  • New workflow authors can use it without external guidance

Generated by Plan Command for issue #discussion #21704 · ◷

  • expires on Mar 21, 2026, 1:48 AM UTC

Activity

  1. pelikhan commented on Mar 19, 2026

    @pelikhan
    Collaborator

    @copilot workflow_run can be very noisy and high frequency. Use with great care.

  2. Copilot commented on Mar 19, 2026

    Copilot
    Contributor

    The agent encountered an error and was unable to start working on this issue: The service is temporarily unavailable. Please try again later.

  3. github-actions commented on Mar 21, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-03-21T01:48:09.450Z.

    Closed by Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions