Skip to content

Pipeline quality gates: mandatory audit steps between pipeline stages #133

@Alan-Jowett

Description

@Alan-Jowett

Summary

Add quality gates as a first-class pipeline concept — mandatory or recommended audit/verification steps that run between pipeline stages before the next stage can proceed.

Motivation

GitHub Spec Kit builds quality gates directly into its workflow:

  1. Spec quality checklist — After specification creation, validates completeness, testability, and ambiguity
  2. Constitution compliance — Before planning, checks that the spec doesn't violate project principles
  3. Pre-implementation checklist — Before coding, verifies all checklist items pass (stops and asks if failures exist)
  4. Consistency analysis — After task breakdown, validates spec ↔ plan ↔ tasks alignment with severity levels (CRITICAL > HIGH > MEDIUM > LOW)

These gates are mandatory, not opt-in, which is what makes them effective.

PromptKit already has the building blocks:

  • audit-traceability — validates cross-document alignment
  • audit-spec-alignment — checks spec ↔ implementation alignment
  • audit-code-compliance — checks code ↔ spec alignment
  • audit-test-compliance — checks test ↔ spec alignment

The gap: pipelines don't declare which audits should run between stages.

Proposed Design

  1. Pipeline schema extension: Add an optional gate field to pipeline stage transitions in manifest.yaml:

    pipelines:
      document-lifecycle:
        stages:
          - template: author-requirements-doc
            output_contract: requirements-document
          - gate: audit-traceability          # ← NEW: must pass before next stage
            severity: warning                 # or "blocking"
          - template: author-design-doc
            input_contract: requirements-document
            output_contract: design-document
          - gate: audit-spec-alignment
            severity: blocking
  2. Bootstrap engine integration: When running a pipeline interactively, the bootstrap engine would execute gate templates between stages and report pass/fail before proceeding

  3. CLI integration: npx promptkit assemble could emit a note about recommended gates when assembling a pipeline stage

Credit

This pattern is inspired by GitHub Spec Kit's built-in quality checkpoints. See their plan-template.md (constitution compliance gate) and checklist-template.md (pre-implementation quality validation) for the original implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions