elastic / elastic/ai-github-actions

[product-manager-impersonator] Scaffold new gh-aw workflows with one make target

Open
#1,055 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 `make scaffold-workflow NAME=` command that generates the standard source, trigger example, and README files for a new reusable gh-aw workflow.

## Why a Customer Would Want This
Maintainers and contributors who add new workflows currently do repetitive manual setup across multiple files, which is easy to get wrong and slows iteration. A scaffolder gives teams a fast, consistent starting point and reduces workflow drift from day one.

## Rough Implementation Sketch
- Add `scripts/scaffold-workflow.sh` that creates:
- `.github/workflows/gh-aw-.md`
- `gh-agent-workflows//example.yml`
- `gh-agent-workflows//README.md`
- optional `gh-agent-workflows//dogfood-with.yml` starter
- Add `make scaffold-workflow NAME=` target that calls the script.
- Seed templates with existing conventions (workflow_call inputs, `uses: ...gh-aw-.lock.yml@v0`, and README sections matching current docs style).
- Print next steps (`make compile`, then commit generated files).

## Why It Won't Be That Hard
The repository already has explicit, stable conventions for the required file set and generation flow. This feature is mostly deterministic file templating plus one Make target, with no compiler/runtime changes.

## Evidence
- New workflow creation is currently manual across multiple files: `gh-agent-workflows/DEVELOPING.md` lines 156-163.
- Contributors are expected to maintain source + generated artifacts together: `gh-agent-workflows/DEVELOPING.md` lines 145-150.
- Public workflow structure is a fixed multi-file contract (source, lock, trigger, example, README): `.github/workflows/workflow-patrol.md` lines 64-70.
- Trigger generation already relies on `gh-agent-workflows//example.yml`: `scripts/dogfood.sh` lines 55-73.
- Current Make targets include compile/sync but no scaffold/generator entry point: `Makefile` lines 50-67 and 167-183.

## Duplicate Check
- Not a duplicate of open PM ideas focused on quick setup behavior (`#1015`, `#995`, `#965`, `#1028`, etc.).
- Not a duplicate of lint/drift ideas (`#730`, `#1041`, `#982`, `#796`), because this is proactive generation rather than post-hoc validation.
- Not present in prior PM issue history in `/tmp/previous-findings.json` (no scaffold/generator proposal found).

> [!NOTE]
>
> 🔒 Integrity filter blocked 70 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - elastic/ai-github-actions#1025 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#1024 `list_issues`: 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".
> - elastic/ai-github-actions#875 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#704 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#694 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#684 `list_issues`: 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".
> - [#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".
> - [#436](https://github.com/elastic/ai-github-actions/issues/436) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#593](https://github.com/elastic/ai-github-actions/issues/593) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#937](https://github.com/elastic/ai-github-actions/pull/937) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#850](https://github.com/elastic/ai-github-actions/pull/850) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#851](https://github.com/elastic/ai-github-actions/pull/851) `search_pull_requests`: 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".
> - ... and 54 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/25211204824)

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.