You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(skill): add infection-stats.php to mutation-analyzer skill
Replaces ad-hoc `grep | awk` / `grep | sed` pipelines that kept tripping the
permission allow-list on every Infection analysis with a single PHP script
that reads the three text artefacts (infection-summary.log, per-mutator.md,
infection.log) and exposes four modes:
--summary counts + MSI
--by-file [--top] escapes per src/ file, sorted
--by-mutator per-mutator.md compact list (with --escaped-only)
--filter=<needle> mutants whose path contains the needle, with L<n>
pointing at the log line so the orchestrator can
Read offset=L<n> limit=15 to inspect the diff
php8.4:* is already on the allow-list, so the script never prompts for
permissions. SKILL.md is updated to use the script as the default flow and
to call out that ad-hoc grep/sed pipelines should NOT be composed for these
counts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.`Read reports/infection/infection.log` con `offset`/`limit` sobre los rangos que te interesen.
42
+
Usar **siempre** el script `scripts/infection-stats.php` para los conteos y el perfilado por fichero/mutator. Está pensado para reemplazar pipelines `grep | awk` / `grep | sed` ad-hoc que rompen permisos y son frágiles. Sólo recurrir a `Grep` + `Read` cuando se quiera leer el diff completo de un mutant concreto.
`--filter` imprime una línea por mutant con `L<n>` (línea del log), índice, path, mutator, ID. Usa el `L<n>` como `offset` para leer el diff con `Read`:
**Nunca usar**`Read` sobre `mutation-report.html` — romperá el límite de mensaje y no añade información sobre los `.log`/`.md`. Si el usuario lo adjunta, recordárselo y pedir que aporte el `infection.log` o que re-ejecute Infection acotado (ver abajo).
51
69
@@ -152,21 +170,29 @@ CRUZADO no infla las métricas de Infection (el mutante seguirá vivo o lo mata
152
170
153
171
### Paso 1 — Resumen y perfil (los tres ficheros de texto)
154
172
155
-
1.**Volumen total** — `Read reports/infection/infection-summary.log` (siempre pequeño, no necesita offset/limit):
173
+
Ejecutar el script `scripts/infection-stats.php` para los tres conteos básicos. Sustituye lo que antes eran 3 invocaciones de `Grep`/`Read` con post-proceso manual:
2.**Mutators dominantes** — `Read reports/infection/per-mutator.md`. Identifica patrones: si `LogicalOr` concentra 40 escapes, sabes que hay un patrón de guards defensivos repetido.
182
+
# Ficheros con más escapes (orienta orden de análisis)
Devuelve `línea_log:índice) path:línea Mutator`. Guardar los rangos de líneas del log por módulo para agentes paralelos.
195
+
Y luego `Read reports/infection/infection.log offset=L<n> limit=15` para inspeccionar el diff exacto. **No** componer `grep | sed`/`awk` ad-hoc — rompe permisos y es frágil.
170
196
171
197
**Nunca abrir `mutation-report.html`**: es HTML de 5-10 MB con CSS/JS embebidos; rompe el límite de mensaje y no aporta sobre los `.log`/`.md`.
0 commit comments