Valider la sortie de phase ADLC

VérifiéPrudence

Commande de validation qui vérifie les artefacts ADLC (exigences, architecture, tâches, implémentation) avant de passer à la phase suivante.

Spar Skills Guide Bot
DeveloppementIntermédiaire
18/11/2026
Claude Code
#spec-driven#validation#quality-gate#workflow#review

Recommandé pour

Synthèse automatique

Contrôle les artefacts de chaque phase ADLC — exigence, architecture, tâches, implémentation — à l'aide de listes de vérification avant d'autoriser le passage à la phase suivante.

Points forts

  • Détecte automatiquement la phase courante à partir des fichiers présents (requirement.md, architecture.md, tasks/, tâches terminées) et cible les bons contrôles.
  • Listes de contrôle concrètes : frontmatter valide, critères d'acceptation testables, DAG de dépendances sans cycle, couverture des critères par au moins une tâche.
  • S'arrête explicitement avec un message actionnable si la structure .adlc/ n'a pas été initialisée.
  • Le contrôle de couverture des obligations renvoie aux règles de la REQ lues à l'exécution au lieu d'en figer une copie dans la compétence.

Limites

  • Suppose un espace de travail .adlc/ déjà initialisé (specs, templates, contexte) ; sans lui, la validation ne peut pas démarrer.
  • Plusieurs critères sont liés à une pile précise (schéma Firestore, conventions REST, couche routes → services → repositories) et ne s'appliquent pas telles quelles à un autre projet.
  • Reste une revue par liste de contrôle, sans verdict automatisé bloquant ; et la compétence exécute des extraits shell au chargement, à relire avant de lui faire confiance.
Quand l'utiliser

Quand un artefact ADLC vient d'être rédigé et qu'il faut un contrôle qualité structuré avant de passer à la phase suivante.

Quand l'éviter

Quand l'espace .adlc/ n'existe pas encore ou quand le besoin est une vérification automatisée de build ou de tests plutôt qu'une revue de documents.

Analyse de sécurité

Prudence
Score qualité82/100

Nothing here exfiltrates data, deletes files, or hides payloads; all paths are local and the intent (checking .adlc artifacts before phase advancement) is legitimate. The risk is moderate rather than safe because the skill executes shell on load and sources a dynamically-resolved shell library to run `adlc_lessons ack-check`, which is a real code-execution surface if any of the candidate root paths or `.adlc/partials/` is attacker-influenced.

Points d'attention
  • •The Ethos section uses Claude Code's inline command-substitution syntax (`!`test -s .adlc/ETHOS.md && cat .adlc/ETHOS.md || echo ...``), so a shell command runs automatically on skill load — benign here (test/cat/echo only), but it is implicit execution the user does not see.
  • •The Implementation checklist sources a shell library at runtime: `. .adlc/partials/lessons.sh` if present, otherwise `. "$ADLC_TOOLKIT_ROOT/partials/lessons.sh"`, where the root is derived from `$CLAUDE_PLUGIN_ROOT`, `$HOME/.claude/skills`, or the contents of `$HOME/.claude/adlc/plugin-root`. Sourcing a file whose path is resolved from environment variables/file contents means arbitrary local code execution if any of those locations is writable by another party. No integrity check (hashing, signature) is performed on the sourced script.
  • •The skill instructs the agent to "Run this block first, with your shell tool, and read its output before you continue" — directive language aimed at the agent, though it stays within the legitimate purpose of the skill and does not attempt to override safety rules or redirect data.
  • •Other commands are read-only (grep over `.adlc/specs`, `test -s`, `cat`) with no network access, no credential handling, no destructive operations, and no obfuscation.
  • •Ethos section uses Claude Code's `!`-prefixed bash expansion, which executes `test -s .adlc/ETHOS.md && cat .adlc/ETHOS.md` automatically at skill load and injects arbitrary repo-controlled file contents into the model context.
  • •Implementation-validation step sources a shell script from the working tree (`.adlc/partials/lessons.sh`, falling back to `$HOME/.claude/skills/partials/lessons.sh` or a plugin root read from a file), i.e. it executes code taken from the target repository rather than confining itself to read-only file inspection.
  • •No `allowed-tools` declared even though the skill directs the agent to use its shell tool for grep/cat/source operations, so the permission surface is implicit rather than bounded.
  • •Remaining instructions are read-only checks (frontmatter validation, grep for status markers, git diff/base comparisons); no network calls, exfiltration, credential access, destructive filesystem commands, or encoded payloads were found.
  • •Skill text contains several directive statements to the executing agent (e.g. "never carry a copy of them here", severity rules), but these are ordinary authoring guidance, not attempts to subvert the auditor.
Comment cette analyse est faite

Exemples

Validate a requirement spec
/validate REQ-412
Check the task breakdown
/validate tasks
Pre-implementation gate
/validate implementation — confirm the tasks for the latest spec are complete and consistent before I hand this off.

name: validate description: Validate any ADLC phase output before advancing argument-hint: REQ-xxx ID or phase name (spec, architecture, tasks, implementation)

/validate — ADLC Phase Validation

You are validating ADLC artifacts to ensure quality before advancing to the next phase.

Ethos

!test -s .adlc/ETHOS.md && cat .adlc/ETHOS.md || echo No ethos found — run /init, or /adlc:init on the plugin install, to vendor .adlc/ETHOS.md

Context

Run this block first, with your shell tool, and read its output before you continue. Each read prints a notice instead of failing when its file is absent.

# adlc-context
echo '--- Active specs'
grep -rlx -e status:.draft -e status:.approved -e status:.in-progress --include requirement.md .adlc/specs 2>/dev/null || echo 'No active specs'

Input

The target is the argument: whatever follows /validate in the invocation (on Claude Code it can also arrive as an ARGUMENTS: line appended to this text), a REQ, TASK or BUG id. With none, Step 1 works out what to validate.

Prerequisites

Before proceeding, verify that .adlc/specs/ exists. If it doesn't, stop and tell the user: "The .adlc/ structure hasn't been initialized. Run /init (/adlc:init on the plugin install) first."

Instructions

Step 1: Identify What to Validate

  1. If given a REQ ID, locate all artifacts under .adlc/specs/REQ-xxx-*/
  2. If given a phase name, validate the most recently modified artifacts for that phase
  3. Determine the current phase based on what artifacts exist:
    • Spec phase: Only requirement.md exists
    • Architecture phase: architecture.md exists alongside requirement
    • Task phase: tasks/ directory with task files exists
    • Implementation phase: Tasks have status complete or code changes exist

Step 2: Validate Based on Phase

Validating a Requirement Spec

  • [ ] Frontmatter has valid id, title, status, created, updated fields
  • [ ] Description clearly explains what AND why
  • [ ] Acceptance criteria are specific, testable, and use checkbox format
  • [ ] No implementation details in the requirement (belongs in architecture)
  • [ ] Assumptions are explicitly stated
  • [ ] Out of scope items are defined to prevent scope creep
  • [ ] External dependencies are identified
  • [ ] No duplicate or overlapping requirements with existing specs

Validating Architecture

  • [ ] Architecture follows existing patterns from .adlc/context/architecture.md
  • [ ] New ADRs include rationale (not just decisions)
  • [ ] Data model changes are compatible with existing Firestore schema
  • [ ] API endpoint design follows REST conventions from .adlc/context/conventions.md
  • [ ] Service layer follows the layered pattern (routes → services → repositories)
  • [ ] No architectural conflicts with other in-progress requirements

Validating Tasks

  • [ ] Every task has valid frontmatter (id, title, status, parent, created, updated, dependencies)
  • [ ] Tasks form a valid DAG — no circular dependencies (including cross-repo dependencies)
  • [ ] Every acceptance criterion from the requirement is covered by at least one task
  • [ ] Each task lists specific files to create/modify
  • [ ] Tasks are appropriately scoped (not too large, not too granular)
  • [ ] Test requirements are included in task acceptance criteria
  • [ ] Dependencies reference valid task IDs

Verification obligations (REQ-595) — three checks over the task set's ## Verification blocks (shape defined in .adlc/templates/task-template.md). Read the REQ's rules at run time; never carry a copy of them here, because an enumeration in a skill rots the moment a spec changes.

A task file with no ## Verification section is valid. Its absence is reported by the coverage check below, not treated as a malformed task.

  • [ ] Obligation coverage — every numbered BR and AC in the REQ is cited by at least one task's ## Verification block. Report the unmapped ids by name. Severity: Warning (advisory, non-blocking) in epoch 1. - ACs are addressed by 1-based ordinal within the REQ's ## Acceptance Criteria list — the requirement template does not print AC numbers, so position is the addressing. - BR and AC coverage are gated on the same footing. Acceptance criteria do not reduce to business rules — a REQ can carry ACs with no one-to-one BR — so reporting BRs alone would leave half the omission class open. - A REQ with zero numbered BRs passes trivially: emit a notice and move on. Do not invent rules to check. An unnumbered legacy prose spec is not gate-able, and fabricating ids to gate it would report failures against rules nobody wrote.
  • [ ] Benign-path coverage — every BR describing detection, refusal, or a halt carries at least one obligation with benign_path: yes (a case asserting the detector does not fire on the legitimate actor). A detector validated only against adversarial inputs ships broken and passes its own suite. Severity: Warning (advisory, non-blocking) in epoch 1. - Match the rule text on case-insensitive stems — detect, refus, halt, reject, block, flag — so refusal/refuses and blocking/blocked both hit. Do not use \b word anchors: BSD grep -E on macOS does not honor them, and the check would silently never fire on the dominant developer platform.
  • [ ] Vacuous verification run — a verification run that exits 0 having done no work is a failure, not a pass. Severity: Blocker. - Work is defined per kind, because the kinds are not commensurable: a test-case obligation reports executed cases; a structural-check obligation reports files scanned by the lint invocation (many obligations legitimately share one invocation, so per-obligation case counts do not exist for that kind). - Read the count from whichever runner the obligation's artifact names, and treat a status that runner reserves for "collected/scanned nothing" as a zero count. Do not assume a runner here — which one a project uses is the project's choice, read from its stack:, and a runner named in this skill would be the wrong one for the next project. - Most runners already signal an empty run, so this needs no new tooling. In this repo the two surfaces are concrete: tools/lint-skills prints scanned <N> SKILL.md file(s) to stderr and exits 255 when N is zero, and the tools/ test runner exits 5 on zero collected. Consult the consumer project's own runner for the equivalent signal rather than porting these. - Either count reaching zero fails the gate. - This one blocks from epoch 1 while the two above do not, and the asymmetry is deliberate: the checks above are coverage judgments about obligation shape, whereas a zero-work run is evidence the verification did not run at all. A green suite that executed nothing proves nothing.

Why two advisory and one blocking: a coverage gate that blocked on day one would fail every in-flight REQ written before obligations existed. The advisory epoch lets the corpus accumulate obligations first; promotion to blocking is a separate follow-up REQ. The two advisory checks share a posture on purpose — both are obligation-shape judgments, and a mixed gate where one new shape check blocks and the other does not is incoherent to anyone reading the output.

Cross-repo tasks — only applies if .adlc/config.yml in the primary repo declares more than one entry under repos:. Skip these checks in single-repo mode.

  • [ ] Every task has a repo: field in its frontmatter
  • [ ] Every repo: value matches an id declared in .adlc/config.yml under repos:
  • [ ] No task modifies files outside its declared repo: — all paths under "Files to Create/Modify" live in that repo
  • [ ] At least one task targets the primary repo (even if just spec/doc updates) OR a follow-up confirms the primary needs no code changes
  • [ ] Cross-repo dependencies make sense (e.g., a frontend task depending on a backend task, not the reverse)

Validating Implementation

  • [ ] All task acceptance criteria are met

  • [ ] Tests pass (npm test or equivalent)

  • [ ] Code follows conventions from .adlc/context/conventions.md

  • [ ] No new lint warnings or errors

  • [ ] All requirement acceptance criteria are satisfied

  • [ ] ADLC artifacts are updated (task statuses set to complete)

  • [ ] Applicable lessons are acknowledged (REQ-647 BR-4, standalone only — no pipeline calls this phase). Run the same check /proceed Phase 5 Step B runs. It reads lessons.phase5 from the REQ's pipeline-state.json (the primary repo path's copy) when one is recorded; otherwise pass --spec and one --component per changed path's most specific component, and it computes a Phase-5-style set from the diff:

    ```sh
    ADLC_TOOLKIT_ROOT="${CLAUDE_PLUGIN_ROOT}"; [ -n "$ADLC_TOOLKIT_ROOT" ] || [ ! -d "$HOME/.claude/skills/partials" ] || ADLC_TOOLKIT_ROOT="$HOME/.claude/skills"; [ -n "$ADLC_TOOLKIT_ROOT" ] || ADLC_TOOLKIT_ROOT=$(cat "$HOME/.claude/adlc/plugin-root" 2>/dev/null); export ADLC_TOOLKIT_ROOT="${ADLC_TOOLKIT_ROOT:-$HOME/.claude/skills}"
    if [ -f .adlc/partials/lessons.sh ]; then . .adlc/partials/lessons.sh; else . "$ADLC_TOOLKIT_ROOT/partials/lessons.sh"; fi
    adlc_lessons ack-check --state "<pipeline-state.json>" --root . --worktree . --base "origin/<integration-branch>" --tasks-dir "<.adlc/specs/REQ-xxx-*/tasks>" --spec "<requirement.md>" --component "<component>"
    ```
    
    Report each `Applicable lesson not acknowledged: …` line, and the `(+N more …)` line, as **Info** — never Warning or Blocker. A return of 2 (`lessons: unavailable — …`) is reported as one Info line and the validation continues.
    

Step 3: Report Results

  1. Display validation results as a checklist with pass/fail for each item

  2. Categorize issues by severity:

    • Blocker: Must fix before advancing (e.g., missing acceptance criteria, circular deps, a vacuous verification run)
    • Warning: Should fix but won't block (e.g., vague wording, missing edge case, unmapped BR/AC obligations, a detector rule with no benign path)
    • Info: Suggestions for improvement

    Advisory obligation findings (REQ-595): report unmapped BR/AC ids and missing benign paths as Warning, and say plainly in the output that they do not block advancement in this epoch. Do not silently omit them because they are non-blocking — an unreported gap is exactly the omitted-requirement failure the check exists to surface, and an advisory finding nobody sees is worth nothing. Conversely, do not present them as Blockers: promotion to blocking is a named follow-up REQ, and pre-empting it here would fail every REQ written before obligations existed.

  3. If all checks pass, confirm the artifact is ready to advance

  4. If blockers exist, list specific fixes needed

Step 4: Recommend Next Action

  • Spec validated → "Ready for /architect"
  • Architecture validated → "Ready for implementation"
  • Tasks validated → "Ready for implementation"
  • Implementation validated → "Ready for /review (/adlc:review on the plugin install)"

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/validate-adlc-phase-output-mwlmgk5x/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/validate-adlc-phase-output-mwlmgk5x' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/validate-adlc-phase-output-mwlmgk5x/download' --output '.skill-downloads/validate-adlc-phase-output-mwlmgk5x/SKILL.md.part' && mv '.skill-downloads/validate-adlc-phase-output-mwlmgk5x/SKILL.md.part' '.skill-downloads/validate-adlc-phase-output-mwlmgk5x/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.

Extrait original : Prerequisites

Before proceeding, verify that .adlc/specs/ exists. If it doesn't, stop and tell the user: "The .adlc/ structure hasn't been initialized. Run /init (/adlc:init on the plugin install) first."

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/validate-adlc-phase-output-mwlmgk5x/SKILL.md' && test -s '.skill-downloads/validate-adlc-phase-output-mwlmgk5x/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/validate' && cp -R '.skill-downloads/validate-adlc-phase-output-mwlmgk5x' '.claude/skills/validate'

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/validate-adlc-phase-output-mwlmgk5x'

openskills read 'validate-adlc-phase-output-mwlmgk5x'

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/validate-adlc-phase-output-mwlmgk5x/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