elastic / elastic/ai-github-actions
[refactor-opportunist] Extract common gh-aw workflow_call input schema
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Recommendation
Extract the common `workflow_call.inputs` schema shared by most hand-authored `gh-aw-*.md` workflow sources.
## Evidence
A repeated input sequence appears in 46 workflow source files: `model -> additional-instructions -> setup-commands -> allowed-bot-users -> messages-footer -> report-failure-as-issue`.
Representative duplicates:
- `.github/workflows/gh-aw-agent-suggestions.md:24-58`
- `.github/workflows/gh-aw-autonomy-atomicity-analyzer.md:24-58`
- `.github/workflows/gh-aw-code-duplication-detector.md:25-74`
- `.github/workflows/gh-aw-docs-patrol.md:25-64`
Individual occurrence counts across `.github/workflows/gh-aw-*.md` sources:
- `model`: 52
- `additional-instructions`: 52
- `setup-commands`: 51
- `allowed-bot-users`: 48
- `messages-footer`: 50
- `report-failure-as-issue`: 52
This duplication already caused broad churn: adding `report-failure-as-issue` required editing nearly every workflow source plus a post-compile wiring script.
## Proposed incremental refactor
Add a small compile-time preprocessing/helper mechanism for common workflow-call input blocks, for example a shared YAML snippet or metadata flag expanded before `gh-aw compile`. Start with the six common inputs above, while preserving workflow-specific inputs inline. Keep generated lock files untouched except through the normal `make compile` path.
## POC slice
Prove viability on one low-risk workflow such as `.github/workflows/gh-aw-agent-suggestions.md`, then run `make compile` and verify the generated `.lock.yml` is unchanged except expected formatting/order.
## Duplicate check
This is distinct from previous findings about dogfood metadata (#1281), PR review pagination (#1199), mention prompt fragments (#835), safe-output limitations (#776/#718), origin refs (#884), source-code scaffold (#930), mention PR tools config (#534), and setup-commands prompt/runtime fragments (#629). This targets YAML frontmatter input schema duplication, not prompt content or shell setup behavior.
---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Refactor Opportunist](https://github.com/elastic/ai-github-actions/actions/runs/28801611526)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Research direction
Start with .github/workflows/gh-aw-agent-suggestions.md and compare its workflow_call.inputs block with the representative sources listed in the issue. Trace the normal make compile path and its post-compile wiring, then verify that the generated .lock.yml files change only in expected formatting or order after the common six-input schema is extracted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, markdown, yaml
- Domain
- build-system, devops, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100