Skip to content

Add Agentic Workflow Portfolio Yield workflow#31363

Merged
mnkiefer merged 13 commits into
mainfrom
copilot/implement-agentic-workflow-portfolio-yield
May 11, 2026
Merged

Add Agentic Workflow Portfolio Yield workflow#31363
mnkiefer merged 13 commits into
mainfrom
copilot/implement-agentic-workflow-portfolio-yield

Conversation

@mnkiefer
Copy link
Copy Markdown
Collaborator

@mnkiefer mnkiefer commented May 10, 2026

New Feature

What does this feature do?

This PR adds Agentic Workflow Portfolio Yield, a scheduled/manual agentic workflow that evaluates the repository’s workflow portfolio in two deterministic stages and then asks the agent to interpret the results. The precompute stage inventories workflow metadata and calculates workflow yield, overlap drag, portfolio cost and risk, agentic vs. deterministic fractions, telemetry coverage, evidence quality, overlap clusters, recommendation seeds, and organizational health signals. The postcompute stage validates the agent output, recomputes bounded overlap data, and emits a single issue-safe portfolio report.

Why is this feature needed?

This workflow adds a recurring governance view to the gh-aw portfolio so the repository can identify which workflows are high-yield, where overlap or consolidation exists, which workflows may be retirement candidates, and where missing instrumentation weakens portfolio decisions.

Implementation details

Notable implementation choices include keeping the scoring math deterministic in the scripts so the agent focuses on interpretation, using actions/github-script in the generated workflow, and importing optional OTel observability context from .github/workflows/shared/otel-observability.md so telemetry can inform recommendations without requiring raw trace access.

Key files:

  • .github/workflows/aw-portfolio-yield.md — source workflow definition and prompt
  • .github/workflows/aw-portfolio-yield.lock.yml — compiled workflow
  • scripts/aw_yield_precompute.py — deterministic scoring and signal extraction
  • scripts/aw_yield_postcompute.py — report finalization and guardrails
  • scripts/aw_yield_precompute.cjs / scripts/aw_yield_postcompute.cjsgithub-script wrappers
  • tests/test_aw_yield_precompute.py / tests/test_aw_yield_postcompute.py — regression coverage

Copilot AI and others added 2 commits May 10, 2026 17:05
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 10, 2026 17:46
@github-actions
Copy link
Copy Markdown
Contributor

✅ smoke-ci: safeoutputs CLI comment + comment-memory run (25635492621)

Generated by Smoke CI for issue #31363 ·

@github-actions
Copy link
Copy Markdown
Contributor

Comment Memory

CI lights the path
Green checks bloom at dawn
Quiet bots still sing

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

Generated by Smoke CI for issue #31363 ·

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an “Agentic Workflow Portfolio Yield” workflow that deterministically scores and analyzes the repository’s agentic workflows (yield, overlap/drag, governance signals) and then produces an issue report, with optional OTel-backed evidence.

Changes:

  • Introduces deterministic precompute/postcompute Python scripts to generate portfolio metrics and a markdown report.
  • Adds a new scheduled/dispatchable agentic workflow that runs the scripts and creates a single report issue via safe outputs.
  • Adds shared OTel observability import and initial unit tests for the scoring/parsing logic.
Show a summary per file
File Description
scripts/aw_yield_precompute.py New deterministic precompute: workflow discovery, frontmatter parsing, scoring, overlap detection, portfolio metrics.
scripts/aw_yield_postcompute.py New deterministic postcompute: clamps scores, validates agent recommendations, generates report markdown + safe output payload.
tests/test_aw_yield_precompute.py Unit tests for discovery/frontmatter parsing/import handling/scoring math/overlap clustering.
tests/test_aw_yield_postcompute.py Unit tests for clamping, recommendation validation, and malformed agent-output handling.
.github/workflows/aw-portfolio-yield.md New agentic workflow definition that runs weekly and on demand, producing a portfolio report issue.
.github/workflows/shared/otel-observability.md Shared import that configures OTLP env/observability and an otel MCP server.
.github/workflows/aw-portfolio-yield.lock.yml Compiled lockfile for the new workflow.

Copilot's findings

Tip

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

  • Files reviewed: 7/7 changed files
  • Comments generated: 3

Comment thread scripts/aw_yield_precompute.py Outdated
Comment thread scripts/aw_yield_precompute.py Outdated
Comment thread scripts/aw_yield_postcompute.py
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI and others added 2 commits May 10, 2026 19:46
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI and others added 6 commits May 10, 2026 19:54
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Hey @mnkiefer 👋 — great work adding the Portfolio Yield agentic workflow! The implementation looks well-structured with the pre/post compute scripts, the lock workflow, and matching test coverage for both scripts. One thing that would really help reviewers:

  • Add a PR description — the body currently contains only the agent's task checklist. A short human-readable summary explaining what the Portfolio Yield workflow does, why it's being added, and any relevant design decisions (e.g. the OTel observability additions in shared/otel-observability.md) would make this much easier to review and understand in the git history.

If you'd like a hand drafting it, you can assign this prompt to your coding agent:

Replace the PR body for github/gh-aw#31363 with a proper description. The description should:
1. Summarize what the Portfolio Yield agentic workflow does (precompute and postcompute stages, what metric/signal it computes).
2. Explain why this workflow is being added to the gh-aw portfolio.
3. Briefly note any notable implementation decisions, including the OTel observability integration added in scripts/shared/otel-observability.md.
4. List the key files added and their roles.
Keep it concise — 150–250 words is ideal.

Generated by Contribution Check · ● 5.7M ·

@mnkiefer
Copy link
Copy Markdown
Collaborator Author

@copilot use JavaScript and actions/github-script in the generated code instead python or bash.

@mnkiefer mnkiefer changed the title Add Agentic Workflow Portfolio Yield workflow Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com> Add Agentic Workflow Portfolio Yield workflow May 11, 2026
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

@copilot use JavaScript and actions/github-script in the generated code instead python or bash.

Implemented in 28d7313.

@mnkiefer mnkiefer self-assigned this May 11, 2026
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer
Copy link
Copy Markdown
Collaborator Author

@copilot Replace the PR body for #31363 with a proper description. The description should:

  1. Summarize what the Portfolio Yield agentic workflow does (precompute and postcompute stages, what metric/signal it computes).
  2. Explain why this workflow is being added to the gh-aw portfolio.
  3. Briefly note any notable implementation decisions, including the OTel observability integration added in scripts/shared/otel-observability.md.
  4. List the key files added and their roles.
    Keep it concise — 150–250 words is ideal.

Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

@copilot Replace the PR body for #31363 with a proper description. The description should:

  1. Summarize what the Portfolio Yield agentic workflow does (precompute and postcompute stages, ...

Updated the PR description on #31363 in place; no repository code change was required.

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