Standards de Qualité

VérifiéSûr

Référence pour les seuils de qualité protégés et les commandes d'outils qualité. Utilisez-le pour comprendre les métriques requises, exécuter des vérifications complètes ou déterminer quelle compétence spécialisée invoquer pour corriger les violations. Aide à maintenir des barrières de qualité strictes avant les commits.

Spar Skills Guide Bot
TestingDébutant
02/06/2026
Claude Code
#quality-thresholds#phpinsights#deptrac#psalm#infection

Recommandé pour

Synthèse automatique

Fournit un aperçu des seuils de qualité protégés et des commandes pour des vérifications qualité complètes, en orientant l'utilisateur vers les compétences spécialisées pour corriger les problèmes.

Points forts

  • Centralise toutes les métriques qualité dans une seule référence.
  • Spécifie clairement quelles compétences utiliser pour les violations.
  • Fournit des commandes rapides pour les vérifications CI.
  • Couvre plusieurs outils (PHPInsights, Deptrac, Psalm, Infection, PHPUnit).

Limites

  • N'effectue pas de corrections elle-même ; dépend d'autres compétences.
  • Peut devenir obsolète si les seuils changent.
  • Ne couvre que la pile PHP (implicitement).
Quand l'utiliser

Utilisez-la lorsque vous devez comprendre les niveaux de qualité requis avant de commiter ou lorsque vous devez identifier quelle compétence spécialisée traite un problème qualité spécifique.

Quand l'éviter

Ne l'utilisez pas pour corriger réellement des problèmes qualité ; utilisez plutôt les compétences dédiées comme deptrac-fixer, complexity-management ou testing-workflow.

Analyse de sécurité

Sûr
Score qualité95/100

This skill is purely informational, providing reference tables of quality thresholds and commands (all standard make targets) without any destructive or exfiltrating instructions. No code execution, network calls, or safety bypasses are involved.

Aucun point d'attention détecté

Comment cette analyse est faite

Exemples

Check quality thresholds
I need to see the protected quality thresholds for our PHP project before I commit. Show me the required percentages for PHPInsights and other tools.
Run comprehensive checks
Run all CI quality checks before commit. What command should I use?
Route to fix tool
PHPInsights shows a complexity violation. Which skill should I use to fix it?

name: quality-standards description: Overview of protected quality thresholds and quick reference for all quality tools. Use when you need to understand quality metrics, run comprehensive quality checks, or learn which specialized skill to use. For specific issues, use dedicated skills (deptrac-fixer for Deptrac, complexity-management for PHPInsights, testing-workflow for coverage).

Quality Standards Skill

Context (Input)

  • Need to understand protected quality thresholds
  • Running comprehensive quality checks before commit
  • Determining which specialized skill to use for specific issues
  • Quick reference for quality tool commands

Task (Function)

Understand quality metrics and route to appropriate specialized skill for fixes.

Success Criteria: Know which skill to use for your specific quality issue.

Protected Quality Thresholds

CRITICAL: These thresholds are protected and must NEVER be lowered.

PHPInsights (Source Code)

| Metric | Required | Fix With | | ------------ | -------- | ---------------------------------------------------------- | | Quality | 100% | complexity-management | | Complexity | 94% | complexity-management | | Architecture | 100% | deptrac-fixer | | Style | 100% | Run make phpcsfixer |

PHPInsights (Tests)

| Metric | Required | Fix With | | ------------ | -------- | ---------------------------------------------------------- | | Quality | 95% | complexity-management | | Complexity | 95% | complexity-management | | Architecture | 90% | deptrac-fixer | | Style | 95% | Run make phpcsfixer |

Other Tools

| Tool | Metric | Required | Fix With | | --------- | --------------- | -------- | ------------------------------------------------ | | Deptrac | Violations | 0 | deptrac-fixer | | Psalm | Errors | 0 | Fix reported issues | | Psalm | Security Issues | 0 | Fix tainted flows | | Infection | MSI | 100% | testing-workflow | | PHPUnit | Coverage | 100% | testing-workflow |

Quick Reference Commands

Comprehensive Checks

# Run all CI checks (recommended before commit)
make ci

Success: Must output "✅ CI checks successfully passed!"

Individual Quality Checks

| Check | Command | Purpose | | ------------------- | ------------------------ | ---------------------------- | | Code quality | make phpinsights | All PHPInsights metrics | | Complexity analysis | make phpmd | Find high-complexity methods | | Static analysis | make psalm | Type checking and errors | | Security taint | make psalm-security | Security vulnerability scan | | Architecture | make deptrac | Layer boundary validation | | Code style | make phpcsfixer | Auto-fix PSR-12 style | | Composer validation | make composer-validate | Validate composer.json |

Testing Commands

| Check | Command | Purpose | | ----------------- | -------------------------- | --------------------------- | | Unit tests | make unit-tests | Domain/Application logic | | Integration tests | make integration-tests | Component interactions | | E2E tests | make behat | Full user scenarios (Behat) | | All tests | make all-tests | Unit + Integration + E2E | | Test coverage | make tests-with-coverage | Generate coverage report | | Mutation tests | make infection | Test quality validation |

Routing to Specialized Skills

When quality checks fail, use the appropriate specialized skill:

Architecture Issues

  • Deptrac violations → deptrac-fixer

    • Domain depends on Infrastructure
    • Layer boundary violations
    • "must not depend on" errors
  • DDD architecture patterns → implementing-ddd-architecture

    • Creating new entities/value objects
    • Implementing CQRS patterns
    • Understanding layer responsibilities

Code Quality Issues

  • High cyclomatic complexity → complexity-management

    • PHPInsights complexity < 94%
    • PHPMD reports high CCN
    • Methods too complex
  • Code style issues → Run make phpcsfixer

    • PSR-12 violations
    • Line length > 100 chars
    • Formatting issues

Testing Issues

  • Test failures → testing-workflow
    • Unit/Integration/E2E failures
    • Mutation testing (Infection)
    • Test coverage < 100%

Workflow Integration

  • Before committing → ci-workflow

    • Run all checks systematically
    • Fix failures in priority order
    • Ensure all checks pass
  • PR review feedback → code-review

    • Fetch and address PR comments
    • Systematic comment resolution

Quality Improvement Workflow

Step 1: Run Comprehensive Checks

make ci

Step 2: Identify Failing Check

Check output for specific failure:

❌ CI checks failed:
  - phpinsights: Complexity score too low (93.5% < 94%)

Step 3: Use Specialized Skill

Based on failure type, use appropriate skill:

| Failure Pattern | Skill to Use | | -------------------------- | ------------------------ | | "Complexity score too low" | complexity-management | | "Deptrac violations" | deptrac-fixer | | "must not depend on" | deptrac-fixer | | "tests failed" | testing-workflow | | "Psalm found errors" | Fix type errors directly | | "escaped mutants" | testing-workflow |

Step 4: Re-run CI

make ci

Repeat until: "✅ CI checks successfully passed!"

Constraints (Parameters)

NEVER

  • Lower quality thresholds in config files (phpinsights.php, infection.json5, etc.)
  • Skip failing checks to "save time"
  • Commit code without all CI checks passing
  • Modify deptrac.yaml to allow violations (fix code, not config)
  • Disable security checks

ALWAYS

  • Fix code to meet standards (not config to meet code)
  • Run make ci before creating commits
  • Use specialized skills for specific quality issues
  • Maintain 100% test coverage
  • Keep cyclomatic complexity low (target: < 5 per method)
  • Respect hexagonal architecture boundaries

Format (Output)

Expected CI Output

✅ CI checks successfully passed!

Expected PHPInsights Output

[CODE] 100.0 pts       ✅ Target: 100%
[COMPLEXITY] 94.0 pts  ✅ Target: 94%
[ARCHITECTURE] 100 pts ✅ Target: 100%
[STYLE] 100.0 pts      ✅ Target: 100%

Expected Deptrac Output

✅ No violations found

Expected Infection Output

Mutation Score Indicator (MSI): 100%

Verification Checklist

After using this skill:

  • [ ] Identified which quality check is failing
  • [ ] Selected appropriate specialized skill for the issue
  • [ ] Ready to execute specialized skill workflow
  • [ ] Understand which threshold applies to the failure
  • [ ] Know the command to re-run the check after fixes

Related Skills

Reference Documentation

For detailed examples and patterns, see:

  • Refactoring patterns → complexity-management skill
  • Architecture rules → implementing-ddd-architecture skill
  • Layer boundaries → deptrac-fixer skill
  • Testing strategies → testing-workflow skill

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/quality-standards-mm5t89xb/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/quality-standards-mm5t89xb' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/quality-standards-mm5t89xb/download' --output '.skill-downloads/quality-standards-mm5t89xb/SKILL.md.part' && mv '.skill-downloads/quality-standards-mm5t89xb/SKILL.md.part' '.skill-downloads/quality-standards-mm5t89xb/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/quality-standards-mm5t89xb/SKILL.md' && test -s '.skill-downloads/quality-standards-mm5t89xb/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/quality-standards' && cp -R '.skill-downloads/quality-standards-mm5t89xb' '.claude/skills/quality-standards'

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/quality-standards-mm5t89xb'

openskills read 'quality-standards-mm5t89xb'

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/quality-standards-mm5t89xb/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