elastic / elastic/ai-github-actions

[product-manager-impersonator] Workflow output contract docs lint

Open
#1,041 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 keeps reusable-workflow output contracts in sync between workflow definitions and per-workflow README docs.

## Why a Customer Would Want This
Teams chaining detector/fixer workflows depend on exact output names (for example `created_issue_number`) to gate downstream jobs. When docs drift from real `workflow_call` outputs, automation fails in user repos and is hard to diagnose.

## Rough Implementation Sketch
- Add a script (for example `scripts/check-workflow-output-docs.py`) that reads `.github/workflows/gh-aw-*.md` and extracts documented `workflow_call.outputs` (or safe-output-derived output contracts used by the compiler).
- Validate each corresponding `gh-agent-workflows/*/README.md` includes an **Outputs** section with matching names/descriptions.
- Wire the check into `make lint` and `.github/workflows/ci.yml` alongside existing static consistency checks.
- Add a short contributor note in `gh-agent-workflows/DEVELOPING.md` describing the output-doc contract requirement.

## Why It Won't Be That Hard
The repo already has the right primitives: deterministic source→README mapping per workflow, established custom lint scripts in CI, and explicit output-contract semantics already used for detector/fixer chaining. This is an additive static check with no runtime behavior changes.

## Evidence
- `docs/upgrading.md#L11-L13` and `docs/upgrading.md#L28-L34` emphasize workflow-call outputs like `created_issue_number` as a core chaining contract.
- `docs/workflows/detector-fixer-chaining.md#L11-L17` and `#L18-L35` show chaining depends on exact output names.
- `.github/workflows/gh-aw-bug-hunter.md#L23-L55` defines reusable workflow-call interface, while `gh-agent-workflows/bug-hunter/README.md#L26-L37` has inputs/safe-outputs but no outputs section.
- `.github/workflows/ci.yml#L27-L33` already runs `scripts/check-nav-catalog.py`, showing existing precedent for repo-specific consistency lint gates.

Duplicate check: this is distinct from `#730` (artifact parity lint), `#449` (input-table sync, closed), and `#852` (adding comment-workflow outputs).

> [!NOTE]
>
> 🔒 Integrity filter blocked 35 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - elastic/ai-github-actions#1029 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - 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".
> - [#235](https://github.com/elastic/ai-github-actions/issues/235) `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".
> - [#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".
> - [#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".
> - [#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".
> - [#550](https://github.com/elastic/ai-github-actions/issues/550) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#472](https://github.com/elastic/ai-github-actions/issues/472) `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".
> - [#547](https://github.com/elastic/ai-github-actions/issues/547) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#197](https://github.com/elastic/ai-github-actions/issues/197) `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".
> - [#1024](https://github.com/elastic/ai-github-actions/issues/1024) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 19 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/25048102233)

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.