elastic / elastic/ai-github-actions

[product-manager-impersonator] Quick setup `--allow-dirty` mode

Open
#995 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 an optional `--allow-dirty` flag to `scripts/quick-setup.sh` so first-time setup can run in repos that already have local uncommitted changes.

## Why a Customer Would Want This
Many teams try quick setup while already in the middle of unrelated local edits. The current hard stop forces them to stash/commit first, which adds friction and often delays adoption. An explicit opt-in keeps the safe default while unblocking real-world onboarding flow.

## Rough Implementation Sketch
- Add `--allow-dirty` to `scripts/quick-setup.sh` usage/help and argument parsing.
- Keep current behavior as default; only bypass the dirty-tree exit when this flag is set.
- In `--allow-dirty` mode, create/switch branch from current `HEAD` (instead of requiring clean checkout from default branch) and print a clear warning that the branch may include pre-existing changes.
- Continue staging/committing only generated workflow files (`created_files`) and document the new flag in README + workflow setup docs.

## Why It Won't Be That Hard
This is a small, localized shell-script enhancement with no workflow schema/compiler changes. The script already has centralized option parsing and already limits commits to generated files, so the change is mostly conditional branching plus docs updates.

## Evidence
- Current hard stop on dirty worktree: `scripts/quick-setup.sh#L90-L93`.
- Default branch checkout path that assumes clean state: `scripts/quick-setup.sh#L173-L183`.
- Commit scope already constrained to generated files: `scripts/quick-setup.sh#L186-L213` and `scripts/quick-setup.sh#L261-L266`.
- Quick setup is a primary onboarding path in docs: `README.md#L28-L39`, `gh-agent-workflows/README.md#L44-L65`.
- Recent activity shows active investment in quick-setup usability text and onboarding polish: issue `#990`, PR `#991`, and commit `ed04d2351df4c732fb9f2c2aa42a3d2a8d991494`.

## Duplicate Check
- `repo:elastic/ai-github-actions is:issue is:open "allow-dirty" OR "allow dirty" "quick-setup"` → no open match.
- `repo:elastic/ai-github-actions is:issue is:open "Working tree has uncommitted changes"` → no open match.
- `repo:elastic/ai-github-actions is:issue is:open "quick-setup" "uncommitted"` → no open match.
- Reviewed `/tmp/previous-findings.json`: many quick-setup ideas exist (labels bootstrap, defaults file, safety checks, list/validate modes), but none propose dirty-worktree opt-in setup.

> [!NOTE]
>
> 🔒 Integrity filter blocked 21 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".
> - [#794](https://github.com/elastic/ai-github-actions/pull/794) `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".
> - [#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".
> - 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".
> - [#694](https://github.com/elastic/ai-github-actions/issues/694) `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".
> - [#875](https://github.com/elastic/ai-github-actions/issues/875) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 5 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/24773408770)

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.