Relancer le diff de la galerie après changement parseur

VérifiéSûr

Relancer la galerie fournie après un changement de parseur et rapporter les comptes de chaque module par rapport à son enregistrement validé, jamais un résumé. Écrit après une première utilisation délibérément.

Spar Skills Guide Bot
TestingIntermédiaire
29/08/2026
Claude CodeCursorCodex
#regression-testing#parser-changes#baseline-diff#powershell#reporting-discipline

Recommandé pour

Synthèse automatique

Relance la galerie de modules vendoriée après une modification du parseur et compare les comptages de chaque module (nœuds, arêtes, racines, non résolus) à l'enregistrement commité servant de référence.

Points forts

  • Impose l'exécution de la galerie complète plutôt qu'un sous-ensemble, ce qui évite les faux « aucun changement » sur les modules non exécutés
  • Exige un tableau par module avec avant/après et une explication de chaque ligne, y compris celles qui n'ont pas bougé
  • Demande de formuler une prédiction avant l'exécution puis de la confronter au résultat, ce qui transforme une hausse inattendue en constat exploitable
  • Signale qu'un graphe vide ou quasi vide est probablement un défaut du parseur et non une propriété du module

Limites

  • Procédure généralisée à partir d'une seule exécution, comme le texte le reconnaît explicitement
  • Très liée à une arborescence précise (gallery/fetch.ps1, run.ps1, corpus.lock.json) et à PowerShell
  • Suppose un état git propre sous gallery/results/ et les modules déjà récupérés : inutilisable sur un clone frais sans préparation
Quand l'utiliser

À utiliser après toute modification de l'extraction, de l'identité des nœuds, de la résolution des arêtes ou de la forme du graphe, avant de taguer.

Quand l'éviter

À ne pas utiliser pour déboguer un seul module ou itérer rapidement sur un cas isolé, ni lorsque la galerie ou les sources n'ont pas encore été récupérées.

Analyse de sécurité

Sûr
Score qualité92/100

The skill is a transparent workflow document for rerunning a vendored gallery and diffing parser outputs. It invokes repository-local PowerShell scripts and git, but contains no destructive commands, secret exfiltration, obfuscated payloads, or safety-disabling instructions. Network use via fetch.ps1 is implied and legitimate for corpus checkout.

Aucun point d'attention détecté

Comment cette analyse est faite

Exemples

Full diff after an edge-resolution change
I just changed edge resolution in the parser. Run the corpus-diff procedure over the whole gallery — no -Name subset — and give me the before/after table for all eight modules with a note on what moved each row.
Explaining the modules that didn't move
Re-run the vendored gallery against the committed baseline and explain every row, including the modules whose counts stayed identical. Don't summarise the rest as 'no change'.
Prediction versus outcome
Before running gallery/run.ps1, I'll state my prediction that roots should fall after the identity fix — then run the full gallery, report the actual counts per module, and tell me whether the rise in SqlServerDsc roots is a finding or a regression.

name: corpus-diff description: Re-run the vendored gallery after a parser change and report every module's counts against its committed record - all eight, never a summary. Written on first use rather than second, deliberately. when_to_use: After any change to extraction, node identity, edge resolution or the graph shape. Also invocable by name before a tag that touches the parser.

corpus-diff

The gallery exists so that a parser change is measured on real modules instead of on one nine-node fixture. The committed results in gallery/results/ are the baseline, git is the history, and the diff is the deliverable.

This has been performed once. It is written down after one use rather than two — a deliberate exception to the two-scale bar in meta-pattern, taken because the procedure is expensive to reconstruct, the next parser change will need it, and getting the reporting wrong is what makes the whole gallery worthless rather than merely late. Treat the guidance below as one measurement generalised, not as a law.

The procedure

1. Have the modules. gallery/fetch.ps1 verifies against gallery/corpus.lock.json. Sources are never committed; a missing checkout is the normal state of a fresh clone, not a fault.

2. Record the baseline before you change anything. The committed results are the baseline, so git status --short must be clean under gallery/results/ before the run. Diffing against records already overwritten by a half-finished change measures nothing, and there is no second copy.

3. Run the whole gallery, not the module you are thinking about.

./gallery/run.ps1

One child process per module with a timeout, so a hang is a timeout record rather than a lost afternoon. -Name exists for iterating and is not how the diff is produced — a subset run leaves the other records at their old values and the diff silently reports "no change" for every module nobody ran.

4. Report every module in one table. Nodes, edges, roots, unresolved, before and after, plus one column saying what moved it.

5. Explain every row, including the ones that did not move.

The two things that are not obvious

A module whose counts do not move is as informative as one that jumps. The instinct is to report the movers and summarise the rest, and that instinct throws away the finding. Pester's unresolved count went 19 → 19 across a change to node identity, and that number is the result: Pester's single duplicated name produces no ambiguous edge, so the identity fix could not have helped it, and what Pester is actually waiting on — a sigil filter dropping 491 call sites — was untouched and said so by not moving. Az went 3 → 3 → nothing at all, which is the corpus reporting that a module of pure re-exports exercises none of this. A summary would have printed "six of eight improved" and lost both.

A number going up can be the honest answer. SqlServerDsc's roots went 186 of 496 to 252 of 532 after the identity fix, and the prediction had been that they would fall — 144 nodes were roots because their name was shadowed, read as "144 false roots that will disappear". They did not disappear. They were roots already, for the wrong reason; the fix moved the inbound edges onto the right nodes and made the reason inspectable. The composition is now checkable — 62 are *-TargetResource, 37 are file top levels — and it is the checkability, not the direction, that says the change worked.

So state the prediction before the run and report it against the outcome. A prediction that turns out wrong is worth more than an outcome with no prediction behind it, and in this instance it was the only thing that turned a rise into a finding rather than into a regression nobody could argue with.

Traps

An empty or near-empty graph is a probable defect in the parser, not a property of the module. Az.Accounts reports 47 declared exports against seven nodes and an outcome of ok. Say which you concluded and why; the silent version of this is the same failure as a gate that cannot fail — see knowledge/patterns/0017-nothing-could-have-said-otherwise.md.

A failed module still produces a record. PSDepend has failed every run. That is data and it stays in the table; a corpus where failures are absent measures only the modules that worked.

Counts are not correctness. A diff shows that numbers moved, never that they moved to the right numbers. For at least one module, verify a handful of the changed nodes by hand against the source and name which ones — that is how the two copies of DscResource.Common 0.24.5 inside SqlServerDsc were found, and nothing in the counts would have surfaced them.

Nothing here may import a corpus module. The parser is static analysis; if something in a diff would be easier with an import, that is the bug.

What failure looks like here

  • A diff reported as a summary. The rows that did not move are the ones dropped.
  • A diff produced with -Name after iterating on one module.
  • A rise reported as a regression, or a fall reported as an improvement, with no prediction written down beforehand to argue against.
  • Committed results overwritten before the baseline was read.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/run-gallery-diff-after-parser-change-mte1lgp6/download' --output '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md.part' && mv '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md.part' '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md' && test -s '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/corpus-diff' && cp -R '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6' '.claude/skills/corpus-diff'

Cursor
test -f '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md' && test -s '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/corpus-diff' && cp -R '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6' '.cursor/skills/corpus-diff'

Codex
test -f '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md' && test -s '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/corpus-diff' && cp -R '.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6' '.agents/skills/corpus-diff'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6'

openskills read 'run-gallery-diff-after-parser-change-mte1lgp6'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/run-gallery-diff-after-parser-change-mte1lgp6/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires