elastic / elastic/ai-github-actions
[product-manager-impersonator] Configurable prompt-audit artifact directory
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Feature Idea
**Summary:** Add a configurable artifact/output directory for prompt-audit helper scripts and workflow instructions instead of hardcoding `/tmp` paths.
## Why a Customer Would Want This
Teams running these workflows in locked-down CI runners or local environments often have restricted or ephemeral `/tmp` semantics, which makes prompt-audit setup brittle and harder to reproduce. A configurable path improves reliability and makes investigation artifacts easier to retain.
## Rough Implementation Sketch
- Add a shared output-root input/env (for example `artifact-root` or `PROMPT_AUDIT_DIR`) and plumb it through prompt-audit setup commands.
- Update `scripts/extract-lockfile-prompts.sh` to default to that configured location rather than `/tmp/prompt-audit`.
- Update `scripts/fetch-workflow-logs.py` default output dir from `/tmp/gh-aw/logs` to the same configurable root (with CLI override preserved).
- Update `trigger-prompt-audit.yml` instructions to reference the configured directory path consistently.
## Why It Won't Be That Hard
The change is localized to two helper scripts plus one trigger workflow prompt/instructions. All needed extension points already exist (`--output-dir` in Python script and positional output-dir argument in shell script), so this is mostly wiring defaults and docs.
## Evidence
- `scripts/fetch-workflow-logs.py` hardcodes `/tmp/gh-aw/logs` as default in both usage text and argparse defaults (`L14`, `L140-L141`).
- `scripts/extract-lockfile-prompts.sh` hardcodes `/tmp/prompt-audit` as the default output directory (`L6`, `L15`).
- `.github/workflows/trigger-prompt-audit.yml` assumes extracted prompts are written to `/tmp/prompt-audit/` in assignment instructions (`L24`, `L28`).
## Duplicate Check
Searched open issues for equivalent requests and did not find an existing match:
- `repo:elastic/ai-github-actions is:issue is:open "prompt-audit" "output-dir"`
- `repo:elastic/ai-github-actions is:issue is:open "fetch-workflow-logs.py" "/tmp/gh-aw/logs"`
- `repo:elastic/ai-github-actions is:issue is:open "extract-lockfile-prompts.sh" "/tmp/prompt-audit"`
Closest related issue is `#987` (fail-closed dedupe mode for Scheduled Audit), which changes dedupe behavior and not artifact path configurability.
> [!NOTE]
>
> 🔒 Integrity filter blocked 69 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".
> - [#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".
> - [#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".
> - [#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".
> - elastic/ai-github-actions#676 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#359 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#354 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#336 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#191 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#321 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#245 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - elastic/ai-github-actions#248 `list_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 53 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/24830287728)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Assessment
This issue has not been assessed yet.