elastic / elastic/ai-github-actions
[product-manager-impersonator] Comment-only chained detector examples
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Feature Idea
**Summary:** Add copy-pasteable `example-chained-comment.yml` templates for detector workflows that chain a created issue to `Create Comment On Issue` instead of immediately opening a PR.
## Why a Customer Would Want This
Teams adopting scheduled detectors often want a human-in-the-loop middle ground: more context than a bare report issue, but less automation than an immediate fix PR. A comment-only chained example would let maintainers run Bug Hunter, Code Duplication Detector, Test Coverage Detector, and similar workflows, then have the agent add implementation guidance, triage notes, or next-step analysis to the created issue while humans still decide whether to assign or fix it.
## Rough Implementation Sketch
- Add `example-chained-comment.yml` next to the existing detector `example-chained.yml` files, starting with the five detector directories that already ship chained PR examples.
- Keep the existing `detect` job and `if: needs.detect.outputs.created_issue_number != ''` pattern, but replace the `fix` job with a `comment` job using `elastic/ai-github-actions/.github/workflows/gh-aw-create-comment-on-issue.lock.yml@v0`.
- Give each template a detector-specific `prompt`, for example asking the comment workflow to summarize the finding, explain likely risk, and suggest first implementation steps.
- Update the per-workflow quick-install docs to offer three choices: detector only, chained comment, and chained PR.
## Why It Won't Be That Hard
The pieces already exist. The chaining docs already describe detector outputs and the `needs.detect.outputs.created_issue_number` guard, and the `Create Comment On Issue` workflow already accepts `target-issue-number` plus `prompt` as `workflow_call` inputs. This is mostly adding a few small YAML templates and matching documentation links, not changing the compiler or safe-output runtime.
## Evidence
- `docs/workflows/gh-agent-workflows.md:67-70` already tells users that detectors can chain either to `Create PR from Issue` or, for comment-only responses, to `Create Comment On Issue`.
- `docs/workflows/detector-fixer-chaining.md:146-162` says most detector directories include copyable `example-chained.yml` files, but its only copyable chained examples are create-PR flows and comment-only chaining is left as a note.
- `docs/workflows/gh-agent-workflows/create-comment-on-issue.md:9-23` shows the exact detector-to-comment job shape using `target-issue-number`.
- `.github/workflows/gh-aw-create-comment-on-issue.md:30-38` defines `target-issue-number` and `prompt` inputs, and `.github/workflows/gh-aw-create-comment-on-issue.md:74-82` restricts safe outputs to adding one issue comment.
- Existing detector docs such as `docs/workflows/gh-agent-workflows/bugs.md:19-27`, `code-duplication.md:19-27`, `code-complexity.md:19-27`, and `test-coverage.md:19-27` currently offer detector-only and chained-fixer install paths, but no comment-only chained template.
- Existing chained templates such as `gh-agent-workflows/bug-hunter/example-chained.yml:17-22` call `gh-aw-create-pr-from-issue.lock.yml`; there is no parallel `example-chained-comment.yml` in the detector directories.
---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/28369229419)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Research direction
Start with docs/workflows/gh-agent-workflows/create-comment-on-issue.md:9-23 and the existing gh-agent-workflows/bug-hunter/example-chained.yml. Add matching example-chained-comment.yml templates in the five detector directories that already provide chained examples, using the documented target-issue-number and prompt inputs. Update each detector's quick-install documentation, including bugs.md, code-duplication.md, code-complexity.md, and test-coverage.md, so the three installation choices are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, yaml
- Domain
- ci-cd, documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100