Skip to content

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

@github-actions

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_runpull_request (path filters) → schedule + workflow_dispatchpush: 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

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions