Analysis Gate (G2)

Bevor ein Architekt mit dem Bauen beginnt, prüft er den Bauplan. Ist alles bedacht? Sind die Statik-Berechnungen korrekt? Das Analysis Gate ist dieser Prüfpunkt im Entwicklungsprozess - es stellt sicher, dass die Analyse vollständig und korrekt ist, bevor die Implementierung beginnt.

Was ist ein Gate?

Ein Gate ist ein Qualitätstor im Prozess. Es trennt zwei Phasen und lässt nur durch, was alle definierten Prüfbedingungen (Prädikate) erfüllt. Das Analysis Gate (G2) steht zwischen der Analyse-Phase und der Implementierungs-Phase.

Vollständiges Beispiel

Definition des Analysis Gates:

# Gate: G2_ANALYSIS
# Position: Nach Phase 3 (Analysis), vor Phase 4 (Design)

gate:
  id: "G2_ANALYSIS"
  name: "Analysis Gate"
  description: "Prüft die Vollständigkeit und Qualität der Analyse"
  position:
    after_phase: 3  # Analysis
    before_phase: 4  # Design

  # Welche Prädikate müssen erfüllt sein?
  predicates:
    required:
      - id: "has_requirements_defined"
        description: "Alle Anforderungen sind dokumentiert"
        severity: "critical"

      - id: "has_acceptance_criteria"
        description: "Akzeptanzkriterien sind definiert"
        severity: "critical"

      - id: "has_contracts_drafted"
        description: "Contracts sind entworfen"
        severity: "high"

      - id: "has_impact_analysis"
        description: "Auswirkungsanalyse durchgeführt"
        severity: "high"

    conditional:
      - id: "has_security_assessment"
        condition: "change_class IN ('normal', 'critical')"
        description: "Security-Bewertung bei nicht-trivialen Änderungen"

      - id: "has_performance_assessment"
        condition: "change_class == 'critical'"
        description: "Performance-Bewertung bei kritischen Änderungen"

  # Entscheidungslogik
  decision:
    pass_condition: "ALL required predicates PASS AND ALL conditional predicates (where condition met) PASS"

    on_pass:
      action: "transition_to_phase_4"
      notification: "team-channel"

    on_fail:
      action: "return_to_phase_3"
      notification: "requester + team-lead"
      required: "fix_and_resubmit"

Gate-Prüfung in der Praxis

# Gate-Prüfung G2_ANALYSIS
gate_check:
  gate_id: "G2_ANALYSIS"
  change_id: "CHG-2024-0046"
  change_class: "normal"
  checked_at: "2024-01-15T11:00:00Z"

  predicate_results:
    # Required Predicates
    - predicate_id: "has_requirements_defined"
      passed: true
      evidence:
        document: "docs/requirements/CHG-2024-0046.md"
        sections:
          - "Functional Requirements (5 items)"
          - "Non-Functional Requirements (3 items)"
          - "Out of Scope (2 items)"

    - predicate_id: "has_acceptance_criteria"
      passed: true
      evidence:
        criteria_count: 8
        testable: true
        example: "User can login with email within 3 seconds"

    - predicate_id: "has_contracts_drafted"
      passed: true
      evidence:
        contracts:
          - type: "api"
            id: "api-auth-v2"
            status: "draft"
          - type: "data"
            id: "data-user-v3"
            status: "draft"

    - predicate_id: "has_impact_analysis"
      passed: true
      evidence:
        affected_systems: ["auth-service", "user-service"]
        affected_teams: ["team-identity"]
        risk_level: "medium"

    # Conditional Predicates
    - predicate_id: "has_security_assessment"
      condition_met: true
      passed: true
      evidence:
        assessment_date: "2024-01-15"
        assessed_by: "security-team"
        findings: "No critical issues"

  # Gesamtergebnis
  verdict: "PASS"
  passed_at: "2024-01-15T11:00:05Z"
  next_phase: 4

  approvals:
    - role: "product_owner"
      approved: true
      comment: "Requirements complete"
    - role: "tech_lead"
      approved: true
      comment: "Technical feasibility confirmed"

Was passiert bei Failure?

Wenn ein Prädikat nicht erfüllt ist, wird das Gate blockiert und die Änderung zurück in die Analyse-Phase geschickt:

# Gate-Failure
gate_check:
  gate_id: "G2_ANALYSIS"
  change_id: "CHG-2024-0047"
  verdict: "FAIL"

  failed_predicates:
    - predicate_id: "has_acceptance_criteria"
      passed: false
      reason: "Only 2 of 5 required criteria are testable"

  required_actions:
    - action: "Define measurable acceptance criteria"
      assignee: "product_owner"
      deadline: "2024-01-16T12:00:00Z"

  return_to_phase: 3

Warum ist das wichtig?

Das Analysis Gate verhindert, dass unklare Anforderungen in die Implementierung gelangen. Es ist billiger, einen Fehler in der Analyse zu finden als im Code. Das Gate schafft Klarheit und spart Zeit.

Im Mensch + KI-Code Prozess: Das Analysis Gate (G2) ist nach Phase 3 obligatorisch. Es prüft, ob die KI genug Kontext hat, um eine korrekte Implementierung zu erstellen. Bei Change Class "Trivial" kann das Gate übersprungen werden.