Gate Build - Validation de compilation

VérifiéPrudence

Exécute les commandes de build et test configurées, capture les résultats comme preuve. Retourne PASS si les commandes exit 0, FAIL sinon. Gate interne invoqué par verify.

Spar Skills Guide Bot
DeveloppementDébutant
3002/06/2026
Claude Code
#build#test#gate#continuous-integration#code-verification

Recommandé pour

Notre avis

Exécute les commandes de build et de test configurées et enregistre les résultats comme preuve de succès ou d'échec.

Points forts

  • Réponse rapide sur l'état de compilation et des tests
  • Gère les commandes manquantes en les sautant proprement
  • Capture les sorties pour analyse ultérieure
  • S'intègre dans un pipeline de vérification plus large

Limites

  • Ne vérifie que le build et les tests, pas la qualité du code
  • Limité à 5 minutes par commande, pas de personnalisation avancée
  • Dépend de la configuration externe (config.json)
Quand l'utiliser

Utilisez cette portière comme premier contrôle dans un pipeline d'intégration continue pour valider que le code compile et que les tests passent.

Quand l'éviter

Ne convient pas pour des pipelines complexes nécessitant plusieurs étapes de build ou des validations avancées.

Analyse de sécurité

Prudence
Score qualité85/100

The skill uses Bash to execute build and test commands defined in a configuration file. While intended for internal use, this could allow execution of harmful commands if the configuration is compromised. There is no explicit validation of command content.

Points d'attention
  • Runs arbitrary commands from config.json using Bash, which could be dangerous if the config file is tampered with or contains malicious commands.

Exemples

Verify build and tests
Run the build gate to check that the project compiles and all tests pass.
Check code health
Verify the codebase by executing the build and test commands.
Quick validation
Perform a basic verification of the project with build and test gates.

name: gate-build description: >- Runs configured build and test commands. Captures output as evidence. Returns PASS if commands exit 0, FAIL otherwise. Internal gate — invoked by verify, not directly by users. allowed-tools:

  • Read
  • Bash
  • Glob
  • Write

Gate: Build

Goal

Confirm the codebase compiles and tests pass. This is the most basic gate — if the code doesn't build or tests don't pass, nothing else matters.

Inputs

  • .specwright/config.json -- commands.build and commands.test
  • .specwright/state/workflow.json -- current work unit for evidence path

Outputs

  • Evidence file at {currentWork.workDir}/evidence/build-report.md
  • Gate status update in workflow.json: PASS, FAIL, or ERROR
  • Console output showing results inline (users see findings, not just badges)

Constraints

Execution (LOW freedom):

  • Read build command from config.json commands.build. Run it. Capture output.
  • Read test command from config.json commands.test. Run it. Capture output.
  • If a command is null/missing, SKIP that check (not FAIL).
  • If both commands are null, gate status is SKIP.
  • Timeout: 5 minutes per command. If exceeded, status is ERROR.

Verdict (LOW freedom):

  • Follow protocols/gate-verdict.md for verdict rendering.
  • Build exit code 0 + test exit code 0 = PASS.
  • Any non-zero exit code = FAIL.
  • Show failing output inline so the user sees what broke.

Evidence (LOW freedom):

  • Follow protocols/evidence.md for file format and storage.
  • Write evidence file with: command run, exit code, stdout/stderr, timestamp.
  • Update workflow.json gates section per protocols/state.md.

Protocol References

  • protocols/gate-verdict.md -- default-FAIL, self-critique, visibility
  • protocols/evidence.md -- evidence storage and freshness
  • protocols/state.md -- gate status updates

Failure Modes

| Condition | Action | |-----------|--------| | Build command not configured | SKIP build check, continue to test check | | Test command not configured | SKIP test check | | Both commands null | Gate status = SKIP | | Command times out (>5min) | Gate status = ERROR with timeout message |

Skills similaires