elastic / elastic/ai-github-actions

[product-manager-impersonator] Trigger table parity lint for workflow READMEs

Open
#1,082 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 lint check that verifies each `gh-agent-workflows/*/README.md` **Trigger** table matches the workflow events defined in its sibling `example.yml`.

## Why a Customer Would Want This
Users copy these `example.yml` files directly into their repos, but most people first read each workflow README to decide what to install. When trigger docs drift from `example.yml`, teams misconfigure automation and only discover it after rollout.

## Rough Implementation Sketch
- Add a small script (for example, `scripts/check-trigger-docs.py`) that parses each `gh-agent-workflows/*/example.yml` `on:` section and compares it to the workflow README Trigger table.
- Fail with actionable diffs (missing event, wrong type, extra documented trigger, etc.).
- Wire the check into `make lint` and CI next to existing repository-specific consistency checks.
- Document the rule in `gh-agent-workflows/DEVELOPING.md` so contributors know Trigger tables are contract-checked.

## Why It Won't Be That Hard
This is a focused static validation pass over files already kept side-by-side, with existing precedent for custom lint scripts in this repository. It is additive (no behavior change in runtime workflows) and has a small surface area.

## Evidence
- `gh-agent-workflows/DEVELOPING.md:38-43` and `:158-160` define separate, manually maintained `README.md` + `example.yml` artifacts per workflow.
- `gh-agent-workflows/issue-triage/README.md:19-24` and `gh-agent-workflows/issue-triage/example.yml:2-4` show the same trigger contract duplicated across docs and YAML.
- `Makefile:204-217` and `:243-245` show existing lint coverage but no trigger-doc parity check.
- `.github/workflows/ci.yml:27-33` plus `scripts/check-nav-catalog.py` demonstrate established precedent for repo-specific consistency gates.
- Recent direction emphasizes contract reliability (`#1030`, `#1012`), so this fits current maintenance priorities.

## Non-duplication Notes
- Distinct from `#796` (linting validity of `example.yml` syntax itself).
- Distinct from `#1041` / `#449` (input/output docs parity, not trigger parity).

> [!NOTE]
>
> 🔒 Integrity filter blocked 33 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - [#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".
> - [#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".
> - [#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".
> - [#432](https://github.com/elastic/ai-github-actions/issues/432) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#478](https://github.com/elastic/ai-github-actions/issues/478) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#457](https://github.com/elastic/ai-github-actions/issues/457) `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".
> - [#424](https://github.com/elastic/ai-github-actions/issues/424) `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".
> - [#366](https://github.com/elastic/ai-github-actions/issues/366) `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".
> - [#483](https://github.com/elastic/ai-github-actions/issues/483) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#275](https://github.com/elastic/ai-github-actions/issues/275) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#370](https://github.com/elastic/ai-github-actions/issues/370) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#353](https://github.com/elastic/ai-github-actions/issues/353) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 17 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/25491177363)

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.