elastic / elastic/ai-github-actions

[product-manager-impersonator] Canonicalize generated-file regeneration hints

Open
#1,100 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:** Standardize generated workflow file headers so they consistently tell maintainers to regenerate with `make compile`, then enforce that wording with a lightweight lint check.

## Why a Customer Would Want This
Maintainers rely on the instructions embedded at the top of generated files during day-to-day edits. Today those headers can conflict with repository docs (`gh aw compile` vs `make compile`), which creates avoidable confusion, reruns, and unrelated generated-file churn.

## Rough Implementation Sketch
- Add a small script (for example `scripts/check-generated-regen-hints.py`) that verifies canonical regen guidance text in generated `.lock.yml` and `trigger-*.yml` headers.
- Add a post-compile normalization step so generated headers consistently reference `make compile`.
- Wire the check into `make lint` / CI to fail with actionable file + line output when headers drift.
- Document the canonical rule in `gh-agent-workflows/DEVELOPING.md`.

## Why It Won't Be That Hard
This is a narrow, deterministic text-consistency improvement with no runtime behavior changes. The repo already uses custom consistency scripts and CI checks for generated-file drift, so this feature can reuse existing patterns and touch a small surface area.

## Evidence
- `.github/workflows/gh-aw-pr-review.lock.yml#L17-L21` currently instructs `gh aw compile`.
- `.github/workflows/trigger-pr-review.yml#L1-L2` currently instructs `make compile`.
- `gh-agent-workflows/DEVELOPING.md#L145-L154` defines `make compile` as the canonical regeneration flow.
- `Makefile#L170-L183` shows `make compile` does more than raw compile (`sync`, compat compile, postprocess, backwards-compat script).
- `.github/workflows/ci.yml#L46-L65` enforces generated outputs are current after running `make compile`.
- Duplicate checks: no direct open issue/PR found for canonicalizing these header hints (`repo:elastic/ai-github-actions is:issue "make compile" "gh aw compile"` returned 0 direct matches).

> [!NOTE]
>
> 🔒 Integrity filter blocked 90 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - [#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".
> - [#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".
> - [#687](https://github.com/elastic/ai-github-actions/pull/687) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#703](https://github.com/elastic/ai-github-actions/pull/703) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#312](https://github.com/elastic/ai-github-actions/pull/312) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#705](https://github.com/elastic/ai-github-actions/pull/705) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#659](https://github.com/elastic/ai-github-actions/pull/659) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#582](https://github.com/elastic/ai-github-actions/pull/582) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#600](https://github.com/elastic/ai-github-actions/pull/600) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#459](https://github.com/elastic/ai-github-actions/pull/459) `search_pull_requests`: 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".
> - [#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".
> - [#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".
> - [#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".
> - [#520](https://github.com/elastic/ai-github-actions/pull/520) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 74 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/25729550411)

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.