elastic / elastic/ai-github-actions

[product-manager-impersonator] Workflow scaffold generator for maintainers

Open
#1,183 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
16
Avg merge
22h 9m
Merged PRs (30d)
31

Description

## Feature Idea

**Summary:** Add a lightweight `new-workflow` scaffold command that generates the canonical source, example trigger, and README files for a new `gh-agent-workflows` workflow slug.

## Why a Customer Would Want This
Maintainers extending this project currently create new workflows through several manual, convention-heavy steps across multiple directories. A scaffold command would reduce authoring mistakes, make contributions faster, and keep workflow packaging consistent as the catalog grows.

## Rough Implementation Sketch
- Add `scripts/new-gh-agent-workflow.sh [--detector|--fixer|--event]` to generate:
- `.github/workflows/gh-aw-.md`
- `gh-agent-workflows//example.yml`
- `gh-agent-workflows//README.md`
- Include baseline `workflow_call` wiring and common inputs (`additional-instructions`, `setup-commands`) in the generated `.md` file, matching existing conventions.
- Add a Make target like `make new-workflow SLUG=` as a wrapper and checklist output (`make compile`, docs update).
- Document the scaffold flow in `gh-agent-workflows/DEVELOPING.md` under “Adding a new workflow”.

## Why It Won't Be That Hard
This is additive and localized to scripting/docs. The repository already has strict, repeatable file conventions and helper scripts for syncing workflow artifacts; the scaffold can reuse those conventions without touching runtime behavior.

## Evidence
- `gh-agent-workflows/DEVELOPING.md#L156-L163` defines a fully manual multi-file workflow creation process.
- `gh-agent-workflows/DEVELOPING.md#L145-L150` requires manual source/compiled artifact coordination.
- `scripts/dogfood.sh#L53-L75` assumes standardized `gh-agent-workflows//example.yml` structure when generating `trigger-*.yml` files.
- `Makefile#L50-L67` and `Makefile#L167-L183` provide setup/sync/compile targets but no workflow scaffolding command.

## Duplicate Check Notes
- Closest related open idea appears to be #730 (`[product-manager-impersonator] Add workflow artifact parity lint`), which validates existing artifacts.
- This proposal is different: it prevents authoring drift up front by generating the canonical files at creation time.

> [!NOTE]
>
> 🔒 Integrity filter blocked 22 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - [#1175](https://github.com/elastic/ai-github-actions/pull/1175) `list_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#359](https://github.com/elastic/ai-github-actions/issues/359) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#1175](https://github.com/elastic/ai-github-actions/pull/1175) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#1128](https://github.com/elastic/ai-github-actions/pull/1128) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#505](https://github.com/elastic/ai-github-actions/issues/505) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#476](https://github.com/elastic/ai-github-actions/issues/476) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#428](https://github.com/elastic/ai-github-actions/issues/428) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#1067](https://github.com/elastic/ai-github-actions/issues/1067) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#875](https://github.com/elastic/ai-github-actions/issues/875) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#704](https://github.com/elastic/ai-github-actions/issues/704) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#694](https://github.com/elastic/ai-github-actions/issues/694) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#684](https://github.com/elastic/ai-github-actions/issues/684) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#354](https://github.com/elastic/ai-github-actions/issues/354) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#336](https://github.com/elastic/ai-github-actions/issues/336) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#321](https://github.com/elastic/ai-github-actions/issues/321) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#140](https://github.com/elastic/ai-github-actions/issues/140) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 6 more items
>
> To allow these resources, lower `min-integrity` in your GitHub frontmatter:
>
> ```yaml
> tools:
> github:
> min-integrity: approved # merged | approved | unapproved | none
> ```
>
>

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/26571121166)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.