Finaliser le pipeline

VérifiéSûr

Finalise le pipeline en cours, vérifie les prérequis, met à jour l'état et les métriques.

Spar Skills Guide Bot
DevOpsIntermédiaire
1024/07/2026
Claude Code
#pipeline#finalization#spec-management#build-review#metrics

Recommandé pour

Notre avis

Finalise le pipeline courant en vérifiant les étapes obligatoires, met à jour la spécification, déplace les fichiers, capture les connaissances et rapporte les métriques.

Points forts

  • Impose des vérifications obligatoires (revue, build, intégrité)
  • Assure la traçabilité des spécifications et des décisions
  • Capture automatiquement les motifs et métriques pour la rétrospective
  • Gère aussi le cas d'annulation

Limites

  • Dépend d'une structure de projet spécifique (.claude/)
  • Nécessite des scripts externes (rtk, sync-registry)
  • Aucun mécanisme de rollback après finalisation
Quand l'utiliser

Après une implémentation réussie et une revue approuvée pour fermer formellement un pipeline.

Quand l'éviter

Tant que les itérations ne sont pas terminées ou qu'aucune revue n'a été réalisée.

Analyse de sécurité

Sûr
Score qualité88/100

The skill manages internal pipeline state files (move, delete, update) and runs pre-existing project scripts; it does not exfiltrate data, execute downloaded payloads, or perform destructive system-wide actions. All file operations are scoped to the project's .claude directory.

Aucun point d'attention détecté

Exemples

Complete pipeline
/complete
Cancel pipeline
I want to cancel the current pipeline.

/complete - Finalize Pipeline

Trigger

/complete

Description

Finalizes the current pipeline, either completing or canceling.

Verification Gate (MANDATORY)

  1. Review completed: Check pipeline state — review agent MUST have run and returned APPROVED. If not → dispatch review first (see resume.md step 19)
  2. Build passes: run build command for each affected subproject (from pipeline-config.md)
  3. Changes match spec: each [x] corresponds to a real file
  4. Zero CRITICAL issues: review report shows zero CRITICAL violations (SOLID, design system, patterns, i18n, integration)
  5. No regressions: existing features still work

If ANY gate fails: do NOT mark complete → report what failed + suggest fix. If review wasn't run → run it now before completing.

Action

  1. Locate active spec in .claude/spec/active/
  2. If none exists → inform user and stop
  3. Spec Checkpoint — update spec header:
    • ### Status: completed
    • ### Phase: CLOSE
    • ### Checkpoint: {ISO timestamp now}
    • Mark all remaining [ ] as [x]
  4. Entity Registry — update if needed:
    • node .claude/scripts/sync-registry.js
  5. Move spec from .claude/spec/active/ to .claude/spec/completed/
  6. Pipeline State — cleanup:
    • Extract spec-name from the spec directory (e.g. 2026-02-26-linked-services-card)
    • Delete .claude/.pipeline-states/{spec-name}.json (removes from statusline) 6b. Knowledge Capture:
    • Review patterns discovered during this pipeline
    • For each significant pattern/convention/entity discovered:
      echo '{"type":"pattern","name":"...","description":"...","source":"{spec-name}"}' | node .claude/scripts/knowledge-update.js
      
    • Focus on: naming conventions used, architectural decisions, integration patterns
    • Skip trivial or already-known patterns

6c. Token Economy — RTK report (if available):

  • Run rtk gain --all --format json via Bash
  • If RTK available: extract saved_tokens and savings_pct
  • Include in output block below 6d. Metrics Archive:
  • Read metrics from .claude/.pipeline-states/{spec-name}.json
  • If metrics exist, ensure .claude/metrics/ directory exists
  • Save to .claude/metrics/{spec-name}.json:
    {
      "name": "{spec-name}",
      "completedAt": "{ISO timestamp}",
      "durationMs": "{calculated from startedAt to now}",
      "apiCalls": "{from metrics}",
      "retries": "{from metrics}",
      "toolBreakdown": "{from metrics}",
      "rtkSavings": { "saved": N, "pct": N }
    }
    
  • If no metrics in state file, skip silently
  1. Output — visual feedback:

    ================================================================
      PIPELINE COMPLETE — {spec-name}
      Agents: {n} ok | Files: {created} created, {modified} modified
      [v] Registry updated | [v] Spec moved to completed/
      Token Economy: {saved}k saved ({pct}% reduction) — RTK
    ================================================================
    

    If RTK is not installed or the gain command fails, omit the Token Economy line.

Cancellation Flow

If the user wants to cancel (not complete):

  • Update spec: ### Status: cancelled
  • Move to completed/ anyway (for history)
  • Delete .claude/.pipeline-states/{spec-name}.json
  • Output: "Pipeline cancelled. Spec archived in completed/."

Results Documentation

On completion, the output must include:

  • Summary of changes (what and why)
  • Files created/modified

When to Use

  • After successful implementation and review
  • To cancel an ongoing pipeline
  • To force close if something went wrong
Skills similaires