liveBook · Manning

Task/Verify gate

As explained in Vibe Engineering

The Task/Verify gate is a workflow checkpoint that separates task execution from explicit verification.

Generated code can look plausible while missing requirements or failing on cases the prompt left unspecified. The Task/Verify gate replaces dump-and-review with verify-then-merge: an agent implements a small task against a contract, and the pipeline—not a human reading of the diff—decides whether it passes. section 1.3 section 1.4

Use the gate as part of an iterative workflow:

  • Explore first, then turn what you learn into an executable specification and a reviewed plan. Break the plan into tasks small enough to verify individually. section 1.3
  • Have the agent implement each task against the contract, tests first. Use the pipeline result to determine whether the task passed. section 1.3
  • After verification, refactor the working solution into the team’s own terms. The goal is code the team can explain and maintain without relying on the generation transcript. section 1.3

Verify an ISBN validator

A prompt asks for a Python function that validates 13-digit ISBNs, with or without hyphens, and returns a boolean. Repeating the prompt can produce different implementations: one supplied retry rejects hyphenated input and refers to an undefined variable. Tests for valid inputs in both formats, an invalid checksum, invalid length, and nonnumeric characters make several expectations explicit before accepting the result. section 1.4

import pytest
# Assume is_valid_isbn13 is the function to be generated
def test_valid_isbn_with_hyphens():
    assert is_valid_isbn13("978-0-306-40615-7") is True
def test_valid_isbn_without_hyphens():
    assert is_valid_isbn13("9780306406157") is True
def test_invalid_checksum():
    assert is_valid_isbn13("978-0-306-40615-0") is False
def test_invalid_length():
    assert is_valid_isbn13("978-0-306-40615") is False
def test_contains_non_numeric_characters():
    assert is_valid_isbn13("978-0-306-40615-X") is False

The pytest cases turn the ISBN requirements into checks for the verification gate. section 1.4

A passing gate checks the task against its stated contract; it does not replace the later work of understanding and owning the code. Keep prompts, outputs, and specifications as owned artifacts so the remaining trust debt stays visible. section 1.3 section 1.4

How Vibe Engineering covers it

How deep it goes
Describes tests-first implementation against an executable contract and pipeline-based pass decisions, without detailing pipeline configuration.
Examples
Uses generated Python ISBN validators and pytest cases for input formats, checksums, length, and nonnumeric characters.
What you can do after
Apply the gate by decomposing a reviewed contract into individually verifiable tasks and using pipeline results before merging.
How it connects
Connects executable specifications, test-first development, continuous verification, refactoring, and trust debt.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.