Class: Aidp::Watch::ImplementationVerifier

Inherits:
Object
  • Object
show all
Includes:
MessageDisplay
Defined in:
lib/aidp/watch/implementation_verifier.rb

Overview

Verifies that implementation fully addresses issue requirements using ZFC before allowing PR creation in watch mode build workflow

Constant Summary

Constants included from MessageDisplay

MessageDisplay::COLOR_MAP

Instance Method Summary collapse

Methods included from MessageDisplay

#display_message, included, #message_display_prompt

Constructor Details

#initialize(repository_client:, project_dir:, ai_decision_engine: nil) ⇒ ImplementationVerifier

Returns a new instance of ImplementationVerifier.



14
15
16
17
18
# File 'lib/aidp/watch/implementation_verifier.rb', line 14

def initialize(repository_client:, project_dir:, ai_decision_engine: nil)
  @repository_client = repository_client
  @project_dir = project_dir
  @ai_decision_engine = ai_decision_engine || build_default_ai_decision_engine
end

Instance Method Details

#verify(issue:, working_dir:) ⇒ Object

Verify implementation against issue requirements Returns: { verified: true/false, reason: String, missing_items: Array }



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/aidp/watch/implementation_verifier.rb', line 22

def verify(issue:, working_dir:)
  Aidp.log_debug("implementation_verifier", "starting_verification", issue: issue[:number], working_dir: working_dir)

  display_message("🔍 Verifying implementation completeness...", type: :info)

  # Gather verification inputs
  issue_requirements = extract_issue_requirements(issue)
  implementation_changes = extract_implementation_changes(working_dir)

  # Use ZFC to verify completeness
  result = perform_zfc_verification(
    issue_number: issue[:number],
    issue_requirements: issue_requirements,
    implementation_changes: implementation_changes
  )

  Aidp.log_info(
    "implementation_verifier",
    "verification_complete",
    issue: issue[:number],
    verified: result[:verified],
    reason: result[:reason]
  )

  result
end