pytest-optimizer-03-executelisted
Install: claude install-skill tony/ai-workflow-plugins
# 03-execute
Land the plan as separate, verified commits. This is the **only** phase that edits
the suite and writes history.
`$ARGUMENTS` may pass `--from=<index>` to start at a specific plan item,
`--dry-run` to apply and verify without committing (reverting after each), and
`--memory-dir` to override the memory location.
## Step 1: Preconditions
Read `plan.json`, `baseline.json`, and the project quality-check + test commands.
Refuse to run unless:
- the working tree is **clean** (one commit per speedup needs a clean base), and
- `plan.json` exists and was approved in the `pytest-optimizer-02-plan` skill.
Read `execution-log.json` if present and resume from `last_applied_index + 1`
(or `--from`). Never re-apply an item that already has a `commit_sha`.
## Step 2: Apply each item in order
For each plan item not yet applied:
1. **Apply** the single change (the heuristic's action). Touch only the files the
plan lists for this item.
2. **Verify green.** Run the project quality checks (formatter, linter, type
checker) and the test suite, as declared in the project's `AGENTS.md`/
`CLAUDE.md` — substitute that command wherever this file writes `pytest`:
```bash
pytest -p no:cacheprovider -q
```
For a typing/parametrize item (goals 9, 10), the type checker must cover
`tests/` and pass.
3. **On success** — commit this change **alone** with the drafted why/what
message (`templates/commit-message.tmpl`, adapted to
the target project's convention