elastic / elastic/ai-github-actions
[product-manager-impersonator] Add a Claude migration preflight validator
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Customer need
Teams migrating from the legacy Claude Composite Actions need a fast way to discover incomplete conversions before merging. The current guide gives principles and a short checklist, but it does not validate a real repository or cover every legacy workflow.
## Local evidence
- `docs/migration-guide.md:18-21` says to switch from composite actions to reusable workflows, remove checkout, and move configuration/secrets, but provides no automated check.
- `docs/migration-guide.md:25-30` shows mappings for only four workflows, while the repository contains 12 legacy `example.yml` files under `claude-workflows/`.
- `docs/migration-guide.md:36-43` maps only eight legacy variants and omits examples such as `build-failure-buildkite`, `build-failure-github-actions`, `generate-report`, and `project-manager`.
- Legacy examples consistently use `claude-oauth-token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}` and an explicit `actions/checkout` step (for example, `claude-workflows/mention-in-pr/rwx/example.yml:28-33`), making these omissions mechanically detectable.
## Proposed small feature
Add `scripts/check-claude-migration.py` and a `make check-claude-migration` target. Given `.github/workflows` (or an optional path), scan YAML text for legacy Claude action references, the old OAuth secret, and checkout steps adjacent to those actions. Report each file, the detected legacy workflow/permission variant, the recommended `gh-agent-workflows//example.yml` replacement, and unsupported/unmapped workflows instead of claiming they are migrated. Exit nonzero for detected legacy usage so it can be used in CI.
Update `docs/migration-guide.md` with the command, a complete mapping table for all legacy examples, and one representative before/after job-level conversion. Add focused Python fixtures covering mapped variants, an unmapped legacy workflow, and an already-migrated workflow.
## Why feasible in 1–2 days
This is a small repository-local scanner using existing Python test infrastructure; it requires no compiler or lock-file changes. The mapping can be a short data table derived from the existing `claude-workflows/*/example.yml` files, with documentation and tests completing the adopter-facing experience.
---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Product Manager Impersonator](https://github.com/elastic/ai-github-actions/actions/runs/29325658948)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Research direction
Start with docs/migration-guide.md and the legacy examples under claude-workflows/, especially claude-workflows/mention-in-pr/rwx/example.yml. Review the existing Python test infrastructure, then add the scanner, Make target, documentation mapping, and fixtures for mapped, unmapped, and migrated workflows. Done means legacy usage is reported with replacements and causes a nonzero exit, while migrated workflows pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python, yaml
- Domain
- ci-cd, documentation, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100