Vérification de cohérence inter-couches

VérifiéSûr

Méthodologie systématique pour vérifier la cohérence mutuelle des couches de spécification IA, BE et FE. Couvre les matrices de couverture, les vérifications de correspondance de champs, la propagation des codes d'erreur, la cohérence du contrôle d'accès et la détection de dérive des contrats de données.

Spar Skills Guide Bot
DeveloppementAvancé
23/07/2026
Claude CodeCursorCodex
#spec-audit#cross-layer#api-contract#consistency-check#traceability

Recommandé pour

Synthèse automatique

Méthodologie de vérification systématique de la cohérence entre les spécifications IA, BE et FE, sous forme de matrices de couverture et de contrôles de contrats de données.

Points forts

  • Fournit cinq contrôles distincts et nommés : couverture IA→BE, mapping des champs BE→FE, propagation des codes d'erreur, règles de contrôle d'accès, dérive de contrat.
  • Impose des formats de sortie explicites (COVERAGE GAP, MAPPING GAP, CONSISTENCY ISSUE) avec attribution de la couche fautive et remédiation suggérée.
  • S'intègre comme passe obligatoire dans des pipelines existants (audit, remédiation, propagation de décision, évolution de fonctionnalité).
  • Les tableaux de correspondance produisent une trace vérifiable, plus facile à relire qu'une simple liste informelle.

Limites

  • Suppose une arborescence fixe `.memory/wiki/specs/{ia,be,fe}` et des skills compagnons nommés explicitement ; inutilisable tel quel avec une autre organisation documentaire.
  • La vérification est entièrement manuelle, lecture par lecture : elle devient coûteuse sur de grands corpus de spécifications.
  • Le skill ne produit que des constats étiquetés, il ne corrige ni les specs ni le code ; la section sur la détection de dérive de contrat est par ailleurs la plus succincte.
Quand l'utiliser

À lancer dès que les trois couches de spécification disposent d'au moins un document, et avant de franchir une étape de pipeline.

Quand l'éviter

À éviter tant que les spécifications IA, BE ou FE n'existent pas encore, ou sur un projet qui ne suit pas cette structure de wiki de specs.

Analyse de sécurité

Sûr
Score qualité92/100

The skill defines a documentation and specification consistency review methodology. It only reads local markdown spec files under .memory/wiki/specs/ and produces structured textual findings. No command execution, network access, file modification, or data exfiltration is instructed. No destructive or obfuscated actions are present.

Aucun point d'attention détecté

Comment cette analyse est faite

Exemples

IA → BE coverage audit
Read my IA shards under .memory/wiki/specs/ia/ and the BE specs, then build the coverage matrix and list every IA entity, state transition, or user action that has no matching BE section.
Missing error handlers
Cross-reference the error codes defined in the BE specs against the FE specs and tell me which HTTP status codes and application error types have no FE handler, with the remediation for each.
Field rename drift
We renamed the field `accountId` to `workspaceId` in the BE contract. Scan all specs under .memory/wiki/specs/ for stale references to the old name and report each file and section.

name: cross-layer-consistency description: Systematic methodology for verifying that IA, BE, and FE specification layers are mutually consistent. Covers coverage matrices, field mapping checks, error code propagation, access control consistency, and data contract drift detection.

Cross-Layer Consistency

This skill provides the systematic consistency verification pass run by audit-ambiguity-execute, remediate-pipeline-execute, propagate-decision-scan, and evolve-feature-cascade, and its output is a set of labeled consistency issues with layer attribution.

When to Use

  • After all three spec layers (IA, BE, FE) have at least one document written
  • As part of every audit, every remediation, every decision propagation, and every feature evolution cascade
  • As a standalone pre-gate check before advancing any pipeline stage

Instructions

1. IA → BE Coverage Matrix

Open .memory/wiki/specs/ia/index.md to enumerate all IA shards. For each shard, read its data model and state transition sections. Then open .memory/wiki/specs/be/ and verify:

  • Every IA data model entity has a corresponding BE spec section describing its schema, storage contract, and CRUD operations.
  • Every IA state transition has a corresponding BE endpoint that drives it.
  • Every IA user action (described in the interactions section) has a corresponding API contract in the BE spec.

Build a coverage table:

| IA Shard | IA Section | BE Spec Section | Status | |----------|-----------|-----------------|--------| | [name] | [section] | [BE section] | ✅ / ❌ |

Document each gap as:

COVERAGE GAP: IA shard [name] § [section] → no corresponding BE spec section found.

2. BE → FE Field Mapping Check

For every BE endpoint documented in .memory/wiki/specs/be/, enumerate all response fields. For each field, verify it appears in .memory/wiki/specs/fe/ — in a component prop definition, a display element, a table column, or an explicit "field not rendered" exclusion.

Then for each FE component, verify every input prop maps to a BE request field.

Build a mapping table:

| BE Endpoint | Field | FE Spec Location | Status | |-------------|-------|-------------------|--------| | [endpoint] | [field] | [FE location] | ✅ / ❌ |

Document each gap as:

MAPPING GAP: BE endpoint [name] field [field] → not referenced in FE spec.

3. Error Code Consistency Cross-Reference

Build an error code table across layers: for every HTTP status code and application error type defined in BE specs, create a row. Then for each row, identify the FE spec location that handles it (error boundary, toast handler, inline error state, retry logic).

| BE Endpoint | Error Code | FE Handler | FE Spec Location | Status | |-------------|-----------|------------|-------------------|--------| | [endpoint] | [code] | [handler] | [location] | ✅ / ❌ |

Any BE error code with no corresponding FE entry is a gap. Document as:

CONSISTENCY ISSUE: BE § [endpoint] error [code] ↔ FE — no handling found — remediation: add [code] handler to [FE spec section].

4. Access Control Propagation Check

For every access control rule defined in IA shards (role-resource-operation triplets), verify the rule appears in both:

  • BE: as a middleware guard, route-level permission check, or explicit authorization step in the endpoint contract.
  • FE: as a conditional render, route guard, or disabled state on the triggering UI element.

A rule missing from either layer is a gap. Document as:

CONSISTENCY ISSUE: IA § [access control section] permission [role→resource:operation] ↔ [BE or FE] — not found — remediation: add guard to [target layer § section].

5. Data Contract Drift Detection

When invoked in the context of a schema change (e.g., after evolve-contract or a propagate-decision run), scan all files under .memory/wiki/specs/ for references to the changed type, field name, or validation rule. Check for:

  • Field name string matches
  • Type annotation references
  • Validation rule references

For each file that references the old definition and has not been updated, document as:

CONSISTENCY ISSUE: [source layer] § [section] ↔ [target file] § [section] — [field/type] changed in source but not reflected in target — remediation: update [target] to match [source].

6. Documenting Inconsistencies

All consistency issues must be written using this exact format:

CONSISTENCY ISSUE: [source layer] § [section] ↔ [target layer] § [section] — [what is inconsistent] — [remediation: update [target] to match [source] OR raise for user decision]
  • Source layer is the authoritative layer (the one that should not change).
  • Target layer is the one that needs updating.
  • When it is unclear which layer is authoritative, write raise for user decision as the remediation and present both versions to the user. Never silently pick one.

Anti-Patterns

  • One-direction-only checking — Checking only one direction of the matrix (IA→BE but not BE→IA). Coverage gaps exist in both directions.
  • Skipping the error code table — Skipping the error code table because "the FE will just show a generic error." Every BE error code must have an explicit FE handling specification.
  • Treating access control propagation as optional — Treating access control propagation as optional when the spec "looks simple." Missing FE route guards are a security gap, not a style preference.

Related Skills

  • resolve-ambiguity — Hand off to resolve-ambiguity when a consistency issue cannot be resolved by simply updating the target layer to match the source. Specifically: when both layers present plausible but conflicting definitions and it is unclear which is authoritative, or when the inconsistency reveals a gap that requires new information from the user. This skill detects what is inconsistent; resolve-ambiguity determines what the correct answer should be through its tiered information-gathering methodology.

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

Cursor
test -f '.skill-downloads/cross-layer-consistency-mrx3xz1x/SKILL.md' && test -s '.skill-downloads/cross-layer-consistency-mrx3xz1x/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/cross-layer-consistency' && cp -R '.skill-downloads/cross-layer-consistency-mrx3xz1x' '.cursor/skills/cross-layer-consistency'

Codex
test -f '.skill-downloads/cross-layer-consistency-mrx3xz1x/SKILL.md' && test -s '.skill-downloads/cross-layer-consistency-mrx3xz1x/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/cross-layer-consistency' && cp -R '.skill-downloads/cross-layer-consistency-mrx3xz1x' '.agents/skills/cross-layer-consistency'

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/cross-layer-consistency-mrx3xz1x'

openskills read 'cross-layer-consistency-mrx3xz1x'

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/cross-layer-consistency-mrx3xz1x/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